Compare commits

...
372 Commits
Author SHA1 Message Date
Katelyn Gadd 57239e923f Add new version of SocketTest.ConnectedProperty that works on all platforms. The current version is broken on Linux FullAOT and on Mac, so this adds a new version tuned to work reliably on Windows, Linux and Mac (including FullAOT). This addresses https://bugzilla.xamarin.com/show_bug.cgi?id=52157.
Revise new ConnectedProperty test
2017-07-07 17:15:56 -07:00
Alex Rønne Petersen 1fb43ec60d Merge pull request #5187 from alexrp/debugger-fix-callback-signature
[sdb] Fix signatures of thread-related profiler callbacks.
2017-07-08 01:28:58 +02:00
Alex Rønne Petersen e7d4a0e1f7 [sdb] Fix signatures of thread-related profiler callbacks.
This was an unintended change in the profiler API overhaul.
2017-07-07 21:13:46 +02:00
Alexander Köplinger d90075ff7c Bump api-snapshot 2017-07-07 21:12:26 +02:00
Alex Rønne Petersen e5de7dacf9 Merge pull request #5180 from alexrp/profiler-zero-freq
[profiler] Don't enable sampling if frequency is zero.
2017-07-07 20:48:40 +02:00
Alex Rønne Petersen abd2d39d6b Merge pull request #5179 from alexrp/profiler-thread-name
[profiler] Report main thread name after attaching.
2017-07-07 20:45:58 +02:00
Martin Baulig f1a9bc25a1 [System]: minor cleanups. (#5186)
* [Mono.Security]: Add missing IMonoSslStream.WriteAsync() method.

* Cosmetic.

* [System]: MonoTlsStream: put implementation inside #SECURITY_DEP, not the entire class.
2017-07-07 14:12:14 -04:00
Alexander Köplinger 1418f0d58b [System.ServiceProcess] Remove "browser" service from dependencies in test (#5183)
LanmanWorkstation and SamSs services don't depend on the Browser
service anymore, at least in the Windows Server build that our
Azure VM agents on Jenkins are using now. This started failing a
few days ago so I assume a new build was rolled out.
2017-07-07 19:36:22 +02:00
Marius Ungureanu aaf9d40318 Merge pull request #5184 from mono/gtk-bump
Bump bockbuild for gtk# API compat fixes.
2017-07-07 19:50:14 +03:00
Marius Ungureanu 37ff0bcb9d Bump bockbuild for gtk# API compat fixes. 2017-07-07 19:48:52 +03:00
Alexander Köplinger 167d1a6c19 [corlib] Add test for deleting non-existing file
It shouldn't throw in that case.

Helps cover https://bugzilla.xamarin.com/show_bug.cgi?id=57629
(note that we don't explicitly test on a readonly FS as that is hard
to do in a unit test, but running this test on Android should suffice).
2017-07-07 16:17:56 +02:00
Alexander Köplinger 4de1501831 [metadata/corlib] Add apfs to list of fixed drive types
Also added some tests for DriveInfo since we didn't have any.
2017-07-07 16:17:56 +02:00
Alex Rønne Petersen 1025d82b3e [profiler] Don't enable sampling if frequency is zero.
Otherwise we would get a SIGFPE at runtime.
2017-07-07 06:21:48 +02:00
Alex Rønne Petersen ed0cefd19a Merge pull request #5181 from alexrp/master
[profiler] Fix a type name conflict.
2017-07-07 04:33:57 +02:00
Alex Rønne Petersen 70c7f2ef1d [profiler] Fix a type name conflict. 2017-07-07 03:08:33 +02:00
Zoltan Varga fd5843e964 [arm64] Really fix handler block trampolines. 2017-07-06 21:00:22 -04:00
Alex Rønne Petersen 4d35043211 [profiler] Report main thread name after attaching. 2017-07-07 02:41:57 +02:00
Alex Rønne Petersen b0057f2259 Merge pull request #5088 from alexrp/profiler-lightweight-coverage
[profiler] No longer use enter/leave instrumentation for code coverage.
2017-07-07 01:09:15 +02:00
Alex Rønne Petersen 3a7874cd61 [profiler] Don't enable GC and thread events for code coverage. 2017-07-07 01:00:27 +02:00
Alex Rønne Petersen 57962479d7 [profiler] No longer use enter/leave instrumentation for code coverage.
This was only enabled to populate a hash table that wasn't actually used.
2017-07-07 01:00:27 +02:00
Alex Rønne Petersen 076e44ac27 Merge pull request #5101 from alexrp/profiler-api
[runtime] New profiler API.
2017-07-07 00:57:16 +02:00
Alex Rønne Petersen f84179d397 [msvc] Update def files after profiler API changes. 2017-07-07 00:24:49 +02:00
Alex Rønne Petersen beabfddefb [utils] Mark mono_dl_open () as MONO_API.
This is needed on Windows.
2017-07-07 00:24:47 +02:00
Alex Rønne Petersen 8417f42847 [metadata] Mark mono_loader_register_module () as MONO_API.
This is needed on Windows.
2017-07-07 00:24:09 +02:00
Zoltan Varga 4ceda0772d [runtime] Rework process waiting. (#5175)
Instead of using fragile lockless code in the sigchld signal handler, wake up the finalizer thread and make it call back
into the process code to signal finished processes.
2017-07-06 16:23:35 -04:00
Zoltan Varga 75d5e92311 [arm] Fix the handler block trampoline, it didn't actually call the helper function. 2017-07-06 15:06:51 -04:00
Zoltan Varga 936697aa97 Revert "[arm] Fix the handler block trampoline, it didn't actually call the helper function."
This reverts commit 745a6bec4a.
Revert this as it wasn't tested properly.
2017-07-06 14:45:35 -04:00
Zoltan Varga 745a6bec4a [arm] Fix the handler block trampoline, it didn't actually call the helper function. 2017-07-06 14:30:13 -04:00
Zoltan Varga 8aaf80d011 [arm64] Fix the handler block trampoline, it didn't actually call the helper function. 2017-07-06 14:27:27 -04:00
Alex Rønne Petersen 21fb262df5 [profiler] Add MONO_PROFILER_API_VERSION macro. 2017-07-06 11:32:42 +02:00
Alex Rønne Petersen 5abf30d893 [profiler] Split shutdown callback into early/late callbacks. 2017-07-06 11:32:41 +02:00
Alex Rønne Petersen ea4e4a9ef6 [runtime] New profiler API.
* Profiler callbacks can now be changed and disabled at any point.
* API users no longer have to set event flags. The API instead uses a counter
  internally for each type of callback.
* Filter functions for enter/leave instrumentation can be installed, and they
  can choose whether to instrument the prologue, epilogue, or both.
* Managed allocators can now be instrumented for allocation profiling.
* A profiler must now declare that it wishes to use allocation profiling and/or
  sampling in its init function.
* Sampling parameters can now be changed at any point, and the sampling thread
  can be put into an idle mode when no sampling is needed.
* Only one profiler can have control over the sampling parameters. Whichever
  profiler enables sampling first gets control.
* Adding new events is now very easy: One line in profiler-events.h and one
  line wherever the event should be raised.
* Lifted the restriction that enter/leave instrumentation would cause an abort
  in full AOT mode.
* Support for call chain sampling has been removed.
* Support for the old, platform-specific code coverage mode has been removed.
* The new profiler module entry point is mono_profiler_init. If a module has
  a mono_profiler_startup symbol (the old entry point), a warning will be
  printed and the module won't be loaded.
* Updated the profiler test suite to work with instrumented managed allocators.
2017-07-06 11:32:29 +02:00
Rodrigo Kumpera dc2e330a9f Merge pull request #5172 from kumpera/proc-handles-pt2
[System] Fix handle leak in Process::GetProcess.
2017-07-05 18:25:10 -04:00
Rodrigo Kumpera cfc5d4fb3d [System] Fix handle leak in Process::GetProcess.
The runtime returns a inc'd handle to managed, so the SafeHandle should decrement on dispose.
2017-07-05 15:24:36 -07:00
Aleksey Kliger 1f93e5326c [sgen] Use an OS mutex for memory governor log entries
The mutex is used by sgen worker threads that are not attached to the mono
runtime - they cannot use a coop mutex.
2017-07-05 13:38:48 -04:00
Alexander Köplinger ee6c6efcfc [tools] Fixup 098de0b8, inadvertently deleted the wrong csproj 2017-07-05 18:02:54 +02:00
monojenkins 178bb86b7e [msvc] Update csproj files (#5170) 2017-07-05 16:10:14 +02:00
Alexander Köplinger 727cf39986 [packaging] Fixup mistake from f7c9be 2017-07-05 16:10:06 +02:00
Alexander Köplinger 098de0b8e8 [tools] Cleanup unused files in mdoc
mdoc now lives in https://github.com/mono/api-doc-tools
2017-07-05 16:02:21 +02:00
Bernhard Urban 92a45afd7b [offsets-tool] allow to set targetdir for iOS targets, so it's possible to dump offsets without maccore 2017-07-05 12:01:10 +02:00
Zoltan Varga 0c6932a985 [jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making a copy of the valuetype. Hopefully fixes #56452. (#5166) 2017-07-04 13:02:05 -04:00
Zoltan Varga ddb061f776 Revert "[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making a copy of the valuetype. Hopefully fixes #56452. (#5166)"
This reverts commit 025ee6399b.

Revert this as it seems to break the f# build.
2017-07-04 10:08:27 -04:00
Alexander Köplinger f7c9be4890 [packaging] Add Windows hostfxr.dll to MSBuild in MSI
Part of https://bugzilla.xamarin.com/show_bug.cgi?id=57930
2017-07-04 15:01:55 +02:00
Ankit Jain 13aeb8836a Revert "[packaging/msbuild] Bump to get new changes on xplat-master (#5145)"
This reverts commit 94dcde7291.
2017-07-03 21:47:26 -04:00
Alexander Köplinger 6295559e04 Bump corefx (#5167)
* Bump corefx

* Bump API snapshot submodule
2017-07-03 23:35:53 +02:00
Zoltan Varga 025ee6399b [jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making a copy of the valuetype. Hopefully fixes #56452. (#5166) 2017-07-03 16:53:56 -04:00
Alexander Köplinger 8e88de76bb [ci] Tell babysitter where profiler stress result XML lives
This allows it to parse the XML and provide better results
about which tests failed.
2017-07-03 21:09:11 +02:00
Alexander Köplinger cbc43ad527 [Microsoft.Build] Improve assert in BuildSubmissionTest.EndBuildWaitsForSubmissionCompletion
It started failing more frequently, let's see if we can get better data.
Also did the same change to a similar test.
2017-07-03 00:43:55 +02:00
Zoltan Varga 2efd64587f [jit] Fix mono_debug_count () so it doesn't confuse COUNT=0 with COUNT not being used. 2017-07-02 18:05:38 -04:00
Alexander Köplinger 9e91b6687e [System.ServiceModel] Don't use DateTime.Now for measuring elapsed time
Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight-saving time
2017-07-02 23:31:34 +02:00
Alexander Köplinger ca55ce871f [Mono.Posix] Don't use DateTime.Now for measuring elapsed time
Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight-saving time
2017-07-02 23:31:34 +02:00
Alexander Köplinger b3e3e4cc40 [System] Don't use DateTime.Now for measuring elapsed time
Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight-saving time
2017-07-02 23:31:34 +02:00
Alexander Köplinger 2d9f497748 [corlib] Don't use DateTime.Now for measuring elapsed time
Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight saving time
2017-07-02 23:31:34 +02:00
Zoltan Varga 86ccab6997 [jit] Use the right type when handling shared versions of RuntimeHelpers.IsReferenceOrContainsReferences (). The previous version only worked by accident. (#5160) 2017-07-02 02:08:44 -04:00
Alexander Köplinger 5ad055154b [utils] Fix CppCheck warning in mono-threads-posix.c (#5161)
After the refactoring in 9aaa0083d0
CppCheck complained about using 'result' uninitialized (looks like
it can't deduce that g_error will abort the process anyway).
2017-07-01 21:06:24 +02:00
monojenkins 2247603bd8 [msvc] Update csproj files (#5162) 2017-07-01 18:53:58 +02:00
Marek Safar 18dc4ebcd0 [mcs] C#7 tuples var deconstruct 2017-07-01 00:34:37 +02:00
Marek Safar 2ceb6e9402 [mcs] Adds missing file 2017-06-30 20:22:27 +02:00
Marek Safar d2a26c9595 [mcs] C# 7 tuple (foundation only).
Still couple of advanced features not implemented and parser cannot
deal with unnamed tuple type at type declaration level.
2017-06-30 19:47:06 +02:00
Rodrigo Kumpera bb99b3ef99 Merge pull request #5159 from MaurGi/patch-1
Console.Error.WriteLine in System.Net.NetworkInformation
2017-06-30 12:18:20 -04:00
Mauro Giusti 39af47841f Console.Error.WriteLine in System.Net.NetworkInformation
Console.Error.WriteLine ("Got a bad hardware address length for an AF_PACKET {0} {1}",...

This Console.WriteLine interferes with Apache Storm that reads from the console I/O.

See bug: https://bugzilla.xamarin.com/show_bug.cgi?id=57887
2017-06-30 09:13:31 -07:00
Rodrigo Kumpera bb0e787f60 Merge pull request #5144 from kumpera/handle-fixes-part1
[io-layer] Fix two race conditions, one on FD handle creation and one on interrupt install.
2017-06-30 10:56:08 -04:00
Rodrigo Kumpera 83832615fa Merge branch 'master' into handle-fixes-part1 2017-06-30 10:55:20 -04:00
Aleksey Kliger (λgeek) 6559b16c14 Merge pull request #5156 from lambdageek/bug-57850+57851
[sre] Deal with ResolveEventHandler returning an AssemblyBuilder (Fixes #57850, #57851)

Fix a couple of bugs in the situation where a `ResolveEventHandler` happens to return an `AssemblyBuilder`.

* [#57850](https://bugzilla.xamarin.com/show_bug.cgi?id=57850) - if the `ResolveEventHandler` returns a reflection only assembly, throw a `FileNotFoundException`
* [#57851](https://bugzilla.xamarin.com/show_bug.cgi?id=57851) - don't look for a `ReferenceAssemblyAttribute` on assemblies returned by a `ResolveEventHandler` if they happen to be an `AssemblyBuilder`. (the native code path to get there is to try and instantiate a custom attribute in some other assembly, hence the fairly convoluted test in `assemblyresolve_event5` and its helper files)
2017-06-30 10:24:57 -04:00
Aleksey Kliger 225848bd65 [loader] Don't try to look for ReferenceAssemblyAttribute on dynamic assemblies (Fixes #57851)
.NETFramework seems to ignore this custom attribute and allows instantiating
types from on assembly builders.
2017-06-30 00:36:28 -04:00
Aleksey Kliger fa6194cc19 [loader] Throw exn if ResolveEventHandler returns a refonly assembly (Fixes #57850)
(Also depends on previous commit to ensure that MonoAssembly:refonly is set
correctly for dynamic assemblies)
2017-06-30 00:36:27 -04:00
Aleksey Kliger a1eb52aa13 [sre] Mark AssemblyBuilderAccess.ReflectionOnly assemblies as refonly
This will ensure they show up in AppDomain.ReflectionOnlyGetAssemblies(), and
won't be allowed to execute
2017-06-30 00:36:27 -04:00
Aleksey Kliger a2ee7059d0 [sre] use AssemblyBuilderAccess bitmask to set MonoDynamicImage flags
In particular this makes sure that AssemblyBuilderAccess.ReflectionOnly aren't
allowed to run.  And AssemblyBuilderAccess.CollectAndRun aren't allowed to save.
2017-06-30 00:36:26 -04:00
Aleksey Kliger 572f79d0f3 [sre] Add MonoAssemblyBuilderAccess enum in native code
in sync with System.Reflection.Emit.AssemblyBuilderAccess
2017-06-30 00:36:25 -04:00
Aleksey Kliger 30223ad01d [mono-error] Add mono_error_set_file_not_found
To throw System.IO.FileNotFoundException
2017-06-30 00:36:25 -04:00
Aleksey Kliger 6221c90f95 [tests] ResolveEventHandler that returns an AssemblyBuilder shouldn't crash mono
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57851
2017-06-30 00:36:24 -04:00
Zoltan Varga 27ce756030 [runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5147) 2017-06-29 23:05:00 -04:00
Zoltan Varga 51d1c47c8b [aot] Load aot images only in the root domain. (#5151) 2017-06-29 22:02:08 -04:00
Aleksey Kliger 57ae95d7aa [tests] Throw an error if ResolveEventHandler returns a reflection only AssemblyBuilder
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57850
2017-06-29 19:28:13 -04:00
Aleksey Kliger 810e4a15dd [tests] Add some missing files to EXTRA_DIST 2017-06-29 19:28:11 -04:00
Zoltan Varga ed6183c2b9 [runtime] Make runtime invoke wrappers for dynamic methods non-shareable, so they can be freed when the dynamic method is freed. (#5152) 2017-06-29 18:10:34 -04:00
Eberhard Beilharz cd39375a39 [System] Request 32-bit capabilities
This fixes a crash that happened when running in the debugger.
This fixes Xamarin-21261.

Change-Id: I0ccda9f3c11ec02457a932073665721be5e4e83e
2017-06-29 23:16:46 +02:00
Alex Rønne Petersen 87c125c435 Merge pull request #5140 from alexrp/profiler-stress-fpe-fix
[acceptance-tests] Don't pass a zero sampling/heapshot frequency in the profiler stress runner.
2017-06-29 18:52:20 +02:00
monojenkins 07959b40bb [msvc] Update csproj files (#5149) 2017-06-29 18:21:43 +02:00
Ankit Jain 94dcde7291 [packaging/msbuild] Bump to get new changes on xplat-master (#5145) 2017-06-29 08:41:29 -04:00
Alexander Köplinger b59125ca81 [bcl] Drop a bunch of unused _2_1.cs files (#5112)
* [bcl] Drop a bunch of unused _2_1.cs files

They weren't used anywhere, not even mobile, so we can remove them.
2017-06-29 13:21:49 +02:00
Zoltan Varga 6c37483822 Revert "[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5143)"
This reverts commit 616ea50718.

Revert this as it fails to build on wrench.
2017-06-29 02:20:50 -04:00
Zoltan Varga 616ea50718 [runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5143) 2017-06-29 01:02:53 -04:00
Rodrigo Kumpera 1a8bdd5aff [io-layer] Fix two race conditions, one on FD handle creation and one on interrupt install.
mono_w32handle_new_fd: We must hold scan_mutex while initializing an unallocated handle otherwise
mono_w32handle_foreach might think it's a valid handle.

mono_w32handle_timedwait_signal_handle: We must increment the refcount before installing the interrupt handle
as the other end can be called right after we finish installing and would trigger a failure.
2017-06-28 15:48:28 -07:00
Ludovic Henry 6d88df8d82 [w32handle] Replace mono_w32handle_{ref,unref} by mono_w32handle_{duplicate, close} (#5106)
* [w32handle] Fix handle dumped ref

* [w32handle] Replace exposing mono_w32handle_{ref,unref} by mono_w32handle_{duplicate,close}, it is closer to what the win32 API exposes.

* [w32handle] Remove unrefing of handles on shutdown

If one of the handle is a file handle for example, then w32file has already be cleaned up, so we cannot guarantee that the handle we are going to close is not going to call into w32file code.
2017-06-28 18:42:35 -04:00
Jonathan Chambers 6ca11b76d6 Implement GC roots ourselves in Boehm rather than relying on their concept of roots which is mainly for static data segments in binaries and not implemented on all platforms (cannot remove roots on Windows) (#564) 2017-06-28 14:43:38 -04:00
Alexander Köplinger 6400a71595 [packaging] Remove git_branch from msbuild and mono-extensions (#5141)
We're checking out a specific commit for both now so the git branch
is no longer required.

Also fixes warnings that a 2017-06 branch doesn't exist in mono-extensions.
2017-06-28 19:42:46 +02:00
Jo Shields a12daa47e0 Manually invoke Xvfb, don't depend on the xvfb plugin (#5132) 2017-06-28 19:41:25 +02:00
Marek Safar 90ca313240 [build] Add a new profile 2017-06-28 18:51:26 +02:00
Aleksey Kliger 505695fcd1 [nullgc] When building nullgc, don't try to link Boehm libs
Previous nullgc commit (52d9a55a86) didn't actually work in a clean tree.
2017-06-28 10:20:05 -04:00
Alex Rønne Petersen 3298fe7f21 [acceptance-tests] Don't pass a zero sampling/heapshot frequency in the profiler stress runner.
Also change the code to make it more likely that we actually do some runs
without sampling or heapshot enabled.
2017-06-28 14:07:39 +02:00
Zoltan Varga 17d4227002 [w32handle] Add some debugging code to help track down handle wait problems. (#5136) 2017-06-27 19:44:58 -04:00
Zoltan Varga 85a3e77247 [w32handle] Zero out the handle specific data in the handle dtor to help debugging. (#5135) 2017-06-27 18:05:34 -04:00
monojenkins 71c58f8fb0 [msvc] Update csproj files (#5131) 2017-06-27 18:32:41 +02:00
Alexander Köplinger 08559f8a29 [man] Fix AOT temp path option description
It's `temp-path` in the code, not `temp_path`
2017-06-27 16:58:46 +02:00
Aleksey Kliger (λgeek) af2b3eb197 Merge pull request #5120 from lambdageek/bug-57744
[reflection] Convert correct MonoError to an exn in Assembly.GetTypes ()
2017-06-27 10:44:30 -04:00
cherusker 4aa28ede12 Fix various compiler warnings (#5064)
* Fix compiler warnings (w32)

- add explicit (long long (unsigned)) type casts

- change %ld to %lld once, to match the general style of these logging messages

* Fix compiler warnings (threadpool)

- add explicit (void *) type casts

* Fix compiler warnings (boehm)

- add an explicit (long) type cast; the values are defined as gint64, an upgrade to at least "%ld" seems like a good idea

- about dropping const: const does not seem to be necessary as g_getenv() returns pointers to freshly allocated buffers whenever called. const might have been used to protect the return value of g_getenv() on unix systems with earlier versions of Mono (as a comment in gmisc-unix.c suggests). keeping const here causes a compiler warning, as the const qualifier gets dropped when *env is being used with g_free(). that led to the decision to drop the qualifier altogether.

* Fix compiler warnings (sgen)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

* Fix compiler warnings (misc - metadata)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

* Fix compiler warnings (misc)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

- add an explicit (void *) type cast; changing the return type to char* might be more usable and could be discussed

- ret is not being used and can be removed; fixes a -Wunused-but-set-variable warning

* Fix compiler warnings (mini)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

* [fixup!] Correct indentation

* [fixup!] Correct (void *)
- use GUINT_TO_POINTER and MONO_NATIVE_THREAD_ID_TO_UINT instead of (void *) to cast mono_native_thread_id_get () to %p

* [fixup!] Correct indentation of boehm-gc.c and add FIXME

* include <inttypes.h> and test the G_GINT64_FORMAT macro

* [fixup!] Use G_G*_FORMAT and PRIx32 macros instead of type casts wherever possible
2017-06-27 16:21:34 +02:00
Ankit Jain 67f753a893 [packaging/msbuild] Bump to get new changes on xplat-master (#5127) 2017-06-27 00:57:07 -04:00
Zoltan Varga 492438a431 [jit] Avoid emitting op_load_got_addr opcodes on x86 when using llvmonly, its not needed. (#5125) 2017-06-26 23:19:07 -04:00
Aleksey Kliger bebd8dc438 [reflection] Convert correct MonoError to an exn in Assembly.GetTypes () (Fixes #57744)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57744
2017-06-26 16:09:34 -04:00
Aleksey Kliger 13d0bab910 [bcl] Delete our ReflectionTypeLoadException
We use the referencesource version
2017-06-26 16:07:11 -04:00
Alexander Köplinger f892c7c574 [cil-strip] Move comment out of .sources file
I forgot that we only run gensources.sh on libraries but not
tools so the comments don't get stripped out...
2017-06-26 19:19:10 +02:00
Zoltan Varga 5e6e6df993 [runtime] Add more logging in case mono_os_cond_timedwait () fails. 2017-06-26 13:04:45 -04:00
Alexander Köplinger 5d69157964 Bump API snapshot 2017-06-26 17:13:11 +02:00
Marius Ungureanu fd185fb454 [System.Core] Implement MemoryMappedFile.OpenExisting
Reuse the existing icall infrastructure to give the same handle back.

This PR implements all OpenExisting methods (with the access rights parameter discarded) and the SafeHandle property.
In the runtime, we don't check the capacity parameter if we try to open a mmap file, and we fallthrough the handle refcount case.
2017-06-26 16:57:31 +02:00
Alexander Köplinger a8c53ebf16 Revert "[cil-strip] Remove old private copy of Mono.Cecil"
(reverted from commit 4ea3122758)
2017-06-26 12:35:56 +02:00
Alexander Köplinger f068fb6b66 Revert "[cil-strip] Upgrade to latest Mono.Cecil API"
(reverted from commit 0c9eb70a46)

Using newer Cecil means metadata tokens will be different which
breaks AOT compilation: https://github.com/mono/mono/pull/5102#issuecomment-310801767
2017-06-26 12:33:36 +02:00
monojenkins 1db2001526 [msvc] Update csproj files 2017-06-26 08:55:42 +02:00
Zoltan Varga 7ccddf9832 [llvm] Align aot variables to 8 bytes, parts of the aot code depend on it. 2017-06-24 15:12:47 -04:00
Aleksey Kliger 52d9a55a86 [null_gc] Get null GC building again.
- Had to borrow a gchandles implementation from mono/metadata/boehm-gc.c
- Added coop handles support for NULL GC
- Fixed typos in configure.ac
- To use: `./configure --with-libgc=none --without-sgen --enable-boehm`
  You get a mono-boehm which actually is not collecting anything.
2017-06-24 11:29:16 -04:00
Ankit Jain 80165d2117 [packaging/msbuild] Bump to get new changes on xplat-master (#5113) (#5114) 2017-06-23 23:35:53 -04:00
Ludovic Henry 8724ace98a [System] Fix compilation on watchos (#5108) 2017-06-23 19:32:35 -04:00
Alexander Köplinger 4ea3122758 [cil-strip] Remove old private copy of Mono.Cecil
No longer needed now that we're using the new Cecil.
2017-06-24 01:25:03 +02:00
Alexander Köplinger 0c9eb70a46 [cil-strip] Upgrade to latest Mono.Cecil API
This greatly simplifies the code and as a bonus also shaves off
about 300ms when stripping mscorlib.dll.
2017-06-24 01:25:03 +02:00
Rodrigo Kumpera ff285585d4 Merge pull request #5103 from alexrp/profiler-signal-ack-fix
[profiler] Do the signal ack after checking that the thread is detached.
2017-06-23 15:30:14 -07:00
Zoltan Varga 14867dbabe [aot] Fix aot image loading messages in static mode. 2017-06-23 16:17:34 -04:00
Vlad Brezae 27b67e3586 Merge pull request #5084 from BrzVlad/feature-worker-context
[sgen] Implement sgen worker context
2017-06-23 21:10:18 +03:00
Vlad Brezae e693ce5077 [sgen] Use concurrent mark concurrently with parallel minors 2017-06-23 20:47:49 +03:00
Vlad Brezae 606677431a [sgen] Implement work context for thread pool threads
We need to run jobs on the thread pool threads for parallel minor, parallel major, concurrent mark and concurrent sweep, some of which can run simultaneously. Instead of making separate threads reserved for each type of work, we create a work context abstraction (this contains a set of pending jobs to run and the sgen-worker callbacks). When a thread pool thread looks for work, it searches for work (jobs and idle work) through all contexts and finishes work from each one of them, from the highest to the lowest priority.

This is implemented by having different thread pool contexts (which contain the job list, work callbacks that indicate whether it should work and its ineherent priority), overall unrelated to the GC. The sgen worker infrastructure also creates separate worker contexts (which contain the object ops to be used and information about each worker, like the state and the private gray queue). We use at most two worker contexts (for minor and for major) and each worker context makes use of a sgen thread pool context.
2017-06-23 20:47:49 +03:00
Vlad Brezae 271c88f8a8 [sgen] Remove redundant code
We always init worker distribute gray queue when initialising worker infrastructure.
2017-06-23 20:46:09 +03:00
Vlad Brezae 506d5d4049 [sgen] Include split count in the parallel job
We were getting the split_count at job run time which makes little sense. Include it in the job, alongside the job index.
2017-06-23 20:46:09 +03:00
Vlad Brezae 6bb78cace3 [sgen] Run the scan pinned object job concurrently with minors
Concurrent mark doesn't normally scan objects in the nursery since they can be moved. At the end of the concurrent mark, we were locking over the entire gc pause in order to make sure that the we can scan the latest pinned object list (aka none of those objects can be moved). Lock only over the pinning phase of the collection, since it is enough.
2017-06-23 20:46:09 +03:00
Vlad Brezae 5348325a64 Merge pull request #5098 from BrzVlad/fix-sgen-pagesize
[sgen] Fix sgen pagesize
2017-06-23 20:06:51 +03:00
Marius Ungureanu d181fe7194 Merge pull request #5104 from mono/bump-bockbuild
Bump bockbuild
2017-06-23 19:08:23 +03:00
Marius Ungureanu 26eacdc3dc Bump bockbuild 2017-06-23 19:05:48 +03:00
Alex Rønne Petersen 87d8bdef08 [profiler] Do the signal ack after checking that the thread is detached.
Otherwise we could crash in mono_thread_info_current ().
2017-06-23 16:52:24 +02:00
Chris Lapa 04b6339bd1 [aot] fixes temp-path argument only working when using LLVM compiler. (#5099)
Signed-off-by: Chris Lapa <[email protected]>
2017-06-23 09:30:23 -04:00
Ankit Jain c7b19b52fd [packaging/msbuild] Bump to get new changes on xplat-master 2017-06-23 02:16:31 -04:00
Ankit Jain 5b2437d62f [packaging/msbuild] Update commit hash to point to xplat-master HEAD (#5100) 2017-06-22 21:35:09 -04:00
Vlad Brezae 3ea09f9c8f [sgen] Performance improvement for ms_block_size computations
This reduces regressions for switching from MS_BLOCK_SIZE compile time constant
to ms_block_size variable by 85% on the tests where this was showing up. In the
future we should implement a block allocator, which would, amongst other benefits,
enable us to remove the block-size/page-size dependency.
2017-06-23 01:14:27 +03:00
Vlad Brezae abd1bd5d8f [sgen] Fix MS block size calculation.
The block size must be a multiple of the system page size. Page size simply
cannot be determined reliably at compile time, so we must obtain the page size
through a system call on startup and use it as the block size. We still enforce
a minimum block size of 16kb on systems where the page size is smaller than
that.

The old code hardcoded page sizes for certain architectures with large pages.
THe problem is that those architectures don't necessarily have to have large
pages and on systems where this wasn't the case, we'd end up with a block size
much larger than needed.

Rebase of @alexrp's work.
2017-06-23 01:06:49 +03:00
Rodrigo Kumpera 86968831ec Merge pull request #5095 from kumpera/fix_fullaot
[aot] Fix the name of the mono_gc_wbarrier_range_copy icall. FullAOT with direct calls requires it.
2017-06-22 14:55:52 -07:00
Zoltan Varga af835fc6de [arm] Handle large offsets in OP_SEQ_POINT. Fixes #57476. (#5094) 2017-06-22 17:15:27 -04:00
Alex Rønne Petersen ab5220be93 Merge pull request #5090 from alexrp/profiler-class-unload-removal
[profiler] Remove class unload events.
2017-06-22 21:03:01 +02:00
Alex Rønne Petersen 32801300d1 [profiler] Remove class unload events.
These are never actually emitted by the profiler API because they make no sense
in the context of Mono's metadata layer.
2017-06-22 21:02:18 +02:00
Alex Rønne Petersen 1ec9117f63 Merge pull request #5089 from alexrp/profiler-deadlock-fix
[profiler] Fix a deadlock due to recursive use of the buffer lock.
2017-06-22 20:56:48 +02:00
Rodrigo Kumpera adc4d3c471 [aot] Fix the name of the mono_gc_wbarrier_range_copy icall. FullAOT with direct calls requires it. 2017-06-22 11:48:13 -07:00
Alex Rønne Petersen 0279b08ccb Merge pull request #5092 from alexrp/mini-coverage-increment
[mini] Use an atomic add for the code coverage counter when possible.
2017-06-22 20:39:37 +02:00
Eddie Hedges 2602f25eb7 Docs: added missing ) to RelaxngPattern snippet (#5093) 2017-06-22 18:48:40 +02:00
Alex Rønne Petersen de3fa74e12 [mini] Use an atomic add for the code coverage counter when possible. 2017-06-22 17:32:10 +02:00
Zoltan Varga 522c8b69f5 [runtime] Add a few missing error_init () calls to the mono_custom_attrs_from_... functions. Fixes #57488. (#5076) 2017-06-22 10:27:07 -04:00
Zoltan Varga f8a1ab5d75 [sre] Fix the signature of the create_dynamic_method () icall, make it static since the C implementation only takes two parameters, this only caused problems if the icall set the error, since it overwrite the DynamicMethod object instead. Fixes #57301. (#5081) 2017-06-22 10:26:46 -04:00
Alex Rønne Petersen 6f43750475 Merge pull request #5091 from alexrp/mini-enter-leave-cleanup
[mini] Remove codegen special cases around MONO_PROFILE_ENTER_LEAVE.
2017-06-22 15:55:26 +02:00
Alex Rønne Petersen e0e341c7d1 [mini] Remove codegen special cases around MONO_PROFILE_ENTER_LEAVE.
Enter/leave instrumentation is now done with icalls at the IR level, so these
special cases are no longer needed.
2017-06-22 12:02:14 +02:00
Alex Rønne Petersen b0be338837 [profiler] Fix a deadlock due to recursive use of the buffer lock.
The lock no longer supports recursion as of 10ba222234.
Not that it ever really did, since the old implementation was buggy.
2017-06-22 10:30:29 +02:00
Ludovic Henry 9df453295e [threads] Enable blocking transition with MONO_ENABLE_BLOCKING_TRANSITION env variable (#5087) 2017-06-21 20:46:18 -04:00
Alex Rønne Petersen e40724e169 [utils/mmap] Prefer sysconf () over getpagesize () in mono_pagesize ().
The former is async-signal-safe, while the latter makes no guarantees and also
isn't actually portable.
2017-06-21 22:40:12 +03:00
Aleksey Kliger (λgeek) 310be7a2fb Merge pull request #5079 from lambdageek/dev-setvalue
[coop handles] Implement various SetValue methods
2017-06-21 15:32:29 -04:00
Rodrigo Kumpera 824b01d4fc Merge pull request #5082 from kumpera/fix-ro-fs-file-delete
[io-layer] When deleting a file, check for EROFS and verify if the file exists. Fixes #57629.
2017-06-21 10:34:01 -07:00
Rodrigo Kumpera fec0e65560 [runtime] Update comment with link to Linux Kernel fix. 2017-06-21 09:56:58 -07:00
Bernhard Urban 55293097e1 [interp] disable context-static.exe on CI as it suffers from stack usage issue 2017-06-21 17:26:25 +02:00
Bernhard Urban d1aa491294 [interp] fix BARRIER_IF_VOLATILE usage 2017-06-21 17:26:25 +02:00
Alex Rønne Petersen 32a5d1fc3b [interp] Handle the no. prefix instruction as a no-op. 2017-06-21 17:26:25 +02:00
Alex Rønne Petersen 18f2255ecd [interp] Add support for the volatile. prefix instruction. 2017-06-21 17:26:25 +02:00
Alex Rønne Petersen f44ff23078 [interp] Add MINT_MONO_MEMORY_BARRIER. 2017-06-21 17:26:25 +02:00
Alex Rønne Petersen c738a606d2 [interp] Fix oplength of MINT_MONO_TLS. 2017-06-21 17:26:25 +02:00
Alex Rønne Petersen 983b5a8cbe [interp] Update comment to clarify meaning of oplength. 2017-06-21 17:26:25 +02:00
Marek Safar 21192c8424 [mcs] Add missing vector cloning of definite assignment on-true. Fixes #57505 2017-06-21 15:13:31 +02:00
Alex Rønne Petersen 7ed46ff6e1 Merge pull request #5072 from alexrp/profiler-stability
[profiler] A bunch of profiler bug/stability fixes.
2017-06-21 02:06:28 +02:00
Marek Safar d2b64bb5cf [mcs] Fixes regression introduced by a0fc3f4dcf to consider user set values. Fixes #57242 2017-06-21 00:14:05 +02:00
Rodrigo Kumpera 3454feb426 [io-layer] When deleting a file, check for EROFS and verify if the file exists. Fixes #57629.
Linux has this particular behavior of returning ENOFS when unlinking from an read only FS.
Even if the file doesn't exists! Darwin does the sane thing and return ENOENT in this case.

To workaround this, if unlink returns EROFS, we stat the file and deal with that.
2017-06-20 14:59:09 -07:00
Marek Safar 5acc6be700 Bump roslyn to 2.3 beta 2 2017-06-20 23:18:07 +02:00
Aleksey Kliger 3e514ce907 [runtime] Use coop handles for System.Array.SetValue 2017-06-20 15:00:04 -04:00
Aleksey Kliger 1f85a462e9 [runtime] Use coop handles for System.Array.SetValueImpl 2017-06-20 15:00:02 -04:00
Aleksey Kliger 51c97ade65 [runtime] Make array_set_value_impl single-exit 2017-06-20 15:00:01 -04:00
Aleksey Kliger c2f95645ca [runtime] Don't call icall ves_icall_System_Array_SetValueImpl directly
add a helper function array_set_value_impl and call that from elsewhere in
native code.
2017-06-20 14:59:59 -04:00
Aleksey Kliger 3611e8ec48 [runtime] Add mono_error_set_invalid_cast () 2017-06-20 14:59:57 -04:00
Aleksey Kliger 6344d4be9f [runtime] Use coop handles for System.Reflection.MonoField.SetValueInternal 2017-06-20 14:59:56 -04:00
Marek Safar 1334748e5a Bump corefx 2017-06-20 20:17:08 +02:00
Aleksey Kliger b5d64ebd0a [runtime] Add mono_nullable_init_from_handle 2017-06-20 13:53:46 -04:00
monojenkins ef29b9fbfa [msvc] Update csproj files (#5075) 2017-06-20 18:30:37 +02:00
Aleksey Kliger 7ee123b1e2 [coop handles] Add MONO_HANDLE_SET_FIELD_REF macro
Set a field in an object when you have a MonoClassField*
2017-06-20 11:29:43 -04:00
Aleksey Kliger 5831edbc3f [coop handles] Add mono_object_handle_pin_unbox 2017-06-20 11:29:43 -04:00
Bernhard Urban 68f5463685 [bcl tests] do not attempt to delete non-existing files
This fixes an issue we see on the BCL test suite when run in the context
of Xamarin Android:

```
I/mono-stdout( 2534):     Certificate1 [FAIL] : TearDown : System.UnauthorizedAccessException : Access to the path "temp.b64" is denied.
```

It seems like those files aren't generated anymore.  Not sure why this
starts to be a problem now.
2017-06-20 16:36:28 +02:00
Alex Rønne Petersen f4346ebc54 [profiler] Remove an unnecessary check that could hide potential bugs. 2017-06-20 06:38:21 +02:00
Alex Rønne Petersen 4cf3f02cac [acceptance-tests] Update the profiler-stress test runner for the profiler's new argument style.
This allows us to test a lot more combinations than previously.
2017-06-20 06:22:28 +02:00
Alex Rønne Petersen afa9a853fb [profiler] Fix 'no' argument parsing. 2017-06-20 05:49:58 +02:00
Alex Rønne Petersen 10ba222234 [profiler] Implement a new buffer reader/writer lock algorithm.
See the comment + assertions to get an idea of how it works.
2017-06-20 05:39:16 +02:00
Alex Rønne Petersen ccd373f429 [profiler] Require an ack of the previous sampling signal before sending another.
This avoids situations where we could end up filling the signal queue
completely, leading to the undocumented EAGAIN return value from pthread_kill,
which breaks ~everything in the STW/GC code because it thinks an error return
value from pthread_kill means the thread has exited.

The actual reason why this happened is that when a thread is suspended, we mask
all signals except the restart signal for that thread. This means that a
program with a large number of threads or where GC collections could take
longer than usual would end up with tens of thousands of sampling signals
queued up, eventually reaching the limit of the user-level signal queue (see
`ulimit -i` and `RLIMIT_SIGPENDING`).

We only do this on systems where we use real time signals. Non-RT signals do
not have this problem as the kernel will throttle them.
2017-06-20 05:39:14 +02:00
Alex Rønne Petersen bdfa3ef2ca [utils/threads] Export small ID functions as part of the API.
These will be used in the log profiler.

Also, make mono_thread_info_register_small_id () only allocate a new small ID
if one isn't already allocated for the current thread. This is necessary so
that we can allocate a small ID for a thread and not have it be overwritten
if/when that thread is later attached probably (which also results in this
function being called).
2017-06-20 05:39:12 +02:00
Alex Rønne Petersen 9aaa0083d0 [utils/threads] Print an error and abort if pthread_kill returns an error that isn't ESRCH. 2017-06-20 05:39:11 +02:00
Alex Rønne Petersen 333c6665a2 [profiler] Remove a FIXME that likely won't be addressed now. 2017-06-20 05:39:09 +02:00
Alex Rønne Petersen 1ebb4e4cbd [profiler] Ensure that buffer size is adjusted to whatever an event actually needs.
Very large events could previously result in potential overflows because
buffers always had the same size (BUFFER_SIZE, 64k).
2017-06-20 05:39:07 +02:00
Alex Rønne Petersen 1448821251 [profiler] Remove the buffer size hack in ensure_logbuf_unsafe ().
This is blatantly hiding potential bugs. This kind of code is not okay.
2017-06-20 05:39:06 +02:00
Alex Rønne Petersen 37ddfb1da4 [profiler] Attach threads automatically in all callbacks.
This hardens the profiler against cases where an unattached thread causes some
event callback to be invoked. This is particularly relevant when embedding.
2017-06-20 05:38:51 +02:00
Alex Rønne Petersen ce31c277fb [profiler] Flush the dumper thread every second.
If a program is idle, we likely won't get enough samples to prompt the dumper
thread to send its log buffer to the writer thread. This can make it seem like
the profiler isn't working when it actually is. So, just send the dumper
thread's log buffer every second to make sure data is delivered in a timely
fashion.
2017-06-20 03:19:44 +02:00
Alex Rønne Petersen 38d0080cf5 [profiler] Take the reader lock when modifying the thread-local method list.
It can be modified by other threads during sync points.
2017-06-20 03:19:44 +02:00
Ludovic Henry a08574bf9e [threads] Store MonoInternalThread in MonoThreadInfo for use when detaching (#5058)
* [threads] Make mono_thread_attach_full static

* [threads] Remove  prefix on MonoThreadInfoCallbacks callbacks

* [threads] Rename mono_threads*_init functions to mono_thread_info*_init

* [threads] Remove dead method mono_runtime_is_critical_method

* [threads] Move MonoThreadInfoCallbacks to metadata/threads

* [threads] Store MonoInternalThread in MonoThreadInfo for use when detaching

When the native thread would exit, the TLS keys are destroyed. There is a TLS destructor for MonoThreadInfo, but not for MonoInternalThread. If MonoInternalThread is destroyed before MonoThreadInfo, then MonoThreadInfoCallbacks.thread_detach wouldn't successfully detach the current MonoInternalThread as mono_thread_internal_current would return NULL. This would lead to MonoInternalThread still laying around, while their corresponding MonoThreadInfo has already been destroyed. This fixes this problem, since we now rely on MonoThreadInfo to store the MonoInternalThread for detach.
2017-06-19 20:35:54 -04:00
Alex Rønne Petersen 3765f987d5 Merge pull request #5070 from alexrp/profiler-version-bump
[profiler] Bump log profiler version to 2.0 due to breaking argument changes.
2017-06-20 01:29:15 +02:00
Alex Rønne Petersen 523e9ff615 [profiler] Bump log profiler version to 2.0 due to breaking argument changes. 2017-06-20 01:24:51 +02:00
Alex Rønne Petersen 8da9924557 Merge pull request #5062 from alexrp/profiler-library
[profiler] Introduce the Mono.Profiler.Log library. (take 2)
2017-06-20 01:04:18 +02:00
Alex Rønne Petersen fbb36d5500 [profiler] Introduce the Mono.Profiler.Log library. API still unstable. 2017-06-20 00:47:52 +02:00
Alex Rønne Petersen bcd8b38b57 Merge pull request #5063 from alexrp/profiler-format-changes
[profiler] A few small format changes
2017-06-20 00:46:50 +02:00
Alex Rønne Petersen a308a7cd22 [profiler] Bump format version to 14. 2017-06-20 00:31:21 +02:00
Alex Rønne Petersen 7ef2b4f919 [profiler] Update format description comment. 2017-06-20 00:31:19 +02:00
Alex Rønne Petersen 33db577741 [profiler] Encode the address in TYPE_SAMPLE_UBIN as a pointer. 2017-06-20 00:31:18 +02:00
Alex Rønne Petersen 1fc8f5631c [profiler] Add an exception object field to TYPE_CLAUSE. 2017-06-20 00:31:16 +02:00
Alex Rønne Petersen c4c6a9373d [profiler] Add an image pointer field to assembly load events. 2017-06-20 00:31:14 +02:00
Alex Rønne Petersen 1520a7aaba [profiler] Simplify the encoding of monitor events.
The way the event was encoded was highly irregular with respect to the rest of
the format.
2017-06-20 00:30:45 +02:00
Zoltan Varga 533bcc0c49 [jit] Fix a warning. 2017-06-19 16:52:57 -04:00
Aleksey Kliger (λgeek) 26cad094ee Merge pull request #5059 from lambdageek/tbt
[tests] Rework TypeBuilderTest SetUp/TearDown
2017-06-19 15:41:14 -04:00
Zoltan Varga bee68ad79f [arm64] Remove an assert which is hit when mono_arch_get_call_target () is called with a 'b' instead of a 'bl'. 2017-06-19 14:33:54 -04:00
Rodrigo Kumpera b5d36a9abb Merge pull request #5027 from kumpera/damn-you-strerror
[eglib] Replace strerror with strerror_r as the former is not thread safe.
2017-06-19 14:00:03 -04:00
Zoltan Varga ca7b288837 [jit] Treat the mono_threads_attach_coop () icall specially, since it can be called from native-to-managed wrappers on unattached threads, so calling it shouldn't go through the trampoline infrastructure. (#5056) 2017-06-19 13:49:31 -04:00
Aleksey Kliger f99700a264 [tests] Don't run SRE saved assembly in current process
Windows doesn't like deleting the file, and the original bug was a problem in
SRE, not in the AssemblyBuilder.Save ()
2017-06-19 12:35:38 -04:00
Zoltan Varga df203f3532 [interp] Implement runtime invokes by executing the runtime-invoke wrappers using the interpreter. This saves some code and allows better interop with JIT exceptions. (#5057) 2017-06-19 11:12:33 -04:00
Alexander Köplinger f98b92ea6c [MacSDK] Bump msbuild 2017-06-19 15:20:03 +02:00
Alexander Köplinger dbaab5d01a [packaging] Add a few more missing files to Windows MSI
Also add a safeguard so we don't accidentally leave files with
OSX paths in the package.
2017-06-19 14:58:50 +02:00
Alexander Köplinger e5207856a0 Bump cecil and api-snapshot 2017-06-19 13:58:15 +02:00
Alexander Köplinger 1aef35403d [btls] Fix a small memleak in btls-x509-lookup.c (#5065)
Noticed this while looking at the Clang Analysis Report[1] as the
only memory leak in the report and thought why not fix it :)

[1] https://jenkins.mono-project.com/job/test-mono-mainline-staticanalysis/Clang_Analysis_Report/
2017-06-19 12:54:32 +02:00
Alexander Köplinger 68130ebec9 [packaging] Add a few missing msbuild files to Windows MSI 2017-06-19 01:39:07 +02:00
Alex Rønne Petersen 9e469d7b9e [profiler] Add an exception clause callback that receives the exception object. 2017-06-18 05:40:05 +02:00
Zoltan Varga d421ee95b0 [sdb] Fix invokes to string ctors. Fixes #57197. 2017-06-17 01:32:34 -04:00
Ludovic Henry 6fc58f529b [w32handle] Unify WaitHandle.Wait{One,Any,All} icalls (#5051) 2017-06-16 21:01:51 -04:00
Aleksey Kliger 5c06650885 [tests] Rework TypeBuilderTest SetUp/TearDown
- Create a unique temporary directory for each test in TypeBuilderTest and delete
  it on TearDown.

- Change tests to use tempDir instead of Path.GetTempPath ()

- Change IsSerializable () test to how it was 11 years ago and have it write to a
  file with a simple name (but now in a directory where noone else is writing)

- Change FieldsWithSameName (), FieldsWithSameNameAndType () and
  MethodsWithSameNameAndSig () to use the default temp assembly (now in a
  unique tempDir) instead of using the CreateTempAssembly ()

- Remove CreateTempAssembly function. It is dead code.
2017-06-16 19:58:27 -04:00
Ludovic Henry 77a8ed1b39 [threads] Rework MonoThreadInfoCallbacks.thread_{register,detach,unregister} callbacks (#5055)
* [threads] Use MonoThreadInfo.{stack_start_limit,stack_end} in more places

* [threads] Remove dead code

* [threads] Rename MonoThreadInfoCallbacks.thread_{register,detach,unregister} to MonoThreadInfoCallbacks.thread_{attach,detach,detach_with_lock} respectively
2017-06-16 19:14:13 -04:00
Zoltan Varga cf39a9cd43 [runtime] Add a mono_marshal_get_runtime_invoke_full () function with an extra need_direct_wrapper argument to allow generation of runtime-invoke wrappers which directly call a method without using the 'addr' argument. (#5053) 2017-06-16 17:45:41 -04:00
Zoltan Varga 7e220bf4ff [interp] Implement CEE_RETHROW properly by allocating a separate exception variable for each clause, and not overwriting stack traces on a rethrow. (#5040) 2017-06-16 16:01:38 -04:00
Rodrigo Kumpera d4bd4f0091 Merge pull request #5014 from vkargov/vk-kasha
[jit] Always cache the latest image set in case of a cache miss.
2017-06-16 14:42:20 -04:00
monojenkins afd9c96b3f [msvc] Update csproj files (#5052) 2017-06-16 18:32:26 +02:00
Alexander Köplinger 6c6ab73705 [packaging] Add back IronLangs to Windows MSI
It was just temporarily removed from the Mac package to work around
a build break. This was fixed so we need to add iron* back.
2017-06-16 17:55:15 +02:00
Alexander Köplinger aaceb6f0cf Bump API snapshot 2017-06-16 17:12:44 +02:00
Aleksey Kliger (λgeek) cfa6ff88d1 Merge pull request #5010 from Unity-Technologies/boehm-gc-alloc-fixed-sre
Boehm GC Fixes - SRE and Handle Stack
2017-06-16 10:38:37 -04:00
David Karlaš ff3a3a6fad Merge pull request #5049 from mono/fixSdbTests
Fixed Mono.Debugger.Soft unit tests
2017-06-16 15:04:54 +02:00
Marek Habersack 9285e189c1 Enable translation of WSEACCESS (10013) on mobile (#5050)
This error can occur on mobile devices during network operations
as evidenced in https://bugzilla.xamarin.com/show_bug.cgi?id=56653
and having an actual description of the error printed in this case
makes it easier for the user to discover what's going on.
2017-06-16 11:30:16 +02:00
David Karlaš 5a0573df99 Fixed Mono.Debugger.Soft unit tests and added new new String('a', 3); unit test after return; 2017-06-16 09:46:57 +02:00
David Karlaš c329548380 Merge pull request #5042 from mono/sdbSyncDebuggerLibs
Upstreaming changes from mono/debugger-libs to Mono.Debugger.Soft
2017-06-16 08:41:17 +02:00
David Karlaš 9549385e47 Bug 44266 - Unable to change variable values whilst debugging
https://github.com/mono/debugger-libs/commit/ac17c08938408abc7f5aaf0f862d83bbd2b56d42
2017-06-16 08:23:29 +02:00
David Karlaš 3f899a3198 caching thread state
https://github.com/mono/debugger-libs/commit/e3e665525a59823563c23babaf5d0e29a44a644a
2017-06-16 08:23:29 +02:00
David Karlaš dd15ef7b68 Updated SourceLocation with end line and end column
https://github.com/mono/debugger-libs/commit/479a84ce506e7cf25d6aac4353d59b7fc6526a17
2017-06-16 08:23:28 +02:00
David Karlaš a427893839 Fix one extra allocation on MethodMirror.FullName
https://github.com/mono/debugger-libs/commit/cfea89011ef690fe2cd9fefccf6b34ee1d4b1584
2017-06-16 08:23:28 +02:00
David Karlaš 866ad511fe Bug 36053 - Broken enum values conversion
plus moved some code to correct location
https://github.com/mono/debugger-libs/commit/d65261617baddb5b41f665b0eb717cd1f81873b6
2017-06-16 08:23:28 +02:00
David Karlaš 86f8dd621a Fixed fetching Enum values on older runtimes
https://github.com/mono/debugger-libs/commit/525c3a685d52eb6ed053ee23c358e54dc091d9cb
2017-06-16 08:23:28 +02:00
David Karlaš daa673f978 [Debugger] Set the encoding of the error/output readers.
Bug 40556 - Output pad no longer displays unicode characters
https://github.com/mono/debugger-libs/commit/c10de4dd44493156a112fdc0d315db75e0457a2d
2017-06-16 08:23:28 +02:00
Rodrigo Kumpera a21319d1ca Merge pull request #5032 from kumpera/profiler-reorder-heap-events
Fix how HEAP_START / HEAP_END works
2017-06-15 20:56:05 -04:00
Alexander Köplinger cfe36830d4 Add back missing TypeConverter that got removed in last commit
Also bump API snapshot with the latest changes.
2017-06-16 01:20:03 +02:00
Frederik Carlier 831381caa9 Use CoreFX sources for System.Printing (#5041) 2017-06-16 00:57:02 +02:00
Frederik Carlier e33294bf22 Use CoreFX sources for System.Drawing.Imaging (#5048)
* Use CoreFX sources for System.Drawing.Imaging

* Bump API snapshot
2017-06-16 00:55:18 +02:00
Aleksey Kliger 762ac3d618 In mono_thread_info_suspend_lock in non-coop, don't assert MonoThreadInfo* is non-NULL
mono_thread_info_suspend_lock () can be called from boehm-gc.c
on_gc_notification before the new thread's start_wrapper calls
mono_thread_info_attach but after pthread_create calls the start wrapper.

As a result, the asserts in mono_thread_info_suspend_lock_with_info can catch
the new thread in an inconsistent state.
2017-06-15 13:50:10 -04:00
monojenkins 259afc7850 [msvc] Update csproj files 2017-06-15 19:49:57 +02:00
Frederik Carlier c238778b63 Use Drawing2D classes from CoreFX 2017-06-15 18:51:09 +02:00
Jo Shields 4a054b40ae Ensure monodoc/Test/ exists, with an empty file
This prevents build failures building monodoc tests, as git cannot check out empty directories, but Test/ must exist for `make check` to work
2017-06-15 18:49:53 +02:00
Aleksey Kliger be684e09b4 Initialize new handle chunks on in mono_handle_stack_alloc () 2017-06-15 10:39:57 -04:00
Frederik Carlier 3830eca92c Use Brush classes from CoreFX (#5039) 2017-06-15 11:29:35 +02:00
Bernhard Urban aa59a09fd7 Revert "[win] set HAVE_ONLINE_VES" (#5038)
This reverts commit 501e77f912.

superseded by https://github.com/mono/mono/pull/5000
2017-06-15 00:45:50 -04:00
Zoltan Varga e600333511 [arm64] Fix the patching of MONO_PATCH_INFO_METHOD_JUMP so it handles thunks properly. Allocate thunk space for tail calls. Fixes asserts in the System.Numerics xunit tests. (#5026) 2017-06-14 21:54:01 -04:00
Alexander Köplinger 581b46d90d [packaging] Add missing .pc files to Windows folder
It got accidentally ignored by the root .gitignore.
2017-06-15 02:16:18 +02:00
Rodrigo Kumpera 17af65a784 [profiler] Handle zero object heap dumps in mprof-report and fix the test suite. 2017-06-14 14:54:18 -07:00
Rodrigo Kumpera 5ebdc64ef8 [profiler] Emit post-gc sync point with the world stopped to avoid racing with allocating threads not stopped on the GC lock. 2017-06-14 14:54:17 -07:00
Rodrigo Kumpera 6f740b5bc3 [sgen] Don't report GC moves with the world running and before a GC happened - it makes no sense!. 2017-06-14 14:54:15 -07:00
Rodrigo Kumpera cfe5263372 [sgen] Move STW GC events to sgen-stw.c so they are properly reported. 2017-06-14 14:54:10 -07:00
Rodrigo Kumpera c23173ee4b [profiler] Move HEAP_START and HEAP_EVENTS to happen outside of heap shots.
They now are produced every time a GC spills heap events such as roots, moves and objects.

Additionally, I changed GC syncpoints to happen in case any GC events are active.
It's a safer choice with little penalty. Figuring out the actual combinations that would require them is non-trivial.
2017-06-14 14:53:59 -07:00
Rodrigo Kumpera 7c284c8c2b [eglib] Linux needs errno.h for ERANGE 2017-06-14 11:36:59 -07:00
Alexander Köplinger acf546b1ba [packaging] Fix wrong argument in Windows script 2017-06-14 20:35:50 +02:00
Zoltan Varga 89fa700441 [jit] Add a ExceptionTraceIp structure to represents entries in MonoException.trace_ips, making it easier to add more information to it in the future. NFC. (#5025) 2017-06-14 14:28:01 -04:00
Rodrigo Kumpera 2e68bc17e3 [eglib] Handle ERANGE in g_strerror 2017-06-14 11:25:27 -07:00
Aleksey Kliger (λgeek) f97b7bd2a2 Merge pull request #5020 from lambdageek/fix-strict-loader-image-cache-hit
[loader] If using strict strong names, recheck loaded assm before returning it.
2017-06-14 14:17:10 -04:00
Alexander Köplinger 7f28de8559 [packaging] Fix prerequisite in Windows script 2017-06-14 18:29:43 +02:00
Frederik Carlier 3307394dba Use CoreFX sources for System.Drawing.Text (#5036) 2017-06-14 18:20:07 +02:00
Frederik Carlier fb4877a8d7 Use CoreFX sources for System.Drawing.Imaging (#5035)
* Use CoreFX sources for System.Drawing.Imaging

* Bump API snapshot
2017-06-14 18:17:19 +02:00
Frederik Carlier d31ccce651 Use source from CoreFX for System.Drawing.Drawing2D (#5034) 2017-06-14 18:12:32 +02:00
Alexander Köplinger 348ec2cf7a [packaging] Remove msiexec prerequisite from Windows script
We're using lessmsi now.
2017-06-14 17:31:04 +02:00
Alexander Köplinger b85f34d763 [packaging] Exit Windows packaging script on error
Also quote passed in mdk path.
2017-06-14 16:29:29 +02:00
Jonathan Chambers 466c00b8f0 Use GC memory for handle stack under Boehm so it's scanned. Cleanup handle stack on thread unregister. 2017-06-14 09:18:17 -04:00
Bernhard Urban a0bf70a140 [metadata] s/HAVE_ONLINE_VES/ENABLE_ILGEN/g 2017-06-14 15:03:21 +02:00
Bernhard Urban d720e3368c [configure] move HAVE_ONLINE_VES away from autotools to a header file 2017-06-14 15:03:21 +02:00
Alexander Köplinger 1ebd866eaa Bump corefx 2017-06-14 07:58:28 +02:00
saraedum 39d1e1889f [Mono.Security] Fix typo in CryptographicException message
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52621
2017-06-14 01:43:46 +02:00
Aleksey Kliger 5f0dd2998d [loader] If using strict strong names, recheck loaded assm before returning it.
Suppose we have two versions of an assembly: AsmA 1.0.0.0 and AsmA 2.0.0.0 that
we want to load into the same domain at the same time (for example we want to
load AsmB and AsmC that statically reference the two versions, respectively, or
maybe we used reflection).  Suppose version 1 got loaded first (and we found it
on our MONO_PATH in "somepathdir/AsmA.dll").  Now we want to load version 2.
The problem is that if version 1 is on MONO_PATH first, we'll find a filename
that matches ("somepathdir/AsmA.dll") and try to open that image.  Then we'll
end up here in mono_assembly_open_predicate() after the mono_image_open_a_lot()
call hits the image cache.  So we get back an image and image->assembly is
version 1.

The old behavior would just return any non-NULL image->assembly.  The new
behavior is to check the predicate and reject opening the propose file if the
predicate doesn't match.  (If we're not using the strict loader, or if there's
no predicate set, return the existing image->assembly as before).
2017-06-13 19:07:52 -04:00
Aleksey Kliger 87714d8a45 [tests] Strict assembly loading of two version of the same assm should work.
In particular, we should be able to use classes/methods that are unique to each
version.  We should not get only one version loaded.
2017-06-13 19:07:51 -04:00
Alexander Köplinger 258efac3c6 [MacSDK] Remove quotes in nuget wrapper script
None of the other wrapper scripts quote the Mono path and this
broke the Windows packaging script which extracts nuget from the
Mac package.
2017-06-14 00:45:58 +02:00
Bernhard Urban 1a4ce67a49 Revert "[exceptions] only do SIGSEGV related actions for SIGSEGVs in mono_handle_native_crash"
This reverts commit a27bc024f1.

We never want the crash handler to be recursive.
2017-06-13 23:43:06 +02:00
Rodrigo Kumpera e68c3b8027 [eglib] Replace strerror with strerror_r as the former is not thread safe.
This change would be nicer if the code was moved to the runtime so we could use our PAL.
2017-06-13 13:40:34 -07:00
Bernhard Urban 2640a8d862 [aot] fix compilation for targets that do not set MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES (#5017) 2017-06-13 15:56:52 -04:00
Rodrigo Kumpera aa8605d0eb Merge pull request #5011 from kumpera/quiet-mode
Don't emit profiler events we don't need to.
2017-06-13 15:53:46 -04:00
Rodrigo Kumpera 4b9d0677c9 [profiler] Don't emit sync point on restart the world unless gc moves are enabled. 2017-06-13 12:53:31 -07:00
Rodrigo Kumpera 6ccea37726 [profiler] Add + prefix to file names to append the pid. This makes enabling it with env vars doable. 2017-06-13 12:52:53 -07:00
Marius Ungureanu 56d5fce7f4 Bump bockbuild (#5023) 2017-06-13 20:52:42 +02:00
Alexander Köplinger 00f7811683 [ci] Get rid of remaining usages of WORKSPACE env var
Most of it was already removed in ea519ada8c
2017-06-13 18:07:47 +02:00
Marek Safar c5b00568ba Bump corefx 2017-06-13 16:43:10 +02:00
Alexander Köplinger 27bf99ebed [packaging] Fix path to wrapper.bat for Windows MSI 2017-06-13 16:18:21 +02:00
Vlad Brezae 2015a4ab21 Merge pull request #5002 from BrzVlad/feature-sgen-modes
[sgen] SGen modes
2017-06-13 14:14:47 +03:00
Vlad Brezae 2eb33cebf5 Merge pull request #5021 from BrzVlad/fix-parallel-fixes
[sgen] Fix parallel fixes
2017-06-13 14:07:29 +03:00
Rodrigo Kumpera ccda92d896 [profiler] Fix issue found by review. 2017-06-12 22:08:28 -07:00
Alexander Köplinger 69f8abf794 [packaging] Simplify Windows packaging scripts
We don't need to build in a separate checkout of mono anymore.
Also use .pkg passed in from upstream build.
2017-06-13 04:13:54 +02:00
Alexander Köplinger a4d6fccef9 [packaging] Move Windows MSI scripts into repository
They lived in https://github.com/mono/release before, moving them
into the main repo allows us to version them more easily.

Note: I intend to do more cleanup on those scripts in the future,
this is just the first step.
2017-06-13 04:11:39 +02:00
Vlad Brezae c98b69bc05 [man] Add entries for sgen modes and new major/minor types 2017-06-13 02:33:21 +03:00
Vlad Brezae 382a9b3679 [sgen] Add sgen modes
Group gc params configurations into general gc modes. The default mode (SGEN_MODE_NONE) is what we've been using so far, meaning old default features. The other modes can include experimental features.
2017-06-13 02:33:19 +03:00
Rodrigo Kumpera bd9b4e9b24 [profiler] Remove heapshot request polling from all over the place and depend only on the finalizer callback.
We the profiler now emiting a lot less events by default, all the existing polling no longer makes sense as they won't matter in the common path.

Instead we make sure the finalization end callback is always installed and poll from it.

This introduces the risk of a heapdump never happening or experiencing long delays because there are either too many finalizers or one of them hung.
It's an acceptable risk.
2017-06-12 16:09:56 -07:00
Marek Safar eab4b7e67b [build] Bumps mcs bootstrap requirement 2017-06-12 23:31:03 +02:00
monojenkins b9e7bcabe4 [msvc] Update csproj files (#4898) 2017-06-12 22:55:04 +02:00
Rodrigo Kumpera e6e0331cde [profiler] When using heapshot, don't collect roots when not doing a heapshot. 2017-06-12 12:45:21 -07:00
Rodrigo Kumpera 540ef7fb38 [profiler] Don't emit sync points during GC if we don't need to. 2017-06-12 11:33:11 -07:00
Rodrigo Kumpera 76e9739a43 [profiler] Don't emit thread and gc events if they are not enabled. 2017-06-12 11:33:11 -07:00
Rodrigo Kumpera e1b061052d Merge pull request #4967 from kumpera/profiler-arg-cleanup
Rework profiler argument handling.
2017-06-12 10:07:24 -07:00
Marek Safar 5f26cd5416 Bump corefx 2017-06-12 18:41:57 +02:00
Pablo Ruiz García db758b9f85 Fix OpenMappedWebConfiguration throws: System.IndexOutOfRangeException, when using RazorGenerator under mono (#5013) 2017-06-12 01:55:26 +02:00
Alexander Köplinger 1890aa6ec3 Fix System.Numerics xunit tests and add them to CI (#5006)
* Fix System.Numerics xunit tests and add them to CI

Xunit.Extensions.NetCore.dll is available as a net46 version now
so we can just use it instead of building it from our buildtools fork.
This also allows us to remove the fork from our submodules.

We were missing running the System.Numerics xunit tests in CI,
this adds them so we catch breaks like these earlier.

* Skip tests on Windows, they seem to fail there
2017-06-12 01:44:50 +02:00
Marek Safar a497e40075 [mcs] C#7 type pattern matching 2017-06-11 09:52:26 +02:00
Vladimir Kargov d8dab47fd0 [jit] Always cache the latest image set in case of a cache miss. 2017-06-09 22:52:36 -07:00
Zoltan Varga 60d58d9128 [sdb] Fix passing of nullable parameters in invokes. Fixes #57160. (#5012) 2017-06-09 23:53:39 -04:00
Vlad Brezae a5fcc9413d [sgen] Avoid using parallel minors for small nurseries
It is not effective and it can lead to regressions, due to the added synchronizations and work splitting.
2017-06-10 01:50:20 +03:00
Vlad Brezae 1d1069575d [sgen] Disable parallel mode if not enough cores 2017-06-10 01:43:04 +03:00
Vlad Brezae 57d7457da5 [sgen] Use logical cpu count for number of workers
It actually leads to better performance. The downside is the creation of more sgen workers. This is currently capped at 8.
2017-06-10 01:33:09 +03:00
Jonathan Chambers 128e454ad2 Use regular allocator rather than GC memory for SRE related types since the contained GC tracked hash tables are now themselves roots since 863ddf25bf.
Fixes crash due to MonoDynamicAssembly or MonoDynamicImage being collected under Boehm as they were unreferenced GC memory.
2017-06-09 18:21:22 -04:00
Rodrigo Kumpera 61f32e7f14 Remove the mono-profiler- prefix from all source files in the profiler subdir.
Additionally, rename arg-parsing.c to log-args.c so it's clear it's part of the log profiler.
2017-06-09 13:58:15 -07:00
Rodrigo Kumpera 74695b9d03 [profiler]Use g_warning and remove bad usage() line 2017-06-09 13:04:22 -07:00
Rodrigo Kumpera f8a969aae9 Merge pull request #4998 from kumpera/fix_56684
[corlib] Don't pass RuntimeMethodHandle across domains. Fixes #56684
2017-06-09 14:44:43 -04:00
Aleksey Kliger (λgeek) 417389513f Merge pull request #4997 from lambdageek/bug-57222
[sre] FieldBuilder:RuntimeResolve shouldn't lookup by name (Fixes #57222)
2017-06-09 13:40:28 -04:00
Marek Safar e871e6f844 Bump corefx 2017-06-09 18:48:01 +02:00
Bernhard Urban a3e6b2cd8b [marshal] allocate dummy string always in root domain
otherwise it can happen that the dummy string is allocated in a
different domain, and when it's onloaded the GC root points to an
invalid object.
2017-06-09 12:49:59 +02:00
Rodrigo Kumpera 310192e3cb Bunch of minor fixes. 2017-06-08 15:48:06 -07:00
Rodrigo Kumpera 468339deb6 Remove env var. 2017-06-08 15:46:07 -07:00
Rodrigo Kumpera 826558a4af update usage, print warning on output:-FILENAME and add a TODO. 2017-06-08 15:46:07 -07:00
Rodrigo Kumpera 334d05b1e7 Remove spurious header. Change from enum to bucket of defines. 2017-06-08 15:46:06 -07:00
Aleksey Kliger dd0eab4247 [test] Test SRE of a class with two methods with the same name.
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57222

Although methods aren't affected by this bug, I added a regression test for
this case anyway in case the implementation changes.

Currently MethodBuilder.RuntimeResolve() goes through a different codepath - it
calls RuntimeType.GetMethod (MethodInfo) which calls into an icall which looks
for a method with a matching token rather than a matching name.
2017-06-08 17:47:42 -04:00
Rodrigo Kumpera 8a1db7bb93 [corlib] Don't pass RuntimeMethodHandle across domains. Fixes #56684
We can't pass RuntimeMethodHandle across AppDomains since that can lead to memory corruption.

The way this happens is that when Domain (A) passes a method handle (M) to Domain (B), (B) will get the reflection object for
which will add that MonoMethod to the per-domain reflection hashtable. This won't cause the assembly of (M) to be registered with (B).

When (A) is unloaded, it might be the only domain referencing the assembly of (M), cause it to unload resulting in (B) having a dangling
pointer to (M) on its reflection hashtable.

The fix is to serialize enough lookup data across the wire so we can do type/method lookup using reflection on the target domain.
It might be slower, but this only happens on some remoting slowpaths anyways.

Finally, we can't simply register the assembly of (M) into domain (B) as that list (MonoDomain::domain_assemblies) is used for type loading,
thus breaking the target domain in some scenarios.
2017-06-08 14:10:38 -07:00
Aleksey Kliger 64d523c524 [sre] FieldBuilder:RuntimeResolve shouldn't lookup by name. (Fixes #57222)
RuntimeType:GetField (FieldInfo) looks up the field by name and attributes,
which doesn't work for SRE because it is legal to create multiple fields with
the same name and type and attributes.  So lookup using the
RuntimeFieldHandle (aka MonoClassField*) instead.
2017-06-08 16:13:57 -04:00
Aleksey Kliger 6b1529a15c [test] Test SRE of a class with two fields with same name
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57222
2017-06-08 16:13:56 -04:00
Aleksey Kliger (λgeek) 8a10c623f3 Merge pull request #4995 from lambdageek/dev-monodis-show-field-tokens
[monodis] Document --show-tokens and show field tokens
2017-06-08 15:54:04 -04:00
Zoltan Varga fc53acc968 [amd64] Fix a check in mono_emit_stack_alloc (). (#4985) 2017-06-08 15:47:27 -04:00
Aleksey Kliger edffe785ba [monodis] Show field tokens in --show-tokens mode 2017-06-08 12:36:32 -04:00
Aleksey Kliger 850f2df48b [monodis] Print table name (when valid) in --show-tokens mode 2017-06-08 12:36:30 -04:00
Aleksey Kliger 5e3ffa5a51 [monodis] Document --show-tokens 2017-06-08 12:36:24 -04:00
Niklas Therning 230a43461c Merge pull request #4994 from lewurm/interp-aot-mode-fix-windows
[win] set HAVE_ONLINE_VES
2017-06-08 14:48:10 +02:00
Bernhard Urban 501e77f912 [win] set HAVE_ONLINE_VES 2017-06-08 11:50:19 +02:00
Bernhard Urban fe06971e14 [interp] disable bug-45841-fpstack-exceptions.exe on CI 2017-06-08 10:23:00 +02:00
Bernhard Urban e686d39489 [interp] provide stub for icall_trampoline for x86 and ppc
keep the linker happy
2017-06-07 23:54:55 +02:00
Bernhard Urban b1000f0b2e [interp] root domain must be used for AOT'd wrappers used by interpreter 2017-06-07 23:27:44 +02:00
Bernhard Urban 1f0ad125dd [interp aot] documentation 2017-06-07 23:27:44 +02:00
Bernhard Urban d87817c174 [marshal] some things are required in the interpreter despite DISABLE_JIT 2017-06-07 23:27:44 +02:00
Bernhard Urban 51125153e5 [configure] introduce HAVE_ONLINE_VES 2017-06-07 23:27:44 +02:00
Bernhard Urban d4f922abce [interp] fix when DISABLE_JIT is set 2017-06-07 23:27:44 +02:00
Bernhard Urban 7ca4c72cc8 [interp] add InterpMethodArguments struct to offset-tool 2017-06-07 23:27:44 +02:00
Bernhard Urban 2e78636ac7 [interp] add MONO_AOT_MODE_INTERP 2017-06-07 23:27:44 +02:00
Bernhard Urban 0ddf58fe64 [interp] add --aot=interp, so we can run mono --full-aot --interpreter 2017-06-07 23:27:44 +02:00
vkargov 6baf669349 [tests] Re-enable bug-45841-fpstack-exceptions.exe (#4927)
* [tests] Re-enable bug-45841-fpstack-exceptions.exe

* [tests] Pass correct parameters in bug-45841.
2017-06-07 17:02:21 -04:00
Marek Safar 522d027663 [mcs] Better detection of null operator inside conditional expression. Fixes #57232 2017-06-07 18:01:00 +02:00
Martin Baulig dc58d950f2 Cosmetic; remove [Category ("Martin")] from the test. 2017-06-07 11:54:25 -04:00
Martin Baulig 83f74c4123 [System]: Fix possible initialization issue in MonoTlsProviderFactory. (#4987)
* [Mono.Security]: Add test for MonoTlsProviderFactory.GetProvider ().

* [System]: Fix possible initialization issue in MonoTlsProviderFactory.
2017-06-07 11:46:21 -04:00
Martin Baulig fff41905e9 [System]: Actually disable the keychain code and SecItemImport() on XI. (#4983) 2017-06-07 11:27:05 -04:00
Marek Safar 44a2d35676 [mcs] C#7 out variable declaration 2017-06-07 14:14:18 +02:00
Alexander Köplinger 1d6a8ed6ea [MacSDK] Bump libgdiplus to latest (#4984)
We were using a very old commit of libgdiplus. This brings in
the latest changes.
2017-06-07 14:08:27 +02:00
Bernhard Urban 4ede66b950 [interp] factor out everything that allocates a MonoLMFExt on the stack in order to reduce stack pressure in the main interpreter loop 2017-06-07 12:22:05 +02:00
Bernhard Urban 2b84f5bc33 [interp] factor out MINT_JIT_CALL instruction from interpreter switch in order to reduce stack pressure 2017-06-07 12:22:05 +02:00
Vlad Brezae 42311595ae [sgen] Make sure workers process jobs only if they are running (#4974)
This simplifies logic and prevents serial context being used by multiple workers at the same time.
2017-06-07 12:58:54 +03:00
Frederik Carlier 0526617e0a System.Drawing: Start consuming sources from corefx
Closes https://github.com/mono/mono/pull/4980
2017-06-06 23:46:01 +02:00
Alexander Köplinger 9b63661c15 [MacSDK] Update version number in msbuild.py 2017-06-06 23:01:50 +02:00
Bernhard Urban a46742dcb6 [mini] set MONO_ARCH_HAVE_INIT_LMF_EXT on architectures that implement mono_arch_init_lmf_ext
it worked before, because we relied on implicit linking
2017-06-06 20:00:58 +02:00
Bernhard Urban a4f960311e [mini] guard mono_arch_init_lmf_ext prototype properly 2017-06-06 19:15:44 +02:00
Bernhard Urban c64f332016 [arm] don't set MONO_ARCH_SOFT_DEBUG_SUPPORTED on android cross compiling
follow up fix for https://github.com/mono/mono/pull/4956

this breaks the cross compiler on windows for android:

```
  [9:07:36]                       /bin/sh ../../libtool  --tag=CC   --mode=compile /Users/builder/android-toolchain/mxe/bin/i686-w64-mingw32.static-gcc -DHAVE_CONFIG_H -I. -I/U  sers/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini -I../..   -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -  DWIN32_THREADS -DFD_SETSIZE=1024 -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno  -cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Wno-format-zero-length -D__ARM_EABI__ -DARM_FPU_VFP=1 -DNO_UNALIGNED_ACCESS -I/User  s/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono -I/Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/eglib/src -I../../eglib  /src -I/Users/builder/data/lanes/5000/ff452183/source/xamarin-android/build-tools/mono-runtimes/obj/Release//llvm/installed-win32/usr/include -DNDEBUG -D__NO_CTYPE_INLINE -D_  GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DLLVM_API_VERSION=4 -O -I../arch/arm -fvisibility=hidden -DXAMARIN_PRODUCT_VERSION=0 -static   -static-libgcc -std=gnu99 -fno-strict-aliasing -fwrapv -DMONO_DLL_EXPORT -Wno-unused-but-set-variable -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-  prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Wno-format-ze  ro-length -mno-tls-direct-seg-refs -Werror-implicit-function-declaration -MT libmini_la-mini-arm-gsharedvt.lo -MD -MP -MF .deps/libmini_la-mini-arm-gsharedvt.Tpo -c -o libmin  i_la-mini-arm-gsharedvt.lo `test -f 'mini-arm-gsharedvt.c' || echo '/Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/'`mini-arm-gsharedv  t.c
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c: In function 'mono_arch_is_single_step_event  ':
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7242:2: error: unknown type name 'siginfo_t'
  [9:07:36]                         siginfo_t *sinfo = info;
  [9:07:36]                         ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7248:11: error: request for member 'si_addr'   in something not a structure or union
  [9:07:36]                         if (sinfo->si_addr >= ss_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)ss_trigger_page + 128)
  [9:07:36]                                  ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7248:57: error: request for member 'si_addr'   in something not a structure or union
  [9:07:36]                         if (sinfo->si_addr >= ss_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)ss_trigger_page + 128)
  [9:07:36]                                                                                ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c: In function 'mono_arch_is_breakpoint_event'  :
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7262:2: error: unknown type name 'siginfo_t'
  [9:07:36]                         siginfo_t *sinfo = info;
  [9:07:36]                         ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7267:11: error: request for member 'si_signo  ' in something not a structure or union
  [9:07:36]                         if (sinfo->si_signo == DBG_SIGNAL) {
  [9:07:36]                                  ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7269:12: error: request for member 'si_addr'   in something not a structure or union
  [9:07:36]                          if (sinfo->si_addr >= bp_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)bp_trigger_page + 128)
  [9:07:36]                                   ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7269:58: error: request for member 'si_addr'   in something not a structure or union
  [9:07:36]                          if (sinfo->si_addr >= bp_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)bp_trigger_page + 128)
```
2017-06-06 19:15:44 +02:00
Alexander Köplinger 6320fcb16b Bump API snapshot 2017-06-06 18:36:50 +02:00
Martin Baulig 21d5c9c346 [System]: Correctly implement close and shutdown in SslStream. (#4969)
* [System]: Correctly implement close and shutdown in SslStream.

* Cleanup.

* Cosmetic.

* More ReferenceSources/SR2.cs into common.sources to make it build.
2017-06-06 11:46:29 -04:00
Marek Habersack d0b0e2b880 Use correct path separator for satellite assemblies in cross builds (#4976)
When creating a bundle on Windows to run on Android, macOS/iOS or Linux we need
to use the target system's path separator when storing satellite assemblies in
the bundle instead of the host system's one. Failing to do so will embed (on
Windows) the satellite assemblies with paths like

   fr_FR\myassembly.resources.dll

while at runtime Mono will try to look up the assembly by

   fr_FR/myassembly.resources.dll

and fail to find it, obviously. The `--style` parameter is now consulted to see
what path separator character should be used.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55603
2017-06-06 16:06:00 +02:00
Marek Safar ff0a6e77ff Bump corefx 2017-06-06 16:02:31 +02:00
Alexander Köplinger e2340cd101 [man] Remove mention of MONO_AOT_CACHE from mono.1
The env var was removed a long time ago in b8766a812d
and was replaced by options to --aot. This came up in Gitter today.
2017-06-06 15:43:02 +02:00
ralovich bfa744e645 implement Image.SetPropertyItem() method v4 (#1167)
This is thought to be fixing https://bugzilla.novell.com/show_bug.cgi?id=406307.

v4: state that my changes are licensed under MIT X11 license
2017-06-05 19:43:41 -04:00
Ludovic Henry 9c412c0b91 [w32handle] Fix deadlock on SignalAndWait (#4973)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57069
2017-06-05 18:07:40 -04:00
Aleksey Kliger (λgeek) 11ec98cacd Merge pull request #4962 from lambdageek/dev-handles-sockets
[w32socket] Use coop handles for many Socket icalls
2017-06-05 17:50:30 -04:00
Aleksey Kliger 23058b943f [w32socket] Use coop handles for System.Net.Sockets.Socket.cancel_blocking_socket_operation 2017-06-05 15:01:47 -04:00
Aleksey Kliger 65b981632c [coop handles] Add mono_internal_thread_handle_ptr () function
MonoInternalThreadHandle is not really needed - all MonoInternalThread
instances are supposed to be pinned.  But for uniformity, the icall marshaller
makes handles anyway.  This function lets us get back to a raw ptr.
2017-06-05 15:01:47 -04:00
Aleksey Kliger 6544bcfda8 [runtime] typedef MonoThread MonoThreadObject
MonoThreadHandle is already taken.  So define MonoThreadObject as an alias for
MonoThread and then make MonoThreadObjectHandle the coop handle type.
2017-06-05 15:01:47 -04:00
Aleksey Kliger 2251178eac [w32socket] Use coop handles for icalls in System.Net.Sockets.Socket
- Use coop handles for create_object_from_sockaddr

  Eventually want to rewrite its callers to use
  create_object_handle_from_sockaddr directly.

- Use coop handles for

  - LocalEndPoint_internal

  - RemoteEndPoint_internal

- inside create_sockaddr_from_object

  Eventually callers should be updated to use create_sockaddr_form_handle
  directly.

- Use coop handles for

  - ReceiveFrom_internal

  - Bind_internal

  - Connect_internal

  - SendTo_internal

- Remove dead code (create_object_from_sockaddr, create_sockaddr_from_object)

- Use coop handles for

  - Receive_internal WSABUF[]

  - Receive_internal byte[]

  - Send_internal

  - Send_array_internal

  - SetSocketOption_internal

  - GetSocketOption_arr_internal

  - GetSocketOption_obj_internal

  - IOControl_internal

  - SendFile_internal

- Remove more dead code

- Use coop handles for

  - Socket_internal

  - Select_internal

- Trivial coop handles conversion for several icalls in System.Net.Sockets.Socket

  None of these functions use managed objects, so just add a MonoError* argument.
2017-06-05 15:01:47 -04:00
Aleksey Kliger 7daf4b739e [coop handles] Define MonoSafeHandleHandle
Used to access System.Net.Sockets.SafeSocketHandle from native code
2017-06-05 15:01:46 -04:00
Aleksey Kliger bd9fa57b81 [coop handles] Macros to access a handle via a MonoClassField 2017-06-05 15:01:46 -04:00
Aleksey Kliger 68bff52cae [marshal] Wrap byref reference args to icalls in coop handles correctly.
Previously we only had "out" reference args working - they get a handle that's
initialized to NULL on entry and then writes back to the out arg on icall
return.

For "ref" reference args, do the same thing but initialize to the initial
argument value.
2017-06-05 15:01:46 -04:00
Marek Safar 8873c44400 [mcs] Remove unwanted tests 2017-06-05 20:56:09 +02:00
Ludovic Henry b603482343 Bump to 5.5 for master branch 2017-06-05 11:29:28 -04:00
Rodrigo Kumpera 5ea6b70ca1 [profiler] Another atempt at fixing linux. 2017-06-04 10:01:52 -07:00
Rodrigo Kumpera 8716b46c87 [profiler] Fix linux. 2017-06-02 09:24:39 -07:00
Rodrigo Kumpera b64dd253b6 [profile] Update test suite. 2017-06-01 18:41:27 -07:00
Rodrigo Kumpera 75343422a5 [profiler] Move argument parsing to arg-parsing.c and significantly rework argument parsing.
This removes all [no]foo weirdness and flag dancing in favor a simpler model.

Users can enable/disable both events and profiling modes. We expose pretty much all individual events.

A profiling feature is a group of flags that enable a specific profiling scenario.
	Right now we have code coverage, perf sampling, gc alloc and heap dump as features.

All events can be prefixed with 'no' and cause them to be disabled. We'll later introduce some sanity
checking around misconfiguration.

Finally, this changes the default set of enabled events to threads and gc. Everything else must be added on top.
Experience has shown that the vast majority of those events are just noise when profiling and the current configuration
design made it quite awkward to introduce quieter modes.
2017-06-01 18:41:13 -07:00
671 changed files with 17154 additions and 23195 deletions

No files matched your search

-3
View File
@@ -26,9 +26,6 @@
[submodule "external/nuget-buildtasks"]
path = external/nuget-buildtasks
url = git://github.com/mono/NuGet.BuildTasks
[submodule "external/buildtools"]
path = external/buildtools
url = git://github.com/mono/buildtools.git
[submodule "external/cecil-legacy"]
path = external/cecil-legacy
url = git://github.com/mono/cecil.git
+32 -4
View File
@@ -44,6 +44,26 @@ namespace Mono.Profiling.Tests.Stress {
static class Program {
static readonly string[] _options = new [] {
"domain",
"assembly",
"module",
"class",
"jit",
"exception",
"gcalloc",
"gc",
"thread",
// "calls", // Way too heavy.
"monitor",
"gcmove",
"gcroot",
"context",
"finalization",
"counter",
"gchandle",
};
static readonly TimeSpan _timeout = TimeSpan.FromHours (6);
static string FilterInvalidXmlChars (string text) {
@@ -75,14 +95,22 @@ namespace Mono.Profiling.Tests.Stress {
for (var i = 0; i < benchmarks.Length; i++) {
var bench = benchmarks [i];
var sampleFreq = rand.Next (0, 1001);
var sampleFreq = rand.Next (-1000, 1001);
var sampleMode = rand.Next (0, 2) == 1 ? "real" : "process";
var maxSamples = rand.Next (0, cpus * 2000 + 1);
var heapShotFreq = rand.Next (0, 11);
var heapShotFreq = rand.Next (-10, 11);
var maxFrames = rand.Next (0, 33);
var allocMode = rand.Next (0, 2) == 1 ? "alloc" : "noalloc";
var options = _options.ToDictionary (x => x, _ => rand.Next (0, 2) == 1)
.Select (x => (x.Value ? string.Empty : "no") + x.Key)
.ToArray ();
var profOptions = $"sample=cycles/{sampleFreq},sampling-{sampleMode},maxsamples={maxSamples},heapshot={heapShotFreq}gc,maxframes={maxFrames},{allocMode},output=/dev/null";
var profOptions = $"maxframes={maxFrames},{string.Join (",", options)},output=/dev/null";
if (sampleFreq > 0)
profOptions += $",sample={sampleFreq},sampling-{sampleMode},maxsamples={maxSamples}";
if (heapShotFreq > 0)
profOptions += $",heapshot={heapShotFreq}gc";
var info = new ProcessStartInfo {
UseShellExecute = false,
+29 -7
View File
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
AC_INIT(mono, [5.3.0],
AC_INIT(mono, [5.5.0],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README.md])
@@ -812,7 +812,8 @@ AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you w
AC_ARG_WITH(testing_aot_hybrid, [ --with-testing_aot_hybrid=yes,no If you want to build the testing_aot_hybrid assemblies (defaults to no)], [], [with_testing_aot_hybrid=default])
AC_ARG_WITH(testing_aot_full, [ --with-testing_aot_full=yes,no If you want to build the testing_aot_full assemblies (defaults to no)], [], [with_testing_aot_full=default])
AC_ARG_WITH(winaot, [ --with-winaot=yes,no If you want to build the Windows friendly AOT assemblies (defaults to no)], [], [with_winaot=default])
AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default])
AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default])
AC_ARG_WITH(unreal, [ --with-unreal=yes,no If you want to build the Unreal assemblies (defaults to no)], [], [with_unreal=default])
AC_ARG_WITH(runtime_preset, [ --with-runtime_preset=net_4_x,all,aot,hybridaot,fullaot,bitcode Which default profile to build (defaults to net_4_x)], [], [with_runtime_preset=net_4_x])
@@ -833,6 +834,7 @@ with_testing_aot_hybrid_default=no
with_testing_aot_full_default=no
with_winaot_default=no
with_orbis_default=no
with_unreal_default=no
with_bitcode_default=no
with_cooperative_gc_default=no
@@ -852,6 +854,7 @@ elif test x$with_runtime_preset = xall; then
with_xammac_default=yes
with_winaot_default=yes
with_orbis_default=yes
with_unreal_default=yes
elif test x$with_runtime_preset = xfullaot; then
DISABLE_MCS_DOCS_default=yes
with_testing_aot_full_default=yes
@@ -922,6 +925,17 @@ elif test x$with_runtime_preset = xorbis; then
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
elif test x$with_runtime_preset = xunreal; then
DISABLE_MCS_DOCS_default=yes
with_unreal_default=yes
TEST_PROFILE=ounreal
mono_feature_disable_com='yes'
mono_feature_disable_remoting='yes'
mono_feature_disable_appdomains='yes'
AOT_BUILD_FLAGS="--runtime=mobile --aot=hybrid,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot"
else
with_profile4_x_default=yes
fi
@@ -968,6 +982,9 @@ fi
if test "x$with_orbis" = "xdefault"; then
with_orbis=$with_orbis_default
fi
if test "x$with_unreal" = "xdefault"; then
with_unreal=$with_unreal_default
fi
AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = "xyes"])
@@ -981,8 +998,9 @@ AM_CONDITIONAL(INSTALL_TESTING_AOT_HYBRID, [test "x$with_testing_aot_hybrid" !=
AM_CONDITIONAL(INSTALL_TESTING_AOT_FULL, [test "x$with_testing_aot_full" != "xno"])
AM_CONDITIONAL(INSTALL_WINAOT, [test "x$with_winaot" != "xno"])
AM_CONDITIONAL(INSTALL_ORBIS, [test "x$with_orbis" != "xno"])
AM_CONDITIONAL(INSTALL_UNREAL, [test "x$with_unreal" != "xno"])
AM_CONDITIONAL(FULL_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full"] || [test "x$TEST_PROFILE" = "xwinaot"] || [test "x$TEST_PROFILE" = "xorbis"])
AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"])
AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"] || [test "x$TEST_PROFILE" = "xunreal"])
default_profile=net_4_x
if test -z "$INSTALL_MONODROID_TRUE"; then :
@@ -1006,6 +1024,9 @@ fi
if test -z "$INSTALL_ORBIS_TRUE"; then :
default_profile=orbis
fi
if test -z "$INSTALL_UNREAL_TRUE"; then :
default_profile=unreal
fi
if test -z "$INSTALL_4_x_TRUE"; then :
default_profile=net_4_x
fi
@@ -1262,7 +1283,7 @@ dnl
dnl Boehm GC configuration
dnl
AC_ARG_WITH(libgc, [ --with-libgc=included,none Controls the Boehm GC config, default=included],[libgc=$with_gc],[libgc=included])
AC_ARG_WITH(libgc, [ --with-libgc=included,none Controls the Boehm GC config, default=included],[libgc=$with_libgc],[libgc=included])
AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
@@ -1320,7 +1341,7 @@ if test "x$support_boehm" = "xyes"; then
gc_msg="none"
;;
*)
AC_MSG_ERROR([Invalid argument to --with-libgc.])
AC_MSG_ERROR([Invalid argument $libgc to --with-libgc.])
;;
esac
@@ -1336,6 +1357,7 @@ if test "x$support_boehm" = "xyes"; then
AC_SUBST(BOEHM_DEFINES)
fi
AM_CONDITIONAL(SUPPORT_NULLGC, test "x$libgc" = "xnone")
dnl
dnl End of Boehm GC Configuration
@@ -1934,7 +1956,7 @@ if test x$host_win32 = xno; then
AC_CHECK_HEADERS(pthread.h)
AC_CHECK_HEADERS(pthread_np.h)
AC_CHECK_FUNCS(pthread_mutex_timedlock)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_setname_np)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_setname_np pthread_cond_timedwait_relative_np)
AC_CHECK_FUNCS(pthread_kill)
AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
AC_TRY_COMPILE([ #include <pthread.h>], [
@@ -3534,7 +3556,6 @@ fi
AM_CONDITIONAL(ENABLE_INTERPRETER, [test x$enable_interpreter = xyes])
dnl
dnl Simple Generational checks (sgen)
dnl
@@ -4557,6 +4578,7 @@ echo "
Xamarin.Mac: $with_xammac
Windows AOT: $with_winaot
Orbis: $with_orbis
Unreal: $with_unreal
Test profiles: AOT Full ($with_testing_aot_full), AOT Hybrid ($with_testing_aot_hybrid)
JNI support: $jdk_headers_found
libgdiplus: $libgdiplus_msg
+1 -1
View File
@@ -141,7 +141,7 @@ AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf strerror_r)
AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(fork execv execve)
+1
View File
@@ -14,6 +14,7 @@
#endif
#include <stdint.h>
#include <inttypes.h>
#include <eglib-config.h>
#ifndef EGLIB_NO_REMAP
+69 -1
View File
@@ -32,6 +32,12 @@
#include <ctype.h>
#include <glib.h>
#ifndef G_OS_WIN32
#include <pthread.h>
#endif
#include <errno.h>
/*
* g_strndup and g_vasprintf need to allocate memory with g_malloc if
* ENABLE_OVERRIDABLE_ALLOCATORS is defined so that it can be safely freed with g_free
@@ -191,10 +197,72 @@ g_strdup_printf (const gchar *format, ...)
return ret;
}
/*
Max error number we support. It's empirically found by looking at our target OS.
Last this was checked was June-2017.
Apple is at 106.
Android is at 133.
*/
#define MONO_ERRNO_MAX 200
#define str(s) #s
#ifndef G_OS_WIN32
static pthread_mutex_t strerror_lock = PTHREAD_MUTEX_INITIALIZER;
#endif
static char *error_messages [MONO_ERRNO_MAX];
const gchar *
g_strerror (gint errnum)
{
return strerror (errnum);
if (errnum < 0)
errnum = -errnum;
if (errnum >= MONO_ERRNO_MAX)
return ("Error number higher than " str (MONO_ERRNO_MAX));
if (!error_messages [errnum]) {
#ifndef G_OS_WIN32
pthread_mutex_lock (&strerror_lock);
#endif
#ifdef HAVE_STRERROR_R
char tmp_buff [128]; //Quite arbitrary, should be large enough
char *buff = tmp_buff;
int buff_len = sizeof (tmp_buff);
int r;
buff [0] = 0;
while ((r = strerror_r (errnum, buff, buff_len - 1))) {
if (r != ERANGE) {
buff = g_strdup_printf ("Invalid Error code '%d'", errnum);
break;
}
if (buff == tmp_buff)
buff = g_malloc (buff_len * 2);
else
buff = g_realloc (buff, buff_len * 2);
buff_len *= 2;
//Spec is not clean on whether size argument includes space for null terminator or not
}
if (!error_messages [errnum])
error_messages [errnum] = g_strdup (buff);
if (buff != tmp_buff)
g_free (buff);
#else
if (!error_messages [errnum])
error_messages [errnum] = g_strdup_printf ("Error code '%d'", errnum);
#endif
#ifndef G_OS_WIN32
pthread_mutex_unlock (&strerror_lock);
#endif
}
return error_messages [errnum];
}
gchar *
Submodule external/buildtools deleted from b5cc6e6ab5.
+1 -1
+1 -1
+29 -13
View File
@@ -181,6 +181,16 @@ Gives the path for the temporary LLVM bitcode file created during AOT.
.I info
Print the architecture the AOT in this copy of Mono targets and quit.
.TP
.I interp
Generates all required wrappers, so that it is possible to run --interpreter without
any code generation at runtime. This option only makes sense with \fBmscorlib.dll\fR.
Embedders can set
.nf
mono_jit_set_aot_mode (MONO_AOT_MODE_INTERP);
.fi
.ne
.TP
.I ld-flags
Additional flags to pass to the C linker (if the current AOT mode calls for invoking it).
.TP
@@ -290,7 +300,7 @@ mono_aot_register_module (mono_aot_module_hello_info);
.I stats
Print various stats collected during AOT compilation.
.TP
.I temp_path=[path]
.I temp-path=[path]
Explicitly specify path to store temporary files created during AOT compilation.
.TP
.I threads=[number]
@@ -1091,11 +1101,6 @@ code generation backend. For example \fBLLVM_COUNT=10\fR would only
compile 10 methods with LLVM and then switch to the Mono JIT engine.
\fBLLVM_COUNT=0\fR would disable the LLVM engine altogether.
.TP
\fBMONO_AOT_CACHE\fR
If set, this variable will instruct Mono to ahead-of-time compile new
assemblies on demand and store the result into a cache in
~/.mono/aot-cache.
.TP
\fBMONO_ASPNET_INHIBIT_SETTINGSMAP\fR
Mono contains a feature which allows modifying settings in the .config files shipped
with Mono by using config section mappers. The mappers and the mapping rules are
@@ -1304,10 +1309,19 @@ first generation (of two). A larger nursery will usually speed up the
program but will obviously use more memory. The default nursery size
4 MB.
.TP
\fBmajor=\fIcollector\fR Specifies which major collector to use.
Options are `marksweep' for the Mark&Sweep collector, and
`marksweep-conc' for concurrent Mark&Sweep. The non-concurrent
Mark&Sweep collector is the default.
\fBmajor=\fIcollector\fR
Specifies which major collector to use.
Options are `marksweep' for the Mark&Sweep collector, `marksweep-conc'
for concurrent Mark&Sweep and `marksweep-conc-par' for parallel and
concurrent Mark&Sweep. The concurrent Mark&Sweep collector is the default.
.TP
\fBmode=balanced|throughput|pause\fR[:\fImax-pause\fR]
Specifies what should be the garbage collector's target. The `throughput'
mode aims to reduce time spent in the garbage collector and improve
application speed, the `pause' mode aims to keep pause times to a minimum
and it receives the argument \fImax-pause\fR which specifies the maximum
pause time in milliseconds that is acceptable and the `balanced' mode
which is a general purpose optimal mode.
.TP
\fBsoft-heap-limit=\fIsize\fR
Once the heap size gets larger than this size, ignore what the default
@@ -1370,9 +1384,11 @@ more memory when it reaches a stable size.
This option is EXPERIMENTAL, so it might disappear in later versions of mono.
.TP
\fBminor=\fIminor-collector\fR
Specifies which minor collector to use. Options are 'simple' which
promotes all objects from the nursery directly to the old generation
and 'split' which lets object stay longer on the nursery before promoting.
Specifies which minor collector to use. Options are `simple' which
promotes all objects from the nursery directly to the old generation,
`simple-par' which has same promotion behavior as `simple' but using
multiple workers and `split' which lets objects stay longer on the nursery
before promoting.
.TP
\fBalloc-ratio=\fIratio\fR
Specifies the ratio of memory from the nursery to be use by the alloc space.
+3 -1
View File
@@ -23,6 +23,7 @@ xbuild_12_SUBDIRS := build class tools/xbuild
xbuild_14_SUBDIRS := build class tools/xbuild
winaot_SUBDIRS := build class
orbis_SUBDIRS := build class
unreal_SUBDIRS := build class
include build/rules.make
@@ -77,6 +78,7 @@ $(_boot_:%=profile-do--testing_aot_hybrid--%): profile-do--testing_aot_hy
$(_boot_:%=profile-do--testing_aot_full--%): profile-do--testing_aot_full--%: profile-do--build--%
$(_boot_:%=profile-do--winaot--%): profile-do--winaot--%: profile-do--build--%
$(_boot_:%=profile-do--orbis--%): profile-do--orbis--%: profile-do--build--%
$(_boot_:%=profile-do--unreal--%): profile-do--unreal--%: profile-do--build--%
$(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--%
testcorlib:
@@ -142,7 +144,7 @@ distcheck: dist-tarball
MONO_API_SNAPSHOT_PATH := $(topdir)../external/api-snapshot/
GENAPI := $(MONO_API_SNAPSHOT_PATH)tools/genapi/GenAPI.exe
MONO_API_SNAPSHOT_PROFILE_PATH := $(MONO_API_SNAPSHOT_PATH)profiles/$(PROFILE)/
MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, Mono.CSharp.dll SystemWebTestShim.dll standalone-runner-support.dll nunit.core.dll nunit.core.extensions.dll nunit.core.interfaces.dll nunit.framework.dll nunit.framework.extensions.dll nunit.mocks.dll nunit.util.dll nunit-console-runner.dll nunitlite.dll)
MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, Mono.CSharp.dll SystemWebTestShim.dll standalone-runner-support.dll nunit.core.dll nunit.core.extensions.dll nunit.core.interfaces.dll nunit.framework.dll nunit.framework.extensions.dll nunit.mocks.dll nunit.util.dll nunit-console-runner.dll nunitlite.dll Mono.Profiler.Log.dll)
MONO_API_ASSEMBLIES := $(filter-out $(MONO_API_ASSEMBLIES_IGNORED), $(wildcard $(topdir)class/lib/$(PROFILE)/*.dll)) $(wildcard $(topdir)class/lib/$(PROFILE)/Facades/*.dll)
MONO_API_ASSEMBLIES_CS := $(MONO_API_ASSEMBLIES:$(topdir)class/lib/$(PROFILE)/%.dll=$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs)
+8 -1
View File
@@ -40,7 +40,14 @@ class X {
if (!Version.TryParse (field.GetValue (null) as string, out version))
return 4;
if (version < new Version (4, 9))
Version min_mono_version;
#if __MonoCS__
min_mono_version = new Version (5, 4);
#else
min_mono_version = new Version (4, 9);
#endif
if (version < min_mono_version)
return 5;
return 0;
+33
View File
@@ -0,0 +1,33 @@
#! -*- makefile -*-
BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
profile-check:
@:
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
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 \
-d:MONO \
-nowarn:1699 \
-nostdlib \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_INSTALL = yes
MOBILE_DYNAMIC = yes
MOBILE_PROFILE = yes
NO_CONSOLE = yes
+5 -7
View File
@@ -20,9 +20,10 @@ TEST_RUNTIME_WRAPPERS_PATH = $(shell dirname $(RUNTIME))/_tmpinst/bin
ifndef NO_TEST
test_nunit_lib = nunitlite.dll
xunit_core := xunit.core xunit.abstractions xunit.assert
xunit_core := xunit.core xunit.abstractions xunit.assert Xunit.NetCore.Extensions
xunit_deps := System.Runtime
xunit_class_deps := Xunit.NetCore.Extensions
xunit_src := $(patsubst %,$(topdir)/../external/xunit-binaries/%,BenchmarkAttribute.cs BenchmarkDiscover.cs)
xunit_class_deps :=
xunit_libs_ref = $(patsubst %,-r:$(topdir)/../external/xunit-binaries/%.dll,$(xunit_core))
xunit_libs_ref += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/Facades/%.dll,$(xunit_deps))
@@ -89,9 +90,6 @@ endif
tests_CLEAN_FILES += $(topdir)/build/deps/nunit-$(PROFILE).stamp
$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)Xunit.NetCore.Extensions.dll:
$(MAKE) -C $(topdir)/class/Xunit.NetCore.Extensions
endif
test_assemblies :=
@@ -222,8 +220,8 @@ run-xunit-test-lib: xunit-test-local
$$ok
@rm -f xunit.execution.desktop.dll
$(xunit_test_lib): $(the_assembly) $(xtest_response) $(xunit_libs_dep)
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response)
$(xunit_test_lib): $(the_assembly) $(xtest_response) $(xunit_libs_dep) $(xunit_src)
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response) $(xunit_src)
xtest_response_preprocessed = $(xtest_response)_preprocessed
+1 -1
View File
@@ -27,7 +27,7 @@
static Read() method of RelaxngPattern class:
RelaxngPattern pattern = RelaxngPattern.Read (
new XmlTextReader ("relaxng.rng");
new XmlTextReader ("relaxng.rng"));
You can also use RelaxngPattern class to reuse grammar instance, as
already described (see Grammar Object Model).
@@ -23,7 +23,7 @@ EMBEDDED_DRAWING_DEP := $(filter xammac_net_4_5 testing_aot_full testing_aot_hyb
ifndef EMBEDDED_DRAWING_DEP
# profiles which build a System.Drawing.dll in the repo
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE))
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal, $(PROFILE))
ifdef REPO_DRAWING_DEP
LIB_REFS += System.Drawing
@@ -8,7 +8,7 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{71D02788-3AD8-4C43-BDEB-1A3D277496BA}</ProjectGuid>
<OutputType>Library</OutputType>
<NoWarn>1699,1616,1699</NoWarn>
<NoWarn>1699,1616,1699,436</NoWarn>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
@@ -36,7 +36,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<NoWarn>1699,1616,1699,436</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
@@ -44,7 +44,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<NoWarn>1699,1616,1699,436</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
+1 -1
View File
@@ -29,7 +29,7 @@ LIB_REFS += System.Web
endif
# profiles which build a System.Drawing.dll in the repo
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE))
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal, $(PROFILE))
ifdef REPO_DRAWING_DEP
LIB_REFS += System.Drawing
+3
View File
@@ -83,6 +83,9 @@ winaot_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
orbis_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
orbis_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
unreal_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
unreal_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
mobile_only_SUBDIRS = System.Net.Ping System.Runtime.Serialization.Formatters System.Security.Cryptography.Csp System.Security.Cryptography.Pkcs \
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy
+8 -1
View File
@@ -130,6 +130,11 @@ winaot_dirs := \
System.Drawing \
$(pcl_facade_dirs)
unreal_dirs := \
$(mobile_common_dirs) \
System.Drawing \
$(pcl_facade_dirs)
xammac_4_5_dirs := \
corlib \
Mono.Security \
@@ -315,6 +320,7 @@ net_4_x_parallel_dirs := \
System.Workflow.ComponentModel \
System.Workflow.Runtime \
System.Reflection.Context \
Mono.Profiler.Log \
legacy/Mono.Cecil \
$(pcl_facade_dirs)
@@ -352,10 +358,11 @@ xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
winaot_SUBDIRS := $(winaot_dirs)
orbis_SUBDIRS := $(orbis_dirs)
unreal_SUBDIRS := $(unreal_dirs)
include ../build/rules.make
SUBDIRS = $(testing_aot_full_dirs) $(testing_aot_hybrid_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS)
SUBDIRS = $(testing_aot_full_dirs) $(testing_aot_hybrid_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS) $(unreal_dirs)
DIST_ONLY_SUBDIRS = dlr aot-compiler reference-assemblies $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
@@ -150,18 +150,18 @@ namespace MonoTests.Microsoft.Build.Execution
var bm = new BuildManager ();
bm.BeginBuild (new BuildParameters () { Loggers = new ILogger [] {new ConsoleLogger (LoggerVerbosity.Diagnostic, TextWriter.Null.WriteLine, null, null)} });
DateTime waitDone = DateTime.MinValue;
DateTime beforeExec = DateTime.Now;
DateTime beforeExec = DateTime.UtcNow;
var l = new List<BuildSubmission> ();
for (int i = 0; i < 10; i++) {
var sub = bm.PendBuildRequest (new BuildRequestData (proj, new string [] { "Wait1Sec" }));
l.Add (sub);
sub.ExecuteAsync (delegate { waitDone = DateTime.Now; }, null);
sub.ExecuteAsync (delegate { waitDone = DateTime.UtcNow; }, null);
}
bm.EndBuild ();
Assert.IsTrue (l.All (s => s.BuildResult.OverallResult == BuildResultCode.Success), "#1");
DateTime endBuildDone = DateTime.Now;
Assert.IsTrue (endBuildDone - beforeExec >= TimeSpan.FromSeconds (1), "#2");
Assert.IsTrue (endBuildDone > waitDone, "#3");
DateTime endBuildDone = DateTime.UtcNow;
AssertHelper.GreaterOrEqual (endBuildDone - beforeExec, TimeSpan.FromSeconds (1), "#2");
AssertHelper.Greater (endBuildDone, waitDone, "#3");
}
[Test]
@@ -101,15 +101,15 @@ namespace MonoTests.Microsoft.Build.Execution
var bm = new BuildManager ();
bm.BeginBuild (new BuildParameters ());
DateTime waitDone = DateTime.MinValue;
DateTime beforeExec = DateTime.Now;
DateTime beforeExec = DateTime.UtcNow;
var sub = bm.PendBuildRequest (new BuildRequestData (proj, new string [] { "Wait1Sec" }));
sub.ExecuteAsync (delegate { waitDone = DateTime.Now; }, null);
sub.ExecuteAsync (delegate { waitDone = DateTime.UtcNow; }, null);
bm.EndBuild ();
Assert.IsTrue (sub.BuildResult.OverallResult == BuildResultCode.Success, "#1");
DateTime endBuildDone = DateTime.Now;
Assert.IsTrue (endBuildDone - beforeExec >= TimeSpan.FromSeconds (1), "#2");
Assert.IsTrue (waitDone >= beforeExec, "#3");
Assert.IsTrue (endBuildDone >= waitDone, "#4");
Assert.AreEqual (BuildResultCode.Success, sub.BuildResult.OverallResult, "#1");
DateTime endBuildDone = DateTime.UtcNow;
AssertHelper.GreaterOrEqual (endBuildDone - beforeExec, TimeSpan.FromSeconds (1), "#2");
AssertHelper.GreaterOrEqual (waitDone, beforeExec, "#3");
AssertHelper.GreaterOrEqual (endBuildDone, waitDone, "#4");
}
[Test]
@@ -106,9 +106,6 @@
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\COperators.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\AggregateDeclaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\Declaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\GlobalAttributeDeclaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\NamespaceDeclaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionKind.cs" />
@@ -139,7 +136,6 @@
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\EventSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\FieldSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\IndexerSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\LabelSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\LocalVariableSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodOrPropertySymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodSymbol.cs" />
@@ -157,13 +153,11 @@
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolTable.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactoryBase.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\TransparentIdentifierMemberSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\TypeParameterSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\UnresolvedAggregateSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\VariableSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayIndex.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayInitialization.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayLength.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Assignment.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\BinaryOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Block.cs" />
@@ -173,7 +167,6 @@
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Class.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\CompoundOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Concatenate.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ConditionalOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Constant.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Event.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\EXPR.cs" />
@@ -104,6 +104,7 @@
<Compile Include="..\..\mcs\settings.cs" />
<Compile Include="..\..\mcs\statement.cs" />
<Compile Include="..\..\mcs\support.cs" />
<Compile Include="..\..\mcs\tuples.cs" />
<Compile Include="..\..\mcs\typemanager.cs" />
<Compile Include="..\..\mcs\typespec.cs" />
<Compile Include="..\..\mcs\visit.cs" />
@@ -49,6 +49,7 @@ aot.cs
../../mcs/support.cs
../../mcs/typemanager.cs
../../mcs/typespec.cs
../../mcs/tuples.cs
../../mcs/visit.cs
../../class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
../../class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
@@ -2214,7 +2214,7 @@ namespace Mono.Debugger.Soft
internal ValueImpl[] Type_GetValues (long id, long[] fields, long thread_id) {
int len = fields.Length;
PacketReader r;
if (thread_id != 0)
if (thread_id != 0 && Version.AtLeast(2, 3))
r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES_2, new PacketWriter ().WriteId (id).WriteId (thread_id).WriteInt (len).WriteIds (fields));
else
r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (len).WriteIds (fields));
@@ -30,6 +30,11 @@ namespace Mono.Debugger.Soft
if (args != null && args.Length != 0)
throw new NotSupportedException ();
//If method is virtual we can't optimize(execute IL) because it's maybe
//overriden... call runtime to invoke overriden version...
if (method.IsVirtual)
throw new NotSupportedException ();
if (method.IsStatic || method.DeclaringType.IsValueType || this_val == null || !(this_val is ObjectMirror))
throw new NotSupportedException ();
@@ -350,6 +355,12 @@ namespace Mono.Debugger.Soft
} catch {
throw new NotSupportedException ();
}
} else if (method.ReturnType.IsEnum && primitive != null) {
try {
res = method.VirtualMachine.CreateEnumMirror (method.ReturnType, primitive);
} catch {
throw new NotSupportedException ();
}
}
return res;
@@ -59,7 +59,7 @@ namespace Mono.Debugger.Soft
sb.Append (ReturnType.Name);
sb.Append (' ');
if (type_namespace != String.Empty)
sb.Append (type_namespace + ".");
sb.Append (type_namespace).Append (".");
sb.Append(type_name);
sb.Append(":");
sb.Append(Name);
@@ -102,6 +102,18 @@ namespace Mono.Debugger.Soft
}
}
public int EndLineNumber {
get {
return Location.EndLineNumber;
}
}
public int EndColumnNumber {
get {
return Location.EndColumnNumber;
}
}
public bool IsDebuggerInvoke {
get {
return (flags & StackFrameFlags.DEBUGGER_INVOKE) != 0;
@@ -13,6 +13,8 @@ namespace Mono.Debugger.Soft
ManualResetEvent fetchingEvent = new ManualResetEvent (false);
ThreadInfo info;
StackFrame[] frames;
bool threadStateInvalid = true;
ThreadState threadState;
internal ThreadMirror (VirtualMachine vm, long id) : base (vm, id) {
}
@@ -30,6 +32,7 @@ namespace Mono.Debugger.Soft
internal void InvalidateFrames () {
cacheInvalid = true;
threadStateInvalid = true;
}
internal void FetchFrames (bool mustFetch = false) {
@@ -91,7 +94,11 @@ namespace Mono.Debugger.Soft
public ThreadState ThreadState {
get {
return (ThreadState)vm.conn.Thread_GetState (id);
if (threadStateInvalid) {
threadState = (ThreadState) vm.conn.Thread_GetState (id);
threadStateInvalid = false;
}
return threadState;
}
}
@@ -665,7 +665,7 @@ namespace Mono.Debugger.Soft
return res;
}
internal ValueImpl EncodeValue (Value v) {
internal ValueImpl EncodeValue (Value v, List<Value> duplicates = null) {
if (v is PrimitiveValue) {
object val = (v as PrimitiveValue).Value;
if (val == null)
@@ -675,16 +675,22 @@ namespace Mono.Debugger.Soft
} else if (v is ObjectMirror) {
return new ValueImpl { Type = ElementType.Object, Objid = (v as ObjectMirror).Id };
} else if (v is StructMirror) {
return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields) };
if (duplicates == null)
duplicates = new List<Value> ();
if (duplicates.Contains (v))
return new ValueImpl { Type = (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL, Objid = 0 };
duplicates.Add (v);
return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields, duplicates) };
} else {
throw new NotSupportedException ();
}
}
internal ValueImpl[] EncodeValues (IList<Value> values) {
internal ValueImpl[] EncodeValues (IList<Value> values, List<Value> duplicates = null) {
ValueImpl[] res = new ValueImpl [values.Count];
for (int i = 0; i < values.Count; ++i)
res [i] = EncodeValue (values [i]);
res [i] = EncodeValue (values [i], duplicates);
return res;
}
@@ -724,6 +730,7 @@ namespace Mono.Debugger.Soft
l.Add (new ThreadStartEvent (vm, req_id, id));
break;
case EventType.ThreadDeath:
vm.GetThread (id).InvalidateFrames ();
vm.InvalidateThreadCache ();
l.Add (new ThreadDeathEvent (vm, req_id, id));
break;
@@ -5,6 +5,7 @@ using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Runtime.Remoting.Messaging;
using System.Text;
namespace Mono.Debugger.Soft
{
@@ -95,6 +96,12 @@ namespace Mono.Debugger.Soft
info.FileName = "valgrind";
info.UseShellExecute = false;
if (info.RedirectStandardError)
info.StandardErrorEncoding = Encoding.UTF8;
if (info.RedirectStandardOutput)
info.StandardOutputEncoding = Encoding.UTF8;
ITargetProcess p;
if (options != null && options.CustomProcessLauncher != null)
p = new ProcessWrapper (options.CustomProcessLauncher (info));
@@ -1165,10 +1165,18 @@ public class Tests : TestsBase, ITest2
return 42;
}
public int invoke_pass_nullable (int? i) {
return (int)i;
}
public int? invoke_return_nullable_null () {
return null;
}
public int invoke_pass_nullable_null (int? i) {
return i.HasValue ? 1 : 2;
}
public void invoke_type_load () {
new Class3 ();
}
+22 -1
View File
@@ -2617,6 +2617,11 @@ public class DebuggerTests
m = s.Type.GetMethod ("ToString");
v = s.InvokeMethod (e.Thread, m, null);
// pass nullable as argument
m = t.GetMethod ("invoke_pass_nullable");
v = this_obj.InvokeMethod (e.Thread, m, new Value [] { s });
AssertValue (42, v);
// return nullable null
m = t.GetMethod ("invoke_return_nullable_null");
v = this_obj.InvokeMethod (e.Thread, m, null);
@@ -2630,6 +2635,11 @@ public class DebuggerTests
m = s.Type.GetMethod ("ToString");
v = s.InvokeMethod (e.Thread, m, null);
// pass nullable null as argument
m = t.GetMethod ("invoke_pass_nullable_null");
v = this_obj.InvokeMethod (e.Thread, m, new Value [] { s });
AssertValue (2, v);
// pass primitive
m = t.GetMethod ("invoke_pass_primitive");
Value[] args = new Value [] {
@@ -2723,6 +2733,17 @@ public class DebuggerTests
task = t.InvokeMethodAsync (e.Thread, m, new Value [] { vm.RootDomain.CreateString ("ABC") });
AssertValue ("ABC", task.Result);
// string constructor
var stringType = vm.RootDomain.Corlib.GetType ("System.String");
var stringConstructor = stringType.GetMethods ().Single (c=>
c.Name == ".ctor" &&
c.GetParameters ().Length == 2 &&
c.GetParameters ()[0].ParameterType.Name == "Char" &&
c.GetParameters ()[1].ParameterType.Name == "Int32");
var str = stringType.NewInstance (e.Thread, stringConstructor, new Value [] { vm.CreateValue ('a'), vm.CreateValue (3)});
AssertValue("aaa", str);
// Argument checking
// null thread
@@ -4122,7 +4143,7 @@ public class DebuggerTests
frames = thread.GetFrames ();
Assert.AreEqual (8, frames.Length, "#7");
Assert.AreEqual ("WaitOne_internal", frames [0].Method.Name, "#8.0");
Assert.AreEqual ("Wait_internal", frames [0].Method.Name, "#8.0");
Assert.AreEqual ("WaitOneNative", frames [1].Method.Name, "#8.1");
Assert.AreEqual ("InternalWaitOne", frames [2].Method.Name, "#8.2");
Assert.AreEqual ("WaitOne", frames [3].Method.Name, "#8.3");
@@ -153,7 +153,7 @@ namespace Mono.Remoting.Channels.Unix
_pool = pool;
_client = client;
_stream = new BufferedStream (client.GetStream());
_controlTime = DateTime.Now;
_controlTime = DateTime.UtcNow;
_buffer = new byte[UnixMessageIO.DefaultStreamBufferSize];
}
@@ -270,7 +270,7 @@ namespace Mono.Remoting.Channels.Unix
{
lock (_pool)
{
entry.ControlTime = DateTime.Now; // Initialize timeout
entry.ControlTime = DateTime.UtcNow; // Initialize timeout
_pool.Add (entry);
Monitor.Pulse (_pool);
}
@@ -295,7 +295,7 @@ namespace Mono.Remoting.Channels.Unix
for (int n=0; n < _pool.Count; n++)
{
UnixConnection entry = (UnixConnection)_pool[n];
if ( (DateTime.Now - entry.ControlTime).TotalSeconds > UnixConnectionPool.KeepAliveSeconds)
if ( (DateTime.UtcNow - entry.ControlTime).TotalSeconds > UnixConnectionPool.KeepAliveSeconds)
{
CancelConnection (entry);
_pool.RemoveAt(n);
@@ -10,6 +10,7 @@
using NUnit.Framework;
using System;
using System.Diagnostics;
using System.Text;
using System.Threading;
using Mono.Unix;
@@ -25,12 +26,12 @@ namespace MonoTests.Mono.Unix {
static Thread CreateWaitSignalThread (UnixSignal signal, int timeout)
{
Thread t1 = new Thread(delegate() {
DateTime start = DateTime.Now;
var sw = Stopwatch.StartNew ();
bool r = signal.WaitOne (timeout, false);
DateTime end = DateTime.Now;
sw.Stop ();
Assert.AreEqual (signal.Count, 1);
Assert.AreEqual (r, true);
if ((end - start) > new TimeSpan (0, 0, timeout/1000))
if (sw.Elapsed > new TimeSpan (0, 0, timeout/1000))
throw new InvalidOperationException ("Signal slept too long");
});
return t1;
@@ -248,12 +249,12 @@ namespace MonoTests.Mono.Unix {
{
Thread t1 = new Thread (delegate () {
using (UnixSignal a = new UnixSignal (Signum.SIGINT)) {
DateTime start = DateTime.Now;
var sw = Stopwatch.StartNew ();
bool r = a.WaitOne (5000, false);
DateTime end = DateTime.Now;
sw.Stop ();
Assert.AreEqual (a.Count, 1);
Assert.AreEqual (r, true);
if ((end - start) > new TimeSpan (0, 0, 5))
if (sw.Elapsed > new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal slept too long");
}
});
@@ -272,12 +273,12 @@ namespace MonoTests.Mono.Unix {
{
Thread t1 = new Thread (delegate () {
using (UnixSignal a = new UnixSignal (Signum.SIGINT)) {
DateTime start = DateTime.Now;
var sw = Stopwatch.StartNew ();
int idx = UnixSignal.WaitAny (new UnixSignal[]{a}, 5000);
DateTime end = DateTime.Now;
sw.Stop ();
Assert.AreEqual (idx, 0);
Assert.AreEqual (a.Count, 1);
if ((end - start) > new TimeSpan (0, 0, 5))
if (sw.Elapsed > new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal slept too long");
}
});
@@ -297,13 +298,13 @@ namespace MonoTests.Mono.Unix {
Thread t1 = new Thread (delegate () {
using (UnixSignal a = new UnixSignal (Signum.SIGINT))
using (UnixSignal b = new UnixSignal (Signum.SIGTERM)) {
DateTime start = DateTime.Now;
var sw = Stopwatch.StartNew ();
int idx = UnixSignal.WaitAny (new UnixSignal[]{a, b}, 5000);
DateTime end = DateTime.Now;
sw.Stop ();
Assert.AreEqual (idx, 1);
Assert.AreEqual (a.Count, 0);
Assert.AreEqual (b.Count, 1);
if ((end - start) > new TimeSpan (0, 0, 5))
if (sw.Elapsed > new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal slept too long");
}
});
@@ -321,12 +322,12 @@ namespace MonoTests.Mono.Unix {
public void TestNoEmit ()
{
using (UnixSignal u = new UnixSignal (Signum.SIGINT)) {
DateTime start = DateTime.Now;
var sw = Stopwatch.StartNew ();
bool r = u.WaitOne (5100, false);
Assert.AreEqual (r, false);
DateTime end = DateTime.Now;
if ((end - start) < new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal didn't block for 5s; blocked for " + (end-start).ToString());
sw.Stop ();
if (sw.Elapsed < new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal didn't block for 5s; blocked for " + sw.Elapsed.TotalSeconds.ToString());
}
}
@@ -0,0 +1,21 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle ("Mono.Profiler.Log")]
[assembly: AssemblyDescription ("Mono Log Profiler API Library")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
[assembly: AssemblyVersion (Consts.FxVersion)]
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: ComVisible (false)]
+12
View File
@@ -0,0 +1,12 @@
thisdir = class/Mono.Profiler.Log
include ../../build/rules.make
LIBRARY = Mono.Profiler.Log.dll
LIBRARY_SNK = ../mono.snk
LIB_REFS = System System.Core
LIB_MCS_FLAGS = /unsafe /keyfile:$(LIBRARY_SNK) /publicsign
NO_TEST = yes
include ../../build/library.make
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{58A188CE-DED8-48B0-98B7-065A260D21DF}</ProjectGuid>
<OutputType>Library</OutputType>
<NoWarn>1699</NoWarn>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
<OutputPath>./../../class/lib/net_4_x-$(HostPlatform)</OutputPath>
<IntermediateOutputPath>obj-net_4_x-$(HostPlatform)</IntermediateOutputPath>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<NoStdLib>True</NoStdLib>
<NoConfig>True</NoConfig>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>
</RootNamespace>
<AssemblyName>Mono.Profiler.Log</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>../mono.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="..\..\build\common\Locale.cs" />
<Compile Include="Assembly\AssemblyInfo.cs" />
<Compile Include="Mono.Profiler.Log\LogBufferHeader.cs" />
<Compile Include="Mono.Profiler.Log\LogEnums.cs" />
<Compile Include="Mono.Profiler.Log\LogEvent.cs" />
<Compile Include="Mono.Profiler.Log\LogEvents.cs" />
<Compile Include="Mono.Profiler.Log\LogEventVisitor.cs" />
<Compile Include="Mono.Profiler.Log\LogException.cs" />
<Compile Include="Mono.Profiler.Log\LogProcessor.cs" />
<Compile Include="Mono.Profiler.Log\LogReader.cs" />
<Compile Include="Mono.Profiler.Log\LogRuntimeProfiler.cs" />
<Compile Include="Mono.Profiler.Log\LogStream.cs" />
<Compile Include="Mono.Profiler.Log\LogStreamHeader.cs" />␍ </ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
</PreBuildEvent>
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
</PreBuildEvent>
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
</PostBuildEvent>
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
</PostBuildEvent>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../corlib/corlib-net_4_x.csproj">
<Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>
<Name>corlib-net_4_x</Name>
</ProjectReference>
<ProjectReference Include="../System/System-net_4_x.csproj">
<Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>
<Name>System-net_4_x</Name>
</ProjectReference>
<ProjectReference Include="../System.Core/System.Core-net_4_x.csproj">
<Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>
<Name>System.Core-net_4_x</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</Project>
@@ -0,0 +1,14 @@
Assembly/AssemblyInfo.cs
../../build/common/Consts.cs
../../build/common/Locale.cs
Mono.Profiler.Log/LogBufferHeader.cs
Mono.Profiler.Log/LogEnums.cs
Mono.Profiler.Log/LogEvent.cs
Mono.Profiler.Log/LogEventVisitor.cs
Mono.Profiler.Log/LogEvents.cs
Mono.Profiler.Log/LogException.cs
Mono.Profiler.Log/LogProcessor.cs
Mono.Profiler.Log/LogReader.cs
Mono.Profiler.Log/LogRuntimeProfiler.cs
Mono.Profiler.Log/LogStream.cs
Mono.Profiler.Log/LogStreamHeader.cs
@@ -0,0 +1,46 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Mono.Profiler.Log {
public sealed class LogBufferHeader {
const int Id = 0x4d504c01;
public LogStreamHeader StreamHeader { get; }
public int Length { get; }
public ulong TimeBase { get; }
public long PointerBase { get; }
public long ObjectBase { get; }
public long ThreadId { get; }
public long MethodBase { get; }
internal ulong CurrentTime { get; set; }
internal long CurrentMethod { get; set; }
internal LogBufferHeader (LogStreamHeader streamHeader, LogReader reader)
{
StreamHeader = streamHeader;
var id = reader.ReadInt32 ();
if (id != Id)
throw new LogException ($"Invalid buffer header ID (0x{id:X}).");
Length = reader.ReadInt32 ();
TimeBase = CurrentTime = reader.ReadUInt64 ();
PointerBase = reader.ReadInt64 ();
ObjectBase = reader.ReadInt64 ();
ThreadId = reader.ReadInt64 ();
MethodBase = CurrentMethod = reader.ReadInt64 ();
}
}
}
@@ -0,0 +1,212 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Mono.Profiler.Log {
// mono/profiler/log.h : TYPE_*
enum LogEventType {
Allocation = 0,
GC = 1,
Metadata = 2,
Method = 3,
Exception = 4,
Monitor = 5,
Heap = 6,
Sample = 7,
Runtime = 8,
Coverage = 9,
Meta = 10,
AllocationNoBacktrace = 0 << 4,
AllocationBacktrace = 1 << 4,
GCEvent = 1 << 4,
GCResize = 2 << 4,
GCMove = 3 << 4,
GCHandleCreationNoBacktrace = 4 << 4,
GCHandleDeletionNoBacktrace = 5 << 4,
GCHandleCreationBacktrace = 6 << 4,
GCHandleDeletionBacktrace = 7 << 4,
GCFinalizeBegin = 8 << 4,
GCFinalizeEnd = 9 << 4,
GCFinalizeObjectBegin = 10 << 4,
GCFinalizeObjectEnd = 11 << 4,
MetadataExtra = 0 << 4,
MetadataEndLoad = 2 << 4,
MetadataEndUnload = 4 << 4,
MethodLeave = 1 << 4,
MethodEnter = 2 << 4,
MethodLeaveExceptional = 3 << 4,
MethodJit = 4 << 4,
ExceptionThrowNoBacktrace = 0 << 7,
ExceptionThrowBacktrace = 1 << 7,
ExceptionClause = 1 << 4,
MonitorNoBacktrace = 0 << 7,
MonitorBacktrace = 1 << 7,
HeapBegin = 0 << 4,
HeapEnd = 1 << 4,
HeapObject = 2 << 4,
HeapRoots = 3 << 4,
SampleHit = 0 << 4,
SampleUnmanagedSymbol = 1 << 4,
SampleUnmanagedBinary = 2 << 4,
SampleCounterDescriptions = 3 << 4,
SampleCounters = 4 << 4,
RuntimeJitHelper = 1 << 4,
CoverageAssembly = 0 << 4,
CoverageMethod = 1 << 4,
CoverageStatement = 2 << 4,
CoverageClass = 3 << 4,
MetaSynchronizationPoint = 0 << 4,
}
// mono/profiler/log.h : TYPE_*
enum LogMetadataType {
Class = 1,
Image = 2,
Assembly = 3,
AppDomain = 4,
Thread = 5,
Context = 6,
}
// mono/utils/mono-counters.h : MONO_COUNTER_*
public enum LogCounterType {
Int32 = 0,
UInt32 = 1,
Word = 2,
Int64 = 3,
UInt64 = 4,
Double = 5,
String = 6,
Interval = 7,
}
// mono/utils/mono-counters.h : MONO_COUNTER_*
public enum LogCounterSection {
Jit = 1 << 8,
GC = 1 << 9,
Metadata = 1 << 10,
Generics = 1 << 11,
Security = 1 << 12,
Runtime = 1 << 13,
System = 1 << 14,
User = 1 << 15,
Profiler = 1 << 16,
}
// mono/utils/mono-counters.h : MONO_COUNTER_*
public enum LogCounterUnit {
Raw = 0 << 24,
Bytes = 1 << 24,
Time = 2 << 24,
Count = 3 << 24,
Percentage = 4 << 24,
}
// mono/utils/mono-counters.h : MONO_COUNTER_*
public enum LogCounterVariance {
Monotonic = 1 << 28,
Constant = 1 << 29,
Variable = 1 << 30,
}
// mono/metadata/profiler.h : MonoProfilerCodeBufferType
public enum LogJitHelper {
Unknown = 0,
Method = 1,
MethodTrampoline = 2,
UnboxTrampoline = 3,
ImtTrampoline = 4,
GenericsTrampoline = 5,
SpecificTrampoline = 6,
Helper = 7,
Monitor = 8,
DelegateInvoke = 9,
ExceptionHandling = 10,
}
// mono/profiler/log.h : SAMPLE_*
public enum LogSampleHitType {
Cycles = 1,
Instructions = 2,
CacheMisses = 3,
CacheHits = 4,
Branches = 5,
BranchMisses = 6,
}
// mono/metadata/profiler.h : MonoProfilerGCRootType
[Flags]
public enum LogHeapRootAttributes {
Pinning = 1 << 8,
WeakReference = 2 << 8,
Interior = 4 << 8,
Stack = 0,
Finalizer = 1,
Handle = 2,
Other = 3,
Miscellaneous = 4,
TypeMask = 0xff,
}
// mono/profiler/log.h : MonoProfilerMonitorEvent
public enum LogMonitorEvent {
Contention = 1,
Done = 2,
Fail = 3,
}
// mono/metadata/metadata.h : MonoExceptionEnum
public enum LogExceptionClause {
Catch = 0,
Filter = 1,
Finally = 2,
Fault = 4,
}
// mono/metadata/profiler.h : MonoProfilerGCEvent
public enum LogGCEvent {
Begin = 0,
MarkBegin = 1,
MarkEnd = 2,
ReclaimBegin = 3,
ReclaimEnd = 4,
End = 5,
PreStopWorld = 6,
PostStopWorld = 7,
PreStartWorld = 8,
PostStartWorld = 9,
PreStopWorldLocked = 10,
PostStartWorldUnlocked = 11,
}
// mono/metadata/mono-gc.h : MonoGCHandleType
public enum LogGCHandleType {
Weak = 0,
WeakTrackResurrection = 1,
Normal = 2,
Pinned = 3,
}
// mono/profiler/log.h : MonoProfilerSyncPointType
public enum LogSynchronizationPoint {
Periodic = 0,
WorldStop = 1,
WorldStart = 2,
}
}
@@ -0,0 +1,75 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Mono.Profiler.Log {
public abstract class LogEvent {
const BindingFlags PropertyFlags = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public;
const string Indent = " ";
internal LogEvent ()
{
}
public LogBufferHeader Buffer { get; internal set; }
public ulong Timestamp { get; internal set; }
public override string ToString ()
{
var sb = new StringBuilder ();
ToString (this, sb, string.Empty, GetType ().Name, 0);
return sb.ToString ();
}
static void ToString (object source, StringBuilder result, string indent, string header, int level)
{
result.AppendLine ($"{indent}{header} {{");
foreach (var prop in source.GetType ().GetProperties (PropertyFlags).OrderBy (p => p.MetadataToken)) {
var name = prop.Name;
var propIndent = indent + Indent;
var value = prop.GetValue (source);
if (value is IList list) {
result.AppendLine ($"{propIndent}{name} = [{list.Count}] {{");
for (var i = 0; i < list.Count; i++) {
var elem = list [i];
var type = elem.GetType ();
var elemIndent = propIndent + Indent;
var elemHeader = $"[{i}] = ";
if (type.IsClass && type != typeof (string))
ToString (elem, result, elemIndent, $"{elemHeader}{type.Name}", level + 1);
else
result.AppendLine ($"{elemIndent}{elemHeader}{elem}");
}
result.AppendLine ($"{propIndent}}}");
} else
result.AppendLine ($"{propIndent}{name} = {value}");
}
var end = $"{indent}}}";
if (level == 0)
result.Append (end);
else
result.AppendLine (end);
}
internal abstract void Accept (LogEventVisitor visitor);
}
}
@@ -0,0 +1,197 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Mono.Profiler.Log {
public abstract class LogEventVisitor {
public virtual void VisitBefore (LogEvent ev)
{
}
public virtual void VisitAfter (LogEvent ev)
{
}
public virtual void Visit (AppDomainLoadEvent ev)
{
}
public virtual void Visit (AppDomainUnloadEvent ev)
{
}
public virtual void Visit (AppDomainNameEvent ev)
{
}
public virtual void Visit (ContextLoadEvent ev)
{
}
public virtual void Visit (ContextUnloadEvent ev)
{
}
public virtual void Visit (ThreadStartEvent ev)
{
}
public virtual void Visit (ThreadEndEvent ev)
{
}
public virtual void Visit (ThreadNameEvent ev)
{
}
public virtual void Visit (ImageLoadEvent ev)
{
}
public virtual void Visit (ImageUnloadEvent ev)
{
}
public virtual void Visit (AssemblyLoadEvent ev)
{
}
public virtual void Visit (AssemblyUnloadEvent ev)
{
}
public virtual void Visit (ClassLoadEvent ev)
{
}
public virtual void Visit (JitEvent ev)
{
}
public virtual void Visit (JitHelperEvent ev)
{
}
public virtual void Visit (AllocationEvent ev)
{
}
public virtual void Visit (HeapBeginEvent ev)
{
}
public virtual void Visit (HeapEndEvent ev)
{
}
public virtual void Visit (HeapObjectEvent ev)
{
}
public virtual void Visit (HeapRootsEvent ev)
{
}
public virtual void Visit (GCEvent ev)
{
}
public virtual void Visit (GCResizeEvent ev)
{
}
public virtual void Visit (GCMoveEvent ev)
{
}
public virtual void Visit (GCHandleCreationEvent ev)
{
}
public virtual void Visit (GCHandleDeletionEvent ev)
{
}
public virtual void Visit (GCFinalizeBeginEvent ev)
{
}
public virtual void Visit (GCFinalizeEndEvent ev)
{
}
public virtual void Visit (GCFinalizeObjectBeginEvent ev)
{
}
public virtual void Visit (GCFinalizeObjectEndEvent ev)
{
}
public virtual void Visit (ThrowEvent ev)
{
}
public virtual void Visit (ExceptionClauseEvent ev)
{
}
public virtual void Visit (EnterEvent ev)
{
}
public virtual void Visit (LeaveEvent ev)
{
}
public virtual void Visit (ExceptionalLeaveEvent ev)
{
}
public virtual void Visit (MonitorEvent ev)
{
}
public virtual void Visit (SampleHitEvent ev)
{
}
public virtual void Visit (CounterSamplesEvent ev)
{
}
public virtual void Visit (CounterDescriptionsEvent ev)
{
}
public virtual void Visit (UnmanagedBinaryEvent ev)
{
}
public virtual void Visit (UnmanagedSymbolEvent ev)
{
}
public virtual void Visit (AssemblyCoverageEvent ev)
{
}
public virtual void Visit (ClassCoverageEvent ev)
{
}
public virtual void Visit (MethodCoverageEvent ev)
{
}
public virtual void Visit (StatementCoverageEvent ev)
{
}
public virtual void Visit (SynchronizationPointEvent ev)
{
}
}
}
@@ -0,0 +1,625 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
namespace Mono.Profiler.Log {
public sealed class AppDomainLoadEvent : LogEvent {
public long AppDomainId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AppDomainUnloadEvent : LogEvent {
public long AppDomainId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AppDomainNameEvent : LogEvent {
public long AppDomainId { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ContextLoadEvent : LogEvent {
public long ContextId { get; internal set; }
public long AppDomainId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ContextUnloadEvent : LogEvent {
public long ContextId { get; internal set; }
public long AppDomainId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ThreadStartEvent : LogEvent {
public long ThreadId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ThreadEndEvent : LogEvent {
public long ThreadId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ThreadNameEvent : LogEvent {
public long ThreadId { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ImageLoadEvent : LogEvent {
public long ImagePointer { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ImageUnloadEvent : LogEvent {
public long ImagePointer { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AssemblyLoadEvent : LogEvent {
public long AssemblyPointer { get; internal set; }
public long ImagePointer { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AssemblyUnloadEvent : LogEvent {
public long AssemblyPointer { get; internal set; }
public long ImagePointer { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ClassLoadEvent : LogEvent {
public long ClassPointer { get; internal set; }
public long ImagePointer { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class JitEvent : LogEvent {
public long MethodPointer { get; internal set; }
public long CodePointer { get; internal set; }
public long CodeSize { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class JitHelperEvent : LogEvent {
public LogJitHelper Type { get; internal set; }
public long BufferPointer { get; internal set; }
public long BufferSize { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AllocationEvent : LogEvent {
public long ClassPointer { get; internal set; }
public long ObjectPointer { get; internal set; }
public long ObjectSize { get; internal set; }
public IReadOnlyList<long> Backtrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class HeapBeginEvent : LogEvent {
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class HeapEndEvent : LogEvent {
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class HeapObjectEvent : LogEvent {
public struct HeapObjectReference {
public long Offset { get; internal set; }
public long ObjectPointer { get; internal set; }
}
public long ObjectPointer { get; internal set; }
public long ClassPointer { get; internal set; }
public long ObjectSize { get; internal set; }
public IReadOnlyList<HeapObjectReference> References { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class HeapRootsEvent : LogEvent {
public struct HeapRoot {
public long ObjectPointer { get; internal set; }
public LogHeapRootAttributes Attributes { get; internal set; }
public long ExtraInfo { get; internal set; }
}
public long MaxGenerationCollectionCount { get; internal set; }
public IReadOnlyList<HeapRoot> Roots { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCEvent : LogEvent {
public LogGCEvent Type { get; internal set; }
public byte Generation { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCResizeEvent : LogEvent {
public long NewSize { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCMoveEvent : LogEvent {
public IReadOnlyList<long> OldObjectPointers { get; internal set; }
public IReadOnlyList<long> NewObjectPointers { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCHandleCreationEvent : LogEvent {
public LogGCHandleType Type { get; internal set; }
public long Handle { get; internal set; }
public long ObjectPointer { get; internal set; }
public IReadOnlyList<long> Backtrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCHandleDeletionEvent : LogEvent {
public LogGCHandleType Type { get; internal set; }
public long Handle { get; internal set; }
public IReadOnlyList<long> Backtrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCFinalizeBeginEvent : LogEvent {
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCFinalizeEndEvent : LogEvent {
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCFinalizeObjectBeginEvent : LogEvent {
public long ObjectPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCFinalizeObjectEndEvent : LogEvent {
public long ObjectPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ThrowEvent : LogEvent {
public long ObjectPointer { get; internal set; }
public IReadOnlyList<long> Backtrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ExceptionClauseEvent : LogEvent {
public LogExceptionClause Type { get; internal set; }
public long Index { get; internal set; }
public long MethodPointer { get; internal set; }
public long ObjectPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class EnterEvent : LogEvent {
public long MethodPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class LeaveEvent : LogEvent {
public long MethodPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ExceptionalLeaveEvent : LogEvent {
public long MethodPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class MonitorEvent : LogEvent {
public LogMonitorEvent Event { get; internal set; }
public long ObjectPointer { get; internal set; }
public IReadOnlyList<long> Backtrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class SampleHitEvent : LogEvent {
public LogSampleHitType Type { get; internal set; }
public long ThreadId { get; internal set; }
public IReadOnlyList<long> UnmanagedBacktrace { get; internal set; }
public IReadOnlyList<long> ManagedBacktrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class CounterSamplesEvent : LogEvent {
public struct CounterSample {
public long Index { get; internal set; }
public LogCounterType Type { get; internal set; }
public object Value { get; internal set; }
}
public IReadOnlyList<CounterSample> Samples { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class CounterDescriptionsEvent : LogEvent {
public struct CounterDescription {
public LogCounterSection Section { get; internal set; }
public string SectionName { get; internal set; }
public string CounterName { get; internal set; }
public LogCounterType Type { get; internal set; }
public LogCounterUnit Unit { get; internal set; }
public LogCounterVariance Variance { get; internal set; }
public long Index { get; internal set; }
}
public IReadOnlyList<CounterDescription> Descriptions { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class UnmanagedBinaryEvent : LogEvent {
public long SegmentPointer { get; internal set; }
public long SegmentOffset { get; internal set; }
public long SegmentSize { get; internal set; }
public string FileName { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class UnmanagedSymbolEvent : LogEvent {
public long CodePointer { get; internal set; }
public long CodeSize { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AssemblyCoverageEvent : LogEvent {
public string AssemblyName { get; internal set; }
public Guid Guid { get; internal set; }
public string FileName { get; internal set; }
public long NumberOfMethods { get; internal set; }
public long FullyCovered { get; internal set; }
public long PartiallyCovered { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ClassCoverageEvent : LogEvent {
public string AssemblyName { get; internal set; }
public string ClassName { get; internal set; }
public long NumberOfMethods { get; internal set; }
public long FullyCovered { get; internal set; }
public long PartiallyCovered { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class MethodCoverageEvent : LogEvent {
public string AssemblyName { get; internal set; }
public string ClassName { get; internal set; }
public string MethodName { get; internal set; }
public string MethodSignature { get; internal set; }
public string FileName { get; internal set; }
public ulong MetadataToken { get; internal set; }
public long MethodId { get; internal set; }
public long NumberOfStatements { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class StatementCoverageEvent : LogEvent {
public long MethodId { get; internal set; }
public long RelativeILOffset { get; internal set; }
public ulong Counter { get; internal set; }
public long Line { get; internal set; }
public long Column { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class SynchronizationPointEvent : LogEvent {
public LogSynchronizationPoint Type { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
}
@@ -0,0 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Mono.Profiler.Log {
public sealed class LogException : Exception {
public LogException (string message)
: base (message)
{
}
}
}
@@ -0,0 +1,577 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
namespace Mono.Profiler.Log {
public sealed class LogProcessor {
public LogReader Reader { get; }
public LogEventVisitor ImmediateVisitor { get; }
public LogEventVisitor SortedVisitor { get; }
public LogStreamHeader StreamHeader { get; private set; }
LogBufferHeader _bufferHeader;
ulong _time;
bool _used;
public LogProcessor (LogReader reader, LogEventVisitor immediateVisitor, LogEventVisitor sortedVisitor)
{
if (reader == null)
throw new ArgumentNullException (nameof (reader));
Reader = reader;
ImmediateVisitor = immediateVisitor;
SortedVisitor = sortedVisitor;
}
public void Process ()
{
Process (CancellationToken.None);
}
static void ProcessEvent (LogEventVisitor visitor, LogEvent ev)
{
if (visitor != null) {
visitor.VisitBefore (ev);
ev.Accept (visitor);
visitor.VisitAfter (ev);
}
}
void ProcessEvents (List<LogEvent> events, CancellationToken token)
{
foreach (var ev in events.OrderBy (x => x.Timestamp)) {
token.ThrowIfCancellationRequested ();
ProcessEvent (SortedVisitor, ev);
}
events.Clear ();
}
public void Process (CancellationToken token)
{
if (_used)
throw new InvalidOperationException ("This log processor cannot be reused.");
_used = true;
StreamHeader = new LogStreamHeader (Reader);
var events = new List<LogEvent> (Environment.ProcessorCount * 1000);
while (!Reader.BaseStream.EndOfStream) {
token.ThrowIfCancellationRequested ();
_bufferHeader = new LogBufferHeader (StreamHeader, Reader);
// Use the manual position tracking in LogReader so we're
// compatible with non-seekable streams.
var goal = Reader.Position + _bufferHeader.Length;
while (Reader.Position < goal) {
token.ThrowIfCancellationRequested ();
var ev = ReadEvent ();
ProcessEvent (ImmediateVisitor, ev);
events.Add (ev);
if (ev is SynchronizationPointEvent)
ProcessEvents (events, token);
}
}
ProcessEvents (events, token);
}
LogEvent ReadEvent ()
{
var type = Reader.ReadByte ();
var basicType = (LogEventType) (type & 0xf);
var extType = (LogEventType) (type & 0xf0);
_time = ReadTime ();
switch (basicType) {
case LogEventType.Allocation:
switch (extType) {
case LogEventType.AllocationBacktrace:
case LogEventType.AllocationNoBacktrace:
return new AllocationEvent {
ClassPointer = ReadPointer (),
ObjectPointer = ReadObject (),
ObjectSize = (long) Reader.ReadULeb128 (),
Backtrace = ReadBacktrace (extType == LogEventType.AllocationBacktrace),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.GC:
switch (extType) {
case LogEventType.GCEvent:
return new GCEvent {
Type = (LogGCEvent) Reader.ReadByte (),
Generation = Reader.ReadByte (),
};
case LogEventType.GCResize:
return new GCResizeEvent {
NewSize = (long) Reader.ReadULeb128 (),
};
case LogEventType.GCMove: {
var list = new long [(int) Reader.ReadULeb128 ()];
for (var i = 0; i < list.Length; i++)
list [i] = ReadObject ();
return new GCMoveEvent {
OldObjectPointers = list.Where ((_, i) => i % 2 == 0).ToArray (),
NewObjectPointers = list.Where ((_, i) => i % 2 != 0).ToArray (),
};
}
case LogEventType.GCHandleCreationNoBacktrace:
case LogEventType.GCHandleCreationBacktrace:
return new GCHandleCreationEvent {
Type = (LogGCHandleType) Reader.ReadULeb128 (),
Handle = (long) Reader.ReadULeb128 (),
ObjectPointer = ReadObject (),
Backtrace = ReadBacktrace (extType == LogEventType.GCHandleCreationBacktrace),
};
case LogEventType.GCHandleDeletionNoBacktrace:
case LogEventType.GCHandleDeletionBacktrace:
return new GCHandleDeletionEvent {
Type = (LogGCHandleType) Reader.ReadULeb128 (),
Handle = (long) Reader.ReadULeb128 (),
Backtrace = ReadBacktrace (extType == LogEventType.GCHandleDeletionBacktrace),
};
case LogEventType.GCFinalizeBegin:
return new GCFinalizeBeginEvent ();
case LogEventType.GCFinalizeEnd:
return new GCFinalizeEndEvent ();
case LogEventType.GCFinalizeObjectBegin:
return new GCFinalizeObjectBeginEvent {
ObjectPointer = ReadObject (),
};
case LogEventType.GCFinalizeObjectEnd:
return new GCFinalizeObjectEndEvent {
ObjectPointer = ReadObject (),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Metadata: {
var load = false;
var unload = false;
switch (extType) {
case LogEventType.MetadataExtra:
break;
case LogEventType.MetadataEndLoad:
load = true;
break;
case LogEventType.MetadataEndUnload:
unload = true;
break;
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
var metadataType = (LogMetadataType) Reader.ReadByte ();
switch (metadataType) {
case LogMetadataType.Class:
if (load) {
return new ClassLoadEvent {
ClassPointer = ReadPointer (),
ImagePointer = ReadPointer (),
Name = Reader.ReadCString (),
};
} else
throw new LogException ("Invalid class metadata event.");
case LogMetadataType.Image:
if (load) {
return new ImageLoadEvent {
ImagePointer = ReadPointer (),
Name = Reader.ReadCString (),
};
} else if (unload) {
return new ImageUnloadEvent {
ImagePointer = ReadPointer (),
Name = Reader.ReadCString (),
};
} else
throw new LogException ("Invalid image metadata event.");
case LogMetadataType.Assembly:
if (load) {
return new AssemblyLoadEvent {
AssemblyPointer = ReadPointer (),
ImagePointer = ReadPointer (),
Name = Reader.ReadCString (),
};
} else if (unload) {
return new AssemblyUnloadEvent {
AssemblyPointer = ReadPointer (),
ImagePointer = ReadPointer (),
Name = Reader.ReadCString (),
};
} else
throw new LogException ("Invalid assembly metadata event.");
case LogMetadataType.AppDomain:
if (load) {
return new AppDomainLoadEvent {
AppDomainId = ReadPointer (),
};
} else if (unload) {
return new AppDomainUnloadEvent {
AppDomainId = ReadPointer (),
};
} else {
return new AppDomainNameEvent {
AppDomainId = ReadPointer (),
Name = Reader.ReadCString (),
};
}
case LogMetadataType.Thread:
if (load) {
return new ThreadStartEvent {
ThreadId = ReadPointer (),
};
} else if (unload) {
return new ThreadEndEvent {
ThreadId = ReadPointer (),
};
} else {
return new ThreadNameEvent {
ThreadId = ReadPointer (),
Name = Reader.ReadCString (),
};
}
case LogMetadataType.Context:
if (load) {
return new ContextLoadEvent {
ContextId = ReadPointer (),
AppDomainId = ReadPointer (),
};
} else if (unload) {
return new ContextUnloadEvent {
ContextId = ReadPointer (),
AppDomainId = ReadPointer (),
};
} else
throw new LogException ("Invalid context metadata event.");
default:
throw new LogException ($"Invalid metadata type ({metadataType}).");
}
}
case LogEventType.Method:
switch (extType) {
case LogEventType.MethodLeave:
return new LeaveEvent {
MethodPointer = ReadMethod (),
};
case LogEventType.MethodEnter:
return new EnterEvent {
MethodPointer = ReadMethod (),
};
case LogEventType.MethodLeaveExceptional:
return new ExceptionalLeaveEvent {
MethodPointer = ReadMethod (),
};
case LogEventType.MethodJit:
return new JitEvent {
MethodPointer = ReadMethod (),
CodePointer = ReadPointer (),
CodeSize = (long) Reader.ReadULeb128 (),
Name = Reader.ReadCString (),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Exception:
switch (extType) {
case LogEventType.ExceptionThrowNoBacktrace:
case LogEventType.ExceptionThrowBacktrace:
return new ThrowEvent {
ObjectPointer = ReadObject (),
Backtrace = ReadBacktrace (extType == LogEventType.ExceptionThrowBacktrace),
};
case LogEventType.ExceptionClause:
return new ExceptionClauseEvent {
Type = (LogExceptionClause) Reader.ReadByte (),
Index = (long) Reader.ReadULeb128 (),
MethodPointer = ReadMethod (),
ObjectPointer = ReadObject (),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Monitor:
switch (extType) {
case LogEventType.MonitorNoBacktrace:
case LogEventType.MonitorBacktrace:
return new MonitorEvent {
Event = (LogMonitorEvent) Reader.ReadByte (),
ObjectPointer = ReadObject (),
Backtrace = ReadBacktrace (extType == LogEventType.MonitorBacktrace),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Heap:
switch (extType) {
case LogEventType.HeapBegin:
return new HeapBeginEvent ();
case LogEventType.HeapEnd:
return new HeapEndEvent ();
case LogEventType.HeapObject: {
var ev = new HeapObjectEvent {
ObjectPointer = ReadObject (),
ClassPointer = ReadPointer (),
ObjectSize = (long) Reader.ReadULeb128 (),
};
var list = new HeapObjectEvent.HeapObjectReference [(int) Reader.ReadULeb128 ()];
for (var i = 0; i < list.Length; i++) {
list [i] = new HeapObjectEvent.HeapObjectReference {
Offset = (long) Reader.ReadULeb128 (),
ObjectPointer = ReadObject (),
};
}
ev.References = list;
return ev;
}
case LogEventType.HeapRoots: {
// TODO: This entire event makes no sense.
var ev = new HeapRootsEvent ();
var list = new HeapRootsEvent.HeapRoot [(int) Reader.ReadULeb128 ()];
ev.MaxGenerationCollectionCount = (long) Reader.ReadULeb128 ();
for (var i = 0; i < list.Length; i++) {
list [i] = new HeapRootsEvent.HeapRoot {
ObjectPointer = ReadObject (),
Attributes = (LogHeapRootAttributes) Reader.ReadByte (),
ExtraInfo = (long) Reader.ReadULeb128 (),
};
}
ev.Roots = list;
return ev;
}
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Sample:
switch (extType) {
case LogEventType.SampleHit:
return new SampleHitEvent {
Type = (LogSampleHitType) Reader.ReadByte (),
ThreadId = ReadPointer (),
UnmanagedBacktrace = ReadBacktrace (true, false),
ManagedBacktrace = ReadBacktrace (true),
};
case LogEventType.SampleUnmanagedSymbol:
return new UnmanagedSymbolEvent {
CodePointer = ReadPointer (),
CodeSize = (long) Reader.ReadULeb128 (),
Name = Reader.ReadCString (),
};
case LogEventType.SampleUnmanagedBinary:
return new UnmanagedBinaryEvent {
SegmentPointer = ReadPointer (),
SegmentOffset = (long) Reader.ReadULeb128 (),
SegmentSize = (long) Reader.ReadULeb128 (),
FileName = Reader.ReadCString (),
};
case LogEventType.SampleCounterDescriptions: {
var ev = new CounterDescriptionsEvent ();
var list = new CounterDescriptionsEvent.CounterDescription [(int) Reader.ReadULeb128 ()];
for (var i = 0; i < list.Length; i++) {
var section = (LogCounterSection) Reader.ReadULeb128 ();
list [i] = new CounterDescriptionsEvent.CounterDescription {
Section = section,
SectionName = section == LogCounterSection.User ? Reader.ReadCString () : string.Empty,
CounterName = Reader.ReadCString (),
Type = (LogCounterType) Reader.ReadByte (),
Unit = (LogCounterUnit) Reader.ReadByte (),
Variance = (LogCounterVariance) Reader.ReadByte (),
Index = (long) Reader.ReadULeb128 (),
};
}
ev.Descriptions = list;
return ev;
}
case LogEventType.SampleCounters: {
var ev = new CounterSamplesEvent ();
var list = new List<CounterSamplesEvent.CounterSample> ();
while (true) {
var index = (long) Reader.ReadULeb128 ();
if (index == 0)
break;
var counterType = (LogCounterType) Reader.ReadByte ();
object value = null;
switch (counterType) {
case LogCounterType.String:
value = Reader.ReadByte () == 1 ? Reader.ReadCString () : null;
break;
case LogCounterType.Int32:
case LogCounterType.Word:
case LogCounterType.Int64:
case LogCounterType.Interval:
value = Reader.ReadSLeb128 ();
break;
case LogCounterType.UInt32:
case LogCounterType.UInt64:
value = Reader.ReadULeb128 ();
break;
case LogCounterType.Double:
value = Reader.ReadDouble ();
break;
default:
throw new LogException ($"Invalid counter type ({counterType}).");
}
list.Add (new CounterSamplesEvent.CounterSample {
Index = index,
Type = counterType,
Value = value,
});
}
ev.Samples = list;
return ev;
}
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Runtime:
switch (extType) {
case LogEventType.RuntimeJitHelper: {
var helperType = (LogJitHelper) Reader.ReadByte ();
return new JitHelperEvent {
Type = helperType,
BufferPointer = ReadPointer (),
BufferSize = (long) Reader.ReadULeb128 (),
Name = helperType == LogJitHelper.SpecificTrampoline ? Reader.ReadCString () : string.Empty,
};
}
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Coverage:
switch (extType) {
case LogEventType.CoverageAssembly:
return new AssemblyCoverageEvent {
AssemblyName = Reader.ReadCString (),
Guid = Guid.Parse (Reader.ReadCString ()),
FileName = Reader.ReadCString (),
NumberOfMethods = (long) Reader.ReadULeb128 (),
FullyCovered = (long) Reader.ReadULeb128 (),
PartiallyCovered = (long) Reader.ReadULeb128 (),
};
case LogEventType.CoverageMethod:
return new MethodCoverageEvent {
AssemblyName = Reader.ReadCString (),
ClassName = Reader.ReadCString (),
MethodName = Reader.ReadCString (),
MethodSignature = Reader.ReadCString (),
FileName = Reader.ReadCString (),
MetadataToken = Reader.ReadULeb128 (),
MethodId = (long) Reader.ReadULeb128 (),
NumberOfStatements = (long) Reader.ReadULeb128 (),
};
case LogEventType.CoverageStatement:
return new StatementCoverageEvent {
MethodId = (long) Reader.ReadULeb128 (),
RelativeILOffset = (long) Reader.ReadULeb128 (),
Counter = Reader.ReadULeb128 (),
Line = (long) Reader.ReadULeb128 (),
Column = (long) Reader.ReadULeb128 (),
};
case LogEventType.CoverageClass:
return new ClassCoverageEvent {
AssemblyName = Reader.ReadCString (),
ClassName = Reader.ReadCString (),
NumberOfMethods = (long) Reader.ReadULeb128 (),
FullyCovered = (long) Reader.ReadULeb128 (),
PartiallyCovered = (long) Reader.ReadULeb128 (),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Meta:
switch (extType) {
case LogEventType.MetaSynchronizationPoint:
return new SynchronizationPointEvent {
Type = (LogSynchronizationPoint) Reader.ReadByte (),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
default:
throw new LogException ($"Invalid basic event type ({basicType}).");
}
}
long ReadPointer ()
{
var ptr = Reader.ReadSLeb128 () + _bufferHeader.PointerBase;
return StreamHeader.PointerSize == sizeof (long) ? ptr : ptr & 0xffffffffL;
}
long ReadObject ()
{
return Reader.ReadSLeb128 () + _bufferHeader.ObjectBase;
}
long ReadMethod ()
{
return _bufferHeader.CurrentMethod += Reader.ReadSLeb128 ();
}
ulong ReadTime ()
{
return _bufferHeader.CurrentTime += Reader.ReadULeb128 ();
}
IReadOnlyList<long> ReadBacktrace (bool actuallyRead, bool managed = true)
{
if (!actuallyRead)
return Array.Empty<long> ();
var list = new long [(int) Reader.ReadULeb128 ()];
for (var i = 0; i < list.Length; i++)
list [i] = managed ? ReadMethod () : ReadPointer ();
return list;
}
}
}
@@ -0,0 +1,157 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace Mono.Profiler.Log {
public sealed class LogReader : IDisposable {
public static Encoding Encoding { get; } = Encoding.UTF8;
public LogStream BaseStream => (LogStream) _reader.BaseStream;
public long Position { get; private set; }
readonly BinaryReader _reader;
byte[] _stringBuffer = new byte [1024];
public LogReader (LogStream stream, bool leaveOpen)
{
_reader = new BinaryReader (stream, Encoding, leaveOpen);
}
public void Dispose ()
{
_reader.Dispose ();
}
internal byte ReadByte ()
{
var b = _reader.ReadByte ();
Position += sizeof (byte);
return b;
}
internal ushort ReadUInt16 ()
{
var i = _reader.ReadUInt16 ();
Position += sizeof (ushort);
return i;
}
internal int ReadInt32 ()
{
var i = _reader.ReadInt32 ();
Position += sizeof (int);
return i;
}
internal long ReadInt64 ()
{
var i = _reader.ReadInt64 ();
Position += sizeof (long);
return i;
}
internal ulong ReadUInt64 ()
{
var i = _reader.ReadUInt64 ();
Position += sizeof (ulong);
return i;
}
internal double ReadDouble ()
{
var d = _reader.ReadDouble ();
Position += sizeof (double);
return d;
}
internal string ReadHeaderString ()
{
var bytes = new byte [ReadInt32 ()];
// ReadBytes doesn't necessarily read the specified amount of
// bytes, so just do it this way.
for (var i = 0; i < bytes.Length; i++)
bytes [i] = ReadByte ();
return Encoding.GetString (bytes);
}
internal string ReadCString ()
{
var pos = 0;
byte val;
while ((val = ReadByte ()) != 0) {
if (pos == _stringBuffer.Length)
Array.Resize (ref _stringBuffer, System.Math.Max (_stringBuffer.Length * 2, pos + 1));
_stringBuffer [pos++] = val;
}
return Encoding.GetString (_stringBuffer, 0, pos);
}
internal long ReadSLeb128 ()
{
long result = 0;
var shift = 0;
while (true) {
var b = ReadByte ();
result |= (long) (b & 0x7f) << shift;
shift += 7;
if ((b & 0x80) != 0x80) {
if (shift < sizeof (long) * 8 && (b & 0x40) == 0x40)
result |= -(1L << shift);
break;
}
}
return result;
}
internal ulong ReadULeb128 ()
{
ulong result = 0;
var shift = 0;
while (true) {
var b = ReadByte ();
result |= (ulong) (b & 0x7f) << shift;
if ((b & 0x80) != 0x80)
break;
shift += 7;
}
return result;
}
}
}
@@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.InteropServices;
namespace Mono.Profiler.Log {
public static class LogRuntimeProfiler {
// TODO: Runtime profiler interface.
}
}
@@ -0,0 +1,71 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
namespace Mono.Profiler.Log {
public class LogStream : Stream {
public Stream BaseStream { get; }
public virtual bool EndOfStream => BaseStream.Position == BaseStream.Length;
public override bool CanRead => true;
public override bool CanSeek => false;
public override bool CanWrite => false;
public override long Length => throw new NotSupportedException ();
public override long Position {
get => throw new NotSupportedException ();
set => throw new NotSupportedException ();
}
public LogStream (Stream baseStream)
{
if (baseStream == null)
throw new ArgumentNullException (nameof (baseStream));
if (!baseStream.CanRead)
throw new ArgumentException ("Stream does not support reading.", nameof (baseStream));
BaseStream = baseStream;
}
protected override void Dispose (bool disposing)
{
if (disposing)
BaseStream.Dispose ();
}
public override void Flush ()
{
throw new NotSupportedException ();
}
public override int Read (byte[] buffer, int offset, int count)
{
return BaseStream.Read (buffer, offset, count);
}
public override long Seek (long offset, SeekOrigin origin)
{
throw new NotSupportedException ();
}
public override void SetLength (long value)
{
throw new NotSupportedException ();
}
public override void Write (byte[] buffer, int offset, int count)
{
throw new NotSupportedException ();
}
}
}
@@ -0,0 +1,55 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Mono.Profiler.Log {
public sealed class LogStreamHeader {
const int Id = 0x4d505a01;
public Version Version { get; }
public int FormatVersion { get; }
public byte PointerSize { get; }
public ulong StartupTime { get; }
public int TimerOverhead { get; }
public int Flags { get; }
public int ProcessId { get; }
public int Port { get; }
public string Arguments { get; }
public string Architecture { get; }
public string OperatingSystem { get; }
internal LogStreamHeader (LogReader reader)
{
var id = reader.ReadInt32 ();
if (id != Id)
throw new LogException ($"Invalid stream header ID (0x{id:X}).");
Version = new Version (reader.ReadByte (), reader.ReadByte ());
FormatVersion = reader.ReadByte ();
PointerSize = reader.ReadByte ();
StartupTime = reader.ReadUInt64 ();
TimerOverhead = reader.ReadInt32 ();
Flags = reader.ReadInt32 ();
ProcessId = reader.ReadInt32 ();
Port = reader.ReadUInt16 ();
Arguments = reader.ReadHeaderString ();
Architecture = reader.ReadHeaderString ();
OperatingSystem = reader.ReadHeaderString ();
}
}
}
@@ -27,6 +27,7 @@ using System;
using System.IO;
using System.Net;
using System.Net.Security;
using System.Threading;
using System.Threading.Tasks;
using SSA = System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
@@ -86,6 +87,10 @@ namespace Mono.Security.Interface
void EndWrite (IAsyncResult asyncResult);
Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken);
Task ShutdownAsync ();
TransportContext TransportContext {
get;
}
@@ -387,7 +387,7 @@ namespace Mono.Security.X509 {
byte[] nullPassword = {0, 0};
calculatedMac = MAC(nullPassword, macSalt.Value, _iterations, authSafeData);
if (!Compare (macValue, calculatedMac))
throw new CryptographicException ("Invalid MAC - file may have been tampe red!");
throw new CryptographicException ("Invalid MAC - file may have been tampered with!");
_password = nullPassword;
}
}
@@ -27,6 +27,7 @@ Mono.Security.Cryptography/PKCS8Test.cs
Mono.Security.Cryptography/RSAManagedTest.cs
Mono.Security.Cryptography/SHA224ManagedTest.cs
Mono.Security.Cryptography/SHA224Test.cs
Mono.Security.Interface/TestProvider.cs
Mono.Security.Protocol.Ntlm/ChallengeResponseTest.cs
Mono.Security.Protocol.Ntlm/MessageBaseTest.cs
Mono.Security.Protocol.Ntlm/Type1MessageTest.cs
@@ -0,0 +1,47 @@
//
// TestProvider.cs
//
// Author:
// Martin Baulig <[email protected]>
//
// Copyright (c) 2017 Xamarin, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using Mono.Security;
using Mono.Security.Interface;
using NUnit.Framework;
namespace MonoTests.Mono.Security
{
[TestFixture]
public class TestProvider
{
[Test]
public void GetProvider ()
{
var provider = MonoTlsProviderFactory.GetProvider ();
Assert.IsNotNull (provider, "TLS Provider");
}
}
}
@@ -310,19 +310,20 @@ namespace System.IO.MemoryMappedFiles
[MonoLimitation ("Named mappings scope is process local")]
public static MemoryMappedFile OpenExisting (string mapName)
{
throw new NotImplementedException ();
return OpenExisting (mapName, MemoryMappedFileRights.ReadWrite);
}
[MonoLimitation ("Named mappings scope is process local")]
public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRights desiredAccessRights)
{
throw new NotImplementedException ();
return OpenExisting (mapName, desiredAccessRights, HandleInheritability.None);
}
[MonoLimitation ("Named mappings scope is process local")]
public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRights desiredAccessRights, HandleInheritability inheritability)
{
throw new NotImplementedException ();
// FIXME: Actually use desiredAccessRights
return CoreShmCreate (mapName, 0, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.None, null, inheritability, FileMode.Open);
}
public MemoryMappedViewStream CreateViewStream ()
@@ -393,10 +394,9 @@ namespace System.IO.MemoryMappedFiles
throw new NotImplementedException ();
}
[MonoTODO]
public SafeMemoryMappedFileHandle SafeMemoryMappedFileHandle {
get {
throw new NotImplementedException ();
return handle;
}
}
@@ -301,9 +301,12 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
var name = MkNamedMapping ();
using (var m0 = MemoryMappedFile.CreateNew(name, 4096, MemoryMappedFileAccess.ReadWrite)) {
using (var m1 = MemoryMappedFile.CreateOrOpen (name, 4096, MemoryMappedFileAccess.ReadWrite)) {
using (MemoryMappedViewAccessor v0 = m0.CreateViewAccessor (), v1 = m1.CreateViewAccessor ()) {
v0.Write (10, 0x12345);
Assert.AreEqual (0x12345, v1.ReadInt32 (10));
using (var m2 = MemoryMappedFile.OpenExisting (name)) {
using (MemoryMappedViewAccessor v0 = m0.CreateViewAccessor (), v1 = m1.CreateViewAccessor (), v2 = m2.CreateViewAccessor ()) {
v0.Write (10, 0x12345);
Assert.AreEqual (0x12345, v1.ReadInt32 (10));
Assert.AreEqual (0x12345, v2.ReadInt32 (10));
}
}
}
}
@@ -466,5 +469,13 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
}
}
}
[Test]
public void OpenExistingWithNoExistingThrows()
{
Assert.Throws<FileNotFoundException>(() => {
MemoryMappedFile.OpenExisting (MkNamedMapping ());
});
}
}
}
@@ -0,0 +1,14 @@
#include common_System.Core.dll.sources
#include dynamic_System.Core.dll.sources
System.Security.Cryptography/AesCryptoServiceProvider.cs
System.Security.Cryptography/AesTransform.cs
System.Security.Cryptography/MD5Cng.cs
System.Security.Cryptography/SHA1Cng.cs
System.Security.Cryptography/SHA256Cng.cs
System.Security.Cryptography/SHA384Cng.cs
System.Security.Cryptography/SHA512Cng.cs
../referencesource/System.Core/System/Security/Cryptography/AesManaged.cs
../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs
../referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs
@@ -0,0 +1 @@
#include mobile_System.Data.dll.sources
+5 -3
View File
@@ -10,9 +10,11 @@ LIB_MCS_FLAGS = /unsafe \
-resource:Assembly/Error.ico,Error.ico -resource:Assembly/Warning.ico,Warning.ico \
-resource:Assembly/Question.ico,Question.ico -resource:Assembly/Shield.ico,Shield.ico
ifeq (winaot, $(PROFILE))
LIB_MCS_FLAGS += /keyfile:../msfinal.pub
else ifeq (orbis, $(PROFILE))
RESX_RESOURCE_STRING = ../../../external/corefx/src/System.Drawing.Common/src/Resources/Strings.resx
MOBILE_LIKE := $(filter winaot orbis unreal, $(PROFILE))
ifdef MOBILE_LIKE
LIB_MCS_FLAGS += /keyfile:../msfinal.pub
else
LIB_MCS_FLAGS += -d:FEATURE_TYPECONVERTER,SUPPORTS_WINDOWS_COLORS
@@ -52,140 +52,176 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\AssemblyRef.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\misc\ClientUtils.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\misc\HandleCollector.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\BitmapSuffixInSameAssemblyAttribute.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\BitmapSuffixInSatelliteAssemblyAttribute.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Brush.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\DashCap.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\CategoryNameCollection.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\IPropertyValueUIService.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\IToolboxItemProvider.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\IToolboxService.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\IToolboxUser.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\PaintValueEventArgs.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\PropertyValueUIHandler.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\PropertyValueUIItem.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\PropertyValueUIItemInvokeHandler.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxComponentsCreatedEventArgs.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxComponentsCreatedEventHandler.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxComponentsCreatingEventArgs.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxComponentsCreatingEventHandler.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxItemCollection.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxItemCreatorCallback.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\UITypeEditor.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\UITypeEditorEditStyle.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\AdjustableArrowCap.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\Blend.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\BrushType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\ColorBlend.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CombineMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CompositingMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CompositingQuality.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CoordinateSpace.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CustomLineCap.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CustomLineCapType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\DashStyle.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\FillMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\FlushIntention.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\GraphicsPathIterator.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\GraphicsState.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\HatchBrush.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\HatchStyle.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\InterpolationMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\LinearGradientMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\LineCap.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\LineJoin.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\MatrixOrder.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\PathData.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\PathPointType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\PenAlignment.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\PenType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\PixelOffsetMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\QualityMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\RegionData.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\SafeCustomLineCapHandle.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\SmoothingMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\WarpMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\WrapMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\FontStyle.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Gdiplus.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\IDeviceContext.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorAdjustType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorChannelFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorMap.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorMapType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorMatrix.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorMatrixFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorPalette.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EmfPlusFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EmfPlusRecordType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EmfType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\Encoder.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EncoderParameter.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EncoderParameters.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EncoderParameterValueType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EncoderValue.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\FrameDimension.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageAttributes.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageCodecFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageCodecInfo.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageCodecInfoPrivate.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageLockMode.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\MetafileFrameUnit.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\MetafileHeaderEmf.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\MetafileHeaderWmf.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\MetafileType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\PaletteFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\PixelFormat.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\PlayRecordCallback.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\PropertyItem.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\WmfPlaceableFileHeader.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Internal\GPPOINT.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Internal\GPPOINTF.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Internal\GPRECT.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Internal\GPRECTF.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Internal\ISystemEventTracker.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\NativeMethods.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\Duplex.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\InvalidPrinterException.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\InvalidPrinterException.Serializable.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\Margins.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\Margins.Serializable.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperKinds.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperSize.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperSize.Serializable.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperSource.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperSource.Serializable.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperSourceKind.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PreviewPageInfo.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintAction.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrinterResolution.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrinterResolution.Serializable.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrinterResolutionKind.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrinterUnit.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrinterUnitConvert.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintEventHandler.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintingPermission.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintingPermissionAttribute.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintingPermissionLevel.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintPageEventHandler.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintRange.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\QueryPageSettingsEventArgs.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\QueryPageSettingsEventHandler.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\PropertyItemInternal.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\RotateFlipType.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\SolidBrush.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\StringAlignment.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\StringDigitSubstitute.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\StringFormatFlags.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\StringTrimming.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\StringUnit.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\SystemBrushes.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Text\FontCollection.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Text\GenericFontFamilies.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Text\HotkeyPrefix.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Text\InstalledFontCollection.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Text\TextRenderingHint.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\TextureBrush.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\UnsafeNativeMethods.cs" />
<Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="..\..\build\common\Locale.cs" />
<Compile Include="..\..\build\common\MonoTODOAttribute.cs" />
<Compile Include="Assembly\AssemblyInfo.cs" />
<Compile Include="System.Drawing.Design\CategoryNameCollection.cs" />
<Compile Include="System.Drawing.Design\IPropertyValueUIService.cs" />
<Compile Include="System.Drawing.Design\IToolboxItemProvider.cs" />
<Compile Include="System.Drawing.Design\IToolboxService.cs" />
<Compile Include="System.Drawing.Design\IToolboxUser.cs" />
<Compile Include="System.Drawing.Design\PaintValueEventArgs.cs" />
<Compile Include="System.Drawing.Design\PropertyValueItem.cs" />
<Compile Include="System.Drawing.Design\PropertyValueUIHandler.cs" />
<Compile Include="System.Drawing.Design\PropertyValueUIItemInvokeHandler.cs" />
<Compile Include="System.Drawing.Design\ToolboxComponentsCreatedEventArgs.cs" />
<Compile Include="System.Drawing.Design\ToolboxComponentsCreatedEventHandler.cs" />
<Compile Include="System.Drawing.Design\ToolboxComponentsCreatingEventArgs.cs" />
<Compile Include="System.Drawing.Design\ToolboxComponentsCreatingEventHandler.cs" />
<Compile Include="corefx\SR.cs" />
<Compile Include="System.Drawing.Design\ToolboxItem.cs" />
<Compile Include="System.Drawing.Design\ToolboxItemCollection.cs" />
<Compile Include="System.Drawing.Design\ToolboxItemCreatorCallback.cs" />
<Compile Include="System.Drawing.Design\UITypeEditor.cs" />
<Compile Include="System.Drawing.Design\UITypeEditorEditStyle.cs" />
<Compile Include="System.Drawing.Drawing2D\AdjustableArrowCap.cs" />
<Compile Include="System.Drawing.Drawing2D\Blend.cs" />
<Compile Include="System.Drawing.Drawing2D\ColorBlend.cs" />
<Compile Include="System.Drawing.Drawing2D\CombineMode.cs" />
<Compile Include="System.Drawing.Drawing2D\CompostingMode.cs" />
<Compile Include="System.Drawing.Drawing2D\CompostingQuality.cs" />
<Compile Include="System.Drawing.Drawing2D\CoordinateSpace.cs" />
<Compile Include="System.Drawing.Drawing2D\CustomLineCap.cs" />
<Compile Include="System.Drawing.Drawing2D\DashCap.cs" />
<Compile Include="System.Drawing.Drawing2D\DashStyle.cs" />
<Compile Include="System.Drawing.Drawing2D\FillMode.cs" />
<Compile Include="System.Drawing.Drawing2D\FlushIntention.cs" />
<Compile Include="System.Drawing.Drawing2D\GraphicsContainer.cs" />
<Compile Include="System.Drawing.Drawing2D\GraphicsPath.cs" />
<Compile Include="System.Drawing.Drawing2D\GraphicsPathIterator.cs" />
<Compile Include="System.Drawing.Drawing2D\GraphicsState.cs" />
<Compile Include="System.Drawing.Drawing2D\HatchBrush.cs" />
<Compile Include="System.Drawing.Drawing2D\HatchStyle.cs" />
<Compile Include="System.Drawing.Drawing2D\InterpolationMode.cs" />
<Compile Include="System.Drawing.Drawing2D\LinearGradientBrush.cs" />
<Compile Include="System.Drawing.Drawing2D\LinearGradientMode.cs" />
<Compile Include="System.Drawing.Drawing2D\LineCap.cs" />
<Compile Include="System.Drawing.Drawing2D\LineJoin.cs" />
<Compile Include="System.Drawing.Drawing2D\Matrix.cs" />
<Compile Include="System.Drawing.Drawing2D\MatrixOrder.cs" />
<Compile Include="System.Drawing.Drawing2D\PathData.cs" />
<Compile Include="System.Drawing.Drawing2D\PathGradientBrush.cs" />
<Compile Include="System.Drawing.Drawing2D\PathPointType.cs" />
<Compile Include="System.Drawing.Drawing2D\PenAlignment.cs" />
<Compile Include="System.Drawing.Drawing2D\PenType.cs" />
<Compile Include="System.Drawing.Drawing2D\PixelOffsetMode.cs" />
<Compile Include="System.Drawing.Drawing2D\QualityMode.cs" />
<Compile Include="System.Drawing.Drawing2D\RegionData.cs" />
<Compile Include="System.Drawing.Drawing2D\SmoothingMode.cs" />
<Compile Include="System.Drawing.Drawing2D\WarpMode.cs" />
<Compile Include="System.Drawing.Drawing2D\WrapMode.cs" />
<Compile Include="System.Drawing.Imaging\BitmapData.cs" />
<Compile Include="System.Drawing.Imaging\ColorAdjustType.cs" />
<Compile Include="System.Drawing.Imaging\ColorChannelFlag.cs" />
<Compile Include="System.Drawing.Imaging\ColorMap.cs" />
<Compile Include="System.Drawing.Imaging\ColorMapType.cs" />
<Compile Include="System.Drawing.Imaging\ColorMatrix.cs" />
<Compile Include="System.Drawing.Imaging\ColorMatrixFlag.cs" />
<Compile Include="System.Drawing.Imaging\ColorMode.cs" />
<Compile Include="System.Drawing.Imaging\ColorPalette.cs" />
<Compile Include="System.Drawing.Imaging\EmfPlusRecordType.cs" />
<Compile Include="System.Drawing.Imaging\EmfType.cs" />
<Compile Include="System.Drawing.Imaging\Encoder.cs" />
<Compile Include="System.Drawing.Imaging\EncoderParameter.cs" />
<Compile Include="System.Drawing.Imaging\EncoderParameters.cs" />
<Compile Include="System.Drawing.Imaging\EncoderParameterValueType.cs" />
<Compile Include="System.Drawing.Imaging\EncoderValue.cs" />
<Compile Include="System.Drawing.Imaging\FrameDimension.cs" />
<Compile Include="System.Drawing.Imaging\ImageAttributes.cs" />
<Compile Include="System.Drawing.Imaging\ImageCodecFlags.cs" />
<Compile Include="System.Drawing.Imaging\ImageCodecInfo.cs" />
<Compile Include="System.Drawing.Imaging\ImageFlags.cs" />
<Compile Include="System.Drawing.Imaging\ImageFormat.cs" />
<Compile Include="System.Drawing.Imaging\ImageLockMode.cs" />
<Compile Include="System.Drawing.Imaging\Metafile.cs" />
<Compile Include="System.Drawing.Imaging\MetafileFrameUnit.cs" />
<Compile Include="System.Drawing.Imaging\MetafileHeader.cs" />
<Compile Include="System.Drawing.Imaging\MetafileType.cs" />
<Compile Include="System.Drawing.Imaging\MetaHeader.cs" />
<Compile Include="System.Drawing.Imaging\PaletteFlags.cs" />
<Compile Include="System.Drawing.Imaging\PixelFormat.cs" />
<Compile Include="System.Drawing.Imaging\PlayRecordCallback.cs" />
<Compile Include="System.Drawing.Imaging\PropertyItem.cs" />
<Compile Include="System.Drawing.Imaging\WmfPlaceableFileHeader.cs" />
<Compile Include="System.Drawing.Printing\Duplex.cs" />
<Compile Include="System.Drawing.Printing\InvalidPrinterException.cs" />
<Compile Include="System.Drawing.Printing\Margins.cs" />
<Compile Include="System.Drawing.Printing\MarginsConverter.cs" />
<Compile Include="System.Drawing.Printing\PageSettings.cs" />
<Compile Include="System.Drawing.Printing\PaperKind.cs" />
<Compile Include="System.Drawing.Printing\PaperSize.cs" />
<Compile Include="System.Drawing.Printing\PaperSource.cs" />
<Compile Include="System.Drawing.Printing\PaperSourceKind.cs" />
<Compile Include="System.Drawing.Printing\PreviewPageInfo.cs" />
<Compile Include="System.Drawing.Printing\PreviewPrintController.cs" />
<Compile Include="System.Drawing.Printing\PrintAction.cs" />
<Compile Include="System.Drawing.Printing\PrintController.cs" />
<Compile Include="System.Drawing.Printing\PrintDocument.cs" />
<Compile Include="System.Drawing.Printing\PrinterResolution.cs" />
<Compile Include="System.Drawing.Printing\PrinterResolutionKind.cs" />
<Compile Include="System.Drawing.Printing\PrinterSettings.cs" />
<Compile Include="System.Drawing.Printing\PrinterUnit.cs" />
<Compile Include="System.Drawing.Printing\PrinterUnitConvert.cs" />
<Compile Include="System.Drawing.Printing\PrintEventArgs.cs" />
<Compile Include="System.Drawing.Printing\PrintEventHandler.cs" />
<Compile Include="System.Drawing.Printing\PrintingPermission.cs" />
<Compile Include="System.Drawing.Printing\PrintingPermissionAttribute.cs" />
<Compile Include="System.Drawing.Printing\PrintingPermissionLevel.cs" />
<Compile Include="System.Drawing.Printing\PrintingServices.cs" />
<Compile Include="System.Drawing.Printing\PrintingServicesUnix.cs" />
<Compile Include="System.Drawing.Printing\PrintingServicesWin32.cs" />
<Compile Include="System.Drawing.Printing\PrintPageEventArgs.cs" />
<Compile Include="System.Drawing.Printing\PrintPageEventHandler.cs" />
<Compile Include="System.Drawing.Printing\PrintRange.cs" />
<Compile Include="System.Drawing.Printing\QueryPageSettingsEventArgs.cs" />
<Compile Include="System.Drawing.Printing\QueryPageSettingsEventHandler.cs" />
<Compile Include="System.Drawing.Printing\StandardPrintController.cs" />
<Compile Include="System.Drawing.Text\FontCollection.cs" />
<Compile Include="System.Drawing.Text\GenericFontFamilies.cs" />
<Compile Include="System.Drawing.Text\HotkeyPrefix.cs" />
<Compile Include="System.Drawing.Text\InstalledFontCollection.cs" />
<Compile Include="System.Drawing.Text\PrivateFontCollection.cs" />
<Compile Include="System.Drawing.Text\TextRenderingHint.cs" />
<Compile Include="System.Drawing\Bitmap.cs" />
<Compile Include="System.Drawing\BitmapSuffixInSameAssemblyAttribute.cs" />
<Compile Include="System.Drawing\BitmapSuffixInSatelliteAssemblyAttribute.cs" />
<Compile Include="System.Drawing\Brush.cs" />
<Compile Include="System.Drawing\Brushes.cs" />
<Compile Include="System.Drawing\BufferedGraphics.cs" />
<Compile Include="System.Drawing\BufferedGraphicsContext.cs" />
@@ -198,10 +234,10 @@
<Compile Include="System.Drawing\ComIStreamWrapper.cs" />
<Compile Include="System.Drawing\ContentAlignment.cs" />
<Compile Include="System.Drawing\CopyPixelOperation.cs" />
<Compile Include="System.Drawing\ExternDll.cs" />
<Compile Include="System.Drawing\Font.cs" />
<Compile Include="System.Drawing\FontConverter.cs" />
<Compile Include="System.Drawing\FontFamily.cs" />
<Compile Include="System.Drawing\FontStyle.cs" />
<Compile Include="System.Drawing\gdipEnums.cs" />
<Compile Include="System.Drawing\gdipFunctions.cs" />
<Compile Include="System.Drawing\gdipStructs.cs" />
@@ -209,7 +245,6 @@
<Compile Include="System.Drawing\GraphicsUnit.cs" />
<Compile Include="System.Drawing\Icon.cs" />
<Compile Include="System.Drawing\IconConverter.cs" />
<Compile Include="System.Drawing\IDeviceContext.cs" />
<Compile Include="System.Drawing\Image.cs" />
<Compile Include="System.Drawing\ImageAnimator.cs" />
<Compile Include="System.Drawing\ImageConverter.cs" />
@@ -226,25 +261,17 @@
<Compile Include="System.Drawing\RectangleConverter.cs" />
<Compile Include="System.Drawing\RectangleF.cs" />
<Compile Include="System.Drawing\Region.cs" />
<Compile Include="System.Drawing\RotateFlipType.cs" />
<Compile Include="System.Drawing\Size.cs" />
<Compile Include="System.Drawing\SizeConverter.cs" />
<Compile Include="System.Drawing\SizeF.cs" />
<Compile Include="System.Drawing\SizeFConverter.cs" />
<Compile Include="System.Drawing\SolidBrush.cs" />
<Compile Include="System.Drawing\SR.cs" />
<Compile Include="System.Drawing\SRDescriptionAttribute.cs" />
<Compile Include="System.Drawing\StringAligment.cs" />
<Compile Include="System.Drawing\StringDigitSubstitute.cs" />
<Compile Include="System.Drawing\StringFormat.cs" />
<Compile Include="System.Drawing\StringFormatFlags.cs" />
<Compile Include="System.Drawing\StringTrimming.cs" />
<Compile Include="System.Drawing\StringUnit.cs" />
<Compile Include="System.Drawing\SystemBrushes.cs" />
<Compile Include="System.Drawing\SystemColors.cs" />
<Compile Include="System.Drawing\SystemFonts.cs" />
<Compile Include="System.Drawing\SystemIcons.cs" />
<Compile Include="System.Drawing\SystemPens.cs" />
<Compile Include="System.Drawing\TextureBrush.cs" />
<Compile Include="System.Drawing\ToolboxBitmapAttribute.cs" />␍ </ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -1,77 +0,0 @@
//
// System.Drawing.Design.CategoryNameCollection.cs
//
// Authors:
// Alejandro Sánchez Acosta
// Andreas Nahr ([email protected])
//
// (C) Alejandro Sánchez Acosta
// (C) 2003 Andreas Nahr
//
//
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
namespace System.Drawing.Design
{
public sealed class CategoryNameCollection : ReadOnlyCollectionBase
{
public CategoryNameCollection (CategoryNameCollection value)
{
if (value == null)
throw new ArgumentNullException ("value");
InnerList.AddRange (value);
}
public CategoryNameCollection (string[] value)
{
if (value == null)
throw new ArgumentNullException ("value");
InnerList.AddRange (value);
}
public string this[int index] {
get {
return (string) InnerList[index];
}
}
public bool Contains (string value)
{
return InnerList.Contains (value);
}
public void CopyTo (string[] array, int index)
{
InnerList.CopyTo (array, index);
}
public int IndexOf (string value)
{
return InnerList.IndexOf (value);
}
}
}
@@ -1,54 +0,0 @@
// System.Drawing.Design.IPropertyValueUIService.cs
//
// Author:
// Alejandro Sánchez Acosta <[email protected]>
//
// (C) Alejandro Sánchez Acosta
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Drawing;
using System.ComponentModel;
namespace System.Drawing.Design
{
public interface IPropertyValueUIService
{
#region Methods
void AddPropertyValueUIHandler (PropertyValueUIHandler newHandler);
PropertyValueUIItem[] GetPropertyUIValueItems (ITypeDescriptorContext context, PropertyDescriptor propDesc);
void NotifyPropertyValueUIItemsChanged ();
void RemovePropertyValueUIHandler (PropertyValueUIHandler newHandler);
#endregion Methods
#region Events
event EventHandler PropertyUIValueItemsChanged;
#endregion Events
}
}
@@ -1,38 +0,0 @@
//
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// Authors:
//
// Jordi Mas i Hernandez <[email protected]>
//
//
namespace System.Drawing.Design
{
public interface IToolboxItemProvider
{
ToolboxItemCollection Items { get; }
}
}
@@ -1,101 +0,0 @@
//
// System.Drawing.Design.IToolboxService.cs
//
// Authors:
// Alejandro Sánchez Acosta <[email protected]>
// Andreas Nahr ([email protected])
//
// (C) Alejandro Sánchez Acosta
// (C) 2003 Andreas Nahr
// Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
using System.ComponentModel.Design;
using System.Runtime.InteropServices;
namespace System.Drawing.Design {
[ComImport]
[Guid("4BACD258-DE64-4048-BC4E-FEDBEF9ACB76"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IToolboxService
{
CategoryNameCollection CategoryNames {get;}
string SelectedCategory {get; set;}
void AddCreator (ToolboxItemCreatorCallback creator, string format);
void AddCreator (ToolboxItemCreatorCallback creator, string format, IDesignerHost host);
void AddLinkedToolboxItem (ToolboxItem toolboxItem, IDesignerHost host);
void AddLinkedToolboxItem (ToolboxItem toolboxItem, string category, IDesignerHost host);
void AddToolboxItem (ToolboxItem toolboxItem, String category);
void AddToolboxItem (ToolboxItem toolboxItem);
ToolboxItem DeserializeToolboxItem (object serializedObject);
ToolboxItem DeserializeToolboxItem (object serializedObject, IDesignerHost host);
ToolboxItem GetSelectedToolboxItem ();
ToolboxItem GetSelectedToolboxItem (IDesignerHost host);
ToolboxItemCollection GetToolboxItems ();
ToolboxItemCollection GetToolboxItems (IDesignerHost host);
ToolboxItemCollection GetToolboxItems (String category);
ToolboxItemCollection GetToolboxItems (String category, IDesignerHost host);
bool IsSupported (object serializedObject, ICollection filterAttributes);
bool IsSupported (object serializedObject, IDesignerHost host);
bool IsToolboxItem (object serializedObject);
bool IsToolboxItem (object serializedObject, IDesignerHost host);
void Refresh();
void RemoveCreator (string format);
void RemoveCreator (string format, IDesignerHost host);
void RemoveToolboxItem (ToolboxItem toolboxItem);
void RemoveToolboxItem (ToolboxItem toolboxItem, string category);
void SelectedToolboxItemUsed ();
object SerializeToolboxItem (ToolboxItem toolboxItem);
bool SetCursor ();
void SetSelectedToolboxItem (ToolboxItem toolboxItem);
}
}
@@ -1,40 +0,0 @@
// System.Drawing.Design.IToolboxUser.cs
//
// Author:
// Alejandro Sánchez Acosta <[email protected]>
//
// (C) Alejandro Sánchez Acosta
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Design
{
public interface IToolboxUser
{
bool GetToolSupported (ToolboxItem tool);
void ToolPicked (ToolboxItem tool);
}
}
@@ -1,82 +0,0 @@
// System.Drawing.Design.PaintvalueEventArgs.cs
//
// Author:
// Alejandro Sánchez Acosta <[email protected]>
//
// (C) Alejandro Sánchez Acosta
//
//
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.ComponentModel;
namespace System.Drawing.Design
{
public class PaintValueEventArgs : EventArgs
{
private ITypeDescriptorContext context;
private object value;
private Graphics graphics;
private Rectangle bounds;
public PaintValueEventArgs(ITypeDescriptorContext context, object value, Graphics graphics, Rectangle bounds)
{
if (graphics == null)
throw new ArgumentNullException ("graphics");
this.context = context;
this.value = value;
this.graphics = graphics;
this.bounds = bounds;
}
public Rectangle Bounds
{
get {
return bounds;
}
}
public ITypeDescriptorContext Context
{
get {
return context;
}
}
public Graphics Graphics
{
get {
return graphics;
}
}
public object Value
{
get {
return value;
}
}
}
}
@@ -1,85 +0,0 @@
//
// System.Drawing.Design.PropertyValueItem.cs
//
// Authors:
// Alejandro Sánchez Acosta <[email protected]>
// Andreas Nahr ([email protected])
//
// (C) Alejandro Sánchez Acosta
// (C) 2003 Andreas Nahr
//
//
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Design
{
public class PropertyValueUIItem
{
private Image uiItemImage;
private PropertyValueUIItemInvokeHandler handler;
private string tooltip;
public PropertyValueUIItem (Image uiItemImage,
PropertyValueUIItemInvokeHandler handler, string tooltip)
{
if (uiItemImage == null)
throw new ArgumentNullException ("uiItemImage");
if (handler == null)
throw new ArgumentNullException ("handler");
this.uiItemImage = uiItemImage;
this.handler = handler;
this.tooltip = tooltip;
}
public virtual Image Image
{
get
{
return uiItemImage;
}
}
public virtual PropertyValueUIItemInvokeHandler InvokeHandler
{
get
{
return handler;
}
}
public virtual string ToolTip
{
get
{
return tooltip;
}
}
public virtual void Reset()
{
// To be overriden in child classes
}
}
}
@@ -1,35 +0,0 @@
// System.Drawing.Design.PropertyValueUIHandler.cs
//
// Author:
// Alejandro Sánchez Acosta <[email protected]>
//
// (C) Alejandro Sánchez Acosta
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
using System.ComponentModel;
namespace System.Drawing.Design {
public delegate void PropertyValueUIHandler (ITypeDescriptorContext context, PropertyDescriptor propDesc, ArrayList valueUIItemList);
}
@@ -1,37 +0,0 @@
// System.Drawing.Design.PropertyValueUIItemInvokeHandler.cs
//
// Author:
// Alejandro Sánchez Acosta <[email protected]>
//
// (C) Alejandro Sánchez Acosta
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.ComponentModel;
namespace System.Drawing.Design {
public delegate void PropertyValueUIItemInvokeHandler (
ITypeDescriptorContext context,
PropertyDescriptor descriptor,
PropertyValueUIItem invokedItem);
}
@@ -1,51 +0,0 @@
// System.Drawing.Design.ToolboxComponentsCreatedEventArgs.cs
//
// Author:
// Alejandro Sánchez Acosta <[email protected]>
//
// (C) Alejandro Sánchez Acosta
//
//
//
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.ComponentModel;
namespace System.Drawing.Design
{
public class ToolboxComponentsCreatedEventArgs : EventArgs
{
private IComponent[] components;
public ToolboxComponentsCreatedEventArgs (IComponent[] components) {
this.components = components;
}
public IComponent[] Components {
get {
return components;
}
}
}
}
@@ -1,33 +0,0 @@
// System.Drawing.Design.IDesignerHost.cs
//
// Author:
// Alejandro Sánchez Acosta <[email protected]>
//
// (C) Alejandro Sánchez Acosta
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Design {
public delegate void ToolboxComponentsCreatedEventHandler (object sender, ToolboxComponentsCreatedEventArgs e);
}
@@ -1,57 +0,0 @@
//
// System.Drawing.Design.ToolboxComponentsCreatingEventArgs.cs
//
// Author:
// Alejandro Sánchez Acosta <[email protected]>
//
// (C) Alejandro Sánchez Acosta
//
//
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.ComponentModel.Design;
using System.Security.Permissions;
namespace System.Drawing.Design
{
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class ToolboxComponentsCreatingEventArgs : EventArgs
{
private IDesignerHost host;
public ToolboxComponentsCreatingEventArgs (IDesignerHost host)
{
this.host = host;
}
public IDesignerHost DesignerHost {
get {
return host;
}
}
}
}
@@ -1,32 +0,0 @@
// System.Drawing.Design.ToolboxComponentsCreatingEventHandler.cs
//
// Author:
// Alejandro Sánchez Acosta <[email protected]>
//
// (C) Alejandro Sánchez Acosta
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Design {
public delegate void ToolboxComponentsCreatingEventHandler (object sender, ToolboxComponentsCreatingEventArgs e);
}
@@ -1,73 +0,0 @@
//
// System.Drawing.Design.ToolboxItemCollection.cs
//
// Authors:
// Martin Willemoes Hansen ([email protected])
// Andreas Nahr ([email protected])
//
// (C) 2003 Martin Willemoes Hansen
// (C) 2003 Andreas Nahr
//
//
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections;
using System.Security.Permissions;
namespace System.Drawing.Design
{
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
public sealed class ToolboxItemCollection : ReadOnlyCollectionBase
{
public ToolboxItemCollection (ToolboxItem[] value) : base()
{
InnerList.AddRange (value);
}
public ToolboxItemCollection (ToolboxItemCollection value) : base()
{
InnerList.AddRange (value);
}
public ToolboxItem this [int index] {
get { return (ToolboxItem) InnerList[index]; }
}
public bool Contains (ToolboxItem value)
{
return InnerList.Contains (value);
}
public void CopyTo (ToolboxItem[] array, int index)
{
InnerList.CopyTo (array, index);
}
public int IndexOf (ToolboxItem value)
{
return InnerList.IndexOf (value);
}
}
}
@@ -1,34 +0,0 @@
// System.Drawing.Design.ToolboxItemCreatorCallback.cs
//
// Author:
// Alejandro Sánchez Acosta <[email protected]>
//
// (C) Alejandro Sánchez Acosta
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Design {
public delegate ToolboxItem ToolboxItemCreatorCallback(
object serializedObject,
string format);
}
@@ -1,104 +0,0 @@
//
// System.Drawing.Design.UITypeEditor.cs
//
// Authors:
// Alan Tam Siu Lung <[email protected]>
// Andreas Nahr ([email protected])
//
// (C) 2003 Alan Tam Siu Lung <[email protected]>
// (C) 2003 Andreas Nahr
// Copyright (C) 2004-2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.ComponentModel;
using System.Collections;
namespace System.Drawing.Design
{
public class UITypeEditor {
static UITypeEditor ()
{
Hashtable editors = new Hashtable ();
editors [typeof (Array)] = "System.ComponentModel.Design.ArrayEditor, " + Consts.AssemblySystem_Design;
editors [typeof (byte [])] = "System.ComponentModel.Design.BinaryEditor, " + Consts.AssemblySystem_Design;
editors [typeof (DateTime)] = "System.ComponentModel.Design.DateTimeEditor, " + Consts.AssemblySystem_Design;
editors [typeof (IList)] = "System.ComponentModel.Design.CollectionEditor, " + Consts.AssemblySystem_Design;
editors [typeof (ICollection)] = "System.ComponentModel.Design.CollectionEditor, " + Consts.AssemblySystem_Design;
editors [typeof (string[])] = "System.Windows.Forms.Design.StringArrayEditor, " + Consts.AssemblySystem_Design;
#if !MOBILE
TypeDescriptor.AddEditorTable (typeof (UITypeEditor), editors);
#endif
}
public UITypeEditor()
{
}
public virtual object EditValue (ITypeDescriptorContext context,
IServiceProvider provider, object value)
{
// We already stated that we can't edit ;)
return value;
}
public object EditValue (IServiceProvider provider, object value)
{
return EditValue (null, provider, value);
}
public virtual UITypeEditorEditStyle GetEditStyle (ITypeDescriptorContext context)
{
return UITypeEditorEditStyle.None;
}
public UITypeEditorEditStyle GetEditStyle ()
{
return GetEditStyle (null);
}
public bool GetPaintValueSupported ()
{
return GetPaintValueSupported (null);
}
public virtual bool GetPaintValueSupported (ITypeDescriptorContext context)
{
return false;
}
public void PaintValue (object value, Graphics canvas, Rectangle rectangle)
{
PaintValue (new PaintValueEventArgs (null, value, canvas, rectangle));
}
public virtual void PaintValue (PaintValueEventArgs e)
{
// LAMESPEC: Did not find info in the docs if this should do something here.
// Usually you would expect, that this class gets inherited and this overridden,
// but on the other hand the class is not abstract. Could never observe it did paint anything
return;
}
public virtual bool IsDropDownResizable {
get { return false; }
}
}
}
@@ -1,38 +0,0 @@
//
// System.Drawing.Design.UITypeEditorEditStyle.cs
//
// (C) 2001 Ximian, Inc. http://www.ximian.com
// Author: Dennis Hayes ([email protected])
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Drawing.Design
{
public enum UITypeEditorEditStyle{
DropDown=3,
Modal=2,
None=1
}
}
@@ -1,122 +0,0 @@
//
// System.Drawing.Drawing2D.AdjustableArrowCap.cs
//
// Authors:
// Dennis Hayes ([email protected])
// Ravindra ([email protected])
//
// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com
// Copyright (C) 2004 Novell, Inc. http://www.novell.com
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Drawing.Drawing2D
{
/// <summary>
/// Summary description for AdjustableArrowCap.
/// </summary>
public sealed class AdjustableArrowCap : CustomLineCap
{
// Constructors
internal AdjustableArrowCap (IntPtr ptr) : base (ptr)
{
}
public AdjustableArrowCap (float width, float height) : this (width, height, true)
{
}
public AdjustableArrowCap (float width, float height, bool isFilled)
{
Status status = GDIPlus.GdipCreateAdjustableArrowCap (height, width, isFilled, out nativeObject);
GDIPlus.CheckStatus (status);
}
// Public Properities
public bool Filled {
get {
bool isFilled;
Status status = GDIPlus.GdipGetAdjustableArrowCapFillState (nativeObject, out isFilled);
GDIPlus.CheckStatus (status);
return isFilled;
}
set {
Status status = GDIPlus.GdipSetAdjustableArrowCapFillState (nativeObject, value);
GDIPlus.CheckStatus (status);
}
}
public float Width {
get {
float width;
Status status = GDIPlus.GdipGetAdjustableArrowCapWidth (nativeObject, out width);
GDIPlus.CheckStatus (status);
return width;
}
set {
Status status = GDIPlus.GdipSetAdjustableArrowCapWidth (nativeObject, value);
GDIPlus.CheckStatus (status);
}
}
public float Height {
get {
float height;
Status status = GDIPlus.GdipGetAdjustableArrowCapHeight (nativeObject, out height);
GDIPlus.CheckStatus (status);
return height;
}
set {
Status status = GDIPlus.GdipSetAdjustableArrowCapHeight (nativeObject, value);
GDIPlus.CheckStatus (status);
}
}
public float MiddleInset {
get {
float middleInset;
Status status = GDIPlus.GdipGetAdjustableArrowCapMiddleInset (nativeObject, out middleInset);
GDIPlus.CheckStatus (status);
return middleInset;
}
set {
Status status = GDIPlus.GdipSetAdjustableArrowCapMiddleInset (nativeObject, value);
GDIPlus.CheckStatus (status);
}
}
}
}
@@ -1,78 +0,0 @@
//
// System.Drawing.Drawing2D.Blend.cs
//
// Authors:
// Dennis Hayes ([email protected])
// Ravindra ([email protected])
//
// (C) 2002/3 Ximian, Inc. http://www.ximian.com
// (C) 2004 Novell, Inc. http://www.novell.com
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Drawing.Drawing2D
{
/// <summary>
/// Summary description for Blend.
/// </summary>
public sealed class Blend
{
private float [] positions;
private float [] factors;
public Blend ()
{
positions = new float [1];
factors = new float [1];
}
public Blend (int count)
{
positions = new float [count];
factors = new float [count];
}
public float [] Factors {
get {
return factors;
}
set {
factors = value;
}
}
public float [] Positions {
get {
return positions;
}
set {
positions = value;
}
}
}
}
@@ -1,70 +0,0 @@
//
// System.Drawing.Drawing2D.ColorBlend.cs
//
// Authors:
// Dennis Hayes ([email protected])
// Ravindra ([email protected])
//
// (C) 2002/3 Ximian, Inc. http://www.ximian.com
// Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D
{
public sealed class ColorBlend
{
private float [] positions;
private Color [] colors;
public ColorBlend ()
{
positions = new float [1];
colors = new Color [1];
}
public ColorBlend (int count)
{
positions = new float [count];
colors = new Color [count];
}
public Color [] Colors {
get {
return colors;
}
set {
colors = value;
}
}
public float [] Positions {
get {
return positions;
}
set {
positions = value;
}
}
}
}
@@ -1,41 +0,0 @@
//
// System.Drawing.Drawing2D.CombineMode.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public enum CombineMode {
Complement = 5,
Exclude = 4,
Intersect = 1,
Replace = 0,
Union = 2,
Xor = 3
}
}
@@ -1,37 +0,0 @@
//
// System.Drawing.Drawing2D.CompostingMode.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public enum CompositingMode {
SourceCopy = 1,
SourceOver = 0
}
}
@@ -1,41 +0,0 @@
//
// System.Drawing.Drawing2D.CompostingQuality.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public enum CompositingQuality {
AssumeLinear = 4,
Default = 0,
GammaCorrected = 3,
HighQuality = 2,
HighSpeed = 1,
Invalid = -1
}
}
@@ -1,38 +0,0 @@
//
// System.Drawing.Drawing2D.CoordinateSpace.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public enum CoordinateSpace {
Device = 2,
Page = 1,
World = 0
}
}
@@ -1,176 +0,0 @@
//
// System.Drawing.Drawing2D.CustomLineCap.cs
//
// Authors:
// Dennis Hayes ([email protected])
// Andreas Nahr ([email protected])
// Ravindra ([email protected])
//
// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public class CustomLineCap : MarshalByRefObject, ICloneable, IDisposable
{
private bool disposed;
internal IntPtr nativeObject;
// Constructors
internal CustomLineCap ()
{
}
internal CustomLineCap (IntPtr ptr)
{
nativeObject = ptr;
}
public CustomLineCap (GraphicsPath fillPath, GraphicsPath strokePath) : this (fillPath, strokePath, LineCap.Flat, 0)
{
}
public CustomLineCap (GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap) : this (fillPath, strokePath, baseCap, 0)
{
}
public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap, float baseInset)
{
IntPtr fill = IntPtr.Zero;
IntPtr stroke = IntPtr.Zero;
if (fillPath != null)
fill = fillPath.nativePath;
if (strokePath != null)
stroke = strokePath.nativePath;
Status status = GDIPlus.GdipCreateCustomLineCap (fill, stroke, baseCap, baseInset, out nativeObject);
GDIPlus.CheckStatus (status);
}
public LineCap BaseCap {
get {
LineCap baseCap;
Status status = GDIPlus.GdipGetCustomLineCapBaseCap (nativeObject, out baseCap);
GDIPlus.CheckStatus (status);
return baseCap;
}
set {
Status status = GDIPlus.GdipSetCustomLineCapBaseCap (nativeObject, value);
GDIPlus.CheckStatus (status);
}
}
public LineJoin StrokeJoin {
get {
LineJoin strokeJoin;
Status status = GDIPlus.GdipGetCustomLineCapStrokeJoin (nativeObject, out strokeJoin);
GDIPlus.CheckStatus (status);
return strokeJoin;
}
set {
Status status = GDIPlus.GdipSetCustomLineCapStrokeJoin (nativeObject, value);
GDIPlus.CheckStatus (status);
}
}
public float BaseInset {
get {
float baseInset;
Status status = GDIPlus.GdipGetCustomLineCapBaseInset (nativeObject, out baseInset);
GDIPlus.CheckStatus (status);
return baseInset;
}
set {
Status status = GDIPlus.GdipSetCustomLineCapBaseInset (nativeObject, value);
GDIPlus.CheckStatus (status);
}
}
public float WidthScale {
get {
float widthScale;
Status status = GDIPlus.GdipGetCustomLineCapWidthScale (nativeObject, out widthScale);
GDIPlus.CheckStatus (status);
return widthScale;
}
set {
Status status = GDIPlus.GdipSetCustomLineCapWidthScale (nativeObject, value);
GDIPlus.CheckStatus (status);
}
}
// Public Methods
public object Clone ()
{
IntPtr clonePtr;
Status status = GDIPlus.GdipCloneCustomLineCap (nativeObject, out clonePtr);
GDIPlus.CheckStatus (status);
return new CustomLineCap (clonePtr);
}
public void Dispose ()
{
Dispose (true);
System.GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (! disposed) {
Status status = GDIPlus.GdipDeleteCustomLineCap (nativeObject);
GDIPlus.CheckStatus (status);
disposed = true;
nativeObject = IntPtr.Zero;
}
}
~CustomLineCap ()
{
Dispose (false);
}
public void GetStrokeCaps (out LineCap startCap, out LineCap endCap)
{
Status status = GDIPlus.GdipGetCustomLineCapStrokeCaps (nativeObject, out startCap, out endCap);
GDIPlus.CheckStatus (status);
}
public void SetStrokeCaps(LineCap startCap, LineCap endCap)
{
Status status = GDIPlus.GdipSetCustomLineCapStrokeCaps (nativeObject, startCap, endCap);
GDIPlus.CheckStatus (status);
}
}
}
@@ -1,38 +0,0 @@
//
// System.Drawing.Drawing2D.DashCap.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public enum DashCap {
Flat,
Round = 2,
Triangle = 3
}
}
@@ -1,40 +0,0 @@
//
// System.Drawing.Drawing2D.DashStyle.cs
//
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public enum DashStyle {
Custom = 5,
Dash = 1,
DashDot = 3,
DashDotDot = 4,
Dot = 2,
Solid = 0
}
}
@@ -1,37 +0,0 @@
//
// System.Drawing.Drawing2D.FillMode.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public enum FillMode {
Alternate = 0,
Winding = 1
}
}
@@ -1,37 +0,0 @@
//
// System.Drawing.Drawing2D.FlushIntention.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public enum FlushIntention {
Flush = 0,
Sync = 1
}
}
@@ -630,7 +630,7 @@ namespace System.Drawing.Drawing2D
IntPtr sformat = (format == null) ? IntPtr.Zero : format.NativeObject;
// note: the NullReferenceException on s.Length is the expected (MS) exception
Status status = GDIPlus.GdipAddPathStringI (nativePath, s, s.Length, family.NativeObject, style, emSize, ref layoutRect, sformat);
Status status = GDIPlus.GdipAddPathStringI (nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat);
GDIPlus.CheckStatus (status);
}
@@ -642,7 +642,7 @@ namespace System.Drawing.Drawing2D
IntPtr sformat = (format == null) ? IntPtr.Zero : format.NativeObject;
// note: the NullReferenceException on s.Length is the expected (MS) exception
Status status = GDIPlus.GdipAddPathString (nativePath, s, s.Length, family.NativeObject, style, emSize, ref layoutRect, sformat);
Status status = GDIPlus.GdipAddPathString (nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat);
GDIPlus.CheckStatus (status);
}
@@ -699,7 +699,7 @@ namespace System.Drawing.Drawing2D
{
RectangleF retval;
IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix;
IntPtr p = (pen == null) ? IntPtr.Zero : pen.nativeObject;
IntPtr p = (pen == null) ? IntPtr.Zero : pen.NativePen;
Status s = GDIPlus.GdipGetPathWorldBounds (nativePath, out retval, m, p);
@@ -746,7 +746,7 @@ namespace System.Drawing.Drawing2D
bool result;
IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject;
Status s = GDIPlus.GdipIsOutlineVisiblePathPointI (nativePath, x, y, pen.nativeObject, g, out result);
Status s = GDIPlus.GdipIsOutlineVisiblePathPointI (nativePath, x, y, pen.NativePen, g, out result);
GDIPlus.CheckStatus (s);
return result;
@@ -760,7 +760,7 @@ namespace System.Drawing.Drawing2D
bool result;
IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject;
Status s = GDIPlus.GdipIsOutlineVisiblePathPoint (nativePath, x, y, pen.nativeObject, g, out result);
Status s = GDIPlus.GdipIsOutlineVisiblePathPoint (nativePath, x, y, pen.NativePen, g, out result);
GDIPlus.CheckStatus (s);
return result;
@@ -889,7 +889,7 @@ namespace System.Drawing.Drawing2D
return;
IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix;
Status s = GDIPlus.GdipWidenPath (nativePath, pen.nativeObject, m, flatness);
Status s = GDIPlus.GdipWidenPath (nativePath, pen.NativePen, m, flatness);
GDIPlus.CheckStatus (s);
}
}
@@ -1,208 +0,0 @@
//
// System.Drawing.Drawing2D.GraphicsPathIterator.cs
//
// Author:
// Dennis Hayes ([email protected])
// Duncan Mak ([email protected])
// Ravindra ([email protected])
//
// Copyright (C) 2002/3 Ximian, Inc (http://www.ximian.com)
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Drawing;
namespace System.Drawing.Drawing2D
{
public sealed class GraphicsPathIterator : MarshalByRefObject, IDisposable
{
private IntPtr nativeObject = IntPtr.Zero;
// Constructors
internal GraphicsPathIterator (IntPtr native)
{
this.nativeObject = native;
}
public GraphicsPathIterator (GraphicsPath path)
{
if (path != null) {
Status status = GDIPlus.GdipCreatePathIter (out nativeObject, path.NativeObject);
GDIPlus.CheckStatus (status);
}
}
internal IntPtr NativeObject {
get {
return nativeObject;
}
set {
nativeObject = value;
}
}
// Public Properites
public int Count {
get {
if (nativeObject == IntPtr.Zero)
return 0;
int count;
Status status = GDIPlus.GdipPathIterGetCount (nativeObject, out count);
GDIPlus.CheckStatus (status);
return count;
}
}
public int SubpathCount {
get {
int count;
Status status = GDIPlus.GdipPathIterGetSubpathCount (nativeObject, out count);
GDIPlus.CheckStatus (status);
return count;
}
}
internal void Dispose (bool disposing)
{
Status status;
if (nativeObject != IntPtr.Zero) {
status = GDIPlus.GdipDeletePathIter (nativeObject);
GDIPlus.CheckStatus (status);
nativeObject = IntPtr.Zero;
}
}
// Public Methods.
public int CopyData (ref PointF [] points, ref byte [] types, int startIndex, int endIndex)
{
Status status;
int resultCount;
// no null checks, MS throws a NullReferenceException here
if (points.Length != types.Length)
throw new ArgumentException ("Invalid arguments passed. Both arrays should have the same length.");
status = GDIPlus.GdipPathIterCopyData (nativeObject, out resultCount, points, types, startIndex, endIndex);
GDIPlus.CheckStatus (status);
return resultCount;
}
public void Dispose ()
{
Dispose (true);
System.GC.SuppressFinalize (this);
}
~GraphicsPathIterator ()
{
Dispose (false);
}
public int Enumerate (ref PointF [] points, ref byte [] types)
{
Status status;
int resultCount;
// no null checks, MS throws a NullReferenceException here
int count = points.Length;
if (count != types.Length)
throw new ArgumentException ("Invalid arguments passed. Both arrays should have the same length.");
status = GDIPlus.GdipPathIterEnumerate (nativeObject, out resultCount, points, types, count);
GDIPlus.CheckStatus (status);
return resultCount;
}
public bool HasCurve ()
{
bool curve;
Status status = GDIPlus.GdipPathIterHasCurve (nativeObject, out curve);
GDIPlus.CheckStatus (status);
return curve;
}
public int NextMarker (GraphicsPath path)
{
int resultCount;
IntPtr ptr = (path == null) ? IntPtr.Zero : path.NativeObject;
Status status = GDIPlus.GdipPathIterNextMarkerPath (nativeObject, out resultCount, ptr);
GDIPlus.CheckStatus (status);
return resultCount;
}
public int NextMarker (out int startIndex, out int endIndex)
{
Status status;
int resultCount;
status = GDIPlus.GdipPathIterNextMarker (nativeObject, out resultCount, out startIndex, out endIndex);
GDIPlus.CheckStatus (status);
return resultCount;
}
public int NextPathType (out byte pathType, out int startIndex, out int endIndex)
{
Status status;
int resultCount;
status = GDIPlus.GdipPathIterNextPathType (nativeObject, out resultCount, out pathType, out startIndex, out endIndex);
GDIPlus.CheckStatus (status);
return resultCount;
}
public int NextSubpath (GraphicsPath path, out bool isClosed)
{
int resultCount;
IntPtr ptr = (path == null) ? IntPtr.Zero : path.NativeObject;
Status status = GDIPlus.GdipPathIterNextSubpathPath (nativeObject, out resultCount, ptr, out isClosed);
GDIPlus.CheckStatus (status);
return resultCount;
}
public int NextSubpath (out int startIndex, out int endIndex, out bool isClosed)
{
Status status;
int resultCount;
status = GDIPlus.GdipPathIterNextSubpath (nativeObject, out resultCount, out startIndex, out endIndex, out isClosed);
GDIPlus.CheckStatus (status);
return resultCount;
}
public void Rewind ()
{
Status status = GDIPlus.GdipPathIterRewind (nativeObject);
GDIPlus.CheckStatus (status);
}
}
}
@@ -1,51 +0,0 @@
//
// System.Drawing.Drawing2D.GraphicsState.cs
//
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Drawing.Drawing2D {
/// <summary>
/// Summary description for GraphicsState.
/// </summary>
public sealed class GraphicsState : MarshalByRefObject
{
// All members inherited
internal uint nativeState;
// Constructor
internal GraphicsState()
{
// Nothing to be done here
}
}
}
@@ -1,97 +0,0 @@
//
// System.Drawing.Drawing2D.HatchBrush.cs
//
// Authors:
// Dennis Hayes ([email protected])
// Ravindra ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2004 Novell, Inc.
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Drawing.Drawing2D
{
/// <summary>
/// Summary description for HatchBrush.
/// </summary>
public sealed class HatchBrush : Brush
{
internal HatchBrush (IntPtr ptr) : base (ptr)
{
}
public HatchBrush (HatchStyle hatchstyle, Color foreColor)
: this (hatchstyle, foreColor, Color.Black)
{
}
public HatchBrush(HatchStyle hatchstyle, Color foreColor, Color backColor)
{
Status status = GDIPlus.GdipCreateHatchBrush (hatchstyle, foreColor.ToArgb (), backColor.ToArgb (), out nativeObject);
GDIPlus.CheckStatus (status);
}
public Color BackgroundColor {
get {
int argb;
Status status = GDIPlus.GdipGetHatchBackgroundColor (nativeObject, out argb);
GDIPlus.CheckStatus (status);
return Color.FromArgb (argb);
}
}
public Color ForegroundColor {
get {
int argb;
Status status = GDIPlus.GdipGetHatchForegroundColor (nativeObject, out argb);
GDIPlus.CheckStatus (status);
return Color.FromArgb (argb);
}
}
public HatchStyle HatchStyle {
get {
HatchStyle hatchStyle;
Status status = GDIPlus.GdipGetHatchStyle (nativeObject, out hatchStyle);
GDIPlus.CheckStatus (status);
return hatchStyle;
}
}
public override object Clone ()
{
IntPtr clonePtr;
Status status = GDIPlus.GdipCloneBrush (nativeObject, out clonePtr);
GDIPlus.CheckStatus (status);
HatchBrush clone = new HatchBrush (clonePtr);
return clone;
}
}
}
@@ -1,92 +0,0 @@
//
// System.Drawing.Drawing2D.HatchStyle.cs
//
// Authors:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
// Ravindra ([email protected])
//
// (C) 2002/3 Ximian, Inc.
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public enum HatchStyle {
BackwardDiagonal = 3,
Cross = LargeGrid,
DarkDownwardDiagonal = 20,
DarkHorizontal = 29,
DarkUpwardDiagonal = 21,
DarkVertical = 28,
DashedDownwardDiagonal = 30,
DashedHorizontal = 32,
DashedUpwardDiagonal = 31,
DashedVertical = 33,
DiagonalBrick = 38,
DiagonalCross = 5,
Divot = 42,
DottedDiamond = 44,
DottedGrid = 43,
ForwardDiagonal = 2,
Horizontal = 0,
HorizontalBrick = 39,
LargeCheckerBoard = 50,
LargeConfetti = 35,
LargeGrid = 4,
LightDownwardDiagonal = 18,
LightHorizontal = 25,
LightUpwardDiagonal = 19,
LightVertical = 24,
Max = 4,
Min = 0,
NarrowHorizontal = 27,
NarrowVertical = 26,
OutlinedDiamond = 51,
Percent05 = 6,
Percent10 = 7,
Percent20 = 8,
Percent25 = 9,
Percent30 = 10,
Percent40 = 11,
Percent50 = 12,
Percent60 = 13,
Percent70 = 14,
Percent75 = 15,
Percent80 = 16,
Percent90 = 17,
Plaid = 41,
Shingle = 45,
SmallCheckerBoard = 49,
SmallConfetti = 34,
SmallGrid = 48,
SolidDiamond = 52,
Sphere = 47,
Trellis = 46,
Vertical = 1,
Wave = 37,
Weave = 40,
WideDownwardDiagonal = 22,
WideUpwardDiagonal = 23,
ZigZag = 36
}
}
@@ -1,44 +0,0 @@
//
// System.Drawing.Drawing2D.InterpolationMode.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Drawing.Drawing2D {
public enum InterpolationMode {
Bicubic = 4,
Bilinear = 3,
Default = 0,
High = 2,
HighQualityBicubic = 7,
HighQualityBilinear = 6,
Invalid = -1,
Low = 1,
NearestNeighbor = 5
}
}
Loaded 100 of 671 files, more files were not shown because too many files have changed in this diff. Show more