mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 11:21:08 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57239e923f | ||
|
|
1fb43ec60d | ||
|
|
e7d4a0e1f7 | ||
|
|
d90075ff7c | ||
|
|
e5de7dacf9 | ||
|
|
abd2d39d6b | ||
|
|
f1a9bc25a1 | ||
|
|
1418f0d58b | ||
|
|
aaf9d40318 | ||
|
|
37ff0bcb9d | ||
|
|
167d1a6c19 | ||
|
|
4de1501831 | ||
|
|
1025d82b3e | ||
|
|
ed0cefd19a | ||
|
|
70c7f2ef1d | ||
|
|
fd5843e964 | ||
|
|
4d35043211 | ||
|
|
b0057f2259 | ||
|
|
3a7874cd61 | ||
|
|
57962479d7 | ||
|
|
076e44ac27 | ||
|
|
f84179d397 | ||
|
|
beabfddefb | ||
|
|
8417f42847 | ||
|
|
4ceda0772d | ||
|
|
75d5e92311 | ||
|
|
936697aa97 | ||
|
|
745a6bec4a | ||
|
|
8aaf80d011 | ||
|
|
21fb262df5 | ||
|
|
5abf30d893 | ||
|
|
ea4e4a9ef6 | ||
|
|
dc2e330a9f | ||
|
|
cfc5d4fb3d | ||
|
|
1f93e5326c | ||
|
|
ee6c6efcfc | ||
|
|
178bb86b7e | ||
|
|
727cf39986 | ||
|
|
098de0b8e8 | ||
|
|
92a45afd7b | ||
|
|
0c6932a985 | ||
|
|
ddb061f776 | ||
|
|
f7c9be4890 | ||
|
|
13aeb8836a | ||
|
|
6295559e04 | ||
|
|
025ee6399b | ||
|
|
8e88de76bb | ||
|
|
cbc43ad527 | ||
|
|
2efd64587f | ||
|
|
9e91b6687e | ||
|
|
ca55ce871f | ||
|
|
b3e3e4cc40 | ||
|
|
2d9f497748 | ||
|
|
86ccab6997 | ||
|
|
5ad055154b | ||
|
|
2247603bd8 | ||
|
|
18dc4ebcd0 | ||
|
|
2ceb6e9402 | ||
|
|
d2a26c9595 | ||
|
|
bb99b3ef99 | ||
|
|
39af47841f | ||
|
|
bb0e787f60 | ||
|
|
83832615fa | ||
|
|
6559b16c14 | ||
|
|
225848bd65 | ||
|
|
fa6194cc19 | ||
|
|
a1eb52aa13 | ||
|
|
a2ee7059d0 | ||
|
|
572f79d0f3 | ||
|
|
30223ad01d | ||
|
|
6221c90f95 | ||
|
|
27ce756030 | ||
|
|
51d1c47c8b | ||
|
|
57ae95d7aa | ||
|
|
810e4a15dd | ||
|
|
ed6183c2b9 | ||
|
|
cd39375a39 | ||
|
|
87c125c435 | ||
|
|
07959b40bb | ||
|
|
94dcde7291 | ||
|
|
b59125ca81 | ||
|
|
6c37483822 | ||
|
|
616ea50718 | ||
|
|
1a8bdd5aff | ||
|
|
6d88df8d82 | ||
|
|
6ca11b76d6 | ||
|
|
6400a71595 | ||
|
|
a12daa47e0 | ||
|
|
90ca313240 | ||
|
|
505695fcd1 | ||
|
|
3298fe7f21 | ||
|
|
17d4227002 | ||
|
|
85a3e77247 | ||
|
|
71c58f8fb0 | ||
|
|
08559f8a29 | ||
|
|
af2b3eb197 | ||
|
|
4aa28ede12 | ||
|
|
67f753a893 | ||
|
|
492438a431 | ||
|
|
bebd8dc438 | ||
|
|
13d0bab910 | ||
|
|
f892c7c574 | ||
|
|
5e6e6df993 | ||
|
|
5d69157964 | ||
|
|
fd185fb454 | ||
|
|
a8c53ebf16 | ||
|
|
f068fb6b66 | ||
|
|
1db2001526 | ||
|
|
7ccddf9832 | ||
|
|
52d9a55a86 | ||
|
|
80165d2117 | ||
|
|
8724ace98a | ||
|
|
4ea3122758 | ||
|
|
0c9eb70a46 | ||
|
|
ff285585d4 | ||
|
|
14867dbabe | ||
|
|
27b67e3586 | ||
|
|
e693ce5077 | ||
|
|
606677431a | ||
|
|
271c88f8a8 | ||
|
|
506d5d4049 | ||
|
|
6bb78cace3 | ||
|
|
5348325a64 | ||
|
|
d181fe7194 | ||
|
|
26eacdc3dc | ||
|
|
87d8bdef08 | ||
|
|
04b6339bd1 | ||
|
|
c7b19b52fd | ||
|
|
5b2437d62f | ||
|
|
3ea09f9c8f | ||
|
|
abd1bd5d8f | ||
|
|
86968831ec | ||
|
|
af835fc6de | ||
|
|
ab5220be93 | ||
|
|
32801300d1 | ||
|
|
1ec9117f63 | ||
|
|
adc4d3c471 | ||
|
|
0279b08ccb | ||
|
|
2602f25eb7 | ||
|
|
de3fa74e12 | ||
|
|
522c8b69f5 | ||
|
|
f8a1ab5d75 | ||
|
|
6f43750475 | ||
|
|
e0e341c7d1 | ||
|
|
b0be338837 | ||
|
|
9df453295e | ||
|
|
e40724e169 | ||
|
|
310be7a2fb | ||
|
|
824b01d4fc | ||
|
|
fec0e65560 | ||
|
|
55293097e1 | ||
|
|
d1aa491294 | ||
|
|
32a5d1fc3b | ||
|
|
18f2255ecd | ||
|
|
f44ff23078 | ||
|
|
c738a606d2 | ||
|
|
983b5a8cbe | ||
|
|
21192c8424 | ||
|
|
7ed46ff6e1 | ||
|
|
d2b64bb5cf | ||
|
|
3454feb426 | ||
|
|
5acc6be700 | ||
|
|
3e514ce907 | ||
|
|
1f85a462e9 | ||
|
|
51c97ade65 | ||
|
|
c2f95645ca | ||
|
|
3611e8ec48 | ||
|
|
6344d4be9f | ||
|
|
1334748e5a | ||
|
|
b5d64ebd0a | ||
|
|
ef29b9fbfa | ||
|
|
7ee123b1e2 | ||
|
|
5831edbc3f | ||
|
|
68f5463685 | ||
|
|
f4346ebc54 | ||
|
|
4cf3f02cac | ||
|
|
afa9a853fb | ||
|
|
10ba222234 | ||
|
|
ccd373f429 | ||
|
|
bdfa3ef2ca | ||
|
|
9aaa0083d0 | ||
|
|
333c6665a2 | ||
|
|
1ebb4e4cbd | ||
|
|
1448821251 | ||
|
|
37ddfb1da4 | ||
|
|
ce31c277fb | ||
|
|
38d0080cf5 | ||
|
|
a08574bf9e | ||
|
|
3765f987d5 | ||
|
|
523e9ff615 | ||
|
|
8da9924557 | ||
|
|
fbb36d5500 | ||
|
|
bcd8b38b57 | ||
|
|
a308a7cd22 | ||
|
|
7ef2b4f919 | ||
|
|
33db577741 | ||
|
|
1fc8f5631c | ||
|
|
c4c6a9373d | ||
|
|
1520a7aaba | ||
|
|
533bcc0c49 | ||
|
|
26cad094ee | ||
|
|
bee68ad79f | ||
|
|
b5d36a9abb | ||
|
|
ca7b288837 | ||
|
|
f99700a264 | ||
|
|
df203f3532 | ||
|
|
f98b92ea6c | ||
|
|
dbaab5d01a | ||
|
|
e5207856a0 | ||
|
|
1aef35403d | ||
|
|
68130ebec9 | ||
|
|
9e469d7b9e | ||
|
|
d421ee95b0 | ||
|
|
6fc58f529b | ||
|
|
5c06650885 | ||
|
|
77a8ed1b39 | ||
|
|
cf39a9cd43 | ||
|
|
7e220bf4ff | ||
|
|
d4bd4f0091 | ||
|
|
afd9c96b3f | ||
|
|
6c6ab73705 | ||
|
|
aaceb6f0cf | ||
|
|
cfa6ff88d1 | ||
|
|
ff3a3a6fad | ||
|
|
9285e189c1 | ||
|
|
5a0573df99 | ||
|
|
c329548380 | ||
|
|
9549385e47 | ||
|
|
3f899a3198 | ||
|
|
dd15ef7b68 | ||
|
|
a427893839 | ||
|
|
866ad511fe | ||
|
|
86f8dd621a | ||
|
|
daa673f978 | ||
|
|
a21319d1ca | ||
|
|
cfe36830d4 | ||
|
|
831381caa9 | ||
|
|
e33294bf22 | ||
|
|
762ac3d618 | ||
|
|
259afc7850 | ||
|
|
c238778b63 | ||
|
|
4a054b40ae | ||
|
|
be684e09b4 | ||
|
|
3830eca92c | ||
|
|
aa59a09fd7 | ||
|
|
e600333511 | ||
|
|
581b46d90d | ||
|
|
17af65a784 | ||
|
|
5ebdc64ef8 | ||
|
|
6f740b5bc3 | ||
|
|
cfe5263372 | ||
|
|
c23173ee4b | ||
|
|
7c284c8c2b | ||
|
|
acf546b1ba | ||
|
|
89fa700441 | ||
|
|
2e68bc17e3 | ||
|
|
f97b7bd2a2 | ||
|
|
7f28de8559 | ||
|
|
3307394dba | ||
|
|
fb4877a8d7 | ||
|
|
d31ccce651 | ||
|
|
348ec2cf7a | ||
|
|
b85f34d763 | ||
|
|
466c00b8f0 | ||
|
|
a0bf70a140 | ||
|
|
d720e3368c | ||
|
|
1ebd866eaa | ||
|
|
39d1e1889f | ||
|
|
5f0dd2998d | ||
|
|
87714d8a45 | ||
|
|
258efac3c6 | ||
|
|
1a4ce67a49 | ||
|
|
e68c3b8027 | ||
|
|
2640a8d862 | ||
|
|
aa8605d0eb | ||
|
|
4b9d0677c9 | ||
|
|
6ccea37726 | ||
|
|
56d5fce7f4 | ||
|
|
00f7811683 | ||
|
|
c5b00568ba | ||
|
|
27bf99ebed | ||
|
|
2015a4ab21 | ||
|
|
2eb33cebf5 | ||
|
|
ccda92d896 | ||
|
|
69f8abf794 | ||
|
|
a4d6fccef9 | ||
|
|
c98b69bc05 | ||
|
|
382a9b3679 | ||
|
|
bd9b4e9b24 | ||
|
|
eab4b7e67b | ||
|
|
b9e7bcabe4 | ||
|
|
e6e0331cde | ||
|
|
540ef7fb38 | ||
|
|
76e9739a43 | ||
|
|
e1b061052d | ||
|
|
5f26cd5416 | ||
|
|
db758b9f85 | ||
|
|
1890aa6ec3 | ||
|
|
a497e40075 | ||
|
|
d8dab47fd0 | ||
|
|
60d58d9128 | ||
|
|
a5fcc9413d | ||
|
|
1d1069575d | ||
|
|
57d7457da5 | ||
|
|
128e454ad2 | ||
|
|
61f32e7f14 | ||
|
|
74695b9d03 | ||
|
|
f8a969aae9 | ||
|
|
417389513f | ||
|
|
e871e6f844 | ||
|
|
a3e6b2cd8b | ||
|
|
310192e3cb | ||
|
|
468339deb6 | ||
|
|
826558a4af | ||
|
|
334d05b1e7 | ||
|
|
dd0eab4247 | ||
|
|
8a1db7bb93 | ||
|
|
64d523c524 | ||
|
|
6b1529a15c | ||
|
|
8a10c623f3 | ||
|
|
fc53acc968 | ||
|
|
edffe785ba | ||
|
|
850f2df48b | ||
|
|
5e3ffa5a51 | ||
|
|
230a43461c | ||
|
|
501e77f912 | ||
|
|
fe06971e14 | ||
|
|
e686d39489 | ||
|
|
b1000f0b2e | ||
|
|
1f0ad125dd | ||
|
|
d87817c174 | ||
|
|
51125153e5 | ||
|
|
d4f922abce | ||
|
|
7ca4c72cc8 | ||
|
|
2e78636ac7 | ||
|
|
0ddf58fe64 | ||
|
|
6baf669349 | ||
|
|
522d027663 | ||
|
|
dc58d950f2 | ||
|
|
83f74c4123 | ||
|
|
fff41905e9 | ||
|
|
44a2d35676 | ||
|
|
1d6a8ed6ea | ||
|
|
4ede66b950 | ||
|
|
2b84f5bc33 | ||
|
|
42311595ae | ||
|
|
0526617e0a | ||
|
|
9b63661c15 | ||
|
|
a46742dcb6 | ||
|
|
a4f960311e | ||
|
|
c64f332016 | ||
|
|
6320fcb16b | ||
|
|
21d5c9c346 | ||
|
|
d0b0e2b880 | ||
|
|
ff0a6e77ff | ||
|
|
e2340cd101 | ||
|
|
bfa744e645 | ||
|
|
9c412c0b91 | ||
|
|
11ec98cacd | ||
|
|
23058b943f | ||
|
|
65b981632c | ||
|
|
6544bcfda8 | ||
|
|
2251178eac | ||
|
|
7daf4b739e | ||
|
|
bd9fa57b81 | ||
|
|
68bff52cae | ||
|
|
8873c44400 | ||
|
|
b603482343 | ||
|
|
5ea6b70ca1 | ||
|
|
8716b46c87 | ||
|
|
b64dd253b6 | ||
|
|
75343422a5 |
No files matched your search
@@ -44,6 +44,26 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
static class Program {
|
||||
|
||||
static readonly string[] _options = new [] {
|
||||
"domain",
|
||||
"assembly",
|
||||
"module",
|
||||
"class",
|
||||
"jit",
|
||||
"exception",
|
||||
"gcalloc",
|
||||
"gc",
|
||||
"thread",
|
||||
// "calls", // Way too heavy.
|
||||
"monitor",
|
||||
"gcmove",
|
||||
"gcroot",
|
||||
"context",
|
||||
"finalization",
|
||||
"counter",
|
||||
"gchandle",
|
||||
};
|
||||
|
||||
static readonly TimeSpan _timeout = TimeSpan.FromHours (6);
|
||||
|
||||
static string FilterInvalidXmlChars (string text) {
|
||||
@@ -75,14 +95,22 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
for (var i = 0; i < benchmarks.Length; i++) {
|
||||
var bench = benchmarks [i];
|
||||
|
||||
var sampleFreq = rand.Next (0, 1001);
|
||||
var sampleFreq = rand.Next (-1000, 1001);
|
||||
var sampleMode = rand.Next (0, 2) == 1 ? "real" : "process";
|
||||
var maxSamples = rand.Next (0, cpus * 2000 + 1);
|
||||
var heapShotFreq = rand.Next (0, 11);
|
||||
var heapShotFreq = rand.Next (-10, 11);
|
||||
var maxFrames = rand.Next (0, 33);
|
||||
var allocMode = rand.Next (0, 2) == 1 ? "alloc" : "noalloc";
|
||||
var options = _options.ToDictionary (x => x, _ => rand.Next (0, 2) == 1)
|
||||
.Select (x => (x.Value ? string.Empty : "no") + x.Key)
|
||||
.ToArray ();
|
||||
|
||||
var profOptions = $"sample=cycles/{sampleFreq},sampling-{sampleMode},maxsamples={maxSamples},heapshot={heapShotFreq}gc,maxframes={maxFrames},{allocMode},output=/dev/null";
|
||||
var profOptions = $"maxframes={maxFrames},{string.Join (",", options)},output=/dev/null";
|
||||
|
||||
if (sampleFreq > 0)
|
||||
profOptions += $",sample={sampleFreq},sampling-{sampleMode},maxsamples={maxSamples}";
|
||||
|
||||
if (heapShotFreq > 0)
|
||||
profOptions += $",heapshot={heapShotFreq}gc";
|
||||
|
||||
var info = new ProcessStartInfo {
|
||||
UseShellExecute = false,
|
||||
|
||||
+32
-15
@@ -1,7 +1,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT(mono, [5.4.1],
|
||||
AC_INIT(mono, [5.5.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=3
|
||||
MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR 0 $MONO_CORLIB_COUNTER`
|
||||
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`
|
||||
|
||||
AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
|
||||
AC_SUBST(MONO_CORLIB_VERSION)
|
||||
@@ -812,7 +812,8 @@ AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you w
|
||||
AC_ARG_WITH(testing_aot_hybrid, [ --with-testing_aot_hybrid=yes,no If you want to build the testing_aot_hybrid assemblies (defaults to no)], [], [with_testing_aot_hybrid=default])
|
||||
AC_ARG_WITH(testing_aot_full, [ --with-testing_aot_full=yes,no If you want to build the testing_aot_full assemblies (defaults to no)], [], [with_testing_aot_full=default])
|
||||
AC_ARG_WITH(winaot, [ --with-winaot=yes,no If you want to build the Windows friendly AOT assemblies (defaults to no)], [], [with_winaot=default])
|
||||
AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default])
|
||||
AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default])
|
||||
AC_ARG_WITH(unreal, [ --with-unreal=yes,no If you want to build the Unreal assemblies (defaults to no)], [], [with_unreal=default])
|
||||
|
||||
|
||||
AC_ARG_WITH(runtime_preset, [ --with-runtime_preset=net_4_x,all,aot,hybridaot,fullaot,bitcode Which default profile to build (defaults to net_4_x)], [], [with_runtime_preset=net_4_x])
|
||||
@@ -833,6 +834,7 @@ with_testing_aot_hybrid_default=no
|
||||
with_testing_aot_full_default=no
|
||||
with_winaot_default=no
|
||||
with_orbis_default=no
|
||||
with_unreal_default=no
|
||||
|
||||
with_bitcode_default=no
|
||||
with_cooperative_gc_default=no
|
||||
@@ -852,6 +854,7 @@ elif test x$with_runtime_preset = xall; then
|
||||
with_xammac_default=yes
|
||||
with_winaot_default=yes
|
||||
with_orbis_default=yes
|
||||
with_unreal_default=yes
|
||||
elif test x$with_runtime_preset = xfullaot; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_testing_aot_full_default=yes
|
||||
@@ -922,6 +925,17 @@ elif test x$with_runtime_preset = xorbis; then
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
|
||||
elif test x$with_runtime_preset = xunreal; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_unreal_default=yes
|
||||
TEST_PROFILE=ounreal
|
||||
|
||||
mono_feature_disable_com='yes'
|
||||
mono_feature_disable_remoting='yes'
|
||||
mono_feature_disable_appdomains='yes'
|
||||
|
||||
AOT_BUILD_FLAGS="--runtime=mobile --aot=hybrid,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot"
|
||||
else
|
||||
with_profile4_x_default=yes
|
||||
fi
|
||||
@@ -968,6 +982,9 @@ fi
|
||||
if test "x$with_orbis" = "xdefault"; then
|
||||
with_orbis=$with_orbis_default
|
||||
fi
|
||||
if test "x$with_unreal" = "xdefault"; then
|
||||
with_unreal=$with_unreal_default
|
||||
fi
|
||||
|
||||
|
||||
AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = "xyes"])
|
||||
@@ -981,8 +998,9 @@ AM_CONDITIONAL(INSTALL_TESTING_AOT_HYBRID, [test "x$with_testing_aot_hybrid" !=
|
||||
AM_CONDITIONAL(INSTALL_TESTING_AOT_FULL, [test "x$with_testing_aot_full" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_WINAOT, [test "x$with_winaot" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_ORBIS, [test "x$with_orbis" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_UNREAL, [test "x$with_unreal" != "xno"])
|
||||
AM_CONDITIONAL(FULL_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full"] || [test "x$TEST_PROFILE" = "xwinaot"] || [test "x$TEST_PROFILE" = "xorbis"])
|
||||
AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"])
|
||||
AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"] || [test "x$TEST_PROFILE" = "xunreal"])
|
||||
|
||||
default_profile=net_4_x
|
||||
if test -z "$INSTALL_MONODROID_TRUE"; then :
|
||||
@@ -1006,6 +1024,9 @@ fi
|
||||
if test -z "$INSTALL_ORBIS_TRUE"; then :
|
||||
default_profile=orbis
|
||||
fi
|
||||
if test -z "$INSTALL_UNREAL_TRUE"; then :
|
||||
default_profile=unreal
|
||||
fi
|
||||
if test -z "$INSTALL_4_x_TRUE"; then :
|
||||
default_profile=net_4_x
|
||||
fi
|
||||
@@ -1262,7 +1283,7 @@ dnl
|
||||
dnl Boehm GC configuration
|
||||
dnl
|
||||
|
||||
AC_ARG_WITH(libgc, [ --with-libgc=included,none Controls the Boehm GC config, default=included],[libgc=$with_gc],[libgc=included])
|
||||
AC_ARG_WITH(libgc, [ --with-libgc=included,none Controls the Boehm GC config, default=included],[libgc=$with_libgc],[libgc=included])
|
||||
|
||||
AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
|
||||
AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
|
||||
@@ -1320,7 +1341,7 @@ if test "x$support_boehm" = "xyes"; then
|
||||
gc_msg="none"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid argument to --with-libgc.])
|
||||
AC_MSG_ERROR([Invalid argument $libgc to --with-libgc.])
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1336,6 +1357,7 @@ if test "x$support_boehm" = "xyes"; then
|
||||
AC_SUBST(BOEHM_DEFINES)
|
||||
|
||||
fi
|
||||
AM_CONDITIONAL(SUPPORT_NULLGC, test "x$libgc" = "xnone")
|
||||
|
||||
dnl
|
||||
dnl End of Boehm GC Configuration
|
||||
@@ -1934,7 +1956,7 @@ if test x$host_win32 = xno; then
|
||||
AC_CHECK_HEADERS(pthread.h)
|
||||
AC_CHECK_HEADERS(pthread_np.h)
|
||||
AC_CHECK_FUNCS(pthread_mutex_timedlock)
|
||||
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_setname_np)
|
||||
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_setname_np pthread_cond_timedwait_relative_np)
|
||||
AC_CHECK_FUNCS(pthread_kill)
|
||||
AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
|
||||
AC_TRY_COMPILE([ #include <pthread.h>], [
|
||||
@@ -3534,12 +3556,6 @@ 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
|
||||
@@ -4140,7 +4156,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.1/tools/csc.exe
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/Microsoft.Net.Compilers.2.3.0/tools/csc.exe
|
||||
|
||||
if test $csc_compiler = mcs; then
|
||||
CSC=$mcs_topdir/class/lib/build/mcs.exe
|
||||
@@ -4562,6 +4578,7 @@ echo "
|
||||
Xamarin.Mac: $with_xammac
|
||||
Windows AOT: $with_winaot
|
||||
Orbis: $with_orbis
|
||||
Unreal: $with_unreal
|
||||
Test profiles: AOT Full ($with_testing_aot_full), AOT Hybrid ($with_testing_aot_hybrid)
|
||||
JNI support: $jdk_headers_found
|
||||
libgdiplus: $libgdiplus_msg
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
|
||||
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf strerror_r)
|
||||
AC_CHECK_FUNCS(getrlimit)
|
||||
AC_CHECK_FUNCS(fork execv execve)
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <eglib-config.h>
|
||||
#ifndef EGLIB_NO_REMAP
|
||||
|
||||
+69
-1
@@ -32,6 +32,12 @@
|
||||
#include <ctype.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
/*
|
||||
* g_strndup and g_vasprintf need to allocate memory with g_malloc if
|
||||
* ENABLE_OVERRIDABLE_ALLOCATORS is defined so that it can be safely freed with g_free
|
||||
@@ -191,10 +197,72 @@ g_strdup_printf (const gchar *format, ...)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Max error number we support. It's empirically found by looking at our target OS.
|
||||
|
||||
Last this was checked was June-2017.
|
||||
|
||||
Apple is at 106.
|
||||
Android is at 133.
|
||||
*/
|
||||
#define MONO_ERRNO_MAX 200
|
||||
#define str(s) #s
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
static pthread_mutex_t strerror_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
#endif
|
||||
|
||||
static char *error_messages [MONO_ERRNO_MAX];
|
||||
|
||||
const gchar *
|
||||
g_strerror (gint errnum)
|
||||
{
|
||||
return strerror (errnum);
|
||||
if (errnum < 0)
|
||||
errnum = -errnum;
|
||||
if (errnum >= MONO_ERRNO_MAX)
|
||||
return ("Error number higher than " str (MONO_ERRNO_MAX));
|
||||
|
||||
if (!error_messages [errnum]) {
|
||||
#ifndef G_OS_WIN32
|
||||
pthread_mutex_lock (&strerror_lock);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRERROR_R
|
||||
char tmp_buff [128]; //Quite arbitrary, should be large enough
|
||||
char *buff = tmp_buff;
|
||||
int buff_len = sizeof (tmp_buff);
|
||||
int r;
|
||||
buff [0] = 0;
|
||||
|
||||
while ((r = strerror_r (errnum, buff, buff_len - 1))) {
|
||||
if (r != ERANGE) {
|
||||
buff = g_strdup_printf ("Invalid Error code '%d'", errnum);
|
||||
break;
|
||||
}
|
||||
if (buff == tmp_buff)
|
||||
buff = g_malloc (buff_len * 2);
|
||||
else
|
||||
buff = g_realloc (buff, buff_len * 2);
|
||||
buff_len *= 2;
|
||||
//Spec is not clean on whether size argument includes space for null terminator or not
|
||||
}
|
||||
if (!error_messages [errnum])
|
||||
error_messages [errnum] = g_strdup (buff);
|
||||
if (buff != tmp_buff)
|
||||
g_free (buff);
|
||||
#else
|
||||
if (!error_messages [errnum])
|
||||
error_messages [errnum] = g_strdup_printf ("Error code '%d'", errnum);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
pthread_mutex_unlock (&strerror_lock);
|
||||
#endif
|
||||
|
||||
}
|
||||
return error_messages [errnum];
|
||||
}
|
||||
|
||||
gchar *
|
||||
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: b09033be33...1cd7cc5a14.
Vendored
+1
-1
Submodule external/bockbuild updated: 0efdb371e6...4ae08e8dd6.
Vendored
+1
-1
Submodule external/cecil updated: c0eb983dac...c76ba7b410.
Vendored
+1
-1
Submodule external/corefx updated: 959fdbd00a...7e70a4e923.
Vendored
+1
-1
Submodule external/linker updated: 99354bf5c1...21e445c26c.
Vendored
+1
-1
Submodule external/nuget-buildtasks updated: b58ba42823...8d307472ea.
Vendored
+1
-1
Submodule external/roslyn-binaries updated: 1904c7d068...dcb0a0534d.
+19
-13
@@ -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,11 +1101,6 @@ code generation backend. For example \fBLLVM_COUNT=10\fR would only
|
||||
compile 10 methods with LLVM and then switch to the Mono JIT engine.
|
||||
\fBLLVM_COUNT=0\fR would disable the LLVM engine altogether.
|
||||
.TP
|
||||
\fBMONO_AOT_CACHE\fR
|
||||
If set, this variable will instruct Mono to ahead-of-time compile new
|
||||
assemblies on demand and store the result into a cache in
|
||||
~/.mono/aot-cache.
|
||||
.TP
|
||||
\fBMONO_ASPNET_INHIBIT_SETTINGSMAP\fR
|
||||
Mono contains a feature which allows modifying settings in the .config files shipped
|
||||
with Mono by using config section mappers. The mappers and the mapping rules are
|
||||
@@ -1314,10 +1309,19 @@ first generation (of two). A larger nursery will usually speed up the
|
||||
program but will obviously use more memory. The default nursery size
|
||||
4 MB.
|
||||
.TP
|
||||
\fBmajor=\fIcollector\fR Specifies which major collector to use.
|
||||
Options are `marksweep' for the Mark&Sweep collector, and
|
||||
`marksweep-conc' for concurrent Mark&Sweep. The non-concurrent
|
||||
Mark&Sweep collector is the default.
|
||||
\fBmajor=\fIcollector\fR
|
||||
Specifies which major collector to use.
|
||||
Options are `marksweep' for the Mark&Sweep collector, `marksweep-conc'
|
||||
for concurrent Mark&Sweep and `marksweep-conc-par' for parallel and
|
||||
concurrent Mark&Sweep. The concurrent Mark&Sweep collector is the default.
|
||||
.TP
|
||||
\fBmode=balanced|throughput|pause\fR[:\fImax-pause\fR]
|
||||
Specifies what should be the garbage collector's target. The `throughput'
|
||||
mode aims to reduce time spent in the garbage collector and improve
|
||||
application speed, the `pause' mode aims to keep pause times to a minimum
|
||||
and it receives the argument \fImax-pause\fR which specifies the maximum
|
||||
pause time in milliseconds that is acceptable and the `balanced' mode
|
||||
which is a general purpose optimal mode.
|
||||
.TP
|
||||
\fBsoft-heap-limit=\fIsize\fR
|
||||
Once the heap size gets larger than this size, ignore what the default
|
||||
@@ -1380,9 +1384,11 @@ more memory when it reaches a stable size.
|
||||
This option is EXPERIMENTAL, so it might disappear in later versions of mono.
|
||||
.TP
|
||||
\fBminor=\fIminor-collector\fR
|
||||
Specifies which minor collector to use. Options are 'simple' which
|
||||
promotes all objects from the nursery directly to the old generation
|
||||
and 'split' which lets object stay longer on the nursery before promoting.
|
||||
Specifies which minor collector to use. Options are `simple' which
|
||||
promotes all objects from the nursery directly to the old generation,
|
||||
`simple-par' which has same promotion behavior as `simple' but using
|
||||
multiple workers and `split' which lets objects stay longer on the nursery
|
||||
before promoting.
|
||||
.TP
|
||||
\fBalloc-ratio=\fIratio\fR
|
||||
Specifies the ratio of memory from the nursery to be use by the alloc space.
|
||||
|
||||
+3
-1
@@ -23,6 +23,7 @@ xbuild_12_SUBDIRS := build class tools/xbuild
|
||||
xbuild_14_SUBDIRS := build class tools/xbuild
|
||||
winaot_SUBDIRS := build class
|
||||
orbis_SUBDIRS := build class
|
||||
unreal_SUBDIRS := build class
|
||||
|
||||
include build/rules.make
|
||||
|
||||
@@ -77,6 +78,7 @@ $(_boot_:%=profile-do--testing_aot_hybrid--%): profile-do--testing_aot_hy
|
||||
$(_boot_:%=profile-do--testing_aot_full--%): profile-do--testing_aot_full--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--winaot--%): profile-do--winaot--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--orbis--%): profile-do--orbis--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--unreal--%): profile-do--unreal--%: profile-do--build--%
|
||||
$(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--%
|
||||
|
||||
testcorlib:
|
||||
@@ -142,7 +144,7 @@ distcheck: dist-tarball
|
||||
MONO_API_SNAPSHOT_PATH := $(topdir)../external/api-snapshot/
|
||||
GENAPI := $(MONO_API_SNAPSHOT_PATH)tools/genapi/GenAPI.exe
|
||||
MONO_API_SNAPSHOT_PROFILE_PATH := $(MONO_API_SNAPSHOT_PATH)profiles/$(PROFILE)/
|
||||
MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, Mono.CSharp.dll SystemWebTestShim.dll standalone-runner-support.dll nunit.core.dll nunit.core.extensions.dll nunit.core.interfaces.dll nunit.framework.dll nunit.framework.extensions.dll nunit.mocks.dll nunit.util.dll nunit-console-runner.dll nunitlite.dll)
|
||||
MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, Mono.CSharp.dll SystemWebTestShim.dll standalone-runner-support.dll nunit.core.dll nunit.core.extensions.dll nunit.core.interfaces.dll nunit.framework.dll nunit.framework.extensions.dll nunit.mocks.dll nunit.util.dll nunit-console-runner.dll nunitlite.dll Mono.Profiler.Log.dll)
|
||||
MONO_API_ASSEMBLIES := $(filter-out $(MONO_API_ASSEMBLIES_IGNORED), $(wildcard $(topdir)class/lib/$(PROFILE)/*.dll)) $(wildcard $(topdir)class/lib/$(PROFILE)/Facades/*.dll)
|
||||
MONO_API_ASSEMBLIES_CS := $(MONO_API_ASSEMBLIES:$(topdir)class/lib/$(PROFILE)/%.dll=$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs)
|
||||
|
||||
|
||||
@@ -40,7 +40,14 @@ class X {
|
||||
if (!Version.TryParse (field.GetValue (null) as string, out version))
|
||||
return 4;
|
||||
|
||||
if (version < new Version (4, 9))
|
||||
Version min_mono_version;
|
||||
#if __MonoCS__
|
||||
min_mono_version = new Version (5, 4);
|
||||
#else
|
||||
min_mono_version = new Version (4, 9);
|
||||
#endif
|
||||
|
||||
if (version < min_mono_version)
|
||||
return 5;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#! -*- makefile -*-
|
||||
|
||||
BOOTSTRAP_PROFILE = build
|
||||
|
||||
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
|
||||
MCS = $(BOOTSTRAP_MCS)
|
||||
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
|
||||
|
||||
PROFILE_MCS_FLAGS = \
|
||||
-d:NET_1_1 \
|
||||
-d:NET_2_0 \
|
||||
-d:NET_2_1 \
|
||||
-d:MOBILE \
|
||||
-d:MOBILE_DYNAMIC \
|
||||
-d:NET_3_5 \
|
||||
-d:NET_4_0 \
|
||||
-d:NET_4_5 \
|
||||
-d:MONO \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
$(DEFAULT_REFERENCES) \
|
||||
$(PLATFORM_DEBUG_FLAGS)
|
||||
|
||||
FRAMEWORK_VERSION = 2.1
|
||||
|
||||
NO_INSTALL = yes
|
||||
MOBILE_DYNAMIC = yes
|
||||
MOBILE_PROFILE = yes
|
||||
NO_CONSOLE = yes
|
||||
@@ -27,7 +27,7 @@
|
||||
static Read() method of RelaxngPattern class:
|
||||
|
||||
RelaxngPattern pattern = RelaxngPattern.Read (
|
||||
new XmlTextReader ("relaxng.rng");
|
||||
new XmlTextReader ("relaxng.rng"));
|
||||
|
||||
You can also use RelaxngPattern class to reuse grammar instance, as
|
||||
already described (see Grammar Object Model).
|
||||
|
||||
@@ -23,7 +23,7 @@ EMBEDDED_DRAWING_DEP := $(filter xammac_net_4_5 testing_aot_full testing_aot_hyb
|
||||
ifndef EMBEDDED_DRAWING_DEP
|
||||
|
||||
# profiles which build a System.Drawing.dll in the repo
|
||||
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE))
|
||||
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal, $(PROFILE))
|
||||
|
||||
ifdef REPO_DRAWING_DEP
|
||||
LIB_REFS += System.Drawing
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{71D02788-3AD8-4C43-BDEB-1A3D277496BA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699,1616,1699</NoWarn>
|
||||
<NoWarn>1699,1616,1699,436</NoWarn>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
|
||||
@@ -36,7 +36,7 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699,1616,1699</NoWarn>
|
||||
<NoWarn>1699,1616,1699,436</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
@@ -44,7 +44,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699,1616,1699</NoWarn>
|
||||
<NoWarn>1699,1616,1699,436</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
|
||||
@@ -29,7 +29,7 @@ LIB_REFS += System.Web
|
||||
endif
|
||||
|
||||
# profiles which build a System.Drawing.dll in the repo
|
||||
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE))
|
||||
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal, $(PROFILE))
|
||||
|
||||
ifdef REPO_DRAWING_DEP
|
||||
LIB_REFS += System.Drawing
|
||||
|
||||
@@ -83,6 +83,9 @@ winaot_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
|
||||
orbis_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
|
||||
orbis_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
|
||||
|
||||
unreal_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
|
||||
unreal_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
|
||||
|
||||
mobile_only_SUBDIRS = System.Net.Ping System.Runtime.Serialization.Formatters System.Security.Cryptography.Csp System.Security.Cryptography.Pkcs \
|
||||
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy
|
||||
|
||||
|
||||
+8
-1
@@ -130,6 +130,11 @@ winaot_dirs := \
|
||||
System.Drawing \
|
||||
$(pcl_facade_dirs)
|
||||
|
||||
unreal_dirs := \
|
||||
$(mobile_common_dirs) \
|
||||
System.Drawing \
|
||||
$(pcl_facade_dirs)
|
||||
|
||||
xammac_4_5_dirs := \
|
||||
corlib \
|
||||
Mono.Security \
|
||||
@@ -315,6 +320,7 @@ net_4_x_parallel_dirs := \
|
||||
System.Workflow.ComponentModel \
|
||||
System.Workflow.Runtime \
|
||||
System.Reflection.Context \
|
||||
Mono.Profiler.Log \
|
||||
legacy/Mono.Cecil \
|
||||
$(pcl_facade_dirs)
|
||||
|
||||
@@ -352,10 +358,11 @@ xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
|
||||
xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
|
||||
winaot_SUBDIRS := $(winaot_dirs)
|
||||
orbis_SUBDIRS := $(orbis_dirs)
|
||||
unreal_SUBDIRS := $(unreal_dirs)
|
||||
|
||||
include ../build/rules.make
|
||||
|
||||
SUBDIRS = $(testing_aot_full_dirs) $(testing_aot_hybrid_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS)
|
||||
SUBDIRS = $(testing_aot_full_dirs) $(testing_aot_hybrid_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS) $(unreal_dirs)
|
||||
|
||||
DIST_ONLY_SUBDIRS = dlr aot-compiler reference-assemblies $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
|
||||
|
||||
|
||||
@@ -150,18 +150,18 @@ namespace MonoTests.Microsoft.Build.Execution
|
||||
var bm = new BuildManager ();
|
||||
bm.BeginBuild (new BuildParameters () { Loggers = new ILogger [] {new ConsoleLogger (LoggerVerbosity.Diagnostic, TextWriter.Null.WriteLine, null, null)} });
|
||||
DateTime waitDone = DateTime.MinValue;
|
||||
DateTime beforeExec = DateTime.Now;
|
||||
DateTime beforeExec = DateTime.UtcNow;
|
||||
var l = new List<BuildSubmission> ();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
var sub = bm.PendBuildRequest (new BuildRequestData (proj, new string [] { "Wait1Sec" }));
|
||||
l.Add (sub);
|
||||
sub.ExecuteAsync (delegate { waitDone = DateTime.Now; }, null);
|
||||
sub.ExecuteAsync (delegate { waitDone = DateTime.UtcNow; }, null);
|
||||
}
|
||||
bm.EndBuild ();
|
||||
Assert.IsTrue (l.All (s => s.BuildResult.OverallResult == BuildResultCode.Success), "#1");
|
||||
DateTime endBuildDone = DateTime.Now;
|
||||
Assert.IsTrue (endBuildDone - beforeExec >= TimeSpan.FromSeconds (1), "#2");
|
||||
Assert.IsTrue (endBuildDone > waitDone, "#3");
|
||||
DateTime endBuildDone = DateTime.UtcNow;
|
||||
AssertHelper.GreaterOrEqual (endBuildDone - beforeExec, TimeSpan.FromSeconds (1), "#2");
|
||||
AssertHelper.Greater (endBuildDone, waitDone, "#3");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -101,15 +101,15 @@ namespace MonoTests.Microsoft.Build.Execution
|
||||
var bm = new BuildManager ();
|
||||
bm.BeginBuild (new BuildParameters ());
|
||||
DateTime waitDone = DateTime.MinValue;
|
||||
DateTime beforeExec = DateTime.Now;
|
||||
DateTime beforeExec = DateTime.UtcNow;
|
||||
var sub = bm.PendBuildRequest (new BuildRequestData (proj, new string [] { "Wait1Sec" }));
|
||||
sub.ExecuteAsync (delegate { waitDone = DateTime.Now; }, null);
|
||||
sub.ExecuteAsync (delegate { waitDone = DateTime.UtcNow; }, null);
|
||||
bm.EndBuild ();
|
||||
Assert.IsTrue (sub.BuildResult.OverallResult == BuildResultCode.Success, "#1");
|
||||
DateTime endBuildDone = DateTime.Now;
|
||||
Assert.IsTrue (endBuildDone - beforeExec >= TimeSpan.FromSeconds (1), "#2");
|
||||
Assert.IsTrue (waitDone >= beforeExec, "#3");
|
||||
Assert.IsTrue (endBuildDone >= waitDone, "#4");
|
||||
Assert.AreEqual (BuildResultCode.Success, sub.BuildResult.OverallResult, "#1");
|
||||
DateTime endBuildDone = DateTime.UtcNow;
|
||||
AssertHelper.GreaterOrEqual (endBuildDone - beforeExec, TimeSpan.FromSeconds (1), "#2");
|
||||
AssertHelper.GreaterOrEqual (waitDone, beforeExec, "#3");
|
||||
AssertHelper.GreaterOrEqual (endBuildDone, waitDone, "#4");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -106,9 +106,6 @@
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\COperators.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\AggregateDeclaration.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\Declaration.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\GlobalAttributeDeclaration.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\NamespaceDeclaration.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionKind.cs" />
|
||||
@@ -139,7 +136,6 @@
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\EventSymbol.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\FieldSymbol.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\IndexerSymbol.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\LabelSymbol.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\LocalVariableSymbol.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodOrPropertySymbol.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodSymbol.cs" />
|
||||
@@ -157,13 +153,11 @@
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolTable.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactory.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactoryBase.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\TransparentIdentifierMemberSymbol.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\TypeParameterSymbol.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\UnresolvedAggregateSymbol.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\VariableSymbol.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayIndex.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayInitialization.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayLength.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Assignment.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\BinaryOperator.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Block.cs" />
|
||||
@@ -173,7 +167,6 @@
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Class.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\CompoundOperator.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Concatenate.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ConditionalOperator.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Constant.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Event.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\EXPR.cs" />
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
<Compile Include="..\..\mcs\settings.cs" />
|
||||
<Compile Include="..\..\mcs\statement.cs" />
|
||||
<Compile Include="..\..\mcs\support.cs" />
|
||||
<Compile Include="..\..\mcs\tuples.cs" />
|
||||
<Compile Include="..\..\mcs\typemanager.cs" />
|
||||
<Compile Include="..\..\mcs\typespec.cs" />
|
||||
<Compile Include="..\..\mcs\visit.cs" />
|
||||
|
||||
@@ -49,6 +49,7 @@ aot.cs
|
||||
../../mcs/support.cs
|
||||
../../mcs/typemanager.cs
|
||||
../../mcs/typespec.cs
|
||||
../../mcs/tuples.cs
|
||||
../../mcs/visit.cs
|
||||
../../class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
|
||||
../../class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
|
||||
|
||||
@@ -2214,7 +2214,7 @@ namespace Mono.Debugger.Soft
|
||||
internal ValueImpl[] Type_GetValues (long id, long[] fields, long thread_id) {
|
||||
int len = fields.Length;
|
||||
PacketReader r;
|
||||
if (thread_id != 0)
|
||||
if (thread_id != 0 && Version.AtLeast(2, 3))
|
||||
r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES_2, new PacketWriter ().WriteId (id).WriteId (thread_id).WriteInt (len).WriteIds (fields));
|
||||
else
|
||||
r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (len).WriteIds (fields));
|
||||
|
||||
@@ -30,6 +30,11 @@ namespace Mono.Debugger.Soft
|
||||
if (args != null && args.Length != 0)
|
||||
throw new NotSupportedException ();
|
||||
|
||||
//If method is virtual we can't optimize(execute IL) because it's maybe
|
||||
//overriden... call runtime to invoke overriden version...
|
||||
if (method.IsVirtual)
|
||||
throw new NotSupportedException ();
|
||||
|
||||
if (method.IsStatic || method.DeclaringType.IsValueType || this_val == null || !(this_val is ObjectMirror))
|
||||
throw new NotSupportedException ();
|
||||
|
||||
@@ -350,6 +355,12 @@ namespace Mono.Debugger.Soft
|
||||
} catch {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
} else if (method.ReturnType.IsEnum && primitive != null) {
|
||||
try {
|
||||
res = method.VirtualMachine.CreateEnumMirror (method.ReturnType, primitive);
|
||||
} catch {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Mono.Debugger.Soft
|
||||
sb.Append (ReturnType.Name);
|
||||
sb.Append (' ');
|
||||
if (type_namespace != String.Empty)
|
||||
sb.Append (type_namespace + ".");
|
||||
sb.Append (type_namespace).Append (".");
|
||||
sb.Append(type_name);
|
||||
sb.Append(":");
|
||||
sb.Append(Name);
|
||||
|
||||
@@ -102,6 +102,18 @@ namespace Mono.Debugger.Soft
|
||||
}
|
||||
}
|
||||
|
||||
public int EndLineNumber {
|
||||
get {
|
||||
return Location.EndLineNumber;
|
||||
}
|
||||
}
|
||||
|
||||
public int EndColumnNumber {
|
||||
get {
|
||||
return Location.EndColumnNumber;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsDebuggerInvoke {
|
||||
get {
|
||||
return (flags & StackFrameFlags.DEBUGGER_INVOKE) != 0;
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace Mono.Debugger.Soft
|
||||
ManualResetEvent fetchingEvent = new ManualResetEvent (false);
|
||||
ThreadInfo info;
|
||||
StackFrame[] frames;
|
||||
bool threadStateInvalid = true;
|
||||
ThreadState threadState;
|
||||
|
||||
internal ThreadMirror (VirtualMachine vm, long id) : base (vm, id) {
|
||||
}
|
||||
@@ -30,6 +32,7 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
internal void InvalidateFrames () {
|
||||
cacheInvalid = true;
|
||||
threadStateInvalid = true;
|
||||
}
|
||||
|
||||
internal void FetchFrames (bool mustFetch = false) {
|
||||
@@ -91,7 +94,11 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
public ThreadState ThreadState {
|
||||
get {
|
||||
return (ThreadState)vm.conn.Thread_GetState (id);
|
||||
if (threadStateInvalid) {
|
||||
threadState = (ThreadState) vm.conn.Thread_GetState (id);
|
||||
threadStateInvalid = false;
|
||||
}
|
||||
return threadState;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -665,7 +665,7 @@ namespace Mono.Debugger.Soft
|
||||
return res;
|
||||
}
|
||||
|
||||
internal ValueImpl EncodeValue (Value v) {
|
||||
internal ValueImpl EncodeValue (Value v, List<Value> duplicates = null) {
|
||||
if (v is PrimitiveValue) {
|
||||
object val = (v as PrimitiveValue).Value;
|
||||
if (val == null)
|
||||
@@ -675,16 +675,22 @@ namespace Mono.Debugger.Soft
|
||||
} else if (v is ObjectMirror) {
|
||||
return new ValueImpl { Type = ElementType.Object, Objid = (v as ObjectMirror).Id };
|
||||
} else if (v is StructMirror) {
|
||||
return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields) };
|
||||
if (duplicates == null)
|
||||
duplicates = new List<Value> ();
|
||||
if (duplicates.Contains (v))
|
||||
return new ValueImpl { Type = (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL, Objid = 0 };
|
||||
duplicates.Add (v);
|
||||
|
||||
return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields, duplicates) };
|
||||
} else {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal ValueImpl[] EncodeValues (IList<Value> values) {
|
||||
internal ValueImpl[] EncodeValues (IList<Value> values, List<Value> duplicates = null) {
|
||||
ValueImpl[] res = new ValueImpl [values.Count];
|
||||
for (int i = 0; i < values.Count; ++i)
|
||||
res [i] = EncodeValue (values [i]);
|
||||
res [i] = EncodeValue (values [i], duplicates);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -724,6 +730,7 @@ namespace Mono.Debugger.Soft
|
||||
l.Add (new ThreadStartEvent (vm, req_id, id));
|
||||
break;
|
||||
case EventType.ThreadDeath:
|
||||
vm.GetThread (id).InvalidateFrames ();
|
||||
vm.InvalidateThreadCache ();
|
||||
l.Add (new ThreadDeathEvent (vm, req_id, id));
|
||||
break;
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Text;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
@@ -95,6 +96,12 @@ namespace Mono.Debugger.Soft
|
||||
info.FileName = "valgrind";
|
||||
info.UseShellExecute = false;
|
||||
|
||||
if (info.RedirectStandardError)
|
||||
info.StandardErrorEncoding = Encoding.UTF8;
|
||||
|
||||
if (info.RedirectStandardOutput)
|
||||
info.StandardOutputEncoding = Encoding.UTF8;
|
||||
|
||||
ITargetProcess p;
|
||||
if (options != null && options.CustomProcessLauncher != null)
|
||||
p = new ProcessWrapper (options.CustomProcessLauncher (info));
|
||||
|
||||
@@ -1165,10 +1165,18 @@ public class Tests : TestsBase, ITest2
|
||||
return 42;
|
||||
}
|
||||
|
||||
public int invoke_pass_nullable (int? i) {
|
||||
return (int)i;
|
||||
}
|
||||
|
||||
public int? invoke_return_nullable_null () {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int invoke_pass_nullable_null (int? i) {
|
||||
return i.HasValue ? 1 : 2;
|
||||
}
|
||||
|
||||
public void invoke_type_load () {
|
||||
new Class3 ();
|
||||
}
|
||||
|
||||
@@ -2617,6 +2617,11 @@ public class DebuggerTests
|
||||
m = s.Type.GetMethod ("ToString");
|
||||
v = s.InvokeMethod (e.Thread, m, null);
|
||||
|
||||
// pass nullable as argument
|
||||
m = t.GetMethod ("invoke_pass_nullable");
|
||||
v = this_obj.InvokeMethod (e.Thread, m, new Value [] { s });
|
||||
AssertValue (42, v);
|
||||
|
||||
// return nullable null
|
||||
m = t.GetMethod ("invoke_return_nullable_null");
|
||||
v = this_obj.InvokeMethod (e.Thread, m, null);
|
||||
@@ -2630,6 +2635,11 @@ public class DebuggerTests
|
||||
m = s.Type.GetMethod ("ToString");
|
||||
v = s.InvokeMethod (e.Thread, m, null);
|
||||
|
||||
// pass nullable null as argument
|
||||
m = t.GetMethod ("invoke_pass_nullable_null");
|
||||
v = this_obj.InvokeMethod (e.Thread, m, new Value [] { s });
|
||||
AssertValue (2, v);
|
||||
|
||||
// pass primitive
|
||||
m = t.GetMethod ("invoke_pass_primitive");
|
||||
Value[] args = new Value [] {
|
||||
@@ -2723,6 +2733,17 @@ public class DebuggerTests
|
||||
task = t.InvokeMethodAsync (e.Thread, m, new Value [] { vm.RootDomain.CreateString ("ABC") });
|
||||
AssertValue ("ABC", task.Result);
|
||||
|
||||
// string constructor
|
||||
var stringType = vm.RootDomain.Corlib.GetType ("System.String");
|
||||
var stringConstructor = stringType.GetMethods ().Single (c=>
|
||||
c.Name == ".ctor" &&
|
||||
c.GetParameters ().Length == 2 &&
|
||||
c.GetParameters ()[0].ParameterType.Name == "Char" &&
|
||||
c.GetParameters ()[1].ParameterType.Name == "Int32");
|
||||
var str = stringType.NewInstance (e.Thread, stringConstructor, new Value [] { vm.CreateValue ('a'), vm.CreateValue (3)});
|
||||
|
||||
AssertValue("aaa", str);
|
||||
|
||||
// Argument checking
|
||||
|
||||
// null thread
|
||||
@@ -4122,7 +4143,7 @@ public class DebuggerTests
|
||||
|
||||
frames = thread.GetFrames ();
|
||||
Assert.AreEqual (8, frames.Length, "#7");
|
||||
Assert.AreEqual ("WaitOne_internal", frames [0].Method.Name, "#8.0");
|
||||
Assert.AreEqual ("Wait_internal", frames [0].Method.Name, "#8.0");
|
||||
Assert.AreEqual ("WaitOneNative", frames [1].Method.Name, "#8.1");
|
||||
Assert.AreEqual ("InternalWaitOne", frames [2].Method.Name, "#8.2");
|
||||
Assert.AreEqual ("WaitOne", frames [3].Method.Name, "#8.3");
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace Mono.Remoting.Channels.Unix
|
||||
_pool = pool;
|
||||
_client = client;
|
||||
_stream = new BufferedStream (client.GetStream());
|
||||
_controlTime = DateTime.Now;
|
||||
_controlTime = DateTime.UtcNow;
|
||||
_buffer = new byte[UnixMessageIO.DefaultStreamBufferSize];
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace Mono.Remoting.Channels.Unix
|
||||
{
|
||||
lock (_pool)
|
||||
{
|
||||
entry.ControlTime = DateTime.Now; // Initialize timeout
|
||||
entry.ControlTime = DateTime.UtcNow; // Initialize timeout
|
||||
_pool.Add (entry);
|
||||
Monitor.Pulse (_pool);
|
||||
}
|
||||
@@ -295,7 +295,7 @@ namespace Mono.Remoting.Channels.Unix
|
||||
for (int n=0; n < _pool.Count; n++)
|
||||
{
|
||||
UnixConnection entry = (UnixConnection)_pool[n];
|
||||
if ( (DateTime.Now - entry.ControlTime).TotalSeconds > UnixConnectionPool.KeepAliveSeconds)
|
||||
if ( (DateTime.UtcNow - entry.ControlTime).TotalSeconds > UnixConnectionPool.KeepAliveSeconds)
|
||||
{
|
||||
CancelConnection (entry);
|
||||
_pool.RemoveAt(n);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Mono.Unix;
|
||||
@@ -25,12 +26,12 @@ namespace MonoTests.Mono.Unix {
|
||||
static Thread CreateWaitSignalThread (UnixSignal signal, int timeout)
|
||||
{
|
||||
Thread t1 = new Thread(delegate() {
|
||||
DateTime start = DateTime.Now;
|
||||
var sw = Stopwatch.StartNew ();
|
||||
bool r = signal.WaitOne (timeout, false);
|
||||
DateTime end = DateTime.Now;
|
||||
sw.Stop ();
|
||||
Assert.AreEqual (signal.Count, 1);
|
||||
Assert.AreEqual (r, true);
|
||||
if ((end - start) > new TimeSpan (0, 0, timeout/1000))
|
||||
if (sw.Elapsed > new TimeSpan (0, 0, timeout/1000))
|
||||
throw new InvalidOperationException ("Signal slept too long");
|
||||
});
|
||||
return t1;
|
||||
@@ -248,12 +249,12 @@ namespace MonoTests.Mono.Unix {
|
||||
{
|
||||
Thread t1 = new Thread (delegate () {
|
||||
using (UnixSignal a = new UnixSignal (Signum.SIGINT)) {
|
||||
DateTime start = DateTime.Now;
|
||||
var sw = Stopwatch.StartNew ();
|
||||
bool r = a.WaitOne (5000, false);
|
||||
DateTime end = DateTime.Now;
|
||||
sw.Stop ();
|
||||
Assert.AreEqual (a.Count, 1);
|
||||
Assert.AreEqual (r, true);
|
||||
if ((end - start) > new TimeSpan (0, 0, 5))
|
||||
if (sw.Elapsed > new TimeSpan (0, 0, 5))
|
||||
throw new InvalidOperationException ("Signal slept too long");
|
||||
}
|
||||
});
|
||||
@@ -272,12 +273,12 @@ namespace MonoTests.Mono.Unix {
|
||||
{
|
||||
Thread t1 = new Thread (delegate () {
|
||||
using (UnixSignal a = new UnixSignal (Signum.SIGINT)) {
|
||||
DateTime start = DateTime.Now;
|
||||
var sw = Stopwatch.StartNew ();
|
||||
int idx = UnixSignal.WaitAny (new UnixSignal[]{a}, 5000);
|
||||
DateTime end = DateTime.Now;
|
||||
sw.Stop ();
|
||||
Assert.AreEqual (idx, 0);
|
||||
Assert.AreEqual (a.Count, 1);
|
||||
if ((end - start) > new TimeSpan (0, 0, 5))
|
||||
if (sw.Elapsed > new TimeSpan (0, 0, 5))
|
||||
throw new InvalidOperationException ("Signal slept too long");
|
||||
}
|
||||
});
|
||||
@@ -297,13 +298,13 @@ namespace MonoTests.Mono.Unix {
|
||||
Thread t1 = new Thread (delegate () {
|
||||
using (UnixSignal a = new UnixSignal (Signum.SIGINT))
|
||||
using (UnixSignal b = new UnixSignal (Signum.SIGTERM)) {
|
||||
DateTime start = DateTime.Now;
|
||||
var sw = Stopwatch.StartNew ();
|
||||
int idx = UnixSignal.WaitAny (new UnixSignal[]{a, b}, 5000);
|
||||
DateTime end = DateTime.Now;
|
||||
sw.Stop ();
|
||||
Assert.AreEqual (idx, 1);
|
||||
Assert.AreEqual (a.Count, 0);
|
||||
Assert.AreEqual (b.Count, 1);
|
||||
if ((end - start) > new TimeSpan (0, 0, 5))
|
||||
if (sw.Elapsed > new TimeSpan (0, 0, 5))
|
||||
throw new InvalidOperationException ("Signal slept too long");
|
||||
}
|
||||
});
|
||||
@@ -321,12 +322,12 @@ namespace MonoTests.Mono.Unix {
|
||||
public void TestNoEmit ()
|
||||
{
|
||||
using (UnixSignal u = new UnixSignal (Signum.SIGINT)) {
|
||||
DateTime start = DateTime.Now;
|
||||
var sw = Stopwatch.StartNew ();
|
||||
bool r = u.WaitOne (5100, false);
|
||||
Assert.AreEqual (r, false);
|
||||
DateTime end = DateTime.Now;
|
||||
if ((end - start) < new TimeSpan (0, 0, 5))
|
||||
throw new InvalidOperationException ("Signal didn't block for 5s; blocked for " + (end-start).ToString());
|
||||
sw.Stop ();
|
||||
if (sw.Elapsed < new TimeSpan (0, 0, 5))
|
||||
throw new InvalidOperationException ("Signal didn't block for 5s; blocked for " + sw.Elapsed.TotalSeconds.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle ("Mono.Profiler.Log")]
|
||||
[assembly: AssemblyDescription ("Mono Log Profiler API Library")]
|
||||
|
||||
[assembly: AssemblyCompany (Consts.MonoCompany)]
|
||||
[assembly: AssemblyProduct (Consts.MonoProduct)]
|
||||
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
|
||||
|
||||
[assembly: AssemblyVersion (Consts.FxVersion)]
|
||||
[assembly: SatelliteContractVersion (Consts.FxVersion)]
|
||||
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
|
||||
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
|
||||
|
||||
[assembly: ComVisible (false)]
|
||||
@@ -0,0 +1,12 @@
|
||||
thisdir = class/Mono.Profiler.Log
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = Mono.Profiler.Log.dll
|
||||
LIBRARY_SNK = ../mono.snk
|
||||
|
||||
LIB_REFS = System System.Core
|
||||
LIB_MCS_FLAGS = /unsafe /keyfile:$(LIBRARY_SNK) /publicsign
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include ../../build/library.make
|
||||
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{58A188CE-DED8-48B0-98B7-065A260D21DF}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
|
||||
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
|
||||
<OutputPath>./../../class/lib/net_4_x-$(HostPlatform)</OutputPath>
|
||||
<IntermediateOutputPath>obj-net_4_x-$(HostPlatform)</IntermediateOutputPath>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
<NoStdLib>True</NoStdLib>
|
||||
|
||||
<NoConfig>True</NoConfig>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>
|
||||
</RootNamespace>
|
||||
<AssemblyName>Mono.Profiler.Log</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>../mono.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
|
||||
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
|
||||
is a problem to compile the Mono mscorlib.dll -->
|
||||
<PropertyGroup>
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\build\common\Consts.cs" />
|
||||
<Compile Include="..\..\build\common\Locale.cs" />
|
||||
<Compile Include="Assembly\AssemblyInfo.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogBufferHeader.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogEnums.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogEvent.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogEvents.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogEventVisitor.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogException.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogProcessor.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogReader.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogRuntimeProfiler.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogStream.cs" />
|
||||
<Compile Include="Mono.Profiler.Log\LogStreamHeader.cs" />␍ </ItemGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../corlib/corlib-net_4_x.csproj">
|
||||
<Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>
|
||||
<Name>corlib-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../System/System-net_4_x.csproj">
|
||||
<Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>
|
||||
<Name>System-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../System.Core/System.Core-net_4_x.csproj">
|
||||
<Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>
|
||||
<Name>System.Core-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Assembly/AssemblyInfo.cs
|
||||
../../build/common/Consts.cs
|
||||
../../build/common/Locale.cs
|
||||
Mono.Profiler.Log/LogBufferHeader.cs
|
||||
Mono.Profiler.Log/LogEnums.cs
|
||||
Mono.Profiler.Log/LogEvent.cs
|
||||
Mono.Profiler.Log/LogEventVisitor.cs
|
||||
Mono.Profiler.Log/LogEvents.cs
|
||||
Mono.Profiler.Log/LogException.cs
|
||||
Mono.Profiler.Log/LogProcessor.cs
|
||||
Mono.Profiler.Log/LogReader.cs
|
||||
Mono.Profiler.Log/LogRuntimeProfiler.cs
|
||||
Mono.Profiler.Log/LogStream.cs
|
||||
Mono.Profiler.Log/LogStreamHeader.cs
|
||||
@@ -0,0 +1,46 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
public sealed class LogBufferHeader {
|
||||
|
||||
const int Id = 0x4d504c01;
|
||||
|
||||
public LogStreamHeader StreamHeader { get; }
|
||||
|
||||
public int Length { get; }
|
||||
|
||||
public ulong TimeBase { get; }
|
||||
|
||||
public long PointerBase { get; }
|
||||
|
||||
public long ObjectBase { get; }
|
||||
|
||||
public long ThreadId { get; }
|
||||
|
||||
public long MethodBase { get; }
|
||||
|
||||
internal ulong CurrentTime { get; set; }
|
||||
|
||||
internal long CurrentMethod { get; set; }
|
||||
|
||||
internal LogBufferHeader (LogStreamHeader streamHeader, LogReader reader)
|
||||
{
|
||||
StreamHeader = streamHeader;
|
||||
|
||||
var id = reader.ReadInt32 ();
|
||||
|
||||
if (id != Id)
|
||||
throw new LogException ($"Invalid buffer header ID (0x{id:X}).");
|
||||
|
||||
Length = reader.ReadInt32 ();
|
||||
TimeBase = CurrentTime = reader.ReadUInt64 ();
|
||||
PointerBase = reader.ReadInt64 ();
|
||||
ObjectBase = reader.ReadInt64 ();
|
||||
ThreadId = reader.ReadInt64 ();
|
||||
MethodBase = CurrentMethod = reader.ReadInt64 ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
// mono/profiler/log.h : TYPE_*
|
||||
enum LogEventType {
|
||||
Allocation = 0,
|
||||
GC = 1,
|
||||
Metadata = 2,
|
||||
Method = 3,
|
||||
Exception = 4,
|
||||
Monitor = 5,
|
||||
Heap = 6,
|
||||
Sample = 7,
|
||||
Runtime = 8,
|
||||
Coverage = 9,
|
||||
Meta = 10,
|
||||
|
||||
AllocationNoBacktrace = 0 << 4,
|
||||
AllocationBacktrace = 1 << 4,
|
||||
|
||||
GCEvent = 1 << 4,
|
||||
GCResize = 2 << 4,
|
||||
GCMove = 3 << 4,
|
||||
GCHandleCreationNoBacktrace = 4 << 4,
|
||||
GCHandleDeletionNoBacktrace = 5 << 4,
|
||||
GCHandleCreationBacktrace = 6 << 4,
|
||||
GCHandleDeletionBacktrace = 7 << 4,
|
||||
GCFinalizeBegin = 8 << 4,
|
||||
GCFinalizeEnd = 9 << 4,
|
||||
GCFinalizeObjectBegin = 10 << 4,
|
||||
GCFinalizeObjectEnd = 11 << 4,
|
||||
|
||||
MetadataExtra = 0 << 4,
|
||||
MetadataEndLoad = 2 << 4,
|
||||
MetadataEndUnload = 4 << 4,
|
||||
|
||||
MethodLeave = 1 << 4,
|
||||
MethodEnter = 2 << 4,
|
||||
MethodLeaveExceptional = 3 << 4,
|
||||
MethodJit = 4 << 4,
|
||||
|
||||
ExceptionThrowNoBacktrace = 0 << 7,
|
||||
ExceptionThrowBacktrace = 1 << 7,
|
||||
ExceptionClause = 1 << 4,
|
||||
|
||||
MonitorNoBacktrace = 0 << 7,
|
||||
MonitorBacktrace = 1 << 7,
|
||||
|
||||
HeapBegin = 0 << 4,
|
||||
HeapEnd = 1 << 4,
|
||||
HeapObject = 2 << 4,
|
||||
HeapRoots = 3 << 4,
|
||||
|
||||
SampleHit = 0 << 4,
|
||||
SampleUnmanagedSymbol = 1 << 4,
|
||||
SampleUnmanagedBinary = 2 << 4,
|
||||
SampleCounterDescriptions = 3 << 4,
|
||||
SampleCounters = 4 << 4,
|
||||
|
||||
RuntimeJitHelper = 1 << 4,
|
||||
|
||||
CoverageAssembly = 0 << 4,
|
||||
CoverageMethod = 1 << 4,
|
||||
CoverageStatement = 2 << 4,
|
||||
CoverageClass = 3 << 4,
|
||||
|
||||
MetaSynchronizationPoint = 0 << 4,
|
||||
}
|
||||
|
||||
// mono/profiler/log.h : TYPE_*
|
||||
enum LogMetadataType {
|
||||
Class = 1,
|
||||
Image = 2,
|
||||
Assembly = 3,
|
||||
AppDomain = 4,
|
||||
Thread = 5,
|
||||
Context = 6,
|
||||
}
|
||||
|
||||
// mono/utils/mono-counters.h : MONO_COUNTER_*
|
||||
public enum LogCounterType {
|
||||
Int32 = 0,
|
||||
UInt32 = 1,
|
||||
Word = 2,
|
||||
Int64 = 3,
|
||||
UInt64 = 4,
|
||||
Double = 5,
|
||||
String = 6,
|
||||
Interval = 7,
|
||||
}
|
||||
|
||||
// mono/utils/mono-counters.h : MONO_COUNTER_*
|
||||
public enum LogCounterSection {
|
||||
Jit = 1 << 8,
|
||||
GC = 1 << 9,
|
||||
Metadata = 1 << 10,
|
||||
Generics = 1 << 11,
|
||||
Security = 1 << 12,
|
||||
Runtime = 1 << 13,
|
||||
System = 1 << 14,
|
||||
User = 1 << 15,
|
||||
Profiler = 1 << 16,
|
||||
}
|
||||
|
||||
// mono/utils/mono-counters.h : MONO_COUNTER_*
|
||||
public enum LogCounterUnit {
|
||||
Raw = 0 << 24,
|
||||
Bytes = 1 << 24,
|
||||
Time = 2 << 24,
|
||||
Count = 3 << 24,
|
||||
Percentage = 4 << 24,
|
||||
}
|
||||
|
||||
// mono/utils/mono-counters.h : MONO_COUNTER_*
|
||||
public enum LogCounterVariance {
|
||||
Monotonic = 1 << 28,
|
||||
Constant = 1 << 29,
|
||||
Variable = 1 << 30,
|
||||
}
|
||||
|
||||
// mono/metadata/profiler.h : MonoProfilerCodeBufferType
|
||||
public enum LogJitHelper {
|
||||
Unknown = 0,
|
||||
Method = 1,
|
||||
MethodTrampoline = 2,
|
||||
UnboxTrampoline = 3,
|
||||
ImtTrampoline = 4,
|
||||
GenericsTrampoline = 5,
|
||||
SpecificTrampoline = 6,
|
||||
Helper = 7,
|
||||
Monitor = 8,
|
||||
DelegateInvoke = 9,
|
||||
ExceptionHandling = 10,
|
||||
}
|
||||
|
||||
// mono/profiler/log.h : SAMPLE_*
|
||||
public enum LogSampleHitType {
|
||||
Cycles = 1,
|
||||
Instructions = 2,
|
||||
CacheMisses = 3,
|
||||
CacheHits = 4,
|
||||
Branches = 5,
|
||||
BranchMisses = 6,
|
||||
}
|
||||
|
||||
// mono/metadata/profiler.h : MonoProfilerGCRootType
|
||||
[Flags]
|
||||
public enum LogHeapRootAttributes {
|
||||
Pinning = 1 << 8,
|
||||
WeakReference = 2 << 8,
|
||||
Interior = 4 << 8,
|
||||
|
||||
Stack = 0,
|
||||
Finalizer = 1,
|
||||
Handle = 2,
|
||||
Other = 3,
|
||||
Miscellaneous = 4,
|
||||
|
||||
TypeMask = 0xff,
|
||||
}
|
||||
|
||||
// mono/profiler/log.h : MonoProfilerMonitorEvent
|
||||
public enum LogMonitorEvent {
|
||||
Contention = 1,
|
||||
Done = 2,
|
||||
Fail = 3,
|
||||
}
|
||||
|
||||
// mono/metadata/metadata.h : MonoExceptionEnum
|
||||
public enum LogExceptionClause {
|
||||
Catch = 0,
|
||||
Filter = 1,
|
||||
Finally = 2,
|
||||
Fault = 4,
|
||||
}
|
||||
|
||||
// mono/metadata/profiler.h : MonoProfilerGCEvent
|
||||
public enum LogGCEvent {
|
||||
Begin = 0,
|
||||
MarkBegin = 1,
|
||||
MarkEnd = 2,
|
||||
ReclaimBegin = 3,
|
||||
ReclaimEnd = 4,
|
||||
End = 5,
|
||||
PreStopWorld = 6,
|
||||
PostStopWorld = 7,
|
||||
PreStartWorld = 8,
|
||||
PostStartWorld = 9,
|
||||
PreStopWorldLocked = 10,
|
||||
PostStartWorldUnlocked = 11,
|
||||
}
|
||||
|
||||
// mono/metadata/mono-gc.h : MonoGCHandleType
|
||||
public enum LogGCHandleType {
|
||||
Weak = 0,
|
||||
WeakTrackResurrection = 1,
|
||||
Normal = 2,
|
||||
Pinned = 3,
|
||||
}
|
||||
|
||||
// mono/profiler/log.h : MonoProfilerSyncPointType
|
||||
public enum LogSynchronizationPoint {
|
||||
Periodic = 0,
|
||||
WorldStop = 1,
|
||||
WorldStart = 2,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
public abstract class LogEvent {
|
||||
|
||||
const BindingFlags PropertyFlags = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public;
|
||||
|
||||
const string Indent = " ";
|
||||
|
||||
internal LogEvent ()
|
||||
{
|
||||
}
|
||||
|
||||
public LogBufferHeader Buffer { get; internal set; }
|
||||
|
||||
public ulong Timestamp { get; internal set; }
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
var sb = new StringBuilder ();
|
||||
|
||||
ToString (this, sb, string.Empty, GetType ().Name, 0);
|
||||
|
||||
return sb.ToString ();
|
||||
}
|
||||
|
||||
static void ToString (object source, StringBuilder result, string indent, string header, int level)
|
||||
{
|
||||
result.AppendLine ($"{indent}{header} {{");
|
||||
|
||||
foreach (var prop in source.GetType ().GetProperties (PropertyFlags).OrderBy (p => p.MetadataToken)) {
|
||||
var name = prop.Name;
|
||||
var propIndent = indent + Indent;
|
||||
var value = prop.GetValue (source);
|
||||
|
||||
if (value is IList list) {
|
||||
result.AppendLine ($"{propIndent}{name} = [{list.Count}] {{");
|
||||
|
||||
for (var i = 0; i < list.Count; i++) {
|
||||
var elem = list [i];
|
||||
var type = elem.GetType ();
|
||||
var elemIndent = propIndent + Indent;
|
||||
var elemHeader = $"[{i}] = ";
|
||||
|
||||
if (type.IsClass && type != typeof (string))
|
||||
ToString (elem, result, elemIndent, $"{elemHeader}{type.Name}", level + 1);
|
||||
else
|
||||
result.AppendLine ($"{elemIndent}{elemHeader}{elem}");
|
||||
}
|
||||
|
||||
result.AppendLine ($"{propIndent}}}");
|
||||
} else
|
||||
result.AppendLine ($"{propIndent}{name} = {value}");
|
||||
}
|
||||
|
||||
var end = $"{indent}}}";
|
||||
|
||||
if (level == 0)
|
||||
result.Append (end);
|
||||
else
|
||||
result.AppendLine (end);
|
||||
}
|
||||
|
||||
internal abstract void Accept (LogEventVisitor visitor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
public abstract class LogEventVisitor {
|
||||
|
||||
public virtual void VisitBefore (LogEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void VisitAfter (LogEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (AppDomainLoadEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (AppDomainUnloadEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (AppDomainNameEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ContextLoadEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ContextUnloadEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ThreadStartEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ThreadEndEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ThreadNameEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ImageLoadEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ImageUnloadEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (AssemblyLoadEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (AssemblyUnloadEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ClassLoadEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (JitEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (JitHelperEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (AllocationEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (HeapBeginEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (HeapEndEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (HeapObjectEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (HeapRootsEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (GCEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (GCResizeEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (GCMoveEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (GCHandleCreationEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (GCHandleDeletionEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (GCFinalizeBeginEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (GCFinalizeEndEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (GCFinalizeObjectBeginEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (GCFinalizeObjectEndEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ThrowEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ExceptionClauseEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (EnterEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (LeaveEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ExceptionalLeaveEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (MonitorEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (SampleHitEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (CounterSamplesEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (CounterDescriptionsEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (UnmanagedBinaryEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (UnmanagedSymbolEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (AssemblyCoverageEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (ClassCoverageEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (MethodCoverageEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (StatementCoverageEvent ev)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Visit (SynchronizationPointEvent ev)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,625 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
public sealed class AppDomainLoadEvent : LogEvent {
|
||||
|
||||
public long AppDomainId { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class AppDomainUnloadEvent : LogEvent {
|
||||
|
||||
public long AppDomainId { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class AppDomainNameEvent : LogEvent {
|
||||
|
||||
public long AppDomainId { get; internal set; }
|
||||
|
||||
public string Name { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ContextLoadEvent : LogEvent {
|
||||
|
||||
public long ContextId { get; internal set; }
|
||||
|
||||
public long AppDomainId { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ContextUnloadEvent : LogEvent {
|
||||
|
||||
public long ContextId { get; internal set; }
|
||||
|
||||
public long AppDomainId { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ThreadStartEvent : LogEvent {
|
||||
|
||||
public long ThreadId { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ThreadEndEvent : LogEvent {
|
||||
|
||||
public long ThreadId { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ThreadNameEvent : LogEvent {
|
||||
|
||||
public long ThreadId { get; internal set; }
|
||||
|
||||
public string Name { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ImageLoadEvent : LogEvent {
|
||||
|
||||
public long ImagePointer { get; internal set; }
|
||||
|
||||
public string Name { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ImageUnloadEvent : LogEvent {
|
||||
|
||||
public long ImagePointer { get; internal set; }
|
||||
|
||||
public string Name { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class AssemblyLoadEvent : LogEvent {
|
||||
|
||||
public long AssemblyPointer { get; internal set; }
|
||||
|
||||
public long ImagePointer { get; internal set; }
|
||||
|
||||
public string Name { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class AssemblyUnloadEvent : LogEvent {
|
||||
|
||||
public long AssemblyPointer { get; internal set; }
|
||||
|
||||
public long ImagePointer { get; internal set; }
|
||||
|
||||
public string Name { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ClassLoadEvent : LogEvent {
|
||||
|
||||
public long ClassPointer { get; internal set; }
|
||||
|
||||
public long ImagePointer { get; internal set; }
|
||||
|
||||
public string Name { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class JitEvent : LogEvent {
|
||||
|
||||
public long MethodPointer { get; internal set; }
|
||||
|
||||
public long CodePointer { get; internal set; }
|
||||
|
||||
public long CodeSize { get; internal set; }
|
||||
|
||||
public string Name { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class JitHelperEvent : LogEvent {
|
||||
|
||||
public LogJitHelper Type { get; internal set; }
|
||||
|
||||
public long BufferPointer { get; internal set; }
|
||||
|
||||
public long BufferSize { get; internal set; }
|
||||
|
||||
public string Name { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class AllocationEvent : LogEvent {
|
||||
|
||||
public long ClassPointer { get; internal set; }
|
||||
|
||||
public long ObjectPointer { get; internal set; }
|
||||
|
||||
public long ObjectSize { get; internal set; }
|
||||
|
||||
public IReadOnlyList<long> Backtrace { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class HeapBeginEvent : LogEvent {
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class HeapEndEvent : LogEvent {
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class HeapObjectEvent : LogEvent {
|
||||
|
||||
public struct HeapObjectReference {
|
||||
|
||||
public long Offset { get; internal set; }
|
||||
|
||||
public long ObjectPointer { get; internal set; }
|
||||
}
|
||||
|
||||
public long ObjectPointer { get; internal set; }
|
||||
|
||||
public long ClassPointer { get; internal set; }
|
||||
|
||||
public long ObjectSize { get; internal set; }
|
||||
|
||||
public IReadOnlyList<HeapObjectReference> References { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class HeapRootsEvent : LogEvent {
|
||||
|
||||
public struct HeapRoot {
|
||||
|
||||
public long ObjectPointer { get; internal set; }
|
||||
|
||||
public LogHeapRootAttributes Attributes { get; internal set; }
|
||||
|
||||
public long ExtraInfo { get; internal set; }
|
||||
}
|
||||
|
||||
public long MaxGenerationCollectionCount { get; internal set; }
|
||||
|
||||
public IReadOnlyList<HeapRoot> Roots { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class GCEvent : LogEvent {
|
||||
|
||||
public LogGCEvent Type { get; internal set; }
|
||||
|
||||
public byte Generation { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class GCResizeEvent : LogEvent {
|
||||
|
||||
public long NewSize { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class GCMoveEvent : LogEvent {
|
||||
|
||||
public IReadOnlyList<long> OldObjectPointers { get; internal set; }
|
||||
|
||||
public IReadOnlyList<long> NewObjectPointers { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class GCHandleCreationEvent : LogEvent {
|
||||
|
||||
public LogGCHandleType Type { get; internal set; }
|
||||
|
||||
public long Handle { get; internal set; }
|
||||
|
||||
public long ObjectPointer { get; internal set; }
|
||||
|
||||
public IReadOnlyList<long> Backtrace { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class GCHandleDeletionEvent : LogEvent {
|
||||
|
||||
public LogGCHandleType Type { get; internal set; }
|
||||
|
||||
public long Handle { get; internal set; }
|
||||
|
||||
public IReadOnlyList<long> Backtrace { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class GCFinalizeBeginEvent : LogEvent {
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class GCFinalizeEndEvent : LogEvent {
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class GCFinalizeObjectBeginEvent : LogEvent {
|
||||
|
||||
public long ObjectPointer { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class GCFinalizeObjectEndEvent : LogEvent {
|
||||
|
||||
public long ObjectPointer { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ThrowEvent : LogEvent {
|
||||
|
||||
public long ObjectPointer { get; internal set; }
|
||||
|
||||
public IReadOnlyList<long> Backtrace { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ExceptionClauseEvent : LogEvent {
|
||||
|
||||
public LogExceptionClause Type { get; internal set; }
|
||||
|
||||
public long Index { get; internal set; }
|
||||
|
||||
public long MethodPointer { get; internal set; }
|
||||
|
||||
public long ObjectPointer { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class EnterEvent : LogEvent {
|
||||
|
||||
public long MethodPointer { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class LeaveEvent : LogEvent {
|
||||
|
||||
public long MethodPointer { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ExceptionalLeaveEvent : LogEvent {
|
||||
|
||||
public long MethodPointer { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class MonitorEvent : LogEvent {
|
||||
|
||||
public LogMonitorEvent Event { get; internal set; }
|
||||
|
||||
public long ObjectPointer { get; internal set; }
|
||||
|
||||
public IReadOnlyList<long> Backtrace { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SampleHitEvent : LogEvent {
|
||||
|
||||
public LogSampleHitType Type { get; internal set; }
|
||||
|
||||
public long ThreadId { get; internal set; }
|
||||
|
||||
public IReadOnlyList<long> UnmanagedBacktrace { get; internal set; }
|
||||
|
||||
public IReadOnlyList<long> ManagedBacktrace { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CounterSamplesEvent : LogEvent {
|
||||
|
||||
public struct CounterSample {
|
||||
|
||||
public long Index { get; internal set; }
|
||||
|
||||
public LogCounterType Type { get; internal set; }
|
||||
|
||||
public object Value { get; internal set; }
|
||||
}
|
||||
|
||||
public IReadOnlyList<CounterSample> Samples { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CounterDescriptionsEvent : LogEvent {
|
||||
|
||||
public struct CounterDescription {
|
||||
|
||||
public LogCounterSection Section { get; internal set; }
|
||||
|
||||
public string SectionName { get; internal set; }
|
||||
|
||||
public string CounterName { get; internal set; }
|
||||
|
||||
public LogCounterType Type { get; internal set; }
|
||||
|
||||
public LogCounterUnit Unit { get; internal set; }
|
||||
|
||||
public LogCounterVariance Variance { get; internal set; }
|
||||
|
||||
public long Index { get; internal set; }
|
||||
}
|
||||
|
||||
public IReadOnlyList<CounterDescription> Descriptions { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class UnmanagedBinaryEvent : LogEvent {
|
||||
|
||||
public long SegmentPointer { get; internal set; }
|
||||
|
||||
public long SegmentOffset { get; internal set; }
|
||||
|
||||
public long SegmentSize { get; internal set; }
|
||||
|
||||
public string FileName { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class UnmanagedSymbolEvent : LogEvent {
|
||||
|
||||
public long CodePointer { get; internal set; }
|
||||
|
||||
public long CodeSize { get; internal set; }
|
||||
|
||||
public string Name { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class AssemblyCoverageEvent : LogEvent {
|
||||
|
||||
public string AssemblyName { get; internal set; }
|
||||
|
||||
public Guid Guid { get; internal set; }
|
||||
|
||||
public string FileName { get; internal set; }
|
||||
|
||||
public long NumberOfMethods { get; internal set; }
|
||||
|
||||
public long FullyCovered { get; internal set; }
|
||||
|
||||
public long PartiallyCovered { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ClassCoverageEvent : LogEvent {
|
||||
|
||||
public string AssemblyName { get; internal set; }
|
||||
|
||||
public string ClassName { get; internal set; }
|
||||
|
||||
public long NumberOfMethods { get; internal set; }
|
||||
|
||||
public long FullyCovered { get; internal set; }
|
||||
|
||||
public long PartiallyCovered { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class MethodCoverageEvent : LogEvent {
|
||||
|
||||
public string AssemblyName { get; internal set; }
|
||||
|
||||
public string ClassName { get; internal set; }
|
||||
|
||||
public string MethodName { get; internal set; }
|
||||
|
||||
public string MethodSignature { get; internal set; }
|
||||
|
||||
public string FileName { get; internal set; }
|
||||
|
||||
public ulong MetadataToken { get; internal set; }
|
||||
|
||||
public long MethodId { get; internal set; }
|
||||
|
||||
public long NumberOfStatements { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class StatementCoverageEvent : LogEvent {
|
||||
|
||||
public long MethodId { get; internal set; }
|
||||
|
||||
public long RelativeILOffset { get; internal set; }
|
||||
|
||||
public ulong Counter { get; internal set; }
|
||||
|
||||
public long Line { get; internal set; }
|
||||
|
||||
public long Column { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SynchronizationPointEvent : LogEvent {
|
||||
|
||||
public LogSynchronizationPoint Type { get; internal set; }
|
||||
|
||||
internal override void Accept (LogEventVisitor visitor)
|
||||
{
|
||||
visitor.Visit (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
public sealed class LogException : Exception {
|
||||
|
||||
public LogException (string message)
|
||||
: base (message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,577 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
public sealed class LogProcessor {
|
||||
|
||||
public LogReader Reader { get; }
|
||||
|
||||
public LogEventVisitor ImmediateVisitor { get; }
|
||||
|
||||
public LogEventVisitor SortedVisitor { get; }
|
||||
|
||||
public LogStreamHeader StreamHeader { get; private set; }
|
||||
|
||||
LogBufferHeader _bufferHeader;
|
||||
|
||||
ulong _time;
|
||||
|
||||
bool _used;
|
||||
|
||||
public LogProcessor (LogReader reader, LogEventVisitor immediateVisitor, LogEventVisitor sortedVisitor)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new ArgumentNullException (nameof (reader));
|
||||
|
||||
Reader = reader;
|
||||
ImmediateVisitor = immediateVisitor;
|
||||
SortedVisitor = sortedVisitor;
|
||||
}
|
||||
|
||||
public void Process ()
|
||||
{
|
||||
Process (CancellationToken.None);
|
||||
}
|
||||
|
||||
static void ProcessEvent (LogEventVisitor visitor, LogEvent ev)
|
||||
{
|
||||
if (visitor != null) {
|
||||
visitor.VisitBefore (ev);
|
||||
ev.Accept (visitor);
|
||||
visitor.VisitAfter (ev);
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvents (List<LogEvent> events, CancellationToken token)
|
||||
{
|
||||
foreach (var ev in events.OrderBy (x => x.Timestamp)) {
|
||||
token.ThrowIfCancellationRequested ();
|
||||
ProcessEvent (SortedVisitor, ev);
|
||||
}
|
||||
|
||||
events.Clear ();
|
||||
}
|
||||
|
||||
public void Process (CancellationToken token)
|
||||
{
|
||||
if (_used)
|
||||
throw new InvalidOperationException ("This log processor cannot be reused.");
|
||||
|
||||
_used = true;
|
||||
StreamHeader = new LogStreamHeader (Reader);
|
||||
|
||||
var events = new List<LogEvent> (Environment.ProcessorCount * 1000);
|
||||
|
||||
while (!Reader.BaseStream.EndOfStream) {
|
||||
token.ThrowIfCancellationRequested ();
|
||||
|
||||
_bufferHeader = new LogBufferHeader (StreamHeader, Reader);
|
||||
|
||||
// Use the manual position tracking in LogReader so we're
|
||||
// compatible with non-seekable streams.
|
||||
var goal = Reader.Position + _bufferHeader.Length;
|
||||
|
||||
while (Reader.Position < goal) {
|
||||
token.ThrowIfCancellationRequested ();
|
||||
|
||||
var ev = ReadEvent ();
|
||||
|
||||
ProcessEvent (ImmediateVisitor, ev);
|
||||
events.Add (ev);
|
||||
|
||||
if (ev is SynchronizationPointEvent)
|
||||
ProcessEvents (events, token);
|
||||
}
|
||||
}
|
||||
|
||||
ProcessEvents (events, token);
|
||||
}
|
||||
|
||||
LogEvent ReadEvent ()
|
||||
{
|
||||
var type = Reader.ReadByte ();
|
||||
var basicType = (LogEventType) (type & 0xf);
|
||||
var extType = (LogEventType) (type & 0xf0);
|
||||
|
||||
_time = ReadTime ();
|
||||
|
||||
switch (basicType) {
|
||||
case LogEventType.Allocation:
|
||||
switch (extType) {
|
||||
case LogEventType.AllocationBacktrace:
|
||||
case LogEventType.AllocationNoBacktrace:
|
||||
return new AllocationEvent {
|
||||
ClassPointer = ReadPointer (),
|
||||
ObjectPointer = ReadObject (),
|
||||
ObjectSize = (long) Reader.ReadULeb128 (),
|
||||
Backtrace = ReadBacktrace (extType == LogEventType.AllocationBacktrace),
|
||||
};
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
case LogEventType.GC:
|
||||
switch (extType) {
|
||||
case LogEventType.GCEvent:
|
||||
return new GCEvent {
|
||||
Type = (LogGCEvent) Reader.ReadByte (),
|
||||
Generation = Reader.ReadByte (),
|
||||
};
|
||||
case LogEventType.GCResize:
|
||||
return new GCResizeEvent {
|
||||
NewSize = (long) Reader.ReadULeb128 (),
|
||||
};
|
||||
case LogEventType.GCMove: {
|
||||
var list = new long [(int) Reader.ReadULeb128 ()];
|
||||
|
||||
for (var i = 0; i < list.Length; i++)
|
||||
list [i] = ReadObject ();
|
||||
|
||||
return new GCMoveEvent {
|
||||
OldObjectPointers = list.Where ((_, i) => i % 2 == 0).ToArray (),
|
||||
NewObjectPointers = list.Where ((_, i) => i % 2 != 0).ToArray (),
|
||||
};
|
||||
}
|
||||
case LogEventType.GCHandleCreationNoBacktrace:
|
||||
case LogEventType.GCHandleCreationBacktrace:
|
||||
return new GCHandleCreationEvent {
|
||||
Type = (LogGCHandleType) Reader.ReadULeb128 (),
|
||||
Handle = (long) Reader.ReadULeb128 (),
|
||||
ObjectPointer = ReadObject (),
|
||||
Backtrace = ReadBacktrace (extType == LogEventType.GCHandleCreationBacktrace),
|
||||
};
|
||||
case LogEventType.GCHandleDeletionNoBacktrace:
|
||||
case LogEventType.GCHandleDeletionBacktrace:
|
||||
return new GCHandleDeletionEvent {
|
||||
Type = (LogGCHandleType) Reader.ReadULeb128 (),
|
||||
Handle = (long) Reader.ReadULeb128 (),
|
||||
Backtrace = ReadBacktrace (extType == LogEventType.GCHandleDeletionBacktrace),
|
||||
};
|
||||
case LogEventType.GCFinalizeBegin:
|
||||
return new GCFinalizeBeginEvent ();
|
||||
case LogEventType.GCFinalizeEnd:
|
||||
return new GCFinalizeEndEvent ();
|
||||
case LogEventType.GCFinalizeObjectBegin:
|
||||
return new GCFinalizeObjectBeginEvent {
|
||||
ObjectPointer = ReadObject (),
|
||||
};
|
||||
case LogEventType.GCFinalizeObjectEnd:
|
||||
return new GCFinalizeObjectEndEvent {
|
||||
ObjectPointer = ReadObject (),
|
||||
};
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
case LogEventType.Metadata: {
|
||||
var load = false;
|
||||
var unload = false;
|
||||
|
||||
switch (extType) {
|
||||
case LogEventType.MetadataExtra:
|
||||
break;
|
||||
case LogEventType.MetadataEndLoad:
|
||||
load = true;
|
||||
break;
|
||||
case LogEventType.MetadataEndUnload:
|
||||
unload = true;
|
||||
break;
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
|
||||
var metadataType = (LogMetadataType) Reader.ReadByte ();
|
||||
|
||||
switch (metadataType) {
|
||||
case LogMetadataType.Class:
|
||||
if (load) {
|
||||
return new ClassLoadEvent {
|
||||
ClassPointer = ReadPointer (),
|
||||
ImagePointer = ReadPointer (),
|
||||
Name = Reader.ReadCString (),
|
||||
};
|
||||
} else
|
||||
throw new LogException ("Invalid class metadata event.");
|
||||
case LogMetadataType.Image:
|
||||
if (load) {
|
||||
return new ImageLoadEvent {
|
||||
ImagePointer = ReadPointer (),
|
||||
Name = Reader.ReadCString (),
|
||||
};
|
||||
} else if (unload) {
|
||||
return new ImageUnloadEvent {
|
||||
ImagePointer = ReadPointer (),
|
||||
Name = Reader.ReadCString (),
|
||||
};
|
||||
} else
|
||||
throw new LogException ("Invalid image metadata event.");
|
||||
case LogMetadataType.Assembly:
|
||||
if (load) {
|
||||
return new AssemblyLoadEvent {
|
||||
AssemblyPointer = ReadPointer (),
|
||||
ImagePointer = ReadPointer (),
|
||||
Name = Reader.ReadCString (),
|
||||
};
|
||||
} else if (unload) {
|
||||
return new AssemblyUnloadEvent {
|
||||
AssemblyPointer = ReadPointer (),
|
||||
ImagePointer = ReadPointer (),
|
||||
Name = Reader.ReadCString (),
|
||||
};
|
||||
} else
|
||||
throw new LogException ("Invalid assembly metadata event.");
|
||||
case LogMetadataType.AppDomain:
|
||||
if (load) {
|
||||
return new AppDomainLoadEvent {
|
||||
AppDomainId = ReadPointer (),
|
||||
};
|
||||
} else if (unload) {
|
||||
return new AppDomainUnloadEvent {
|
||||
AppDomainId = ReadPointer (),
|
||||
};
|
||||
} else {
|
||||
return new AppDomainNameEvent {
|
||||
AppDomainId = ReadPointer (),
|
||||
Name = Reader.ReadCString (),
|
||||
};
|
||||
}
|
||||
case LogMetadataType.Thread:
|
||||
if (load) {
|
||||
return new ThreadStartEvent {
|
||||
ThreadId = ReadPointer (),
|
||||
};
|
||||
} else if (unload) {
|
||||
return new ThreadEndEvent {
|
||||
ThreadId = ReadPointer (),
|
||||
};
|
||||
} else {
|
||||
return new ThreadNameEvent {
|
||||
ThreadId = ReadPointer (),
|
||||
Name = Reader.ReadCString (),
|
||||
};
|
||||
}
|
||||
case LogMetadataType.Context:
|
||||
if (load) {
|
||||
return new ContextLoadEvent {
|
||||
ContextId = ReadPointer (),
|
||||
AppDomainId = ReadPointer (),
|
||||
};
|
||||
} else if (unload) {
|
||||
return new ContextUnloadEvent {
|
||||
ContextId = ReadPointer (),
|
||||
AppDomainId = ReadPointer (),
|
||||
};
|
||||
} else
|
||||
throw new LogException ("Invalid context metadata event.");
|
||||
default:
|
||||
throw new LogException ($"Invalid metadata type ({metadataType}).");
|
||||
}
|
||||
}
|
||||
case LogEventType.Method:
|
||||
switch (extType) {
|
||||
case LogEventType.MethodLeave:
|
||||
return new LeaveEvent {
|
||||
MethodPointer = ReadMethod (),
|
||||
};
|
||||
case LogEventType.MethodEnter:
|
||||
return new EnterEvent {
|
||||
MethodPointer = ReadMethod (),
|
||||
};
|
||||
case LogEventType.MethodLeaveExceptional:
|
||||
return new ExceptionalLeaveEvent {
|
||||
MethodPointer = ReadMethod (),
|
||||
};
|
||||
case LogEventType.MethodJit:
|
||||
return new JitEvent {
|
||||
MethodPointer = ReadMethod (),
|
||||
CodePointer = ReadPointer (),
|
||||
CodeSize = (long) Reader.ReadULeb128 (),
|
||||
Name = Reader.ReadCString (),
|
||||
};
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
case LogEventType.Exception:
|
||||
switch (extType) {
|
||||
case LogEventType.ExceptionThrowNoBacktrace:
|
||||
case LogEventType.ExceptionThrowBacktrace:
|
||||
return new ThrowEvent {
|
||||
ObjectPointer = ReadObject (),
|
||||
Backtrace = ReadBacktrace (extType == LogEventType.ExceptionThrowBacktrace),
|
||||
};
|
||||
case LogEventType.ExceptionClause:
|
||||
return new ExceptionClauseEvent {
|
||||
Type = (LogExceptionClause) Reader.ReadByte (),
|
||||
Index = (long) Reader.ReadULeb128 (),
|
||||
MethodPointer = ReadMethod (),
|
||||
ObjectPointer = ReadObject (),
|
||||
};
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
case LogEventType.Monitor:
|
||||
switch (extType) {
|
||||
case LogEventType.MonitorNoBacktrace:
|
||||
case LogEventType.MonitorBacktrace:
|
||||
return new MonitorEvent {
|
||||
Event = (LogMonitorEvent) Reader.ReadByte (),
|
||||
ObjectPointer = ReadObject (),
|
||||
Backtrace = ReadBacktrace (extType == LogEventType.MonitorBacktrace),
|
||||
};
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
case LogEventType.Heap:
|
||||
switch (extType) {
|
||||
case LogEventType.HeapBegin:
|
||||
return new HeapBeginEvent ();
|
||||
case LogEventType.HeapEnd:
|
||||
return new HeapEndEvent ();
|
||||
case LogEventType.HeapObject: {
|
||||
var ev = new HeapObjectEvent {
|
||||
ObjectPointer = ReadObject (),
|
||||
ClassPointer = ReadPointer (),
|
||||
ObjectSize = (long) Reader.ReadULeb128 (),
|
||||
};
|
||||
|
||||
var list = new HeapObjectEvent.HeapObjectReference [(int) Reader.ReadULeb128 ()];
|
||||
|
||||
for (var i = 0; i < list.Length; i++) {
|
||||
list [i] = new HeapObjectEvent.HeapObjectReference {
|
||||
Offset = (long) Reader.ReadULeb128 (),
|
||||
ObjectPointer = ReadObject (),
|
||||
};
|
||||
}
|
||||
|
||||
ev.References = list;
|
||||
|
||||
return ev;
|
||||
}
|
||||
case LogEventType.HeapRoots: {
|
||||
// TODO: This entire event makes no sense.
|
||||
|
||||
var ev = new HeapRootsEvent ();
|
||||
var list = new HeapRootsEvent.HeapRoot [(int) Reader.ReadULeb128 ()];
|
||||
|
||||
ev.MaxGenerationCollectionCount = (long) Reader.ReadULeb128 ();
|
||||
|
||||
for (var i = 0; i < list.Length; i++) {
|
||||
list [i] = new HeapRootsEvent.HeapRoot {
|
||||
ObjectPointer = ReadObject (),
|
||||
Attributes = (LogHeapRootAttributes) Reader.ReadByte (),
|
||||
ExtraInfo = (long) Reader.ReadULeb128 (),
|
||||
};
|
||||
}
|
||||
|
||||
ev.Roots = list;
|
||||
|
||||
return ev;
|
||||
}
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
case LogEventType.Sample:
|
||||
switch (extType) {
|
||||
case LogEventType.SampleHit:
|
||||
return new SampleHitEvent {
|
||||
Type = (LogSampleHitType) Reader.ReadByte (),
|
||||
ThreadId = ReadPointer (),
|
||||
UnmanagedBacktrace = ReadBacktrace (true, false),
|
||||
ManagedBacktrace = ReadBacktrace (true),
|
||||
};
|
||||
case LogEventType.SampleUnmanagedSymbol:
|
||||
return new UnmanagedSymbolEvent {
|
||||
CodePointer = ReadPointer (),
|
||||
CodeSize = (long) Reader.ReadULeb128 (),
|
||||
Name = Reader.ReadCString (),
|
||||
};
|
||||
case LogEventType.SampleUnmanagedBinary:
|
||||
return new UnmanagedBinaryEvent {
|
||||
SegmentPointer = ReadPointer (),
|
||||
SegmentOffset = (long) Reader.ReadULeb128 (),
|
||||
SegmentSize = (long) Reader.ReadULeb128 (),
|
||||
FileName = Reader.ReadCString (),
|
||||
};
|
||||
case LogEventType.SampleCounterDescriptions: {
|
||||
var ev = new CounterDescriptionsEvent ();
|
||||
var list = new CounterDescriptionsEvent.CounterDescription [(int) Reader.ReadULeb128 ()];
|
||||
|
||||
for (var i = 0; i < list.Length; i++) {
|
||||
var section = (LogCounterSection) Reader.ReadULeb128 ();
|
||||
|
||||
list [i] = new CounterDescriptionsEvent.CounterDescription {
|
||||
Section = section,
|
||||
SectionName = section == LogCounterSection.User ? Reader.ReadCString () : string.Empty,
|
||||
CounterName = Reader.ReadCString (),
|
||||
Type = (LogCounterType) Reader.ReadByte (),
|
||||
Unit = (LogCounterUnit) Reader.ReadByte (),
|
||||
Variance = (LogCounterVariance) Reader.ReadByte (),
|
||||
Index = (long) Reader.ReadULeb128 (),
|
||||
};
|
||||
}
|
||||
|
||||
ev.Descriptions = list;
|
||||
|
||||
return ev;
|
||||
}
|
||||
case LogEventType.SampleCounters: {
|
||||
var ev = new CounterSamplesEvent ();
|
||||
var list = new List<CounterSamplesEvent.CounterSample> ();
|
||||
|
||||
while (true) {
|
||||
var index = (long) Reader.ReadULeb128 ();
|
||||
|
||||
if (index == 0)
|
||||
break;
|
||||
|
||||
var counterType = (LogCounterType) Reader.ReadByte ();
|
||||
|
||||
object value = null;
|
||||
|
||||
switch (counterType) {
|
||||
case LogCounterType.String:
|
||||
value = Reader.ReadByte () == 1 ? Reader.ReadCString () : null;
|
||||
break;
|
||||
case LogCounterType.Int32:
|
||||
case LogCounterType.Word:
|
||||
case LogCounterType.Int64:
|
||||
case LogCounterType.Interval:
|
||||
value = Reader.ReadSLeb128 ();
|
||||
break;
|
||||
case LogCounterType.UInt32:
|
||||
case LogCounterType.UInt64:
|
||||
value = Reader.ReadULeb128 ();
|
||||
break;
|
||||
case LogCounterType.Double:
|
||||
value = Reader.ReadDouble ();
|
||||
break;
|
||||
default:
|
||||
throw new LogException ($"Invalid counter type ({counterType}).");
|
||||
}
|
||||
|
||||
list.Add (new CounterSamplesEvent.CounterSample {
|
||||
Index = index,
|
||||
Type = counterType,
|
||||
Value = value,
|
||||
});
|
||||
}
|
||||
|
||||
ev.Samples = list;
|
||||
|
||||
return ev;
|
||||
}
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
case LogEventType.Runtime:
|
||||
switch (extType) {
|
||||
case LogEventType.RuntimeJitHelper: {
|
||||
var helperType = (LogJitHelper) Reader.ReadByte ();
|
||||
|
||||
return new JitHelperEvent {
|
||||
Type = helperType,
|
||||
BufferPointer = ReadPointer (),
|
||||
BufferSize = (long) Reader.ReadULeb128 (),
|
||||
Name = helperType == LogJitHelper.SpecificTrampoline ? Reader.ReadCString () : string.Empty,
|
||||
};
|
||||
}
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
case LogEventType.Coverage:
|
||||
switch (extType) {
|
||||
case LogEventType.CoverageAssembly:
|
||||
return new AssemblyCoverageEvent {
|
||||
AssemblyName = Reader.ReadCString (),
|
||||
Guid = Guid.Parse (Reader.ReadCString ()),
|
||||
FileName = Reader.ReadCString (),
|
||||
NumberOfMethods = (long) Reader.ReadULeb128 (),
|
||||
FullyCovered = (long) Reader.ReadULeb128 (),
|
||||
PartiallyCovered = (long) Reader.ReadULeb128 (),
|
||||
};
|
||||
case LogEventType.CoverageMethod:
|
||||
return new MethodCoverageEvent {
|
||||
AssemblyName = Reader.ReadCString (),
|
||||
ClassName = Reader.ReadCString (),
|
||||
MethodName = Reader.ReadCString (),
|
||||
MethodSignature = Reader.ReadCString (),
|
||||
FileName = Reader.ReadCString (),
|
||||
MetadataToken = Reader.ReadULeb128 (),
|
||||
MethodId = (long) Reader.ReadULeb128 (),
|
||||
NumberOfStatements = (long) Reader.ReadULeb128 (),
|
||||
};
|
||||
case LogEventType.CoverageStatement:
|
||||
return new StatementCoverageEvent {
|
||||
MethodId = (long) Reader.ReadULeb128 (),
|
||||
RelativeILOffset = (long) Reader.ReadULeb128 (),
|
||||
Counter = Reader.ReadULeb128 (),
|
||||
Line = (long) Reader.ReadULeb128 (),
|
||||
Column = (long) Reader.ReadULeb128 (),
|
||||
};
|
||||
case LogEventType.CoverageClass:
|
||||
return new ClassCoverageEvent {
|
||||
AssemblyName = Reader.ReadCString (),
|
||||
ClassName = Reader.ReadCString (),
|
||||
NumberOfMethods = (long) Reader.ReadULeb128 (),
|
||||
FullyCovered = (long) Reader.ReadULeb128 (),
|
||||
PartiallyCovered = (long) Reader.ReadULeb128 (),
|
||||
};
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
case LogEventType.Meta:
|
||||
switch (extType) {
|
||||
case LogEventType.MetaSynchronizationPoint:
|
||||
return new SynchronizationPointEvent {
|
||||
Type = (LogSynchronizationPoint) Reader.ReadByte (),
|
||||
};
|
||||
default:
|
||||
throw new LogException ($"Invalid extended event type ({extType}).");
|
||||
}
|
||||
default:
|
||||
throw new LogException ($"Invalid basic event type ({basicType}).");
|
||||
}
|
||||
}
|
||||
|
||||
long ReadPointer ()
|
||||
{
|
||||
var ptr = Reader.ReadSLeb128 () + _bufferHeader.PointerBase;
|
||||
|
||||
return StreamHeader.PointerSize == sizeof (long) ? ptr : ptr & 0xffffffffL;
|
||||
}
|
||||
|
||||
long ReadObject ()
|
||||
{
|
||||
return Reader.ReadSLeb128 () + _bufferHeader.ObjectBase;
|
||||
}
|
||||
|
||||
long ReadMethod ()
|
||||
{
|
||||
return _bufferHeader.CurrentMethod += Reader.ReadSLeb128 ();
|
||||
}
|
||||
|
||||
ulong ReadTime ()
|
||||
{
|
||||
return _bufferHeader.CurrentTime += Reader.ReadULeb128 ();
|
||||
}
|
||||
|
||||
IReadOnlyList<long> ReadBacktrace (bool actuallyRead, bool managed = true)
|
||||
{
|
||||
if (!actuallyRead)
|
||||
return Array.Empty<long> ();
|
||||
|
||||
var list = new long [(int) Reader.ReadULeb128 ()];
|
||||
|
||||
for (var i = 0; i < list.Length; i++)
|
||||
list [i] = managed ? ReadMethod () : ReadPointer ();
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
public sealed class LogReader : IDisposable {
|
||||
|
||||
public static Encoding Encoding { get; } = Encoding.UTF8;
|
||||
|
||||
public LogStream BaseStream => (LogStream) _reader.BaseStream;
|
||||
|
||||
public long Position { get; private set; }
|
||||
|
||||
readonly BinaryReader _reader;
|
||||
|
||||
byte[] _stringBuffer = new byte [1024];
|
||||
|
||||
public LogReader (LogStream stream, bool leaveOpen)
|
||||
{
|
||||
_reader = new BinaryReader (stream, Encoding, leaveOpen);
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
_reader.Dispose ();
|
||||
}
|
||||
|
||||
internal byte ReadByte ()
|
||||
{
|
||||
var b = _reader.ReadByte ();
|
||||
|
||||
Position += sizeof (byte);
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
internal ushort ReadUInt16 ()
|
||||
{
|
||||
var i = _reader.ReadUInt16 ();
|
||||
|
||||
Position += sizeof (ushort);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
internal int ReadInt32 ()
|
||||
{
|
||||
var i = _reader.ReadInt32 ();
|
||||
|
||||
Position += sizeof (int);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
internal long ReadInt64 ()
|
||||
{
|
||||
var i = _reader.ReadInt64 ();
|
||||
|
||||
Position += sizeof (long);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
internal ulong ReadUInt64 ()
|
||||
{
|
||||
var i = _reader.ReadUInt64 ();
|
||||
|
||||
Position += sizeof (ulong);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
internal double ReadDouble ()
|
||||
{
|
||||
var d = _reader.ReadDouble ();
|
||||
|
||||
Position += sizeof (double);
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
internal string ReadHeaderString ()
|
||||
{
|
||||
var bytes = new byte [ReadInt32 ()];
|
||||
|
||||
// ReadBytes doesn't necessarily read the specified amount of
|
||||
// bytes, so just do it this way.
|
||||
for (var i = 0; i < bytes.Length; i++)
|
||||
bytes [i] = ReadByte ();
|
||||
|
||||
return Encoding.GetString (bytes);
|
||||
}
|
||||
|
||||
internal string ReadCString ()
|
||||
{
|
||||
var pos = 0;
|
||||
|
||||
byte val;
|
||||
|
||||
while ((val = ReadByte ()) != 0) {
|
||||
if (pos == _stringBuffer.Length)
|
||||
Array.Resize (ref _stringBuffer, System.Math.Max (_stringBuffer.Length * 2, pos + 1));
|
||||
|
||||
_stringBuffer [pos++] = val;
|
||||
}
|
||||
|
||||
return Encoding.GetString (_stringBuffer, 0, pos);
|
||||
}
|
||||
|
||||
internal long ReadSLeb128 ()
|
||||
{
|
||||
long result = 0;
|
||||
var shift = 0;
|
||||
|
||||
while (true) {
|
||||
var b = ReadByte ();
|
||||
|
||||
result |= (long) (b & 0x7f) << shift;
|
||||
shift += 7;
|
||||
|
||||
if ((b & 0x80) != 0x80) {
|
||||
if (shift < sizeof (long) * 8 && (b & 0x40) == 0x40)
|
||||
result |= -(1L << shift);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
internal ulong ReadULeb128 ()
|
||||
{
|
||||
ulong result = 0;
|
||||
var shift = 0;
|
||||
|
||||
while (true) {
|
||||
var b = ReadByte ();
|
||||
|
||||
result |= (ulong) (b & 0x7f) << shift;
|
||||
|
||||
if ((b & 0x80) != 0x80)
|
||||
break;
|
||||
|
||||
shift += 7;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
public static class LogRuntimeProfiler {
|
||||
|
||||
// TODO: Runtime profiler interface.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
public class LogStream : Stream {
|
||||
|
||||
public Stream BaseStream { get; }
|
||||
|
||||
public virtual bool EndOfStream => BaseStream.Position == BaseStream.Length;
|
||||
|
||||
public override bool CanRead => true;
|
||||
|
||||
public override bool CanSeek => false;
|
||||
|
||||
public override bool CanWrite => false;
|
||||
|
||||
public override long Length => throw new NotSupportedException ();
|
||||
|
||||
public override long Position {
|
||||
get => throw new NotSupportedException ();
|
||||
set => throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public LogStream (Stream baseStream)
|
||||
{
|
||||
if (baseStream == null)
|
||||
throw new ArgumentNullException (nameof (baseStream));
|
||||
|
||||
if (!baseStream.CanRead)
|
||||
throw new ArgumentException ("Stream does not support reading.", nameof (baseStream));
|
||||
|
||||
BaseStream = baseStream;
|
||||
}
|
||||
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
BaseStream.Dispose ();
|
||||
}
|
||||
|
||||
public override void Flush ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override int Read (byte[] buffer, int offset, int count)
|
||||
{
|
||||
return BaseStream.Read (buffer, offset, count);
|
||||
}
|
||||
|
||||
public override long Seek (long offset, SeekOrigin origin)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override void SetLength (long value)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override void Write (byte[] buffer, int offset, int count)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Mono.Profiler.Log {
|
||||
|
||||
public sealed class LogStreamHeader {
|
||||
|
||||
const int Id = 0x4d505a01;
|
||||
|
||||
public Version Version { get; }
|
||||
|
||||
public int FormatVersion { get; }
|
||||
|
||||
public byte PointerSize { get; }
|
||||
|
||||
public ulong StartupTime { get; }
|
||||
|
||||
public int TimerOverhead { get; }
|
||||
|
||||
public int Flags { get; }
|
||||
|
||||
public int ProcessId { get; }
|
||||
|
||||
public int Port { get; }
|
||||
|
||||
public string Arguments { get; }
|
||||
|
||||
public string Architecture { get; }
|
||||
|
||||
public string OperatingSystem { get; }
|
||||
|
||||
internal LogStreamHeader (LogReader reader)
|
||||
{
|
||||
var id = reader.ReadInt32 ();
|
||||
|
||||
if (id != Id)
|
||||
throw new LogException ($"Invalid stream header ID (0x{id:X}).");
|
||||
|
||||
Version = new Version (reader.ReadByte (), reader.ReadByte ());
|
||||
FormatVersion = reader.ReadByte ();
|
||||
PointerSize = reader.ReadByte ();
|
||||
StartupTime = reader.ReadUInt64 ();
|
||||
TimerOverhead = reader.ReadInt32 ();
|
||||
Flags = reader.ReadInt32 ();
|
||||
ProcessId = reader.ReadInt32 ();
|
||||
Port = reader.ReadUInt16 ();
|
||||
Arguments = reader.ReadHeaderString ();
|
||||
Architecture = reader.ReadHeaderString ();
|
||||
OperatingSystem = reader.ReadHeaderString ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using SSA = System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
@@ -86,6 +87,8 @@ 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 tampe red!");
|
||||
throw new CryptographicException ("Invalid MAC - file may have been tampered with!");
|
||||
_password = nullPassword;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#include common_System.Core.dll.sources
|
||||
#include dynamic_System.Core.dll.sources
|
||||
|
||||
System.Security.Cryptography/AesCryptoServiceProvider.cs
|
||||
System.Security.Cryptography/AesTransform.cs
|
||||
System.Security.Cryptography/MD5Cng.cs
|
||||
System.Security.Cryptography/SHA1Cng.cs
|
||||
System.Security.Cryptography/SHA256Cng.cs
|
||||
System.Security.Cryptography/SHA384Cng.cs
|
||||
System.Security.Cryptography/SHA512Cng.cs
|
||||
|
||||
../referencesource/System.Core/System/Security/Cryptography/AesManaged.cs
|
||||
../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs
|
||||
../referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs
|
||||
@@ -0,0 +1 @@
|
||||
#include mobile_System.Data.dll.sources
|
||||
@@ -10,9 +10,11 @@ LIB_MCS_FLAGS = /unsafe \
|
||||
-resource:Assembly/Error.ico,Error.ico -resource:Assembly/Warning.ico,Warning.ico \
|
||||
-resource:Assembly/Question.ico,Question.ico -resource:Assembly/Shield.ico,Shield.ico
|
||||
|
||||
ifeq (winaot, $(PROFILE))
|
||||
LIB_MCS_FLAGS += /keyfile:../msfinal.pub
|
||||
else ifeq (orbis, $(PROFILE))
|
||||
RESX_RESOURCE_STRING = ../../../external/corefx/src/System.Drawing.Common/src/Resources/Strings.resx
|
||||
|
||||
MOBILE_LIKE := $(filter winaot orbis unreal, $(PROFILE))
|
||||
|
||||
ifdef MOBILE_LIKE
|
||||
LIB_MCS_FLAGS += /keyfile:../msfinal.pub
|
||||
else
|
||||
LIB_MCS_FLAGS += -d:FEATURE_TYPECONVERTER,SUPPORTS_WINDOWS_COLORS
|
||||
|
||||
@@ -52,140 +52,176 @@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\AssemblyRef.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\misc\ClientUtils.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\misc\HandleCollector.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\BitmapSuffixInSameAssemblyAttribute.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\BitmapSuffixInSatelliteAssemblyAttribute.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Brush.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\DashCap.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\CategoryNameCollection.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\IPropertyValueUIService.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\IToolboxItemProvider.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\IToolboxService.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\IToolboxUser.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\PaintValueEventArgs.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\PropertyValueUIHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\PropertyValueUIItem.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\PropertyValueUIItemInvokeHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxComponentsCreatedEventArgs.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxComponentsCreatedEventHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxComponentsCreatingEventArgs.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxComponentsCreatingEventHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxItemCollection.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\ToolboxItemCreatorCallback.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\UITypeEditor.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Design\UITypeEditorEditStyle.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\AdjustableArrowCap.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\Blend.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\BrushType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\ColorBlend.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CombineMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CompositingMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CompositingQuality.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CoordinateSpace.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CustomLineCap.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\CustomLineCapType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\DashStyle.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\FillMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\FlushIntention.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\GraphicsPathIterator.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\GraphicsState.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\HatchBrush.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\HatchStyle.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\InterpolationMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\LinearGradientMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\LineCap.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\LineJoin.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\MatrixOrder.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\PathData.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\PathPointType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\PenAlignment.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\PenType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\PixelOffsetMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\QualityMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\RegionData.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\SafeCustomLineCapHandle.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\SmoothingMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\WarpMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Drawing2D\WrapMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\FontStyle.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Gdiplus.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\IDeviceContext.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorAdjustType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorChannelFlags.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorMap.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorMapType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorMatrix.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorMatrixFlags.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ColorPalette.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EmfPlusFlags.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EmfPlusRecordType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EmfType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\Encoder.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EncoderParameter.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EncoderParameters.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EncoderParameterValueType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\EncoderValue.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\FrameDimension.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageAttributes.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageCodecFlags.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageCodecInfo.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageCodecInfoPrivate.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageFlags.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\ImageLockMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\MetafileFrameUnit.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\MetafileHeaderEmf.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\MetafileHeaderWmf.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\MetafileType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\PaletteFlags.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\PixelFormat.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\PlayRecordCallback.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\PropertyItem.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Imaging\WmfPlaceableFileHeader.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Internal\GPPOINT.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Internal\GPPOINTF.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Internal\GPRECT.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Internal\GPRECTF.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Internal\ISystemEventTracker.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\NativeMethods.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\Duplex.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\InvalidPrinterException.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\InvalidPrinterException.Serializable.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\Margins.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\Margins.Serializable.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperKinds.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperSize.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperSize.Serializable.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperSource.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperSource.Serializable.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PaperSourceKind.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PreviewPageInfo.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintAction.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrinterResolution.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrinterResolution.Serializable.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrinterResolutionKind.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrinterUnit.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrinterUnitConvert.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintEventHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintingPermission.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintingPermissionAttribute.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintingPermissionLevel.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintPageEventHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\PrintRange.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\QueryPageSettingsEventArgs.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Printing\QueryPageSettingsEventHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\PropertyItemInternal.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\RotateFlipType.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\SolidBrush.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\StringAlignment.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\StringDigitSubstitute.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\StringFormatFlags.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\StringTrimming.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\StringUnit.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\SystemBrushes.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Text\FontCollection.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Text\GenericFontFamilies.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Text\HotkeyPrefix.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Text\InstalledFontCollection.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\Text\TextRenderingHint.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\TextureBrush.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\UnsafeNativeMethods.cs" />
|
||||
<Compile Include="..\..\build\common\Consts.cs" />
|
||||
<Compile Include="..\..\build\common\Locale.cs" />
|
||||
<Compile Include="..\..\build\common\MonoTODOAttribute.cs" />
|
||||
<Compile Include="Assembly\AssemblyInfo.cs" />
|
||||
<Compile Include="System.Drawing.Design\CategoryNameCollection.cs" />
|
||||
<Compile Include="System.Drawing.Design\IPropertyValueUIService.cs" />
|
||||
<Compile Include="System.Drawing.Design\IToolboxItemProvider.cs" />
|
||||
<Compile Include="System.Drawing.Design\IToolboxService.cs" />
|
||||
<Compile Include="System.Drawing.Design\IToolboxUser.cs" />
|
||||
<Compile Include="System.Drawing.Design\PaintValueEventArgs.cs" />
|
||||
<Compile Include="System.Drawing.Design\PropertyValueItem.cs" />
|
||||
<Compile Include="System.Drawing.Design\PropertyValueUIHandler.cs" />
|
||||
<Compile Include="System.Drawing.Design\PropertyValueUIItemInvokeHandler.cs" />
|
||||
<Compile Include="System.Drawing.Design\ToolboxComponentsCreatedEventArgs.cs" />
|
||||
<Compile Include="System.Drawing.Design\ToolboxComponentsCreatedEventHandler.cs" />
|
||||
<Compile Include="System.Drawing.Design\ToolboxComponentsCreatingEventArgs.cs" />
|
||||
<Compile Include="System.Drawing.Design\ToolboxComponentsCreatingEventHandler.cs" />
|
||||
<Compile Include="corefx\SR.cs" />
|
||||
<Compile Include="System.Drawing.Design\ToolboxItem.cs" />
|
||||
<Compile Include="System.Drawing.Design\ToolboxItemCollection.cs" />
|
||||
<Compile Include="System.Drawing.Design\ToolboxItemCreatorCallback.cs" />
|
||||
<Compile Include="System.Drawing.Design\UITypeEditor.cs" />
|
||||
<Compile Include="System.Drawing.Design\UITypeEditorEditStyle.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\AdjustableArrowCap.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\Blend.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\ColorBlend.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\CombineMode.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\CompostingMode.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\CompostingQuality.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\CoordinateSpace.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\CustomLineCap.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\DashCap.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\DashStyle.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\FillMode.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\FlushIntention.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\GraphicsContainer.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\GraphicsPath.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\GraphicsPathIterator.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\GraphicsState.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\HatchBrush.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\HatchStyle.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\InterpolationMode.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\LinearGradientBrush.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\LinearGradientMode.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\LineCap.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\LineJoin.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\Matrix.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\MatrixOrder.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\PathData.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\PathGradientBrush.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\PathPointType.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\PenAlignment.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\PenType.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\PixelOffsetMode.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\QualityMode.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\RegionData.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\SmoothingMode.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\WarpMode.cs" />
|
||||
<Compile Include="System.Drawing.Drawing2D\WrapMode.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\BitmapData.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ColorAdjustType.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ColorChannelFlag.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ColorMap.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ColorMapType.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ColorMatrix.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ColorMatrixFlag.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ColorMode.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ColorPalette.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\EmfPlusRecordType.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\EmfType.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\Encoder.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\EncoderParameter.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\EncoderParameters.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\EncoderParameterValueType.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\EncoderValue.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\FrameDimension.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ImageAttributes.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ImageCodecFlags.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ImageCodecInfo.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ImageFlags.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ImageFormat.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\ImageLockMode.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\Metafile.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\MetafileFrameUnit.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\MetafileHeader.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\MetafileType.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\MetaHeader.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\PaletteFlags.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\PixelFormat.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\PlayRecordCallback.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\PropertyItem.cs" />
|
||||
<Compile Include="System.Drawing.Imaging\WmfPlaceableFileHeader.cs" />
|
||||
<Compile Include="System.Drawing.Printing\Duplex.cs" />
|
||||
<Compile Include="System.Drawing.Printing\InvalidPrinterException.cs" />
|
||||
<Compile Include="System.Drawing.Printing\Margins.cs" />
|
||||
<Compile Include="System.Drawing.Printing\MarginsConverter.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PageSettings.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PaperKind.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PaperSize.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PaperSource.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PaperSourceKind.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PreviewPageInfo.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PreviewPrintController.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintAction.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintController.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintDocument.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrinterResolution.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrinterResolutionKind.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrinterSettings.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrinterUnit.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrinterUnitConvert.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintEventArgs.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintEventHandler.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintingPermission.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintingPermissionAttribute.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintingPermissionLevel.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintingServices.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintingServicesUnix.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintingServicesWin32.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintPageEventArgs.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintPageEventHandler.cs" />
|
||||
<Compile Include="System.Drawing.Printing\PrintRange.cs" />
|
||||
<Compile Include="System.Drawing.Printing\QueryPageSettingsEventArgs.cs" />
|
||||
<Compile Include="System.Drawing.Printing\QueryPageSettingsEventHandler.cs" />
|
||||
<Compile Include="System.Drawing.Printing\StandardPrintController.cs" />
|
||||
<Compile Include="System.Drawing.Text\FontCollection.cs" />
|
||||
<Compile Include="System.Drawing.Text\GenericFontFamilies.cs" />
|
||||
<Compile Include="System.Drawing.Text\HotkeyPrefix.cs" />
|
||||
<Compile Include="System.Drawing.Text\InstalledFontCollection.cs" />
|
||||
<Compile Include="System.Drawing.Text\PrivateFontCollection.cs" />
|
||||
<Compile Include="System.Drawing.Text\TextRenderingHint.cs" />
|
||||
<Compile Include="System.Drawing\Bitmap.cs" />
|
||||
<Compile Include="System.Drawing\BitmapSuffixInSameAssemblyAttribute.cs" />
|
||||
<Compile Include="System.Drawing\BitmapSuffixInSatelliteAssemblyAttribute.cs" />
|
||||
<Compile Include="System.Drawing\Brush.cs" />
|
||||
<Compile Include="System.Drawing\Brushes.cs" />
|
||||
<Compile Include="System.Drawing\BufferedGraphics.cs" />
|
||||
<Compile Include="System.Drawing\BufferedGraphicsContext.cs" />
|
||||
@@ -198,10 +234,10 @@
|
||||
<Compile Include="System.Drawing\ComIStreamWrapper.cs" />
|
||||
<Compile Include="System.Drawing\ContentAlignment.cs" />
|
||||
<Compile Include="System.Drawing\CopyPixelOperation.cs" />
|
||||
<Compile Include="System.Drawing\ExternDll.cs" />
|
||||
<Compile Include="System.Drawing\Font.cs" />
|
||||
<Compile Include="System.Drawing\FontConverter.cs" />
|
||||
<Compile Include="System.Drawing\FontFamily.cs" />
|
||||
<Compile Include="System.Drawing\FontStyle.cs" />
|
||||
<Compile Include="System.Drawing\gdipEnums.cs" />
|
||||
<Compile Include="System.Drawing\gdipFunctions.cs" />
|
||||
<Compile Include="System.Drawing\gdipStructs.cs" />
|
||||
@@ -209,7 +245,6 @@
|
||||
<Compile Include="System.Drawing\GraphicsUnit.cs" />
|
||||
<Compile Include="System.Drawing\Icon.cs" />
|
||||
<Compile Include="System.Drawing\IconConverter.cs" />
|
||||
<Compile Include="System.Drawing\IDeviceContext.cs" />
|
||||
<Compile Include="System.Drawing\Image.cs" />
|
||||
<Compile Include="System.Drawing\ImageAnimator.cs" />
|
||||
<Compile Include="System.Drawing\ImageConverter.cs" />
|
||||
@@ -226,25 +261,17 @@
|
||||
<Compile Include="System.Drawing\RectangleConverter.cs" />
|
||||
<Compile Include="System.Drawing\RectangleF.cs" />
|
||||
<Compile Include="System.Drawing\Region.cs" />
|
||||
<Compile Include="System.Drawing\RotateFlipType.cs" />
|
||||
<Compile Include="System.Drawing\Size.cs" />
|
||||
<Compile Include="System.Drawing\SizeConverter.cs" />
|
||||
<Compile Include="System.Drawing\SizeF.cs" />
|
||||
<Compile Include="System.Drawing\SizeFConverter.cs" />
|
||||
<Compile Include="System.Drawing\SolidBrush.cs" />
|
||||
<Compile Include="System.Drawing\SR.cs" />
|
||||
<Compile Include="System.Drawing\SRDescriptionAttribute.cs" />
|
||||
<Compile Include="System.Drawing\StringAligment.cs" />
|
||||
<Compile Include="System.Drawing\StringDigitSubstitute.cs" />
|
||||
<Compile Include="System.Drawing\StringFormat.cs" />
|
||||
<Compile Include="System.Drawing\StringFormatFlags.cs" />
|
||||
<Compile Include="System.Drawing\StringTrimming.cs" />
|
||||
<Compile Include="System.Drawing\StringUnit.cs" />
|
||||
<Compile Include="System.Drawing\SystemBrushes.cs" />
|
||||
<Compile Include="System.Drawing\SystemColors.cs" />
|
||||
<Compile Include="System.Drawing\SystemFonts.cs" />
|
||||
<Compile Include="System.Drawing\SystemIcons.cs" />
|
||||
<Compile Include="System.Drawing\SystemPens.cs" />
|
||||
<Compile Include="System.Drawing\TextureBrush.cs" />
|
||||
<Compile Include="System.Drawing\ToolboxBitmapAttribute.cs" />␍ </ItemGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Design.CategoryNameCollection.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alejandro Sánchez Acosta
|
||||
// Andreas Nahr ([email protected])
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
// (C) 2003 Andreas Nahr
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
public sealed class CategoryNameCollection : ReadOnlyCollectionBase
|
||||
{
|
||||
|
||||
public CategoryNameCollection (CategoryNameCollection value)
|
||||
{
|
||||
if (value == null)
|
||||
throw new ArgumentNullException ("value");
|
||||
InnerList.AddRange (value);
|
||||
}
|
||||
|
||||
public CategoryNameCollection (string[] value)
|
||||
{
|
||||
if (value == null)
|
||||
throw new ArgumentNullException ("value");
|
||||
InnerList.AddRange (value);
|
||||
}
|
||||
|
||||
public string this[int index] {
|
||||
get {
|
||||
return (string) InnerList[index];
|
||||
}
|
||||
}
|
||||
|
||||
public bool Contains (string value)
|
||||
{
|
||||
return InnerList.Contains (value);
|
||||
}
|
||||
|
||||
public void CopyTo (string[] array, int index)
|
||||
{
|
||||
InnerList.CopyTo (array, index);
|
||||
}
|
||||
|
||||
public int IndexOf (string value)
|
||||
{
|
||||
return InnerList.IndexOf (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
// System.Drawing.Design.IPropertyValueUIService.cs
|
||||
//
|
||||
// Author:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Drawing;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
public interface IPropertyValueUIService
|
||||
{
|
||||
|
||||
#region Methods
|
||||
void AddPropertyValueUIHandler (PropertyValueUIHandler newHandler);
|
||||
PropertyValueUIItem[] GetPropertyUIValueItems (ITypeDescriptorContext context, PropertyDescriptor propDesc);
|
||||
|
||||
void NotifyPropertyValueUIItemsChanged ();
|
||||
|
||||
void RemovePropertyValueUIHandler (PropertyValueUIHandler newHandler);
|
||||
#endregion Methods
|
||||
|
||||
#region Events
|
||||
event EventHandler PropertyUIValueItemsChanged;
|
||||
#endregion Events
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Authors:
|
||||
//
|
||||
// Jordi Mas i Hernandez <[email protected]>
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
public interface IToolboxItemProvider
|
||||
{
|
||||
ToolboxItemCollection Items { get; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Design.IToolboxService.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
// Andreas Nahr ([email protected])
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
// (C) 2003 Andreas Nahr
|
||||
// Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Drawing.Design {
|
||||
|
||||
[ComImport]
|
||||
[Guid("4BACD258-DE64-4048-BC4E-FEDBEF9ACB76"),
|
||||
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
public interface IToolboxService
|
||||
{
|
||||
CategoryNameCollection CategoryNames {get;}
|
||||
|
||||
string SelectedCategory {get; set;}
|
||||
|
||||
void AddCreator (ToolboxItemCreatorCallback creator, string format);
|
||||
|
||||
void AddCreator (ToolboxItemCreatorCallback creator, string format, IDesignerHost host);
|
||||
|
||||
void AddLinkedToolboxItem (ToolboxItem toolboxItem, IDesignerHost host);
|
||||
|
||||
void AddLinkedToolboxItem (ToolboxItem toolboxItem, string category, IDesignerHost host);
|
||||
|
||||
void AddToolboxItem (ToolboxItem toolboxItem, String category);
|
||||
|
||||
void AddToolboxItem (ToolboxItem toolboxItem);
|
||||
|
||||
ToolboxItem DeserializeToolboxItem (object serializedObject);
|
||||
|
||||
ToolboxItem DeserializeToolboxItem (object serializedObject, IDesignerHost host);
|
||||
|
||||
ToolboxItem GetSelectedToolboxItem ();
|
||||
|
||||
ToolboxItem GetSelectedToolboxItem (IDesignerHost host);
|
||||
|
||||
ToolboxItemCollection GetToolboxItems ();
|
||||
|
||||
ToolboxItemCollection GetToolboxItems (IDesignerHost host);
|
||||
|
||||
ToolboxItemCollection GetToolboxItems (String category);
|
||||
|
||||
ToolboxItemCollection GetToolboxItems (String category, IDesignerHost host);
|
||||
|
||||
bool IsSupported (object serializedObject, ICollection filterAttributes);
|
||||
|
||||
bool IsSupported (object serializedObject, IDesignerHost host);
|
||||
|
||||
bool IsToolboxItem (object serializedObject);
|
||||
|
||||
bool IsToolboxItem (object serializedObject, IDesignerHost host);
|
||||
|
||||
void Refresh();
|
||||
|
||||
void RemoveCreator (string format);
|
||||
|
||||
void RemoveCreator (string format, IDesignerHost host);
|
||||
|
||||
void RemoveToolboxItem (ToolboxItem toolboxItem);
|
||||
|
||||
void RemoveToolboxItem (ToolboxItem toolboxItem, string category);
|
||||
|
||||
void SelectedToolboxItemUsed ();
|
||||
|
||||
object SerializeToolboxItem (ToolboxItem toolboxItem);
|
||||
|
||||
bool SetCursor ();
|
||||
|
||||
void SetSelectedToolboxItem (ToolboxItem toolboxItem);
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// System.Drawing.Design.IToolboxUser.cs
|
||||
//
|
||||
// Author:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
public interface IToolboxUser
|
||||
{
|
||||
bool GetToolSupported (ToolboxItem tool);
|
||||
|
||||
void ToolPicked (ToolboxItem tool);
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
// System.Drawing.Design.PaintvalueEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
public class PaintValueEventArgs : EventArgs
|
||||
{
|
||||
private ITypeDescriptorContext context;
|
||||
private object value;
|
||||
private Graphics graphics;
|
||||
private Rectangle bounds;
|
||||
|
||||
public PaintValueEventArgs(ITypeDescriptorContext context, object value, Graphics graphics, Rectangle bounds)
|
||||
{
|
||||
if (graphics == null)
|
||||
throw new ArgumentNullException ("graphics");
|
||||
this.context = context;
|
||||
this.value = value;
|
||||
this.graphics = graphics;
|
||||
this.bounds = bounds;
|
||||
}
|
||||
|
||||
public Rectangle Bounds
|
||||
{
|
||||
get {
|
||||
return bounds;
|
||||
}
|
||||
}
|
||||
|
||||
public ITypeDescriptorContext Context
|
||||
{
|
||||
get {
|
||||
return context;
|
||||
}
|
||||
}
|
||||
|
||||
public Graphics Graphics
|
||||
{
|
||||
get {
|
||||
return graphics;
|
||||
}
|
||||
}
|
||||
|
||||
public object Value
|
||||
{
|
||||
get {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Design.PropertyValueItem.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
// Andreas Nahr ([email protected])
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
// (C) 2003 Andreas Nahr
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
public class PropertyValueUIItem
|
||||
{
|
||||
|
||||
private Image uiItemImage;
|
||||
private PropertyValueUIItemInvokeHandler handler;
|
||||
private string tooltip;
|
||||
|
||||
public PropertyValueUIItem (Image uiItemImage,
|
||||
PropertyValueUIItemInvokeHandler handler, string tooltip)
|
||||
{
|
||||
if (uiItemImage == null)
|
||||
throw new ArgumentNullException ("uiItemImage");
|
||||
if (handler == null)
|
||||
throw new ArgumentNullException ("handler");
|
||||
this.uiItemImage = uiItemImage;
|
||||
this.handler = handler;
|
||||
this.tooltip = tooltip;
|
||||
}
|
||||
|
||||
public virtual Image Image
|
||||
{
|
||||
get
|
||||
{
|
||||
return uiItemImage;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual PropertyValueUIItemInvokeHandler InvokeHandler
|
||||
{
|
||||
get
|
||||
{
|
||||
return handler;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string ToolTip
|
||||
{
|
||||
get
|
||||
{
|
||||
return tooltip;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Reset()
|
||||
{
|
||||
// To be overriden in child classes
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
// System.Drawing.Design.PropertyValueUIHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Drawing.Design {
|
||||
|
||||
public delegate void PropertyValueUIHandler (ITypeDescriptorContext context, PropertyDescriptor propDesc, ArrayList valueUIItemList);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
// System.Drawing.Design.PropertyValueUIItemInvokeHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Drawing.Design {
|
||||
|
||||
public delegate void PropertyValueUIItemInvokeHandler (
|
||||
ITypeDescriptorContext context,
|
||||
PropertyDescriptor descriptor,
|
||||
PropertyValueUIItem invokedItem);
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
// System.Drawing.Design.ToolboxComponentsCreatedEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
//
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
public class ToolboxComponentsCreatedEventArgs : EventArgs
|
||||
{
|
||||
private IComponent[] components;
|
||||
|
||||
public ToolboxComponentsCreatedEventArgs (IComponent[] components) {
|
||||
this.components = components;
|
||||
}
|
||||
|
||||
public IComponent[] Components {
|
||||
get {
|
||||
return components;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
// System.Drawing.Design.IDesignerHost.cs
|
||||
//
|
||||
// Author:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Design {
|
||||
|
||||
public delegate void ToolboxComponentsCreatedEventHandler (object sender, ToolboxComponentsCreatedEventArgs e);
|
||||
}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Design.ToolboxComponentsCreatingEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.ComponentModel.Design;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
|
||||
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
|
||||
public class ToolboxComponentsCreatingEventArgs : EventArgs
|
||||
{
|
||||
private IDesignerHost host;
|
||||
|
||||
public ToolboxComponentsCreatingEventArgs (IDesignerHost host)
|
||||
{
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public IDesignerHost DesignerHost {
|
||||
get {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
// System.Drawing.Design.ToolboxComponentsCreatingEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Design {
|
||||
|
||||
public delegate void ToolboxComponentsCreatingEventHandler (object sender, ToolboxComponentsCreatingEventArgs e);
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Design.ToolboxItemCollection.cs
|
||||
//
|
||||
// Authors:
|
||||
// Martin Willemoes Hansen ([email protected])
|
||||
// Andreas Nahr ([email protected])
|
||||
//
|
||||
// (C) 2003 Martin Willemoes Hansen
|
||||
// (C) 2003 Andreas Nahr
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
|
||||
public sealed class ToolboxItemCollection : ReadOnlyCollectionBase
|
||||
{
|
||||
|
||||
public ToolboxItemCollection (ToolboxItem[] value) : base()
|
||||
{
|
||||
InnerList.AddRange (value);
|
||||
}
|
||||
|
||||
public ToolboxItemCollection (ToolboxItemCollection value) : base()
|
||||
{
|
||||
InnerList.AddRange (value);
|
||||
}
|
||||
|
||||
public ToolboxItem this [int index] {
|
||||
get { return (ToolboxItem) InnerList[index]; }
|
||||
}
|
||||
|
||||
public bool Contains (ToolboxItem value)
|
||||
{
|
||||
return InnerList.Contains (value);
|
||||
}
|
||||
|
||||
public void CopyTo (ToolboxItem[] array, int index)
|
||||
{
|
||||
InnerList.CopyTo (array, index);
|
||||
}
|
||||
|
||||
public int IndexOf (ToolboxItem value)
|
||||
{
|
||||
return InnerList.IndexOf (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
// System.Drawing.Design.ToolboxItemCreatorCallback.cs
|
||||
//
|
||||
// Author:
|
||||
// Alejandro Sánchez Acosta <[email protected]>
|
||||
//
|
||||
// (C) Alejandro Sánchez Acosta
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Design {
|
||||
|
||||
public delegate ToolboxItem ToolboxItemCreatorCallback(
|
||||
object serializedObject,
|
||||
string format);
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Design.UITypeEditor.cs
|
||||
//
|
||||
// Authors:
|
||||
// Alan Tam Siu Lung <[email protected]>
|
||||
// Andreas Nahr ([email protected])
|
||||
//
|
||||
// (C) 2003 Alan Tam Siu Lung <[email protected]>
|
||||
// (C) 2003 Andreas Nahr
|
||||
// Copyright (C) 2004-2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
public class UITypeEditor {
|
||||
|
||||
static UITypeEditor ()
|
||||
{
|
||||
Hashtable editors = new Hashtable ();
|
||||
editors [typeof (Array)] = "System.ComponentModel.Design.ArrayEditor, " + Consts.AssemblySystem_Design;
|
||||
editors [typeof (byte [])] = "System.ComponentModel.Design.BinaryEditor, " + Consts.AssemblySystem_Design;
|
||||
editors [typeof (DateTime)] = "System.ComponentModel.Design.DateTimeEditor, " + Consts.AssemblySystem_Design;
|
||||
editors [typeof (IList)] = "System.ComponentModel.Design.CollectionEditor, " + Consts.AssemblySystem_Design;
|
||||
editors [typeof (ICollection)] = "System.ComponentModel.Design.CollectionEditor, " + Consts.AssemblySystem_Design;
|
||||
editors [typeof (string[])] = "System.Windows.Forms.Design.StringArrayEditor, " + Consts.AssemblySystem_Design;
|
||||
#if !MOBILE
|
||||
TypeDescriptor.AddEditorTable (typeof (UITypeEditor), editors);
|
||||
#endif
|
||||
}
|
||||
|
||||
public UITypeEditor()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual object EditValue (ITypeDescriptorContext context,
|
||||
IServiceProvider provider, object value)
|
||||
{
|
||||
// We already stated that we can't edit ;)
|
||||
return value;
|
||||
}
|
||||
|
||||
public object EditValue (IServiceProvider provider, object value)
|
||||
{
|
||||
return EditValue (null, provider, value);
|
||||
}
|
||||
|
||||
public virtual UITypeEditorEditStyle GetEditStyle (ITypeDescriptorContext context)
|
||||
{
|
||||
return UITypeEditorEditStyle.None;
|
||||
}
|
||||
|
||||
public UITypeEditorEditStyle GetEditStyle ()
|
||||
{
|
||||
return GetEditStyle (null);
|
||||
}
|
||||
|
||||
public bool GetPaintValueSupported ()
|
||||
{
|
||||
return GetPaintValueSupported (null);
|
||||
}
|
||||
|
||||
public virtual bool GetPaintValueSupported (ITypeDescriptorContext context)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public void PaintValue (object value, Graphics canvas, Rectangle rectangle)
|
||||
{
|
||||
PaintValue (new PaintValueEventArgs (null, value, canvas, rectangle));
|
||||
}
|
||||
|
||||
public virtual void PaintValue (PaintValueEventArgs e)
|
||||
{
|
||||
// LAMESPEC: Did not find info in the docs if this should do something here.
|
||||
// Usually you would expect, that this class gets inherited and this overridden,
|
||||
// but on the other hand the class is not abstract. Could never observe it did paint anything
|
||||
return;
|
||||
}
|
||||
public virtual bool IsDropDownResizable {
|
||||
get { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Design.UITypeEditorEditStyle.cs
|
||||
//
|
||||
// (C) 2001 Ximian, Inc. http://www.ximian.com
|
||||
// Author: Dennis Hayes ([email protected])
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
using System;
|
||||
namespace System.Drawing.Design
|
||||
{
|
||||
public enum UITypeEditorEditStyle{
|
||||
DropDown=3,
|
||||
Modal=2,
|
||||
None=1
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.AdjustableArrowCap.cs
|
||||
//
|
||||
// Authors:
|
||||
// Dennis Hayes ([email protected])
|
||||
// Ravindra ([email protected])
|
||||
//
|
||||
// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com
|
||||
// Copyright (C) 2004 Novell, Inc. http://www.novell.com
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Drawing.Drawing2D
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for AdjustableArrowCap.
|
||||
/// </summary>
|
||||
public sealed class AdjustableArrowCap : CustomLineCap
|
||||
{
|
||||
// Constructors
|
||||
|
||||
internal AdjustableArrowCap (IntPtr ptr) : base (ptr)
|
||||
{
|
||||
}
|
||||
|
||||
public AdjustableArrowCap (float width, float height) : this (width, height, true)
|
||||
{
|
||||
}
|
||||
|
||||
public AdjustableArrowCap (float width, float height, bool isFilled)
|
||||
{
|
||||
Status status = GDIPlus.GdipCreateAdjustableArrowCap (height, width, isFilled, out nativeObject);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
// Public Properities
|
||||
|
||||
public bool Filled {
|
||||
get {
|
||||
bool isFilled;
|
||||
Status status = GDIPlus.GdipGetAdjustableArrowCapFillState (nativeObject, out isFilled);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return isFilled;
|
||||
}
|
||||
|
||||
set {
|
||||
Status status = GDIPlus.GdipSetAdjustableArrowCapFillState (nativeObject, value);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
|
||||
public float Width {
|
||||
get {
|
||||
float width;
|
||||
Status status = GDIPlus.GdipGetAdjustableArrowCapWidth (nativeObject, out width);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return width;
|
||||
}
|
||||
|
||||
set {
|
||||
Status status = GDIPlus.GdipSetAdjustableArrowCapWidth (nativeObject, value);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
|
||||
public float Height {
|
||||
get {
|
||||
float height;
|
||||
Status status = GDIPlus.GdipGetAdjustableArrowCapHeight (nativeObject, out height);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return height;
|
||||
}
|
||||
|
||||
set {
|
||||
Status status = GDIPlus.GdipSetAdjustableArrowCapHeight (nativeObject, value);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
|
||||
public float MiddleInset {
|
||||
get {
|
||||
float middleInset;
|
||||
Status status = GDIPlus.GdipGetAdjustableArrowCapMiddleInset (nativeObject, out middleInset);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return middleInset;
|
||||
}
|
||||
|
||||
set {
|
||||
Status status = GDIPlus.GdipSetAdjustableArrowCapMiddleInset (nativeObject, value);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.Blend.cs
|
||||
//
|
||||
// Authors:
|
||||
// Dennis Hayes ([email protected])
|
||||
// Ravindra ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc. http://www.ximian.com
|
||||
// (C) 2004 Novell, Inc. http://www.novell.com
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
using System;
|
||||
|
||||
namespace System.Drawing.Drawing2D
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for Blend.
|
||||
/// </summary>
|
||||
public sealed class Blend
|
||||
{
|
||||
private float [] positions;
|
||||
private float [] factors;
|
||||
|
||||
public Blend ()
|
||||
{
|
||||
positions = new float [1];
|
||||
factors = new float [1];
|
||||
}
|
||||
|
||||
public Blend (int count)
|
||||
{
|
||||
positions = new float [count];
|
||||
factors = new float [count];
|
||||
}
|
||||
|
||||
public float [] Factors {
|
||||
get {
|
||||
return factors;
|
||||
}
|
||||
|
||||
set {
|
||||
factors = value;
|
||||
}
|
||||
}
|
||||
|
||||
public float [] Positions {
|
||||
get {
|
||||
return positions;
|
||||
}
|
||||
|
||||
set {
|
||||
positions = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.ColorBlend.cs
|
||||
//
|
||||
// Authors:
|
||||
// Dennis Hayes ([email protected])
|
||||
// Ravindra ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc. http://www.ximian.com
|
||||
// Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D
|
||||
{
|
||||
public sealed class ColorBlend
|
||||
{
|
||||
private float [] positions;
|
||||
private Color [] colors;
|
||||
|
||||
public ColorBlend ()
|
||||
{
|
||||
positions = new float [1];
|
||||
colors = new Color [1];
|
||||
}
|
||||
|
||||
public ColorBlend (int count)
|
||||
{
|
||||
positions = new float [count];
|
||||
colors = new Color [count];
|
||||
}
|
||||
|
||||
public Color [] Colors {
|
||||
get {
|
||||
return colors;
|
||||
}
|
||||
|
||||
set {
|
||||
colors = value;
|
||||
}
|
||||
}
|
||||
|
||||
public float [] Positions {
|
||||
get {
|
||||
return positions;
|
||||
}
|
||||
|
||||
set {
|
||||
positions = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.CombineMode.cs
|
||||
//
|
||||
// Author:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public enum CombineMode {
|
||||
Complement = 5,
|
||||
Exclude = 4,
|
||||
Intersect = 1,
|
||||
Replace = 0,
|
||||
Union = 2,
|
||||
Xor = 3
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.CompostingMode.cs
|
||||
//
|
||||
// Author:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public enum CompositingMode {
|
||||
SourceCopy = 1,
|
||||
SourceOver = 0
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.CompostingQuality.cs
|
||||
//
|
||||
// Author:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public enum CompositingQuality {
|
||||
AssumeLinear = 4,
|
||||
Default = 0,
|
||||
GammaCorrected = 3,
|
||||
HighQuality = 2,
|
||||
HighSpeed = 1,
|
||||
Invalid = -1
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.CoordinateSpace.cs
|
||||
//
|
||||
// Author:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public enum CoordinateSpace {
|
||||
Device = 2,
|
||||
Page = 1,
|
||||
World = 0
|
||||
}
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.CustomLineCap.cs
|
||||
//
|
||||
// Authors:
|
||||
// Dennis Hayes ([email protected])
|
||||
// Andreas Nahr ([email protected])
|
||||
// Ravindra ([email protected])
|
||||
//
|
||||
// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public class CustomLineCap : MarshalByRefObject, ICloneable, IDisposable
|
||||
{
|
||||
private bool disposed;
|
||||
internal IntPtr nativeObject;
|
||||
|
||||
// Constructors
|
||||
|
||||
internal CustomLineCap ()
|
||||
{
|
||||
}
|
||||
|
||||
internal CustomLineCap (IntPtr ptr)
|
||||
{
|
||||
nativeObject = ptr;
|
||||
}
|
||||
|
||||
public CustomLineCap (GraphicsPath fillPath, GraphicsPath strokePath) : this (fillPath, strokePath, LineCap.Flat, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public CustomLineCap (GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap) : this (fillPath, strokePath, baseCap, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap, float baseInset)
|
||||
{
|
||||
IntPtr fill = IntPtr.Zero;
|
||||
IntPtr stroke = IntPtr.Zero;
|
||||
|
||||
if (fillPath != null)
|
||||
fill = fillPath.nativePath;
|
||||
if (strokePath != null)
|
||||
stroke = strokePath.nativePath;
|
||||
|
||||
Status status = GDIPlus.GdipCreateCustomLineCap (fill, stroke, baseCap, baseInset, out nativeObject);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
public LineCap BaseCap {
|
||||
get {
|
||||
LineCap baseCap;
|
||||
Status status = GDIPlus.GdipGetCustomLineCapBaseCap (nativeObject, out baseCap);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return baseCap;
|
||||
}
|
||||
|
||||
set {
|
||||
Status status = GDIPlus.GdipSetCustomLineCapBaseCap (nativeObject, value);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
|
||||
public LineJoin StrokeJoin {
|
||||
get {
|
||||
LineJoin strokeJoin;
|
||||
Status status = GDIPlus.GdipGetCustomLineCapStrokeJoin (nativeObject, out strokeJoin);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return strokeJoin;
|
||||
}
|
||||
|
||||
set {
|
||||
Status status = GDIPlus.GdipSetCustomLineCapStrokeJoin (nativeObject, value);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
|
||||
public float BaseInset {
|
||||
get {
|
||||
float baseInset;
|
||||
Status status = GDIPlus.GdipGetCustomLineCapBaseInset (nativeObject, out baseInset);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return baseInset;
|
||||
}
|
||||
|
||||
set {
|
||||
Status status = GDIPlus.GdipSetCustomLineCapBaseInset (nativeObject, value);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
|
||||
public float WidthScale {
|
||||
get {
|
||||
float widthScale;
|
||||
Status status = GDIPlus.GdipGetCustomLineCapWidthScale (nativeObject, out widthScale);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return widthScale;
|
||||
}
|
||||
|
||||
set {
|
||||
Status status = GDIPlus.GdipSetCustomLineCapWidthScale (nativeObject, value);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
|
||||
// Public Methods
|
||||
|
||||
public object Clone ()
|
||||
{
|
||||
IntPtr clonePtr;
|
||||
Status status = GDIPlus.GdipCloneCustomLineCap (nativeObject, out clonePtr);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return new CustomLineCap (clonePtr);
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
System.GC.SuppressFinalize (this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose (bool disposing)
|
||||
{
|
||||
if (! disposed) {
|
||||
Status status = GDIPlus.GdipDeleteCustomLineCap (nativeObject);
|
||||
GDIPlus.CheckStatus (status);
|
||||
disposed = true;
|
||||
nativeObject = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
~CustomLineCap ()
|
||||
{
|
||||
Dispose (false);
|
||||
}
|
||||
|
||||
public void GetStrokeCaps (out LineCap startCap, out LineCap endCap)
|
||||
{
|
||||
Status status = GDIPlus.GdipGetCustomLineCapStrokeCaps (nativeObject, out startCap, out endCap);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
public void SetStrokeCaps(LineCap startCap, LineCap endCap)
|
||||
{
|
||||
Status status = GDIPlus.GdipSetCustomLineCapStrokeCaps (nativeObject, startCap, endCap);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.DashCap.cs
|
||||
//
|
||||
// Author:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public enum DashCap {
|
||||
Flat,
|
||||
Round = 2,
|
||||
Triangle = 3
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.DashStyle.cs
|
||||
//
|
||||
// Author:
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public enum DashStyle {
|
||||
Custom = 5,
|
||||
Dash = 1,
|
||||
DashDot = 3,
|
||||
DashDotDot = 4,
|
||||
Dot = 2,
|
||||
Solid = 0
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.FillMode.cs
|
||||
//
|
||||
// Author:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public enum FillMode {
|
||||
Alternate = 0,
|
||||
Winding = 1
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.FlushIntention.cs
|
||||
//
|
||||
// Author:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public enum FlushIntention {
|
||||
Flush = 0,
|
||||
Sync = 1
|
||||
}
|
||||
}
|
||||
@@ -630,7 +630,7 @@ namespace System.Drawing.Drawing2D
|
||||
|
||||
IntPtr sformat = (format == null) ? IntPtr.Zero : format.NativeObject;
|
||||
// note: the NullReferenceException on s.Length is the expected (MS) exception
|
||||
Status status = GDIPlus.GdipAddPathStringI (nativePath, s, s.Length, family.NativeObject, style, emSize, ref layoutRect, sformat);
|
||||
Status status = GDIPlus.GdipAddPathStringI (nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@ namespace System.Drawing.Drawing2D
|
||||
|
||||
IntPtr sformat = (format == null) ? IntPtr.Zero : format.NativeObject;
|
||||
// note: the NullReferenceException on s.Length is the expected (MS) exception
|
||||
Status status = GDIPlus.GdipAddPathString (nativePath, s, s.Length, family.NativeObject, style, emSize, ref layoutRect, sformat);
|
||||
Status status = GDIPlus.GdipAddPathString (nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
@@ -699,7 +699,7 @@ namespace System.Drawing.Drawing2D
|
||||
{
|
||||
RectangleF retval;
|
||||
IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix;
|
||||
IntPtr p = (pen == null) ? IntPtr.Zero : pen.nativeObject;
|
||||
IntPtr p = (pen == null) ? IntPtr.Zero : pen.NativePen;
|
||||
|
||||
Status s = GDIPlus.GdipGetPathWorldBounds (nativePath, out retval, m, p);
|
||||
|
||||
@@ -746,7 +746,7 @@ namespace System.Drawing.Drawing2D
|
||||
bool result;
|
||||
IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject;
|
||||
|
||||
Status s = GDIPlus.GdipIsOutlineVisiblePathPointI (nativePath, x, y, pen.nativeObject, g, out result);
|
||||
Status s = GDIPlus.GdipIsOutlineVisiblePathPointI (nativePath, x, y, pen.NativePen, g, out result);
|
||||
GDIPlus.CheckStatus (s);
|
||||
|
||||
return result;
|
||||
@@ -760,7 +760,7 @@ namespace System.Drawing.Drawing2D
|
||||
bool result;
|
||||
IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject;
|
||||
|
||||
Status s = GDIPlus.GdipIsOutlineVisiblePathPoint (nativePath, x, y, pen.nativeObject, g, out result);
|
||||
Status s = GDIPlus.GdipIsOutlineVisiblePathPoint (nativePath, x, y, pen.NativePen, g, out result);
|
||||
GDIPlus.CheckStatus (s);
|
||||
|
||||
return result;
|
||||
@@ -889,7 +889,7 @@ namespace System.Drawing.Drawing2D
|
||||
return;
|
||||
IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix;
|
||||
|
||||
Status s = GDIPlus.GdipWidenPath (nativePath, pen.nativeObject, m, flatness);
|
||||
Status s = GDIPlus.GdipWidenPath (nativePath, pen.NativePen, m, flatness);
|
||||
GDIPlus.CheckStatus (s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.GraphicsPathIterator.cs
|
||||
//
|
||||
// Author:
|
||||
// Dennis Hayes ([email protected])
|
||||
// Duncan Mak ([email protected])
|
||||
// Ravindra ([email protected])
|
||||
//
|
||||
// Copyright (C) 2002/3 Ximian, Inc (http://www.ximian.com)
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
namespace System.Drawing.Drawing2D
|
||||
{
|
||||
public sealed class GraphicsPathIterator : MarshalByRefObject, IDisposable
|
||||
{
|
||||
private IntPtr nativeObject = IntPtr.Zero;
|
||||
|
||||
// Constructors
|
||||
internal GraphicsPathIterator (IntPtr native)
|
||||
{
|
||||
this.nativeObject = native;
|
||||
}
|
||||
|
||||
public GraphicsPathIterator (GraphicsPath path)
|
||||
{
|
||||
if (path != null) {
|
||||
Status status = GDIPlus.GdipCreatePathIter (out nativeObject, path.NativeObject);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
|
||||
internal IntPtr NativeObject {
|
||||
get {
|
||||
return nativeObject;
|
||||
}
|
||||
set {
|
||||
nativeObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Public Properites
|
||||
|
||||
public int Count {
|
||||
get {
|
||||
if (nativeObject == IntPtr.Zero)
|
||||
return 0;
|
||||
|
||||
int count;
|
||||
Status status = GDIPlus.GdipPathIterGetCount (nativeObject, out count);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
public int SubpathCount {
|
||||
get {
|
||||
int count;
|
||||
Status status = GDIPlus.GdipPathIterGetSubpathCount (nativeObject, out count);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
internal void Dispose (bool disposing)
|
||||
{
|
||||
Status status;
|
||||
if (nativeObject != IntPtr.Zero) {
|
||||
status = GDIPlus.GdipDeletePathIter (nativeObject);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
nativeObject = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
// Public Methods.
|
||||
|
||||
public int CopyData (ref PointF [] points, ref byte [] types, int startIndex, int endIndex)
|
||||
{
|
||||
Status status;
|
||||
int resultCount;
|
||||
|
||||
// no null checks, MS throws a NullReferenceException here
|
||||
if (points.Length != types.Length)
|
||||
throw new ArgumentException ("Invalid arguments passed. Both arrays should have the same length.");
|
||||
|
||||
status = GDIPlus.GdipPathIterCopyData (nativeObject, out resultCount, points, types, startIndex, endIndex);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return resultCount;
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
System.GC.SuppressFinalize (this);
|
||||
}
|
||||
|
||||
~GraphicsPathIterator ()
|
||||
{
|
||||
Dispose (false);
|
||||
}
|
||||
|
||||
public int Enumerate (ref PointF [] points, ref byte [] types)
|
||||
{
|
||||
Status status;
|
||||
int resultCount;
|
||||
// no null checks, MS throws a NullReferenceException here
|
||||
int count = points.Length;
|
||||
if (count != types.Length)
|
||||
throw new ArgumentException ("Invalid arguments passed. Both arrays should have the same length.");
|
||||
|
||||
status = GDIPlus.GdipPathIterEnumerate (nativeObject, out resultCount, points, types, count);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return resultCount;
|
||||
}
|
||||
|
||||
public bool HasCurve ()
|
||||
{
|
||||
bool curve;
|
||||
Status status = GDIPlus.GdipPathIterHasCurve (nativeObject, out curve);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return curve;
|
||||
}
|
||||
|
||||
public int NextMarker (GraphicsPath path)
|
||||
{
|
||||
int resultCount;
|
||||
IntPtr ptr = (path == null) ? IntPtr.Zero : path.NativeObject;
|
||||
Status status = GDIPlus.GdipPathIterNextMarkerPath (nativeObject, out resultCount, ptr);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return resultCount;
|
||||
}
|
||||
|
||||
public int NextMarker (out int startIndex, out int endIndex)
|
||||
{
|
||||
Status status;
|
||||
int resultCount;
|
||||
status = GDIPlus.GdipPathIterNextMarker (nativeObject, out resultCount, out startIndex, out endIndex);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return resultCount;
|
||||
}
|
||||
|
||||
public int NextPathType (out byte pathType, out int startIndex, out int endIndex)
|
||||
{
|
||||
Status status;
|
||||
int resultCount;
|
||||
status = GDIPlus.GdipPathIterNextPathType (nativeObject, out resultCount, out pathType, out startIndex, out endIndex);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return resultCount;
|
||||
}
|
||||
|
||||
public int NextSubpath (GraphicsPath path, out bool isClosed)
|
||||
{
|
||||
int resultCount;
|
||||
IntPtr ptr = (path == null) ? IntPtr.Zero : path.NativeObject;
|
||||
Status status = GDIPlus.GdipPathIterNextSubpathPath (nativeObject, out resultCount, ptr, out isClosed);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return resultCount;
|
||||
}
|
||||
|
||||
public int NextSubpath (out int startIndex, out int endIndex, out bool isClosed)
|
||||
{
|
||||
Status status;
|
||||
int resultCount;
|
||||
status = GDIPlus.GdipPathIterNextSubpath (nativeObject, out resultCount, out startIndex, out endIndex, out isClosed);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return resultCount;
|
||||
}
|
||||
|
||||
public void Rewind ()
|
||||
{
|
||||
Status status = GDIPlus.GdipPathIterRewind (nativeObject);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.GraphicsState.cs
|
||||
//
|
||||
// Author:
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
using System;
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
/// <summary>
|
||||
/// Summary description for GraphicsState.
|
||||
/// </summary>
|
||||
public sealed class GraphicsState : MarshalByRefObject
|
||||
{
|
||||
// All members inherited
|
||||
internal uint nativeState;
|
||||
|
||||
// Constructor
|
||||
internal GraphicsState()
|
||||
{
|
||||
// Nothing to be done here
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.HatchBrush.cs
|
||||
//
|
||||
// Authors:
|
||||
// Dennis Hayes ([email protected])
|
||||
// Ravindra ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
// (C) 2004 Novell, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
using System;
|
||||
|
||||
namespace System.Drawing.Drawing2D
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for HatchBrush.
|
||||
/// </summary>
|
||||
public sealed class HatchBrush : Brush
|
||||
{
|
||||
|
||||
internal HatchBrush (IntPtr ptr) : base (ptr)
|
||||
{
|
||||
}
|
||||
|
||||
public HatchBrush (HatchStyle hatchstyle, Color foreColor)
|
||||
: this (hatchstyle, foreColor, Color.Black)
|
||||
{
|
||||
}
|
||||
|
||||
public HatchBrush(HatchStyle hatchstyle, Color foreColor, Color backColor)
|
||||
{
|
||||
Status status = GDIPlus.GdipCreateHatchBrush (hatchstyle, foreColor.ToArgb (), backColor.ToArgb (), out nativeObject);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
public Color BackgroundColor {
|
||||
get {
|
||||
int argb;
|
||||
Status status = GDIPlus.GdipGetHatchBackgroundColor (nativeObject, out argb);
|
||||
GDIPlus.CheckStatus (status);
|
||||
return Color.FromArgb (argb);
|
||||
}
|
||||
}
|
||||
|
||||
public Color ForegroundColor {
|
||||
get {
|
||||
int argb;
|
||||
Status status = GDIPlus.GdipGetHatchForegroundColor (nativeObject, out argb);
|
||||
GDIPlus.CheckStatus (status);
|
||||
return Color.FromArgb (argb);
|
||||
}
|
||||
}
|
||||
|
||||
public HatchStyle HatchStyle {
|
||||
get {
|
||||
HatchStyle hatchStyle;
|
||||
Status status = GDIPlus.GdipGetHatchStyle (nativeObject, out hatchStyle);
|
||||
GDIPlus.CheckStatus (status);
|
||||
return hatchStyle;
|
||||
}
|
||||
}
|
||||
|
||||
public override object Clone ()
|
||||
{
|
||||
IntPtr clonePtr;
|
||||
Status status = GDIPlus.GdipCloneBrush (nativeObject, out clonePtr);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
HatchBrush clone = new HatchBrush (clonePtr);
|
||||
return clone;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.HatchStyle.cs
|
||||
//
|
||||
// Authors:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
// Dennis Hayes ([email protected])
|
||||
// Ravindra ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc.
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public enum HatchStyle {
|
||||
BackwardDiagonal = 3,
|
||||
Cross = LargeGrid,
|
||||
DarkDownwardDiagonal = 20,
|
||||
DarkHorizontal = 29,
|
||||
DarkUpwardDiagonal = 21,
|
||||
DarkVertical = 28,
|
||||
DashedDownwardDiagonal = 30,
|
||||
DashedHorizontal = 32,
|
||||
DashedUpwardDiagonal = 31,
|
||||
DashedVertical = 33,
|
||||
DiagonalBrick = 38,
|
||||
DiagonalCross = 5,
|
||||
Divot = 42,
|
||||
DottedDiamond = 44,
|
||||
DottedGrid = 43,
|
||||
ForwardDiagonal = 2,
|
||||
Horizontal = 0,
|
||||
HorizontalBrick = 39,
|
||||
LargeCheckerBoard = 50,
|
||||
LargeConfetti = 35,
|
||||
LargeGrid = 4,
|
||||
LightDownwardDiagonal = 18,
|
||||
LightHorizontal = 25,
|
||||
LightUpwardDiagonal = 19,
|
||||
LightVertical = 24,
|
||||
Max = 4,
|
||||
Min = 0,
|
||||
NarrowHorizontal = 27,
|
||||
NarrowVertical = 26,
|
||||
OutlinedDiamond = 51,
|
||||
Percent05 = 6,
|
||||
Percent10 = 7,
|
||||
Percent20 = 8,
|
||||
Percent25 = 9,
|
||||
Percent30 = 10,
|
||||
Percent40 = 11,
|
||||
Percent50 = 12,
|
||||
Percent60 = 13,
|
||||
Percent70 = 14,
|
||||
Percent75 = 15,
|
||||
Percent80 = 16,
|
||||
Percent90 = 17,
|
||||
Plaid = 41,
|
||||
Shingle = 45,
|
||||
SmallCheckerBoard = 49,
|
||||
SmallConfetti = 34,
|
||||
SmallGrid = 48,
|
||||
SolidDiamond = 52,
|
||||
Sphere = 47,
|
||||
Trellis = 46,
|
||||
Vertical = 1,
|
||||
Wave = 37,
|
||||
Weave = 40,
|
||||
WideDownwardDiagonal = 22,
|
||||
WideUpwardDiagonal = 23,
|
||||
ZigZag = 36
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.InterpolationMode.cs
|
||||
//
|
||||
// Author:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) 2002/3 Ximian, Inc
|
||||
// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D {
|
||||
|
||||
public enum InterpolationMode {
|
||||
Bicubic = 4,
|
||||
Bilinear = 3,
|
||||
Default = 0,
|
||||
High = 2,
|
||||
HighQualityBicubic = 7,
|
||||
HighQualityBilinear = 6,
|
||||
Invalid = -1,
|
||||
Low = 1,
|
||||
NearestNeighbor = 5
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
//
|
||||
// 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
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
//
|
||||
// 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,16 +36,19 @@ namespace System.Drawing.Drawing2D {
|
||||
{
|
||||
RectangleF rectangle;
|
||||
|
||||
internal LinearGradientBrush (IntPtr native) : base (native)
|
||||
internal LinearGradientBrush (IntPtr 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);
|
||||
@@ -53,8 +56,10 @@ 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);
|
||||
@@ -62,8 +67,10 @@ 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;
|
||||
}
|
||||
@@ -74,8 +81,10 @@ 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;
|
||||
}
|
||||
@@ -86,16 +95,20 @@ 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;
|
||||
}
|
||||
@@ -105,11 +118,11 @@ namespace System.Drawing.Drawing2D {
|
||||
public Blend Blend {
|
||||
get {
|
||||
int count;
|
||||
Status status = GDIPlus.GdipGetLineBlendCount (nativeObject, out count);
|
||||
Status status = GDIPlus.GdipGetLineBlendCount (NativeBrush, out count);
|
||||
GDIPlus.CheckStatus (status);
|
||||
float [] factors = new float [count];
|
||||
float [] positions = new float [count];
|
||||
status = GDIPlus.GdipGetLineBlend (nativeObject, factors, positions, count);
|
||||
status = GDIPlus.GdipGetLineBlend (NativeBrush, factors, positions, count);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
Blend blend = new Blend ();
|
||||
@@ -137,7 +150,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 (nativeObject, factors, positions, count);
|
||||
Status status = GDIPlus.GdipSetLineBlend (NativeBrush, factors, positions, count);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
@@ -146,12 +159,12 @@ namespace System.Drawing.Drawing2D {
|
||||
public bool GammaCorrection {
|
||||
get {
|
||||
bool gammaCorrection;
|
||||
Status status = GDIPlus.GdipGetLineGammaCorrection (nativeObject, out gammaCorrection);
|
||||
Status status = GDIPlus.GdipGetLineGammaCorrection (NativeBrush, out gammaCorrection);
|
||||
GDIPlus.CheckStatus (status);
|
||||
return gammaCorrection;
|
||||
}
|
||||
set {
|
||||
Status status = GDIPlus.GdipSetLineGammaCorrection (nativeObject, value);
|
||||
Status status = GDIPlus.GdipSetLineGammaCorrection (NativeBrush, value);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
@@ -159,11 +172,11 @@ namespace System.Drawing.Drawing2D {
|
||||
public ColorBlend InterpolationColors {
|
||||
get {
|
||||
int count;
|
||||
Status status = GDIPlus.GdipGetLinePresetBlendCount (nativeObject, out count);
|
||||
Status status = GDIPlus.GdipGetLinePresetBlendCount (NativeBrush, out count);
|
||||
GDIPlus.CheckStatus (status);
|
||||
int [] intcolors = new int [count];
|
||||
float [] positions = new float [count];
|
||||
status = GDIPlus.GdipGetLinePresetBlend (nativeObject, intcolors, positions, count);
|
||||
status = GDIPlus.GdipGetLinePresetBlend (NativeBrush, intcolors, positions, count);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
ColorBlend interpolationColors = new ColorBlend ();
|
||||
@@ -199,7 +212,7 @@ namespace System.Drawing.Drawing2D {
|
||||
for (int i = 0; i < colors.Length; i++)
|
||||
blend [i] = colors [i].ToArgb ();
|
||||
|
||||
Status status = GDIPlus.GdipSetLinePresetBlend (nativeObject, blend, positions, count);
|
||||
Status status = GDIPlus.GdipSetLinePresetBlend (NativeBrush, blend, positions, count);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
@@ -207,7 +220,7 @@ namespace System.Drawing.Drawing2D {
|
||||
public Color [] LinearColors {
|
||||
get {
|
||||
int [] colors = new int [2];
|
||||
Status status = GDIPlus.GdipGetLineColors (nativeObject, colors);
|
||||
Status status = GDIPlus.GdipGetLineColors (NativeBrush, colors);
|
||||
GDIPlus.CheckStatus (status);
|
||||
Color [] linearColors = new Color [2];
|
||||
linearColors [0] = Color.FromArgb (colors [0]);
|
||||
@@ -217,7 +230,7 @@ namespace System.Drawing.Drawing2D {
|
||||
}
|
||||
set {
|
||||
// no null check, MS throws a NullReferenceException here
|
||||
Status status = GDIPlus.GdipSetLineColors (nativeObject, value [0].ToArgb (), value [1].ToArgb ());
|
||||
Status status = GDIPlus.GdipSetLineColors (NativeBrush, value [0].ToArgb (), value [1].ToArgb ());
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
@@ -231,7 +244,7 @@ namespace System.Drawing.Drawing2D {
|
||||
public Matrix Transform {
|
||||
get {
|
||||
Matrix matrix = new Matrix ();
|
||||
Status status = GDIPlus.GdipGetLineTransform (nativeObject, matrix.nativeMatrix);
|
||||
Status status = GDIPlus.GdipGetLineTransform (NativeBrush, matrix.nativeMatrix);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return matrix;
|
||||
@@ -240,7 +253,7 @@ namespace System.Drawing.Drawing2D {
|
||||
if (value == null)
|
||||
throw new ArgumentNullException ("Transform");
|
||||
|
||||
Status status = GDIPlus.GdipSetLineTransform (nativeObject, value.nativeMatrix);
|
||||
Status status = GDIPlus.GdipSetLineTransform (NativeBrush, value.nativeMatrix);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
@@ -248,7 +261,7 @@ namespace System.Drawing.Drawing2D {
|
||||
public WrapMode WrapMode {
|
||||
get {
|
||||
WrapMode wrapMode;
|
||||
Status status = GDIPlus.GdipGetLineWrapMode (nativeObject, out wrapMode);
|
||||
Status status = GDIPlus.GdipGetLineWrapMode (NativeBrush, out wrapMode);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return wrapMode;
|
||||
@@ -258,7 +271,7 @@ namespace System.Drawing.Drawing2D {
|
||||
if ((value < WrapMode.Tile) || (value > WrapMode.Clamp))
|
||||
throw new InvalidEnumArgumentException ("WrapMode");
|
||||
|
||||
Status status = GDIPlus.GdipSetLineWrapMode (nativeObject, value);
|
||||
Status status = GDIPlus.GdipSetLineWrapMode (NativeBrush, value);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
}
|
||||
@@ -275,13 +288,13 @@ namespace System.Drawing.Drawing2D {
|
||||
if (matrix == null)
|
||||
throw new ArgumentNullException ("matrix");
|
||||
|
||||
Status status = GDIPlus.GdipMultiplyLineTransform (nativeObject, matrix.nativeMatrix, order);
|
||||
Status status = GDIPlus.GdipMultiplyLineTransform (NativeBrush, matrix.nativeMatrix, order);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
public void ResetTransform ()
|
||||
{
|
||||
Status status = GDIPlus.GdipResetLineTransform (nativeObject);
|
||||
Status status = GDIPlus.GdipResetLineTransform (NativeBrush);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
@@ -292,7 +305,7 @@ namespace System.Drawing.Drawing2D {
|
||||
|
||||
public void RotateTransform (float angle, MatrixOrder order)
|
||||
{
|
||||
Status status = GDIPlus.GdipRotateLineTransform (nativeObject, angle, order);
|
||||
Status status = GDIPlus.GdipRotateLineTransform (NativeBrush, angle, order);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
@@ -303,7 +316,7 @@ namespace System.Drawing.Drawing2D {
|
||||
|
||||
public void ScaleTransform (float sx, float sy, MatrixOrder order)
|
||||
{
|
||||
Status status = GDIPlus.GdipScaleLineTransform (nativeObject, sx, sy, order);
|
||||
Status status = GDIPlus.GdipScaleLineTransform (NativeBrush, sx, sy, order);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
@@ -317,7 +330,7 @@ namespace System.Drawing.Drawing2D {
|
||||
if (focus < 0 || focus > 1 || scale < 0 || scale > 1)
|
||||
throw new ArgumentException ("Invalid parameter passed.");
|
||||
|
||||
Status status = GDIPlus.GdipSetLineLinearBlend (nativeObject, focus, scale);
|
||||
Status status = GDIPlus.GdipSetLineLinearBlend (NativeBrush, focus, scale);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
@@ -331,7 +344,7 @@ namespace System.Drawing.Drawing2D {
|
||||
if (focus < 0 || focus > 1 || scale < 0 || scale > 1)
|
||||
throw new ArgumentException ("Invalid parameter passed.");
|
||||
|
||||
Status status = GDIPlus.GdipSetLineSigmaBlend (nativeObject, focus, scale);
|
||||
Status status = GDIPlus.GdipSetLineSigmaBlend (NativeBrush, focus, scale);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
@@ -342,14 +355,14 @@ namespace System.Drawing.Drawing2D {
|
||||
|
||||
public void TranslateTransform (float dx, float dy, MatrixOrder order)
|
||||
{
|
||||
Status status = GDIPlus.GdipTranslateLineTransform (nativeObject, dx, dy, order);
|
||||
Status status = GDIPlus.GdipTranslateLineTransform (NativeBrush, dx, dy, order);
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
public override object Clone ()
|
||||
{
|
||||
IntPtr clonePtr;
|
||||
Status status = GDIPlus.GdipCloneBrush (nativeObject, out clonePtr);
|
||||
Status status = GDIPlus.GdipCloneBrush (NativeBrush, out clonePtr);
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
return new LinearGradientBrush (clonePtr);
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
//
|
||||
// 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
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
//
|
||||
// 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
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
//
|
||||
// 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 617 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user