Compare commits

..
Author SHA1 Message Date
nosami 32bcd6c6a9 [F#] Reinstate _DebugFileExt as it's needed for mobile debugging.
Also added a mechanism for users to override DebugType
2017-09-11 10:58:55 +01:00
Ankit Jain 794f7a7612 Update roslyn-binaries to be >= than VS 15.4
Version based on
https://github.com/dotnet/cli/blob/release/2.0-vs/build/DependencyVersions.props#L6

	<CLI_Roslyn_Version>2.3.2-beta1-61921-05</CLI_Roslyn_Version>
2017-09-08 23:20:44 +02:00
Sebastien Pouliot fe516ba0bd [linker] Bump to HEAD (master)
This will allow the SDK (XI/XM) to use the latest version directly from
mono (like cecil) and avoid potential out of sync issues
2017-09-08 18:48:39 +02:00
Bernhard Urban b2acee0ade Merge pull request #5513 from lewurm/2017-06-gethashcode-delegate
[2017-06][bcl] Use RuntimeHelpers.GetHashCode () for getting the hash code of …
2017-09-06 14:03:26 +02:00
Zoltan Varga 8af44d2b16 [bcl] Use RuntimeHelpers.GetHashCode () for getting the hash code of … (#5511)
* [bcl] Use RuntimeHelpers.GetHashCode () for getting the hash code of the delegate target to avoid calling user defined hash code implementations which can throw exceptions. Fixes a regression introduced by a48bc43985.

* add test for #59235

https://bugzilla.xamarin.com/show_bug.cgi?id=59235

* [fixup] RuntimeHelpers.GetHashCode handles null
2017-09-06 13:58:03 +02:00
Jason Imison f4cf17d61d Add portable pdb metadata fix from https://github.com/Microsoft/visualfsharp/pull/3553 (#5510) 2017-09-05 22:51:36 +02:00
nosami 8f3ddb716e Revert "Add portable pdb metadata fix from https://github.com/Microsoft/visualfsharp/pull/3553"
This reverts commit a4cd00b333.
2017-09-05 21:44:30 +01:00
nosami a4cd00b333 Add portable pdb metadata fix from https://github.com/Microsoft/visualfsharp/pull/3553 2017-09-05 21:36:51 +01:00
nosami cb6a2fc7ff Switch F# builds over to portable pdb 2017-09-05 15:52:41 +01:00
Rodrigo Kumpera c81fe5e84d [mini] Handle magic interfaces in common_trampoline as if they were variant.
With the introduction of magic array interfaces, they must be handled as if they
were variant if they are being dispatched against an array.

This was not being done in common_trampoline and resulted in the IMT thunk never
getting rebuilt and getting decent perf.

With this patch, dispatch to simple methods such as Array::Count over a magic interface
in a covariant case (such as IList<object> dispatch onto string[]) will accrue gvi's.

On a trivial benchmark of executing Count 1M times, perf goes from 760ms to 50ms.
2017-09-04 11:04:28 +02:00
Bernhard Urban 1cf175e95c Merge pull request #5493 from lewurm/2017-06-mono-api-html
[2017-06][mono-api-html] Allow `-r` to ignore class removals
2017-09-04 10:42:56 +02:00
Zoltan Varga 01d1582fb7 [llvm] Set the MonoJitInfo.from_llvm flag for methods loaded from llvm, it got broken by 1debf39341. (#5223) 2017-09-02 06:36:01 +02:00
Jonathan Pryor f177485aaf [mono-api-html] Allow -r to ignore class removals
Allow `mono-api-html -r REGEX` to be used to silence messages
regarding class and namespace removals in addition to member removals.
2017-09-01 23:23:56 +02:00
Martin Baulig 1d4fc17faa [System]: Fix minor leaks in AppleTls. (#5369) (#5379)
These should be automatically collected by the GC, but explicitly disposing
will keep memory usage more stable over time and keep pressure off the GC.

(cherry picked from commit 093915cf83)
(cherry picked from commit 9b8bb0edbe)
2017-08-31 12:49:33 -04:00
Martin Baulig dc29ba37a6 [System]: Fix major AppleTls memory leak. Bug #56814. (#5370) (#5376)
(cherry picked from commit c74f44126e)
2017-08-31 12:49:18 -04:00
Marek Safar 8bcbd3cc89 Bump cecil 2017-08-31 15:32:55 +02:00
Ludovic Henry 24901ef720 [w32error] Add ENODEV -> ERROR_DEV_NOT_EXIST error translation (#5385) (#5392)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=58738
2017-08-30 17:57:58 -04:00
Ludovic Henry b263d37e15 [marshal] Rethrow in native-to-managed wrapper to keep exception stacktrace (#5384) (#5394)
* [marshal] Rethrow in native-to-managed wrapper to keep exception stacktrace

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=58782

* [interp] disable tests for 58782 as they rely on appdomains
2017-08-30 17:57:46 -04:00
Zoltan Varga 56267e8476 [amd64] Make code patching smp safe for the case where we emit a mov + call_reg. Hopefully fixes #57959. (#5452) 2017-08-28 16:29:14 -04:00
Alexander Köplinger 1afb931de6 Fix typo from 63b57ba7a1 2017-08-28 12:45:10 +02:00
Alexander Köplinger 63b57ba7a1 [configure.ac] Don't include the .build number in runtime-corlib version (#5449)
It's causing unnecessary complexity because we need to create a new
monolite when bumping the .build number in a major.minor.build
version like from 5.2.0 -> 5.2.1

corlib version bumps are very rare in those cases and even then
you can just increment the MONO_CORLIB_COUNTER variable.
(cherry picked from commit ec9a95dd53)
2017-08-25 22:01:16 +02:00
Marek Safar cbeae56621 [threadpool] Reduce logging verbosity level. Fixes #58829 2017-08-23 09:52:35 +02:00
Jo Shields f527b26e19 [msi] Fix typos in f9bdab7928
(cherry picked from commit da9287e432)
2017-08-22 10:18:53 -04:00
Alexander Köplinger ebee14deca Bump timeout for TaskTests.Delay_Simple (#5410)
Should be reverted once https://bugzilla.xamarin.com/show_bug.cgi?id=58877 is investigated and fixed.
(cherry picked from commit f567c2e5eb)
2017-08-21 17:29:05 +02:00
Jo Shields 929575bb0e [msi] Pull in MSI changes from Mono 5.2 branch 2017-08-21 09:59:36 -04:00
Aleksey Kliger 4fe608c216 [threads] Use designated initializer syntax in MAKE_SPECIAL_STATIC_OFFSET
Originally we used a C90-style struct initializer `{ (index), (offset), (type)
}`.  Unfortunately, SpecialStaticOffset is defined with fields in a different
order on big-endian and little-endian machines.  Using a designated
initializer, we don't have to care about the order.
2017-08-18 18:25:15 -04:00
Alexander Köplinger 6b8abfeb7c Bump bockbuild to remove gtk+ screen patch 2017-08-17 21:17:25 +02:00
Ludovic Henry 000682fe19 [corlib] Increase timeout for MonoTests.System.Runtime.Remoting.TestSynchronizationReleasedOnMultipleAcquire (#5373)
(cherry picked from commit 6e30ded242)
2017-08-17 19:01:59 +02:00
Ankit Jain 282e0fb6d3 Empty commit to trigger a wrench build 2017-08-16 20:16:43 -04:00
Ankit Jain 4cadbfc272 Bump roslyn-binaries 2017-08-16 20:12:06 -04:00
Ankit Jain 2071615b87 [msbuild] Bump to d15.4 branch HEAD 2017-08-16 14:45:40 -04:00
Ankit Jain cbc738c44d [msbuild] Install a deniedAssembliesList.txt to support denied ... (#5358)
... assemblies.

msbuild tries to filter out the denied assemblies, which mono refuses to
load, during a build. It uses the `deniedAssembliesList.txt` installed
to `$mono_prefix/lib/mono/xbuild` to identify them.

This was generated with:

 `$ mono tools/nuget-hash-extractor/nuget-hash-extractor.exe nugets guids_for_msbuild > mcs/tools/xbuild/data/deniedAssembliesList.txt`

This file needs to be kept in sync with any changes in the assemblies
denied by the runtime.

msbuild PR that adds support for this -
https://github.com/mono/msbuild/pull/23 .

cherry-pick 823bca4aed
2017-08-16 14:37:25 -04:00
Ankit Jain 7f9739d414 Install Roslyn binaries, including msbuild tasks to msbuild/Roslyn (#5251)
.. directory, which is `$mono_prefix/lib/mono/msbuild/15.0/bin/Roslyn/`

Mono installs `csc.exe` but the corresponding
`Microsoft.Build.Tasks.CodeAnalysis.dll` required for supporting msbuild C#
projects is installed by msbuild. But these two can get out of sync,
like they did and had to be worked around in
https://github.com/mono/msbuild/pull/19 .

Instead, we now install all the relevant roslyn bits (C# and VB) from the same
source. Only the msbuild specific files are copied to the Roslyn folder.
VBCSCompiler, csi and their dependencies are symlinked from `lib/mono/4.5`.

Also:

- csi.exe is included since the tool is surfaced as an msbuild task,
  and that requires the *Scripting.dll assemblies.
- VBCSCompiler* - shared compiler is installed
- vbc.exe doesn't work on mono currently, so skipping that
- And `Microsoft.DiaSymReader.Native.{amd64,x86}.dll` are dropped.

Cherry-picking 43cec6c0dd
2017-08-16 14:31:38 -04:00
Alexander Köplinger 4432d94f47 Bump bockbuild 2017-08-16 18:38:13 +02:00
Cody Russell 84a67e67e0 Bump bockbuild to get latest gtk patches (#5278) 2017-08-16 18:30:01 +02:00
Aleksey Kliger (λgeek) 3d2159b391 Merge pull request #5366 from lambdageek/bug-17325-2017-06
[2017-06][remoting] transparent proxy GetType of an interface should return the interface Type, not MarshalByRefObject. (Fixes #17325)
2017-08-14 17:41:38 -04:00
Alexander Köplinger 2cc5ff0ef3 Bump nuget to latest 4.3.0 release (#5368)
(cherry picked from commit a9a08890cb)
2017-08-14 19:30:00 +02:00
Alexis Christoforides ab5dc2d67e [MacSDK] Switch to HTTPS for downloading SQLite
(cherry picked from commit aa2ea3b812)
2017-08-14 19:29:23 +02:00
Alexander Köplinger b339b6677c Bump nuget-buildtasks (#5363)
Includes https://github.com/NuGet/NuGet.BuildTasks/pull/35

(cherry picked from commit e88178655b)
2017-08-14 17:54:37 +02:00
Aleksey Kliger a6db6112ca [remoting] transparent proxy GetType of an interface should return the
interface Type, not MarshalByRefObject. (Fixes #17325)

If a RealProxy instance is created (using the protected RealProxy(Type)
constructor) for an interface, mono internally sets up a MonoRemoteClass which
looks like a proxy for a MarshalByRefObject instance that happens to implement
the given interface.  However mono_class_proxy_vtable just does a memcpy() to
setup the MonoVTable:type field of the transparent proxy's vtable.  That type
field is hit by the JIT when System.Object.GetType() is called - and on .NET
Framework GetType for a transparent proxy of an interface returns the interface
not (as Mono used to) typeof(MarshalByRefObject).

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=17325
2017-08-14 11:37:51 -04:00
Aleksey Kliger fd2303ecb6 [test] Add regression test for GetType() of a transparent proxy.
Check that calling GetType() on a transparent proxy of a RealProxy of an
interface returns that interface type.
2017-08-14 11:37:50 -04:00
Alexander Köplinger 490cc373e4 [System.ServiceProcess] Remove "browser" service from dependencies in test (#5183) (#5351)
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.
(cherry picked from commit 1418f0d58b)
2017-08-10 19:26:39 +02:00
Ankit Jain b65d1a9ffc [msbuild] Bump to the d15.4 branch HEAD (#5342) 2017-08-09 11:46:41 -04:00
Zoltan Varga 8531639386 [runtime] Fix a case where klass->blittable was written without holding the loader locked. (#5331) 2017-08-08 16:36:39 -04:00
Jason Imison 25ef6061fd Merge pull request #5334 from mono/2017-06-fsharp-resources
Bump F# to 4.1.25
2017-08-08 12:54:47 +01:00
nosami 066fde97d3 Bump F# to 4.1.25 and remove already merged patches 2017-08-08 12:32:12 +01:00
Zoltan Varga 28a417c2c0 [btls] Disable BUILD_SHARED_LIBS while building boringssl, so its symbols are not exported from the btls shared lib. (#5307) 2017-08-04 11:39:52 -04:00
Marek Safar c97a3fcfd2 [mcs] Pending implementation of accessors cannot hide base implementation with different member type 2017-08-04 15:18:49 +02:00
Zoltan Varga 3acee7af00 [bcl] Fix Delegate.GetHashCode () so it takes into account the target too. Fixes #58399. (#5296) 2017-08-02 13:02:04 -04:00
Zoltan Varga b6cd01f017 [llvm] Fix the calling of fault clauses in llvm compiled code. Fixes #58446. (#5287) 2017-08-01 14:12:07 -04:00
Aleksey Kliger (λgeek) 67a2f14e73 Merge pull request #5289 from lambdageek/bug-58454-2017-06
[2017-06][sre] Pass declaring type to GetMethodFromHandle in GenericTypeParameterBuilder:InternalResolve (Fixes #58454)
2017-08-01 12:16:29 -04:00
Aleksey Kliger 8043db4c77 [sre] Pass declaring type to GetMethodFromHandle in
GenericTypeParameterBuilder:InternalResolve (Fixes #58454)

When the parameter belongs to a method builder, we need to pass the declaring
type (appropriately resolved) to GetMethodFromHandle to avoid an
ArgumentException.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=58454
2017-07-31 18:47:45 -04:00
Aleksey Kliger 252415606d [test] Check that GenericTypeParamBuilder:InternalResolve passes declaring type
to GetMethodFromHandle

Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=58454
2017-07-31 18:40:41 -04:00
Aleksey Kliger (λgeek) 50f2938561 Merge pull request #5275 from lambdageek/bug-58361-2017-06
[2017-06][sre] Resolve EnumBuilder tokens in managed (Fixes #58361)
2017-07-31 10:42:48 -04:00
Aleksey Kliger (λgeek) 6425f06ff6 Merge pull request #5277 from lambdageek/bug-58421-2017-06
[2017-06][sre] Handle typeref tokens in fixup_method (Fixes #58421)
2017-07-28 12:00:17 -04:00
Aleksey Kliger 485d5205f9 Bump corlib version
Due to changed semantics of ModuleBuilder:RegisterToken icall (it now does not
allow an EnumBuilder argument)
2017-07-28 11:58:51 -04:00
Aleksey Kliger 582c5d77f0 [sre] Resolve EnumBuilder tokens in managed. (Fixes #58361)
In particular, delegate to the TypeBuilder within the EnumBuilder.

Also do not register the EnumBuilder object with the runtime.  (Fixes
https://bugzilla.xamarin.com/show_bug.cgi?id=58361)
2017-07-28 11:58:51 -04:00
Marek Safar bda280c5e8 [mcs] Implements cloning for yield break. Fixes #57796 2017-07-28 11:14:42 +02:00
Aleksey Kliger 287f4303f3 [sre] Handle typeref tokens in fixup_method (Fixes #58421)
This may occur if there are two AssemblyBuilders in progress and one of them
refers to a TypeBuilder from the other.

https://bugzilla.xamarin.com/show_bug.cgi?id=58421
2017-07-27 18:07:27 -04:00
Aleksey Kliger 48d6bff3ae [test] Check that one AssemblyBuilder can refer to a TypeBuilder from another.
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=58421
2017-07-27 18:07:26 -04:00
Aleksey Kliger ad6ef5f4bc [test] EnumBuilder regression tests for #58361
Cause the creation of a token for an EnumBuilder object.  Test both typedef
tokens (EnumBuilder from same assembly) and typeref token (EnumBuilder in another assembly)
2017-07-27 18:00:47 -04:00
Aleksey Kliger dd46212fc2 [sre] Add MonoDynamicImageTokCollision arg to mono_dynamic_image_register_token
The new argument controls what should happen when the given token is already
present.

In some situations it's expected that we either see the same object, or we
unconditionally want to replace it (for example if we previously registered a
TypeBuilder or a MethodBuilder, after the type or method is created, we will
re-register the RuntimeType or MonoMethod in its place).  In other cases (for
example when a module references a MonoMethod from a different assembly), we
may still call `mono_image_create_token()` multiple times but we expect to see
the same MonoMethod object.
2017-07-27 18:00:46 -04:00
Miguel de Icaza 41ecc70a69 [Marshal.IsComObject] Make this predicate return false instead of throwing an exception which is what the calling code expects (#5246) 2017-07-25 17:06:41 +02:00
Alexis Christoforides e9d3a69282 Update bockbuild. Fixes #57002 2017-07-25 01:27:58 -04:00
Zoltan Varga e7ce1807d7 [runtime] Fix the size calculation for CustomAttributeType coded indexes, they can only point to the MethodDef/MemberRef tables even through 3 bits are used to encode them, only 2 values are used. Fixes #58210. (#5256) 2017-07-24 23:21:08 -04:00
Zoltan Varga eb7e8d4af8 [jit] Handle OP_VCALL_MEMBASE in get_simd_vreg (). Fixes #58344. 2017-07-24 18:30:04 -04:00
Marek Safar 94651df9ed Bump roslyn to 2.3.1 2017-07-24 20:14:39 +02:00
Zoltan Varga d320c3a40a Bump bockbuild. 2017-07-24 13:53:04 -04:00
Zoltan Varga 97d59f280a Bump bockbuild. 2017-07-24 11:38:31 -04:00
Zoltan Varga 7f68119da8 [bockbuild] Avoid overwriting self.local_configure_flags in some packages, extend them instead. (#5249) 2017-07-22 02:23:36 -04:00
Bernhard Urban 9b3d1a60fc Merge pull request #5238 from lewurm/fix-aot-offset-dumper-2017-06
[2017-06][offset-tool] fix assignment for GeniOS
2017-07-19 15:40:19 +02:00
Bernhard Urban 75aeec5fb9 [offset-tool] fix assignment for GeniOS
fixes this compilation error

MonoAotOffsetsDumper.cs(279,59): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
2017-07-19 15:37:44 +02:00
Martin Baulig a625b98e26 [System.Net.Http]: Close request stream when HttpClientHandler.SendAsync() is done writing data. (#5226) (#5228)
(cherry picked from commit d1555c7c72)
2017-07-18 17:57:45 -04:00
Zoltan Varga 07ef3c251b [offsets-tool] Add a --gen-ios argument which can be used together with --targetdir= to generate ios offsets without having to specify the macos path. (#5218) 2017-07-17 18:55:22 -04:00
Alexander Köplinger fd85ac4fd1 [corlib] Preserve List<T>.ConvertAll in TypeTest (#5215)
TypeTest.GetGenericMethodDefinitionOverInflatedMethodOnGTD accesses
List<T>.ConvertAll() via reflection but doesn't use the method
elsewhere so the linker can remove it. Added some usage to avoid that.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=56242
(cherry picked from commit c4d38b54ad)
2017-07-16 01:49:28 +02:00
Zoltan Varga 667dcaa655 [llvm] Add support for fault clauses. Fixes #58114. (#5203) 2017-07-14 15:47:17 -04:00
Zoltan Varga d6ba1ed4fc [llvm] Reserve the proper number of got entries in the llvm got instead of 16 which used to be enough in the past. Hopefully fixes #56111. (#5207) 2017-07-14 15:46:57 -04:00
Aleksey Kliger (λgeek) 5b035af74a Merge pull request #5212 from lambdageek/bug-57691-2017-06
[metadata] Encode public key length correctly for keys longer than 128 bytes (Fixes #57691)
2017-07-14 15:08:02 -04:00
Aleksey Kliger b69e232073 [metadata] Encode public key length correctly for keys longer than 128 bytes
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57691

For keys longer than 1024 bits, we encoded the length incorrectly as
   0x80 (length & 0xff)
instead of the correct algorithm:
  if (length < 0x80)
    length
  else if (length < 0x4000)
    0x80|(length>>8) (length & 0xff)
  else
    0xc0|(length>>24) (length>>16)&0xff (length>>8)&0xff length&0xff

which is provided by mono_metadata_encode_value.

See ECMA-335 II.24.2.4 #US and #Blob heaps

N.B.: we now always allocate the memory for the key as (keylen + 4) which
over-allocates by a couple of bytes in the cases where the key is shorter.
2017-07-14 12:23:57 -04:00
Aleksey Kliger edd2d56a32 [tests] Add regression test for InternalsVisibleTo with long PublicKey
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57691

We build a library that has an InternalsVisibleTo attribute that references an
executable that is signed with a long (>128bytes) public key.  Previously we
were using an incorrect method of encoding the key length.
2017-07-14 12:10:47 -04:00
Aleksey Kliger d4d81a3e02 [tests] Use test runner for test-internalsvisibleto
Also add the source files to EXTRA_DIST
2017-07-14 12:10:46 -04:00
Johan Lorensson 1d1ec7d504 Incorrect parameters passed to GetDiskFreeSpaceEx causing random memory corruption. (#5196)
The call to GetDiskFreeSpaceEx passes uninitialized pointers to GetDiskFreeSpaceEx
instead of pointers to stack variables. This will cause random memory corruption and random
crashes on Windows builds.

This is a regression caused by the refactoring work done in this PR:

https://github.com/mono/mono/pull/4255
(cherry picked from commit 46bc4f393e)
2017-07-11 23:24:18 +02:00
Johan Lorensson 5fc8e28ffa Remove partial path for ml.exe and ml64.exe in mono VS runtime builds. (#5195)
Location of ml.exe and ml64.exe is different in VS2017 compared to VS2015.
By removing the partial path from the command, the VS environment will locate
the tool depending on selected build configuration and VS version.

This should work for both VS2015 and VS2017.
(cherry picked from commit 665d8d4141)
2017-07-11 15:21:54 +02:00
Marius Ungureanu de60f3b49e Merge pull request #5185 from mono/2017-06-gtk-bump
Bump bockbuild for gtk# API compat fixes.
2017-07-07 19:50:26 +03:00
Marius Ungureanu 7f560b39c8 Bump bockbuild for gtk# API compat fixes. 2017-07-07 19:49:52 +03:00
Zoltan Varga 73c2e4322e [arm64] Really fix handler block trampolines. 2017-07-07 01:12:24 -04:00
Zoltan Varga 13166f48a8 [arm] Fix the handler block trampoline, it didn't actually call the helper function. 2017-07-07 01:12:15 -04:00
Zoltan Varga e5b06307ca [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:54 -04:00
Alexander Köplinger be1b671b09 [packaging] Add Windows hostfxr.dll to MSBuild in MSI
Part of https://bugzilla.xamarin.com/show_bug.cgi?id=57930

(cherry picked from commit f7c9be4890 and 727cf39986)
2017-07-06 02:06:22 +02:00
Zoltan Varga 817a7e7bf7 [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-07-05 17:20:28 -04:00
Bernhard Urban 6279df6d70 Merge pull request #5168 from lewurm/interp-cherry-pick-aot-interp-2017-06
[2017-06][interp] add --aot=interp, so we can run `mono --full-aot --interpreter`
2017-07-05 12:01:51 +02:00
Zoltan Varga cbc419bb3e [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:08:25 -04:00
Zoltan Varga 39a8a8f8c0 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 00ef078380.

Revert this as it seems to break the f# build.
2017-07-04 10:09:09 -04:00
Bernhard Urban 3c9a821c7e [interp] add --aot=interp, so we can run mono --full-aot --interpreter 2017-07-04 11:27:44 +02:00
Ankit Jain bb900edab1 Revert "[packaging/msbuild] Bump to get new changes on xplat-master (#5146)"
This reverts commit 3505d310df.
2017-07-03 21:45:44 -04:00
Zoltan Varga 36e3d93a52 [jit] Use the right type when handling shared versions of RuntimeHelpers.IsReferenceOrContainsReferences (). The previous version only worked by accident. (#5160) 2017-07-03 17:43:04 -04:00
Zoltan Varga 4b49283a9c [jit] Fix mono_debug_count () so it doesn't confuse COUNT=0 with COUNT not being used. 2017-07-03 16:57:58 -04:00
Zoltan Varga 00ef078380 [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:57:44 -04:00
Ludovic Henry 0a3ea22257 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-30 16:09:04 -04:00
Aleksey Kliger (λgeek) 04419ee95b Merge pull request #5157 from lambdageek/bug-57850+57851-2017-06
[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 - if the ResolveEventHandler returns a reflection only assembly, throw a FileNotFoundException
#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 13:33:23 -04:00
Aleksey Kliger fc339c2777 [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 10:23:22 -04:00
Aleksey Kliger 35b2b68bdf [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 10:23:21 -04:00
Aleksey Kliger 009d1279a2 [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 10:23:20 -04:00
Aleksey Kliger d8eb6c91a2 [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 10:23:19 -04:00
Aleksey Kliger d451def6a5 [sre] Add MonoAssemblyBuilderAccess enum in native code
in sync with System.Reflection.Emit.AssemblyBuilderAccess
2017-06-30 10:23:18 -04:00
Aleksey Kliger f95909190c [mono-error] Add mono_error_set_file_not_found
To throw System.IO.FileNotFoundException
2017-06-30 10:23:17 -04:00
Aleksey Kliger fc65bbe329 [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 10:23:16 -04:00
Aleksey Kliger eb6386af15 [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-30 10:23:15 -04:00
Aleksey Kliger 8236cbe950 [tests] Add some missing files to EXTRA_DIST 2017-06-30 10:23:14 -04:00
Ankit Jain 3505d310df [packaging/msbuild] Bump to get new changes on xplat-master (#5146)
cherry-pick 7f5c2b61fcf67cc47aa8b010b34da8039276afb6
2017-06-29 09:38:46 -04:00
Alexander Köplinger c0c8d0bec4 [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.
(cherry picked from commit 6400a71595)
2017-06-28 19:43:07 +02:00
Jo Shields 3872a400b2 Manually invoke Xvfb, don't depend on the xvfb plugin (#5132)
(cherry picked from commit a12daa47e0)
2017-06-28 19:41:50 +02:00
Aleksey Kliger (λgeek) a6612b4c64 Merge pull request #5121 from lambdageek/bug-57744-2017-06
[reflection] Convert correct MonoError to an exn in Assembly.GetTypes() (Fixes #57744)
2017-06-27 10:45:31 -04:00
Ankit Jain 4db9028cb9 [packaging/msbuild] Bump to get new changes on xplat-master (#5127) (#5128)
cherry-pick 67f753a893
2017-06-27 01:03:22 -04:00
Aleksey Kliger b6e231d521 [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:24:59 -04:00
Alexander Köplinger 1ec5966c89 Bump API snapshot 2017-06-26 20:53:58 +02:00
Marius Ungureanu 9280bb5e19 [System.Core] Implement MemoryMappedFile.OpenExisting (#5118)
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 20:52:35 +02:00
Alexander Köplinger d470d1abbf [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...

(cherry picked from commit f892c7c574)
2017-06-26 19:19:41 +02:00
Alexander Köplinger 0e4d13f5b7 Revert "[cil-strip] Remove old private copy of Mono.Cecil"
(reverted from commit 4ea3122758)

(cherry picked from commit a8c53ebf16)
2017-06-26 12:36:47 +02:00
Alexander Köplinger 933ceae45c 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

(cherry picked from commit f068fb6b66)
2017-06-26 12:36:43 +02:00
Ankit Jain 2f1b9e8aac [packaging/msbuild] Bump to get new changes on xplat-master (#5113) 2017-06-23 23:20:58 -04:00
Ludovic Henry f03dbfcae2 [System] Fix compilation on watchos (#5108) (#5111) 2017-06-23 19:34:34 -04:00
Alexander Köplinger d9211fcb50 [cil-strip] Remove old private copy of Mono.Cecil
No longer needed now that we're using the new Cecil.

(cherry picked from commit 4ea3122758)
2017-06-24 01:25:49 +02:00
Alexander Köplinger 153467c0c6 [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.

(cherry picked from commit 0c9eb70a46)
2017-06-24 01:25:46 +02:00
Vlad Brezae a1cac02732 [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 23:10:51 +03:00
Vlad Brezae 7be144c0b7 [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 23:10:38 +03:00
Alex Rønne Petersen 71936252fe [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-23 23:10:14 +03:00
Marius Ungureanu ab0791102f Merge pull request #5105 from mono/2017-06-bump-bockbuild
Bump bockbuild
2017-06-23 19:08:19 +03:00
Marius Ungureanu be24ada60a Bump bockbuild 2017-06-23 19:06:45 +03:00
Ankit Jain 9c991786ac [packaging/msbuild] Bump to get new changes on xplat-master
cherry-picking c7b19b52fd
2017-06-23 02:20:14 -04:00
Ankit Jain 019a83f88f [packaging/msbuild] Update commit hash to point to xplat-master HEAD
cherry-pick 4f7b15520d09843c1c0668f9fa4924f3cccb7398 from master
2017-06-22 21:36:41 -04:00
Rodrigo Kumpera 33697c0568 Merge pull request #5096 from kumpera/backport-5095
[aot] Fix the name of the mono_gc_wbarrier_range_copy icall. Backport of #5095
2017-06-22 14:59:28 -07:00
Rodrigo Kumpera fbb82d3923 [aot] Fix the name of the mono_gc_wbarrier_range_copy icall. FullAOT with direct calls requires it. 2017-06-22 14:58:06 -07:00
Rodrigo Kumpera 733b51587e Merge pull request #5085 from kumpera/backport-5082
Back port of #5082 (unlink bug on RO file systems)
2017-06-21 16:34:14 -04:00
Alexander Köplinger f66e71e01b [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.

(cherry picked from commit a4d6fccef9)

[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.

(cherry picked from commit 69f8abf794)

[packaging] Fix path to wrapper.bat for Windows MSI

(cherry picked from commit 27bf99ebed)

[ci] Get rid of remaining usages of WORKSPACE env var

Most of it was already removed in ea519ada8c

(cherry picked from commit 00f7811683)

[packaging] Exit Windows packaging script on error

Also quote passed in mdk path.

(cherry picked from commit b85f34d763)

[packaging] Remove msiexec prerequisite from Windows script

We're using lessmsi now.

(cherry picked from commit 348ec2cf7a)

[packaging] Fix prerequisite in Windows script

(cherry picked from commit 7f28de8559)

[packaging] Fix wrong argument in Windows script

(cherry picked from commit acf546b1ba)

[packaging] Add missing .pc files to Windows folder

It got accidentally ignored by the root .gitignore.

(cherry picked from commit 581b46d90d)

[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.

(cherry picked from commit 6c6ab73705)

[packaging] Add a few missing msbuild files to Windows MSI

(cherry picked from commit 68130ebec9)

[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.

(cherry picked from commit dbaab5d01a)
2017-06-21 20:32:55 +02:00
Rodrigo Kumpera 262128c941 [runtime] Update comment with link to Linux Kernel fix. 2017-06-21 10:47:22 -07:00
Rodrigo Kumpera eeb68ca307 [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-21 10:47:19 -07:00
Marek Safar 6471bbd6ef [mcs] Add missing vector cloning of definite assignment on-true. Fixes #57505 2017-06-21 15:14:39 +02:00
Marek Safar 96a2b36e82 [mcs] Fixes regression introduced by a0fc3f4dcf to consider user set values. Fixes #57242 2017-06-21 00:15:29 +02:00
Marek Safar 7a704f61c9 Bump roslyn to 2.3 beta 2 2017-06-20 23:22:10 +02:00
Bernhard Urban 39150458f0 Merge pull request #5074 from lewurm/x509-temp-file-fix-2017-06
[2017-06][bcl tests] do not attempt to delete non-existing files
2017-06-20 17:13:56 +02:00
Bernhard Urban 0b522087c2 [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:37:16 +02:00
Aleksey Kliger (λgeek) 911cc1d438 Merge pull request #5060 from lambdageek/tbt-2017-06
[2017-06][tests] Rework TypeBuilderTest SetUp/TearDown
2017-06-19 15:41:37 -04:00
Zoltan Varga e4b08aa7c9 [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:34:53 -04:00
Aleksey Kliger 2db07ca754 [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:04:21 -04:00
Alexander Köplinger 0d8219ea4a [MacSDK] Bump msbuild 2017-06-19 15:15:08 +02:00
Alexander Köplinger a38a8e4ad4 Bump API snapshot 2017-06-19 13:53:54 +02:00
Zoltan Varga d0b9d91817 [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-18 17:34:55 -04:00
Aleksey Kliger fd6d8198f7 [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 20:02:27 -04:00
Ankit Jain 54260048cc [packaging/msbuild] Update commit hash to point to xplat-master HEAD (#5046) 2017-06-15 14:04:15 -04:00
Marek Safar 34ba13146f Bump cecil 2017-06-15 19:02:56 +02:00
Bernhard Urban 00ea5f1e17 Revert "[exceptions] only do SIGSEGV related actions for SIGSEGVs in mono_handle_native_crash" (#5028)
This reverts commit a27bc024f1.

We never want the crash handler to be recursive.
2017-06-14 18:05:41 -04:00
Aleksey Kliger (λgeek) e75b24b807 Merge pull request #5033 from lambdageek/fix-strict-loader-image-cache-hit-2017-06
[2017-06][loader] If using strict strong names, recheck loaded assm before returning it.
2017-06-14 14:18:08 -04:00
Aleksey Kliger ecf65f0093 [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:41:36 -04:00
Aleksey Kliger 35cb8bac8a [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:41:35 -04:00
Alexander Köplinger 33074493a0 [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.

(cherry picked from commit 258efac3c6)
2017-06-14 00:47:07 +02:00
Marius Ungureanu c5d7419186 Bump bockbuild (#5024) 2017-06-13 20:52:32 +02:00
Alexander Köplinger ccf4d32e12 Bump API snapshot 2017-06-13 02:47:59 +02:00
Alexander Köplinger 89014568b7 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

(cherry picked from commit 1890aa6ec3)
2017-06-13 02:35:13 +02:00
Bernhard Urban 9161e4e5a9 Merge pull request #4999 from lewurm/marshal-string-dummy-2017-06
[2017-06][marshal] allocate dummy string always in root domain
2017-06-12 19:09:17 +02:00
Rodrigo Kumpera 6ac4a68c46 Merge pull request #5007 from kumpera/backport_56684
[corlib] Don't pass RuntimeMethodHandle across domains. Fixes #56684
2017-06-12 10:07:33 -07:00
Martin Baulig 1b5e0f7331 [System]: Correctly implement close and shutdown in SslStream. (#4969) (#5008)
* [System]: Correctly implement close and shutdown in SslStream.

* Cleanup.

* Cosmetic.

* More ReferenceSources/SR2.cs into common.sources to make it build.

(cherry picked from commit 21d5c9c346)
2017-06-12 12:59:01 -04:00
Marek Safar c8863e1d31 [mcs] C#7 type pattern matching 2017-06-12 17:06:26 +02:00
Marek Safar dd951e909a [mcs] Better detection of null operator inside conditional expression. Fixes #57232 2017-06-12 17:04:08 +02:00
Aleksey Kliger (λgeek) 3c21a0f3dd Merge pull request #5004 from lambdageek/bug-57222-2017-06
[sre] FieldBuilder:RuntimeResolve shouldn't lookup by name (Fixes #57222)
2017-06-12 10:52:01 -04:00
Rodrigo Kumpera f031c8fba3 [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-09 11:46:41 -07:00
Aleksey Kliger 442d000b6c [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-09 13:15:27 -04:00
Aleksey Kliger 2cdb7e8648 [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-09 13:15:26 -04:00
Aleksey Kliger e72203782b [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-09 13:15:25 -04:00
Bernhard Urban 00e3c897d5 [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:51:02 +02:00
Bernhard Urban 52a5acbd88 Merge pull request #4992 from lewurm/interp-aot-mode-2017-06
[2017-06][interp] add MONO_AOT_MODE_INTERP
2017-06-09 12:29:40 +02:00
Bernhard Urban 778e04f2d9 [win] set HAVE_ONLINE_VES 2017-06-08 17:22:55 +02:00
Alexander Köplinger 93ecaeb2c6 [MacSDK] Bump libgdiplus to latest (#4984)
We were using a very old commit of libgdiplus. This brings in
the latest changes.
(cherry picked from commit 1d6a8ed6ea)
2017-06-08 14:22:00 +02:00
Bernhard Urban 49df11fd5f [interp] provide stub for icall_trampoline for x86 and ppc
keep the linker happy
2017-06-08 00:11:05 +02:00
Bernhard Urban c8c8b16bfd [interp] root domain must be used for AOT'd wrappers used by interpreter 2017-06-08 00:11:05 +02:00
Bernhard Urban 6f83951d1c [interp aot] documentation 2017-06-08 00:11:04 +02:00
Bernhard Urban f2ae4658f9 [marshal] some things are required in the interpreter despite DISABLE_JIT 2017-06-08 00:11:03 +02:00
Bernhard Urban faf4fe66af [configure] introduce HAVE_ONLINE_VES 2017-06-08 00:11:03 +02:00
Bernhard Urban 998759345f [interp] fix when DISABLE_JIT is set 2017-06-08 00:11:02 +02:00
Bernhard Urban c88d2cce1f [interp] add InterpMethodArguments struct to offset-tool 2017-06-08 00:11:01 +02:00
Bernhard Urban 3e589e2c39 [interp] add MONO_AOT_MODE_INTERP 2017-06-08 00:11:00 +02:00
Martin Baulig 4c944bc86e [System]: Actually disable the keychain code and SecItemImport() on XI. (#4983) (#4988)
(cherry picked from commit fff41905e9)
2017-06-07 14:32:20 -04:00
Bernhard Urban d3e6c9d17f Merge pull request #4989 from baulig/work-4987-merge
[System]: Fix possible initialization issue in MonoTlsProviderFactory. (#4987)
2017-06-07 19:37:22 +02:00
Martin Baulig 7379ac1bfb Cosmetic; remove [Category ("Martin")] from the test.
(cherry picked from commit dc58d950f2)
2017-06-07 11:55:11 -04:00
Martin Baulig 2a029615aa [System]: Fix possible initialization issue in MonoTlsProviderFactory. (#4987)
* [Mono.Security]: Add test for MonoTlsProviderFactory.GetProvider ().

* [System]: Fix possible initialization issue in MonoTlsProviderFactory.

(cherry picked from commit 83f74c4123)
2017-06-07 11:46:58 -04:00
Marek Safar 9c345b1b02 [mcs] C#7 out variable declaration 2017-06-07 16:55:13 +02:00
Alexander Köplinger 074a1228cf [MacSDK] Update version number in msbuild.py
(cherry picked from commit 9b63661c15)
2017-06-06 23:04:06 +02:00
Bernhard Urban e3596928d8 [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 21:07:18 +02:00
Bernhard Urban ac71acfd52 [mini] guard mono_arch_init_lmf_ext prototype properly 2017-06-06 19:16:05 +02:00
Bernhard Urban 8909c17d9c [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:16:05 +02:00
Marek Safar e5d16f01fd Bump corefx 2017-06-06 16:11:32 +02:00
Marek Habersack 9874928b85 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:07:54 +02:00
Marek Safar 9e99e20001 [mcs] Remove unwanted tests 2017-06-05 20:56:38 +02:00
Ludovic Henry b3e79ebc05 Bump to 5.4 for 2017-06 branch (#4971) 2017-06-05 14:05:27 -04:00
606 changed files with 22619 additions and 13040 deletions

No files matched your search

+4 -32
View File
@@ -44,26 +44,6 @@ 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) {
@@ -95,22 +75,14 @@ namespace Mono.Profiling.Tests.Stress {
for (var i = 0; i < benchmarks.Length; i++) {
var bench = benchmarks [i];
var sampleFreq = rand.Next (-1000, 1001);
var sampleFreq = rand.Next (0, 1001);
var sampleMode = rand.Next (0, 2) == 1 ? "real" : "process";
var maxSamples = rand.Next (0, cpus * 2000 + 1);
var heapShotFreq = rand.Next (-10, 11);
var heapShotFreq = rand.Next (0, 11);
var maxFrames = rand.Next (0, 33);
var options = _options.ToDictionary (x => x, _ => rand.Next (0, 2) == 1)
.Select (x => (x.Value ? string.Empty : "no") + x.Key)
.ToArray ();
var allocMode = rand.Next (0, 2) == 1 ? "alloc" : "noalloc";
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 profOptions = $"sample=cycles/{sampleFreq},sampling-{sampleMode},maxsamples={maxSamples},heapshot={heapShotFreq}gc,maxframes={maxFrames},{allocMode},output=/dev/null";
var info = new ProcessStartInfo {
UseShellExecute = false,
+15 -32
View File
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
AC_INIT(mono, [5.5.0],
AC_INIT(mono, [5.4.0],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README.md])
@@ -40,8 +40,8 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
# This can be reset to 0 when Mono's version number is bumped
# since it's part of the corlib version (the prefix '1' in the full
# version number is to ensure the number isn't treated as octal in C)
MONO_CORLIB_COUNTER=2
MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR $MONO_VERSION_BUILD $MONO_CORLIB_COUNTER`
MONO_CORLIB_COUNTER=3
MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR 0 $MONO_CORLIB_COUNTER`
AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
AC_SUBST(MONO_CORLIB_VERSION)
@@ -812,8 +812,7 @@ 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(unreal, [ --with-unreal=yes,no If you want to build the Unreal assemblies (defaults to no)], [], [with_unreal=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(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])
@@ -834,7 +833,6 @@ 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
@@ -854,7 +852,6 @@ 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
@@ -925,17 +922,6 @@ 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
@@ -982,9 +968,6 @@ 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"])
@@ -998,9 +981,8 @@ 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"] || [test "x$TEST_PROFILE" = "xunreal"])
AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"])
default_profile=net_4_x
if test -z "$INSTALL_MONODROID_TRUE"; then :
@@ -1024,9 +1006,6 @@ 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
@@ -1283,7 +1262,7 @@ dnl
dnl Boehm GC configuration
dnl
AC_ARG_WITH(libgc, [ --with-libgc=included,none Controls the Boehm GC config, default=included],[libgc=$with_libgc],[libgc=included])
AC_ARG_WITH(libgc, [ --with-libgc=included,none Controls the Boehm GC config, default=included],[libgc=$with_gc],[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)
@@ -1341,7 +1320,7 @@ if test "x$support_boehm" = "xyes"; then
gc_msg="none"
;;
*)
AC_MSG_ERROR([Invalid argument $libgc to --with-libgc.])
AC_MSG_ERROR([Invalid argument to --with-libgc.])
;;
esac
@@ -1357,7 +1336,6 @@ 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
@@ -1956,7 +1934,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 pthread_cond_timedwait_relative_np)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_setname_np)
AC_CHECK_FUNCS(pthread_kill)
AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
AC_TRY_COMPILE([ #include <pthread.h>], [
@@ -3556,6 +3534,12 @@ fi
AM_CONDITIONAL(ENABLE_INTERPRETER, [test x$enable_interpreter = xyes])
if test "x$enable_interpreter" = "xyes" || test "x$mono_feature_disable_jit" != "xyes"; then
AC_DEFINE(HAVE_ONLINE_VES, 1, [Some VES is available at runtime])
fi
AM_CONDITIONAL(HAVE_ONLINE_VES, [test x$enable_interpreter = xyes] || [test x$mono_feature_disable_jit != xyes])
dnl
dnl Simple Generational checks (sgen)
dnl
@@ -4156,7 +4140,7 @@ AC_SUBST(mono_build_root)
mono_runtime=mono/mini/mono
AC_SUBST(mono_runtime)
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.2.3.0/tools/csc.exe
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.2.3.1/tools/csc.exe
if test $csc_compiler = mcs; then
CSC=$mcs_topdir/class/lib/build/mcs.exe
@@ -4578,7 +4562,6 @@ 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 strerror_r)
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(fork execv execve)
-1
View File
@@ -14,7 +14,6 @@
#endif
#include <stdint.h>
#include <inttypes.h>
#include <eglib-config.h>
#ifndef EGLIB_NO_REMAP
+1 -69
View File
@@ -32,12 +32,6 @@
#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
@@ -197,72 +191,10 @@ 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)
{
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];
return strerror (errnum);
}
gchar *
+1 -1
+1 -1
+1 -1
+13 -19
View File
@@ -300,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]
@@ -1101,6 +1101,11 @@ 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
@@ -1309,19 +1314,10 @@ 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, `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.
\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.
.TP
\fBsoft-heap-limit=\fIsize\fR
Once the heap size gets larger than this size, ignore what the default
@@ -1384,11 +1380,9 @@ 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,
`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.
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.
.TP
\fBalloc-ratio=\fIratio\fR
Specifies the ratio of memory from the nursery to be use by the alloc space.
+1 -3
View File
@@ -23,7 +23,6 @@ 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
@@ -78,7 +77,6 @@ $(_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:
@@ -144,7 +142,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.Profiler.Log.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_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)
+1 -8
View File
@@ -40,14 +40,7 @@ class X {
if (!Version.TryParse (field.GetValue (null) as string, out version))
return 4;
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)
if (version < new Version (4, 9))
return 5;
return 0;
-33
View File
@@ -1,33 +0,0 @@
#! -*- 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
+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 unreal, $(PROFILE))
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(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,436</NoWarn>
<NoWarn>1699,1616,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>
@@ -36,7 +36,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699,436</NoWarn>
<NoWarn>1699,1616,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>
@@ -44,7 +44,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699,436</NoWarn>
<NoWarn>1699,1616,1699</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 unreal, $(PROFILE))
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE))
ifdef REPO_DRAWING_DEP
LIB_REFS += System.Drawing
-3
View File
@@ -83,9 +83,6 @@ 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
+1 -8
View File
@@ -130,11 +130,6 @@ winaot_dirs := \
System.Drawing \
$(pcl_facade_dirs)
unreal_dirs := \
$(mobile_common_dirs) \
System.Drawing \
$(pcl_facade_dirs)
xammac_4_5_dirs := \
corlib \
Mono.Security \
@@ -320,7 +315,6 @@ net_4_x_parallel_dirs := \
System.Workflow.ComponentModel \
System.Workflow.Runtime \
System.Reflection.Context \
Mono.Profiler.Log \
legacy/Mono.Cecil \
$(pcl_facade_dirs)
@@ -358,11 +352,10 @@ 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) $(unreal_dirs)
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)
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.UtcNow;
DateTime beforeExec = DateTime.Now;
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.UtcNow; }, null);
sub.ExecuteAsync (delegate { waitDone = DateTime.Now; }, null);
}
bm.EndBuild ();
Assert.IsTrue (l.All (s => s.BuildResult.OverallResult == BuildResultCode.Success), "#1");
DateTime endBuildDone = DateTime.UtcNow;
AssertHelper.GreaterOrEqual (endBuildDone - beforeExec, TimeSpan.FromSeconds (1), "#2");
AssertHelper.Greater (endBuildDone, waitDone, "#3");
DateTime endBuildDone = DateTime.Now;
Assert.IsTrue (endBuildDone - beforeExec >= TimeSpan.FromSeconds (1), "#2");
Assert.IsTrue (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.UtcNow;
DateTime beforeExec = DateTime.Now;
var sub = bm.PendBuildRequest (new BuildRequestData (proj, new string [] { "Wait1Sec" }));
sub.ExecuteAsync (delegate { waitDone = DateTime.UtcNow; }, null);
sub.ExecuteAsync (delegate { waitDone = DateTime.Now; }, null);
bm.EndBuild ();
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");
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");
}
[Test]
@@ -106,6 +106,9 @@
<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" />
@@ -136,6 +139,7 @@
<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" />
@@ -153,11 +157,13 @@
<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" />
@@ -167,6 +173,7 @@
<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,7 +104,6 @@
<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,7 +49,6 @@ 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 && Version.AtLeast(2, 3))
if (thread_id != 0)
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,11 +30,6 @@ 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 ();
@@ -355,12 +350,6 @@ 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).Append (".");
sb.Append (type_namespace + ".");
sb.Append(type_name);
sb.Append(":");
sb.Append(Name);
@@ -102,18 +102,6 @@ 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,8 +13,6 @@ 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) {
}
@@ -32,7 +30,6 @@ namespace Mono.Debugger.Soft
internal void InvalidateFrames () {
cacheInvalid = true;
threadStateInvalid = true;
}
internal void FetchFrames (bool mustFetch = false) {
@@ -94,11 +91,7 @@ namespace Mono.Debugger.Soft
public ThreadState ThreadState {
get {
if (threadStateInvalid) {
threadState = (ThreadState) vm.conn.Thread_GetState (id);
threadStateInvalid = false;
}
return threadState;
return (ThreadState)vm.conn.Thread_GetState (id);
}
}
@@ -665,7 +665,7 @@ namespace Mono.Debugger.Soft
return res;
}
internal ValueImpl EncodeValue (Value v, List<Value> duplicates = null) {
internal ValueImpl EncodeValue (Value v) {
if (v is PrimitiveValue) {
object val = (v as PrimitiveValue).Value;
if (val == null)
@@ -675,22 +675,16 @@ 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) {
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) };
return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields) };
} else {
throw new NotSupportedException ();
}
}
internal ValueImpl[] EncodeValues (IList<Value> values, List<Value> duplicates = null) {
internal ValueImpl[] EncodeValues (IList<Value> values) {
ValueImpl[] res = new ValueImpl [values.Count];
for (int i = 0; i < values.Count; ++i)
res [i] = EncodeValue (values [i], duplicates);
res [i] = EncodeValue (values [i]);
return res;
}
@@ -730,7 +724,6 @@ 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,7 +5,6 @@ using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Runtime.Remoting.Messaging;
using System.Text;
namespace Mono.Debugger.Soft
{
@@ -96,12 +95,6 @@ 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,18 +1165,10 @@ 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 ();
}
+1 -22
View File
@@ -2617,11 +2617,6 @@ 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);
@@ -2635,11 +2630,6 @@ 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 [] {
@@ -2733,17 +2723,6 @@ 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
@@ -4143,7 +4122,7 @@ public class DebuggerTests
frames = thread.GetFrames ();
Assert.AreEqual (8, frames.Length, "#7");
Assert.AreEqual ("Wait_internal", frames [0].Method.Name, "#8.0");
Assert.AreEqual ("WaitOne_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.UtcNow;
_controlTime = DateTime.Now;
_buffer = new byte[UnixMessageIO.DefaultStreamBufferSize];
}
@@ -270,7 +270,7 @@ namespace Mono.Remoting.Channels.Unix
{
lock (_pool)
{
entry.ControlTime = DateTime.UtcNow; // Initialize timeout
entry.ControlTime = DateTime.Now; // 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.UtcNow - entry.ControlTime).TotalSeconds > UnixConnectionPool.KeepAliveSeconds)
if ( (DateTime.Now - entry.ControlTime).TotalSeconds > UnixConnectionPool.KeepAliveSeconds)
{
CancelConnection (entry);
_pool.RemoveAt(n);
@@ -10,7 +10,6 @@
using NUnit.Framework;
using System;
using System.Diagnostics;
using System.Text;
using System.Threading;
using Mono.Unix;
@@ -26,12 +25,12 @@ namespace MonoTests.Mono.Unix {
static Thread CreateWaitSignalThread (UnixSignal signal, int timeout)
{
Thread t1 = new Thread(delegate() {
var sw = Stopwatch.StartNew ();
DateTime start = DateTime.Now;
bool r = signal.WaitOne (timeout, false);
sw.Stop ();
DateTime end = DateTime.Now;
Assert.AreEqual (signal.Count, 1);
Assert.AreEqual (r, true);
if (sw.Elapsed > new TimeSpan (0, 0, timeout/1000))
if ((end - start) > new TimeSpan (0, 0, timeout/1000))
throw new InvalidOperationException ("Signal slept too long");
});
return t1;
@@ -249,12 +248,12 @@ namespace MonoTests.Mono.Unix {
{
Thread t1 = new Thread (delegate () {
using (UnixSignal a = new UnixSignal (Signum.SIGINT)) {
var sw = Stopwatch.StartNew ();
DateTime start = DateTime.Now;
bool r = a.WaitOne (5000, false);
sw.Stop ();
DateTime end = DateTime.Now;
Assert.AreEqual (a.Count, 1);
Assert.AreEqual (r, true);
if (sw.Elapsed > new TimeSpan (0, 0, 5))
if ((end - start) > new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal slept too long");
}
});
@@ -273,12 +272,12 @@ namespace MonoTests.Mono.Unix {
{
Thread t1 = new Thread (delegate () {
using (UnixSignal a = new UnixSignal (Signum.SIGINT)) {
var sw = Stopwatch.StartNew ();
DateTime start = DateTime.Now;
int idx = UnixSignal.WaitAny (new UnixSignal[]{a}, 5000);
sw.Stop ();
DateTime end = DateTime.Now;
Assert.AreEqual (idx, 0);
Assert.AreEqual (a.Count, 1);
if (sw.Elapsed > new TimeSpan (0, 0, 5))
if ((end - start) > new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal slept too long");
}
});
@@ -298,13 +297,13 @@ namespace MonoTests.Mono.Unix {
Thread t1 = new Thread (delegate () {
using (UnixSignal a = new UnixSignal (Signum.SIGINT))
using (UnixSignal b = new UnixSignal (Signum.SIGTERM)) {
var sw = Stopwatch.StartNew ();
DateTime start = DateTime.Now;
int idx = UnixSignal.WaitAny (new UnixSignal[]{a, b}, 5000);
sw.Stop ();
DateTime end = DateTime.Now;
Assert.AreEqual (idx, 1);
Assert.AreEqual (a.Count, 0);
Assert.AreEqual (b.Count, 1);
if (sw.Elapsed > new TimeSpan (0, 0, 5))
if ((end - start) > new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal slept too long");
}
});
@@ -322,12 +321,12 @@ namespace MonoTests.Mono.Unix {
public void TestNoEmit ()
{
using (UnixSignal u = new UnixSignal (Signum.SIGINT)) {
var sw = Stopwatch.StartNew ();
DateTime start = DateTime.Now;
bool r = u.WaitOne (5100, false);
Assert.AreEqual (r, false);
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());
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());
}
}
@@ -1,21 +0,0 @@
// 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
@@ -1,12 +0,0 @@
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
@@ -1,113 +0,0 @@
<?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>
@@ -1,14 +0,0 @@
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
@@ -1,46 +0,0 @@
// 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 ();
}
}
}
@@ -1,212 +0,0 @@
// 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,
}
}
@@ -1,75 +0,0 @@
// 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);
}
}
@@ -1,197 +0,0 @@
// 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)
{
}
}
}
@@ -1,625 +0,0 @@
// 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);
}
}
}
@@ -1,16 +0,0 @@
// 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)
{
}
}
}
@@ -1,577 +0,0 @@
// 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;
}
}
}
@@ -1,157 +0,0 @@
// 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;
}
}
}
@@ -1,13 +0,0 @@
// 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.
}
}
@@ -1,71 +0,0 @@
// 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 ();
}
}
}
@@ -1,55 +0,0 @@
// 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,7 +27,6 @@ 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;
@@ -87,8 +86,6 @@ namespace Mono.Security.Interface
void EndWrite (IAsyncResult asyncResult);
Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken);
Task ShutdownAsync ();
TransportContext TransportContext {
@@ -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 tampered with!");
throw new CryptographicException ("Invalid MAC - file may have been tampe red!");
_password = nullPassword;
}
}
@@ -1,14 +0,0 @@
#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
@@ -1 +0,0 @@
#include mobile_System.Data.dll.sources
+3 -5
View File
@@ -10,11 +10,9 @@ 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
RESX_RESOURCE_STRING = ../../../external/corefx/src/System.Drawing.Common/src/Resources/Strings.resx
MOBILE_LIKE := $(filter winaot orbis unreal, $(PROFILE))
ifdef MOBILE_LIKE
ifeq (winaot, $(PROFILE))
LIB_MCS_FLAGS += /keyfile:../msfinal.pub
else ifeq (orbis, $(PROFILE))
LIB_MCS_FLAGS += /keyfile:../msfinal.pub
else
LIB_MCS_FLAGS += -d:FEATURE_TYPECONVERTER,SUPPORTS_WINDOWS_COLORS
@@ -52,176 +52,140 @@
</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="corefx\SR.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="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" />
@@ -234,10 +198,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" />
@@ -245,6 +209,7 @@
<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" />
@@ -261,17 +226,25 @@
<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\SR.cs" />
<Compile Include="System.Drawing\SolidBrush.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.
@@ -0,0 +1,77 @@
//
// 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);
}
}
}
@@ -0,0 +1,54 @@
// 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
}
}
@@ -0,0 +1,38 @@
//
// 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; }
}
}
@@ -0,0 +1,101 @@
//
// 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);
}
}
@@ -0,0 +1,40 @@
// 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);
}
}
@@ -0,0 +1,82 @@
// 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;
}
}
}
}
@@ -0,0 +1,85 @@
//
// 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
}
}
}
@@ -0,0 +1,35 @@
// 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);
}
@@ -0,0 +1,37 @@
// 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);
}
@@ -0,0 +1,51 @@
// 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;
}
}
}
}
@@ -0,0 +1,33 @@
// 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);
}
@@ -0,0 +1,57 @@
//
// 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;
}
}
}
}
@@ -0,0 +1,32 @@
// 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);
}
@@ -0,0 +1,73 @@
//
// 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);
}
}
}
@@ -0,0 +1,34 @@
// 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);
}
@@ -0,0 +1,104 @@
//
// 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; }
}
}
}
@@ -0,0 +1,38 @@
//
// 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
}
}
@@ -0,0 +1,122 @@
//
// 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);
}
}
}
}
@@ -0,0 +1,78 @@
//
// 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;
}
}
}
}
@@ -0,0 +1,70 @@
//
// 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;
}
}
}
}
@@ -0,0 +1,41 @@
//
// 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
}
}
@@ -0,0 +1,37 @@
//
// 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
}
}
@@ -0,0 +1,41 @@
//
// 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
}
}
@@ -0,0 +1,38 @@
//
// 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
}
}
@@ -0,0 +1,176 @@
//
// 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);
}
}
}
@@ -0,0 +1,38 @@
//
// 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
}
}
@@ -0,0 +1,40 @@
//
// 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
}
}
@@ -0,0 +1,37 @@
//
// 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
}
}
@@ -0,0 +1,37 @@
//
// 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.NativeFamily, style, emSize, ref layoutRect, sformat);
Status status = GDIPlus.GdipAddPathStringI (nativePath, s, s.Length, family.NativeObject, 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.NativeFamily, style, emSize, ref layoutRect, sformat);
Status status = GDIPlus.GdipAddPathString (nativePath, s, s.Length, family.NativeObject, 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.NativePen;
IntPtr p = (pen == null) ? IntPtr.Zero : pen.nativeObject;
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.NativePen, g, out result);
Status s = GDIPlus.GdipIsOutlineVisiblePathPointI (nativePath, x, y, pen.nativeObject, 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.NativePen, g, out result);
Status s = GDIPlus.GdipIsOutlineVisiblePathPoint (nativePath, x, y, pen.nativeObject, 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.NativePen, m, flatness);
Status s = GDIPlus.GdipWidenPath (nativePath, pen.nativeObject, m, flatness);
GDIPlus.CheckStatus (s);
}
}
@@ -0,0 +1,208 @@
//
// 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);
}
}
}
@@ -0,0 +1,51 @@
//
// 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
}
}
}
@@ -0,0 +1,97 @@
//
// 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;
}
}
}
@@ -0,0 +1,92 @@
//
// 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
}
}
@@ -0,0 +1,44 @@
//
// 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
}
}
@@ -0,0 +1,46 @@
//
// System.Drawing.Drawing2D.LineCap.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 LineCap {
AnchorMask = 240,
ArrowAnchor = 20,
Custom = 255,
DiamondAnchor = 19,
Flat = 0,
NoAnchor = 16,
Round = 2,
RoundAnchor = 18,
Square = 1,
SquareAnchor = 17,
Triangle = 3
}
}
@@ -0,0 +1,39 @@
//
// System.Drawing.Drawing2D.LineJoin.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 LineJoin {
Bevel = 1,
Miter = 0,
MiterClipped = 3,
Round = 2
}
}
@@ -36,19 +36,16 @@ namespace System.Drawing.Drawing2D {
{
RectangleF rectangle;
internal LinearGradientBrush (IntPtr native)
internal LinearGradientBrush (IntPtr native) : base (native)
{
Status status = GDIPlus.GdipGetLineRect (native, out rectangle);
SetNativeBrush (native);
GDIPlus.CheckStatus (status);
}
public LinearGradientBrush (Point point1, Point point2, Color color1, Color color2)
{
IntPtr nativeObject;
Status status = GDIPlus.GdipCreateLineBrushI (ref point1, ref point2, color1.ToArgb (), color2.ToArgb (), WrapMode.Tile, out nativeObject);
GDIPlus.CheckStatus (status);
SetNativeBrush (nativeObject);
status = GDIPlus.GdipGetLineRect (nativeObject, out rectangle);
GDIPlus.CheckStatus (status);
@@ -56,10 +53,8 @@ namespace System.Drawing.Drawing2D {
public LinearGradientBrush (PointF point1, PointF point2, Color color1, Color color2)
{
IntPtr nativeObject;
Status status = GDIPlus.GdipCreateLineBrush (ref point1, ref point2, color1.ToArgb (), color2.ToArgb (), WrapMode.Tile, out nativeObject);
GDIPlus.CheckStatus (status);
SetNativeBrush (nativeObject);
status = GDIPlus.GdipGetLineRect (nativeObject, out rectangle);
GDIPlus.CheckStatus (status);
@@ -67,10 +62,8 @@ namespace System.Drawing.Drawing2D {
public LinearGradientBrush (Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode)
{
IntPtr nativeObject;
Status status = GDIPlus.GdipCreateLineBrushFromRectI (ref rect, color1.ToArgb (), color2.ToArgb (), linearGradientMode, WrapMode.Tile, out nativeObject);
GDIPlus.CheckStatus (status);
SetNativeBrush (nativeObject);
rectangle = (RectangleF) rect;
}
@@ -81,10 +74,8 @@ namespace System.Drawing.Drawing2D {
public LinearGradientBrush (RectangleF rect, Color color1, Color color2, LinearGradientMode linearGradientMode)
{
IntPtr nativeObject;
Status status = GDIPlus.GdipCreateLineBrushFromRect (ref rect, color1.ToArgb (), color2.ToArgb (), linearGradientMode, WrapMode.Tile, out nativeObject);
GDIPlus.CheckStatus (status);
SetNativeBrush (nativeObject);
rectangle = rect;
}
@@ -95,20 +86,16 @@ namespace System.Drawing.Drawing2D {
public LinearGradientBrush (Rectangle rect, Color color1, Color color2, float angle, bool isAngleScaleable)
{
IntPtr nativeObject;
Status status = GDIPlus.GdipCreateLineBrushFromRectWithAngleI (ref rect, color1.ToArgb (), color2.ToArgb (), angle, isAngleScaleable, WrapMode.Tile, out nativeObject);
GDIPlus.CheckStatus (status);
SetNativeBrush (nativeObject);
rectangle = (RectangleF) rect;
}
public LinearGradientBrush (RectangleF rect, Color color1, Color color2, float angle, bool isAngleScaleable)
{
IntPtr nativeObject;
Status status = GDIPlus.GdipCreateLineBrushFromRectWithAngle (ref rect, color1.ToArgb (), color2.ToArgb (), angle, isAngleScaleable, WrapMode.Tile, out nativeObject);
GDIPlus.CheckStatus (status);
SetNativeBrush (nativeObject);
rectangle = rect;
}
@@ -118,11 +105,11 @@ namespace System.Drawing.Drawing2D {
public Blend Blend {
get {
int count;
Status status = GDIPlus.GdipGetLineBlendCount (NativeBrush, out count);
Status status = GDIPlus.GdipGetLineBlendCount (nativeObject, out count);
GDIPlus.CheckStatus (status);
float [] factors = new float [count];
float [] positions = new float [count];
status = GDIPlus.GdipGetLineBlend (NativeBrush, factors, positions, count);
status = GDIPlus.GdipGetLineBlend (nativeObject, factors, positions, count);
GDIPlus.CheckStatus (status);
Blend blend = new Blend ();
@@ -150,7 +137,7 @@ namespace System.Drawing.Drawing2D {
if (positions [count - 1] != 1.0F)
throw new ArgumentException ("Invalid Blend object. The positions array must have 1.0 as its last element.");
Status status = GDIPlus.GdipSetLineBlend (NativeBrush, factors, positions, count);
Status status = GDIPlus.GdipSetLineBlend (nativeObject, factors, positions, count);
GDIPlus.CheckStatus (status);
}
}
@@ -159,12 +146,12 @@ namespace System.Drawing.Drawing2D {
public bool GammaCorrection {
get {
bool gammaCorrection;
Status status = GDIPlus.GdipGetLineGammaCorrection (NativeBrush, out gammaCorrection);
Status status = GDIPlus.GdipGetLineGammaCorrection (nativeObject, out gammaCorrection);
GDIPlus.CheckStatus (status);
return gammaCorrection;
}
set {
Status status = GDIPlus.GdipSetLineGammaCorrection (NativeBrush, value);
Status status = GDIPlus.GdipSetLineGammaCorrection (nativeObject, value);
GDIPlus.CheckStatus (status);
}
}
@@ -172,11 +159,11 @@ namespace System.Drawing.Drawing2D {
public ColorBlend InterpolationColors {
get {
int count;
Status status = GDIPlus.GdipGetLinePresetBlendCount (NativeBrush, out count);
Status status = GDIPlus.GdipGetLinePresetBlendCount (nativeObject, out count);
GDIPlus.CheckStatus (status);
int [] intcolors = new int [count];
float [] positions = new float [count];
status = GDIPlus.GdipGetLinePresetBlend (NativeBrush, intcolors, positions, count);
status = GDIPlus.GdipGetLinePresetBlend (nativeObject, intcolors, positions, count);
GDIPlus.CheckStatus (status);
ColorBlend interpolationColors = new ColorBlend ();
@@ -212,7 +199,7 @@ namespace System.Drawing.Drawing2D {
for (int i = 0; i < colors.Length; i++)
blend [i] = colors [i].ToArgb ();
Status status = GDIPlus.GdipSetLinePresetBlend (NativeBrush, blend, positions, count);
Status status = GDIPlus.GdipSetLinePresetBlend (nativeObject, blend, positions, count);
GDIPlus.CheckStatus (status);
}
}
@@ -220,7 +207,7 @@ namespace System.Drawing.Drawing2D {
public Color [] LinearColors {
get {
int [] colors = new int [2];
Status status = GDIPlus.GdipGetLineColors (NativeBrush, colors);
Status status = GDIPlus.GdipGetLineColors (nativeObject, colors);
GDIPlus.CheckStatus (status);
Color [] linearColors = new Color [2];
linearColors [0] = Color.FromArgb (colors [0]);
@@ -230,7 +217,7 @@ namespace System.Drawing.Drawing2D {
}
set {
// no null check, MS throws a NullReferenceException here
Status status = GDIPlus.GdipSetLineColors (NativeBrush, value [0].ToArgb (), value [1].ToArgb ());
Status status = GDIPlus.GdipSetLineColors (nativeObject, value [0].ToArgb (), value [1].ToArgb ());
GDIPlus.CheckStatus (status);
}
}
@@ -244,7 +231,7 @@ namespace System.Drawing.Drawing2D {
public Matrix Transform {
get {
Matrix matrix = new Matrix ();
Status status = GDIPlus.GdipGetLineTransform (NativeBrush, matrix.nativeMatrix);
Status status = GDIPlus.GdipGetLineTransform (nativeObject, matrix.nativeMatrix);
GDIPlus.CheckStatus (status);
return matrix;
@@ -253,7 +240,7 @@ namespace System.Drawing.Drawing2D {
if (value == null)
throw new ArgumentNullException ("Transform");
Status status = GDIPlus.GdipSetLineTransform (NativeBrush, value.nativeMatrix);
Status status = GDIPlus.GdipSetLineTransform (nativeObject, value.nativeMatrix);
GDIPlus.CheckStatus (status);
}
}
@@ -261,7 +248,7 @@ namespace System.Drawing.Drawing2D {
public WrapMode WrapMode {
get {
WrapMode wrapMode;
Status status = GDIPlus.GdipGetLineWrapMode (NativeBrush, out wrapMode);
Status status = GDIPlus.GdipGetLineWrapMode (nativeObject, out wrapMode);
GDIPlus.CheckStatus (status);
return wrapMode;
@@ -271,7 +258,7 @@ namespace System.Drawing.Drawing2D {
if ((value < WrapMode.Tile) || (value > WrapMode.Clamp))
throw new InvalidEnumArgumentException ("WrapMode");
Status status = GDIPlus.GdipSetLineWrapMode (NativeBrush, value);
Status status = GDIPlus.GdipSetLineWrapMode (nativeObject, value);
GDIPlus.CheckStatus (status);
}
}
@@ -288,13 +275,13 @@ namespace System.Drawing.Drawing2D {
if (matrix == null)
throw new ArgumentNullException ("matrix");
Status status = GDIPlus.GdipMultiplyLineTransform (NativeBrush, matrix.nativeMatrix, order);
Status status = GDIPlus.GdipMultiplyLineTransform (nativeObject, matrix.nativeMatrix, order);
GDIPlus.CheckStatus (status);
}
public void ResetTransform ()
{
Status status = GDIPlus.GdipResetLineTransform (NativeBrush);
Status status = GDIPlus.GdipResetLineTransform (nativeObject);
GDIPlus.CheckStatus (status);
}
@@ -305,7 +292,7 @@ namespace System.Drawing.Drawing2D {
public void RotateTransform (float angle, MatrixOrder order)
{
Status status = GDIPlus.GdipRotateLineTransform (NativeBrush, angle, order);
Status status = GDIPlus.GdipRotateLineTransform (nativeObject, angle, order);
GDIPlus.CheckStatus (status);
}
@@ -316,7 +303,7 @@ namespace System.Drawing.Drawing2D {
public void ScaleTransform (float sx, float sy, MatrixOrder order)
{
Status status = GDIPlus.GdipScaleLineTransform (NativeBrush, sx, sy, order);
Status status = GDIPlus.GdipScaleLineTransform (nativeObject, sx, sy, order);
GDIPlus.CheckStatus (status);
}
@@ -330,7 +317,7 @@ namespace System.Drawing.Drawing2D {
if (focus < 0 || focus > 1 || scale < 0 || scale > 1)
throw new ArgumentException ("Invalid parameter passed.");
Status status = GDIPlus.GdipSetLineLinearBlend (NativeBrush, focus, scale);
Status status = GDIPlus.GdipSetLineLinearBlend (nativeObject, focus, scale);
GDIPlus.CheckStatus (status);
}
@@ -344,7 +331,7 @@ namespace System.Drawing.Drawing2D {
if (focus < 0 || focus > 1 || scale < 0 || scale > 1)
throw new ArgumentException ("Invalid parameter passed.");
Status status = GDIPlus.GdipSetLineSigmaBlend (NativeBrush, focus, scale);
Status status = GDIPlus.GdipSetLineSigmaBlend (nativeObject, focus, scale);
GDIPlus.CheckStatus (status);
}
@@ -355,14 +342,14 @@ namespace System.Drawing.Drawing2D {
public void TranslateTransform (float dx, float dy, MatrixOrder order)
{
Status status = GDIPlus.GdipTranslateLineTransform (NativeBrush, dx, dy, order);
Status status = GDIPlus.GdipTranslateLineTransform (nativeObject, dx, dy, order);
GDIPlus.CheckStatus (status);
}
public override object Clone ()
{
IntPtr clonePtr;
Status status = GDIPlus.GdipCloneBrush (NativeBrush, out clonePtr);
Status status = GDIPlus.GdipCloneBrush (nativeObject, out clonePtr);
GDIPlus.CheckStatus (status);
return new LinearGradientBrush (clonePtr);
@@ -0,0 +1,39 @@
//
// System.Drawing.Drawing2D.LinearGradientMode.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 LinearGradientMode {
BackwardDiagonal = 3,
ForwardDiagonal = 2,
Horizontal = 0,
Vertical = 1
}
}
@@ -0,0 +1,37 @@
//
// System.Drawing.Drawing2D.MatrixOrder.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 MatrixOrder {
Append = 1,
Prepend = 0
}
}
@@ -0,0 +1,53 @@
//
// System.Drawing.Drawing2D.PathData.cs
//
// Authors:
// Dennis Hayes ([email protected])
// Andreas Nahr ([email protected])
// Sebastien Pouliot <[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 sealed class PathData
{
private PointF[] points;
private byte[] types;
public PathData ()
{
}
public PointF[] Points {
get { return points; }
set { points = value; }
}
public byte[] Types {
get { return types; }
set { types = value; }
}
}
}
Loaded 100 of 606 files, more files were not shown because too many files have changed in this diff. Show more