Compare commits

..
Author SHA1 Message Date
Zoltan Varga 5f9c74f4c5 [runtime] Fix mono_sigctx_to_monoctx () on win32. 2014-09-22 01:16:00 -04:00
Zoltan Varga df43380ea6 [runtime] Fix the win32 build. 2014-09-22 01:01:11 -04:00
Zoltan Varga ab5dda7fba Fix warnings. 2014-09-22 06:46:23 +02:00
Zoltan Varga 12bceb1700 [jit] Fix the handler block trampolines on windows. 2014-09-22 06:44:54 +02:00
Zoltan Varga f930824ea9 [runtime] Enable the fastpath in CEE_MONO_JIT_ATTACH on windows. 2014-09-22 06:44:54 +02:00
Zoltan Varga e0a408f702 [runtime] Treat the tls key as the tls offset on windows, since they are the same. 2014-09-22 06:44:53 +02:00
Zoltan Varga 12dc660454 [runtime] Enable fp elimination on winx64. 2014-09-21 23:07:30 -04:00
Zoltan Varga ac2e2c7703 [runtime] Disable a few more tests on windows which hang on winx64. 2014-09-21 22:48:42 -04:00
Zoltan Varga d5a18ba292 [jit] Enable the pushless call code on windows too, get rid of the non-pushless code. 2014-09-21 22:21:41 -04:00
Zoltan Varga dfb8d2ac8e [jit] Implement the pushless call code on winx64. 2014-09-21 22:01:03 -04:00
Zoltan Varga ea77b1f9fb [jit] Enable monitor fast paths on win64. 2014-09-22 01:45:28 +02:00
Zoltan Varga 558750f053 [runtime] Fix the windows build. 2014-09-21 17:42:45 -04:00
Zoltan Varga e2e74c95e6 [runtime] Fix the unregistration of our exception handler on windows. Fixes #23221. 2014-09-21 14:54:24 -04:00
Zoltan Varga ca51c3b026 [runtime] Enable the new interrupt code on arm linux. 2014-09-20 02:43:47 -04:00
Zoltan Varga d4b4c2dbbc [runtime] Add wrappers around the wapi interrupt functions to mono-threads to reduce the amount of #ifdef WIN32 blocks in threads.c. 2014-09-19 17:51:14 -04:00
Sebastien Pouliot 23042a0aa3 Fix typo (and XI builds) 2014-09-19 16:48:37 -04:00
Sebastien Pouliot 64b8e0c063 [System.Numerics] Fix unit test to succeed on different culture (XI runs tests them on several cultures) 2014-09-19 16:30:16 -04:00
Ludovic Henry 05d341392c [sgen] Fix wbarrier use if we define SGEN_HEAVY_BINARY_PROTOCOL, HEAVY_STATISTICS or XDOMAIN_CHECKS_IN_WBARRIER 2014-09-19 11:14:48 -04:00
Miguel de Icaza af429ecfd0 Merge pull request #1245 from StephenMcConnel/bug-22483
Fix scrolling in SWF.ListView.EnsureVisible(int index)
2014-09-19 10:17:09 -04:00
Miguel de Icaza d2c021407d Merge pull request #1287 from akoeplinger/fix-appconfig-performancecounters
[System] Add performanceCounters element to System.Diagnostics app.config configuration section
2014-09-19 10:15:05 -04:00
Miguel de Icaza 3461617bc2 Merge pull request #1290 from directhex/master
Put KeyPairPersistence load into a try{}catch{} block.
2014-09-19 10:13:55 -04:00
Miguel de Icaza 605c8771b8 Merge pull request #1273 from joelmartinez/docs-unified-fix
bugfix for mdoc update with --dropns feature
2014-09-19 10:11:01 -04:00
Ludovic Henry fcb9de513a [utils] Fix force inlining compilation error with gcc on linux
[02131]   CC       libmonoruntimesgen_la-sgen-marksweep.lo
[02131] In file included from sgen-major-copy-object.h:35:0,
[02131]                  from sgen-marksweep.c:1128:
[02131] sgen-copy-object.h:38:1: warning: always_inline function might not be inlinable [-Wattributes]
[02131]  par_copy_object_no_checks (char *destination, MonoVTable *vt, void *obj, mword objsize, SgenGrayQueue *queue)
[02131]  ^
[02131] sgen-marksweep.c: In function 'par_copy_object_no_checks':
[02131] sgen-copy-object.h:38:1: error: function 'par_copy_object_no_checks' can never be copied because it saves address of local label in a static variable
[02131] make[3]: *** [libmonoruntimesgen_la-sgen-marksweep.lo] Error 1
[02131] make[3]: Leaving directory `/root/rpmbuild/BUILD/mono-3.10.1/mono/metadata'
[02131] make[2]: *** [all-recursive] Error 1
[02131] make[2]: Leaving directory `/root/rpmbuild/BUILD/mono-3.10.1/mono'
[02131] make[1]: *** [all-recursive] Error 1
[02131] make[1]: Leaving directory `/root/rpmbuild/BUILD/mono-3.10.1'
[02131] make: *** [all] Error 2
[02131] error: Bad exit status from /var/tmp/rpm-tmp.YxcUOE (%build)
2014-09-19 09:46:09 -04:00
Marek Safar 7ad366c25a [mcs] Improve scoring of failed overload resolution. Fixes #22989 2014-09-19 00:09:35 +02:00
Ludovic Henry d1ffd5a794 [utils] Use MONO_ALWAYS_INLINE + Add MONO_NEVER_INLINE 2014-09-18 16:42:00 -04:00
Jo Shields 3552179bda Put KeyPairPersistence load into a try{}catch{} block.
Kpp.Load() will throw an unhandled exception if _filename (a folder to use as the key store) does not exist and it cannot be created.

This is an entirely valid thing to have happen - cert importing into the machine store (mozroots --import --machine --sync) as root will create a /usr/share/.mono/certs/ folder, but will not create /usr/share/.mono/keypairs - and since the root user owns /usr/share/.mono/, if the user tries to enumerate the certificates in /usr/share/.mono/certs/, they get 0 certificates returned due to the unhandled exception dropping each loaded certificate on the floor.

Closes: Xamarin bug 23015
2014-09-18 17:32:06 +01:00
Marek Safar eb6781f3cd [mcs] Fix output type inference when parameters after first one depend on fixed first set. Fixes #23024 2014-09-18 14:47:19 +02:00
Marek Safar 548dca4730 [mcs] Better check for parameterless constructor overload 2014-09-18 10:10:46 +02:00
Zoltan Varga a4024ba4ae [sdb] Use new style interrupt on win32 if available. 2014-09-17 22:49:02 -04:00
Zoltan Varga 8ed233ef06 [runtime] Use the windows CONTEXT<->MonoContext conversion code to mono-context.c, simplify some code. 2014-09-17 22:37:18 -04:00
Zoltan Varga 4fc8068d2a [runtime] Implement the new suspend infrastructure on windows. 2014-09-17 18:25:00 -04:00
Zoltan Varga 28179361ec [sdb] Implement support for win64. 2014-09-17 15:21:11 -04:00
Marek Safar d62679a4a4 [xbuild] Workaround for issues with CreateItem task where metadata are not generated due to up-to-data inputs. Fixes #23022 2014-09-17 20:22:36 +02:00
Zoltan Varga e2f24086a8 Merge pull request #1288 from ylatuya/patch-2
[mkbundle] Fix check for dos2unix
2014-09-17 14:03:43 -04:00
Jonathan Pryor 818b81ef40 [runtime] Use statfs(2) on Android.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=23077

Reverts commit 53ce92470.

Commit 53ce92470 disabled use of statfs(2) on Android, for unspecified
reasons. (My *suspicion* is that the Android version mono was
originally ported to didn't have statfs(2), but I can neither confirm
nor deny that guess.)

Android has supported statfs(2) since API-4 Android v1.6 (in that
statfs(2) is in the header files); what's missing is MNT_RDONLY. What
IS present is MS_RDONLY, which appears to serve the same purpose.

Re-enable use of statfs(2) and use MS_RDONLY when building against the
Android NDK.
2014-09-17 12:56:44 -04:00
Andoni Morales Alastruey 753f233a31 [mkbundle] Fix check for dos2unix
This fixes the command to check for dos2unix and makes mkbundle usable again with mingw.
We need first to redirect the standard input, otherwise the check always fails with an InvalidOperationException and set CreateNoWindow=false to avoid spawning a new window.
2014-09-17 16:17:33 +02:00
Marek Safar 4f719f9ce9 [xbuild] Fix few crashes when task loading fails 2014-09-17 11:19:57 +02:00
Zoltan Varga 5dbf97e660 [jit] Make calls from gshared to gsharedvt sharable methods indirect since otherwise at runtime we might find an instantiation and we cannot patch the call, leading to performance problems. Fixes #23021. 2014-09-16 23:17:54 -04:00
Michael Hutchinson 2804d6af37 Fix mobile and mobile_static profiles
And bring them to parity with monodroid and monotouch
2014-09-16 19:14:20 -04:00
Martin Baulig 87622fc711 [WCF]: Update to my last fix for bug #22129.
The problem already starts when creating the OperationDescription; we need
to also look at the End* method here to correctly parse the reply parameters.

Then ClientRuntimeChannel.Process needs to distinguish between sync/async
and copy the out/byref parameters when needed.
2014-09-16 21:34:20 +02:00
Zoltan Varga 4e1e37519a [runtime] Make stack walks done by the sampling profiler async safe. 2014-09-16 15:07:55 -04:00
Marek Safar 9aed010782 [mcs] struct parameterless instance constructors 2014-09-16 19:19:32 +02:00
Zoltan Varga 80b14d356f [runtime] Disable VS warnings C4273 (inconsistent dll linkage), and C4005 (macro redefinition). The former occurs becase we mark exported function declarations using MONO_API, but not the definitions. The latter occurs because we define _WINSOCKAPI_. 2014-09-15 23:30:40 -04:00
Zoltan Varga 557390ee46 [runtime] Fix the my_g_bit_nth_msf () function for win64. 2014-09-15 22:10:23 -04:00
Zoltan Varga 02f48039b1 [runtime] Add support for setting the thread name on windows. On windows, this will only work when running under a debugger. 2014-09-15 19:14:09 -04:00
Zoltan Varga ae030203e7 [arm64] Increase some opcode sizes. Fixes #23026. 2014-09-15 18:09:43 -04:00
Zoltan Varga fad438976c [runtime] Fix an assert in w32_dlerror () on winx64. 2014-09-15 17:35:05 -04:00
Marek Safar 240cf239a2 [xbuild] More tweaks to tool path setup 2014-09-15 22:25:11 +02:00
Zoltan Varga 64f6eb2d1d [aot] Use gsharedvt for collection types instantiated with generic structs as well. 2014-09-15 15:31:38 -04:00
Marcos Henrich 1531798bbe Added missing files to projects csproj files. 2014-09-15 19:14:48 +01:00
Marek Safar 2320d0dc40 [mcs] Revert usage of closed delegates for compiler generated anonymous method 2014-09-15 18:34:20 +02:00
Rodrigo Kumpera 6ea08668a2 Merge pull request #1280 from nealef/master
Maximum large object size should be limited by SSIZE_MAX not SIZE_MAX.
2014-09-15 12:31:16 -04:00
Martin Baulig 8b10d9bb0b [WCF]: Copy out/ref parameters on async call; bug #22129. 2014-09-15 18:25:54 +02:00
Marek Safar b7fb736254 Merge pull request #1286 from esdrubal/xmlnullablearrayitem
XmlSerializer nullable array items.
2014-09-15 07:20:02 -09:00
Marcos Henrich 5fc6ecd7c7 If not specified assume that array items are nullable. Fixes #19012. 2014-09-15 16:57:13 +01:00
Marcos Henrich 8790297c85 Test xml serialization of nullable array items. Covers #19012. 2014-09-15 16:55:31 +01:00
Marek Safar 1afc866f87 [xbuild] Workaround for null log service (which should never be null) 2014-09-15 17:37:49 +02:00
Marek Safar 52cdea5c0a Merge pull request #1257 from esdrubal/xmloptional
Added optional serialization based on ShouldSerialize{V}.
2014-09-15 03:44:30 -09:00
Marcos Henrich be02242f8b Ignore method ShouldSerialize if it is a generic. 2014-09-15 13:02:00 +01:00
Marcos Henrich 85650c7528 Test serialization wen class has method bool ShouldSerialize<T>().
.NET throws an exception but it should have no effect on the serialization.
2014-09-15 13:02:00 +01:00
Marcos Henrich 79de2b62f9 Added optional serialization based on ShouldSerialize{V}.
SerializationCodeGenerator and XmlSerializationWriterInterpreter will no longer serialize an attribute named {V} if its object has a method named ShouldSerialize{V}() that returns false.
{V}Specified now is also checked to be true before serializating the attribute even if it is a property that is not settable.
Fixes #1852.
2014-09-15 13:02:00 +01:00
Marcos Henrich 17ad50a165 Added test for optional {V}Specified and ShouldSerialize{V}.
{V}Specified is a property or field and ShouldSerialize{V} is a method that can be set to false if we do not want to serialize an attribute with name {V}.
2014-09-15 13:02:00 +01:00
Marcos Henrich 1ec4bd5c26 Fixed NullReferenceException. 2014-09-15 13:01:04 +01:00
Marek Safar 7439e997ac [xbuild] Use ToolPath when building ToolTask execution path. Fixes #22981 2014-09-15 13:38:40 +02:00
Alexander Köplinger d77664ceb0 [System] Add performanceCounters element to System.Diagnostics app.config configuration section
See http://msdn.microsoft.com/en-us/library/ms229387(v=vs.110).aspx for details about the element.
The value that is set by the element isn't currently used in Mono, but applications using it in their app.config crash otherwise (e.g. http://stackoverflow.com/questions/25741651).
2014-09-14 07:45:11 +02:00
Zoltan Varga 777f69153c [runtime] Remove an unused interpreter file. 2014-09-13 13:59:03 -04:00
Marek Safar 7f2825301e [mcs] nullable property pattern 2014-09-13 12:43:41 +02:00
Zoltan Varga a1f58d35be [runtime] Fix the windows build. Define _WINSOCKAPI_ to fix the compilation problems when windows.h is included before winsock2.h: http://stackoverflow.com/questions/1372480/c-redefinition-header-files. 2014-09-12 20:07:05 -04:00
Joel Martinez 6c1bf0d17e [mdoc] consolidated dropns and dropns-assemblies into a single parameter.
Based on pull request feedback, this is a simpler usage, and meets our required use-case. A sample version of this parameter would be: `--dropns MyUnifiedAssembly=MyDroppedPrefix`
2014-09-12 17:22:06 -04:00
Rodrigo Kumpera a8392ba567 [runtime] Improve thread dumping reliability by doing it while holding the fat locks.
We take the loader and the root domain locks before doing a thread dump. This reduces the odds
of us suspending a thread that holds either of them and deadlocking, for example, while decoding
AOT JIs.
2014-09-12 14:18:39 -04:00
Neale Ferguson f065a289f6 Maximum large object size should be limited by SSIZE_MAX not SIZE_MAX.
The latter appears to be a hangover from 32-bit systems.
2014-09-12 11:37:52 -04:00
Neale Ferguson 3f740f3d94 Fixes 19752 -
Users have been complaining about strange errors arising when using the OracleClient classes.
I have tracked it down to the OciDefineHandle and OciDefineByPos calls, and OracleParameter
handling of amanged objects by unmanaged code. Currently two of the parameters passed to the
above OCI  call are short variables. They are passed as "ref" fields as Oracle uses their
address to put size and indicator data once the data is fetched. However, being defined as
short means that they are eligible for being moved during garbage collection. Thus if that
field is moved between the OciDefineByPos call and the fetch of the data then what Oracle is
pointing to may no longer be variable. I'm thinking it may be better to define these fields as
IntPtr and allocate them and retrieve their values via Marshal.ReadInt16. As for OracleParameter,
it uses a managed object "indicator" that is also used in a similar way. This reference is replaced
by a IntPtr and a get/set method to access the contents.
2014-09-12 11:25:57 -04:00
Marek Safar 300876b229 [mcs] Don't use `1 naming for compiler generated second level and deeper nested types. Fixes #22893 2014-09-12 15:20:26 +02:00
Zoltan Varga 7f6a46403d Merge pull request #1276 from Therzok/master
Add concurrent hashtable test to gitignore.
2014-09-11 20:58:12 -04:00
Zoltan Varga f0d2ee46f8 Merge pull request #1275 from ranma42/fix-lib64
Fix build with lib64 folder for arch-specific libraries
2014-09-11 20:57:48 -04:00
Sebastien Pouliot 90bb9c6d00 [System] Fix building unit tests under the mobile profile 2014-09-11 20:43:21 -04:00
Zoltan Varga 41339d95c6 [jit] Always pass the imt arg to interface calls in gsharedvt methods. Fixes #22624. 2014-09-11 17:57:11 -04:00
Joel Martinez c842249d72 [mdoc] Formatting feedback from pull #1273 2014-09-11 15:43:28 -04:00
Marek Safar 9fd3c7ac4b [mcs] property pattern 2014-09-11 19:40:51 +02:00
Rolf Bjarne Kvinge 550d314e51 Don't throw TimeZoneNotFoundExceptions when iOS gives us invalid data.
iOS 8 GM lists "Asia/Chita" among its time zones, but when requesting
the time zone data for that time zone, no data is returned.

With this change we ignore time zones without any data when fetching
all the timezones on the system.
2014-09-11 19:04:00 +02:00
Marek Safar 0083728e19 Merge pull request #1278 from esdrubal/datetimegmt
GMT DateTimeOffset is now properly parsed.
2014-09-11 05:29:27 -09:00
Marcos Henrich e73499b337 GMT DateTimeOffset is now properly parsed. Fixes #22851.
GMT date formats set useutc to true, so now useutc is checked to init DateTimeOffset with a zero offset.
2014-09-11 15:12:36 +01:00
Marcos Henrich b818408b16 Test that offset is zero when date ends with GMT. Covers #22851. 2014-09-11 15:11:42 +01:00
Marek Safar b946785022 Merge pull request #1277 from esdrubal/calendarsdaysinyear
Improved CalendricalCalculations fixed_from_dmy methods.
2014-09-11 03:17:52 -09:00
Marcos Henrich 468160e712 Improved CalendricalCalculations fixed_from_dmy methods. Fixes #21930.
In some cases fixed_from_dmy is used with the month parameter greater than the number of months of that year.
Year is now incremented until month parameter is valid.
2014-09-11 12:54:36 +01:00
Marcos Henrich da04211894 Test Calendar.DaysInYear. Covers #21930. 2014-09-11 12:53:25 +01:00
Ungureanu Marius 924a954d1f Add concurrent hashtable test to gitignore. 2014-09-11 13:39:57 +03:00
Marek Safar 1242b4b82c [corlib] Enumerate all subdirectories including the first one. Fixes #22857 2014-09-11 11:20:44 +02:00
Marek Safar 1eb9ba45c4 [system] Fixes failing test 2014-09-11 10:31:26 +02:00
Andrea Canciani d2f391c80c Do not hardcode lib path
The changes from 3408b8e5f1 cause
regressions in distros which do not use lib as folder for
arch-specific libraries, like Fedora x86_64.

Instead, reloc_libdir should be used (as in data/mono.pc.in).

This change is released under the MIT/X11 license.
2014-09-11 08:50:47 +02:00
Zoltan Varga 2c11b2ea4a [aot] Avoid a stack overflow if profiler enter-leave events are requested in the full-aot mode. 2014-09-10 19:14:57 -04:00
Zoltan Varga 7912295bc9 [runtime] Fix the RESOLTION_SCOPE->RESOLUTION_SCOPE typo. 2014-09-10 19:07:04 -04:00
Joel Martinez 582b370761 [mdoc] added -dropns-assemblies parameter.
Will now only replace the namespace when the type or member is in a listed assembly
2014-09-10 16:54:54 -04:00
Zoltan Varga d3624fa257 [runtime] Redirect runtime logging to asl_log only on ios, not when running the cross compiler. 2014-09-10 14:24:11 -04:00
Marek Safar 1d63659429 Merge pull request #1271 from akoeplinger/fix-switch-ctor
[System] Fixed Diagnostics.Switch ctor behavior for null parameters
2014-09-10 08:19:20 -09:00
Alexander Köplinger 29abf6790d [System] Fixed Diagnostics.Switch ctor behavior for null parameters
Passing null to the displayName or description ctor parameter on MS.NET makes them equal to an empty string.
Fixed the Mono behavior to match .NET.
2014-09-10 19:09:34 +02:00
Marek Safar 6d07ad8e7a [system.net.http] Encode ContentDisposition name. Fixes #18422 2014-09-10 19:09:27 +02:00
Marek Safar 9050d9cba1 [mcs] Remove value type constrained type parameter instantiation optimization to handle parameterless struct constructors 2014-09-10 19:09:27 +02:00
Marek Safar 156c7cf97a Merge pull request #1270 from esdrubal/xmlimplicit
When needed serialized objects are now implicitly converted.
2014-09-10 08:08:26 -09:00
Marcos Henrich f8ff518ebe When needed serialized objects are now implicitly converted.
Fixes #20403.
2014-09-10 17:25:44 +01:00
Marcos Henrich 5fdbad2444 Changed method ImplicitConvert to internal static. 2014-09-10 17:24:38 +01:00
Marcos Henrich 0804720aaa ImplicitConvert was using method with wrong parameter and return type. 2014-09-10 17:23:44 +01:00
Marcos Henrich f008d4afb6 Test XmlSerialization of element that requires implicit conversion.
Covers #20403.
2014-09-10 16:30:03 +01:00
Martin Baulig bbbcc73bde [websocket]: Fix ClientWebSocket.ReceiveAsync() with small buffer; bug #22704.
When calling ClientWebSocket.ReceiveAsync() with a buffer that's smaller than
the received chunk, we need to cache the header until next call.
2014-09-10 17:09:43 +02:00
Alexander Köplinger 0537cb3c2a Fix the build 2014-09-10 14:26:36 +02:00
Marek Safar 95b09a1a79 Merge pull request #1269 from Therzok/refactorSwitches
[SourceSwitch] Refactor a piece of code.
2014-09-10 02:01:15 -09:00
Marius Ungureanu 6e5e8d7915 Fix build failure caused by #1267. 2014-09-10 13:59:49 +03:00
Marius Ungureanu 462c6b08e9 [SourceSwitch] Refactor a piece of code. 2014-09-10 13:04:10 +03:00
Marek Safar ebe2a3df1d [system.net.http] Handle Content-Disposition in textual form as well. 2014-09-10 09:48:26 +02:00
Marek Safar 5846c52247 Merge pull request #1267 from ramtinkermani/master
The ShouldTrace method's conditions are fixed to correctly trace the events based...
2014-09-09 20:40:10 -09:00
ramtin 6cb9a04fca Unit Tests for SourceSwitch. Counting the number of events traced based on the Trace Level 2014-09-09 15:07:14 -07:00
Marek Safar 5e9eba8ffb [system.net.http] Tokenize dash only in range values. Fixes #22764 2014-09-09 23:41:49 +02:00
Rodrigo Kumpera 65f17c2c26 [jit] Fix error handling in a few places in the jit. 2014-09-09 16:34:55 -04:00
Rodrigo Kumpera 00f631312f [runtime] Fix error handling in mono_metadata_parse_mh_full. 2014-09-09 16:34:54 -04:00
Rodrigo Kumpera 666ea5f867 [runtime] Update reflection.c to use mono_class_get_checked. 2014-09-09 16:34:54 -04:00
Rodrigo Kumpera 3bbedfebb7 [runtime] Update marshal.c to use mono_class_get_checked. 2014-09-09 16:34:54 -04:00
Rodrigo Kumpera a17da53c37 [runtime] Cleanup usage of mono_class_get to object.c 2014-09-09 16:34:54 -04:00
Rodrigo Kumpera 6382fd247d [runtime] Cleanup usage of mono_class_get in loader.c 2014-09-09 16:34:54 -04:00
Rodrigo Kumpera a94aa47cd8 [runtime] Make icall use mono_class_get_checked. 2014-09-09 16:34:53 -04:00
Rodrigo Kumpera ec7be0fd36 [utils] Add mono_error_convert_to_exception. 2014-09-09 16:34:53 -04:00
Rodrigo Kumpera 4b726a17b8 Introduce mono_class_from_name_case_checked 2014-09-09 16:34:53 -04:00
Rodrigo Kumpera 7dd6476b8e [runtime] Use MonoError in exception.c 2014-09-09 16:34:53 -04:00
Rodrigo Kumpera 2ed68d65e8 [runtime] Change mono_type_get_full to use MonoError properly. 2014-09-09 16:34:53 -04:00
Rodrigo Kumpera 3968beaced [runtime] Introduce MonoError to mono_type_create_from_typespec. 2014-09-09 16:34:52 -04:00
Rodrigo Kumpera 5fa8e1abe7 [runtime] Plug MonoError into another function. 2014-09-09 16:34:52 -04:00
Rodrigo Kumpera 6d60ff581c [runtime] Introduce MonoError to mono_class_get_full.
Introduce MonoError into callers of mono_class_get_full.

Make mono_class_get not abort on failure until all callers are fixed.
2014-09-09 16:34:52 -04:00
Rodrigo Kumpera 5c8ab13f0c Add mono_class_get_checked to mono_class_create_from_typedef. 2014-09-09 16:34:52 -04:00
Rodrigo Kumpera 32e2bb7c39 [runtime] Change mono_type_get_full to use mono_class_get_checked. 2014-09-09 16:34:52 -04:00
Rodrigo Kumpera a824dde30f [runtime] Change do_mono_metadata_parse_type to use mono_class_get_checked 2014-09-09 16:34:51 -04:00
Rodrigo Kumpera 3ee5d36ec7 [runtime] Introduce mono_class_get_checked. 2014-09-09 16:34:51 -04:00
Rodrigo Kumpera 57cce937d8 [runtime] Introduce mono_class_from_typeref_checked and replace usage of the old one with it.
This is another step into wiring up MonoError into the typeloading codebase. This is
one more function that needs it.
2014-09-09 16:34:51 -04:00
Rodrigo Kumpera efa5a5ad17 [utils] Add mono_error_set_assembly_load_simple to ease producing an error message for ref only assemblies. 2014-09-09 16:34:51 -04:00
Rodrigo Kumpera 82c38c4409 [metadata] Replace mono_class_get_full with a saner pair of mono_class_get and mono_class_inflate_generic_class_checked. 2014-09-09 16:34:51 -04:00
Rodrigo Kumpera d3da468965 [runtime] Expose mono_class_inflate_generic_class_checked to the internal API. 2014-09-09 16:34:50 -04:00
Rodrigo Kumpera 2006bf3f44 Add deprecation notice for mono_class_get_full. 2014-09-09 16:34:50 -04:00
ramtin 59be7ba9c5 The ShouldTrace conditions are fixed to correctly trace the events based on the Level 2014-09-09 11:50:06 -07:00
Marcos Henrich bb296086c0 TimeFormat "zzz" is only valid after a date. 2014-09-09 17:44:00 +01:00
Marek Safar ccbd0b1a0d Merge pull request #1266 from esdrubal/datetimenewformat
Added time format with only offset.
2014-09-09 05:29:34 -09:00
Rodrigo Kumpera a27d7ee86d Merge pull request #1248 from kumpera/kill_the_interpreter
[runtime] Remove the interpreter.
2014-09-09 09:15:01 -04:00
Rodrigo Kumpera 8602eed8f7 [cleanup] Remove more old files. 2014-09-09 09:14:37 -04:00
Marcos Henrich a27a42b99b Added time format with only offset. Fixes #22558. 2014-09-09 12:49:00 +01:00
Marcos Henrich cf7319008b Test DateTimeOffset.Parse with format yyyy-dd-MMzzz. Covers #22558. 2014-09-09 12:41:27 +01:00
Jo Shields 4f8114aabd Fix "make dist" error
ad8236ebb8 broke "make dist", by removing Makefile.am.in whilst leaving it in EXTRA_DIST
2014-09-09 11:30:52 +01:00
Ludovic Henry 749171e917 [sgen] Tweak internal class allocator sizes to add highly used on
We observed on multiples benchmarks that most internal allocations are for 8, 16, 296 (32bits), 328 (64bits), 504 (32bits) and 1016 (64bits) bytes of memory. To minimize waste, we added these memory sizes to the default allocator sizes.
2014-09-09 11:16:09 +02:00
Atsushi Eno 2b72c6bdf2 [aspnet/ajax] fix bug #6512 (by Mikkel Kruse Johnsen) - don't deserialize GET parameters. 2014-09-09 15:09:27 +08:00
Zoltan Varga c8e73660db Merge pull request #1263 from madewokherd/begindecls
Use G_BEGIN_DECLS instead of __BEGIN_DECLS.
2014-09-08 22:40:43 -04:00
Joel Martinez dc17504d3f [mdoc] New make test, reproduces issue with --dropns when run with a secondary assembly that doesn't drop the specified namespace 2014-09-08 20:45:16 -04:00
Zoltan Varga 4373bd213a [aot] Really fix the aot-cache logging. Rework how mscorlib is handled in the aot cache. 2014-09-08 20:25:49 -04:00
Zoltan Varga f574898b09 [aot] Fix a crash in the aot cache code if MONO_LOG_LEVEL is set. 2014-09-08 20:01:21 -04:00
Zoltan Varga ceb74f4118 Merge pull request #1264 from madewokherd/vasprintf
Avoid use of vasprintf.
2014-09-08 18:49:55 -04:00
Joel Martinez 41c28a59bb [mdoc] New make test for the --dropns functionality 2014-09-08 17:54:05 -04:00
Vincent Povirk 83924ebb2c Avoid use of vasprintf.
This is not available on mingw-w64, and the extra allocation is unnecessary.

This commit licensed as MIT/X11.
2014-09-08 15:48:20 -05:00
Vincent Povirk 3c920be3e5 Use G_BEGIN_DECLS instead of __BEGIN_DECLS.
__BEGIN_DECLS isn't available in mingw-w64.

This commit licensed as MIT/X11.
2014-09-08 13:54:48 -05:00
Marek Safar 27b3636cef Merge pull request #1262 from esdrubal/uriserializationinfo
Added support for UriComponents.SerializationInfoString.
2014-09-08 05:40:33 -09:00
Marcos Henrich ea6b8960d0 Added support for UriComponents.SerializationInfoString. Fixes #21571. 2014-09-08 22:21:02 +08:00
Marcos Henrich d2d338fe26 Test UriComponents.SerializationInfoString. Covers #21571. 2014-09-08 22:09:52 +08:00
Marek Safar 4bd9820eaa Merge pull request #1253 from esdrubal/datetimeiso8601
DateTime.Parse now handles unlimited number of fractional digits.
2014-09-08 03:52:54 -09:00
Marek Safar 14f56f6aea [system.numerics] Unify handling of default ctor and zero. Fixes #22591 2014-09-08 14:50:39 +02:00
Marek Safar 88bc5cee97 [mcs] switch statement with recursive pattern matching 2014-09-08 11:48:52 +02:00
Marek Safar 92ff3c372d [system.net.http] Make SendAsync state free to handle recursive calls. Fixes #22724 2014-09-08 11:48:51 +02:00
Rodrigo Kumpera 128f297b84 Merge pull request #1260 from khellang/patch-2
Added less media type
2014-09-07 12:26:57 -04:00
Rodrigo Kumpera 247bf1f21c Merge pull request #1259 from khellang/patch-1
Updated WOFF to official media type
2014-09-07 12:26:37 -04:00
Kristian Hellang d595c66bbd Added less media type 2014-09-07 17:24:37 +02:00
Kristian Hellang 788c95a0e0 Updated WOFF to official media type
See http://www.w3.org/TR/WOFF/#appendix-b for the media type registration
2014-09-07 17:19:42 +02:00
Marek Safar e207bf76ab Merge pull request #1258 from akoeplinger/unify-test-namespaces
Cleanup namespace names of class lib tests to follow convention
2014-09-06 21:25:38 -09:00
Zoltan Varga f8365f7900 [gsharedvt] Allow the SIZEOF opcode in gsharedvt code if it doesn't reference a gsharedvt type. Fixes #22711. 2014-09-06 00:38:38 -04:00
Marcos Henrich 1852905c44 Test that wrong ISO8601 dates throw FormatException. 2014-09-05 21:31:53 +08:00
Alexander Köplinger ddcfc42070 Cleanup namespace names of class lib tests to follow convention
A couple of the test suites didn't follow the MonoTests.<namespace of class under test> naming convention for the namespace.
2014-09-04 18:55:58 +02:00
Marcos Henrich db57c23c29 DateTime.Parse now handles unlimited number of fractional digits.
This change was made because .NET can parse ISO8601 format with an unlimited number of fractional digits.
Fixes #22417.
2014-09-03 18:29:58 +08:00
Marcos Henrich 17972cec4f Added test ISO8601FractionalDigits.
Covers #22417.
2014-09-03 18:27:28 +08:00
Rodrigo Kumpera 6bee6a7b18 [runtime] Remove the interpreter. 2014-09-01 13:27:03 -04:00
Stephen McConnel 44acb717d8 Fix scrolling in SWF.ListView.EnsureVisible(int index)
This fixes https://bugzilla.xamarin.com/show_bug.cgi?id=22483
2014-08-29 12:25:48 -05:00
350 changed files with 6089 additions and 16498 deletions

No files matched your search

-4
View File
@@ -494,16 +494,12 @@ Directory Roadmap
* `dis/` - CIL executable Disassembler
* `cli/` - Common code for the JIT and the interpreter.
* `io-layer/` - The I/O layer and system abstraction for
emulating the .NET IO model.
* `cil/` - Common Intermediate Representation, XML
definition of the CIL bytecodes.
* `interp/` - Interpreter for CLI executables (obsolete).
* `arch/` - Architecture specific portions.
* `man/` - Manual pages for the various Mono commands and programs.
+3 -19
View File
@@ -2499,7 +2499,6 @@ TARGET="unknown"
ACCESS_UNALIGNED="yes"
JIT_SUPPORTED=no
INTERP_SUPPORTED=no
LIBC="libc.so.6"
INTL="libc.so.6"
SQLITE="libsqlite.so.0"
@@ -2512,7 +2511,6 @@ XINERAMA="libXinerama.so.1"
sizeof_register="SIZEOF_VOID_P"
jit_wanted=true
interp_wanted=false
sgen_supported=false
boehm_supported=true
case "$host" in
@@ -2940,18 +2938,10 @@ if test x$JIT_SUPPORTED = xyes; then
USEJIT=true
jit_status="Building and using the JIT"
else
if $interp_wanted; then
jit_status="Building the JIT, defaulting to the interpreter"
else
AC_ERROR(No JIT or interpreter support available or selected.)
fi
AC_ERROR(No JIT support available or selected.)
fi
else
if test x$interp_wanted = xtrue; then
jit_status="interpreter"
else
AC_ERROR(No JIT or interpreter support available or selected.)
fi
AC_ERROR(No JIT support available or selected.)
fi
AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
@@ -3358,7 +3348,6 @@ AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64)
AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target")
AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
AM_CONDITIONAL(INTERP_SUPPORTED, test x$interp_wanted = xtrue)
AM_CONDITIONAL(INCLUDED_LIBGC, test x$libgc = xincluded)
AC_SUBST(LIBC)
@@ -3378,11 +3367,7 @@ AC_SUBST(LDFLAGS)
mono_build_root=`pwd`
AC_SUBST(mono_build_root)
if test x$USEJIT = xtrue; then
mono_runtime=mono/mini/mono
else
mono_runtime=mono/interpreter/mint
fi
mono_runtime=mono/mini/mono
AC_SUBST(mono_runtime)
mono_cfg_root=$mono_build_root/runtime
@@ -3579,7 +3564,6 @@ mono/arch/arm/Makefile
mono/arch/arm64/Makefile
mono/arch/ia64/Makefile
mono/arch/mips/Makefile
mono/interpreter/Makefile
mono/tests/Makefile
mono/tests/tests-config
mono/tests/assemblyresolve/Makefile
-5
View File
@@ -27,13 +27,8 @@ SGENPCFILE=
endif
if JIT_SUPPORTED
if INTERP_SUPPORTED
pkgconfig_DATA= mono.pc mono-2.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
else
pkgconfig_DATA= mono.pc mono-2.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
endif
else
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc
endif
+1 -1
View File
@@ -10,7 +10,7 @@
<dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
<dllmap dll="MonoPosixHelper" target="@prefix@/lib/libMonoPosixHelper@libsuffix@" os="!windows" />
<dllmap dll="MonoPosixHelper" target="@prefix@/@reloc_libdir@/libMonoPosixHelper@libsuffix@" os="!windows" />
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
-8
View File
@@ -57,14 +57,6 @@ typedef struct {
Slot *slot;
} Iter;
size_t
mono_eg_hashtable_get_memory_size (GHashTable *hashtable)
{
return sizeof (GHashTable) +
hashtable->in_use * sizeof (Slot) +
hashtable->table_size * sizeof (Slot*);
}
static const guint prime_tbl[] = {
11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237,
1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627,
-2
View File
@@ -467,8 +467,6 @@ guint g_spaced_primes_closest (guint x);
#define g_hash_table_insert(h,k,v) g_hash_table_insert_replace ((h),(k),(v),FALSE)
#define g_hash_table_replace(h,k,v) g_hash_table_insert_replace ((h),(k),(v),TRUE)
size_t mono_eg_hashtable_get_memory_size (GHashTable *hashtable);
gboolean g_direct_equal (gconstpointer v1, gconstpointer v2);
guint g_direct_hash (gconstpointer v1);
gboolean g_int_equal (gconstpointer v1, gconstpointer v2);
+1 -1
View File
@@ -176,7 +176,7 @@ default_stderr_handler (const gchar *message)
}
#elif MONOTOUCH
#elif defined(HOST_IOS)
#include <asl.h>
static int
+2
View File
@@ -12,6 +12,7 @@ monotouch_SUBDIRS := build class
monotouch_runtime_SUBDIRS := build class
xammac_SUBDIRS := build class
mobile_SUBDIRS := build class
mobile_static_SUBDIRS := build class
net_3_5_SUBDIRS := build class tools/xbuild
net_4_0_SUBDIRS := build class
net_4_5_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
@@ -114,6 +115,7 @@ $(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%:
$(_boot_:%=profile-do--monotouch_runtime--%): profile-do--monotouch_runtime--%: profile-do--build--%
$(_boot_:%=profile-do--xammac--%): profile-do--xammac--%: profile-do--build--%
$(_boot_:%=profile-do--mobile--%): profile-do--mobile--%: profile-do--build--%
$(_boot_:%=profile-do--mobile_static--%): profile-do--mobile_static--%: profile-do--build--%
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--build--%
$(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--%
+16 -1
View File
@@ -12,7 +12,22 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOBILE -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
-d:NET_2_1 \
-d:MOBILE \
-d:MOBILE_DYNAMIC \
-d:NET_3_5 \
-d:NET_4_0 \
-d:NET_4_5 \
-nowarn:1699 \
-nostdlib \
-lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_INSTALL = yes
+18 -1
View File
@@ -12,7 +12,24 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:FULL_AOT_RUNTIME -d:DISABLE_REMOTING -d:DISABLE_COM -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
-d:NET_2_1 \
-d:NET_3_5 \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MOBILE \
-d:FULL_AOT_RUNTIME \
-d:DISABLE_REMOTING \
-d:DISABLE_COM \
-nowarn:1699 \
-nostdlib \
-lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
+18 -1
View File
@@ -12,7 +12,24 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MOBILE_DYNAMIC -d:MONODROID -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
-d:NET_2_1 \
-d:NET_3_5 \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MOBILE \
-d:MOBILE_DYNAMIC \
-d:MONODROID \
-d:ANDROID \
-nowarn:1699 \
-nostdlib \
-lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
+20 -2
View File
@@ -12,9 +12,27 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FULL_AOT_RUNTIME -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
-d:NET_2_1 \
-d:NET_3_5 \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MOBILE \
-d:MONOTOUCH \
-d:DISABLE_REMOTING \
-d:DISABLE_COM \
-d:FULL_AOT_RUNTIME \
-nowarn:1699 \
-nostdlib \
-lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
NO_INSTALL = yes
@@ -13,7 +13,7 @@ using System.Xml;
using Commons.Xml.Nvdl;
using NUnit.Framework;
namespace MonoTests.Commons.Xml.Nvdl
namespace MonoTests.Commons.Xml.Relaxng
{
[TestFixture]
public class NvdlValidatingReaderTests
+23 -20
View File
@@ -106,7 +106,7 @@ net_2_0_only_dirs := \
pcl_facade_dirs := Facades
mobile_dirs := \
mobile_common_dirs := \
corlib \
System \
System.Core \
@@ -134,19 +134,27 @@ mobile_dirs := \
System.Net \
System.Windows \
System.Xml.Serialization \
$(pcl_facade_dirs)
monodroid_dirs := \
Mono.CompilerServices.SymbolWriter \
Mono.CSharp \
Microsoft.CSharp \
$(pcl_facade_dirs)
mobile_static_dirs := \
$(mobile_common_dirs) \
Mono.Dynamic.Interpreter
mobile_dynamic_dirs := \
$(mobile_common_dirs) \
Mono.CompilerServices.SymbolWriter \
System.Net.Http
xammac_dirs := \
Mono.CompilerServices.SymbolWriter \
Mono.CSharp \
Microsoft.CSharp \
System.Net.Http
$(mobile_dynamic_dirs)
monodroid_dirs := \
$(mobile_dynamic_dirs)
monotouch_dirs := \
$(mobile_static_dirs)
monotouch_runtime_dirs := \
corlib \
@@ -155,11 +163,6 @@ monotouch_runtime_dirs := \
System.XML \
Mono.CSharp
monotouch_dirs := \
Mono.CSharp \
Microsoft.CSharp \
Mono.Dynamic.Interpreter
net_4_0_dirs := \
System.Numerics \
Microsoft.CSharp \
@@ -229,12 +232,12 @@ xbuild_4_0_dirs := \
Microsoft.Build
net_2_0_SUBDIRS := $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler
monodroid_SUBDIRS := $(mobile_dirs) $(monodroid_dirs)
monotouch_SUBDIRS := $(mobile_dirs) $(monotouch_dirs)
monodroid_SUBDIRS := $(monodroid_dirs)
monotouch_SUBDIRS := $(monotouch_dirs)
monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
mobile_static_SUBDIRS := $(mobile_dirs)
mobile_SUBDIRS := $(mobile_dirs)
xammac_SUBDIRS := $(mobile_dirs) $(xammac_dirs)
mobile_static_SUBDIRS := $(mobile_static_dirs)
mobile_SUBDIRS := $(mobile_dynamic_dirs)
xammac_SUBDIRS := $(xammac_dirs)
net_3_5_SUBDIRS := $(xbuild_2_0_dirs)
net_4_0_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs)
net_4_5_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler
@@ -242,7 +245,7 @@ xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
include ../build/rules.make
SUBDIRS = $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs)
SUBDIRS = $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_static_dirs) $(mobile_dynamic_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs)
DIST_ONLY_SUBDIRS = dlr aot-compiler $(xbuild_4_0_dirs)
@@ -3663,7 +3663,8 @@ namespace System.Windows.Forms
if (View != View.Details) {
if (bounds.Left < 0)
h_scroll.Value += bounds.Left;
else if (bounds.Right > view_rect.Right)
// Don't shift right unless right-to-left layout is active. (Xamarin bug 22483)
else if (this.RightToLeftLayout && bounds.Right > view_rect.Right)
h_scroll.Value += (bounds.Right - view_rect.Right);
}
@@ -1018,13 +1018,27 @@ namespace Microsoft.Build.BuildEngine
if (!StartHandlerHasExecuted)
return;
if (EventArgs is ProjectStartedEventArgs)
ConsoleLogger.ProjectFinishedHandler (Sender, finished_args as ProjectFinishedEventArgs);
else if (EventArgs is TargetStartedEventArgs)
ConsoleLogger.TargetFinishedHandler (Sender, finished_args as TargetFinishedEventArgs);
else if (EventArgs is TaskStartedEventArgs)
ConsoleLogger.TaskFinishedHandler (Sender, finished_args as TaskFinishedEventArgs);
else if (!(EventArgs is BuildStartedEventArgs))
if (EventArgs is ProjectStartedEventArgs) {
var pfa = finished_args as ProjectFinishedEventArgs;
// FIXME: BuildFinishedHandlerActual sends us BuildFinishedEventArgs via PopEvent
if (pfa == null)
return;
ConsoleLogger.ProjectFinishedHandler (Sender, pfa);
} else if (EventArgs is TargetStartedEventArgs) {
var fa = finished_args as TargetFinishedEventArgs;
// FIXME: BuildFinishedHandlerActual sends us BuildFinishedEventArgs via PopEvent
if (fa == null)
return;
ConsoleLogger.TargetFinishedHandler (Sender, fa);
} else if (EventArgs is TaskStartedEventArgs) {
// FIXME: BuildFinishedHandlerActual sends us BuildFinishedEventArgs via PopEvent
if (!(finished_args is TaskFinishedEventArgs))
return;
ConsoleLogger.TaskFinishedHandler (Sender, (TaskFinishedEventArgs) finished_args);
} else if (!(EventArgs is BuildStartedEventArgs))
throw new InvalidOperationException ("Unexpected event on the stack, type: " + EventArgs.GetType ());
}
}
@@ -99,8 +99,12 @@ namespace Microsoft.Build.BuildEngine {
try {
TaskExecutionMode taskExecutionMode;
string reason;
if (!BuildTargetNeeded (out reason)) {
bool skip_completely;
if (!BuildTargetNeeded (out reason, out skip_completely)) {
LogTargetSkipped (target, reason);
if (skip_completely)
return true;
taskExecutionMode = TaskExecutionMode.SkipAndSetOutput;
} else {
taskExecutionMode = TaskExecutionMode.Complete;
@@ -113,8 +117,27 @@ namespace Microsoft.Build.BuildEngine {
//FIXME: parsing attributes repeatedly
IBuildTask bt = target.BuildTasks [i];
// HACK: need some form of cross references checks
var tem = taskExecutionMode;
if (tem == TaskExecutionMode.SkipAndSetOutput) {
var bti = bt as BuildTask;
//
// BuildTargetNeeded checks only files timestamps but ignores any metadata dependencies
// that way we can end up in the situation when output metadata are populated but from
// incomplete dependencies.
//
// E.g.
// <CreateItem Include="$(IntermediateOutputPath)%(_PngImage.LogicalName)" AdditionalMetadata="LogicalName=%(_PngImage.LogicalName)">
// <Output TaskParameter="Include" />
// </CreateItem>
//
if (bti != null && bti.Name == "CreateItem")
tem = TaskExecutionMode.Complete;
}
TaskBatchingImpl batchingImpl = new TaskBatchingImpl (project);
bool task_result = batchingImpl.Build (bt, taskExecutionMode, out executeOnErrors);
bool task_result = batchingImpl.Build (bt, tem, out executeOnErrors);
if (task_result)
continue;
@@ -149,15 +172,17 @@ namespace Microsoft.Build.BuildEngine {
ParseAttribute (outputs);
}
bool BuildTargetNeeded (out string reason)
bool BuildTargetNeeded (out string reason, out bool skipCompletely)
{
reason = String.Empty;
ITaskItem [] inputFiles;
ITaskItem [] outputFiles;
DateTime youngestInput, oldestOutput;
skipCompletely = false;
if (String.IsNullOrEmpty (inputs.Trim ()))
if (String.IsNullOrEmpty (inputs.Trim ())) {
return true;
}
if (String.IsNullOrEmpty (outputs.Trim ())) {
project.ParentEngine.LogError ("Target {0} has inputs but no outputs specified.", name);
@@ -178,6 +203,7 @@ namespace Microsoft.Build.BuildEngine {
}
if (inputFiles == null || inputFiles.Length == 0) {
skipCompletely = true;
reason = String.Format ("No input files were specified for target {0}, skipping.", name);
return false;
}
@@ -1,12 +1,14 @@
//
// ToolTask.cs: Base class for command line tool tasks.
//
// Author:
// Authors:
// Marek Sieradzki ([email protected])
// Ankit Jain ([email protected])
// Marek Safar ([email protected])
//
// (C) 2005 Marek Sieradzki
// Copyright 2009 Novell, Inc (http://www.novell.com)
// Copyright 2014 Xamarin Inc
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -90,12 +92,45 @@ namespace Microsoft.Build.Utilities
return true;
}
string CreateToolPath ()
{
string tp;
if (string.IsNullOrEmpty (ToolPath)) {
tp = GenerateFullPathToTool ();
if (string.IsNullOrEmpty (tp))
return null;
//
// GenerateFullPathToTool can return path including tool name
//
if (string.IsNullOrEmpty (ToolExe))
return tp;
tp = Path.GetDirectoryName (tp);
} else {
tp = ToolPath;
}
var path = Path.Combine (tp, ToolExe);
if (!File.Exists (path)) {
if (Log != null)
Log.LogError ("Tool executable '{0}' could not be found", path);
return null;
}
return path;
}
public override bool Execute ()
{
if (SkipTaskExecution ())
return true;
exitCode = ExecuteTool (GenerateFullPathToTool (), GenerateResponseFileCommands (),
var tool_path = CreateToolPath ();
if (tool_path == null)
return false;
exitCode = ExecuteTool (tool_path, GenerateResponseFileCommands (),
GenerateCommandLineCommands ());
// HandleTaskExecutionErrors is called only if exitCode != 0
@@ -289,14 +324,14 @@ namespace Microsoft.Build.Utilities
protected virtual string GenerateCommandLineCommands ()
{
return null;
return "";
}
protected abstract string GenerateFullPathToTool ();
protected virtual string GenerateResponseFileCommands ()
{
return null;
return "";
}
protected virtual string GetResponseFileSwitch (string responseFilePath)
@@ -26,6 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -424,6 +425,53 @@ namespace MonoTests.Microsoft.Build.Utilities {
Assert.AreEqual (a.ToolPath, "Bar", "#5");
a.ToolPath = "";
Assert.AreEqual (a.ToolPath, "", "#6");
a.Execute ();
}
[Test]
public void Execute_1 ()
{
var t = new TestExecuteToolTask ();
t.OnExecuteTool = delegate { Assert.Fail ("#1"); };
t.BuildEngine = new MockBuildEngine ();
Assert.IsFalse (t.Execute (), "result");
}
[Test]
public void Execute_2 ()
{
var t = new TestExecuteToolTask ();
t.BuildEngine = new MockBuildEngine ();
t.ToolPath = Directory.GetCurrentDirectory ();
t.ToolExe = "Makefile";
t.OnExecuteTool = (pathToTool, responseFileCommands, commandLineCommands) => {
Assert.AreEqual (Path.Combine (Directory.GetCurrentDirectory (), "Makefile"), pathToTool, "#1");
Assert.AreEqual ("", responseFileCommands, "#2");
Assert.AreEqual ("", commandLineCommands, "#3");
};
Assert.IsTrue (t.Execute (), "result");
}
[Test]
public void Execute_3 ()
{
var t = new TestExecuteToolTask ();
t.FullPathToTool = "fpt";
t.BuildEngine = new MockBuildEngine ();
t.ToolExe = "Makefile.mk";
t.OnExecuteTool = (pathToTool, responseFileCommands, commandLineCommands) => {
Assert.AreEqual ("Makefile.mk", pathToTool, "#1");
Assert.AreEqual ("", responseFileCommands, "#2");
Assert.AreEqual ("", commandLineCommands, "#3");
};
Assert.IsFalse (t.Execute (), "result");
}
}
@@ -548,9 +596,86 @@ namespace MonoTests.Microsoft.Build.Utilities {
}
protected override string GenerateFullPathToTool ()
{
return "";
}
}
class MockBuildEngine : IBuildEngine
{
public int ColumnNumberOfTaskNode {
get {
return 0;
}
}
public bool ContinueOnError {
get {
throw new NotImplementedException ();
}
}
public int LineNumberOfTaskNode {
get {
return 0;
}
}
public string ProjectFileOfTaskNode {
get {
return "ProjectFileOfTaskNode";
}
}
public bool BuildProjectFile (string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs)
{
throw new NotImplementedException ();
}
public void LogCustomEvent (CustomBuildEventArgs e)
{
}
public void LogErrorEvent (BuildErrorEventArgs e)
{
Console.WriteLine (e.Message);
}
public void LogMessageEvent (BuildMessageEventArgs e)
{
}
public void LogWarningEvent (BuildWarningEventArgs e)
{
}
}
class TestExecuteToolTask : ToolTask
{
public Action<string, string, string> OnExecuteTool;
public string FullPathToTool;
protected override string ToolName {
get { return "TestTool.exe"; }
}
protected override bool CallHostObjectToExecute ()
{
return base.CallHostObjectToExecute ();
}
protected override string GenerateFullPathToTool ()
{
return FullPathToTool;
}
protected override int ExecuteTool (string pathToTool, string responseFileCommands, string commandLineCommands)
{
if (OnExecuteTool != null)
OnExecuteTool (pathToTool, responseFileCommands, commandLineCommands);
return 0;
}
}
}
+3 -1
View File
@@ -6,7 +6,9 @@ LIBRARY = Mono.CSharp.dll
LIB_MCS_FLAGS = -r:System.Core.dll -r:System.Xml.dll -r:System.dll
ifeq (monotouch, $(PROFILE))
MOBILE_STATIC := $(filter mobile_static monotouch, $(PROFILE))
ifdef MOBILE_STATIC
LIB_MCS_FLAGS += -d:IOS_REFLECTION
endif
@@ -0,0 +1,13 @@
#include Mono.CSharp.dll.sources
../corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
../corlib/System.Reflection.Emit/FlowControl.cs
../corlib/System.Reflection.Emit/OpCode.cs
../corlib/System.Reflection.Emit/OpCodeNames.cs
../corlib/System.Reflection.Emit/OpCodes.cs
../corlib/System.Reflection.Emit/OpCodeType.cs
../corlib/System.Reflection.Emit/OperandType.cs
../corlib/System.Reflection.Emit/PEFileKinds.cs
../corlib/System.Reflection.Emit/Label.cs
../corlib/System.Reflection.Emit/MethodToken.cs
../corlib/System.Reflection.Emit/StackBehaviour.cs
monotouch.cs
@@ -1,13 +1,2 @@
#include Mono.CSharp.dll.sources
../corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
../corlib/System.Reflection.Emit/FlowControl.cs
../corlib/System.Reflection.Emit/OpCode.cs
../corlib/System.Reflection.Emit/OpCodeNames.cs
../corlib/System.Reflection.Emit/OpCodes.cs
../corlib/System.Reflection.Emit/OpCodeType.cs
../corlib/System.Reflection.Emit/OperandType.cs
../corlib/System.Reflection.Emit/PEFileKinds.cs
../corlib/System.Reflection.Emit/Label.cs
../corlib/System.Reflection.Emit/MethodToken.cs
../corlib/System.Reflection.Emit/StackBehaviour.cs
monotouch.cs
#include mobile_static_Mono.CSharp.dll.sources
monotouch.cs
+2 -2
View File
@@ -27,11 +27,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace bug4786test
namespace MonoTests.Mono.Data.Tds
{
using NUnit.Framework;
using Mono.Data.Tds.Protocol;
using global::Mono.Data.Tds.Protocol;
using System;
using System.Net;
using System.Net.Sockets;
+4 -2
View File
@@ -9,7 +9,9 @@ LIB_MCS_FLAGS = -r:System.dll -r:System.Core.dll \
-d:MONO_INTERPRETER \
-delaysign -keyfile:../mono.pub
ifeq (monotouch, $(subst _runtime,,$(PROFILE)))
MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime, $(PROFILE))
ifdef MOBILE_STATIC
mono_dynamic_interpreter_deps = $(the_libdir_base)plaincore/System.Core.dll
LIB_MCS_FLAGS += -lib:$(the_libdir_base)plaincore
endif
@@ -21,4 +23,4 @@ $(the_libdir_base)Mono.Dynamic.Interpreter.dll: $(mono_dynamic_interpreter_deps)
$(the_libdir_base)plaincore/System.Core.dll:
(cd ../System.Core; $(MAKE) $@)
.NOTPARALLEL: $(the_libdir_base)plaincore/System.Core.dll
.NOTPARALLEL: $(the_libdir_base)plaincore/System.Core.dll
@@ -39,7 +39,7 @@ using NUnit.Framework;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
namespace Tests.Mono.Options
namespace MonoTests.Mono.Options
#endif
{
[TestFixture]
@@ -46,7 +46,7 @@ using NUnit.Framework;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
namespace Tests.Mono.Options
namespace MonoTests.Mono.Options
#endif
{
class FooConverter : TypeConverter {
@@ -39,7 +39,7 @@ using NUnit.Framework;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
namespace Tests.Mono.Options
namespace MonoTests.Mono.Options
#endif
{
class DefaultOption : Option {
@@ -31,7 +31,7 @@ using System;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
namespace Tests.Mono.Options
namespace MonoTests.Mono.Options
#endif
{
static class Utils {
@@ -236,8 +236,13 @@ namespace Mono.Security.X509 {
cspParams.Flags = CspProviderFlags.UseMachineKeyStore;
KeyPairPersistence kpp = new KeyPairPersistence (cspParams);
if (!kpp.Load ())
try {
if (!kpp.Load ())
return cert;
}
catch {
return cert;
}
if (cert.RSA != null)
cert.RSA = new RSACryptoServiceProvider (cspParams);
@@ -12,7 +12,7 @@ CLEAN_FILES += $(STRING_MESSAGES)
EXTRA_DISTFILES = \
src/ComponentModel/Strings.resx
VALID_PROFILE := $(filter net_4_0 net_4_5 monotouch monodroid xammac mobile_static, $(PROFILE))
VALID_PROFILE := $(filter net_4_0 net_4_5 monotouch monodroid xammac mobile mobile_static, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.ComponentModel.Composition.dll
NO_INSTALL = yes
@@ -18,7 +18,7 @@ endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
# This is a .NET 3.5+ assembly
VALID_PROFILE := $(filter net_2_0 net_4_0 net_4_5 monotouch monodroid xammac mobile_static, $(PROFILE))
VALID_PROFILE := $(filter net_2_0 net_4_0 net_4_5 monotouch monodroid xammac mobile mobile_static, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.ComponentModel.DataAnnotations.dll
NO_INSTALL = yes
@@ -0,0 +1 @@
#include net_4_5_System.ComponentModel.DataAnnotations.dll.sources
+5 -6
View File
@@ -10,17 +10,16 @@ ifneq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:NET_3_5 -nowarn:1720
endif
ifeq (monodroid, $(PROFILE))
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR,FEATURE_REFEMIT,ANDROID
endif
MOBILE_DYNAMIC := $(filter monodroid xammac mobile, $(PROFILE))
MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime, $(PROFILE))
ifeq (xammac, $(PROFILE))
ifdef MOBILE_DYNAMIC
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR,FEATURE_REFEMIT
endif
system_core_plain_libdir = $(the_libdir_base)plaincore
ifeq (monotouch, $(subst _runtime,,$(PROFILE)))
ifdef MOBILE_STATIC
extra_test_flags := -exclude:NotWorkingInterpreter
system_core_library_deps = $(the_libdir_base)Mono.Dynamic.Interpreter.dll $(system_core_plain_libdir)/System.Core.dll
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR
@@ -72,4 +71,4 @@ ifneq ($(PROFILE),basic)
csproj-local:
$(MAKE) csproj-local intermediate=plaincore/
endif
endif
endif
@@ -64,12 +64,15 @@ namespace System {
[DllImport ("__Internal")]
extern static IntPtr monotouch_timezone_get_data (string name, ref int size);
static Stream GetMonoTouchData (string name)
static Stream GetMonoTouchData (string name, bool throw_on_error = true)
{
int size = 0;
IntPtr data = monotouch_timezone_get_data (name, ref size);
if (size <= 0)
throw new TimeZoneNotFoundException ();
if (size <= 0) {
if (throw_on_error)
throw new TimeZoneNotFoundException ();
return null;
}
unsafe {
var s = new UnmanagedMemoryStream ((byte*) data, size);
+3 -1
View File
@@ -651,7 +651,9 @@ namespace System
#elif MONOTOUCH
if (systemTimeZones.Count == 0) {
foreach (string name in GetMonoTouchNames ()) {
using (Stream stream = GetMonoTouchData (name)) {
using (Stream stream = GetMonoTouchData (name, false)) {
if (stream == null)
continue;
systemTimeZones.Add (BuildFromStream (name, stream));
}
}
@@ -1,109 +1,4 @@
Assembly/AssemblyInfo.cs
System/Actions.cs
System/Funcs.cs
System/InvalidTimeZoneException.cs
System/TimeZoneInfo.AdjustmentRule.cs
System/TimeZoneInfo.cs
System/TimeZoneInfo.Serialization.cs
System/TimeZoneInfo.TransitionTime.cs
System/TimeZoneNotFoundException.cs
System/Util.cs
System.Runtime.CompilerServices/DynamicAttribute.cs
System.Runtime.CompilerServices/ExecutionScope.cs
System.Runtime.CompilerServices/ExtensionAttribute.cs
System.Runtime.CompilerServices/IStrongBox.cs
System.Runtime.CompilerServices/StrongBox_T.cs
System.Linq/Check.cs
System.Linq/Enumerable.cs
System.Linq/QueryableEnumerable.cs
System.Linq/QueryableTransformer.cs
System.Linq/Grouping.cs
System.Linq/IGrouping.cs
System.Linq/IOrderedQueryable.cs
System.Linq/IOrderedQueryable_T.cs
System.Linq/IOrderedEnumerable_T.cs
System.Linq/IQueryable.cs
System.Linq/IQueryable_T.cs
System.Linq/Lookup.cs
System.Linq/ILookup_T.cs
System.Linq/OrderedEnumerable.cs
System.Linq/OrderedSequence.cs
System.Linq/Queryable.cs
System.Linq/QuickSort.cs
System.Linq/SortContext.cs
System.Linq/SortDirection.cs
System.Linq/SortSequenceContext.cs
System.Linq/IQueryProvider.cs
System.Collections.Generic/HashSet.cs
System.Security.Cryptography/Aes.cs
System.Threading/LockRecursionPolicy.cs
System.Threading/ReaderWriterLockSlim.cs
System.Threading/ThreadLockState.cs
System.Threading/ReaderWriterLockSlimExtensions.cs
System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
System.Linq.Parallel.QueryNodes/QueryCastNode.cs
System.Linq.Parallel.QueryNodes/QueryChildNode.cs
System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
System.Linq.Parallel.QueryNodes/QuerySetNode.cs
System.Linq.Parallel.QueryNodes/QueryStartNode.cs
System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
System.Linq.Parallel.QueryNodes/QueryZipNode.cs
System.Linq.Parallel.QueryNodes/SetInclusion.cs
System.Linq.Parallel.QueryNodes/WrapHelper.cs
System.Linq.Parallel/AggregationList.cs
System.Linq.Parallel/ConcurrentGrouping.cs
System.Linq.Parallel/ConcurrentLookup.cs
System.Linq.Parallel/INodeVisitor.cs
System.Linq.Parallel/IVisitableNode.cs
System.Linq.Parallel/OrderingEnumerator.cs
System.Linq.Parallel/ParallelExecuter.cs
System.Linq.Parallel/ParallelPartitioner.cs
System.Linq.Parallel/ParallelQueryEnumerator.cs
System.Linq.Parallel/ParallelQuickSort.cs
System.Linq.Parallel/QueryCheckerVisitor.cs
System.Linq.Parallel/QueryIsOrderedVisitor.cs
System.Linq.Parallel/QueryOptions.cs
System.Linq.Parallel/RangeList.cs
System.Linq.Parallel/RepeatList.cs
System.Linq.Parallel/ReverseList.cs
System.Linq.Parallel/StripPartitioner.cs
System.Linq.Parallel/TemporaryArea.cs
System.Linq/EnumerableExecutor.cs
System.Linq/EnumerableExecutor_T.cs
System.Linq/EnumerableQuery.cs
System.Linq/EnumerableQuery_T.cs
System.Linq/OrderedParallelQuery.cs
System.Linq/ParallelEnumerable.cs
System.Linq/ParallelExecutionMode.cs
System.Linq/ParallelMergeOptions.cs
System.Linq/ParallelQuery.cs
System.IO.MemoryMappedFiles/MemoryMappedFile.cs
System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
System.IO/HandleInheritability.cs
System.Threading.Tasks/TaskExtensions.cs
System.Linq.Expressions/Extensions.cs
System.Linq.Expressions/ExpressionTransformer.cs
../dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
../dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs
System.Linq.Expressions/DynamicExpressionVisitor.cs
#include mobile_common_System.Core.dll.sources
#include dynamic_System.Core.dll.sources
@@ -0,0 +1,108 @@
Assembly/AssemblyInfo.cs
System/Actions.cs
System/Funcs.cs
System/InvalidTimeZoneException.cs
System/TimeZoneInfo.AdjustmentRule.cs
System/TimeZoneInfo.cs
System/TimeZoneInfo.Serialization.cs
System/TimeZoneInfo.TransitionTime.cs
System/TimeZoneNotFoundException.cs
System/Util.cs
System.Runtime.CompilerServices/DynamicAttribute.cs
System.Runtime.CompilerServices/ExecutionScope.cs
System.Runtime.CompilerServices/ExtensionAttribute.cs
System.Runtime.CompilerServices/IStrongBox.cs
System.Runtime.CompilerServices/StrongBox_T.cs
System.Linq/Check.cs
System.Linq/Enumerable.cs
System.Linq/QueryableEnumerable.cs
System.Linq/QueryableTransformer.cs
System.Linq/Grouping.cs
System.Linq/IGrouping.cs
System.Linq/IOrderedQueryable.cs
System.Linq/IOrderedQueryable_T.cs
System.Linq/IOrderedEnumerable_T.cs
System.Linq/IQueryable.cs
System.Linq/IQueryable_T.cs
System.Linq/Lookup.cs
System.Linq/ILookup_T.cs
System.Linq/OrderedEnumerable.cs
System.Linq/OrderedSequence.cs
System.Linq/Queryable.cs
System.Linq/QuickSort.cs
System.Linq/SortContext.cs
System.Linq/SortDirection.cs
System.Linq/SortSequenceContext.cs
System.Linq/IQueryProvider.cs
System.Collections.Generic/HashSet.cs
System.Security.Cryptography/Aes.cs
System.Threading/LockRecursionPolicy.cs
System.Threading/ReaderWriterLockSlim.cs
System.Threading/ThreadLockState.cs
System.Threading/ReaderWriterLockSlimExtensions.cs
System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
System.Linq.Parallel.QueryNodes/QueryCastNode.cs
System.Linq.Parallel.QueryNodes/QueryChildNode.cs
System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
System.Linq.Parallel.QueryNodes/QuerySetNode.cs
System.Linq.Parallel.QueryNodes/QueryStartNode.cs
System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
System.Linq.Parallel.QueryNodes/QueryZipNode.cs
System.Linq.Parallel.QueryNodes/SetInclusion.cs
System.Linq.Parallel.QueryNodes/WrapHelper.cs
System.Linq.Parallel/AggregationList.cs
System.Linq.Parallel/ConcurrentGrouping.cs
System.Linq.Parallel/ConcurrentLookup.cs
System.Linq.Parallel/INodeVisitor.cs
System.Linq.Parallel/IVisitableNode.cs
System.Linq.Parallel/OrderingEnumerator.cs
System.Linq.Parallel/ParallelExecuter.cs
System.Linq.Parallel/ParallelPartitioner.cs
System.Linq.Parallel/ParallelQueryEnumerator.cs
System.Linq.Parallel/ParallelQuickSort.cs
System.Linq.Parallel/QueryCheckerVisitor.cs
System.Linq.Parallel/QueryIsOrderedVisitor.cs
System.Linq.Parallel/QueryOptions.cs
System.Linq.Parallel/RangeList.cs
System.Linq.Parallel/RepeatList.cs
System.Linq.Parallel/ReverseList.cs
System.Linq.Parallel/StripPartitioner.cs
System.Linq.Parallel/TemporaryArea.cs
System.Linq/EnumerableExecutor.cs
System.Linq/EnumerableExecutor_T.cs
System.Linq/EnumerableQuery.cs
System.Linq/EnumerableQuery_T.cs
System.Linq/OrderedParallelQuery.cs
System.Linq/ParallelEnumerable.cs
System.Linq/ParallelExecutionMode.cs
System.Linq/ParallelMergeOptions.cs
System.Linq/ParallelQuery.cs
System.IO.MemoryMappedFiles/MemoryMappedFile.cs
System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
System.IO/HandleInheritability.cs
System.Threading.Tasks/TaskExtensions.cs
System.Linq.Expressions/Extensions.cs
System.Linq.Expressions/ExpressionTransformer.cs
../dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
../dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs
System.Linq.Expressions/DynamicExpressionVisitor.cs
@@ -0,0 +1,2 @@
#include mobile_common_System.Core.dll.sources
#include interpreter_System.Core.dll.sources
@@ -1,4 +1,4 @@
#include mobile_System.Core.dll.sources
#include mobile_common_System.Core.dll.sources
#include dynamic_System.Core.dll.sources
@@ -1,3 +1,3 @@
#include mobile_System.Core.dll.sources
#include mobile_common_System.Core.dll.sources
#include interpreter_System.Core.dll.sources
System/TimeZoneInfo.MonoTouch.cs
@@ -1,4 +1,4 @@
#include mobile_System.Core.dll.sources
#include mobile_common_System.Core.dll.sources
#include dynamic_System.Core.dll.sources
@@ -95,7 +95,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -111,7 +111,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -127,7 +127,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -142,7 +142,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -157,7 +157,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -172,7 +172,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -193,8 +193,8 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U4)] OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode);
@@ -206,8 +206,8 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U4)] OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode);
@@ -547,7 +547,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -558,7 +558,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
#endif
return OciNativeCalls.OCIBindByName (stmtp, out bindpp, errhp, placeholder, placeh_len, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByNameRef (IntPtr stmtp,
@@ -569,7 +569,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -580,7 +580,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
#endif
return OciNativeCalls.OCIBindByNameRef (stmtp, out bindpp, errhp, placeholder, placeh_len, ref valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByNameBytes (IntPtr stmtp,
@@ -591,7 +591,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -602,7 +602,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
#endif
return OciNativeCalls.OCIBindByNameBytes (stmtp, out bindpp, errhp, placeholder, placeh_len, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByPos (IntPtr stmtp,
@@ -612,7 +612,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -623,7 +623,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
#endif
return OciNativeCalls.OCIBindByPos (stmtp, out bindpp, errhp, position, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByPosRef (IntPtr stmtp,
@@ -633,7 +633,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -644,7 +644,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
#endif
return OciNativeCalls.OCIBindByPosRef (stmtp, out bindpp, errhp, position, ref valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByPosBytes (IntPtr stmtp,
@@ -654,7 +654,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -665,7 +665,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
#endif
return OciNativeCalls.OCIBindByPosBytes (stmtp, out bindpp, errhp, position, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
[DllImport ("oci")]
@@ -723,8 +723,8 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode)
{
@@ -732,7 +732,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIDefineByPos", "OCI");
#endif
return OciNativeCalls.OCIDefineByPos (stmtp, out defnpp, errhp, position, valuep,
value_sz, dty, ref indp, ref rlenp, rcodep, mode);
value_sz, dty, indp, rlenp, rcodep, mode);
}
internal static int OCIDefineByPosPtr (IntPtr stmtp,
@@ -742,8 +742,8 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode)
{
@@ -751,7 +751,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIDefineByPosPtr", "OCI");
#endif
return OciNativeCalls.OCIDefineByPosPtr (stmtp, out defnpp, errhp, position, ref valuep,
value_sz, dty, ref indp, ref rlenp, rcodep, mode);
value_sz, dty, indp, rlenp, rcodep, mode);
}
internal static int OCIDescriptorFree (IntPtr hndlp,
@@ -32,16 +32,16 @@ namespace System.Data.OracleClient.Oci
//IntPtr handle;
IntPtr value;
short indicator;
IntPtr indicator;
//OracleType type;
OciDataType ociType;
OciDataType definedType;
int definedSize;
short rlenp = 0;
IntPtr rlenp;
//short precision;
short scale;
Type fieldType;
//string name;
string name;
// Oracle defines the LONG VARCHAR and LONG VARRAW to have a size of 2 to the 31 power - 5
// see DefineLongVarChar and DefineLongVarRaw
@@ -70,11 +70,13 @@ namespace System.Data.OracleClient.Oci
{
OciParameterDescriptor parameter = ((OciStatementHandle) Parent).GetParameter (position);
//name = parameter.GetName ();
name = parameter.GetName ();
definedType = parameter.GetDataType ();
definedSize = parameter.GetDataSize ();
//precision = parameter.GetPrecision ();
scale = parameter.GetScale ();
rlenp = OciCalls.AllocateClear (sizeof(short));
indicator = OciCalls.AllocateClear (sizeof(short));
Define (position, connection);
@@ -103,7 +105,7 @@ namespace System.Data.OracleClient.Oci
}
internal bool IsNull {
get { return (indicator == -1); }
get { return (Indicator == -1); }
}
internal short Scale {
@@ -111,7 +113,13 @@ namespace System.Data.OracleClient.Oci
}
internal short Size {
get { return rlenp; }
get { return(Marshal.ReadInt16(rlenp)); }
set { Marshal.WriteInt16(rlenp, value); }
}
internal short Indicator {
get { return(Marshal.ReadInt16(indicator)); }
set { Marshal.WriteInt16(indicator, value); }
}
internal IntPtr Value {
@@ -192,8 +200,8 @@ namespace System.Data.OracleClient.Oci
ref value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@@ -222,8 +230,8 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@@ -261,11 +269,11 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero, 0);
rlenp = (short) definedSize;
Size = (short) definedSize;
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
@@ -291,8 +299,8 @@ namespace System.Data.OracleClient.Oci
value,
maxByteCount,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
OciErrorHandle.ThrowExceptionIfError (ErrorHandle, status);
@@ -312,10 +320,10 @@ namespace System.Data.OracleClient.Oci
ErrorHandle,
position + 1,
value,
definedSize * 2,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@@ -357,8 +365,8 @@ namespace System.Data.OracleClient.Oci
ref value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@@ -386,8 +394,8 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero, 0);
if (status != 0) {
@@ -415,8 +423,8 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero, 0);
if (status != 0) {
@@ -459,8 +467,8 @@ namespace System.Data.OracleClient.Oci
ref value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@@ -487,6 +495,8 @@ namespace System.Data.OracleClient.Oci
}
disposed = true;
} finally {
Marshal.FreeHGlobal (indicator);
Marshal.FreeHGlobal (rlenp);
base.Dispose (disposing);
value = IntPtr.Zero;
}
@@ -37,12 +37,13 @@ using System.Text;
namespace System.Data.OracleClient
{
[TypeConverter (typeof(OracleParameter.OracleParameterConverter))]
public sealed class OracleParameter :
public sealed class OracleParameter :
#if NET_2_0
DbParameter, IDbDataParameter, ICloneable
DbParameter, IDbDataParameter, ICloneable,
#else
MarshalByRefObject, IDbDataParameter, IDataParameter, ICloneable
MarshalByRefObject, IDbDataParameter, IDataParameter, ICloneable,
#endif
IDisposable
{
#region Fields
@@ -66,6 +67,7 @@ namespace System.Data.OracleClient
object value = DBNull.Value;
OciLobLocator lobLocator; // only if Blob or Clob
IntPtr bindOutValue = IntPtr.Zero;
IntPtr indicator = IntPtr.Zero;
OciDateTimeDescriptor dateTimeDesc;
IntPtr cursor = IntPtr.Zero;
@@ -77,7 +79,6 @@ namespace System.Data.OracleClient
bool useRef;
OciDataType bindType;
short indicator;
int bindSize;
bool sizeManuallySet;
@@ -104,6 +105,7 @@ namespace System.Data.OracleClient
this.value = value.value;
this.lobLocator = value.lobLocator;
this.oracleTypeSet = value.oracleTypeSet;
this.indicator = OciCalls.AllocateClear (sizeof(short));
}
public OracleParameter ()
@@ -119,6 +121,7 @@ namespace System.Data.OracleClient
this.srcVersion = DataRowVersion.Current;
this.value = null;
this.oracleTypeSet = false;
this.indicator = OciCalls.AllocateClear (sizeof(short));
}
public OracleParameter (string name, object value)
@@ -129,6 +132,7 @@ namespace System.Data.OracleClient
srcColumn = string.Empty;
SourceVersion = DataRowVersion.Current;
InferOracleType (value);
this.indicator = OciCalls.AllocateClear (sizeof(short));
#if NET_2_0
// Find the OciType before inferring for the size
if (value != null && value != DBNull.Value) {
@@ -173,6 +177,7 @@ namespace System.Data.OracleClient
OracleType = oracleType;
SourceColumn = sourceColumn;
SourceVersion = sourceVersion;
this.indicator = OciCalls.AllocateClear (sizeof(short));
}
#endif
@@ -199,6 +204,12 @@ namespace System.Data.OracleClient
OracleType = oracleType;
SourceColumn = srcColumn;
SourceVersion = srcVersion;
this.indicator = OciCalls.AllocateClear (sizeof(short));
}
~OracleParameter ()
{
Dispose(false);
}
#endregion // Constructors
@@ -210,6 +221,11 @@ namespace System.Data.OracleClient
set { container = value; }
}
internal short Indicator {
get { return (Marshal.ReadInt16(indicator)); }
set { Marshal.WriteInt16(indicator, value); }
}
#if !NET_2_0
[Browsable (false)]
[RefreshProperties (RefreshProperties.All)]
@@ -453,7 +469,6 @@ namespace System.Data.OracleClient
}
if (isnull == true && direction == ParameterDirection.Input) {
indicator = 0;
bindType = OciDataType.VarChar2;
bindSize = 0;
} else {
@@ -465,7 +480,6 @@ namespace System.Data.OracleClient
case OciDataType.CharZ:
case OciDataType.OciString:
bindType = OciDataType.String;
indicator = 0;
svalue = "\0";
// convert value from managed type to type to marshal
if (direction == ParameterDirection.Input ||
@@ -558,7 +572,7 @@ namespace System.Data.OracleClient
dt = DateTime.MinValue;
sDate = "";
if (isnull)
indicator = -1;
Indicator = -1;
else if (v is String) {
sDate = (string) v;
dt = DateTime.Parse (sDate);
@@ -594,7 +608,7 @@ namespace System.Data.OracleClient
case OciDataType.Float:
case OciDataType.Number:
bindType = OciDataType.String;
indicator = 0;
Indicator = 0;
svalue = "\0";
// convert value from managed type to type to marshal
if (direction == ParameterDirection.Input ||
@@ -638,7 +652,7 @@ namespace System.Data.OracleClient
bindSize = Size + 5; // 4 bytes prepended for length, bytes, 1 byte NUL character
indicator = 0;
Indicator = 0;
svalue = "\0";
// convert value from managed type to type to marshal
if (direction == ParameterDirection.Input ||
@@ -758,7 +772,7 @@ namespace System.Data.OracleClient
case OciDataType.VarRaw:
bindType = OciDataType.VarRaw;
bindSize = Size + 2; // include 2 bytes prepended to hold the length
indicator = 0;
Indicator = 0;
bytes = new byte [bindSize];
if (direction == ParameterDirection.Input ||
direction == ParameterDirection.InputOutput) {
@@ -784,7 +798,7 @@ namespace System.Data.OracleClient
case OciDataType.LongVarRaw:
bindType = OciDataType.LongVarRaw;
bindSize = Size + 4; // include 4 bytes prepended to hold the length
indicator = 0;
Indicator = 0;
bytes = new byte [bindSize];
if (direction == ParameterDirection.Input ||
direction == ParameterDirection.InputOutput) {
@@ -854,7 +868,7 @@ namespace System.Data.OracleClient
ref bindValue,
bindSize,
bindType,
ref indicator,
indicator,
IntPtr.Zero,
IntPtr.Zero,
0,
@@ -870,7 +884,7 @@ namespace System.Data.OracleClient
ref bindValue,
bindSize,
bindType,
ref indicator,
indicator,
IntPtr.Zero,
IntPtr.Zero,
0,
@@ -887,7 +901,7 @@ namespace System.Data.OracleClient
ref cursor,
bindSize,
bindType,
ref indicator,
indicator,
IntPtr.Zero,
IntPtr.Zero,
0,
@@ -903,7 +917,7 @@ namespace System.Data.OracleClient
bytes,
bindSize,
bindType,
ref indicator,
indicator,
IntPtr.Zero,
IntPtr.Zero,
0,
@@ -919,7 +933,7 @@ namespace System.Data.OracleClient
bindValue,
bindSize,
bindType,
ref indicator,
indicator,
IntPtr.Zero,
IntPtr.Zero,
0,
@@ -1251,7 +1265,7 @@ namespace System.Data.OracleClient
// used to update the parameter value
// for Output, the output of InputOutput, and Return parameters
value = DBNull.Value;
if (indicator == -1)
if (Indicator == -1)
return;
int rsize = 0;
@@ -1453,6 +1467,22 @@ namespace System.Data.OracleClient
return buffer;
}
public void Dispose ()
{
Dispose (true);
}
void Dispose (bool disposing)
{
if (disposing) {
GC.SuppressFinalize(this);
}
if (indicator != IntPtr.Zero) {
Marshal.FreeHGlobal (indicator);
indicator = IntPtr.Zero;
}
}
#endregion // Methods
internal sealed class OracleParameterConverter : ExpandableObjectConverter
@@ -1,2 +1 @@
#include System.Data.Services.Client.dll.sources
./Client/AssemblyAttributes.cs
#include net_4_5_System.Data.Services.Client.dll.sources
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data.Services;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class ChangeInterceptorAttributeTests {
[Test]
@@ -45,4 +47,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual ("setName", ci.EntitySetName);
}
}
}
}
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data.Services;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class DataServiceExceptionTests {
[Test]
@@ -68,4 +70,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual (inner, ex.InnerException);
}
}
}
}
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data.Services;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class DataServiceTests {
[Test]
@@ -79,4 +81,4 @@ namespace System.Data.Services.Tests {
this.OnStartProcessingRequest (args);
}
}
}
}
@@ -26,10 +26,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data.Services;
using System.Linq;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class ETagAttributeTests {
[Test]
@@ -63,4 +65,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual ("bar", e.PropertyNames[1]);
}
}
}
}
@@ -26,10 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Data.Services;
using System.Linq.Expressions;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class ExpandSegmentCollectionTests {
[Test]
@@ -101,4 +102,4 @@ namespace System.Data.Services.Tests {
Assert.IsFalse (esc.HasFilter);
}
}
}
}
@@ -26,10 +26,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data.Services;
using System.Linq.Expressions;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class ExpandSegmentTests {
[Test]
@@ -84,4 +86,4 @@ namespace System.Data.Services.Tests {
{ new ExpandSegment ("first", null), new ExpandSegment ("second", null), new ExpandSegment ("third", null) }));
}
}
}
}
@@ -26,10 +26,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data.Services;
using System.Linq;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class IgnorePropertiesAttributeTests {
[Test]
@@ -63,4 +65,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual ("bar", e.PropertyNames[1]);
}
}
}
}
@@ -26,9 +26,10 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Data.Services;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class MimeTypeAttributeTests {
[Test]
@@ -39,4 +40,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual ("type", mt.MimeType);
}
}
}
}
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data.Services;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class QueryInterceptorAttributeTests {
[Test]
@@ -45,4 +47,4 @@ namespace System.Data.Services.Tests {
new QueryInterceptorAttribute (null);
}
}
}
}
@@ -31,7 +31,7 @@ using System.Data;
using System.Data.Common;
using System.IO;
namespace Test.System.Data.Common
namespace MonoTests.System.Data.Common
{
internal class DbDataReaderMock : DbDataReader
{
@@ -32,7 +32,7 @@ using System.Data;
using System.Data.Common;
using System.IO;
namespace Test.System.Data.Common
namespace MonoTests.System.Data.Common
{
[TestFixture]
public class DbDataReaderTest
@@ -12,6 +12,8 @@ using System.Threading;
using NUnit.Framework;
namespace MonoTests.System.Data
{
[TestFixture]
public class BinarySerializationTest
{
@@ -751,3 +753,4 @@ public class BinarySerializationTest
}
#endif
}
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class ConstraintExceptionTest
{
@@ -31,7 +31,7 @@ using System.Data;
using NUnit.Framework;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture]
public class DBConcurrencyExceptionTest
@@ -39,7 +39,7 @@ using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Globalization;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture]
public class DataSetTest2
@@ -448,7 +448,7 @@ namespace MonoTests_System.Data
dt.Rows.Add(new object[] {2,"Value3","Value4"});
dt.Rows.Add(new object[] {3,"Value5","Value5"});
System.Text.StringBuilder resultXML = new System.Text.StringBuilder();
StringBuilder resultXML = new StringBuilder();
resultXML.Append("<" + ds.DataSetName + "xmlns=\"namespace\">");
@@ -975,13 +975,13 @@ namespace MonoTests_System.Data
[Test] public void Locale()
{
DataSet ds = new DataSet("MyDataSet");
System.Globalization.CultureInfo culInfo = System.Globalization.CultureInfo.CurrentCulture ;
CultureInfo culInfo = CultureInfo.CurrentCulture ;
// Checking Locale default from system
Assert.AreEqual(culInfo, ds.Locale , "DS156");
// Checking Locale get/set
culInfo = new System.Globalization.CultureInfo("fr"); // = french
culInfo = new CultureInfo("fr"); // = french
ds.Locale = culInfo ;
Assert.AreEqual(culInfo , ds.Locale , "DS157");
}
@@ -1998,11 +1998,11 @@ namespace MonoTests_System.Data
ds1.Tables.Add(DataProvider.CreateParentDataTable());
ds1.Tables.Add(DataProvider.CreateChildDataTable());
System.IO.MemoryStream ms = new System.IO.MemoryStream();
MemoryStream ms = new MemoryStream();
//write xml schema only
ds1.WriteXmlSchema(ms);
System.IO.MemoryStream ms1 = new System.IO.MemoryStream(ms.GetBuffer());
MemoryStream ms1 = new MemoryStream(ms.GetBuffer());
//copy schema
DataSet ds2 = new DataSet();
ds2.ReadXmlSchema(ms1);
@@ -2073,7 +2073,7 @@ namespace MonoTests_System.Data
Assert.AreEqual(0, ds2.Tables[1].Rows.Count , "DS282");
//try to delete the file
System.IO.File.Delete(sTempFileName);
File.Delete(sTempFileName);
}
[Test] public void ReadXmlSchema_ByTextReader()
@@ -2082,11 +2082,11 @@ namespace MonoTests_System.Data
ds1.Tables.Add(DataProvider.CreateParentDataTable());
ds1.Tables.Add(DataProvider.CreateChildDataTable());
System.IO.StringWriter sw = new System.IO.StringWriter();
StringWriter sw = new StringWriter();
//write xml file, schema only
ds1.WriteXmlSchema(sw);
System.IO.StringReader sr = new System.IO.StringReader(sw.GetStringBuilder().ToString());
StringReader sr = new StringReader(sw.GetStringBuilder().ToString());
//copy both data and schema
DataSet ds2 = new DataSet();
ds2.ReadXmlSchema(sr);
@@ -2122,14 +2122,14 @@ namespace MonoTests_System.Data
ds1.Tables.Add(DataProvider.CreateParentDataTable());
ds1.Tables.Add(DataProvider.CreateChildDataTable());
System.IO.StringWriter sw = new System.IO.StringWriter();
System.Xml.XmlTextWriter xmlTW = new System.Xml.XmlTextWriter(sw);
StringWriter sw = new StringWriter();
XmlTextWriter xmlTW = new XmlTextWriter(sw);
//write xml file, schema only
ds1.WriteXmlSchema(xmlTW);
xmlTW.Flush();
System.IO.StringReader sr = new System.IO.StringReader(sw.ToString());
System.Xml.XmlTextReader xmlTR = new System.Xml.XmlTextReader(sr);
StringReader sr = new StringReader(sw.ToString());
XmlTextReader xmlTR = new XmlTextReader(sr);
//copy both data and schema
DataSet ds2 = new DataSet();
@@ -2196,7 +2196,7 @@ namespace MonoTests_System.Data
Assert.AreEqual(ds2.Tables[1].Rows.Count, ds1.Tables[1].Rows.Count , "DS299");
//try to delete the file
System.IO.File.Delete(sTempFileName);
File.Delete(sTempFileName);
}
[Test]
@@ -2212,7 +2212,7 @@ namespace MonoTests_System.Data
ds1.Tables[1].Rows.Add(new object[] {7,2," "," ",new DateTime(2000,1,1,0,0,0,0),35});
ds1.Tables[1].Rows.Add(new object[] {7,3,"","",new DateTime(2000,1,1,0,0,0,0),35});
System.IO.MemoryStream ms = new System.IO.MemoryStream();
MemoryStream ms = new MemoryStream();
//write xml file, data only
ds1.WriteXml(ms);
@@ -2241,7 +2241,7 @@ namespace MonoTests_System.Data
{
string input = string.Empty;
System.IO.StringReader sr;
StringReader sr;
DataSet ds = new DataSet();
input += "<?xml version=\"1.0\"?>";
@@ -2261,7 +2261,7 @@ namespace MonoTests_System.Data
input += " </Price>";
input += "</Stock>";
sr = new System.IO.StringReader(input);
sr = new StringReader(input);
ds.ReadXml(sr);
@@ -2311,7 +2311,7 @@ namespace MonoTests_System.Data
{
DataSet ds = new DataSet("TestDataSet");
string input = string.Empty;
System.IO.StringReader sr;
StringReader sr;
input += "<?xml version=\"1.0\" standalone=\"yes\"?>";
input += "<Stocks><Stock name=\"MSFT\"><Company name=\"Microsoft Corp.\" /><Price type=\"high\"><Value>10.0</Value>";
@@ -2320,7 +2320,7 @@ namespace MonoTests_System.Data
input += "<Company name=\"General Electric\" /><Price type=\"high\"><Value>22.23</Value><Date>02/12/2001</Date></Price>";
input += "<Price type=\"low\"><Value>1.97</Value><Date>04/20/2003</Date></Price><Price type=\"current\"><Value>3.0</Value>";
input += "<Date>TODAY</Date></Price></Stock></Stocks>";
sr = new System.IO.StringReader(input);
sr = new StringReader(input);
ds.EnforceConstraints = false;
ds.ReadXml(sr);
@@ -2339,7 +2339,7 @@ namespace MonoTests_System.Data
{
m_ds = new DataSet("Stocks");
string input = string.Empty;
System.IO.StringReader sr;
StringReader sr;
input += "<?xml version=\"1.0\"?>";
input += "<Stocks>";
@@ -2408,7 +2408,7 @@ namespace MonoTests_System.Data
input += " </Stock>";
input += "</Stocks>";
sr = new System.IO.StringReader(input);
sr = new StringReader(input);
m_ds.EnforceConstraints = true;
m_ds.ReadXml(sr);
this.privateTestCase("TestCase 1", "Company", "name='Microsoft Corp.'", "Stock", "name='MSFT'", "DS320");
@@ -2444,14 +2444,14 @@ namespace MonoTests_System.Data
#region "TestCase 1 - Empty string"
// Empty string
DataSet ds = new DataSet();
System.IO.StringReader sr = new System.IO.StringReader (string.Empty);
System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr);
StringReader sr = new StringReader (string.Empty);
XmlTextReader xReader = new XmlTextReader(sr);
try
{
ds.ReadXml (xReader);
Assert.Fail("DS335: ReadXml Failed to throw XmlException");
}
catch (System.Xml.XmlException) {}
catch (XmlException) {}
catch (AssertionException exc) {throw exc;}
catch (Exception exc)
{
@@ -2635,8 +2635,8 @@ namespace MonoTests_System.Data
private void PrivateTestCase(string a_name, string a_expected, string a_xmlData)
{
DataSet ds = new DataSet();
System.IO.StringReader sr = new System.IO.StringReader(a_xmlData) ;
System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
StringReader sr = new StringReader(a_xmlData) ;
XmlTextReader xReader = new XmlTextReader(sr) ;
ds.ReadXml (xReader);
Assert.AreEqual(a_expected, this.dataSetDescription(ds), "DS337");
}
@@ -2681,8 +2681,8 @@ namespace MonoTests_System.Data
xmlData += "<c>3</c>";
xmlData += "</b>";
xmlData += "</a>";
System.IO.StringReader sr = new System.IO.StringReader(xmlData) ;
System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
StringReader sr = new StringReader(xmlData) ;
XmlTextReader xReader = new XmlTextReader(sr) ;
ds.ReadXml (xReader);
Assert.AreEqual(3, ds.Tables["c"].Rows.Count, "DS338");
}
@@ -2738,7 +2738,7 @@ namespace MonoTests_System.Data
ds1.Tables[1].Rows.Add(new object[] {7,2," "," ",new DateTime(2000,1,1,0,0,0,0),35});
ds1.Tables[1].Rows.Add(new object[] {7,3,"","",new DateTime(2000,1,1,0,0,0,0),35});
System.IO.StringWriter sw = new System.IO.StringWriter();
StringWriter sw = new StringWriter();
//write xml file, data only
ds1.WriteXml(sw);
@@ -2747,7 +2747,7 @@ namespace MonoTests_System.Data
//clear the data
ds2.Clear();
System.IO.StringReader sr = new System.IO.StringReader(sw.GetStringBuilder().ToString());
StringReader sr = new StringReader(sw.GetStringBuilder().ToString());
ds2.ReadXml(sr);
//check xml data
@@ -2777,8 +2777,8 @@ namespace MonoTests_System.Data
ds1.Tables[1].Rows.Add(new object[] {7,2," "," ",new DateTime(2000,1,1,0,0,0,0),35});
ds1.Tables[1].Rows.Add(new object[] {7,3,"","",new DateTime(2000,1,1,0,0,0,0),35});
System.IO.StringWriter sw = new System.IO.StringWriter();
System.Xml.XmlTextWriter xmlTW = new System.Xml.XmlTextWriter(sw);
StringWriter sw = new StringWriter();
XmlTextWriter xmlTW = new XmlTextWriter(sw);
//write xml file, data only
ds1.WriteXml(xmlTW);
@@ -2788,8 +2788,8 @@ namespace MonoTests_System.Data
DataSet ds2 = ds1.Copy();
//clear the data
ds2.Clear();
System.IO.StringReader sr = new System.IO.StringReader(sw.ToString());
System.Xml.XmlTextReader xmlTR = new System.Xml.XmlTextReader(sr);
StringReader sr = new StringReader(sw.ToString());
XmlTextReader xmlTR = new XmlTextReader(sr);
ds2.ReadXml(xmlTR);
//check xml data
@@ -2847,8 +2847,8 @@ namespace MonoTests_System.Data
[Test] public void WriteXmlSchema_Relations_ForeignKeys ()
{
System.IO.MemoryStream ms = null;
System.IO.MemoryStream ms1 = null;
MemoryStream ms = null;
MemoryStream ms1 = null;
DataSet ds1 = new DataSet();
@@ -2884,10 +2884,10 @@ namespace MonoTests_System.Data
new DataColumn[] {col1_5, col1_6},
new DataColumn[] {col2_5, col2_6});
ms = new System.IO.MemoryStream();
ms = new MemoryStream();
ds1.WriteXmlSchema (ms);
ms1 = new System.IO.MemoryStream (ms.GetBuffer());
ms1 = new MemoryStream (ms.GetBuffer());
DataSet ds2 = new DataSet();
ds2.ReadXmlSchema(ms1);
@@ -3096,18 +3096,18 @@ namespace MonoTests_System.Data
[Test] public void WriteXml_ByTextWriterXmlWriteMode()
{
System.IO.StringReader sr = null;
System.IO.StringWriter sw = null;
StringReader sr = null;
StringWriter sw = null;
try // For real
{
// ReadXml - DataSetOut
DataSet oDataset = new DataSet("DataSetOut");
sw = new System.IO.StringWriter();
oDataset.WriteXml(sw,System.Data.XmlWriteMode.WriteSchema);
sw = new StringWriter();
oDataset.WriteXml(sw, XmlWriteMode.WriteSchema);
sr = new System.IO.StringReader(sw.GetStringBuilder().ToString());
sr = new StringReader(sw.GetStringBuilder().ToString());
oDataset = new DataSet("DataSetOut");
oDataset.ReadXml(sr);
@@ -3252,13 +3252,13 @@ namespace MonoTests_System.Data
{
DataSet ds = new DataSet();
string input = "<a><b><c>2</c></b></a>";
System.IO.StringReader sr = new System.IO.StringReader(input) ;
System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
StringReader sr = new StringReader(input) ;
XmlTextReader xReader = new XmlTextReader(sr) ;
ds.ReadXml (xReader);
System.Text.StringBuilder sb = new System.Text.StringBuilder();
System.IO.StringWriter sw = new System.IO.StringWriter(sb);
System.Xml.XmlTextWriter xWriter = new System.Xml.XmlTextWriter(sw);
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
XmlTextWriter xWriter = new XmlTextWriter(sw);
ds.WriteXml(xWriter);
string output = sb.ToString();
Assert.AreEqual(input,output, "DS76");
@@ -3267,20 +3267,20 @@ namespace MonoTests_System.Data
DataSet ds = new DataSet();
string input = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><a><b><c>2</c></b></a>";
string expectedOutput = "<a><b><c>2</c></b></a>";
System.IO.StringReader sr = new System.IO.StringReader(input) ;
System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
StringReader sr = new StringReader(input) ;
XmlTextReader xReader = new XmlTextReader(sr) ;
ds.ReadXml (xReader);
System.Text.StringBuilder sb = new System.Text.StringBuilder();
System.IO.StringWriter sw = new System.IO.StringWriter(sb);
System.Xml.XmlTextWriter xWriter = new System.Xml.XmlTextWriter(sw);
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
XmlTextWriter xWriter = new XmlTextWriter(sw);
ds.WriteXml(xWriter);
string output = sb.ToString();
Assert.AreEqual(expectedOutput,output, "DS77");
}
{
DataSet ds = new DataSet("DSName");
System.IO.StringWriter sr = new System.IO.StringWriter();
StringWriter sr = new StringWriter();
ds.WriteXml(sr);
Assert.AreEqual("<DSName />",sr.ToString(), "DS78");
}
@@ -3315,7 +3315,7 @@ namespace MonoTests_System.Data
ds.Tables.Remove("ChildTable");
//Get the xml representation of the dataset.
System.IO.StringWriter sr = new System.IO.StringWriter();
StringWriter sr = new StringWriter();
ds.WriteXml(sr);
string xml = sr.ToString();
@@ -28,10 +28,12 @@
using NUnit.Framework;
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class DataTableCollectionTest2
{
@@ -143,7 +145,7 @@ namespace MonoTests_System.Data
{
counter = 0;
DataSet ds = new DataSet();
ds.Tables.CollectionChanged+=new System.ComponentModel.CollectionChangeEventHandler(Tables_CollectionChanged);
ds.Tables.CollectionChanged+=new CollectionChangeEventHandler(Tables_CollectionChanged);
ds.Tables.Add();
ds.Tables.Add();
Assert.AreEqual(2, counter, "DTC15");
@@ -153,7 +155,7 @@ namespace MonoTests_System.Data
Assert.AreEqual(4, counter, "DTC16");
}
private void Tables_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
private void Tables_CollectionChanged(object sender, CollectionChangeEventArgs e)
{
counter++;
}
@@ -163,7 +165,7 @@ namespace MonoTests_System.Data
{
counter = 0;
DataSet ds = new DataSet();
ds.Tables.CollectionChanging+=new System.ComponentModel.CollectionChangeEventHandler(Tables_CollectionChanging);
ds.Tables.CollectionChanging+=new CollectionChangeEventHandler(Tables_CollectionChanging);
ds.Tables.Add();
ds.Tables.Add();
Assert.AreEqual(2, counter, "DTC17");
@@ -173,7 +175,7 @@ namespace MonoTests_System.Data
Assert.AreEqual(4, counter, "DTC18");
}
private void Tables_CollectionChanging(object sender, System.ComponentModel.CollectionChangeEventArgs e)
private void Tables_CollectionChanging(object sender, CollectionChangeEventArgs e)
{
counter++;
}
@@ -233,7 +235,7 @@ namespace MonoTests_System.Data
ds.Tables.Add();
int count=0;
System.Collections.IEnumerator myEnumerator = ds.Tables.GetEnumerator();
IEnumerator myEnumerator = ds.Tables.GetEnumerator();
while (myEnumerator.MoveNext())
{
@@ -36,7 +36,7 @@ using MonoTests.System.Data.Utils;
using NUnit.Framework;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture]
public class DataTableTest2
@@ -31,7 +31,7 @@ using System.Xml;
using NUnit.Framework;
namespace Monotests_System.Data
namespace MonoTests.System.Data
{
[TestFixture]
public class DataTableTest3
@@ -31,7 +31,7 @@ using System.IO;
using System.Xml;
using NUnit.Framework;
namespace Monotests_System.Data
namespace MonoTests.System.Data
{
[TestFixture]
public class DataTableTest4
@@ -1600,7 +1600,7 @@ namespace Monotests_System.Data
DataSet ds = new DataSet ();
DataTable table = new DataTable ("ParentTable");
XmlReadMode mode = XmlReadMode.Auto;
table.Columns.Add (new DataColumn ("id", System.Type.GetType ("System.Int32")));
table.Columns.Add (new DataColumn ("id", Type.GetType ("System.Int32")));
ds.Tables.Add (table);
using (FileStream stream = new FileStream (tempFile, FileMode.Open)) {
@@ -1638,7 +1638,7 @@ namespace Monotests_System.Data
using (FileStream stream = new FileStream (tempFile, FileMode.Open)) {
DataSet ds = new DataSet ();
DataTable table = new DataTable ("Table1");
table.Columns.Add (new DataColumn ("id", System.Type.GetType ("System.Int32")));
table.Columns.Add (new DataColumn ("id", Type.GetType ("System.Int32")));
ds.Tables.Add (table);
try {
@@ -1852,7 +1852,7 @@ namespace Monotests_System.Data
DataTable table = new DataTable ("DummyTable");
//define the table schame partially with a column name which does not match with any
//table columns in the diffgram
table.Columns.Add (new DataColumn ("WrongColumnName", System.Type.GetType ("System.String")));
table.Columns.Add (new DataColumn ("WrongColumnName", Type.GetType ("System.String")));
XmlReadMode mode = XmlReadMode.Auto;
@@ -2013,8 +2013,8 @@ namespace Monotests_System.Data
Assert.AreEqual ("NewDataSet", table.DataSet.DataSetName, "#2");
Assert.AreEqual (2, table.Columns.Count, "#3");
Assert.AreEqual (2, table.Rows.Count, "#4");
Assert.AreEqual (typeof (System.Int32), table.Columns [0].DataType, "#5");
Assert.AreEqual (typeof (System.String), table.Columns [1].DataType, "#6");
Assert.AreEqual (typeof (Int32), table.Columns [0].DataType, "#5");
Assert.AreEqual (typeof (String), table.Columns [1].DataType, "#6");
Assert.AreEqual (1, table.Constraints.Count, "#7");
Assert.AreEqual (typeof (UniqueConstraint), table.Constraints [0].GetType (), "#8");
Assert.AreEqual (1, table.ChildRelations.Count, "#9");
@@ -2027,9 +2027,9 @@ namespace Monotests_System.Data
Assert.AreEqual ("NewDataSet", table1.DataSet.DataSetName, "#14");
Assert.AreEqual (3, table1.Columns.Count, "#15");
Assert.AreEqual (4, table1.Rows.Count, "#16");
Assert.AreEqual (typeof (System.Int32), table1.Columns [0].DataType, "#17");
Assert.AreEqual (typeof (System.String), table1.Columns [1].DataType, "#18");
Assert.AreEqual (typeof (System.Int32), table1.Columns [2].DataType, "#19");
Assert.AreEqual (typeof (Int32), table1.Columns [0].DataType, "#17");
Assert.AreEqual (typeof (String), table1.Columns [1].DataType, "#18");
Assert.AreEqual (typeof (Int32), table1.Columns [2].DataType, "#19");
Assert.AreEqual (2, table1.Constraints.Count, "#20");
Assert.AreEqual (typeof (UniqueConstraint), table1.Constraints [0].GetType (), "#21");
Assert.AreEqual (typeof (ForeignKeyConstraint), table1.Constraints [1].GetType (), "#22");
@@ -2045,8 +2045,8 @@ namespace Monotests_System.Data
Assert.AreEqual ("NewDataSet", table1.DataSet.DataSetName, "#29");
Assert.AreEqual (2, table1.Columns.Count, "#30");
Assert.AreEqual (8, table1.Rows.Count, "#31");
Assert.AreEqual (typeof (System.Int32), table1.Columns [0].DataType, "#32");
Assert.AreEqual (typeof (System.String), table1.Columns [1].DataType, "#33");
Assert.AreEqual (typeof (Int32), table1.Columns [0].DataType, "#32");
Assert.AreEqual (typeof (String), table1.Columns [1].DataType, "#33");
Assert.AreEqual (1, table1.Constraints.Count, "#34");
Assert.AreEqual (typeof (ForeignKeyConstraint), table1.Constraints [0].GetType (), "#35");
Assert.AreEqual (1, table1.ParentRelations.Count, "#36");
@@ -34,7 +34,7 @@ using System.Xml.Serialization;
using NUnit.Framework;
namespace Monotests_System.Data
namespace MonoTests.System.Data
{
[TestFixture]
public class DataTableTest5
@@ -28,12 +28,13 @@
using NUnit.Framework;
using System;
using System.IO;
using System.Collections;
using System.ComponentModel;
using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class DataViewTest2
{
@@ -41,7 +42,7 @@ namespace MonoTests_System.Data
class EventProperties //hold the event properties to be checked
{
public System.ComponentModel.ListChangedType lstType ;
public ListChangedType lstType ;
public int NewIndex;
public int OldIndex;
}
@@ -508,7 +509,7 @@ namespace MonoTests_System.Data
//create the dataview for the table
DataView dv = new DataView(dt);
System.Collections.IEnumerator ienm = null;
IEnumerator ienm = null;
// GetEnumerator != null
ienm = dv.GetEnumerator();
@@ -549,7 +550,7 @@ namespace MonoTests_System.Data
DataView dv = new DataView(dt);
//add event handler
dv.ListChanged +=new System.ComponentModel.ListChangedEventHandler(dv_ListChanged);
dv.ListChanged +=new ListChangedEventHandler(dv_ListChanged);
// ----- Change Value ---------
evProp = null;
@@ -557,7 +558,7 @@ namespace MonoTests_System.Data
dv[1]["String1"] = "something";
Assert.AreEqual(true , evProp!=null , "DV58");
// change value - ListChangedType
Assert.AreEqual(System.ComponentModel.ListChangedType.ItemChanged, evProp.lstType , "DV59");
Assert.AreEqual(ListChangedType.ItemChanged, evProp.lstType , "DV59");
// change value - NewIndex
Assert.AreEqual(1, evProp.NewIndex, "DV60");
// change value - OldIndex
@@ -569,7 +570,7 @@ namespace MonoTests_System.Data
dv.AddNew();
Assert.AreEqual(true , evProp!=null , "DV62");
// Add New - ListChangedType
Assert.AreEqual(System.ComponentModel.ListChangedType.ItemAdded , evProp.lstType , "DV63");
Assert.AreEqual(ListChangedType.ItemAdded , evProp.lstType , "DV63");
// Add New - NewIndex
Assert.AreEqual(6, evProp.NewIndex, "DV64");
// Add New - OldIndex
@@ -581,7 +582,7 @@ namespace MonoTests_System.Data
dv.Sort = "ParentId Desc";
Assert.AreEqual(true , evProp!=null , "DV66");
// sort - ListChangedType
Assert.AreEqual(System.ComponentModel.ListChangedType.Reset , evProp.lstType , "DV67");
Assert.AreEqual(ListChangedType.Reset , evProp.lstType , "DV67");
// sort - NewIndex
Assert.AreEqual(-1, evProp.NewIndex, "DV68");
// sort - OldIndex
@@ -627,12 +628,12 @@ namespace MonoTests_System.Data
Assert.AreEqual(true , evProp != null , "DV168");
// Clear DataTable - should emit ListChangedType.Reset
Assert.AreEqual(System.ComponentModel.ListChangedType.Reset , evProp.lstType , "DV169");
Assert.AreEqual(ListChangedType.Reset , evProp.lstType , "DV169");
// Clear DataTable - should clear view count
Assert.AreEqual(0, dt.DefaultView.Count , "DV169");
}
private void dv_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
private void dv_ListChanged(object sender, ListChangedEventArgs e)
{
evProp = new EventProperties();
evProp.lstType = e.ListChangedType;
@@ -646,7 +647,7 @@ namespace MonoTests_System.Data
// this test also check DataView.Count property
DataRowView[] drvResult = null;
System.Collections.ArrayList al = new System.Collections.ArrayList();
ArrayList al = new ArrayList();
//create the source datatable
DataTable dt = DataProvider.CreateChildDataTable();
@@ -763,7 +764,7 @@ namespace MonoTests_System.Data
*/
//DataRowView[] drvResult = null;
System.Collections.ArrayList al = new System.Collections.ArrayList();
ArrayList al = new ArrayList();
DataTable dt = DataProvider.CreateParentDataTable();
@@ -821,7 +822,7 @@ namespace MonoTests_System.Data
private DataRow[] GetResultRows(DataTable dt,DataRowState State)
{
//get expected rows
System.Collections.ArrayList al = new System.Collections.ArrayList();
ArrayList al = new ArrayList();
DataRowVersion drVer = DataRowVersion.Current;
//From MSDN - The row the default version for the current DataRowState.
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class DeletedRowInaccessibleExceptionTest
{
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class DuplicateNameExceptionTest
{
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
//using GHTUtils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class EvaluateExceptionTest
{
@@ -31,7 +31,7 @@ using System;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class ForeignKeyConstraintTest2
{
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class InRowChangingEventExceptionTest
{
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class InvalidConstraintExceptionTest
{
@@ -32,7 +32,7 @@ using System.Data;
using NUnit.Framework;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture]
class MissingPrimaryKeyExceptionTest
@@ -57,4 +57,4 @@ namespace MonoTests_System.Data
tbl.Rows.Contains("Something");
}
}
}
}
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class NoNullAllowedExceptionTest
{
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class ReadOnlyExceptionTest
{
@@ -31,7 +31,7 @@ using System;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class RowNotInTableExceptionTest
{
@@ -32,7 +32,7 @@ using System.Text;
using System.IO;
using System.Data;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class SyntaxErrorExceptionTest
{
@@ -2,7 +2,7 @@ using NUnit.Framework;
using System;
using System.Data;
namespace Monotests_Mono.Data.SqlExpressions
namespace MonoTests.System.Data
{
[TestFixture]
public class ComparisonTest {
@@ -10,7 +10,7 @@ namespace Monotests_Mono.Data.SqlExpressions
[Test]
public void TestStringTrailingSpaceHandling () {
// test for bug 79695 - does not ignore certain trailing whitespace chars when comparing strings
System.Data.DataTable dataTable = new System.Data.DataTable ("Person");
DataTable dataTable = new DataTable ("Person");
dataTable.Columns.Add ("Name", typeof (string));
dataTable.Rows.Add (new object[] {"Mike "});
DataRow[] selectedRows = dataTable.Select ("Name = 'Mike'");
@@ -31,7 +31,7 @@ using System;
using System.Data;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture] public class UniqueConstraintTest2
{
@@ -32,7 +32,7 @@ using System.Data;
using NUnit.Framework;
using MonoTests.System.Data.Utils;
namespace MonoTests_System.Data
namespace MonoTests.System.Data
{
[TestFixture]
class VersionNotFoundExceptionTest
@@ -73,4 +73,4 @@ namespace MonoTests_System.Data
object obj = drParent[0,DataRowVersion.Original];
}
}
}
}
@@ -32,7 +32,7 @@ using System.Xml;
using NUnit.Framework;
namespace Monotests_System.Data
namespace MonoTests.System.Data
{
[TestFixture]
public class XmlDataLoaderTest
@@ -74,7 +74,7 @@ namespace Monotests_System.Data
DataSet ds = new DataSet ("Set");
DataTable dt = new DataTable ("Test");
dt.Columns.Add ("CustName", typeof (String));
dt.Columns.Add ("Type", typeof (System.Type));
dt.Columns.Add ("Type", typeof (Type));
ds.Tables.Add (dt);
return ds;
}
@@ -33,7 +33,7 @@ using System.Xml.Serialization;
using System.Xml.Schema;
using NUnit.Framework;
namespace Monotests_System.Data
namespace MonoTests.System.Data
{
[TestFixture]
public class XmlDataReaderTest
@@ -103,7 +103,7 @@ namespace Monotests_System.Data
StringReader sr = new StringReader (xml);
XmlTextReader xr = new XmlTextReader (sr);
DataTable tbl = new DataTable("CustomTypesTable");
tbl.Columns.Add("Dummy", typeof(System.UInt32));
tbl.Columns.Add("Dummy", typeof(UInt32));
tbl.Columns.Add("FuncXml", typeof(CustomTypeXml));
DataSet ds = new DataSet("CustomTypesData");
+1 -1
View File
@@ -21,7 +21,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = more_build_args
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
VALID_PROFILE := $(filter monotouch monodroid mobile mobile_static xammac net_4_0 net_4_5, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.System.Interactive.Async.dll
NO_SIGN_ASSEMBLY = yes
@@ -22,7 +22,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = more_build_args
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.System.Interactive.Providers.dll
NO_SIGN_ASSEMBLY = yes
+1 -1
View File
@@ -21,7 +21,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = more_build_args
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.System.Interactive.dll
NO_SIGN_ASSEMBLY = yes
@@ -120,9 +120,17 @@ namespace System.Net.Http.Headers
public string Name {
get {
return FindParameter ("name");
var value = FindParameter ("name");
if (value == null)
return null;
return DecodeValue (value, false);
}
set {
if (value != null)
value = EncodeBase64Value (value);
SetValue ("name", value);
}
}
@@ -170,7 +170,7 @@ namespace System.Net.Http.Headers
} else {
value.From = nvalue;
t = lexer.Scan ();
t = lexer.Scan (recognizeDash: true);
if (t != Token.Type.SeparatorDash)
return false;
@@ -96,6 +96,7 @@ namespace System.Net.Http.Headers
HeaderInfo.CreateSingle<AuthenticationHeaderValue> ("Authorization", AuthenticationHeaderValue.TryParse, HttpHeaderKind.Request),
HeaderInfo.CreateSingle<CacheControlHeaderValue> ("Cache-Control", CacheControlHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
HeaderInfo.CreateMulti<string> ("Connection", CollectionParser.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
HeaderInfo.CreateSingle<ContentDispositionHeaderValue> ("Content-Disposition", ContentDispositionHeaderValue.TryParse, HttpHeaderKind.Content),
HeaderInfo.CreateMulti<string> ("Content-Encoding", CollectionParser.TryParse, HttpHeaderKind.Content),
HeaderInfo.CreateMulti<string> ("Content-Language", CollectionParser.TryParse, HttpHeaderKind.Content),
HeaderInfo.CreateSingle<long> ("Content-Length", Parser.Long.TryParse, HttpHeaderKind.Content),
@@ -247,7 +247,7 @@ namespace System.Net.Http.Headers
return false;
}
public Token Scan ()
public Token Scan (bool recognizeDash = false)
{
int start = pos;
if (s == null)
@@ -279,8 +279,12 @@ namespace System.Net.Http.Headers
ttype = Token.Type.SeparatorSlash;
break;
case '-':
ttype = Token.Type.SeparatorDash;
break;
if (recognizeDash) {
ttype = Token.Type.SeparatorDash;
break;
}
goto default;
case ',':
ttype = Token.Type.SeparatorComma;
break;
@@ -127,7 +127,7 @@ namespace System.Net.Http.Headers
int number;
token_read = false;
t = lexer.Scan ();
t = lexer.Scan (recognizeDash: true);
switch (t.Kind) {
case Token.Type.SeparatorDash:
t = lexer.Scan ();
@@ -144,7 +144,7 @@ namespace System.Net.Http.Headers
switch (values.Length) {
case 1:
t = lexer.Scan ();
t = lexer.Scan (recognizeDash: true);
from = number;
switch (t.Kind) {
case Token.Type.SeparatorDash:
@@ -50,7 +50,6 @@ namespace System.Net.Http
bool useProxy;
ClientCertificateOption certificate;
bool sentRequest;
HttpWebRequest wrequest;
string connectionGroupName;
bool disposed;
@@ -221,12 +220,9 @@ namespace System.Net.Http
protected override void Dispose (bool disposing)
{
if (disposing) {
if (wrequest != null) {
wrequest.ServicePoint.CloseConnectionGroup (wrequest.ConnectionGroupName);
Volatile.Write (ref wrequest, null);
}
if (disposing && !disposed) {
Volatile.Write (ref disposed, true);
ServicePointManager.CloseConnectionGroup (connectionGroupName);
}
base.Dispose (disposing);
@@ -317,7 +313,7 @@ namespace System.Net.Http
throw new ObjectDisposedException (GetType ().ToString ());
Volatile.Write (ref sentRequest, true);
wrequest = CreateWebRequest (request);
var wrequest = CreateWebRequest (request);
if (request.Content != null) {
var headers = wrequest.Headers;
@@ -239,6 +239,33 @@ namespace MonoTests.System.Net.Http.Headers
Assert.AreEqual (new NameValueHeaderValue ("filename*", "utf-8''%C4%8D"), value.Parameters.First (), "#12");
}
[Test]
public void Properties_Name ()
{
var value = new ContentDispositionHeaderValue ("a");
value.Name = "aa";
Assert.AreEqual ("aa", value.Name, "#1");
Assert.AreEqual (new NameValueHeaderValue ("name", "aa"), value.Parameters.First (), "#2");
value.Name = "č";
Assert.AreEqual ("č", value.Name, "#11");
Assert.AreEqual (new NameValueHeaderValue ("name", "\"=?utf-8?B?xI0=?=\""), value.Parameters.First (), "#12");
value.Name = "(@)";
Assert.AreEqual ("\"(@)\"", value.Name, "#21");
Assert.AreEqual (new NameValueHeaderValue ("name", "\"(@)\""), value.Parameters.First (), "#22");
value.Name = "\"č\"";
Assert.AreEqual ("č", value.Name, "#31");
Assert.AreEqual (new NameValueHeaderValue ("name", "\"=?utf-8?B?xI0=?=\""), value.Parameters.First (), "#32");
value.Name = "\"quoted\"";
Assert.AreEqual ("\"quoted\"", value.Name, "#41");
Assert.AreEqual (new NameValueHeaderValue ("name", "\"quoted\""), value.Parameters.First (), "#42");
}
[Test]
public void Properties_ModificationDate ()
{
@@ -31,6 +31,7 @@ using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using System.Net.Http.Headers;
using System.Linq;
namespace MonoTests.System.Net.Http.Headers
{
@@ -81,6 +82,13 @@ namespace MonoTests.System.Net.Http.Headers
Assert.AreEqual ("mu/m", res.MediaType, "#2");
Assert.AreEqual ("jj'", res.CharSet, "#2b");
Assert.AreEqual ("mu/m; CHarset=jj'", res.ToString (), "#2c");
res = MediaTypeHeaderValue.Parse ("multipart/form-data; boundary=----Wk");
Assert.AreEqual ("multipart/form-data", res.MediaType, "#3");
Assert.IsNull (res.CharSet, "#3b");
Assert.AreEqual (1, res.Parameters.Count, "#3c");
Assert.AreEqual (new NameValueHeaderValue ("boundary", "----Wk"), res.Parameters.First (), "#3d");
Assert.AreEqual ("multipart/form-data; boundary=----Wk", res.ToString (), "#3e");
}
[Test]
@@ -222,6 +222,7 @@ namespace MonoTests.System.Net.Http
Assert.AreEqual (330, scm.Headers.ContentLength, "#2");
headers.Allow.Add ("a1");
headers.ContentDisposition = new ContentDispositionHeaderValue ("cd1");
headers.ContentEncoding.Add ("ce1");
headers.ContentLanguage.Add ("cl1");
headers.ContentLength = 23;
@@ -234,6 +235,12 @@ namespace MonoTests.System.Net.Http
headers.Add ("allow", "a2");
try {
headers.Add ("content-disposition", "cd2");
Assert.Fail ("content-disposition");
} catch (FormatException) {
}
headers.Add ("content-encoding", "ce3");
headers.Add ("content-language", "cl2");
@@ -307,6 +314,7 @@ namespace MonoTests.System.Net.Http
Assert.AreEqual (new MediaTypeHeaderValue ("multipart/*"), headers.ContentType);
Assert.AreEqual (new DateTimeOffset (DateTime.Today), headers.Expires);
Assert.AreEqual (new DateTimeOffset (DateTime.Today), headers.LastModified);
Assert.AreEqual (new ContentDispositionHeaderValue ("cd1"), headers.ContentDisposition);
}
[Test]
@@ -1,10 +1,12 @@
//
// System.Numerics.BigInteger
//
// Rodrigo Kumpera ([email protected])
// Authors:
// Rodrigo Kumpera ([email protected])
// Marek Safar <[email protected]>
//
// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -68,7 +70,6 @@ namespace System.Numerics {
readonly uint[] data;
readonly short sign;
static readonly uint[] ZERO = new uint [1];
static readonly uint[] ONE = new uint [1] { 1 };
BigInteger (short sign, uint[] data)
@@ -81,7 +82,7 @@ namespace System.Numerics {
{
if (value == 0) {
sign = 0;
data = ZERO;
data = null;
} else if (value > 0) {
sign = 1;
data = new uint[] { (uint) value };
@@ -96,7 +97,7 @@ namespace System.Numerics {
{
if (value == 0) {
sign = 0;
data = ZERO;
data = null;
} else {
sign = 1;
data = new uint [1] { value };
@@ -107,7 +108,7 @@ namespace System.Numerics {
{
if (value == 0) {
sign = 0;
data = ZERO;
data = null;
} else if (value > 0) {
sign = 1;
uint low = (uint)value;
@@ -135,7 +136,7 @@ namespace System.Numerics {
{
if (value == 0) {
sign = 0;
data = ZERO;
data = null;
} else {
sign = 1;
uint low = (uint)value;
@@ -180,7 +181,7 @@ namespace System.Numerics {
int exponent = Exponent (bytes);
if (exponent == 0) {
sign = 0;
data = ZERO;
data = null;
return;
}
@@ -217,7 +218,7 @@ namespace System.Numerics {
if (size == 0) {
sign = 0;
data = ZERO;
data = null;
return;
}
@@ -241,7 +242,7 @@ namespace System.Numerics {
if (len == 0 || (len == 1 && value [0] == 0)) {
sign = 0;
data = ZERO;
data = null;
return;
}
@@ -254,7 +255,7 @@ namespace System.Numerics {
while (value [len - 1] == 0) {
if (--len == 0) {
sign = 0;
data = ZERO;
data = null;
return;
}
}
@@ -456,12 +457,12 @@ namespace System.Numerics {
}
public static BigInteger Zero {
get { return new BigInteger (0, ZERO); }
get { return new BigInteger (0); }
}
public static explicit operator int (BigInteger value)
{
if (value.sign == 0)
if (value.data == null)
return 0;
if (value.data.Length > 1)
throw new OverflowException ();
@@ -483,7 +484,7 @@ namespace System.Numerics {
[CLSCompliantAttribute (false)]
public static explicit operator uint (BigInteger value)
{
if (value.sign == 0)
if (value.data == null)
return 0;
if (value.data.Length > 1 || value.sign == -1)
throw new OverflowException ();
@@ -527,7 +528,7 @@ namespace System.Numerics {
public static explicit operator long (BigInteger value)
{
if (value.sign == 0)
if (value.data == null)
return 0;
if (value.data.Length > 2)
@@ -569,7 +570,7 @@ namespace System.Numerics {
[CLSCompliantAttribute (false)]
public static explicit operator ulong (BigInteger value)
{
if (value.sign == 0)
if (value.data == null)
return 0;
if (value.data.Length > 2 || value.sign == -1)
throw new OverflowException ();
@@ -584,9 +585,10 @@ namespace System.Numerics {
public static explicit operator double (BigInteger value)
{
switch (value.data.Length) {
case 0:
if (value.data == null)
return 0.0;
switch (value.data.Length) {
case 1:
return BuildDouble (value.sign, value.data [0], 0);
case 2:
@@ -613,7 +615,7 @@ namespace System.Numerics {
public static explicit operator decimal (BigInteger value)
{
if (value.sign == 0)
if (value.data == null)
return Decimal.Zero;
uint[] data = value.data;
@@ -703,7 +705,7 @@ namespace System.Numerics {
int r = CoreCompare (left.data, right.data);
if (r == 0)
return new BigInteger (0, ZERO);
return Zero;
if (r > 0) //left > right
return new BigInteger (left.sign, CoreSub (left.data, right.data));
@@ -722,7 +724,7 @@ namespace System.Numerics {
int r = CoreCompare (left.data, right.data);
if (r == 0)
return new BigInteger (0, ZERO);
return Zero;
if (r > 0) //left > right
return new BigInteger (left.sign, CoreSub (left.data, right.data));
@@ -736,7 +738,7 @@ namespace System.Numerics {
public static BigInteger operator* (BigInteger left, BigInteger right)
{
if (left.sign == 0 || right.sign == 0)
return new BigInteger (0, ZERO);
return Zero;
if (left.data [0] == 1 && left.data.Length == 1) {
if (left.sign == 1)
@@ -797,7 +799,7 @@ namespace System.Numerics {
int i;
for (i = quotient.Length - 1; i >= 0 && quotient [i] == 0; --i) ;
if (i == -1)
return new BigInteger (0, ZERO);
return Zero;
if (i < quotient.Length - 1)
quotient = Resize (quotient, i + 1);
@@ -820,7 +822,7 @@ namespace System.Numerics {
int i;
for (i = remainder_value.Length - 1; i >= 0 && remainder_value [i] == 0; --i) ;
if (i == -1)
return new BigInteger (0, ZERO);
return Zero;
if (i < remainder_value.Length - 1)
remainder_value = Resize (remainder_value, i + 1);
@@ -829,7 +831,7 @@ namespace System.Numerics {
public static BigInteger operator- (BigInteger value)
{
if (value.sign == 0)
if (value.data == null)
return value;
return new BigInteger ((short)-value.sign, value.data);
}
@@ -841,14 +843,14 @@ namespace System.Numerics {
public static BigInteger operator++ (BigInteger value)
{
if (value.sign == 0)
if (value.data == null)
return One;
short sign = value.sign;
uint[] data = value.data;
if (data.Length == 1) {
if (sign == -1 && data [0] == 1)
return new BigInteger (0, ZERO);
return Zero;
if (sign == 0)
return new BigInteger (1, ONE);
}
@@ -863,14 +865,14 @@ namespace System.Numerics {
public static BigInteger operator-- (BigInteger value)
{
if (value.sign == 0)
if (value.data == null)
return MinusOne;
short sign = value.sign;
uint[] data = value.data;
if (data.Length == 1) {
if (sign == 1 && data [0] == 1)
return new BigInteger (0, ZERO);
return Zero;
if (sign == 0)
return new BigInteger (-1, ONE);
}
@@ -935,7 +937,7 @@ namespace System.Numerics {
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
if (i == -1)
return new BigInteger (0, ZERO);
return Zero;
if (i < result.Length - 1)
result = Resize (result, i + 1);
@@ -995,7 +997,7 @@ namespace System.Numerics {
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
if (i == -1)
return new BigInteger (0, ZERO);
return Zero;
if (i < result.Length - 1)
result = Resize (result, i + 1);
@@ -1055,7 +1057,7 @@ namespace System.Numerics {
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
if (i == -1)
return new BigInteger (0, ZERO);
return Zero;
if (i < result.Length - 1)
result = Resize (result, i + 1);
@@ -1065,7 +1067,7 @@ namespace System.Numerics {
public static BigInteger operator~ (BigInteger value)
{
if (value.sign == 0)
if (value.data == null)
return new BigInteger (-1, ONE);
uint[] data = value.data;
@@ -1099,7 +1101,7 @@ namespace System.Numerics {
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
if (i == -1)
return new BigInteger (0, ZERO);
return Zero;
if (i < result.Length - 1)
result = Resize (result, i + 1);
@@ -1121,7 +1123,7 @@ namespace System.Numerics {
public static BigInteger operator<< (BigInteger value, int shift)
{
if (shift == 0 || value.sign == 0)
if (shift == 0 || value.data == null)
return value;
if (shift < 0)
return value >> -shift;
@@ -1177,7 +1179,7 @@ namespace System.Numerics {
if (size <= 0) {
if (sign == 1)
return new BigInteger (0, ZERO);
return Zero;
return new BigInteger (-1, ONE);
}
@@ -2142,7 +2144,7 @@ namespace System.Numerics {
int i;
for (i = remainder_value.Length - 1; i >= 0 && remainder_value [i] == 0; --i) ;
if (i == -1) {
remainder = new BigInteger (0, ZERO);
remainder = Zero;
} else {
if (i < remainder_value.Length - 1)
remainder_value = Resize (remainder_value, i + 1);
@@ -2151,7 +2153,7 @@ namespace System.Numerics {
for (i = quotient.Length - 1; i >= 0 && quotient [i] == 0; --i) ;
if (i == -1)
return new BigInteger (0, ZERO);
return Zero;
if (i < quotient.Length - 1)
quotient = Resize (quotient, i + 1);
@@ -2264,7 +2266,7 @@ namespace System.Numerics {
if (baseValue == 0.0d || baseValue == Double.PositiveInfinity)
return value.IsOne ? 0 : double.NaN;
if (value.sign == 0)
if (value.data == null)
return double.NegativeInfinity;
int length = value.data.Length - 1;
@@ -70,6 +70,7 @@ namespace MonoTests.System.Numerics
NfiUser.PercentNegativePattern = 2;
NfiUser.PercentPositivePattern = 2;
NfiUser.PercentSymbol = "%%%";
NfiUser.NumberDecimalSeparator = ".";
}
[Test]
@@ -625,10 +626,12 @@ namespace MonoTests.System.Numerics
Assert.IsTrue (new BigInteger (1).IsOne, "#7");
Assert.IsTrue (new BigInteger (32).IsPowerOfTwo, "#8");
Assert.IsTrue (new BigInteger (0).IsZero, "#9");
Assert.IsTrue (new BigInteger ().IsZero, "#9b");
Assert.AreEqual (0, new BigInteger (0).Sign, "#10");
Assert.AreEqual (-1, new BigInteger (-99999).Sign, "#11");
Assert.IsFalse (new BigInteger (0).IsPowerOfTwo, "#12");
Assert.IsFalse (new BigInteger ().IsPowerOfTwo, "#12b");
Assert.IsFalse (new BigInteger (-16).IsPowerOfTwo, "#13");
Assert.IsTrue (new BigInteger (1).IsPowerOfTwo, "#14");
}
@@ -647,6 +650,7 @@ namespace MonoTests.System.Numerics
Assert.AreEqual ("0000000005", new BigInteger (5).ToString ("d10"), "#2");
Assert.AreEqual ("0A8", new BigInteger (168).ToString ("X"), "#3");
Assert.AreEqual ("0", new BigInteger (0).ToString ("X"), "#4");
Assert.AreEqual ("0", new BigInteger ().ToString ("X"), "#4b");
Assert.AreEqual ("1", new BigInteger (1).ToString ("X"), "#5");
Assert.AreEqual ("0A", new BigInteger (10).ToString ("X"), "#6");
Assert.AreEqual ("F6", new BigInteger (-10).ToString ("X"), "#7");
@@ -750,6 +754,7 @@ namespace MonoTests.System.Numerics
Assert.AreEqual (new byte[] { 0x7F }, new BigInteger (0x7F).ToByteArray (), "#10");
Assert.AreEqual (new byte[] { 0x45, 0xCC, 0xD0 }, new BigInteger (-0x2F33BB).ToByteArray (), "#11");
Assert.AreEqual (new byte[] { 0 }, new BigInteger (0).ToByteArray (), "#12");
Assert.AreEqual (new byte[] { 0 }, new BigInteger ().ToByteArray (), "#13");
}
[Test]
@@ -886,6 +891,14 @@ namespace MonoTests.System.Numerics
Assert.AreEqual (-1m, (decimal)new BigInteger (-1), "#6");
Assert.AreEqual (9999999999999999999999999999m,
(decimal)new BigInteger (9999999999999999999999999999m), "#7");
Assert.AreEqual (0m, (decimal)new BigInteger (), "#8");
}
[SetCulture ("pt-BR")]
[Test]
public void Parse_pt_BR ()
{
Parse ();
}
[Test]
@@ -938,7 +951,8 @@ namespace MonoTests.System.Numerics
Assert.AreEqual (-23, (int)BigInteger.Parse(" -23 ", NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite), "#19");
Assert.AreEqual (300000, (int)BigInteger.Parse("3E5", NumberStyles.AllowExponent), "#20");
Assert.AreEqual (250, (int)BigInteger.Parse("2"+Nfi.NumberDecimalSeparator+"5E2", NumberStyles.AllowExponent | NumberStyles.AllowDecimalPoint), "#21");//2.5E2 = 250
var dsep = NumberFormatInfo.CurrentInfo.NumberDecimalSeparator;
Assert.AreEqual (250, (int)BigInteger.Parse("2" + dsep + "5E2", NumberStyles.AllowExponent | NumberStyles.AllowDecimalPoint), "#21");//2.5E2 = 250
Assert.AreEqual (25, (int)BigInteger.Parse("2500E-2", NumberStyles.AllowExponent), "#22");
Assert.AreEqual ("136236974127783066520110477975349088954559032721408", BigInteger.Parse("136236974127783066520110477975349088954559032721408", NumberStyles.None).ToString(), "#23");
@@ -951,7 +965,7 @@ namespace MonoTests.System.Numerics
}
try {
Int32.Parse ("2.09E1", NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent);
Int32.Parse ("2" + dsep + "09E1", NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent);
Assert.Fail ("#26");
} catch (OverflowException) {
}
@@ -1276,6 +1290,9 @@ namespace MonoTests.System.Numerics
a = new BigInteger ();
Assert.AreEqual (BigInteger.Zero.GetHashCode (), a.GetHashCode (), "#15");
a = new BigInteger ();
Assert.AreEqual (BigInteger.Zero, a, "#16");
}
[Test]
+1 -1
View File
@@ -35,7 +35,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = more_build_args $(RESX_RESOURCES:.resources=.resx) $(PREBUILT)
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.System.Reactive.Core.dll
NO_SIGN_ASSEMBLY = yes
+1 -1
View File
@@ -24,7 +24,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = more_build_args
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.System.Reactive.Debugger.dll
NO_SIGN_ASSEMBLY = yes
@@ -24,7 +24,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = more_build_args
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.System.Reactive.Experimental.dll
NO_SIGN_ASSEMBLY = yes
@@ -21,7 +21,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = more_build_args
VALID_PROFILE := $(filter monotouch monodroid xammac net_4_0 net_4_5, $(PROFILE))
VALID_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static net_4_0 net_4_5, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.System.Reactive.Interfaces.dll
NO_SIGN_ASSEMBLY = yes
Loaded 100 of 350 files, more files were not shown because too many files have changed in this diff. Show more