mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 19:10:23 -10:00
Compare commits
167
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae23232f6a | ||
|
|
e69d4b57d7 | ||
|
|
fd9f379d29 | ||
|
|
e3084ecece | ||
|
|
da5b1c675d | ||
|
|
bef1e63358 | ||
|
|
56325f4097 | ||
|
|
c4a1b40fbd | ||
|
|
0c9250280d | ||
|
|
14aac0c541 | ||
|
|
a77128ca79 | ||
|
|
296a9afdb2 | ||
|
|
e59c3fbb68 | ||
|
|
062f0ab8ca | ||
|
|
e1ef774391 | ||
|
|
6d1f88e0ad | ||
|
|
a3f3bfc4c3 | ||
|
|
9bd3079f1c | ||
|
|
6ac1ff75a2 | ||
|
|
a119807a01 | ||
|
|
d234d34b70 | ||
|
|
444a9a3fc4 | ||
|
|
8946e49a97 | ||
|
|
5c784c9747 | ||
|
|
fdb704901e | ||
|
|
92a177923c | ||
|
|
1b2e536b22 | ||
|
|
ec4ef9bc34 | ||
|
|
cc8deca901 | ||
|
|
335f0109c5 | ||
|
|
90d6e496e4 | ||
|
|
4b60e7f930 | ||
|
|
989333d6ae | ||
|
|
baa12e5d24 | ||
|
|
ef75d4bef7 | ||
|
|
01dbbb746f | ||
|
|
51a3dc37da | ||
|
|
3eb5f34f54 | ||
|
|
b601371d5f | ||
|
|
6184ff007b | ||
|
|
8969f2cc99 | ||
|
|
3009440108 | ||
|
|
df5e13f95d | ||
|
|
11e1499c22 | ||
|
|
7dbad3c361 | ||
|
|
9a88a36789 | ||
|
|
0f241c975c | ||
|
|
7ebe1a1763 | ||
|
|
b759449ba8 | ||
|
|
617f399efc | ||
|
|
77258ea112 | ||
|
|
f83c321f88 | ||
|
|
1ecd094b44 | ||
|
|
54a33be9de | ||
|
|
72128bb00d | ||
|
|
65a972c033 | ||
|
|
9e6def1553 | ||
|
|
8a707cc012 | ||
|
|
bd72952cf8 | ||
|
|
b6efc0cc90 | ||
|
|
2869cd5f67 | ||
|
|
a64a25695d | ||
|
|
57f068438d | ||
|
|
528103728f | ||
|
|
d8441deead | ||
|
|
7ae0f38fd7 | ||
|
|
61ca7fe3a4 | ||
|
|
c99adb97ed | ||
|
|
6a8aced231 | ||
|
|
af008b207d | ||
|
|
6d40f13121 | ||
|
|
4546440471 | ||
|
|
4c31bdabf3 | ||
|
|
d73a286a2c | ||
|
|
dacef517fa | ||
|
|
d1ca1a5d2e | ||
|
|
1d55b355f3 | ||
|
|
bb522edb0d | ||
|
|
7f7b5c9f3e | ||
|
|
c87f99dd81 | ||
|
|
065499c2ef | ||
|
|
9f7b2c8d0a | ||
|
|
2c003ec71d | ||
|
|
e02e823ef7 | ||
|
|
70d6903053 | ||
|
|
4bff2b6370 | ||
|
|
81894ec8ca | ||
|
|
bfbf823ca1 | ||
|
|
ce01b20a4d | ||
|
|
7a587d7fa6 | ||
|
|
35e454a8f6 | ||
|
|
75eb342f53 | ||
|
|
5881981f79 | ||
|
|
6290b6cd6e | ||
|
|
a0e7f9eaf2 | ||
|
|
6275840a7f | ||
|
|
25f6093283 | ||
|
|
7ec17ba1be | ||
|
|
f755f3b539 | ||
|
|
5f9a2db39b | ||
|
|
f31f5ea1f1 | ||
|
|
20308e6f87 | ||
|
|
cecda47c48 | ||
|
|
824cc12ac3 | ||
|
|
b77dc06a7e | ||
|
|
1848d78d60 | ||
|
|
da0086e304 | ||
|
|
0297b21b03 | ||
|
|
40631e3b9e | ||
|
|
68b77674e2 | ||
|
|
4a0b4f41ed | ||
|
|
7a1f63fde6 | ||
|
|
29b1ac19c9 | ||
|
|
71e34edce2 | ||
|
|
1ecb6e59de | ||
|
|
17ba402d80 | ||
|
|
ded02bc115 | ||
|
|
585f244aed | ||
|
|
23cc371009 | ||
|
|
ce6fa810dd | ||
|
|
bff42f3540 | ||
|
|
076bab44f6 | ||
|
|
75f2ac15bd | ||
|
|
44e1854943 | ||
|
|
53cc8a61dc | ||
|
|
6717bcb8b6 | ||
|
|
d82d780e42 | ||
|
|
13bc35face | ||
|
|
8df98444c1 | ||
|
|
d63841057e | ||
|
|
dc98767858 | ||
|
|
472f0820d3 | ||
|
|
2ad05ee764 | ||
|
|
32ded2e340 | ||
|
|
d80d33b053 | ||
|
|
04c9f2f442 | ||
|
|
c0f0ff02fc | ||
|
|
a8c9ef3b66 | ||
|
|
31f480c436 | ||
|
|
6df5f69b26 | ||
|
|
94ec04bfdb | ||
|
|
a5184ed8ed | ||
|
|
4087eba140 | ||
|
|
2ef68dc530 | ||
|
|
64f9c2de6f | ||
|
|
2f373a9ad4 | ||
|
|
c51c60988b | ||
|
|
f333a19c3a | ||
|
|
abf46116ef | ||
|
|
ec590ad3eb | ||
|
|
dc534a8d3f | ||
|
|
835c26154c | ||
|
|
03be2643f5 | ||
|
|
f69128c70a | ||
|
|
ac12ebc375 | ||
|
|
595b7821e3 | ||
|
|
409c0a7c2d | ||
|
|
a9658665bf | ||
|
|
4fd89f9b11 | ||
|
|
0707345b89 | ||
|
|
0bb83d064d | ||
|
|
3115d3a0c0 | ||
|
|
8c27e2adf9 | ||
|
|
f8e9a15ed7 | ||
|
|
d1bd30f22d | ||
|
|
1c57af4dc0 | ||
|
|
85cecac278 |
No files matched your search
@@ -1,6 +1,3 @@
|
||||
# diff settings
|
||||
*.cs diff=csharp
|
||||
|
||||
# ensure LF endings on all checkouts
|
||||
configure.ac crlf=input
|
||||
config.rpath crlf=input
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ EXTRA_DIST= \
|
||||
external \
|
||||
mcs/class/referencesource
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_RUNTIME=false
|
||||
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
|
||||
|
||||
# Distribute the 'mcs' tree too
|
||||
GIT_DIR ?= $(srcdir)/.git
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"name": "roslyn",
|
||||
"url": "git://github.com/mono/roslyn.git",
|
||||
"rev": "7a840bd5697ef6ea41f554a09d837636fba9d88d",
|
||||
"rev": "6bfcd4e770609a38b8523e83ce1ec943162f30bb",
|
||||
"remote-branch": "origin/mono-testing",
|
||||
"branch": "mono-testing",
|
||||
"directory": "roslyn"
|
||||
|
||||
@@ -4014,24 +4014,42 @@ Global
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|net_4_x.Build.0 = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|net_4_x.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|net_4_x.Build.0 = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monodroid.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monodroid.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_tv.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_tv.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_watch.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_watch.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|orbis.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|orbis.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|unreal.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|unreal.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|wasm.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|wasm.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|winaot.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|winaot.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|xammac.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|xammac.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monodroid.ActiveCfg = Debug|monodroid
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monodroid.Build.0 = Debug|monodroid
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monodroid.ActiveCfg = Release|monodroid
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monodroid.Build.0 = Release|monodroid
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch.ActiveCfg = Debug|monotouch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch.Build.0 = Debug|monotouch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch.ActiveCfg = Release|monotouch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch.Build.0 = Release|monotouch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_tv.ActiveCfg = Debug|monotouch_tv
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_tv.Build.0 = Debug|monotouch_tv
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_tv.ActiveCfg = Release|monotouch_tv
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_tv.Build.0 = Release|monotouch_tv
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_watch.ActiveCfg = Debug|monotouch_watch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_watch.Build.0 = Debug|monotouch_watch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_watch.ActiveCfg = Release|monotouch_watch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_watch.Build.0 = Release|monotouch_watch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|orbis.ActiveCfg = Debug|orbis
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|orbis.Build.0 = Debug|orbis
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|orbis.ActiveCfg = Release|orbis
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|orbis.Build.0 = Release|orbis
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|unreal.ActiveCfg = Debug|unreal
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|unreal.Build.0 = Debug|unreal
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|unreal.ActiveCfg = Release|unreal
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|unreal.Build.0 = Release|unreal
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|wasm.ActiveCfg = Debug|wasm
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|wasm.Build.0 = Debug|wasm
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|wasm.ActiveCfg = Release|wasm
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|wasm.Build.0 = Release|wasm
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|winaot.ActiveCfg = Debug|winaot
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|winaot.Build.0 = Debug|winaot
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|winaot.ActiveCfg = Release|winaot
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|winaot.Build.0 = Release|winaot
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|xammac.ActiveCfg = Debug|xammac
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|xammac.Build.0 = Debug|xammac
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|xammac.ActiveCfg = Release|xammac
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|xammac.Build.0 = Release|xammac
|
||||
{7C660E7A-C89B-4ACA-9458-492B6D14B168}.Debug|net_4_x.ActiveCfg = Debug|net_4_x
|
||||
{7C660E7A-C89B-4ACA-9458-492B6D14B168}.Debug|net_4_x.Build.0 = Debug|net_4_x
|
||||
{7C660E7A-C89B-4ACA-9458-492B6D14B168}.Release|net_4_x.ActiveCfg = Release|net_4_x
|
||||
|
||||
+40
-71
@@ -4,7 +4,7 @@
|
||||
# This line is parsed by tools besides autoconf, such as msvc/mono.winconfig.targets.
|
||||
# It should remain in the format they expect.
|
||||
#
|
||||
AC_INIT(mono, [6.7.0],
|
||||
AC_INIT(mono, [6.6.0],
|
||||
[https://github.com/mono/mono/issues/new])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
@@ -62,7 +62,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
|
||||
# This line is parsed by tools besides autoconf, such as msvc/mono.winconfig.targets.
|
||||
# It should remain in the format they expect.
|
||||
#
|
||||
MONO_CORLIB_VERSION=69f9feb5-e6ef-4d90-8722-17346c85efb6
|
||||
MONO_CORLIB_VERSION=A144A63D-652C-4CCF-A9EE-8E5A091547F1
|
||||
|
||||
#
|
||||
# Put a quoted #define in config.h.
|
||||
@@ -1334,10 +1334,9 @@ with_wasm_default=no
|
||||
with_bitcode_default=no
|
||||
enable_cooperative_suspend_default=no
|
||||
enable_hybrid_suspend_default=no
|
||||
enable_copy_stack_data_default=yes
|
||||
|
||||
# For the sake of clearer error messages, these numbers should all be different from each other.
|
||||
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=10000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4400,nftnptr-arg-trampolines=4000
|
||||
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=10000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4400,nftnptr-arg-trampolines=4000,nrgctx-trampolines=21000
|
||||
|
||||
AOT_BUILD_ATTRS=$INVARIANT_AOT_OPTIONS
|
||||
|
||||
@@ -1360,7 +1359,6 @@ elif test x$with_runtime_preset = xnetcore; then
|
||||
mono_feature_disable_mdb='yes'
|
||||
mono_feature_disable_com='yes'
|
||||
mono_feature_disable_gac='yes'
|
||||
mono_feature_disable_perfcounters='yes'
|
||||
disable_mono_native=yes
|
||||
support_boehm=no
|
||||
elif test x$with_runtime_preset = xnet_4_x; then
|
||||
@@ -3393,13 +3391,29 @@ if test x$host_win32 = xno; then
|
||||
AC_CHECK_DECL(ICANON, [AC_DEFINE(HAVE_ICANON, 1, [ICANON])], [], [[#include <termios.h>]])
|
||||
AC_CHECK_DECL(TCSANOW, [AC_DEFINE(HAVE_TCSANOW, 1, [TCSANOW])], [], [[#include <termios.h>]])
|
||||
|
||||
AC_CHECK_MEMBER(struct stat.st_birthtimespec, [AC_DEFINE(HAVE_STAT_BIRTHTIME, 1, [struct stat.st_birthtime])], [], [[#include <sys/types.h>], [#include <sys/stat.h>]])
|
||||
AC_CHECK_MEMBER(struct stat.st_atimespec, [AC_DEFINE(HAVE_STAT_TIMESPEC, 1, [struct stat.st_atimespec])], [], [[#include <sys/types.h>], [#include <sys/stat.h>]])
|
||||
AC_CHECK_MEMBER(struct stat.st_atim, [AC_DEFINE(HAVE_STAT_TIM, 1, [struct stat.st_atim])], [], [[#include <sys/types.h>], [#include <sys/stat.h>]])
|
||||
AC_CHECK_MEMBER(struct stat.st_atimensec, [AC_DEFINE(HAVE_STAT_NSEC, 1, [struct stat.st_atimensec])], [], [[#include <sys/types.h>], [#include <sys/stat.h>]])
|
||||
AC_CHECK_MEMBER(struct dirent.d_namlen, [AC_DEFINE(HAVE_DIRENT_NAME_LEN, 1, [struct dirent.d_namlen])], [], [[#include <dirent.h>]])
|
||||
AC_CHECK_MEMBER(struct statfs.f_fstypename, [AC_DEFINE(HAVE_STATFS_FSTYPENAME, 1, [struct statfs.f_fstypename])], [], [[#include <sys/mount.h>]])
|
||||
AC_CHECK_MEMBER(struct statvfs.f_fstypename, [AC_DEFINE(HAVE_STATVFS_FSTYPENAME, 1, [struct statvfs.f_fstypename])], [], [[#include <sys/mount.h>]])
|
||||
AC_CHECK_MEMBER(struct stat.st_birthtimespec,
|
||||
[AC_DEFINE(HAVE_STAT_BIRTHTIME, 1, [struct stat.st_birthtimespec])],
|
||||
[],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBER(struct stat.st_atimespec,
|
||||
[AC_DEFINE(HAVE_STAT_TIMESPEC, 1, [struct stat.st_atimespec])],
|
||||
[],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBER(struct stat.st_atim,
|
||||
[AC_DEFINE(HAVE_STAT_TIM, 1, [struct stat.st_atim])],
|
||||
[],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBER(struct stat.st_atimensec,
|
||||
[AC_DEFINE(HAVE_STAT_NSEC, 1, [struct stat.st_atimensec])],
|
||||
[],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBER(struct dirent.d_namlen, [AC_DEFINE(HAVE_DIRENT_NAME_LEN, 1, [struct dirent.d_namlen])], [], [#include <dirent.h>])
|
||||
AC_CHECK_MEMBER(struct statfs.f_fstypename, [AC_DEFINE(HAVE_STATFS_FSTYPENAME, 1, [struct statfs.f_fstypename])], [], [#include <sys/mount.h>])
|
||||
AC_CHECK_MEMBER(struct statvfs.f_fstypename, [AC_DEFINE(HAVE_STATVFS_FSTYPENAME, 1, [struct statvfs.f_fstypename])], [], [#include <sys/mount.h>])
|
||||
|
||||
AC_MSG_CHECKING(for struct statfs)
|
||||
AC_TRY_COMPILE([
|
||||
@@ -3764,6 +3778,7 @@ if test x$host_win32 = xno; then
|
||||
AC_DEFINE(HAVE_GSSFW_HEADERS, 1, [GSS/GSS.h])
|
||||
AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM])
|
||||
enable_gss=yes
|
||||
AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
@@ -3775,6 +3790,7 @@ if test x$host_win32 = xno; then
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
enable_gss=yes
|
||||
AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
@@ -4284,7 +4300,6 @@ jit_wanted=true
|
||||
boehm_supported=true
|
||||
BTLS_SUPPORTED=no
|
||||
BTLS_PLATFORM=
|
||||
INTERP_CFLAGS=""
|
||||
|
||||
case "$host" in
|
||||
wasm32*)
|
||||
@@ -4294,10 +4309,6 @@ case "$host" in
|
||||
ACCESS_UNALIGNED="no"
|
||||
with_tls=pthread
|
||||
target_wasm=yes
|
||||
if test "x$mono_cv_clang" = "xyes"; then
|
||||
INTERP_CFLAGS="-mllvm -join-liveintervals=false"
|
||||
AC_SUBST(INTERP_CFLAGS)
|
||||
fi
|
||||
;;
|
||||
mips*)
|
||||
TARGET=MIPS;
|
||||
@@ -4613,6 +4624,7 @@ if test "x$host" != "x$target"; then
|
||||
aarch64*darwin*_ilp32)
|
||||
TARGET=ARM6432;
|
||||
AC_DEFINE(MONO_ARCH_ILP32, 1, [64 bit mode with 4 byte longs and pointers])
|
||||
sizeof_register=8
|
||||
AC_DEFINE(TARGET_WATCHOS, 1, [...])
|
||||
;;
|
||||
aarch64-*)
|
||||
@@ -5663,38 +5675,6 @@ AM_CONDITIONAL([ENABLE_HYBRID_SUSPEND], [test x$enable_hybrid_suspend != xno])
|
||||
|
||||
dnl End of thread suspend policy
|
||||
|
||||
dnl *******************************
|
||||
dnl *** Copy stack data support ***
|
||||
dnl *******************************
|
||||
|
||||
dnl Disable copy_stack_data on platforms supporting full context and
|
||||
dnl having access to full stack of running threads.
|
||||
if test x$enable_copy_stack_data_default != xno; then
|
||||
case $HOST in
|
||||
X86 | AMD64)
|
||||
if test x$target_osx = xyes; then
|
||||
dnl Some host/target confusion, there's no host_osx (and
|
||||
dnl host_darwin would be true on iOS not just macOS).
|
||||
enable_copy_stack_data_default=no
|
||||
elif test x$host_linux = xyes -o x$host_win32 = xyes; then
|
||||
enable_copy_stack_data_default=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(copy_stack_data, [ --enable-copy-stack-data Enable copy_stack_data feature for hybrid/cooperative suspend scenarios, (defaults to yes)], [], [enable_copy_stack_data=default])
|
||||
|
||||
if test x$enable_copy_stack_data = xdefault; then
|
||||
enable_copy_stack_data=$enable_copy_stack_data_default
|
||||
fi
|
||||
|
||||
if test x$enable_copy_stack_data != xno ; then
|
||||
AC_DEFINE(ENABLE_COPY_STACK_DATA,1,[Enable copy_stack_data feature for hybrid/cooperative suspend scenarios])
|
||||
fi
|
||||
|
||||
dnl End of Copy stack data support
|
||||
|
||||
dnl ***************************
|
||||
dnl *** feature experiments ***
|
||||
dnl ***************************
|
||||
@@ -6046,8 +6026,8 @@ fi
|
||||
AC_SUBST(mono_runtime)
|
||||
AC_SUBST(mono_runtime_wrapper)
|
||||
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.3.0/csc.exe
|
||||
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.3.0/VBCSCompiler.exe
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/csc.exe
|
||||
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.4.0/VBCSCompiler.exe
|
||||
|
||||
if test $csc_compiler = mcs; then
|
||||
CSC=$mcs_topdir/class/lib/build/mcs.exe
|
||||
@@ -6413,7 +6393,11 @@ elif test x$host_linux = xyes; then
|
||||
MONO_NATIVE_CXXFLAGS=$CXXFLAGS
|
||||
MONO_NATIVE_CFLAGS=$CFLAGS
|
||||
MONO_NATIVE_LDFLAGS=$LDFLAGS
|
||||
|
||||
if test x$enable_gss = xyes; then
|
||||
MONO_NATIVE_LDFLAGS="$MONO_NATIVE_LDFLAGS -lgssapi_krb5"
|
||||
else
|
||||
AC_MSG_WARN([GSS is not enabled, it requires libkrb5-dev package])
|
||||
fi
|
||||
mono_native=yes
|
||||
mono_native_compat=no
|
||||
MONO_NATIVE_PLATFORM=linux
|
||||
@@ -6483,22 +6467,6 @@ elif case $host_os in freebsd*) true;; *) false;; esac; then
|
||||
AC_MSG_RESULT(freebsd)
|
||||
|
||||
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_FREEBSD"
|
||||
elif case $host_os in netbsd*) true;; *) false;; esac; then
|
||||
mono_native_text="NetBSD"
|
||||
MONO_NATIVE_CC=$CC
|
||||
MONO_NATIVE_CXX=$CXX
|
||||
MONO_NATIVE_CPPFLAGS=$CPPFLAGS
|
||||
MONO_NATIVE_CXXFLAGS=$CXXFLAGS
|
||||
MONO_NATIVE_CFLAGS=$CFLAGS
|
||||
MONO_NATIVE_LDFLAGS=$LDFLAGS
|
||||
|
||||
mono_native=yes
|
||||
mono_native_compat=no
|
||||
MONO_NATIVE_PLATFORM=netbsd
|
||||
AC_MSG_CHECKING([Mono.Native support])
|
||||
AC_MSG_RESULT(netbsd)
|
||||
|
||||
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_NETBSD"
|
||||
elif case $host_os in haiku*) true;; *) false;; esac; then
|
||||
mono_native_text="Haiku"
|
||||
MONO_NATIVE_CC=$CC
|
||||
@@ -6572,7 +6540,6 @@ AM_CONDITIONAL(MONO_NATIVE_PLATFORM_LINUX, test x$MONO_NATIVE_PLATFORM = xlinux)
|
||||
AM_CONDITIONAL(MONO_NATIVE_PLATFORM_AIX, test x$MONO_NATIVE_PLATFORM = xaix)
|
||||
AM_CONDITIONAL(MONO_NATIVE_PLATFORM_ANDROID, test x$MONO_NATIVE_PLATFORM = xandroid)
|
||||
AM_CONDITIONAL(MONO_NATIVE_PLATFORM_FREEBSD, test x$MONO_NATIVE_PLATFORM = xfreebsd)
|
||||
AM_CONDITIONAL(MONO_NATIVE_PLATFORM_NETBSD, test x$MONO_NATIVE_PLATFORM = xnetbsd)
|
||||
AM_CONDITIONAL(MONO_NATIVE_PLATFORM_HAIKU, test x$MONO_NATIVE_PLATFORM = xhaiku)
|
||||
|
||||
MONO_NATIVE_PLATFORM_TYPE_COMPAT="$MONO_NATIVE_PLATFORM_TYPE | MONO_NATIVE_PLATFORM_TYPE_COMPAT"
|
||||
@@ -6653,10 +6620,10 @@ fi
|
||||
#
|
||||
AC_MSG_CHECKING([for large file support])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE([
|
||||
[
|
||||
#include <sys/types.h>
|
||||
off64_t dummy = 0;
|
||||
])], [
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
# FIXME The ramifications of _LARGEFILE64_SOURCE are not understood.
|
||||
# ZLIB_CFLAGS="$ZLIB_CFLAGS -D_LARGEFILE64_SOURCE=1"
|
||||
@@ -6832,7 +6799,9 @@ fi
|
||||
echo "sysconfdir=$sysconfdir" >> $mcs_topdir/build/config.make
|
||||
echo 'mono_libdir=${exec_prefix}/lib' >> $mcs_topdir/build/config.make
|
||||
echo "mono_build_root=$mono_build_root" >> $mcs_topdir/build/config.make
|
||||
echo 'IL_FLAGS = /debug' >> $mcs_topdir/build/config.make
|
||||
echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $mcs_topdir/build/config.make
|
||||
echo "ILDISASM = $mono_build_root/runtime/monodis-wrapper" >> $mcs_topdir/build/config.make
|
||||
echo "JAY_CFLAGS = $JAY_CFLAGS" >> $mcs_topdir/build/config.make
|
||||
echo "VERSION = $VERSION" >> $mcs_topdir/build/config.make
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Dependencies>
|
||||
<ProductDependencies>
|
||||
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="5.0.0-alpha1.19409.2">
|
||||
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="5.0.0-alpha1.19375.11">
|
||||
<Uri>https://github.com/dotnet/corefx</Uri>
|
||||
<Sha>719b8fb635db44ba80ea6d5f2e7effaf5906f588</Sha>
|
||||
<Sha>97d5957fc71853961082e22873d926269b291b92</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App" Version="5.0.0-alpha1.19409.2">
|
||||
<Dependency Name="Microsoft.NETCore.App" Version="5.0.0-alpha1.19375.9">
|
||||
<Uri>https://github.com/dotnet/core-setup</Uri>
|
||||
<Sha>cd732014d34f3b72375115e78f84c4617bce6b48</Sha>
|
||||
<Sha>2977763fd35b8dc120f4eac94314aba7b05ae9ee</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Net.Compilers" Version="3.3.0-beta2-19381-14">
|
||||
<Uri>https://github.com/dotnet/roslyn</Uri>
|
||||
|
||||
+2
-2
@@ -5,9 +5,9 @@
|
||||
<PreReleaseVersionLabel>prerelease</PreReleaseVersionLabel>
|
||||
<!-- Package versions -->
|
||||
<!-- corefx -->
|
||||
<MicrosoftPrivateCoreFxNETCoreAppVersion>5.0.0-alpha1.19409.2</MicrosoftPrivateCoreFxNETCoreAppVersion>
|
||||
<MicrosoftPrivateCoreFxNETCoreAppVersion>5.0.0-alpha1.19375.11</MicrosoftPrivateCoreFxNETCoreAppVersion>
|
||||
<!-- core-setup -->
|
||||
<MicrosoftNETCoreAppVersion>5.0.0-alpha1.19409.2</MicrosoftNETCoreAppVersion>
|
||||
<MicrosoftNETCoreAppVersion>5.0.0-alpha1.19375.9</MicrosoftNETCoreAppVersion>
|
||||
<!-- roslyn -->
|
||||
<MicrosoftNetCompilersVersion>3.3.0-beta2-19374-02</MicrosoftNetCompilersVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: 720f61ffc7...7753b25789.
Vendored
+1
-1
Submodule external/binary-reference-assemblies updated: e5173a5531...4e3d4446a3.
Vendored
+1
-1
Submodule external/bockbuild updated: 1d8d36b67c...bbd846a104.
Vendored
+1
-1
Submodule external/corefx updated: 33308c540f...ce3063888d.
Vendored
+1
-1
Submodule external/ikvm updated: 847e05fced...9f805dcf8a.
Vendored
+1
-1
Submodule external/roslyn-binaries updated: 17479f9636...419b2452de.
@@ -693,6 +693,8 @@ compiler so that csc can be used.
|
||||
|
||||
Always use `/r:foo.dll`, not `/r:foo`. Windows requires the former.
|
||||
|
||||
Use `/r:$(corlib)`, not `/r:corlib`.
|
||||
|
||||
If you're writing shell script code as part of a make rule, remember
|
||||
that Windows has command-line length limits. So something like
|
||||
|
||||
|
||||
@@ -11,6 +11,14 @@ PLATFORM_RUNTIME
|
||||
The system runtime for executing CLR programs. Blank on Win32,
|
||||
probably $(RUNTIME) (the Mono runtime) on everything else.
|
||||
|
||||
PLATFORM_CORLIB
|
||||
The name of the system's corlib. 'mscorlib.dll'
|
||||
|
||||
PLATFORM_MAKE_CORLIB_CMP
|
||||
Define it to something nonempty if corlib_cmp.dll should be built
|
||||
on this platform. Only should be done if the platform provides its
|
||||
own non-Mono runtime that we can compare corlibs with.
|
||||
|
||||
PLATFORM_TWEAK_CORLIB_SOURCES
|
||||
A command to futz around with the sources to mscorlib.dll. See linux.make
|
||||
and win32.make for examples. Should be 'cat' unless you know what you're
|
||||
|
||||
@@ -21,6 +21,7 @@ TEST_HARNESS = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/$(PARENT_PROFILE)nunit-l
|
||||
PLATFORM_DEBUG_FLAGS = /debug:portable
|
||||
# Workaround for https://bugzilla.xamarin.com/show_bug.cgi?id=59967
|
||||
MCS_FLAGS = /features:peverify-compat /langversion:latest
|
||||
MBAS_FLAGS = -debug
|
||||
LIBRARY_FLAGS =
|
||||
ifndef CFLAGS
|
||||
CFLAGS = -g -O2
|
||||
@@ -40,6 +41,7 @@ TEST_RUNTIME = MONO_PATH="$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH
|
||||
# keep track of the default value
|
||||
|
||||
DEFAULT_MCS_FLAGS := $(MCS_FLAGS)
|
||||
DEFAULT_MBAS_FLAGS := $(MBAS_FLAGS)
|
||||
DEFAULT_PROFILE := net_4_x
|
||||
|
||||
# You shouldn't need to set these but might on a
|
||||
|
||||
@@ -5,12 +5,20 @@
|
||||
|
||||
PLATFORM_MCS_FLAGS =
|
||||
PLATFORM_RUNTIME = $(RUNTIME)
|
||||
PLATFORM_CORLIB = mscorlib.dll
|
||||
PLATFORM_TEST_HARNESS_EXCLUDES =
|
||||
|
||||
EXTERNAL_MCS = mcs
|
||||
EXTERNAL_MBAS = mbas
|
||||
EXTERNAL_RUNTIME = mono
|
||||
#ILDISASM = monodis
|
||||
ILDISASM = false
|
||||
|
||||
PLATFORM_PATH_SEPARATOR = :
|
||||
|
||||
# Define this if this ever will work on Linux
|
||||
# PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
|
||||
# This is for changing / to \ on windows
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD = cat
|
||||
|
||||
@@ -19,3 +27,12 @@ hidden_suffix =
|
||||
|
||||
platform-check:
|
||||
@:
|
||||
# I tried this but apparently Make's version strings aren't that
|
||||
# ... consistent between releases. Whatever.
|
||||
#
|
||||
# @if ! $(MAKE) --version |grep '^GNU Make version 3' 1>/dev/null 2>&1 ; then \
|
||||
# echo "*** You need to build MCS with GNU make. Try \`gmake'" ; \
|
||||
# exit 1 ; \
|
||||
# fi
|
||||
|
||||
PLATFORM_LINUX=1
|
||||
@@ -5,12 +5,20 @@
|
||||
|
||||
PLATFORM_MCS_FLAGS =
|
||||
PLATFORM_RUNTIME = $(RUNTIME)
|
||||
PLATFORM_CORLIB = mscorlib.dll
|
||||
PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac
|
||||
|
||||
EXTERNAL_MCS = mcs
|
||||
EXTERNAL_MBAS = mbas
|
||||
EXTERNAL_RUNTIME = mono
|
||||
#ILDISASM = monodis
|
||||
ILDISASM = false
|
||||
|
||||
PLATFORM_PATH_SEPARATOR = :
|
||||
|
||||
# Define this if this ever will work on Linux
|
||||
# PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
|
||||
# This is for changing / to \ on windows
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD = cat
|
||||
|
||||
@@ -19,3 +27,12 @@ hidden_suffix =
|
||||
|
||||
platform-check:
|
||||
@:
|
||||
# I tried this but apparently Make's version strings aren't that
|
||||
# ... consistent between releases. Whatever.
|
||||
#
|
||||
# @if ! $(MAKE) --version |grep '^GNU Make version 3' 1>/dev/null 2>&1 ; then \
|
||||
# echo "*** You need to build MCS with GNU make. Try \`gmake'" ; \
|
||||
# exit 1 ; \
|
||||
# fi
|
||||
|
||||
PLATFORM_MACOS=1
|
||||
@@ -5,12 +5,20 @@
|
||||
|
||||
PLATFORM_MCS_FLAGS =
|
||||
PLATFORM_RUNTIME = $(RUNTIME)
|
||||
PLATFORM_CORLIB = mscorlib.dll
|
||||
PLATFORM_TEST_HARNESS_EXCLUDES =
|
||||
|
||||
EXTERNAL_MCS = mcs
|
||||
EXTERNAL_MBAS = mbas
|
||||
EXTERNAL_RUNTIME = mono
|
||||
#ILDISASM = monodis
|
||||
ILDISASM = false
|
||||
|
||||
PLATFORM_PATH_SEPARATOR = :
|
||||
|
||||
# Define this if this ever will work on Unix
|
||||
# PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
|
||||
# This is for changing / to \ on windows
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD = cat
|
||||
|
||||
@@ -19,3 +27,13 @@ hidden_suffix =
|
||||
|
||||
platform-check:
|
||||
@:
|
||||
# I tried this but apparently Make's version strings aren't that
|
||||
# ... consistent between releases. Whatever.
|
||||
#
|
||||
# @if ! $(MAKE) --version |grep '^GNU Make version 3' 1>/dev/null 2>&1 ; then \
|
||||
# echo "*** You need to build MCS with GNU make. Try \`gmake'" ; \
|
||||
# exit 1 ; \
|
||||
# fi
|
||||
|
||||
|
||||
PLATFORM_UNIX=1
|
||||
@@ -5,10 +5,21 @@
|
||||
|
||||
PLATFORM_MCS_FLAGS =
|
||||
PLATFORM_RUNTIME =
|
||||
PLATFORM_CORLIB = mscorlib.dll
|
||||
PLATFORM_TEST_HARNESS_EXCLUDES = NotOnWindows
|
||||
|
||||
EXTERNAL_MCS = mcs
|
||||
EXTERNAL_MBAS = vbc.exe
|
||||
EXTERNAL_RUNTIME = mono
|
||||
|
||||
# Disabled since it needs the SDK
|
||||
#ILDISASM = ildasm.exe /test
|
||||
|
||||
#ILDISASM = monodis.bat
|
||||
## Gross hack
|
||||
ILDISASM = $(topdir)/../mono/mono/dis/monodis
|
||||
|
||||
PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD=tr '/' '\\\\'
|
||||
PLATFORM_PATH_SEPARATOR = ;
|
||||
|
||||
@@ -20,3 +31,4 @@ hidden_suffix = .tmp
|
||||
platform-check:
|
||||
@:
|
||||
|
||||
PLATFORM_WIN32=1
|
||||
@@ -35,8 +35,9 @@ MOBILE_DYNAMIC = yes
|
||||
MOBILE_PROFILE = yes
|
||||
NO_CONSOLE = yes
|
||||
|
||||
ifeq ($(HOST_PLATFORM),win32)
|
||||
ifdef PLATFORM_WIN32
|
||||
PROFILE_MCS_FLAGS += -d:MOBILE_DESKTOP_HOST -d:WIN_PLATFORM
|
||||
endif
|
||||
ENABLE_GSS=1
|
||||
|
||||
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS InetAccess AndroidNotWorking
|
||||
@@ -7,6 +7,8 @@ MCS = $(BOOTSTRAP_MCS)
|
||||
|
||||
PLATFORMS = macos linux win32 unix
|
||||
|
||||
# nuttzing!
|
||||
|
||||
profile-check:
|
||||
@:
|
||||
|
||||
@@ -19,7 +21,11 @@ XBUILD_VERSION = 4.0
|
||||
|
||||
ENFORCE_LIBRARY_WARN_AS_ERROR = yes
|
||||
|
||||
ifeq ($(HOST_PLATFORM),macos)
|
||||
ifdef PLATFORM_MACOS
|
||||
MONO_FEATURE_APPLETLS=1
|
||||
ENABLE_GSS=1
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_PLATFORM),linux)
|
||||
ENABLE_GSS=1
|
||||
endif
|
||||
@@ -42,9 +42,11 @@ COMPILER_SERVER_ARGS = $(if $(findstring 1,$(ENABLE_COMPILER_SERVER)),$(COMPILER
|
||||
CSC_LOCATION = $(if $(findstring 1,$(ENABLE_COMPILER_SERVER)),$(SERVER_CSC_LOCATION),$(STANDALONE_CSC_LOCATION))
|
||||
|
||||
USE_MCS_FLAGS = $(COMPILER_SERVER_ARGS) /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
USE_MBAS_FLAGS = $(COMPILER_SERVER_ARGS) /codepage:$(CODEPAGE) $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS)
|
||||
USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS) $(CPPFLAGS)
|
||||
CSCOMPILE = $(Q_MCS) $(MCS) $(USE_MCS_FLAGS)
|
||||
CSC_RUNTIME_FLAGS = --aot-path=$(abspath $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)) --gc-params=nursery-size=64m --clr-memory-model
|
||||
BASCOMPILE = $(MBAS) $(USE_MBAS_FLAGS)
|
||||
CCOMPILE = $(CC) $(USE_CFLAGS)
|
||||
BOOT_COMPILE = $(Q_MCS) $(BOOTSTRAP_MCS) $(USE_MCS_FLAGS)
|
||||
INSTALL = $(SHELL) $(topdir)/../mono/install-sh
|
||||
@@ -52,6 +54,7 @@ INSTALL_DATA = $(INSTALL) -c -m 644
|
||||
INSTALL_BIN = $(INSTALL) -c -m 755
|
||||
INSTALL_LIB = $(INSTALL_BIN)
|
||||
MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs
|
||||
INTERNAL_MBAS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/mbas/mbas.exe
|
||||
INTERNAL_CSC_LOCATION = $(CSC_LOCATION)
|
||||
|
||||
# Using CSC_SDK_PATH_DISABLED for sanity check that all references have path specified
|
||||
@@ -97,6 +100,9 @@ include $(topdir)/build/platforms/$(BUILD_PLATFORM).make
|
||||
PROFILE_PLATFORM = $(if $(PLATFORMS),$(if $(filter $(PLATFORMS),$(HOST_PLATFORM)),$(HOST_PLATFORM),$(error Unknown platform "$(HOST_PLATFORM)" for profile "$(PROFILE)")))
|
||||
PROFILE_DIRECTORY = $(PROFILE)$(if $(PROFILE_PLATFORM),-$(PROFILE_PLATFORM))
|
||||
|
||||
ifdef PLATFORM_CORLIB
|
||||
corlib = $(PLATFORM_CORLIB)
|
||||
endif
|
||||
# Useful
|
||||
|
||||
ifeq ($(PLATFORM_RUNTIME),$(RUNTIME))
|
||||
|
||||
@@ -128,7 +128,7 @@ $(test_nunit_dep): $(topdir)/build/deps/nunit-$(PROFILE).stamp
|
||||
@if test -f $@; then :; else rm -f $<; $(MAKE) $<; fi
|
||||
|
||||
$(topdir)/build/deps/nunit-$(PROFILE).stamp:
|
||||
cd ${topdir}/tools/nunit-lite && $(MAKE)
|
||||
$(MAKE) -C ${topdir}/tools/nunit-lite
|
||||
echo "stamp" >$@
|
||||
|
||||
tests_CLEAN_FILES += $(topdir)/build/deps/nunit-$(PROFILE).stamp
|
||||
@@ -378,5 +378,3 @@ $(xtest_makefrag): $(xtest_response)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: patch-nunitlite-appconfig
|
||||
@@ -38,7 +38,7 @@ doc-update-recursive:
|
||||
@echo "do not recurse the Facades folder"
|
||||
|
||||
System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Numerics.Vectors System.Runtime.Serialization System.Transactions System.Xml \
|
||||
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.IO.Compression.FileSystem System.Runtime.InteropServices.RuntimeInformation \
|
||||
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.Data.DataSetExtensions System.IO.Compression.FileSystem System.Runtime.InteropServices.RuntimeInformation \
|
||||
System.ServiceProcess System.Security System.Net.Http.WebRequest System.Net.Http System.ServiceProcess System.IO.Compression System.IdentityModel System.Web \
|
||||
Facades/System.Drawing.Primitives Facades/System.Drawing.Common System.Drawing System.Web.Services:
|
||||
|
||||
|
||||
@@ -29,72 +29,72 @@
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
|
||||
<OutputPath>./../../../class/lib/monodroid/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
|
||||
<OutputPath>./../../../class/lib/monotouch/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' ">
|
||||
<OutputPath>./../../../class/lib/monotouch_watch/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_tv' ">
|
||||
<OutputPath>./../../../class/lib/monotouch_tv/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full_interp' ">
|
||||
<OutputPath>./../../../class/lib/testing_aot_full_interp/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_hybrid' ">
|
||||
<OutputPath>./../../../class/lib/testing_aot_hybrid/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
|
||||
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
|
||||
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_COM;WIN_PLATFORM;WINAOT;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_COM;WIN_PLATFORM;WINAOT;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_winaot_interp' ">
|
||||
<OutputPath>./../../../class/lib/testing_winaot_interp/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_COM;WIN_PLATFORM;WINAOT;FULL_AOT_INTERP;DISABLE_SECURITY;DISABLE_REMOTING</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_COM;WIN_PLATFORM;WINAOT;FULL_AOT_INTERP;DISABLE_SECURITY;DISABLE_REMOTING;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
|
||||
<OutputPath>./../../../class/lib/xammac/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac_net_4_5' ">
|
||||
<OutputPath>./../../../class/lib/xammac_net_4_5/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN</DefineConstants>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'orbis' ">
|
||||
<OutputPath>./../../../class/lib/orbis/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_COM</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_COM;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'unreal' ">
|
||||
<OutputPath>./../../../class/lib/unreal/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'wasm' ">
|
||||
<OutputPath>./../../../class/lib/wasm/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_COM;FEATURE_NO_BSD_SOCKETS;DISABLE_REMOTING;DISABLE_SECURITY</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_COM;FEATURE_NO_BSD_SOCKETS;DISABLE_REMOTING;DISABLE_SECURITY;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- @ALL_PROFILE_PROPERTIES@ -->
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
|
||||
@@ -13,7 +13,7 @@ KEYFILE = ../../Open.snk
|
||||
LIBRARY_SNK = $(KEYFILE)
|
||||
SIGN_FLAGS = /delaysign /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS) -d:FEATURE_TYPECONVERTER
|
||||
|
||||
ifneq (,$(filter build net_4_x, $(PROFILE)))
|
||||
$(error This profile shouldn't build System.Drawing.Common.dll, it already has System.Drawing.dll)
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
<ProjectReference Include="../../System.Transactions/System.Transactions.csproj" />
|
||||
<ProjectReference Include="../../System.Runtime.Serialization/System.Runtime.Serialization.csproj" />
|
||||
<ProjectReference Include="../../System.Data/System.Data.csproj" />
|
||||
<ProjectReference Include="../../System.Data.DataSetExtensions/System.Data.DataSetExtensions.csproj" />
|
||||
<ProjectReference Include="../../corlib/corlib.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
|
||||
|
||||
@@ -22,13 +22,13 @@ ifeq ($(PROFILE),build)
|
||||
LIB_MCS_FLAGS += -d:SYSTEM_WEB_IMPLEMENTATION
|
||||
else ifeq ($(PROFILE),wasm)
|
||||
LIB_MCS_FLAGS += -d:SYSTEM_WEB_IMPLEMENTATION -unsafe
|
||||
LIB_REFS += System.Transactions System.Runtime.Serialization System.Data
|
||||
LIB_REFS += System.Transactions System.Runtime.Serialization System.Data System.Data.DataSetExtensions
|
||||
else ifeq ($(PROFILE),xammac_net_4_5)
|
||||
LIB_REFS += System.Web.Services System.Transactions System.Runtime.Serialization System.Data
|
||||
LIB_REFS += System.Web.Services System.Transactions System.Runtime.Serialization System.Data System.Data.DataSetExtensions
|
||||
else ifeq (2.1, $(FRAMEWORK_VERSION))
|
||||
LIB_REFS += System.Web.Services System.Transactions System.Runtime.Serialization System.Data
|
||||
LIB_REFS += System.Web.Services System.Transactions System.Runtime.Serialization System.Data System.Data.DataSetExtensions
|
||||
else
|
||||
LIB_REFS += System.Web System.Transactions System.Runtime.Serialization System.Data
|
||||
LIB_REFS += System.Web System.Transactions System.Runtime.Serialization System.Data System.Data.DataSetExtensions
|
||||
endif
|
||||
|
||||
ifneq (,$(filter build net_4_x, $(PROFILE)))
|
||||
|
||||
@@ -764,6 +764,16 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlTypeException))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlXml))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.StorageState))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowComparer))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowComparer<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataTableExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.EnumerableRowCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.EnumerableRowCollection<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.EnumerableRowCollectionExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.OrderedEnumerableRowCollection<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.TypedTableBase<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.TypedTableBaseExtensions))]
|
||||
#endif
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.BooleanSwitch))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.ConditionalAttribute))]
|
||||
@@ -821,6 +831,15 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.TraceSwitch))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.SuppressMessageAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.AllowNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DisallowNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.MaybeNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullWhenAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.Contract))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.ContractAbbreviatorAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.ContractArgumentValidatorAttribute))]
|
||||
@@ -2443,6 +2462,9 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySpanAction<,>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequence<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequenceSegment<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ArrayBufferWriter<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.SequenceReader<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.SequenceReaderExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.SpanAction<,>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.StandardFormat))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Binary.BinaryPrimitives))]
|
||||
|
||||
@@ -77,6 +77,7 @@ mobile_common_dirs_parallel := \
|
||||
System.Numerics \
|
||||
System.Numerics.Vectors \
|
||||
System.Data \
|
||||
System.Data.DataSetExtensions \
|
||||
Mono.Data.Sqlite \
|
||||
System.Data.Services.Client \
|
||||
System.IO.Compression \
|
||||
@@ -179,6 +180,7 @@ wasm_dirs_parallel := \
|
||||
System.ServiceModel.Internals \
|
||||
System.Runtime.Serialization \
|
||||
System.Data \
|
||||
System.Data.DataSetExtensions \
|
||||
System.Xml.Linq \
|
||||
System.Numerics \
|
||||
System.Numerics.Vectors \
|
||||
@@ -213,6 +215,7 @@ xammac_4_5_dirs_parallel := \
|
||||
System.Transactions \
|
||||
System.EnterpriseServices \
|
||||
System.Data \
|
||||
System.Data.DataSetExtensions \
|
||||
System.Runtime.Serialization \
|
||||
System.Xml.Linq \
|
||||
Mono.Data.Sqlite \
|
||||
|
||||
@@ -307,8 +307,15 @@ namespace Mono.Debugger.Soft
|
||||
public bool Subclasses {
|
||||
get; set;
|
||||
}
|
||||
public bool NotFilteredFeature {
|
||||
get; set;
|
||||
}
|
||||
public bool EverythingElse {
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AssemblyModifier : Modifier {
|
||||
public long[] Assemblies {
|
||||
get; set;
|
||||
@@ -429,7 +436,7 @@ namespace Mono.Debugger.Soft
|
||||
* with newer runtimes, and vice versa.
|
||||
*/
|
||||
internal const int MAJOR_VERSION = 2;
|
||||
internal const int MINOR_VERSION = 53;
|
||||
internal const int MINOR_VERSION = 54;
|
||||
|
||||
enum WPSuspendPolicy {
|
||||
NONE = 0,
|
||||
@@ -1311,6 +1318,8 @@ namespace Mono.Debugger.Soft
|
||||
protected abstract int TransportSend (byte[] buf, int buf_offset, int len);
|
||||
protected abstract void TransportSetTimeouts (int send_timeout, int receive_timeout);
|
||||
protected abstract void TransportClose ();
|
||||
// Shutdown breaks all communication, resuming blocking waits
|
||||
protected abstract void TransportShutdown ();
|
||||
|
||||
internal VersionInfo Version;
|
||||
|
||||
@@ -1427,6 +1436,7 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
internal void Close () {
|
||||
closed = true;
|
||||
TransportShutdown ();
|
||||
}
|
||||
|
||||
internal bool IsClosed {
|
||||
@@ -2632,6 +2642,10 @@ namespace Mono.Debugger.Soft
|
||||
} else if (!em.Subclasses) {
|
||||
throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
|
||||
}
|
||||
if (Version.MajorVersion > 2 || Version.MinorVersion >= 54) {
|
||||
w.WriteBool (em.NotFilteredFeature);
|
||||
w.WriteBool (em.EverythingElse);
|
||||
}
|
||||
} else if (mod is AssemblyModifier) {
|
||||
w.WriteByte ((byte)ModifierKind.ASSEMBLY_ONLY);
|
||||
var amod = (mod as AssemblyModifier);
|
||||
@@ -2854,6 +2868,11 @@ namespace Mono.Debugger.Soft
|
||||
{
|
||||
socket.Close ();
|
||||
}
|
||||
|
||||
protected override void TransportShutdown ()
|
||||
{
|
||||
socket.Shutdown (SocketShutdown.Both);
|
||||
}
|
||||
}
|
||||
|
||||
/* This is the interface exposed by the debugger towards the debugger agent */
|
||||
|
||||
@@ -6,9 +6,9 @@ namespace Mono.Debugger.Soft
|
||||
public sealed class ExceptionEventRequest : EventRequest {
|
||||
|
||||
TypeMirror exc_type;
|
||||
bool caught, uncaught, subclasses;
|
||||
bool caught, uncaught, subclasses, not_filtered_feature, everything_else;
|
||||
|
||||
internal ExceptionEventRequest (VirtualMachine vm, TypeMirror exc_type, bool caught, bool uncaught) : base (vm, EventType.Exception) {
|
||||
internal ExceptionEventRequest (VirtualMachine vm, TypeMirror exc_type, bool caught, bool uncaught, bool not_filtered_feature = false, bool everything_else = false) : base (vm, EventType.Exception) {
|
||||
if (exc_type != null) {
|
||||
CheckMirror (vm, exc_type);
|
||||
TypeMirror exception_type = vm.RootDomain.Corlib.GetType ("System.Exception", false, false);
|
||||
@@ -19,6 +19,8 @@ namespace Mono.Debugger.Soft
|
||||
this.caught = caught;
|
||||
this.uncaught = uncaught;
|
||||
this.subclasses = true;
|
||||
this.not_filtered_feature = not_filtered_feature;
|
||||
this.everything_else = everything_else;
|
||||
}
|
||||
|
||||
public TypeMirror ExceptionType {
|
||||
@@ -41,7 +43,7 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
public override void Enable () {
|
||||
var mods = new List <Modifier> ();
|
||||
mods.Add (new ExceptionModifier () { Type = exc_type != null ? exc_type.Id : 0, Caught = caught, Uncaught = uncaught, Subclasses = subclasses });
|
||||
mods.Add (new ExceptionModifier () { Type = exc_type != null ? exc_type.Id : 0, Caught = caught, Uncaught = uncaught, Subclasses = subclasses, NotFilteredFeature = not_filtered_feature, EverythingElse = everything_else });
|
||||
SendReq (mods);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,8 +150,11 @@ namespace Mono.Debugger.Soft
|
||||
}
|
||||
|
||||
public void Detach () {
|
||||
conn.Close ();
|
||||
// Notify the application that we are detaching
|
||||
conn.VM_Dispose ();
|
||||
// Close the connection. No further messages can be sent
|
||||
// over the connection after this point.
|
||||
conn.Close ();
|
||||
notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, 0, 0, null, 0);
|
||||
}
|
||||
|
||||
@@ -277,6 +280,13 @@ namespace Mono.Debugger.Soft
|
||||
return new ExceptionEventRequest (this, exc_type, caught, uncaught);
|
||||
}
|
||||
|
||||
public ExceptionEventRequest CreateExceptionRequest (TypeMirror exc_type, bool caught, bool uncaught, bool everything_else) {
|
||||
if (Version.AtLeast (2, 54))
|
||||
return new ExceptionEventRequest (this, exc_type, caught, uncaught, true, everything_else);
|
||||
else
|
||||
return new ExceptionEventRequest (this, exc_type, caught, uncaught);
|
||||
}
|
||||
|
||||
public AssemblyLoadEventRequest CreateAssemblyLoadRequest () {
|
||||
return new AssemblyLoadEventRequest (this);
|
||||
}
|
||||
|
||||
@@ -350,6 +350,17 @@ class TestIfaces : ITest
|
||||
}
|
||||
}
|
||||
|
||||
public class RuntimeInvokeWithThrowClass
|
||||
{
|
||||
public RuntimeInvokeWithThrowClass()
|
||||
{
|
||||
}
|
||||
public void RuntimeInvokeThrowMethod()
|
||||
{
|
||||
throw new Exception("thays");
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class DebuggerTaskScheduler : TaskScheduler, IDisposable
|
||||
{
|
||||
private readonly BlockingCollection<Task> _tasks = new BlockingCollection<Task>();
|
||||
@@ -507,6 +518,10 @@ public class Tests : TestsBase, ITest2
|
||||
unhandled_exception_wrapper ();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length >0 && args [0] == "unhandled-exception-perform-wait-callback") {
|
||||
unhandled_exception_perform_wait_callback ();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length >0 && args [0] == "unhandled-exception-endinvoke") {
|
||||
unhandled_exception_endinvoke ();
|
||||
return 0;
|
||||
@@ -539,6 +554,10 @@ public class Tests : TestsBase, ITest2
|
||||
run_step_out_void_async();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length > 0 && args [0] == "runtime_invoke_hybrid_exceptions") {
|
||||
runtime_invoke_hybrid_exceptions();
|
||||
return 0;
|
||||
}
|
||||
assembly_load ();
|
||||
breakpoints ();
|
||||
single_stepping ();
|
||||
@@ -584,6 +603,7 @@ public class Tests : TestsBase, ITest2
|
||||
inspect_enumerator_in_generic_struct();
|
||||
if_property_stepping();
|
||||
fixed_size_array();
|
||||
test_new_exception_filter();
|
||||
return 3;
|
||||
}
|
||||
|
||||
@@ -595,6 +615,11 @@ public class Tests : TestsBase, ITest2
|
||||
}
|
||||
}
|
||||
|
||||
public class MyException : Exception {
|
||||
public MyException(string message) : base(message) {
|
||||
}
|
||||
}
|
||||
|
||||
public static void if_property_stepping() {
|
||||
var test = new TestClass();
|
||||
if (test.OneLineProperty == "someInvalidValue6049e709-7271-41a1-bc0a-f1f1b80d4125")
|
||||
@@ -827,6 +852,57 @@ public class Tests : TestsBase, ITest2
|
||||
n.Buffer2 = new char4('a', 'b', 'c', 'd');
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void test_new_exception_filter () {
|
||||
test_new_exception_filter1();
|
||||
test_new_exception_filter2();
|
||||
test_new_exception_filter3();
|
||||
test_new_exception_filter4();
|
||||
}
|
||||
|
||||
|
||||
public static void test_new_exception_filter1 () {
|
||||
try {
|
||||
throw new Exception("excp");
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
public static void test_new_exception_filter2 () {
|
||||
try {
|
||||
throw new MyException("excp");
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
public static void test_new_exception_filter3 () {
|
||||
try {
|
||||
throw new ArgumentException();
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
try {
|
||||
throw new Exception("excp");
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
public static void test_new_exception_filter4 () {
|
||||
try {
|
||||
throw new ArgumentException();
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
try {
|
||||
throw new Exception("excp");
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void inspect_enumerator_in_generic_struct() {
|
||||
TestEnumeratorInsideGenericStruct<String, String> generic_struct = new TestEnumeratorInsideGenericStruct<String, String>(new KeyValuePair<string, string>("0", "f1"));
|
||||
@@ -1592,6 +1668,24 @@ public class Tests : TestsBase, ITest2
|
||||
public static void unhandled_exception_endinvoke_2 () {
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void unhandled_exception_perform_wait_callback () {
|
||||
try
|
||||
{
|
||||
var results = ResolveAsync().GetAwaiter().GetResult();
|
||||
}
|
||||
catch (SocketException sockEx)
|
||||
{
|
||||
//Console.WriteLine("correctly handled");
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<List<string>> ResolveAsync()
|
||||
{
|
||||
var addresses = await System.Net.Dns.GetHostAddressesAsync("foo.bar.baz");
|
||||
return new List<string>(addresses.Select(addr => addr.ToString()));
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void unhandled_exception_endinvoke () {
|
||||
Action action = new Action (() =>
|
||||
@@ -2112,6 +2206,16 @@ public class Tests : TestsBase, ITest2
|
||||
public static ref BlittableStruct get_ref_struct() {
|
||||
return ref ref_return_struct;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void runtime_invoke_hybrid_exceptions () {
|
||||
Type rtType = Type.GetType("RuntimeInvokeWithThrowClass");
|
||||
ConstructorInfo rtConstructor = rtType.GetConstructor(Type.EmptyTypes);
|
||||
object rtObject = rtConstructor.Invoke(new object[] { });
|
||||
MethodInfo rtMethod = rtType.GetMethod("RuntimeInvokeThrowMethod");
|
||||
rtMethod.Invoke(rtObject, new object[] { });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class SentinelClass : MarshalByRefObject {
|
||||
|
||||
@@ -1767,7 +1767,7 @@ public class DebuggerTests
|
||||
t = frame.Method.GetParameters ()[7].ParameterType;
|
||||
Assert.AreEqual ("Tests", t.Name);
|
||||
var nested = (from nt in t.GetNestedTypes () where nt.IsNestedPublic select nt).ToArray ();
|
||||
Assert.AreEqual (1, nested.Length);
|
||||
Assert.AreEqual (2, nested.Length);
|
||||
Assert.AreEqual ("NestedClass", nested [0].Name);
|
||||
Assert.IsTrue (t.BaseType.IsAssignableFrom (t));
|
||||
Assert.IsTrue (!t.IsAssignableFrom (t.BaseType));
|
||||
@@ -4233,8 +4233,6 @@ public class DebuggerTests
|
||||
var e = run_until ("unhandled_exception_endinvoke");
|
||||
vm.Resume ();
|
||||
|
||||
var e1 = GetNextEvent (); //this should be the exception
|
||||
vm.Resume ();
|
||||
var e2 = GetNextEvent ();
|
||||
Assert.IsFalse (e2 is ExceptionEvent);
|
||||
|
||||
@@ -4281,6 +4279,23 @@ public class DebuggerTests
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UnhandledException4 () {
|
||||
vm.Exit (0);
|
||||
|
||||
Start (dtest_app_path, "unhandled-exception-perform-wait-callback");
|
||||
|
||||
var req = vm.CreateExceptionRequest (null, false, true);
|
||||
req.Enable ();
|
||||
|
||||
var e = run_until ("unhandled_exception_perform_wait_callback");
|
||||
vm.Resume ();
|
||||
|
||||
var e2 = GetNextEvent ();
|
||||
Assert.IsTrue (e2 is VMDeathEvent);
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GCWhileSuspended () {
|
||||
// Check that objects are kept alive during suspensions
|
||||
@@ -4451,6 +4466,7 @@ public class DebuggerTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("NotWorkingRuntimeInterpreter")]
|
||||
public void SetIP2 () {
|
||||
var bevent = run_until ("set_ip_1");
|
||||
|
||||
@@ -5085,6 +5101,58 @@ public class DebuggerTests
|
||||
Assert.AreEqual("d", min.Value);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestExceptionFilterWin () {
|
||||
Event e = run_until ("test_new_exception_filter1");
|
||||
var req2 = vm.CreateExceptionRequest (vm.RootDomain.Corlib.GetType ("System.Exception"), true, true, false);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
Event ev = GetNextEvent ();
|
||||
var l = ev.Thread.GetFrames ()[0].Location;
|
||||
|
||||
Assert.IsInstanceOfType (typeof (ExceptionEvent), ev);
|
||||
req2.Disable ();
|
||||
run_until ("test_new_exception_filter2");
|
||||
req2 = vm.CreateExceptionRequest (null, true, true, false);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
ev = GetNextEvent ();
|
||||
|
||||
Assert.IsInstanceOfType (typeof (ExceptionEvent), ev);
|
||||
req2.Disable ();
|
||||
run_until ("test_new_exception_filter3");
|
||||
var req3 = vm.CreateExceptionRequest (vm.RootDomain.Corlib.GetType ("System.ArgumentException"), false, true, false);
|
||||
req3.Enable ();
|
||||
req2 = vm.CreateExceptionRequest (null, true, true, true);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
ev = GetNextEvent ();
|
||||
|
||||
Assert.IsInstanceOfType (typeof (ExceptionEvent), ev);
|
||||
req2.Disable ();
|
||||
req3.Disable ();
|
||||
run_until ("test_new_exception_filter4");
|
||||
req2 = vm.CreateExceptionRequest (null, true, true, true);
|
||||
req2.Enable ();
|
||||
req2 = vm.CreateExceptionRequest (vm.RootDomain.Corlib.GetType ("System.ArgumentException"), false, true, false);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
ev = GetNextEvent ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRuntimeInvokeHybridSuspendExceptions () {
|
||||
TearDown ();
|
||||
Start (dtest_app_path, "runtime_invoke_hybrid_exceptions", forceExit: true);
|
||||
var req2 = vm.CreateExceptionRequest (null, false, true, false);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
var ev = GetNextEvent ();
|
||||
Assert.IsInstanceOfType (typeof (ExceptionEvent), ev);
|
||||
vm.Exit (0);
|
||||
vm = null;
|
||||
}
|
||||
|
||||
#endif
|
||||
} // class DebuggerTests
|
||||
} // namespace
|
||||
@@ -488,7 +488,6 @@
|
||||
<Compile Include="..\..\build\common\Consts.cs" />
|
||||
<Compile Include="..\..\build\common\MonoTODOAttribute.cs" />
|
||||
<Compile Include="..\..\build\common\SR.cs" />
|
||||
<Compile Include="..\corlib\System.Runtime.CompilerServices\PreserveDependencyAttribute.cs" />
|
||||
<Compile Include="..\referencesource\System.Core\Microsoft\Scripting\Utils\Action.cs" />
|
||||
<Compile Include="..\referencesource\System.Core\Microsoft\Scripting\Utils\Extension.cs" />
|
||||
<Compile Include="..\referencesource\System.Core\Microsoft\Scripting\Utils\Function.cs" />
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
../../build/common/SR.cs
|
||||
../../build/common/MonoTODOAttribute.cs
|
||||
|
||||
../corlib/System.Runtime.CompilerServices/PreserveDependencyAttribute.cs
|
||||
|
||||
Assembly/AssemblyInfo.cs
|
||||
System/Util.cs
|
||||
System.IO.MemoryMappedFiles/MemoryMappedFile.cs
|
||||
|
||||
@@ -30,6 +30,76 @@
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-net_4_x-$(HostPlatform)</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
|
||||
<OutputPath>./../../class/lib/monodroid</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monodroid</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
|
||||
<OutputPath>./../../class/lib/monotouch</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monotouch</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' ">
|
||||
<OutputPath>./../../class/lib/monotouch_watch</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monotouch_watch</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_tv' ">
|
||||
<OutputPath>./../../class/lib/monotouch_tv</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monotouch_tv</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full_interp' ">
|
||||
<OutputPath>./../../class/lib/testing_aot_full_interp</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_full_interp</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_hybrid' ">
|
||||
<OutputPath>./../../class/lib/testing_aot_hybrid</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_hybrid</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
|
||||
<OutputPath>./../../class/lib/testing_aot_full</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_aot_full</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
|
||||
<OutputPath>./../../class/lib/winaot</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-winaot</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_COM;WIN_PLATFORM;WINAOT;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_winaot_interp' ">
|
||||
<OutputPath>./../../class/lib/testing_winaot_interp</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-testing_winaot_interp</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_COM;WIN_PLATFORM;WINAOT;FULL_AOT_INTERP;DISABLE_SECURITY;DISABLE_REMOTING;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
|
||||
<OutputPath>./../../class/lib/xammac</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-xammac</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac_net_4_5' ">
|
||||
<OutputPath>./../../class/lib/xammac_net_4_5</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-xammac_net_4_5</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'orbis' ">
|
||||
<OutputPath>./../../class/lib/orbis</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-orbis</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_COM;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'unreal' ">
|
||||
<OutputPath>./../../class/lib/unreal</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-unreal</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'wasm' ">
|
||||
<OutputPath>./../../class/lib/wasm</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-wasm</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_COM;FEATURE_NO_BSD_SOCKETS;DISABLE_REMOTING;DISABLE_SECURITY;COREFX</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- @ALL_PROFILE_PROPERTIES@ -->
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -69,14 +139,37 @@
|
||||
</ItemGroup>
|
||||
<!--End of common files-->
|
||||
<!-- @ALL_SOURCES@ -->
|
||||
<!-- @COMMON_PROJECT_REFERENCES@ -->
|
||||
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../System.Core/System.Core.csproj" />
|
||||
<ProjectReference Include="../System/System.csproj" />
|
||||
<ProjectReference Include="../System.Data/System.Data.csproj" />
|
||||
<ProjectReference Include="../System.XML/System.Xml.csproj" />
|
||||
<ProjectReference Include="../corlib/corlib.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full_interp' ">
|
||||
<Reference Include="nunitlite">
|
||||
<HintPath>..\lib\testing_aot_full_interp\nunitlite.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_hybrid' ">
|
||||
<Reference Include="nunitlite">
|
||||
<HintPath>..\lib\testing_aot_hybrid\nunitlite.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
|
||||
<Reference Include="nunitlite">
|
||||
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'testing_winaot_interp' ">
|
||||
<Reference Include="nunitlite">
|
||||
<HintPath>..\lib\testing_winaot_interp\nunitlite.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<!-- @ALL_REFERENCES@ -->
|
||||
<!-- @ALL_RESOURCES@ -->
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -3,7 +3,7 @@ SUBDIRS =
|
||||
include ../../../../build/rules.make
|
||||
|
||||
LIBRARY = System.Data.Tests.Mainsoft.dll
|
||||
LIB_MCS_FLAGS = /r:mscorlib.dll /r:System.dll /r:System.Data.dll /r:nunit.framework.dll /r:System.Xml.dll
|
||||
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:System.Data.dll /r:nunit.framework.dll /r:System.Xml.dll
|
||||
NO_SIGN_ASSEMBLY = true
|
||||
|
||||
include ../../../../build/library.make
|
||||
@@ -234,6 +234,8 @@
|
||||
<Compile Include="System.Drawing.Text\PrivateFontCollection.cs" />
|
||||
<Compile Include="System.Drawing\Bitmap.cs" />
|
||||
<Compile Include="System.Drawing\Brushes.cs" />
|
||||
<Compile Include="System.Drawing\BufferedGraphics.cs" />
|
||||
<Compile Include="System.Drawing\BufferedGraphicsContext.cs" />
|
||||
<Compile Include="System.Drawing\BufferedGraphicsManager.cs" />
|
||||
<Compile Include="System.Drawing\CharacterRange.cs" />
|
||||
<Compile Include="System.Drawing\ColorTranslator.cs" />
|
||||
@@ -279,46 +281,6 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<!--End of common files-->
|
||||
<!--Per-profile files-->
|
||||
<Choose>
|
||||
<When Condition="'$(Platform)' == 'net_4_x'">
|
||||
<!--Per-host-platform files-->
|
||||
<Choose>
|
||||
<When Condition="'$(HostPlatform)' == 'win32'">
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\BufferedGraphics.Windows.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Drawing.Common\src\System\Drawing\BufferedGraphicsContext.Windows.cs" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="'$(HostPlatform)' == 'unix'">
|
||||
<ItemGroup>
|
||||
<Compile Include="System.Drawing\BufferedGraphics.cs" />
|
||||
<Compile Include="System.Drawing\BufferedGraphicsContext.cs" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="'$(HostPlatform)' == 'macos'">
|
||||
<ItemGroup>
|
||||
<Compile Include="System.Drawing\BufferedGraphics.cs" />
|
||||
<Compile Include="System.Drawing\BufferedGraphicsContext.cs" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="'$(HostPlatform)' == 'linux'">
|
||||
<ItemGroup>
|
||||
<Compile Include="System.Drawing\BufferedGraphics.cs" />
|
||||
<Compile Include="System.Drawing\BufferedGraphicsContext.cs" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<!--End of per-host-platform files-->
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<Compile Include="System.Drawing\BufferedGraphics.cs" />
|
||||
<Compile Include="System.Drawing\BufferedGraphicsContext.cs" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<!--End of per-profile files-->
|
||||
<!-- @ALL_SOURCES@ -->
|
||||
<!-- @COMMON_PROJECT_REFERENCES@ -->
|
||||
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
System.Drawing/BufferedGraphics.cs
|
||||
System.Drawing/BufferedGraphicsContext.cs
|
||||
@@ -1,4 +0,0 @@
|
||||
#include System.Drawing.dll.sources
|
||||
|
||||
../../../external/corefx/src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.Windows.cs
|
||||
../../../external/corefx/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.Windows.cs
|
||||
@@ -12,6 +12,10 @@ namespace System.Net.Http
|
||||
return true;
|
||||
#endif
|
||||
|
||||
// Mono URI handling which does not distinguish between file and url absolute paths without scheme
|
||||
if (uri.Scheme == Uri.UriSchemeFile && uri.OriginalString.StartsWith ("/", StringComparison.Ordinal))
|
||||
return true;
|
||||
|
||||
return HttpUtilities.IsHttpUri (uri);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,8 +375,7 @@ namespace MonoTests.System.Net.Http
|
||||
Assert.AreEqual (response, client.SendAsync (request).Result, "#1");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("NotWorking")]
|
||||
[Test]
|
||||
public void Send_BaseAddress ()
|
||||
{
|
||||
var mh = new HttpMessageHandlerMock ();
|
||||
|
||||
@@ -204,9 +204,11 @@ namespace System.Xml.Serialization
|
||||
{
|
||||
if (isNullable && ReadNull()) return null;
|
||||
|
||||
if (checkType) {
|
||||
System.Xml.XmlQualifiedName t = GetXsiType();
|
||||
if (t != null) {
|
||||
if (checkType)
|
||||
{
|
||||
System.Xml.XmlQualifiedName t = GetXsiType();
|
||||
if (t != null)
|
||||
{
|
||||
XmlTypeMapping realMap = typeMap.GetRealElementMap (t.Name, t.Namespace);
|
||||
if (realMap == null) {
|
||||
if (typeMap.TypeData.Type == typeof(object))
|
||||
@@ -219,12 +221,7 @@ namespace System.Xml.Serialization
|
||||
}
|
||||
else if (typeMap.TypeData.Type == typeof(object))
|
||||
return ReadTypedPrimitive (AnyType);
|
||||
else {
|
||||
XmlTypeMapping realMap = typeMap.GetRealElementMap (Reader.LocalName, Reader.NamespaceURI);
|
||||
if (realMap != null && realMap != typeMap)
|
||||
return ReadObject(realMap, false, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
object ob = CreateInstance (typeMap.TypeData.Type, true);
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ namespace System.Xml.Serialization
|
||||
return (XmlTypeMapMemberAttribute)_attributeMembers [BuildKey (name,ns, -1)];
|
||||
}
|
||||
|
||||
public XmlTypeMapElementInfo GetElement (string name, string ns, int minimalOrder)
|
||||
public XmlTypeMapElementInfo GetElement(string name, string ns, int minimalOrder)
|
||||
{
|
||||
if (_elements == null)
|
||||
return null;
|
||||
@@ -404,38 +404,22 @@ namespace System.Xml.Serialization
|
||||
selected = info;
|
||||
}
|
||||
}
|
||||
else if (info.MappedType != null && info.MappedType.DerivedTypes.Count > 0) {
|
||||
foreach (XmlTypeMapping derrivedInfo in info.MappedType.DerivedTypes) {
|
||||
if (derrivedInfo.ElementName == name && derrivedInfo.Namespace == ns) {
|
||||
if (info.ExplicitOrder < minimalOrder)
|
||||
continue;
|
||||
|
||||
if (selected == null || selected.ExplicitOrder > info.ExplicitOrder) {
|
||||
selected = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return selected;
|
||||
}
|
||||
|
||||
public XmlTypeMapElementInfo GetElement (string name, string ns)
|
||||
public XmlTypeMapElementInfo GetElement(string name, string ns)
|
||||
{
|
||||
if (_elements == null) return null;
|
||||
|
||||
foreach (XmlTypeMapElementInfo info in _elements.Values)
|
||||
if (info.ElementName == name && info.Namespace == ns)
|
||||
return info;
|
||||
else if (info.MappedType != null && info.MappedType.DerivedTypes.Count > 0) {
|
||||
foreach (XmlTypeMapping derrivedInfo in info.MappedType.DerivedTypes)
|
||||
if (derrivedInfo.ElementName == name && derrivedInfo.Namespace == ns)
|
||||
return info;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public XmlTypeMapElementInfo GetElement (int index)
|
||||
{
|
||||
if (_elements == null) return null;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using NUnit.Framework;
|
||||
@@ -1686,28 +1687,40 @@ namespace MonoTests.System.XmlSerialization
|
||||
Assert.AreEqual ("b", d.Extra[1]);
|
||||
}
|
||||
|
||||
[Test] // PR #11194
|
||||
public void TestDerrivedClassProperty ()
|
||||
// https://github.com/mono/mono/issues/16918
|
||||
[Test]
|
||||
public void Bug16918 ()
|
||||
{
|
||||
var data = "<layout width=\".25\" height =\".25\" x=\"0\" y=\"0\" id=\"portrait\" class=\"render\"><background color=\"white\"><div x=\".03\" y=\".05\" width=\".94\" height =\".9\" layout=\"proportional_rows\" paddingX=\".01\" paddingY=\".02\"><background color=\"black\"></background><background color=\"gray\" padding=\".1\"><label color=\"white\" font=\"emulogic.ttf\" fontSize=\"15\">Test UI</label></background><br brSize=\"1\" /><background class=\"back,Lab\" color=\"green\"><label class=\"Lab\" color=\"white\" font=\"emulogic.ttf\" fontSize=\"15\">GREEN</label></background><background color=\"red\"><label class=\"Lab\" color=\"white\" font=\"emulogic.ttf\" fontSize=\"15\">RED</label></background><background color=\"blue\"><label class=\"Lab\" color=\"white\" font=\"emulogic.ttf\" fontSize=\"15\">TLUE</label></background><background color=\"blue\"><label class=\"Lab\" color=\"white\" font=\"emulogic.ttf\" fontSize=\"15\">BLUE</label></background></div></background></layout>";
|
||||
PropertiesWithSameNameAsTheirType testObject = new PropertiesWithSameNameAsTheirType ()
|
||||
{
|
||||
E1 = E1.Two,
|
||||
E2 = E2.Two,
|
||||
E3 = E3.Two,
|
||||
E4 = E4.Two,
|
||||
E5 = E5.Two
|
||||
};
|
||||
|
||||
XmlAttributeOverrides overrides = PR11194.GenerateLayoutOverrides<PR11194ChildLo>();
|
||||
XmlSerializer serializer = new XmlSerializer (typeof (PropertiesWithSameNameAsTheirType));
|
||||
|
||||
var result = Deserialize(typeof(PR11194ChildLo), data, overrides) as PR11194ChildLo;
|
||||
// serialize
|
||||
string serializedObject;
|
||||
using (MemoryStream memoryStream = new MemoryStream ())
|
||||
{
|
||||
serializer.Serialize (memoryStream, testObject);
|
||||
serializedObject = Encoding.UTF8.GetString (memoryStream.ToArray ());
|
||||
}
|
||||
|
||||
PR11194Parent2 child;
|
||||
Assert.IsNotNull(result, "#11194_1");
|
||||
Assert.AreEqual(1, result.children.Count, "#11194_2");
|
||||
child = result.children[0] as PR11194Parent2;
|
||||
Assert.IsNotNull(child, "#11194_3");
|
||||
Assert.AreEqual(1, child.children.Count, "#11194_4");
|
||||
child = child.children[0] as PR11194Parent2;
|
||||
Assert.IsNotNull(child, "#11194_5");
|
||||
Assert.AreEqual(7, child.children.Count, "#11194_6");
|
||||
child = child.children[1] as PR11194Parent2;
|
||||
Assert.IsNotNull(child, "#11194_7");
|
||||
Assert.AreEqual(1, child.children.Count, "#11194_8");
|
||||
Assert.AreEqual("PR11194ChildL", child.children[0].GetType().Name, "#11194_9");
|
||||
PropertiesWithSameNameAsTheirType deserializedObject;
|
||||
using (MemoryStream memoryStream = new MemoryStream (Encoding.UTF8.GetBytes (serializedObject)))
|
||||
{
|
||||
deserializedObject = (PropertiesWithSameNameAsTheirType)serializer.Deserialize (memoryStream);
|
||||
}
|
||||
|
||||
Assert.AreEqual (testObject.E1, deserializedObject.E1, "#1");
|
||||
Assert.AreEqual (testObject.E2, deserializedObject.E2, "#2");
|
||||
Assert.AreEqual (testObject.E3, deserializedObject.E3, "#3");
|
||||
Assert.AreEqual (testObject.E4, deserializedObject.E4, "#4");
|
||||
Assert.AreEqual (testObject.E5, deserializedObject.E5, "#5");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,8 +12,6 @@
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -1207,157 +1205,54 @@ namespace MonoTests.System.Xml.TestClasses
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region PR_11194
|
||||
|
||||
#region PR_11194_GenerateOverrides
|
||||
public static class PR11194
|
||||
[Serializable]
|
||||
public class PropertiesWithSameNameAsTheirType
|
||||
{
|
||||
public static XmlAttributeOverrides GenerateLayoutOverrides<T>()
|
||||
public PropertiesWithSameNameAsTheirType ()
|
||||
{
|
||||
Type tType = typeof(T);
|
||||
|
||||
TypeInfo tTypeInfo = tType.GetTypeInfo();
|
||||
|
||||
IEnumerable<PropertyInfo> props = tType.GetRuntimeProperties();
|
||||
|
||||
XmlAttributeOverrides overrides = new XmlAttributeOverrides();
|
||||
|
||||
foreach (PropertyInfo prop in props) {
|
||||
XmlDerrivedAttribute attr = prop.GetCustomAttribute<XmlDerrivedAttribute>();
|
||||
|
||||
if (attr == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Type dType = prop.DeclaringType;
|
||||
|
||||
Type pType = prop.PropertyType;
|
||||
TypeInfo pTypeInfo = pType.GetTypeInfo();
|
||||
|
||||
Type enumType = typeof(IEnumerable<>);
|
||||
|
||||
if (pTypeInfo.IsGenericType
|
||||
&& pTypeInfo.ImplementedInterfaces.Any(t =>
|
||||
(t.GetTypeInfo().IsGenericType && t.GetGenericTypeDefinition() == enumType))) {
|
||||
pType = pType.GenericTypeArguments[0];
|
||||
}
|
||||
|
||||
XmlAttributes overrideAttributes = GenerateOverrideAttributes(dType, pType, attr);
|
||||
|
||||
overrides.Add(dType, prop.Name, overrideAttributes);
|
||||
}
|
||||
|
||||
return overrides;
|
||||
}
|
||||
|
||||
private static XmlAttributes GenerateOverrideAttributes (Type declaringType, Type propertyType, XmlDerrivedAttribute attr)
|
||||
{
|
||||
XmlAttributes xAttrs = new XmlAttributes();
|
||||
public object obj1 { get; set; }
|
||||
public object obj2 { get; set; }
|
||||
public object obj3 { get; set; }
|
||||
public object obj4 { get; set; }
|
||||
public object obj5 { get; set; }
|
||||
|
||||
Assembly a = declaringType.GetTypeInfo().Assembly;
|
||||
TypeInfo interfaceType = propertyType.GetTypeInfo();
|
||||
IEnumerable<Type> types = a.ExportedTypes.Where(t => interfaceType.IsAssignableFrom(t.GetTypeInfo()) && !t.GetTypeInfo().IsAbstract);
|
||||
|
||||
foreach (Type t in types) {
|
||||
string name = NameBySourceType(t, attr.SrcType);// t.GetTypeInfo().GetCustomAttribute<XmlTypeAttribute>().TypeName;
|
||||
XmlElementAttribute xAttr = new XmlElementAttribute();
|
||||
xAttr.ElementName = name;
|
||||
xAttr.Type = t;
|
||||
xAttrs.XmlElements.Add(xAttr);
|
||||
}
|
||||
|
||||
return xAttrs;
|
||||
}
|
||||
|
||||
private static string NameBySourceType (Type derrivedType, XmlDerrivedSourceType srcType)
|
||||
{
|
||||
string name = null;
|
||||
switch (srcType)
|
||||
{
|
||||
case XmlDerrivedSourceType.ByXmlType:
|
||||
name = derrivedType.GetTypeInfo().GetCustomAttribute<XmlTypeAttribute>().TypeName;
|
||||
break;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
public E1 E1 { get; set; }
|
||||
public E2 E2 { get; set; }
|
||||
public E3 E3 { get; set; }
|
||||
public E4 E4 { get; set; }
|
||||
public E5 E5 { get; set; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region helperAttribute
|
||||
public enum XmlDerrivedSourceType
|
||||
public enum E1
|
||||
{
|
||||
ByXmlType
|
||||
One,
|
||||
Two,
|
||||
}
|
||||
|
||||
public class XmlDerrivedAttribute : Attribute
|
||||
public enum E2
|
||||
{
|
||||
public XmlDerrivedSourceType SrcType { get; set; }
|
||||
|
||||
public XmlDerrivedAttribute(XmlDerrivedSourceType srcType)
|
||||
{
|
||||
SrcType = srcType;
|
||||
}
|
||||
One,
|
||||
Two,
|
||||
}
|
||||
#endregion
|
||||
|
||||
public abstract class PR11194Parent
|
||||
public enum E5
|
||||
{
|
||||
[XmlIgnore]
|
||||
public PR11194Parent Parent { get; set; }
|
||||
One,
|
||||
Two,
|
||||
}
|
||||
|
||||
public abstract class PR11194Parent2 : PR11194Parent
|
||||
public enum E3
|
||||
{
|
||||
[XmlAttribute]
|
||||
public float width { get; set; }
|
||||
[XmlAttribute]
|
||||
public float height { get; set; }
|
||||
[XmlAttribute]
|
||||
public float x { get; set; }
|
||||
[XmlAttribute]
|
||||
public float y { get; set; }
|
||||
[XmlAttribute]
|
||||
public string id { get; set; }
|
||||
[XmlElement]
|
||||
[XmlDerrived(XmlDerrivedSourceType.ByXmlType)]
|
||||
public List<PR11194Parent> children { get; set; }
|
||||
One,
|
||||
Two,
|
||||
}
|
||||
|
||||
[XmlType("background")]
|
||||
public class PR11194ChildB : PR11194Parent2
|
||||
public enum E4
|
||||
{
|
||||
[XmlAttribute]
|
||||
public string image { get; set; }
|
||||
One,
|
||||
Two,
|
||||
}
|
||||
|
||||
[XmlType("br")]
|
||||
public class PR11194ChildBr : PR11194Parent
|
||||
{
|
||||
[XmlAttribute("brSize")]
|
||||
public int breaks { get; set; }
|
||||
}
|
||||
|
||||
[XmlType("div")]
|
||||
public class PR11194ChildD : PR11194ChildLo
|
||||
{
|
||||
}
|
||||
|
||||
[XmlType("label")]
|
||||
public class PR11194ChildL : PR11194Parent2
|
||||
{
|
||||
[XmlAttribute]
|
||||
public string font { get; set; }
|
||||
[XmlAttribute]
|
||||
public int fontSize { get; set; }
|
||||
[XmlText]
|
||||
public string Text { get; set; }
|
||||
}
|
||||
|
||||
[XmlType("layout")]
|
||||
public class PR11194ChildLo : PR11194Parent2
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -140,12 +140,15 @@ namespace System.IO.Compression
|
||||
|
||||
internal ValueTask<int> ReadAsyncMemory (Memory<byte> destination, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return base.ReadAsync(destination, cancellationToken);
|
||||
}
|
||||
|
||||
internal int ReadCore (Span<byte> destination)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
var buffer = new byte [destination.Length];
|
||||
int count = Read(buffer, 0, buffer.Length);
|
||||
buffer.AsSpan(0, count).CopyTo(destination);
|
||||
return count;
|
||||
}
|
||||
|
||||
public override int Read (byte[] array, int offset, int count)
|
||||
@@ -180,12 +183,12 @@ namespace System.IO.Compression
|
||||
|
||||
internal ValueTask WriteAsyncMemory (ReadOnlyMemory<byte> source, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return base.WriteAsync(source, cancellationToken);
|
||||
}
|
||||
|
||||
internal void WriteCore (ReadOnlySpan<byte> source)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
Write (source.ToArray (), 0, source.Length);
|
||||
}
|
||||
|
||||
public override void Write (byte[] array, int offset, int count)
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
//
|
||||
// System.IO.FileSystemEventArgs.cs
|
||||
//
|
||||
// Author:
|
||||
// Tim Coleman ([email protected])
|
||||
//
|
||||
// Copyright (C) Tim Coleman, 2002
|
||||
//
|
||||
|
||||
//
|
||||
// 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.IO {
|
||||
public class FileSystemEventArgs : EventArgs {
|
||||
|
||||
#region Fields
|
||||
|
||||
WatcherChangeTypes changeType;
|
||||
string directory;
|
||||
string name;
|
||||
|
||||
#endregion // Fields
|
||||
|
||||
#region Constructors
|
||||
|
||||
public FileSystemEventArgs (WatcherChangeTypes changeType, string directory, string name)
|
||||
{
|
||||
this.changeType = changeType;
|
||||
this.directory = directory;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
internal void SetName (string name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
#endregion // Constructors
|
||||
|
||||
#region Properties
|
||||
|
||||
public WatcherChangeTypes ChangeType {
|
||||
get { return changeType; }
|
||||
}
|
||||
|
||||
public string FullPath {
|
||||
get { return Path.Combine (directory, name); }
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get { return name; }
|
||||
}
|
||||
|
||||
#endregion // Properties
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// System.IO.FileSystemEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Tim Coleman ([email protected])
|
||||
//
|
||||
// Copyright (C) Tim Coleman, 2002
|
||||
// Copyright (C) 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.IO {
|
||||
|
||||
public delegate void FileSystemEventHandler (object sender, FileSystemEventArgs e);
|
||||
}
|
||||
@@ -61,7 +61,7 @@ namespace System.IO {
|
||||
SearchPattern2 pattern;
|
||||
bool disposed;
|
||||
string mangledFilter;
|
||||
static IFileWatcher watcher;
|
||||
IFileWatcher watcher;
|
||||
object watcher_handle;
|
||||
static object lockobj = new object ();
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace System.Net.NetworkInformation {
|
||||
public const int AF_INET = 2;
|
||||
public const int AF_INET6 = 23;
|
||||
|
||||
// FIXME: it might be getting wrong table. I'm getting
|
||||
// different results from .NET 2.0.
|
||||
unsafe void FillTcpTable (out List<Win32_MIB_TCPROW> tab4, out List<Win32_MIB_TCP6ROW> tab6)
|
||||
{
|
||||
tab4 = new List<Win32_MIB_TCPROW> ();
|
||||
@@ -303,16 +305,16 @@ namespace System.Net.NetworkInformation {
|
||||
{
|
||||
public TcpState State;
|
||||
public uint LocalAddr;
|
||||
public uint LocalPort;
|
||||
public int LocalPort;
|
||||
public uint RemoteAddr;
|
||||
public uint RemotePort;
|
||||
public int RemotePort;
|
||||
|
||||
public IPEndPoint LocalEndPoint {
|
||||
get { return new IPEndPoint (LocalAddr, ntohs((ushort)LocalPort)); }
|
||||
get { return new IPEndPoint (LocalAddr, LocalPort); }
|
||||
}
|
||||
|
||||
public IPEndPoint RemoteEndPoint {
|
||||
get { return new IPEndPoint (RemoteAddr, ntohs((ushort)RemotePort)); }
|
||||
get { return new IPEndPoint (RemoteAddr, RemotePort); }
|
||||
}
|
||||
|
||||
public TcpConnectionInformation TcpInfo {
|
||||
@@ -326,17 +328,17 @@ namespace System.Net.NetworkInformation {
|
||||
public TcpState State;
|
||||
public Win32_IN6_ADDR LocalAddr;
|
||||
public uint LocalScopeId;
|
||||
public uint LocalPort;
|
||||
public int LocalPort;
|
||||
public Win32_IN6_ADDR RemoteAddr;
|
||||
public uint RemoteScopeId;
|
||||
public uint RemotePort;
|
||||
public int RemotePort;
|
||||
|
||||
public IPEndPoint LocalEndPoint {
|
||||
get { return new IPEndPoint (new IPAddress (LocalAddr.Bytes, LocalScopeId), ntohs((ushort)LocalPort)); }
|
||||
get { return new IPEndPoint (new IPAddress (LocalAddr.Bytes, LocalScopeId), LocalPort); }
|
||||
}
|
||||
|
||||
public IPEndPoint RemoteEndPoint {
|
||||
get { return new IPEndPoint (new IPAddress (RemoteAddr.Bytes, RemoteScopeId), ntohs((ushort)RemotePort)); }
|
||||
get { return new IPEndPoint (new IPAddress (RemoteAddr.Bytes, RemoteScopeId), RemotePort); }
|
||||
}
|
||||
|
||||
public TcpConnectionInformation TcpInfo {
|
||||
@@ -360,10 +362,10 @@ namespace System.Net.NetworkInformation {
|
||||
{
|
||||
public Win32_IN6_ADDR LocalAddr;
|
||||
public uint LocalScopeId;
|
||||
public uint LocalPort;
|
||||
public int LocalPort;
|
||||
|
||||
public IPEndPoint LocalEndPoint {
|
||||
get { return new IPEndPoint (new IPAddress (LocalAddr.Bytes, LocalScopeId), ntohs((ushort)LocalPort)); }
|
||||
get { return new IPEndPoint (new IPAddress (LocalAddr.Bytes, LocalScopeId), LocalPort); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,15 +608,15 @@ namespace System.Net.Sockets
|
||||
throw new InvalidOperationException ("No operation in progress");
|
||||
|
||||
try {
|
||||
e.AcceptSocket = e.CurrentSocket.EndAccept (ares);
|
||||
e.AcceptSocket = e.current_socket.EndAccept (ares);
|
||||
} catch (SocketException ex) {
|
||||
e.SocketError = ex.SocketErrorCode;
|
||||
} catch (ObjectDisposedException) {
|
||||
e.SocketError = SocketError.OperationAborted;
|
||||
} finally {
|
||||
if (e.AcceptSocket == null)
|
||||
e.AcceptSocket = new Socket (e.CurrentSocket.AddressFamily, e.CurrentSocket.SocketType, e.CurrentSocket.ProtocolType, null);
|
||||
e.Complete_internal ();
|
||||
e.AcceptSocket = new Socket (e.current_socket.AddressFamily, e.current_socket.SocketType, e.current_socket.ProtocolType, null);
|
||||
e.Complete ();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -959,7 +959,7 @@ namespace System.Net.Sockets
|
||||
*
|
||||
* Note that we're not calling `e.Complete ()` (or resetting `e.in_progress`) here.
|
||||
*/
|
||||
e.CurrentSocket.EndConnect (ares);
|
||||
e.current_socket.EndConnect (ares);
|
||||
}
|
||||
|
||||
return pending;
|
||||
@@ -979,7 +979,7 @@ namespace System.Net.Sockets
|
||||
throw new ArgumentNullException("e");
|
||||
|
||||
if (e.in_progress != 0 && e.LastOperation == SocketAsyncOperation.Connect)
|
||||
e.CurrentSocket?.Close ();
|
||||
e.current_socket?.Close ();
|
||||
}
|
||||
|
||||
static AsyncCallback ConnectAsyncCallback = new AsyncCallback (ares => {
|
||||
@@ -989,17 +989,17 @@ namespace System.Net.Sockets
|
||||
throw new InvalidOperationException ("No operation in progress");
|
||||
|
||||
try {
|
||||
e.CurrentSocket.EndConnect (ares);
|
||||
e.current_socket.EndConnect (ares);
|
||||
} catch (SocketException se) {
|
||||
e.SocketError = se.SocketErrorCode;
|
||||
} catch (ObjectDisposedException) {
|
||||
e.SocketError = SocketError.OperationAborted;
|
||||
} finally {
|
||||
e.Complete_internal ();
|
||||
e.Complete ();
|
||||
}
|
||||
});
|
||||
|
||||
public IAsyncResult BeginConnect (string host, int port, AsyncCallback requestCallback, object state)
|
||||
public IAsyncResult BeginConnect (string host, int port, AsyncCallback callback, object state)
|
||||
{
|
||||
ThrowIfDisposedAndClosed ();
|
||||
|
||||
@@ -1012,32 +1012,23 @@ namespace System.Net.Sockets
|
||||
if (is_listening)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
var callback = new AsyncCallback ((result) => {
|
||||
var resultTask = ((Task<IPAddress[]>)result);
|
||||
BeginConnect (resultTask.Result, port, requestCallback, resultTask.AsyncState);
|
||||
});
|
||||
return ConvertToApm<IPAddress[]> (Dns.GetHostAddressesAsync (host), callback, state);
|
||||
}
|
||||
var sockares = new SocketAsyncResult (this, callback, state, SocketOperation.Connect) {
|
||||
Port = port
|
||||
};
|
||||
|
||||
private static IAsyncResult ConvertToApm<T> (Task<T> task, AsyncCallback callback, object state)
|
||||
{
|
||||
if (task == null)
|
||||
throw new ArgumentNullException ("task");
|
||||
|
||||
var tcs = new TaskCompletionSource<T> (state);
|
||||
task.ContinueWith (t =>
|
||||
{
|
||||
var dnsRequest = Dns.GetHostAddressesAsync (host);
|
||||
dnsRequest.ContinueWith (t => {
|
||||
if (t.IsFaulted)
|
||||
tcs.TrySetException (t.Exception.InnerExceptions);
|
||||
sockares.Complete (t.Exception.InnerException);
|
||||
else if (t.IsCanceled)
|
||||
tcs.TrySetCanceled ();
|
||||
else
|
||||
tcs.TrySetResult (t.Result);
|
||||
|
||||
if (callback != null)
|
||||
callback (tcs.Task);
|
||||
sockares.Complete (new OperationCanceledException ());
|
||||
else {
|
||||
sockares.Addresses = t.Result;
|
||||
BeginMConnect (sockares);
|
||||
}
|
||||
}, TaskScheduler.Default);
|
||||
return tcs.Task;
|
||||
|
||||
return sockares;
|
||||
}
|
||||
|
||||
public IAsyncResult BeginConnect (EndPoint remoteEP, AsyncCallback callback, object state)
|
||||
@@ -1263,7 +1254,7 @@ namespace System.Net.Sockets
|
||||
Array.Resize (ref addresses, last_valid);
|
||||
return true;
|
||||
} else {
|
||||
e.SetConnectByNameError (null);
|
||||
e.ConnectByNameError = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1316,13 +1307,13 @@ namespace System.Net.Sockets
|
||||
throw new InvalidOperationException ("No operation in progress");
|
||||
|
||||
try {
|
||||
e.CurrentSocket.EndDisconnect (ares);
|
||||
e.current_socket.EndDisconnect (ares);
|
||||
} catch (SocketException ex) {
|
||||
e.SocketError = ex.SocketErrorCode;
|
||||
} catch (ObjectDisposedException) {
|
||||
e.SocketError = SocketError.OperationAborted;
|
||||
} finally {
|
||||
e.Complete_internal ();
|
||||
e.Complete ();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1515,13 +1506,13 @@ namespace System.Net.Sockets
|
||||
throw new InvalidOperationException ("No operation in progress");
|
||||
|
||||
try {
|
||||
e.SetBytesTransferred (e.CurrentSocket.EndReceive (ares));
|
||||
e.BytesTransferred = e.current_socket.EndReceive (ares);
|
||||
} catch (SocketException se){
|
||||
e.SocketError = se.SocketErrorCode;
|
||||
} catch (ObjectDisposedException) {
|
||||
e.SocketError = SocketError.OperationAborted;
|
||||
} finally {
|
||||
e.Complete_internal ();
|
||||
e.Complete ();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1739,13 +1730,13 @@ namespace System.Net.Sockets
|
||||
throw new InvalidOperationException ("No operation in progress");
|
||||
|
||||
try {
|
||||
e.SetBytesTransferred (e.CurrentSocket.EndReceiveFrom_internal ((SocketAsyncResult)ares, e));
|
||||
e.BytesTransferred = e.current_socket.EndReceiveFrom (ares, ref e.remote_ep);
|
||||
} catch (SocketException ex) {
|
||||
e.SocketError = ex.SocketErrorCode;
|
||||
} catch (ObjectDisposedException) {
|
||||
e.SocketError = SocketError.OperationAborted;
|
||||
} finally {
|
||||
e.Complete_internal ();
|
||||
e.Complete ();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1810,20 +1801,7 @@ namespace System.Net.Sockets
|
||||
return sockares.Total;
|
||||
}
|
||||
|
||||
int EndReceiveFrom_internal (SocketAsyncResult sockares, SocketAsyncEventArgs ares)
|
||||
{
|
||||
ThrowIfDisposedAndClosed ();
|
||||
|
||||
if (Interlocked.CompareExchange (ref sockares.EndCalled, 1, 0) == 1)
|
||||
throw new InvalidOperationException ("EndReceiveFrom can only be called once per asynchronous operation");
|
||||
|
||||
if (!sockares.IsCompleted)
|
||||
sockares.AsyncWaitHandle.WaitOne ();
|
||||
|
||||
sockares.CheckIfThrowDelayedException ();
|
||||
ares.RemoteEndPoint = sockares.EndPoint;
|
||||
return sockares.Total;
|
||||
}
|
||||
|
||||
static unsafe int ReceiveFrom_internal (SafeSocketHandle safeHandle, byte* buffer, int count, SocketFlags flags, ref SocketAddress sockaddr, out int error, bool blocking)
|
||||
{
|
||||
@@ -2018,13 +1996,13 @@ namespace System.Net.Sockets
|
||||
throw new InvalidOperationException ("No operation in progress");
|
||||
|
||||
try {
|
||||
e.SetBytesTransferred (e.CurrentSocket.EndSend (ares));
|
||||
e.BytesTransferred = e.current_socket.EndSend (ares);
|
||||
} catch (SocketException se){
|
||||
e.SocketError = se.SocketErrorCode;
|
||||
} catch (ObjectDisposedException) {
|
||||
e.SocketError = SocketError.OperationAborted;
|
||||
} finally {
|
||||
e.Complete_internal ();
|
||||
e.Complete ();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2242,13 +2220,13 @@ namespace System.Net.Sockets
|
||||
throw new InvalidOperationException ("No operation in progress");
|
||||
|
||||
try {
|
||||
e.SetBytesTransferred (e.CurrentSocket.EndSendTo (ares));
|
||||
e.BytesTransferred = e.current_socket.EndSendTo (ares);
|
||||
} catch (SocketException ex) {
|
||||
e.SocketError = ex.SocketErrorCode;
|
||||
} catch (ObjectDisposedException) {
|
||||
e.SocketError = SocketError.OperationAborted;
|
||||
} finally {
|
||||
e.Complete_internal ();
|
||||
e.Complete ();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2879,10 +2857,10 @@ namespace System.Net.Sockets
|
||||
if (e.AcceptSocket != null) {
|
||||
e.socket_async_result.AcceptSocket = e.AcceptSocket;
|
||||
}
|
||||
e.SetCurrentSocket (this);
|
||||
e.current_socket = this;
|
||||
e.SetLastOperation (SocketOperationToSocketAsyncOperation (operation));
|
||||
e.SocketError = SocketError.Success;
|
||||
e.SetBytesTransferred (0);
|
||||
e.BytesTransferred = 0;
|
||||
}
|
||||
|
||||
SocketAsyncOperation SocketOperationToSocketAsyncOperation (SocketOperation op)
|
||||
|
||||
@@ -41,14 +41,14 @@ namespace System.Net.Sockets
|
||||
bool disposed;
|
||||
|
||||
internal volatile int in_progress;
|
||||
EndPoint remote_ep;
|
||||
Socket current_socket;
|
||||
internal EndPoint remote_ep;
|
||||
internal Socket current_socket;
|
||||
|
||||
internal SocketAsyncResult socket_async_result = new SocketAsyncResult ();
|
||||
|
||||
public Exception ConnectByNameError {
|
||||
get;
|
||||
private set;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public Socket AcceptSocket {
|
||||
@@ -63,7 +63,7 @@ namespace System.Net.Sockets
|
||||
|
||||
public Memory<byte> MemoryBuffer => Buffer;
|
||||
|
||||
IList<ArraySegment<byte>> m_BufferList;
|
||||
internal IList<ArraySegment<byte>> m_BufferList;
|
||||
public IList<ArraySegment<byte>> BufferList {
|
||||
get { return m_BufferList; }
|
||||
set {
|
||||
@@ -75,12 +75,12 @@ namespace System.Net.Sockets
|
||||
|
||||
public int BytesTransferred {
|
||||
get;
|
||||
private set;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public int Count {
|
||||
get;
|
||||
private set;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool DisconnectReuseSocket {
|
||||
@@ -150,8 +150,19 @@ namespace System.Net.Sockets
|
||||
}
|
||||
}
|
||||
|
||||
internal bool PolicyRestricted {
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public event EventHandler<SocketAsyncEventArgs> Completed;
|
||||
|
||||
internal SocketAsyncEventArgs (bool policy)
|
||||
: this ()
|
||||
{
|
||||
PolicyRestricted = policy;
|
||||
}
|
||||
|
||||
public SocketAsyncEventArgs ()
|
||||
{
|
||||
SendPacketsSendSize = -1;
|
||||
@@ -176,25 +187,6 @@ namespace System.Net.Sockets
|
||||
GC.SuppressFinalize (this);
|
||||
}
|
||||
|
||||
internal void SetConnectByNameError (Exception error)
|
||||
{
|
||||
ConnectByNameError = error;
|
||||
}
|
||||
|
||||
internal void SetBytesTransferred (int value)
|
||||
{
|
||||
BytesTransferred = value;
|
||||
}
|
||||
|
||||
internal Socket CurrentSocket {
|
||||
get { return current_socket; }
|
||||
}
|
||||
|
||||
internal void SetCurrentSocket (Socket socket)
|
||||
{
|
||||
current_socket = socket;
|
||||
}
|
||||
|
||||
internal void SetLastOperation (SocketAsyncOperation op)
|
||||
{
|
||||
if (disposed)
|
||||
@@ -205,7 +197,7 @@ namespace System.Net.Sockets
|
||||
LastOperation = op;
|
||||
}
|
||||
|
||||
internal void Complete_internal ()
|
||||
internal void Complete ()
|
||||
{
|
||||
in_progress = 0;
|
||||
OnCompleted (this);
|
||||
@@ -277,7 +269,7 @@ namespace System.Net.Sockets
|
||||
if (current_socket != null)
|
||||
current_socket.is_connected = false;
|
||||
|
||||
Complete_internal ();
|
||||
Complete ();
|
||||
}
|
||||
|
||||
internal void FinishOperationAsyncFailure (Exception exception, int bytesTransferred, SocketFlags flags)
|
||||
@@ -287,7 +279,7 @@ namespace System.Net.Sockets
|
||||
if (current_socket != null)
|
||||
current_socket.is_connected = false;
|
||||
|
||||
Complete_internal ();
|
||||
Complete ();
|
||||
}
|
||||
|
||||
internal void FinishWrapperConnectSuccess (Socket connectSocket, int bytesTransferred, SocketFlags flags)
|
||||
@@ -295,7 +287,7 @@ namespace System.Net.Sockets
|
||||
SetResults(SocketError.Success, bytesTransferred, flags);
|
||||
current_socket = connectSocket;
|
||||
|
||||
Complete_internal ();
|
||||
Complete ();
|
||||
}
|
||||
|
||||
internal void SetResults (SocketError socketError, int bytesTransferred, SocketFlags flags)
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
|
||||
<OutputPath>./../../class/lib/net_4_x-$(HostPlatform)</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-net_4_x-$(HostPlatform)</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;CODEDOM;FEATURE_COMPILED;MONO_FEATURE_BTLS;CONFIGURATION_DEP</DefineConstants>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;CODEDOM;FEATURE_COMPILED;MONO_FEATURE_BTLS;ENABLE_GSS;CONFIGURATION_DEP</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
|
||||
<OutputPath>./../../class/lib/monodroid</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monodroid</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;FEATURE_COMPILED;MONO_FEATURE_BTLS</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID;COREFX;CONFIGURATION_2_0;SYSTEM_NET_PRIMITIVES_DLL;XML_DEP;SECURITY_DEP;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_SECURITY_ALIAS;FEATURE_COMPILED;MONO_FEATURE_BTLS;ENABLE_GSS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
|
||||
<OutputPath>./../../class/lib/monotouch</OutputPath>
|
||||
@@ -412,7 +412,11 @@
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.Compression\src\System\IO\Compression\CompressionLevel.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.Compression\src\System\IO\Compression\CompressionMode.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.Compression\src\System\IO\Compression\GZipStream.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemEventArgs.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemEventHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemWatcher.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\RenamedEventArgs.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\RenamedEventHandler.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\WaitForChangedResult.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Net.Mail\src\System\Net\Base64Stream.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\System.Net.Mail\src\System\Net\BufferBuilder.cs" />
|
||||
@@ -866,14 +870,10 @@
|
||||
<Compile Include="System.IO.Compression\DeflateStream.cs" />
|
||||
<Compile Include="System.IO\ErrorEventArgs.cs" />
|
||||
<Compile Include="System.IO\ErrorEventHandler.cs" />
|
||||
<Compile Include="System.IO\FileSystemEventArgs.cs" />
|
||||
<Compile Include="System.IO\FileSystemEventHandler.cs" />
|
||||
<Compile Include="System.IO\IODescriptionAttribute.cs" />
|
||||
<Compile Include="System.IO\InternalBufferOverflowException.cs" />
|
||||
<Compile Include="System.IO\InvalidDataException.cs" />
|
||||
<Compile Include="System.IO\NotifyFilters.cs" />
|
||||
<Compile Include="System.IO\RenamedEventArgs.cs" />
|
||||
<Compile Include="System.IO\RenamedEventHandler.cs" />
|
||||
<Compile Include="System.IO\WatcherChangeTypes.cs" />
|
||||
<Compile Include="System.Net.Mail\AlternateView.cs" />
|
||||
<Compile Include="System.Net.Mail\AlternateViewCollection.cs" />
|
||||
|
||||
@@ -110,6 +110,9 @@ System/RemoteExecutorTests.cs
|
||||
|
||||
# System.IO.FileSystemWatcher
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Utility/*.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Args.ErrorEventArgs.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Args.FileSystemEventArgs.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/Args.RenamedEventArgs.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs
|
||||
../../../external/corefx/src/Common/tests/System/IO/TempFile.cs
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
@@ -109,7 +110,72 @@ namespace MonoTests.System.IO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CreateTwoAndDispose ()
|
||||
{
|
||||
// Create two FSW instances and dispose them. Verify
|
||||
// that the backend IFileWatcher's Dispose
|
||||
// (watcher_handle) method got called.
|
||||
|
||||
// FIXME: This only works for the
|
||||
// CoreFXFileSystemWatcherProxy not the other backends.
|
||||
|
||||
using (var tmp = new TempDirectory ()) {
|
||||
// have to use reflection to poke at the private fields of FileSystemWatcher.
|
||||
var watcherField = typeof (FileSystemWatcher).GetField ("watcher", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
Assert.IsNotNull (watcherField);
|
||||
var watcherHandleField = typeof (FileSystemWatcher).GetField ("watcher_handle", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
Assert.IsNotNull (watcherHandleField);
|
||||
var proxyType = typeof (FileSystemWatcher).Assembly.GetType ("System.IO.CoreFXFileSystemWatcherProxy");
|
||||
Assert.IsNotNull (proxyType);
|
||||
|
||||
var fsw1 = new FileSystemWatcher (tmp.Path, "*");
|
||||
var fsw2 = new FileSystemWatcher (tmp.Path, "*");
|
||||
|
||||
object handle1 = null;
|
||||
object handle2 = null;
|
||||
|
||||
// using "using" to ensure that Dispose gets called even if we throw an exception
|
||||
using (var fsw11 = fsw1)
|
||||
using (var fsw22 = fsw2) {
|
||||
// at this point watcher and watcher_handle should be set
|
||||
|
||||
var watcher = watcherField.GetValue (fsw1);
|
||||
Assert.IsNotNull (watcher);
|
||||
if (!proxyType.IsAssignableFrom (watcher.GetType ()))
|
||||
Assert.Ignore ("Testing only CoreFXFileSystemWatcherProxy FSW backend");
|
||||
|
||||
handle1 = watcherHandleField.GetValue (fsw1);
|
||||
handle2 = watcherHandleField.GetValue (fsw2);
|
||||
|
||||
Assert.IsNotNull (handle1);
|
||||
Assert.IsNotNull (handle2);
|
||||
|
||||
}
|
||||
|
||||
// Dispose was called, now watcher_handle should be null
|
||||
|
||||
Assert.IsNull (watcherHandleField.GetValue (fsw1));
|
||||
Assert.IsNull (watcherHandleField.GetValue (fsw2));
|
||||
|
||||
// and moreover, the CoreFXFileSystemWatcherProxy shouldn't have entries for either handle1 or handle2
|
||||
|
||||
var proxyTypeInternalMapField = proxyType.GetField ("internal_map", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
Assert.IsNotNull (proxyTypeInternalMapField);
|
||||
var internal_map = proxyTypeInternalMapField.GetValue (null)
|
||||
as global::System.Collections.Generic.IDictionary<object, global::System.IO.CoreFX.FileSystemWatcher>;
|
||||
Assert.IsNotNull (internal_map);
|
||||
|
||||
// This pair are the critical checks: after we call Dispose on fsw1 and fsw2, the
|
||||
// backend's internal map shouldn't have anything keyed on handle1 and handle2.
|
||||
// Therefore System.IO.CoreFX.FileSystemWatcher instances will be disposed of, too.
|
||||
Assert.IsFalse (internal_map.ContainsKey (handle1));
|
||||
Assert.IsFalse (internal_map.ContainsKey (handle2));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -511,7 +511,7 @@ namespace MonoTests.System.Net.Sockets
|
||||
sock.BeginConnect (ep, new AsyncCallback(SocketError_callback),
|
||||
sock);
|
||||
|
||||
if (SocketError_event.WaitOne (2000, false) == false) {
|
||||
if (SocketError_event.WaitOne (5000, false) == false) {
|
||||
Assert.Fail ("SocketError wait timed out");
|
||||
}
|
||||
|
||||
@@ -1715,6 +1715,68 @@ namespace MonoTests.System.Net.Sockets
|
||||
listen.Close ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void BeginConnectHostNamePortWithoutCallback ()
|
||||
{
|
||||
Socket sock = new Socket (AddressFamily.InterNetwork,
|
||||
SocketType.Stream,
|
||||
ProtocolType.Tcp);
|
||||
Socket listen = new Socket (AddressFamily.InterNetwork,
|
||||
SocketType.Stream,
|
||||
ProtocolType.Tcp);
|
||||
|
||||
listen.Bind (IPAddress.Loopback, out IPEndPoint ep);
|
||||
listen.Listen (1);
|
||||
|
||||
IAsyncResult result = sock.BeginConnect (IPAddress.Loopback.ToString (), ep.Port, null, null);
|
||||
|
||||
if (result.AsyncWaitHandle.WaitOne (2000, false) == false) {
|
||||
Assert.Fail ("BeginConnectHostNamePortWithoutCallback wait timed out");
|
||||
}
|
||||
|
||||
Assert.AreEqual (true, result.IsCompleted, "BeginConnectHostNamePortWithoutCallback #1");
|
||||
|
||||
sock.EndConnect (result);
|
||||
|
||||
sock.Close ();
|
||||
listen.Close ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
public void BeginConnectHostNamePortWithCallback ()
|
||||
{
|
||||
Socket sock = new Socket (AddressFamily.InterNetwork,
|
||||
SocketType.Stream,
|
||||
ProtocolType.Tcp);
|
||||
Socket listen = new Socket (AddressFamily.InterNetwork,
|
||||
SocketType.Stream,
|
||||
ProtocolType.Tcp);
|
||||
|
||||
listen.Bind (IPAddress.Loopback, out IPEndPoint ep);
|
||||
listen.Listen (1);
|
||||
|
||||
BCCalledBack.Reset ();
|
||||
|
||||
BCConnected = false;
|
||||
|
||||
IAsyncResult result = sock.BeginConnect (IPAddress.Loopback.ToString (), ep.Port, BCCallback, sock);
|
||||
|
||||
if (BCCalledBack.WaitOne (2000, false) == false) {
|
||||
Assert.Fail ("BeginConnectHostNamePortWithCallback wait timed out");
|
||||
}
|
||||
|
||||
Assert.AreEqual (true, BCConnected, "BeginConnectHostNamePortWithCallback #1");
|
||||
|
||||
sock.Close ();
|
||||
listen.Close ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace MonoTests.System.Net.WebSockets
|
||||
[TestFixture]
|
||||
public class ClientWebSocketTest
|
||||
{
|
||||
const string EchoServerUrl = "ws://corefx-net.cloudapp.net/WebSocket/EchoWebSocket.ashx";
|
||||
const string EchoServerUrl = "ws://corefx-net-http11.azurewebsites.net/WebSocket/EchoWebSocket.ashx";
|
||||
|
||||
ClientWebSocket socket;
|
||||
MethodInfo headerSetMethod;
|
||||
|
||||
@@ -28,14 +28,10 @@ System.IO.Compression/DeflateStream.cs
|
||||
|
||||
System.IO/ErrorEventArgs.cs
|
||||
System.IO/ErrorEventHandler.cs
|
||||
System.IO/FileSystemEventArgs.cs
|
||||
System.IO/FileSystemEventHandler.cs
|
||||
System.IO/InternalBufferOverflowException.cs
|
||||
System.IO/InvalidDataException.cs
|
||||
System.IO/IODescriptionAttribute.cs
|
||||
System.IO/NotifyFilters.cs
|
||||
System.IO/RenamedEventArgs.cs
|
||||
System.IO/RenamedEventHandler.cs
|
||||
System.IO/WatcherChangeTypes.cs
|
||||
|
||||
System.Net/BasicClient.cs
|
||||
@@ -872,13 +868,17 @@ ReferenceSources/Win32Exception.cs
|
||||
../../../external/corefx/src/System.Private.Uri/src/System/UriBuilder.cs
|
||||
|
||||
../../../external/corefx/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemEventArgs.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemEventHandler.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/RenamedEventArgs.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/RenamedEventHandler.cs
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/WaitForChangedResult.cs
|
||||
|
||||
../../../external/corefx/src/System.Runtime.InteropServices/src/System/Security/SecureStringMarshal.cs
|
||||
../../../external/corefx/src/System.Runtime.Extensions/src/System/StringNormalizationExtensions.cs
|
||||
../../../external/corefx/src/System.Diagnostics.StackTrace/src/System/Diagnostics/StackFrameExtensions.cs
|
||||
|
||||
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.cs
|
||||
|
||||
# Everything except compiled
|
||||
../../../external/corefx/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Capture.cs
|
||||
|
||||
@@ -232,7 +232,7 @@ TEST_RESOURCES = $(TEST_RESX_RESOURCES) $(TEST_RESX_RESOURCES_SATELITE)
|
||||
satellite_assembly1 = $(test_lib_dir)/es-ES/$(patsubst %.dll,%.resources.dll,$(test_lib))
|
||||
satellite_assembly2 = $(test_lib_dir)/nn-NO/$(patsubst %.dll,%.resources.dll,$(test_lib))
|
||||
|
||||
$(test_lib_output): $(TEST_RESOURCES) $(satellite_assembly1) $(satellite_assembly2) $(test_lib_dir)
|
||||
$(test_lib_output): $(TEST_RESOURCES) $(satellite_assembly1) $(satellite_assembly2) | $(test_lib_dir)
|
||||
|
||||
mscorlib_for_profile = $(topdir)/class/lib/$(PROFILE)/mscorlib.dll
|
||||
|
||||
@@ -298,11 +298,8 @@ NO_VTS_TEST = yes
|
||||
endif
|
||||
|
||||
ifndef NO_VTS_TEST
|
||||
test: test-vts
|
||||
run-test: run-test-vts
|
||||
else
|
||||
test:
|
||||
run-test:
|
||||
test-local: test-vts
|
||||
run-test-local: run-test-vts
|
||||
endif
|
||||
|
||||
EXTRA_DISTFILES += \
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace Mono {
|
||||
static extern void DisableMicrosoftTelemetry ();
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void EnableMicrosoftTelemetry_internal (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath, IntPtr eventType, IntPtr appPath, IntPtr configDir);
|
||||
static extern void EnableMicrosoftTelemetry_internal (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath, IntPtr appPath, IntPtr configDir);
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void SendMicrosoftTelemetry_internal (IntPtr payload, ulong portable_hash, ulong unportable_hash);
|
||||
@@ -148,18 +148,17 @@ namespace Mono {
|
||||
}
|
||||
|
||||
// All must be set except for configDir_str
|
||||
static void EnableMicrosoftTelemetry (string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str, string eventType_str, string appPath_str, string configDir_str)
|
||||
static void EnableMicrosoftTelemetry (string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str, string unused /* eventType_str */, string appPath_str, string configDir_str)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
|
||||
using (var appBundleID_chars = RuntimeMarshal.MarshalString (appBundleID_str))
|
||||
using (var appSignature_chars = RuntimeMarshal.MarshalString (appSignature_str))
|
||||
using (var appVersion_chars = RuntimeMarshal.MarshalString (appVersion_str))
|
||||
using (var merpGUIPath_chars = RuntimeMarshal.MarshalString (merpGUIPath_str))
|
||||
using (var eventType_chars = RuntimeMarshal.MarshalString (eventType_str))
|
||||
using (var appPath_chars = RuntimeMarshal.MarshalString (appPath_str))
|
||||
using (var configDir_chars = RuntimeMarshal.MarshalString (configDir_str))
|
||||
{
|
||||
EnableMicrosoftTelemetry_internal (appBundleID_chars.Value, appSignature_chars.Value, appVersion_chars.Value, merpGUIPath_chars.Value, eventType_chars.Value, appPath_chars.Value, configDir_chars.Value);
|
||||
EnableMicrosoftTelemetry_internal (appBundleID_chars.Value, appSignature_chars.Value, appVersion_chars.Value, merpGUIPath_chars.Value, appPath_chars.Value, configDir_chars.Value);
|
||||
}
|
||||
} else {
|
||||
throw new PlatformNotSupportedException("Merp support is currently only supported on OSX.");
|
||||
@@ -193,6 +192,14 @@ namespace Mono {
|
||||
return new Tuple<String, ulong, ulong> (payload_str, portable_hash, unportable_hash);
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void RegisterReportingForAllNativeLibs_internal ();
|
||||
|
||||
static void RegisterReportingForAllNativeLibs ()
|
||||
{
|
||||
RegisterReportingForAllNativeLibs_internal ();
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void RegisterReportingForNativeLib_internal (IntPtr modulePathSuffix, IntPtr moduleName);
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace System
|
||||
dst += int.MaxValue;
|
||||
}
|
||||
|
||||
Memcpy (dst, src, (int) sourceBytesToCopy);
|
||||
memcpy1 (dst, src, (int) sourceBytesToCopy);
|
||||
}
|
||||
|
||||
[CLSCompliantAttribute (false)]
|
||||
|
||||
@@ -34,6 +34,36 @@ namespace System.Globalization
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
partial class CalendarData
|
||||
{
|
||||
private static string[] HEBREW_MONTH_NAMES = new[] {
|
||||
"\u05EA\u05E9\u05E8\u05D9",
|
||||
"\u05D7\u05E9\u05D5\u05DF",
|
||||
"\u05DB\u05E1\u05DC\u05D5",
|
||||
"\u05D8\u05D1\u05EA",
|
||||
"\u05E9\u05D1\u05D8",
|
||||
"\u05D0\u05D3\u05E8",
|
||||
"\u05D0\u05D3\u05E8\u0020\u05D1",
|
||||
"\u05E0\u05D9\u05E1\u05DF",
|
||||
"\u05D0\u05D9\u05D9\u05E8",
|
||||
"\u05E1\u05D9\u05D5\u05DF",
|
||||
"\u05EA\u05DE\u05D5\u05D6",
|
||||
"\u05D0\u05D1",
|
||||
"\u05D0\u05DC\u05D5\u05DC" };
|
||||
|
||||
private static string[] HEBREW_LEAP_MONTH_NAMES = new[] {
|
||||
"\u05EA\u05E9\u05E8\u05D9",
|
||||
"\u05D7\u05E9\u05D5\u05DF",
|
||||
"\u05DB\u05E1\u05DC\u05D5",
|
||||
"\u05D8\u05D1\u05EA",
|
||||
"\u05E9\u05D1\u05D8",
|
||||
"\u05D0\u05D3\u05E8\u0020\u05D0",
|
||||
"\u05D0\u05D3\u05E8\u0020\u05D1",
|
||||
"\u05E0\u05D9\u05E1\u05DF",
|
||||
"\u05D0\u05D9\u05D9\u05E8",
|
||||
"\u05E1\u05D9\u05D5\u05DF",
|
||||
"\u05EA\u05DE\u05D5\u05D6",
|
||||
"\u05D0\u05D1",
|
||||
"\u05D0\u05DC\u05D5\u05DC" };
|
||||
|
||||
public static int nativeGetTwoDigitYearMax (int calID)
|
||||
{
|
||||
// -1 mean OS does not override default BCL max year
|
||||
@@ -43,7 +73,17 @@ namespace System.Globalization
|
||||
static bool nativeGetCalendarData (CalendarData data, string localeName, int calendarId)
|
||||
{
|
||||
// TODO: Convert calendar-id to mono runtime calendar-id when it's used
|
||||
return data.fill_calendar_data (localeName.ToLowerInvariant (), calendarId);
|
||||
if (data.fill_calendar_data (localeName.ToLowerInvariant (), calendarId)) {
|
||||
if ((CalendarId)calendarId == CalendarId.HEBREW) {
|
||||
// HACK: Generate leap month names because the native code does not do it
|
||||
// and tests would fail to round-trip dates on leap years.
|
||||
// https://github.com/mono/mono/issues/16623
|
||||
data.saMonthNames = HEBREW_MONTH_NAMES;
|
||||
data.saLeapYearMonthNames = HEBREW_LEAP_MONTH_NAMES;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
|
||||
@@ -433,6 +433,21 @@ namespace System.IO
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
private extern static bool Cancel_internal (IntPtr handle, out MonoIOError error);
|
||||
|
||||
internal static bool Cancel (SafeHandle safeHandle, out MonoIOError error)
|
||||
{
|
||||
bool release = false;
|
||||
try {
|
||||
safeHandle.DangerousAddRef (ref release);
|
||||
return Cancel_internal (safeHandle.DangerousGetHandle (), out error);
|
||||
} finally {
|
||||
if (release)
|
||||
safeHandle.DangerousRelease ();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
public extern static bool Close (IntPtr handle,
|
||||
out MonoIOError error);
|
||||
|
||||
@@ -75,8 +75,8 @@ namespace System.IO
|
||||
ERROR_SHARING_BUFFER_EXCEEDED = 36,
|
||||
ERROR_HANDLE_EOF = 38,
|
||||
*/ ERROR_HANDLE_DISK_FULL = 39,
|
||||
/* ERROR_NOT_SUPPORTED = 50,
|
||||
ERROR_REM_NOT_LIST = 51,
|
||||
ERROR_NOT_SUPPORTED = 50,
|
||||
/* ERROR_REM_NOT_LIST = 51,
|
||||
ERROR_DUP_NAME = 52,
|
||||
ERROR_BAD_NETPATH = 53,
|
||||
ERROR_NETWORK_BUSY = 54,
|
||||
|
||||
@@ -54,10 +54,8 @@ namespace System.Threading {
|
||||
IntPtr handle;
|
||||
IntPtr native_handle; // used only on Win32
|
||||
/* accessed only from unmanaged code */
|
||||
private IntPtr name_chars;
|
||||
private IntPtr name_generation;
|
||||
private int name_free;
|
||||
private int name_length;
|
||||
private IntPtr name;
|
||||
private int name_len;
|
||||
private ThreadState state;
|
||||
private object abort_exc;
|
||||
private int abort_state_handle;
|
||||
@@ -405,13 +403,7 @@ namespace System.Threading {
|
||||
private extern static string GetName_internal (InternalThread thread);
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
private static unsafe extern void SetName_icall (InternalThread thread, char *name, int nameLength);
|
||||
|
||||
private static unsafe void SetName_internal (InternalThread thread, String name)
|
||||
{
|
||||
fixed (char* fixed_name = name)
|
||||
SetName_icall (thread, fixed_name, name?.Length ?? 0);
|
||||
}
|
||||
private extern static void SetName_internal (InternalThread thread, String name);
|
||||
|
||||
/*
|
||||
* The thread name must be shared by appdomains, so it is stored in
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Globalization;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
@@ -143,8 +142,9 @@ namespace System
|
||||
if (appBase == null)
|
||||
return null;
|
||||
|
||||
if (appBase.StartsWith ("file://", StringComparison.OrdinalIgnoreCase)) {
|
||||
appBase = new Mono.Security.Uri (appBase).LocalPath;
|
||||
int len = appBase.Length;
|
||||
if (len >= 8 && appBase.ToLower ().StartsWith ("file://")) {
|
||||
appBase = appBase.Substring (7);
|
||||
if (Path.DirectorySeparatorChar != '/')
|
||||
appBase = appBase.Replace ('/', Path.DirectorySeparatorChar);
|
||||
}
|
||||
|
||||
@@ -1216,10 +1216,13 @@ namespace System
|
||||
return false;
|
||||
}
|
||||
|
||||
var isUtc = false;
|
||||
if (dateTime.Kind != DateTimeKind.Utc) {
|
||||
if (!TryAddTicks (date, -BaseUtcOffset.Ticks, out date, DateTimeKind.Utc))
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
isUtc = true;
|
||||
|
||||
|
||||
AdjustmentRule current = GetApplicableRule (date);
|
||||
if (current != null) {
|
||||
@@ -1231,7 +1234,7 @@ namespace System
|
||||
if (forOffset)
|
||||
isDst = true;
|
||||
offset = baseUtcOffset;
|
||||
if (date >= new DateTime (tStart.Ticks + current.DaylightDelta.Ticks, DateTimeKind.Utc))
|
||||
if (isUtc || (date >= new DateTime (tStart.Ticks + current.DaylightDelta.Ticks, DateTimeKind.Utc)))
|
||||
{
|
||||
offset += current.DaylightDelta;
|
||||
isDst = true;
|
||||
|
||||
@@ -39,7 +39,6 @@ namespace Mono
|
||||
MONO_NATIVE_PLATFORM_TYPE_ANDROID = 5,
|
||||
MONO_NATIVE_PLATFORM_TYPE_FREEBSD = 6,
|
||||
MONO_NATIVE_PLATFORM_TYPE_HAIKU = 7,
|
||||
MONO_NATIVE_PLATFORM_TYPE_NETBSD = 8,
|
||||
|
||||
MONO_NATIVE_PLATFORM_TYPE_IPHONE = 0x100,
|
||||
MONO_NATIVE_PLATFORM_TYPE_TV = 0x200,
|
||||
|
||||
@@ -899,6 +899,40 @@ namespace MonoTests.System.Reflection.Emit
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MethodInfoGetParametersCrash () {
|
||||
// Regression test for https://github.com/mono/mono/issues/16570
|
||||
//
|
||||
// MethodInfo.GetParameters() called on a dynamic assembly would attempt to copy the custom_name and cookie, which could be junk depending
|
||||
// on how the union is being used.
|
||||
var aName = new AssemblyName("TestAssembly");
|
||||
var testAssembly = AppDomain.CurrentDomain.DefineDynamicAssembly(aName, AssemblyBuilderAccess.RunAndSave);
|
||||
var testModule = testAssembly.DefineDynamicModule(aName.Name, aName.Name + ".dll");
|
||||
|
||||
var typeBuilder = testModule.DefineType("TestType");
|
||||
|
||||
var ctorBuilder = typeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, Type.EmptyTypes);
|
||||
|
||||
var ctorIl = ctorBuilder.GetILGenerator();
|
||||
ctorIl.Emit(OpCodes.Ret);
|
||||
|
||||
var methodBuilder = typeBuilder.DefineMethod("TestMethod", MethodAttributes.Public, typeof(void), new[] { typeof(int[]) });
|
||||
methodBuilder.DefineParameter(0, ParameterAttributes.Retval, null);
|
||||
var paramBuilder = methodBuilder.DefineParameter(1, ParameterAttributes.None, null);
|
||||
|
||||
var attrCtor = typeof(MarshalAsAttribute).GetConstructor(new[] { typeof(UnmanagedType) });
|
||||
object[] ctorArgs = { UnmanagedType.LPArray };
|
||||
var attr = new CustomAttributeBuilder(attrCtor, ctorArgs);
|
||||
paramBuilder.SetCustomAttribute(attr);
|
||||
|
||||
var methodIl = methodBuilder.GetILGenerator();
|
||||
methodIl.Emit(OpCodes.Ret);
|
||||
|
||||
var createdType = typeBuilder.CreateType();
|
||||
|
||||
var methodInfo = createdType.GetMethod("TestMethod", BindingFlags.Instance | BindingFlags.Public);
|
||||
methodInfo.GetParameters();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,9 +29,11 @@
|
||||
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using NUnit.Framework;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MonoTests.System.Threading
|
||||
{
|
||||
@@ -496,33 +498,102 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
}
|
||||
|
||||
[Test] // https://github.com/mono/mono/issues/12421
|
||||
public void EnsurePostIsNotCalled ()
|
||||
[Test] // https://github.com/mono/mono/issues/16759
|
||||
[Category("NotWasm")]
|
||||
public void EnsureCanceledContinuationsAreOnSameThread ()
|
||||
{
|
||||
SynchronizationContext mainContext = SynchronizationContext.Current;
|
||||
var asc = new AssertSyncContext ();
|
||||
SynchronizationContext.SetSynchronizationContext (asc);
|
||||
var ct = new CancellationTokenSource ();
|
||||
var tcs = new TaskCompletionSource<bool> ();
|
||||
ct.Token.Register (() => tcs.TrySetCanceled ());
|
||||
AsyncPump.Run(async delegate {
|
||||
var _tcs = new TaskCompletionSource<bool>();
|
||||
var _cts = new CancellationTokenSource();
|
||||
|
||||
bool taskIsCancelled = false;
|
||||
Action awaitAction = async () => {
|
||||
try { await tcs.Task; }
|
||||
catch (OperationCanceledException) {
|
||||
taskIsCancelled = true;
|
||||
}
|
||||
};
|
||||
awaitAction ();
|
||||
ct.Cancel (); // should not trigger SynchronizationContext.Post
|
||||
Assert.IsTrue (taskIsCancelled);
|
||||
SynchronizationContext.SetSynchronizationContext (mainContext);
|
||||
var curThreadId = Thread.CurrentThread.ManagedThreadId;
|
||||
var taskThreadId = 0;
|
||||
var taskIsCancelled = false;
|
||||
|
||||
var task = Task.Run(() =>
|
||||
{
|
||||
taskThreadId = Thread.CurrentThread.ManagedThreadId;
|
||||
_cts.Cancel();
|
||||
});
|
||||
|
||||
_cts.Token.Register(() => _tcs.TrySetCanceled());
|
||||
try
|
||||
{
|
||||
await _tcs.Task;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Continuation should run on the same thread before the task started.
|
||||
Assert.AreEqual(curThreadId, Thread.CurrentThread.ManagedThreadId, "#1");
|
||||
taskIsCancelled = true;
|
||||
}
|
||||
|
||||
Assert.IsTrue (taskIsCancelled, "#2");
|
||||
Assert.AreNotEqual(taskThreadId, curThreadId, "#3");
|
||||
});
|
||||
}
|
||||
|
||||
class AssertSyncContext : SynchronizationContext
|
||||
public static class AsyncPump
|
||||
{
|
||||
public override void Post (SendOrPostCallback d, object state) =>
|
||||
throw new InvalidOperationException ("SynchronizationContext.Post was not expected.");
|
||||
/// <summary>Runs the specified asynchronous function.</summary>
|
||||
/// <param name="func">The asynchronous function to execute.</param>
|
||||
public static void Run(Func<Task> func)
|
||||
{
|
||||
if (func == null) throw new ArgumentNullException("func");
|
||||
|
||||
var prevCtx = SynchronizationContext.Current;
|
||||
try
|
||||
{
|
||||
// Establish the new context
|
||||
var syncCtx = new SingleThreadSynchronizationContext();
|
||||
SynchronizationContext.SetSynchronizationContext(syncCtx);
|
||||
|
||||
// Invoke the function and alert the context to when it completes
|
||||
var t = func();
|
||||
if (t == null) throw new InvalidOperationException("No task provided.");
|
||||
t.ContinueWith(delegate { syncCtx.Complete(); }, TaskScheduler.Default);
|
||||
|
||||
// Pump continuations and propagate any exceptions
|
||||
syncCtx.RunOnCurrentThread();
|
||||
t.GetAwaiter().GetResult();
|
||||
}
|
||||
finally { SynchronizationContext.SetSynchronizationContext(prevCtx); }
|
||||
}
|
||||
|
||||
/// <summary>Provides a SynchronizationContext that's single-threaded.</summary>
|
||||
private sealed class SingleThreadSynchronizationContext : SynchronizationContext
|
||||
{
|
||||
/// <summary>The queue of work items.</summary>
|
||||
private readonly BlockingCollection<KeyValuePair<SendOrPostCallback, object>> m_queue =
|
||||
new BlockingCollection<KeyValuePair<SendOrPostCallback, object>>();
|
||||
/// <summary>The processing thread.</summary>
|
||||
private readonly Thread m_thread = Thread.CurrentThread;
|
||||
|
||||
/// <summary>Dispatches an asynchronous message to the synchronization context.</summary>
|
||||
/// <param name="d">The System.Threading.SendOrPostCallback delegate to call.</param>
|
||||
/// <param name="state">The object passed to the delegate.</param>
|
||||
public override void Post(SendOrPostCallback d, object state)
|
||||
{
|
||||
if (d == null) throw new ArgumentNullException("d");
|
||||
m_queue.Add(new KeyValuePair<SendOrPostCallback, object>(d, state));
|
||||
}
|
||||
|
||||
/// <summary>Not supported.</summary>
|
||||
public override void Send(SendOrPostCallback d, object state)
|
||||
{
|
||||
throw new NotSupportedException("Synchronously sending is not supported.");
|
||||
}
|
||||
|
||||
/// <summary>Runs an loop to process all queued work items.</summary>
|
||||
public void RunOnCurrentThread()
|
||||
{
|
||||
foreach (var workItem in m_queue.GetConsumingEnumerable())
|
||||
workItem.Key(workItem.Value);
|
||||
}
|
||||
|
||||
/// <summary>Notifies the context that no more work will arrive.</summary>
|
||||
public void Complete() { m_queue.CompleteAdding(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,25 +198,6 @@ namespace MonoTests.System
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ApplicationBase9 ()
|
||||
{
|
||||
AppDomainSetup setup = new AppDomainSetup ();
|
||||
string url = "file://";
|
||||
if (RunningOnWindows)
|
||||
{
|
||||
url += "/" + Environment.CurrentDirectory;
|
||||
setup.ApplicationBase = url;
|
||||
Assert.AreEqual (Environment.CurrentDirectory, setup.ApplicationBase);
|
||||
}
|
||||
else
|
||||
{
|
||||
url += "/home";
|
||||
setup.ApplicationBase = url;
|
||||
Assert.AreEqual ("/home", setup.ApplicationBase);
|
||||
}
|
||||
}
|
||||
|
||||
#if MONO_FEATURE_MULTIPLE_APPDOMAINS
|
||||
[Test]
|
||||
#if MOBILE
|
||||
|
||||
@@ -54,8 +54,11 @@ namespace MonoTests.System
|
||||
return "New Zealand Standard Time";
|
||||
case "Europe/Athens":
|
||||
return "GTB Standard Time";
|
||||
case "Europe/Chisinau":
|
||||
return "E. Europe Standard Time";
|
||||
case "US/Eastern":
|
||||
return "Eastern Standard Time";
|
||||
case "America/Chicago":
|
||||
case "US/Central":
|
||||
return "Central Standard Time";
|
||||
case "US/Pacific":
|
||||
@@ -64,18 +67,57 @@ namespace MonoTests.System
|
||||
case "Australia/Melbourne":
|
||||
return "AUS Eastern Standard Time";
|
||||
case "Europe/Brussels":
|
||||
case "Europe/Copenhagen":
|
||||
case "Europe/Paris":
|
||||
case "Europe/Madrid":
|
||||
return "Romance Standard Time";
|
||||
case "Africa/Kinshasa":
|
||||
return "W. Central Africa Standard Time";
|
||||
case "Europe/Rome":
|
||||
case "Europe/Vatican":
|
||||
case "Europe/Vienna":
|
||||
case "Europe/Berlin":
|
||||
case "Europe/Luxembourg":
|
||||
case "Europe/Malta":
|
||||
case "Europe/Monaco":
|
||||
case "Europe/Amsterdam":
|
||||
case "Europe/Oslo":
|
||||
case "Europe/San_Marino":
|
||||
return "W. Europe Standard Time";
|
||||
case "Canada/Eastern":
|
||||
return "Eastern Standard Time";
|
||||
case "Asia/Tehran":
|
||||
return "Iran Standard Time";
|
||||
case "Europe/Guernsey":
|
||||
case "Europe/Dublin":
|
||||
case "Europe/Isle_of_Man":
|
||||
case "Europe/Jersey":
|
||||
case "Europe/Lisbon":
|
||||
case "Europe/London":
|
||||
return "GMT Standard Time";
|
||||
case "America/Havana":
|
||||
return "Cuba Standard Time";
|
||||
case "America/Anchorage":
|
||||
return "Alaskan Standard Time";
|
||||
case "Atlantic/Azores":
|
||||
return "Azores Standard Time";
|
||||
case "Asia/Jerusalem":
|
||||
return "Israel Standard Time";
|
||||
case "Asia/Amman":
|
||||
return "Jordan Standard Time";
|
||||
case "Europe/Tirane":
|
||||
case "Europe/Warsaw":
|
||||
return "Central European Standard Time";
|
||||
case "Europe/Sofia":
|
||||
case "Europe/Tallinn":
|
||||
case "Europe/Riga":
|
||||
case "Europe/Vilnius":
|
||||
case "Europe/Kiev":
|
||||
return "FLE Standard Time";
|
||||
case "Europe/Prague":
|
||||
case "Europe/Budapest":
|
||||
case "Europe/Bratislava":
|
||||
return "Central Europe Standard Time";
|
||||
default:
|
||||
Assert.Fail ($"No mapping defined for zone id '{id}'");
|
||||
return null;
|
||||
@@ -482,6 +524,218 @@ namespace MonoTests.System
|
||||
Assert.AreEqual (new TimeSpan (0, 0, 0), tzi.GetUtcOffset (date));
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Bug_16395 ()
|
||||
{
|
||||
// Cuba, Havana (Cuba Standard Time): Jumps ahead at 12:00 AM on 3/8/2020 to 1:00 AM
|
||||
CheckJumpingIntoDST ("America/Havana",
|
||||
new DateTime (2020, 3, 8, 0, 0, 0), new DateTime (2020, 3, 8, 0, 30, 0), new DateTime (2020, 3, 8, 1, 0, 0),
|
||||
new TimeSpan (-5, 0, 0), new TimeSpan (-4, 0, 0));
|
||||
|
||||
// US, Kansas City, MO (US Central Time): Jumps ahead at 2:00 AM on 3/8/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("America/Chicago",
|
||||
new DateTime (2020, 3, 8, 2, 0, 0), new DateTime (2020, 3, 8, 2, 30, 0), new DateTime (2020, 3, 8, 3, 0, 0),
|
||||
new TimeSpan (-6, 0, 0), new TimeSpan (-5, 0, 0));
|
||||
|
||||
// Anchorage, AK (Alaska Time): Jumps ahead at 2:00 AM on 3/8/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("America/Anchorage",
|
||||
new DateTime (2020, 3, 8, 2, 0, 0), new DateTime (2020, 3, 8, 2, 30, 0), new DateTime (2020, 3, 8, 3, 0, 0),
|
||||
new TimeSpan (-9, 0, 0), new TimeSpan (-8, 0, 0));
|
||||
|
||||
// Azores ST (Ponta Delgada, Portugal): Jumps ahead at 12:00 AM on 3/29/2020 to 1:00 AM
|
||||
CheckJumpingIntoDST ("Atlantic/Azores",
|
||||
new DateTime (2020, 3, 29, 0, 0, 0), new DateTime (2020, 3, 29, 0, 30, 0), new DateTime (2020, 3, 29, 1, 0, 0),
|
||||
new TimeSpan (-1, 0, 0), new TimeSpan (0, 0, 0));
|
||||
|
||||
// Iran, Tehran (Iran ST): Jumps ahead at 12:00 AM on 3/21/2020 to 1:00 AM
|
||||
CheckJumpingIntoDST ("Asia/Tehran",
|
||||
new DateTime (2020, 3, 21, 0, 0, 0), new DateTime (2020, 3, 21, 0, 30, 0), new DateTime (2020, 3, 21, 1, 0, 0),
|
||||
new TimeSpan (3, 30, 0), new TimeSpan (4, 30, 0));
|
||||
|
||||
// Israel, Jerusalem (Israel ST): Jumps ahead at 2:00 AM on 3/27/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Asia/Jerusalem",
|
||||
new DateTime (2020, 3, 27, 2, 0, 0), new DateTime (2020, 3, 27, 2, 30, 0), new DateTime (2020, 3, 27, 3, 0, 0),
|
||||
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
|
||||
|
||||
// Jordan, Amman (Eastern European ST): Jumps ahead at 12:00 AM on 3/27/2020 to 1:00 AM
|
||||
CheckJumpingIntoDST ("Asia/Amman",
|
||||
new DateTime (2020, 3, 27, 0, 0, 0), new DateTime (2020, 3, 27, 0, 30, 0), new DateTime (2020, 3, 27, 1, 0, 0),
|
||||
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
|
||||
|
||||
// Albania, Tirana (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Tirane",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Austria, Vienna (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Vienna",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Belgium, Brussels (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Brussels",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Bulgaria, Sofia (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Sofia",
|
||||
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
|
||||
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
|
||||
|
||||
// Czechia, Prague (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Prague",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Denmark, Copenhagen (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Copenhagen",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Estonia, Tallinn (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Tallinn",
|
||||
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
|
||||
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
|
||||
|
||||
// France, Paris (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Paris",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Germany, Berlin (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Berlin",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Greece, Athens (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Athens",
|
||||
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
|
||||
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
|
||||
|
||||
// Guernsey (UK) Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Guernsey",
|
||||
new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
|
||||
new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
|
||||
|
||||
// Holy See, Vatican City (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Vatican",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Hungary, Budapest (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Budapest",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// // Ireland, Dublin (Greenwich Mean Time -> Irish Standard Time): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
|
||||
// CheckJumpingIntoDST ("Europe/Dublin",
|
||||
// new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
|
||||
// new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
|
||||
|
||||
// UK, Douglas, Isle of Man (GMT+1:00): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Isle_of_Man",
|
||||
new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
|
||||
new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
|
||||
|
||||
// Italy, Rome (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Rome",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Jersey (UK): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Jersey",
|
||||
new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
|
||||
new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
|
||||
|
||||
// Latvia, Riga (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Riga",
|
||||
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
|
||||
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
|
||||
|
||||
// Lithuania, Vilnius (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Vilnius",
|
||||
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
|
||||
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
|
||||
|
||||
// Luxembourg, Luxembourg (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Luxembourg",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Malta, Valletta (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Malta",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Moldova, Chişinău (Eastern European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Chisinau",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
|
||||
|
||||
// Monaco, Monaco (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Monaco",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Netherlands, Amsterdam (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Amsterdam",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Norway, Oslo (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Oslo",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Poland, Warsaw (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Warsaw",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Portugal, Lisbon (Western European ST): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Lisbon",
|
||||
new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
|
||||
new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
|
||||
|
||||
// San Marino, San Marino (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/San_Marino",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Slovakia, Bratislava (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Bratislava",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Spain, Madrid (Central European ST): Jumps ahead at 2:00 AM on 3/29/2020 to 3:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Madrid",
|
||||
new DateTime (2020, 3, 29, 2, 0, 0), new DateTime (2020, 3, 29, 2, 30, 0), new DateTime (2020, 3, 29, 3, 0, 0),
|
||||
new TimeSpan (1, 0, 0), new TimeSpan (2, 0, 0));
|
||||
|
||||
// Ukraine, Kiev (Eastern European ST): Jumps ahead at 3:00 AM on 3/29/2020 to 4:00 AM
|
||||
CheckJumpingIntoDST ("Europe/Kiev",
|
||||
new DateTime (2020, 3, 29, 3, 0, 0), new DateTime (2020, 3, 29, 3, 30, 0), new DateTime (2020, 3, 29, 4, 0, 0),
|
||||
new TimeSpan (2, 0, 0), new TimeSpan (3, 0, 0));
|
||||
|
||||
// United Kingdom, London (British ST): Jumps ahead at 1:00 AM on 3/29/2020 to 2:00 AM
|
||||
CheckJumpingIntoDST ("Europe/London",
|
||||
new DateTime (2020, 3, 29, 1, 0, 0), new DateTime (2020, 3, 29, 1, 30, 0), new DateTime (2020, 3, 29, 2, 0, 0),
|
||||
new TimeSpan (0, 0, 0), new TimeSpan (1, 0, 0));
|
||||
}
|
||||
|
||||
void CheckJumpingIntoDST (string tzId, DateTime dstDeltaStart, DateTime inDstDelta, DateTime dstDeltaEnd, TimeSpan baseOffset, TimeSpan dstOffset)
|
||||
{
|
||||
var tzi = TimeZoneInfo.FindSystemTimeZoneById (MapTimeZoneId (tzId));
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (dstDeltaStart), $"{tzId}: #1");
|
||||
Assert.AreEqual (baseOffset, tzi.GetUtcOffset (dstDeltaStart), $"{tzId}: #2");
|
||||
|
||||
Assert.IsFalse (tzi.IsDaylightSavingTime (inDstDelta), $"{tzId}: #3");
|
||||
Assert.AreEqual (baseOffset, tzi.GetUtcOffset (inDstDelta), $"{tzId}: #4");
|
||||
|
||||
Assert.IsTrue (tzi.IsDaylightSavingTime (dstDeltaEnd), $"{tzId}: #5");
|
||||
Assert.AreEqual (dstOffset, tzi.GetUtcOffset (dstDeltaEnd), $"{tzId}: #6");
|
||||
}
|
||||
}
|
||||
|
||||
[TestFixture]
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
// 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.Diagnostics;
|
||||
|
||||
namespace System.Buffers
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a heap-based, array-backed output sink into which <typeparam name="T"/> data can be written.
|
||||
/// </summary>
|
||||
public sealed class ArrayBufferWriter<T> : IBufferWriter<T>
|
||||
{
|
||||
private T[] _buffer;
|
||||
private int _index;
|
||||
|
||||
private const int DefaultInitialBufferSize = 256;
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of an <see cref="ArrayBufferWriter{T}"/>, in which data can be written to,
|
||||
/// with the default initial capacity.
|
||||
/// </summary>
|
||||
public ArrayBufferWriter()
|
||||
{
|
||||
_buffer = Array.Empty<T>();
|
||||
_index = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of an <see cref="ArrayBufferWriter{T}"/>, in which data can be written to,
|
||||
/// with an initial capacity specified.
|
||||
/// </summary>
|
||||
/// <param name="initialCapacity">The minimum capacity with which to initialize the underlying buffer.</param>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown when <paramref name="initialCapacity"/> is not positive (i.e. less than or equal to 0).
|
||||
/// </exception>
|
||||
public ArrayBufferWriter(int initialCapacity)
|
||||
{
|
||||
if (initialCapacity <= 0)
|
||||
throw new ArgumentException(nameof(initialCapacity));
|
||||
|
||||
_buffer = new T[initialCapacity];
|
||||
_index = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the data written to the underlying buffer so far, as a <see cref="ReadOnlyMemory{T}"/>.
|
||||
/// </summary>
|
||||
public ReadOnlyMemory<T> WrittenMemory => _buffer.AsMemory(0, _index);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the data written to the underlying buffer so far, as a <see cref="ReadOnlySpan{T}"/>.
|
||||
/// </summary>
|
||||
public ReadOnlySpan<T> WrittenSpan => _buffer.AsSpan(0, _index);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the amount of data written to the underlying buffer so far.
|
||||
/// </summary>
|
||||
public int WrittenCount => _index;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the total amount of space within the underlying buffer.
|
||||
/// </summary>
|
||||
public int Capacity => _buffer.Length;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the amount of space available that can still be written into without forcing the underlying buffer to grow.
|
||||
/// </summary>
|
||||
public int FreeCapacity => _buffer.Length - _index;
|
||||
|
||||
/// <summary>
|
||||
/// Clears the data written to the underlying buffer.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// You must clear the <see cref="ArrayBufferWriter{T}"/> before trying to re-use it.
|
||||
/// </remarks>
|
||||
public void Clear()
|
||||
{
|
||||
Debug.Assert(_buffer.Length >= _index);
|
||||
_buffer.AsSpan(0, _index).Clear();
|
||||
_index = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Notifies <see cref="IBufferWriter{T}"/> that <paramref name="count"/> amount of data was written to the output <see cref="Span{T}"/>/<see cref="Memory{T}"/>
|
||||
/// </summary>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown when <paramref name="count"/> is negative.
|
||||
/// </exception>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// Thrown when attempting to advance past the end of the underlying buffer.
|
||||
/// </exception>
|
||||
/// <remarks>
|
||||
/// You must request a new buffer after calling Advance to continue writing more data and cannot write to a previously acquired buffer.
|
||||
/// </remarks>
|
||||
public void Advance(int count)
|
||||
{
|
||||
if (count < 0)
|
||||
throw new ArgumentException(nameof(count));
|
||||
|
||||
if (_index > _buffer.Length - count)
|
||||
ThrowInvalidOperationException_AdvancedTooFar(_buffer.Length);
|
||||
|
||||
_index += count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="Memory{T}"/> to write to that is at least the requested length (specified by <paramref name="sizeHint"/>).
|
||||
/// If no <paramref name="sizeHint"/> is provided (or it's equal to <code>0</code>), some non-empty buffer is returned.
|
||||
/// </summary>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown when <paramref name="sizeHint"/> is negative.
|
||||
/// </exception>
|
||||
/// <remarks>
|
||||
/// This will never return an empty <see cref="Memory{T}"/>.
|
||||
/// </remarks>
|
||||
/// <remarks>
|
||||
/// There is no guarantee that successive calls will return the same buffer or the same-sized buffer.
|
||||
/// </remarks>
|
||||
/// <remarks>
|
||||
/// You must request a new buffer after calling Advance to continue writing more data and cannot write to a previously acquired buffer.
|
||||
/// </remarks>
|
||||
public Memory<T> GetMemory(int sizeHint = 0)
|
||||
{
|
||||
CheckAndResizeBuffer(sizeHint);
|
||||
Debug.Assert(_buffer.Length > _index);
|
||||
return _buffer.AsMemory(_index);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="Span{T}"/> to write to that is at least the requested length (specified by <paramref name="sizeHint"/>).
|
||||
/// If no <paramref name="sizeHint"/> is provided (or it's equal to <code>0</code>), some non-empty buffer is returned.
|
||||
/// </summary>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown when <paramref name="sizeHint"/> is negative.
|
||||
/// </exception>
|
||||
/// <remarks>
|
||||
/// This will never return an empty <see cref="Span{T}"/>.
|
||||
/// </remarks>
|
||||
/// <remarks>
|
||||
/// There is no guarantee that successive calls will return the same buffer or the same-sized buffer.
|
||||
/// </remarks>
|
||||
/// <remarks>
|
||||
/// You must request a new buffer after calling Advance to continue writing more data and cannot write to a previously acquired buffer.
|
||||
/// </remarks>
|
||||
public Span<T> GetSpan(int sizeHint = 0)
|
||||
{
|
||||
CheckAndResizeBuffer(sizeHint);
|
||||
Debug.Assert(_buffer.Length > _index);
|
||||
return _buffer.AsSpan(_index);
|
||||
}
|
||||
|
||||
private void CheckAndResizeBuffer(int sizeHint)
|
||||
{
|
||||
if (sizeHint < 0)
|
||||
throw new ArgumentException(nameof(sizeHint));
|
||||
|
||||
if (sizeHint == 0)
|
||||
{
|
||||
sizeHint = 1;
|
||||
}
|
||||
|
||||
if (sizeHint > FreeCapacity)
|
||||
{
|
||||
int growBy = Math.Max(sizeHint, _buffer.Length);
|
||||
|
||||
if (_buffer.Length == 0)
|
||||
{
|
||||
growBy = Math.Max(growBy, DefaultInitialBufferSize);
|
||||
}
|
||||
|
||||
int newSize = checked(_buffer.Length + growBy);
|
||||
|
||||
Array.Resize(ref _buffer, newSize);
|
||||
}
|
||||
|
||||
Debug.Assert(FreeCapacity > 0 && FreeCapacity >= sizeHint);
|
||||
}
|
||||
|
||||
private static void ThrowInvalidOperationException_AdvancedTooFar(int capacity)
|
||||
{
|
||||
throw new InvalidOperationException(SR.Format(SR.BufferWriterAdvancedTooFar, capacity));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
// 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 System.Diagnostics.CodeAnalysis
|
||||
{
|
||||
/// <summary>Specifies that null is allowed as an input even if the corresponding type disallows it.</summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)]
|
||||
#if INTERNAL_NULLABLE_ATTRIBUTES
|
||||
internal
|
||||
#else
|
||||
public
|
||||
#endif
|
||||
sealed class AllowNullAttribute : Attribute { }
|
||||
|
||||
/// <summary>Specifies that null is disallowed as an input even if the corresponding type allows it.</summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)]
|
||||
#if INTERNAL_NULLABLE_ATTRIBUTES
|
||||
internal
|
||||
#else
|
||||
public
|
||||
#endif
|
||||
sealed class DisallowNullAttribute : Attribute { }
|
||||
|
||||
/// <summary>Specifies that an output may be null even if the corresponding type disallows it.</summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, Inherited = false)]
|
||||
#if INTERNAL_NULLABLE_ATTRIBUTES
|
||||
internal
|
||||
#else
|
||||
public
|
||||
#endif
|
||||
sealed class MaybeNullAttribute : Attribute { }
|
||||
|
||||
/// <summary>Specifies that an output will not be null even if the corresponding type allows it.</summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, Inherited = false)]
|
||||
#if INTERNAL_NULLABLE_ATTRIBUTES
|
||||
internal
|
||||
#else
|
||||
public
|
||||
#endif
|
||||
sealed class NotNullAttribute : Attribute { }
|
||||
|
||||
/// <summary>Specifies that when a method returns <see cref="ReturnValue"/>, the parameter may be null even if the corresponding type disallows it.</summary>
|
||||
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
|
||||
#if INTERNAL_NULLABLE_ATTRIBUTES
|
||||
internal
|
||||
#else
|
||||
public
|
||||
#endif
|
||||
sealed class MaybeNullWhenAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes the attribute with the specified return value condition.</summary>
|
||||
/// <param name="returnValue">
|
||||
/// The return value condition. If the method returns this value, the associated parameter may be null.
|
||||
/// </param>
|
||||
public MaybeNullWhenAttribute(bool returnValue) => ReturnValue = returnValue;
|
||||
|
||||
/// <summary>Gets the return value condition.</summary>
|
||||
public bool ReturnValue { get; }
|
||||
}
|
||||
|
||||
/// <summary>Specifies that when a method returns <see cref="ReturnValue"/>, the parameter will not be null even if the corresponding type allows it.</summary>
|
||||
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
|
||||
#if INTERNAL_NULLABLE_ATTRIBUTES
|
||||
internal
|
||||
#else
|
||||
public
|
||||
#endif
|
||||
sealed class NotNullWhenAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes the attribute with the specified return value condition.</summary>
|
||||
/// <param name="returnValue">
|
||||
/// The return value condition. If the method returns this value, the associated parameter will not be null.
|
||||
/// </param>
|
||||
public NotNullWhenAttribute(bool returnValue) => ReturnValue = returnValue;
|
||||
|
||||
/// <summary>Gets the return value condition.</summary>
|
||||
public bool ReturnValue { get; }
|
||||
}
|
||||
|
||||
/// <summary>Specifies that the output will be non-null if the named parameter is non-null.</summary>
|
||||
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
|
||||
#if INTERNAL_NULLABLE_ATTRIBUTES
|
||||
internal
|
||||
#else
|
||||
public
|
||||
#endif
|
||||
sealed class NotNullIfNotNullAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes the attribute with the associated parameter name.</summary>
|
||||
/// <param name="parameterName">
|
||||
/// The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null.
|
||||
/// </param>
|
||||
public NotNullIfNotNullAttribute(string parameterName) => ParameterName = parameterName;
|
||||
|
||||
/// <summary>Gets the associated parameter name.</summary>
|
||||
public string ParameterName { get; }
|
||||
}
|
||||
|
||||
/// <summary>Applied to a method that will never return under any circumstance.</summary>
|
||||
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
|
||||
#if INTERNAL_NULLABLE_ATTRIBUTES
|
||||
internal
|
||||
#else
|
||||
public
|
||||
#endif
|
||||
sealed class DoesNotReturnAttribute : Attribute { }
|
||||
|
||||
/// <summary>Specifies that the method will not return if the associated Boolean parameter is passed the specified value.</summary>
|
||||
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
|
||||
#if INTERNAL_NULLABLE_ATTRIBUTES
|
||||
internal
|
||||
#else
|
||||
public
|
||||
#endif
|
||||
sealed class DoesNotReturnIfAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes the attribute with the specified parameter value.</summary>
|
||||
/// <param name="parameterValue">
|
||||
/// The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
|
||||
/// the associated parameter matches this value.
|
||||
/// </param>
|
||||
public DoesNotReturnIfAttribute(bool parameterValue) => ParameterValue = parameterValue;
|
||||
|
||||
/// <summary>Gets the condition parameter value.</summary>
|
||||
public bool ParameterValue { get; }
|
||||
}
|
||||
}
|
||||
@@ -26,4 +26,7 @@ partial class SR
|
||||
public const string Arg_SwitchExpressionException = "Non-exhaustive switch expression failed to match its input.";
|
||||
public const string SwitchExpressionException_UnmatchedValue = "Unmatched value was {0}.";
|
||||
public const string Argument_InvalidRandomRange = "Range of random number does not contain at least one possibility.";
|
||||
public const string BufferWriterAdvancedTooFar = "Cannot advance past the end of the buffer, which has a size of {0}.";
|
||||
public const string net_gssapi_operation_failed_detailed_majoronly = "GSSAPI operation failed with error - {0}.";
|
||||
public const string net_gssapi_operation_failed_majoronly = "SSAPI operation failed with status: {0}.";
|
||||
}
|
||||
@@ -0,0 +1,778 @@
|
||||
// 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.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace System.Buffers
|
||||
{
|
||||
#if __MonoCS__
|
||||
public ref partial struct SequenceReader<T> where T : IEquatable<T>
|
||||
#else
|
||||
public ref partial struct SequenceReader<T> where T : unmanaged, IEquatable<T>
|
||||
#endif
|
||||
{
|
||||
/// <summary>
|
||||
/// Try to read everything up to the given <paramref name="delimiter"/>.
|
||||
/// </summary>
|
||||
/// <param name="span">The read data, if any.</param>
|
||||
/// <param name="delimiter">The delimiter to look for.</param>
|
||||
/// <param name="advancePastDelimiter">True to move past the <paramref name="delimiter"/> if found.</param>
|
||||
/// <returns>True if the <paramref name="delimiter"/> was found.</returns>
|
||||
public bool TryReadTo(out ReadOnlySpan<T> span, T delimiter, bool advancePastDelimiter = true)
|
||||
{
|
||||
ReadOnlySpan<T> remaining = UnreadSpan;
|
||||
int index = remaining.IndexOf(delimiter);
|
||||
|
||||
if (index != -1)
|
||||
{
|
||||
span = index == 0 ? default : remaining.Slice(0, index);
|
||||
AdvanceCurrentSpan(index + (advancePastDelimiter ? 1 : 0));
|
||||
return true;
|
||||
}
|
||||
|
||||
return TryReadToSlow(out span, delimiter, advancePastDelimiter);
|
||||
}
|
||||
|
||||
private bool TryReadToSlow(out ReadOnlySpan<T> span, T delimiter, bool advancePastDelimiter)
|
||||
{
|
||||
if (!TryReadToInternal(out ReadOnlySequence<T> sequence, delimiter, advancePastDelimiter, CurrentSpan.Length - CurrentSpanIndex))
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
span = sequence.IsSingleSegment ? sequence.First.Span : sequence.ToArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to read everything up to the given <paramref name="delimiter"/>, ignoring delimiters that are
|
||||
/// preceded by <paramref name="delimiterEscape"/>.
|
||||
/// </summary>
|
||||
/// <param name="span">The read data, if any.</param>
|
||||
/// <param name="delimiter">The delimiter to look for.</param>
|
||||
/// <param name="delimiterEscape">If found prior to <paramref name="delimiter"/> it will skip that occurrence.</param>
|
||||
/// <param name="advancePastDelimiter">True to move past the <paramref name="delimiter"/> if found.</param>
|
||||
/// <returns>True if the <paramref name="delimiter"/> was found.</returns>
|
||||
public bool TryReadTo(out ReadOnlySpan<T> span, T delimiter, T delimiterEscape, bool advancePastDelimiter = true)
|
||||
{
|
||||
ReadOnlySpan<T> remaining = UnreadSpan;
|
||||
int index = remaining.IndexOf(delimiter);
|
||||
|
||||
if ((index > 0 && !remaining[index - 1].Equals(delimiterEscape)) || index == 0)
|
||||
{
|
||||
span = remaining.Slice(0, index);
|
||||
AdvanceCurrentSpan(index + (advancePastDelimiter ? 1 : 0));
|
||||
return true;
|
||||
}
|
||||
|
||||
// This delimiter might be skipped, go down the slow path
|
||||
return TryReadToSlow(out span, delimiter, delimiterEscape, index, advancePastDelimiter);
|
||||
}
|
||||
|
||||
private bool TryReadToSlow(out ReadOnlySpan<T> span, T delimiter, T delimiterEscape, int index, bool advancePastDelimiter)
|
||||
{
|
||||
if (!TryReadToSlow(out ReadOnlySequence<T> sequence, delimiter, delimiterEscape, index, advancePastDelimiter))
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
Debug.Assert(sequence.Length > 0);
|
||||
span = sequence.IsSingleSegment ? sequence.First.Span : sequence.ToArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool TryReadToSlow(out ReadOnlySequence<T> sequence, T delimiter, T delimiterEscape, int index, bool advancePastDelimiter)
|
||||
{
|
||||
SequenceReader<T> copy = this;
|
||||
|
||||
ReadOnlySpan<T> remaining = UnreadSpan;
|
||||
bool priorEscape = false;
|
||||
|
||||
do
|
||||
{
|
||||
if (index >= 0)
|
||||
{
|
||||
if (index == 0 && priorEscape)
|
||||
{
|
||||
// We were in the escaped state, so skip this delimiter
|
||||
priorEscape = false;
|
||||
Advance(index + 1);
|
||||
remaining = UnreadSpan;
|
||||
goto Continue;
|
||||
}
|
||||
else if (index > 0 && remaining[index - 1].Equals(delimiterEscape))
|
||||
{
|
||||
// This delimiter might be skipped
|
||||
|
||||
// Count our escapes
|
||||
int escapeCount = 1;
|
||||
int i = index - 2;
|
||||
for (; i >= 0; i--)
|
||||
{
|
||||
if (!remaining[i].Equals(delimiterEscape))
|
||||
break;
|
||||
}
|
||||
if (i < 0 && priorEscape)
|
||||
{
|
||||
// Started and ended with escape, increment once more
|
||||
escapeCount++;
|
||||
}
|
||||
escapeCount += index - 2 - i;
|
||||
|
||||
if ((escapeCount & 1) != 0)
|
||||
{
|
||||
// An odd escape count means we're currently escaped,
|
||||
// skip the delimiter and reset escaped state.
|
||||
Advance(index + 1);
|
||||
priorEscape = false;
|
||||
remaining = UnreadSpan;
|
||||
goto Continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Found the delimiter. Move to it, slice, then move past it.
|
||||
AdvanceCurrentSpan(index);
|
||||
|
||||
sequence = Sequence.Slice(copy.Position, Position);
|
||||
if (advancePastDelimiter)
|
||||
{
|
||||
Advance(1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No delimiter, need to check the end of the span for odd number of escapes then advance
|
||||
if (remaining.Length > 0 && remaining[remaining.Length - 1].Equals(delimiterEscape))
|
||||
{
|
||||
int escapeCount = 1;
|
||||
int i = remaining.Length - 2;
|
||||
for (; i >= 0; i--)
|
||||
{
|
||||
if (!remaining[i].Equals(delimiterEscape))
|
||||
break;
|
||||
}
|
||||
|
||||
escapeCount += remaining.Length - 2 - i;
|
||||
if (i < 0 && priorEscape)
|
||||
priorEscape = (escapeCount & 1) == 0; // equivalent to incrementing escapeCount before setting priorEscape
|
||||
else
|
||||
priorEscape = (escapeCount & 1) != 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
priorEscape = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Nothing in the current span, move to the end, checking for the skip delimiter
|
||||
AdvanceCurrentSpan(remaining.Length);
|
||||
remaining = CurrentSpan;
|
||||
|
||||
Continue:
|
||||
index = remaining.IndexOf(delimiter);
|
||||
} while (!End);
|
||||
|
||||
// Didn't find anything, reset our original state.
|
||||
this = copy;
|
||||
sequence = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to read everything up to the given <paramref name="delimiter"/>.
|
||||
/// </summary>
|
||||
/// <param name="sequence">The read data, if any.</param>
|
||||
/// <param name="delimiter">The delimiter to look for.</param>
|
||||
/// <param name="advancePastDelimiter">True to move past the <paramref name="delimiter"/> if found.</param>
|
||||
/// <returns>True if the <paramref name="delimiter"/> was found.</returns>
|
||||
public bool TryReadTo(out ReadOnlySequence<T> sequence, T delimiter, bool advancePastDelimiter = true)
|
||||
{
|
||||
return TryReadToInternal(out sequence, delimiter, advancePastDelimiter);
|
||||
}
|
||||
|
||||
private bool TryReadToInternal(out ReadOnlySequence<T> sequence, T delimiter, bool advancePastDelimiter, int skip = 0)
|
||||
{
|
||||
Debug.Assert(skip >= 0);
|
||||
SequenceReader<T> copy = this;
|
||||
if (skip > 0)
|
||||
Advance(skip);
|
||||
ReadOnlySpan<T> remaining = UnreadSpan;
|
||||
|
||||
while (_moreData)
|
||||
{
|
||||
int index = remaining.IndexOf(delimiter);
|
||||
if (index != -1)
|
||||
{
|
||||
// Found the delimiter. Move to it, slice, then move past it.
|
||||
if (index > 0)
|
||||
{
|
||||
AdvanceCurrentSpan(index);
|
||||
}
|
||||
|
||||
sequence = Sequence.Slice(copy.Position, Position);
|
||||
if (advancePastDelimiter)
|
||||
{
|
||||
Advance(1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
AdvanceCurrentSpan(remaining.Length);
|
||||
remaining = CurrentSpan;
|
||||
}
|
||||
|
||||
// Didn't find anything, reset our original state.
|
||||
this = copy;
|
||||
sequence = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to read everything up to the given <paramref name="delimiter"/>, ignoring delimiters that are
|
||||
/// preceded by <paramref name="delimiterEscape"/>.
|
||||
/// </summary>
|
||||
/// <param name="sequence">The read data, if any.</param>
|
||||
/// <param name="delimiter">The delimiter to look for.</param>
|
||||
/// <param name="delimiterEscape">If found prior to <paramref name="delimiter"/> it will skip that occurrence.</param>
|
||||
/// <param name="advancePastDelimiter">True to move past the <paramref name="delimiter"/> if found.</param>
|
||||
/// <returns>True if the <paramref name="delimiter"/> was found.</returns>
|
||||
public bool TryReadTo(out ReadOnlySequence<T> sequence, T delimiter, T delimiterEscape, bool advancePastDelimiter = true)
|
||||
{
|
||||
SequenceReader<T> copy = this;
|
||||
|
||||
ReadOnlySpan<T> remaining = UnreadSpan;
|
||||
bool priorEscape = false;
|
||||
|
||||
while (_moreData)
|
||||
{
|
||||
int index = remaining.IndexOf(delimiter);
|
||||
if (index != -1)
|
||||
{
|
||||
if (index == 0 && priorEscape)
|
||||
{
|
||||
// We were in the escaped state, so skip this delimiter
|
||||
priorEscape = false;
|
||||
Advance(index + 1);
|
||||
remaining = UnreadSpan;
|
||||
continue;
|
||||
}
|
||||
else if (index > 0 && remaining[index - 1].Equals(delimiterEscape))
|
||||
{
|
||||
// This delimiter might be skipped
|
||||
|
||||
// Count our escapes
|
||||
int escapeCount = 0;
|
||||
for (int i = index; i > 0 && remaining[i - 1].Equals(delimiterEscape); i--, escapeCount++)
|
||||
;
|
||||
if (escapeCount == index && priorEscape)
|
||||
{
|
||||
// Started and ended with escape, increment once more
|
||||
escapeCount++;
|
||||
}
|
||||
|
||||
priorEscape = false;
|
||||
if ((escapeCount & 1) != 0)
|
||||
{
|
||||
// Odd escape count means we're in the escaped state, so skip this delimiter
|
||||
Advance(index + 1);
|
||||
remaining = UnreadSpan;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Found the delimiter. Move to it, slice, then move past it.
|
||||
if (index > 0)
|
||||
{
|
||||
Advance(index);
|
||||
}
|
||||
|
||||
sequence = Sequence.Slice(copy.Position, Position);
|
||||
if (advancePastDelimiter)
|
||||
{
|
||||
Advance(1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// No delimiter, need to check the end of the span for odd number of escapes then advance
|
||||
{
|
||||
int escapeCount = 0;
|
||||
for (int i = remaining.Length; i > 0 && remaining[i - 1].Equals(delimiterEscape); i--, escapeCount++)
|
||||
;
|
||||
if (priorEscape && escapeCount == remaining.Length)
|
||||
{
|
||||
escapeCount++;
|
||||
}
|
||||
priorEscape = escapeCount % 2 != 0;
|
||||
}
|
||||
|
||||
// Nothing in the current span, move to the end, checking for the skip delimiter
|
||||
Advance(remaining.Length);
|
||||
remaining = CurrentSpan;
|
||||
}
|
||||
|
||||
// Didn't find anything, reset our original state.
|
||||
this = copy;
|
||||
sequence = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to read everything up to the given <paramref name="delimiters"/>.
|
||||
/// </summary>
|
||||
/// <param name="span">The read data, if any.</param>
|
||||
/// <param name="delimiters">The delimiters to look for.</param>
|
||||
/// <param name="advancePastDelimiter">True to move past the first found instance of any of the given <paramref name="delimiters"/>.</param>
|
||||
/// <returns>True if any of the <paramref name="delimiters"/> were found.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool TryReadToAny(out ReadOnlySpan<T> span, ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true)
|
||||
{
|
||||
ReadOnlySpan<T> remaining = UnreadSpan;
|
||||
int index = delimiters.Length == 2
|
||||
? remaining.IndexOfAny(delimiters[0], delimiters[1])
|
||||
: remaining.IndexOfAny(delimiters);
|
||||
|
||||
if (index != -1)
|
||||
{
|
||||
span = remaining.Slice(0, index);
|
||||
Advance(index + (advancePastDelimiter ? 1 : 0));
|
||||
return true;
|
||||
}
|
||||
|
||||
return TryReadToAnySlow(out span, delimiters, advancePastDelimiter);
|
||||
}
|
||||
|
||||
private bool TryReadToAnySlow(out ReadOnlySpan<T> span, ReadOnlySpan<T> delimiters, bool advancePastDelimiter)
|
||||
{
|
||||
if (!TryReadToAnyInternal(out ReadOnlySequence<T> sequence, delimiters, advancePastDelimiter, CurrentSpan.Length - CurrentSpanIndex))
|
||||
{
|
||||
span = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
span = sequence.IsSingleSegment ? sequence.First.Span : sequence.ToArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to read everything up to the given <paramref name="delimiters"/>.
|
||||
/// </summary>
|
||||
/// <param name="sequence">The read data, if any.</param>
|
||||
/// <param name="delimiters">The delimiters to look for.</param>
|
||||
/// <param name="advancePastDelimiter">True to move past the first found instance of any of the given <paramref name="delimiters"/>.</param>
|
||||
/// <returns>True if any of the <paramref name="delimiters"/> were found.</returns>
|
||||
public bool TryReadToAny(out ReadOnlySequence<T> sequence, ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true)
|
||||
{
|
||||
return TryReadToAnyInternal(out sequence, delimiters, advancePastDelimiter);
|
||||
}
|
||||
|
||||
private bool TryReadToAnyInternal(out ReadOnlySequence<T> sequence, ReadOnlySpan<T> delimiters, bool advancePastDelimiter, int skip = 0)
|
||||
{
|
||||
SequenceReader<T> copy = this;
|
||||
if (skip > 0)
|
||||
Advance(skip);
|
||||
ReadOnlySpan<T> remaining = UnreadSpan;
|
||||
|
||||
while (!End)
|
||||
{
|
||||
int index = delimiters.Length == 2
|
||||
? remaining.IndexOfAny(delimiters[0], delimiters[1])
|
||||
: remaining.IndexOfAny(delimiters);
|
||||
|
||||
if (index != -1)
|
||||
{
|
||||
// Found one of the delimiters. Move to it, slice, then move past it.
|
||||
if (index > 0)
|
||||
{
|
||||
AdvanceCurrentSpan(index);
|
||||
}
|
||||
|
||||
sequence = Sequence.Slice(copy.Position, Position);
|
||||
if (advancePastDelimiter)
|
||||
{
|
||||
Advance(1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Advance(remaining.Length);
|
||||
remaining = CurrentSpan;
|
||||
}
|
||||
|
||||
// Didn't find anything, reset our original state.
|
||||
this = copy;
|
||||
sequence = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to read data until the entire given <paramref name="delimiter"/> matches.
|
||||
/// </summary>
|
||||
/// <param name="sequence">The read data, if any.</param>
|
||||
/// <param name="delimiter">The multi (T) delimiter.</param>
|
||||
/// <param name="advancePastDelimiter">True to move past the <paramref name="delimiter"/> if found.</param>
|
||||
/// <returns>True if the <paramref name="delimiter"/> was found.</returns>
|
||||
public bool TryReadTo(out ReadOnlySequence<T> sequence, ReadOnlySpan<T> delimiter, bool advancePastDelimiter = true)
|
||||
{
|
||||
if (delimiter.Length == 0)
|
||||
{
|
||||
sequence = default;
|
||||
return true;
|
||||
}
|
||||
|
||||
SequenceReader<T> copy = this;
|
||||
|
||||
bool advanced = false;
|
||||
while (!End)
|
||||
{
|
||||
if (!TryReadTo(out sequence, delimiter[0], advancePastDelimiter: false))
|
||||
{
|
||||
this = copy;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (delimiter.Length == 1)
|
||||
{
|
||||
if (advancePastDelimiter)
|
||||
{
|
||||
Advance(1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (IsNext(delimiter))
|
||||
{
|
||||
// Probably a faster way to do this, potentially by avoiding the Advance in the previous TryReadTo call
|
||||
if (advanced)
|
||||
{
|
||||
sequence = copy.Sequence.Slice(copy.Consumed, Consumed - copy.Consumed);
|
||||
}
|
||||
|
||||
if (advancePastDelimiter)
|
||||
{
|
||||
Advance(delimiter.Length);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Advance(1);
|
||||
advanced = true;
|
||||
}
|
||||
}
|
||||
|
||||
this = copy;
|
||||
sequence = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advance until the given <paramref name="delimiter"/>, if found.
|
||||
/// </summary>
|
||||
/// <param name="delimiter">The delimiter to search for.</param>
|
||||
/// <param name="advancePastDelimiter">True to move past the <paramref name="delimiter"/> if found.</param>
|
||||
/// <returns>True if the given <paramref name="delimiter"/> was found.</returns>
|
||||
public bool TryAdvanceTo(T delimiter, bool advancePastDelimiter = true)
|
||||
{
|
||||
ReadOnlySpan<T> remaining = UnreadSpan;
|
||||
int index = remaining.IndexOf(delimiter);
|
||||
if (index != -1)
|
||||
{
|
||||
Advance(advancePastDelimiter ? index + 1 : index);
|
||||
return true;
|
||||
}
|
||||
|
||||
return TryReadToInternal(out _, delimiter, advancePastDelimiter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advance until any of the given <paramref name="delimiters"/>, if found.
|
||||
/// </summary>
|
||||
/// <param name="delimiters">The delimiters to search for.</param>
|
||||
/// <param name="advancePastDelimiter">True to move past the first found instance of any of the given <paramref name="delimiters"/>.</param>
|
||||
/// <returns>True if any of the given <paramref name="delimiters"/> were found.</returns>
|
||||
public bool TryAdvanceToAny(ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true)
|
||||
{
|
||||
ReadOnlySpan<T> remaining = UnreadSpan;
|
||||
int index = remaining.IndexOfAny(delimiters);
|
||||
if (index != -1)
|
||||
{
|
||||
AdvanceCurrentSpan(index + (advancePastDelimiter ? 1 : 0));
|
||||
return true;
|
||||
}
|
||||
|
||||
return TryReadToAnyInternal(out _, delimiters, advancePastDelimiter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advance past consecutive instances of the given <paramref name="value"/>.
|
||||
/// </summary>
|
||||
/// <returns>How many positions the reader has been advanced.</returns>
|
||||
public long AdvancePast(T value)
|
||||
{
|
||||
long start = Consumed;
|
||||
|
||||
do
|
||||
{
|
||||
// Advance past all matches in the current span
|
||||
int i;
|
||||
for (i = CurrentSpanIndex; i < CurrentSpan.Length && CurrentSpan[i].Equals(value); i++)
|
||||
{
|
||||
}
|
||||
|
||||
int advanced = i - CurrentSpanIndex;
|
||||
if (advanced == 0)
|
||||
{
|
||||
// Didn't advance at all in this span, exit.
|
||||
break;
|
||||
}
|
||||
|
||||
AdvanceCurrentSpan(advanced);
|
||||
|
||||
// If we're at postion 0 after advancing and not at the End,
|
||||
// we're in a new span and should continue the loop.
|
||||
} while (CurrentSpanIndex == 0 && !End);
|
||||
|
||||
return Consumed - start;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Skip consecutive instances of any of the given <paramref name="values"/>.
|
||||
/// </summary>
|
||||
/// <returns>How many positions the reader has been advanced.</returns>
|
||||
public long AdvancePastAny(ReadOnlySpan<T> values)
|
||||
{
|
||||
long start = Consumed;
|
||||
|
||||
do
|
||||
{
|
||||
// Advance past all matches in the current span
|
||||
int i;
|
||||
for (i = CurrentSpanIndex; i < CurrentSpan.Length && values.IndexOf(CurrentSpan[i]) != -1; i++)
|
||||
{
|
||||
}
|
||||
|
||||
int advanced = i - CurrentSpanIndex;
|
||||
if (advanced == 0)
|
||||
{
|
||||
// Didn't advance at all in this span, exit.
|
||||
break;
|
||||
}
|
||||
|
||||
AdvanceCurrentSpan(advanced);
|
||||
|
||||
// If we're at postion 0 after advancing and not at the End,
|
||||
// we're in a new span and should continue the loop.
|
||||
} while (CurrentSpanIndex == 0 && !End);
|
||||
|
||||
return Consumed - start;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advance past consecutive instances of any of the given values.
|
||||
/// </summary>
|
||||
/// <returns>How many positions the reader has been advanced.</returns>
|
||||
public long AdvancePastAny(T value0, T value1, T value2, T value3)
|
||||
{
|
||||
long start = Consumed;
|
||||
|
||||
do
|
||||
{
|
||||
// Advance past all matches in the current span
|
||||
int i;
|
||||
for (i = CurrentSpanIndex; i < CurrentSpan.Length; i++)
|
||||
{
|
||||
T value = CurrentSpan[i];
|
||||
if (!value.Equals(value0) && !value.Equals(value1) && !value.Equals(value2) && !value.Equals(value3))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int advanced = i - CurrentSpanIndex;
|
||||
if (advanced == 0)
|
||||
{
|
||||
// Didn't advance at all in this span, exit.
|
||||
break;
|
||||
}
|
||||
|
||||
AdvanceCurrentSpan(advanced);
|
||||
|
||||
// If we're at postion 0 after advancing and not at the End,
|
||||
// we're in a new span and should continue the loop.
|
||||
} while (CurrentSpanIndex == 0 && !End);
|
||||
|
||||
return Consumed - start;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advance past consecutive instances of any of the given values.
|
||||
/// </summary>
|
||||
/// <returns>How many positions the reader has been advanced.</returns>
|
||||
public long AdvancePastAny(T value0, T value1, T value2)
|
||||
{
|
||||
long start = Consumed;
|
||||
|
||||
do
|
||||
{
|
||||
// Advance past all matches in the current span
|
||||
int i;
|
||||
for (i = CurrentSpanIndex; i < CurrentSpan.Length; i++)
|
||||
{
|
||||
T value = CurrentSpan[i];
|
||||
if (!value.Equals(value0) && !value.Equals(value1) && !value.Equals(value2))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int advanced = i - CurrentSpanIndex;
|
||||
if (advanced == 0)
|
||||
{
|
||||
// Didn't advance at all in this span, exit.
|
||||
break;
|
||||
}
|
||||
|
||||
AdvanceCurrentSpan(advanced);
|
||||
|
||||
// If we're at postion 0 after advancing and not at the End,
|
||||
// we're in a new span and should continue the loop.
|
||||
} while (CurrentSpanIndex == 0 && !End);
|
||||
|
||||
return Consumed - start;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advance past consecutive instances of any of the given values.
|
||||
/// </summary>
|
||||
/// <returns>How many positions the reader has been advanced.</returns>
|
||||
public long AdvancePastAny(T value0, T value1)
|
||||
{
|
||||
long start = Consumed;
|
||||
|
||||
do
|
||||
{
|
||||
// Advance past all matches in the current span
|
||||
int i;
|
||||
for (i = CurrentSpanIndex; i < CurrentSpan.Length; i++)
|
||||
{
|
||||
T value = CurrentSpan[i];
|
||||
if (!value.Equals(value0) && !value.Equals(value1))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int advanced = i - CurrentSpanIndex;
|
||||
if (advanced == 0)
|
||||
{
|
||||
// Didn't advance at all in this span, exit.
|
||||
break;
|
||||
}
|
||||
|
||||
AdvanceCurrentSpan(advanced);
|
||||
|
||||
// If we're at postion 0 after advancing and not at the End,
|
||||
// we're in a new span and should continue the loop.
|
||||
} while (CurrentSpanIndex == 0 && !End);
|
||||
|
||||
return Consumed - start;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check to see if the given <paramref name="next"/> value is next.
|
||||
/// </summary>
|
||||
/// <param name="next">The value to compare the next items to.</param>
|
||||
/// <param name="advancePast">Move past the <paramref name="next"/> value if found.</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool IsNext(T next, bool advancePast = false)
|
||||
{
|
||||
if (End)
|
||||
return false;
|
||||
|
||||
if (CurrentSpan[CurrentSpanIndex].Equals(next))
|
||||
{
|
||||
if (advancePast)
|
||||
{
|
||||
AdvanceCurrentSpan(1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check to see if the given <paramref name="next"/> values are next.
|
||||
/// </summary>
|
||||
/// <param name="next">The span to compare the next items to.</param>
|
||||
/// <param name="advancePast">Move past the <paramref name="next"/> values if found.</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool IsNext(ReadOnlySpan<T> next, bool advancePast = false)
|
||||
{
|
||||
ReadOnlySpan<T> unread = UnreadSpan;
|
||||
if (unread.StartsWith(next))
|
||||
{
|
||||
if (advancePast)
|
||||
{
|
||||
AdvanceCurrentSpan(next.Length);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Only check the slow path if there wasn't enough to satisfy next
|
||||
return unread.Length < next.Length && IsNextSlow(next, advancePast);
|
||||
}
|
||||
|
||||
private unsafe bool IsNextSlow(ReadOnlySpan<T> next, bool advancePast)
|
||||
{
|
||||
ReadOnlySpan<T> currentSpan = UnreadSpan;
|
||||
|
||||
// We should only come in here if we need more data than we have in our current span
|
||||
Debug.Assert(currentSpan.Length < next.Length);
|
||||
|
||||
int fullLength = next.Length;
|
||||
SequencePosition nextPosition = _nextPosition;
|
||||
|
||||
while (next.StartsWith(currentSpan))
|
||||
{
|
||||
if (next.Length == currentSpan.Length)
|
||||
{
|
||||
// Fully matched
|
||||
if (advancePast)
|
||||
{
|
||||
Advance(fullLength);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Need to check the next segment
|
||||
while (true)
|
||||
{
|
||||
if (!Sequence.TryGet(ref nextPosition, out ReadOnlyMemory<T> nextSegment, advance: true))
|
||||
{
|
||||
// Nothing left
|
||||
return false;
|
||||
}
|
||||
|
||||
if (nextSegment.Length > 0)
|
||||
{
|
||||
next = next.Slice(currentSpan.Length);
|
||||
currentSpan = nextSegment.Span;
|
||||
if (currentSpan.Length > next.Length)
|
||||
{
|
||||
currentSpan = currentSpan.Slice(0, next.Length);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,449 @@
|
||||
// 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.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
using Internal.Runtime.CompilerServices;
|
||||
|
||||
namespace System.Buffers
|
||||
{
|
||||
#if __MonoCS__
|
||||
public ref partial struct SequenceReader<T> where T : IEquatable<T>
|
||||
#else
|
||||
public ref partial struct SequenceReader<T> where T : unmanaged, IEquatable<T>
|
||||
#endif
|
||||
{
|
||||
private SequencePosition _currentPosition;
|
||||
private SequencePosition _nextPosition;
|
||||
private bool _moreData;
|
||||
#if __MonoCS__
|
||||
private long _length;
|
||||
#else
|
||||
private readonly long _length;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Create a <see cref="SequenceReader{T}"/> over the given <see cref="ReadOnlySequence{T}"/>.
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public SequenceReader(ReadOnlySequence<T> sequence)
|
||||
{
|
||||
CurrentSpanIndex = 0;
|
||||
Consumed = 0;
|
||||
Sequence = sequence;
|
||||
_currentPosition = sequence.Start;
|
||||
_length = -1;
|
||||
|
||||
sequence.GetFirstSpan(out ReadOnlySpan<T> first, out _nextPosition);
|
||||
CurrentSpan = first;
|
||||
_moreData = first.Length > 0;
|
||||
|
||||
if (!_moreData && !sequence.IsSingleSegment)
|
||||
{
|
||||
_moreData = true;
|
||||
GetNextSpan();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// True when there is no more data in the <see cref="Sequence"/>.
|
||||
/// </summary>
|
||||
#if __MonoCS__
|
||||
public bool End => !_moreData;
|
||||
#else
|
||||
public readonly bool End => !_moreData;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The underlying <see cref="ReadOnlySequence{T}"/> for the reader.
|
||||
/// </summary>
|
||||
#if __MonoCS__
|
||||
public ReadOnlySequence<T> Sequence { get; }
|
||||
#else
|
||||
public readonly ReadOnlySequence<T> Sequence { get; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The current position in the <see cref="Sequence"/>.
|
||||
/// </summary>
|
||||
#if __MonoCS__
|
||||
public SequencePosition Position
|
||||
=> Sequence.GetPosition(CurrentSpanIndex, _currentPosition);
|
||||
#else
|
||||
public readonly SequencePosition Position
|
||||
=> Sequence.GetPosition(CurrentSpanIndex, _currentPosition);
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The current segment in the <see cref="Sequence"/> as a span.
|
||||
/// </summary>
|
||||
#if __MonoCS__
|
||||
public ReadOnlySpan<T> CurrentSpan { get; private set; }
|
||||
#else
|
||||
public ReadOnlySpan<T> CurrentSpan { readonly get; private set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The index in the <see cref="CurrentSpan"/>.
|
||||
/// </summary>
|
||||
#if __MonoCS__
|
||||
public int CurrentSpanIndex { get; private set; }
|
||||
#else
|
||||
public int CurrentSpanIndex { readonly get; private set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The unread portion of the <see cref="CurrentSpan"/>.
|
||||
/// </summary>
|
||||
#if __MonoCS__
|
||||
public ReadOnlySpan<T> UnreadSpan
|
||||
#else
|
||||
public readonly ReadOnlySpan<T> UnreadSpan
|
||||
#endif
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get => CurrentSpan.Slice(CurrentSpanIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The total number of <typeparamref name="T"/>'s processed by the reader.
|
||||
/// </summary>
|
||||
#if __MonoCS__
|
||||
public long Consumed { get; private set; }
|
||||
#else
|
||||
public long Consumed { readonly get; private set; }
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Remaining <typeparamref name="T"/>'s in the reader's <see cref="Sequence"/>.
|
||||
/// </summary>
|
||||
#if __MonoCS__
|
||||
public long Remaining => Length - Consumed;
|
||||
#else
|
||||
public readonly long Remaining => Length - Consumed;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Count of <typeparamref name="T"/> in the reader's <see cref="Sequence"/>.
|
||||
/// </summary>
|
||||
#if __MonoCS__
|
||||
public long Length
|
||||
#else
|
||||
public readonly long Length
|
||||
#endif
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_length < 0)
|
||||
{
|
||||
unsafe {
|
||||
fixed (long* lenPtr = &_length)
|
||||
// Cast-away readonly to initialize lazy field
|
||||
Volatile.Write(ref Unsafe.AsRef<long>(lenPtr), Sequence.Length);
|
||||
}
|
||||
}
|
||||
return _length;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Peeks at the next value without advancing the reader.
|
||||
/// </summary>
|
||||
/// <param name="value">The next value or default if at the end.</param>
|
||||
/// <returns>False if at the end of the reader.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
#if __MonoCS__
|
||||
public bool TryPeek(out T value)
|
||||
#else
|
||||
public readonly bool TryPeek(out T value)
|
||||
#endif
|
||||
{
|
||||
if (_moreData)
|
||||
{
|
||||
value = CurrentSpan[CurrentSpanIndex];
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
value = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read the next value and advance the reader.
|
||||
/// </summary>
|
||||
/// <param name="value">The next value or default if at the end.</param>
|
||||
/// <returns>False if at the end of the reader.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool TryRead(out T value)
|
||||
{
|
||||
if (End)
|
||||
{
|
||||
value = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
value = CurrentSpan[CurrentSpanIndex];
|
||||
CurrentSpanIndex++;
|
||||
Consumed++;
|
||||
|
||||
if (CurrentSpanIndex >= CurrentSpan.Length)
|
||||
{
|
||||
GetNextSpan();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move the reader back the specified number of items.
|
||||
/// </summary>
|
||||
/// <exception cref="ArgumentOutOfRangeException">
|
||||
/// Thrown if trying to rewind a negative amount or more than <see cref="Consumed"/>.
|
||||
/// </exception>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Rewind(long count)
|
||||
{
|
||||
if ((ulong)count > (ulong)Consumed)
|
||||
{
|
||||
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count);
|
||||
}
|
||||
|
||||
Consumed -= count;
|
||||
|
||||
if (CurrentSpanIndex >= count)
|
||||
{
|
||||
CurrentSpanIndex -= (int)count;
|
||||
_moreData = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Current segment doesn't have enough data, scan backward through segments
|
||||
RetreatToPreviousSpan(Consumed);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private void RetreatToPreviousSpan(long consumed)
|
||||
{
|
||||
ResetReader();
|
||||
Advance(consumed);
|
||||
}
|
||||
|
||||
private void ResetReader()
|
||||
{
|
||||
CurrentSpanIndex = 0;
|
||||
Consumed = 0;
|
||||
_currentPosition = Sequence.Start;
|
||||
_nextPosition = _currentPosition;
|
||||
|
||||
if (Sequence.TryGet(ref _nextPosition, out ReadOnlyMemory<T> memory, advance: true))
|
||||
{
|
||||
_moreData = true;
|
||||
|
||||
if (memory.Length == 0)
|
||||
{
|
||||
CurrentSpan = default;
|
||||
// No data in the first span, move to one with data
|
||||
GetNextSpan();
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentSpan = memory.Span;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// No data in any spans and at end of sequence
|
||||
_moreData = false;
|
||||
CurrentSpan = default;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the next segment with available data, if any.
|
||||
/// </summary>
|
||||
private void GetNextSpan()
|
||||
{
|
||||
if (!Sequence.IsSingleSegment)
|
||||
{
|
||||
SequencePosition previousNextPosition = _nextPosition;
|
||||
while (Sequence.TryGet(ref _nextPosition, out ReadOnlyMemory<T> memory, advance: true))
|
||||
{
|
||||
_currentPosition = previousNextPosition;
|
||||
if (memory.Length > 0)
|
||||
{
|
||||
CurrentSpan = memory.Span;
|
||||
CurrentSpanIndex = 0;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentSpan = default;
|
||||
CurrentSpanIndex = 0;
|
||||
previousNextPosition = _nextPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
_moreData = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move the reader ahead the specified number of items.
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Advance(long count)
|
||||
{
|
||||
const long TooBigOrNegative = unchecked((long)0xFFFFFFFF80000000);
|
||||
if ((count & TooBigOrNegative) == 0 && CurrentSpan.Length - CurrentSpanIndex > (int)count)
|
||||
{
|
||||
CurrentSpanIndex += (int)count;
|
||||
Consumed += count;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Can't satisfy from the current span
|
||||
AdvanceToNextSpan(count);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unchecked helper to avoid unnecessary checks where you know count is valid.
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal void AdvanceCurrentSpan(long count)
|
||||
{
|
||||
Debug.Assert(count >= 0);
|
||||
|
||||
Consumed += count;
|
||||
CurrentSpanIndex += (int)count;
|
||||
if (CurrentSpanIndex >= CurrentSpan.Length)
|
||||
GetNextSpan();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Only call this helper if you know that you are advancing in the current span
|
||||
/// with valid count and there is no need to fetch the next one.
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal void AdvanceWithinSpan(long count)
|
||||
{
|
||||
Debug.Assert(count >= 0);
|
||||
|
||||
Consumed += count;
|
||||
CurrentSpanIndex += (int)count;
|
||||
|
||||
Debug.Assert(CurrentSpanIndex < CurrentSpan.Length);
|
||||
}
|
||||
|
||||
private void AdvanceToNextSpan(long count)
|
||||
{
|
||||
if (count < 0)
|
||||
{
|
||||
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count);
|
||||
}
|
||||
|
||||
Consumed += count;
|
||||
while (_moreData)
|
||||
{
|
||||
int remaining = CurrentSpan.Length - CurrentSpanIndex;
|
||||
|
||||
if (remaining > count)
|
||||
{
|
||||
CurrentSpanIndex += (int)count;
|
||||
count = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
// As there may not be any further segments we need to
|
||||
// push the current index to the end of the span.
|
||||
CurrentSpanIndex += remaining;
|
||||
count -= remaining;
|
||||
Debug.Assert(count >= 0);
|
||||
|
||||
GetNextSpan();
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (count != 0)
|
||||
{
|
||||
// Not enough data left- adjust for where we actually ended and throw
|
||||
Consumed -= count;
|
||||
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies data from the current <see cref="Position"/> to the given <paramref name="destination"/> span if there
|
||||
/// is enough data to fill it.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This API is used to copy a fixed amount of data out of the sequence if possible. It does not advance
|
||||
/// the reader. To look ahead for a specific stream of data <see cref="IsNext(ReadOnlySpan{T}, bool)"/> can be used.
|
||||
/// </remarks>
|
||||
/// <param name="destination">Destination span to copy to.</param>
|
||||
/// <returns>True if there is enough data to completely fill the <paramref name="destination"/> span.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
#if __MonoCS__
|
||||
public bool TryCopyTo(Span<T> destination)
|
||||
#else
|
||||
public readonly bool TryCopyTo(Span<T> destination)
|
||||
#endif
|
||||
{
|
||||
// This API doesn't advance to facilitate conditional advancement based on the data returned.
|
||||
// We don't provide an advance option to allow easier utilizing of stack allocated destination spans.
|
||||
// (Because we can make this method readonly we can guarantee that we won't capture the span.)
|
||||
|
||||
ReadOnlySpan<T> firstSpan = UnreadSpan;
|
||||
if (firstSpan.Length >= destination.Length)
|
||||
{
|
||||
firstSpan.Slice(0, destination.Length).CopyTo(destination);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Not enough in the current span to satisfy the request, fall through to the slow path
|
||||
return TryCopyMultisegment(destination);
|
||||
}
|
||||
|
||||
#if __MonoCS__
|
||||
internal bool TryCopyMultisegment(Span<T> destination)
|
||||
#else
|
||||
internal readonly bool TryCopyMultisegment(Span<T> destination)
|
||||
#endif
|
||||
{
|
||||
// If we don't have enough to fill the requested buffer, return false
|
||||
if (Remaining < destination.Length)
|
||||
return false;
|
||||
|
||||
ReadOnlySpan<T> firstSpan = UnreadSpan;
|
||||
Debug.Assert(firstSpan.Length < destination.Length);
|
||||
firstSpan.CopyTo(destination);
|
||||
int copied = firstSpan.Length;
|
||||
|
||||
SequencePosition next = _nextPosition;
|
||||
while (Sequence.TryGet(ref next, out ReadOnlyMemory<T> nextSegment, true))
|
||||
{
|
||||
if (nextSegment.Length > 0)
|
||||
{
|
||||
ReadOnlySpan<T> nextSpan = nextSegment.Span;
|
||||
int toCopy = Math.Min(nextSpan.Length, destination.Length - copied);
|
||||
nextSpan.Slice(0, toCopy).CopyTo(destination.Slice(copied));
|
||||
copied += toCopy;
|
||||
if (copied >= destination.Length)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
// 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.Buffers.Binary;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Internal.Runtime.CompilerServices;
|
||||
|
||||
namespace System.Buffers
|
||||
{
|
||||
#if !__MonoCS__
|
||||
public static partial class SequenceReaderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Try to read the given type out of the buffer if possible. Warning: this is dangerous to use with arbitrary
|
||||
/// structs- see remarks for full details.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// IMPORTANT: The read is a straight copy of bits. If a struct depends on specific state of it's members to
|
||||
/// behave correctly this can lead to exceptions, etc. If reading endian specific integers, use the explicit
|
||||
/// overloads such as <see cref="TryReadLittleEndian(ref SequenceReader{byte}, out short)"/>
|
||||
/// </remarks>
|
||||
/// <returns>
|
||||
/// True if successful. <paramref name="value"/> will be default if failed (due to lack of space).
|
||||
/// </returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal static unsafe bool TryRead<T>(ref this SequenceReader<byte> reader, out T value) where T : unmanaged
|
||||
{
|
||||
ReadOnlySpan<byte> span = reader.UnreadSpan;
|
||||
if (span.Length < sizeof(T))
|
||||
return TryReadMultisegment(ref reader, out value);
|
||||
|
||||
value = Unsafe.ReadUnaligned<T>(ref MemoryMarshal.GetReference(span));
|
||||
reader.Advance(sizeof(T));
|
||||
return true;
|
||||
}
|
||||
|
||||
private static unsafe bool TryReadMultisegment<T>(ref SequenceReader<byte> reader, out T value) where T : unmanaged
|
||||
{
|
||||
Debug.Assert(reader.UnreadSpan.Length < sizeof(T));
|
||||
|
||||
// Not enough data in the current segment, try to peek for the data we need.
|
||||
T buffer = default;
|
||||
Span<byte> tempSpan = new Span<byte>(&buffer, sizeof(T));
|
||||
|
||||
if (!reader.TryCopyTo(tempSpan))
|
||||
{
|
||||
value = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
value = Unsafe.ReadUnaligned<T>(ref MemoryMarshal.GetReference(tempSpan));
|
||||
reader.Advance(sizeof(T));
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an <see cref="short"/> as little endian.
|
||||
/// </summary>
|
||||
/// <returns>False if there wasn't enough data for an <see cref="short"/>.</returns>
|
||||
public static bool TryReadLittleEndian(ref this SequenceReader<byte> reader, out short value)
|
||||
{
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
return reader.TryRead(out value);
|
||||
}
|
||||
|
||||
return TryReadReverseEndianness(ref reader, out value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an <see cref="short"/> as big endian.
|
||||
/// </summary>
|
||||
/// <returns>False if there wasn't enough data for an <see cref="short"/>.</returns>
|
||||
public static bool TryReadBigEndian(ref this SequenceReader<byte> reader, out short value)
|
||||
{
|
||||
if (!BitConverter.IsLittleEndian)
|
||||
{
|
||||
return reader.TryRead(out value);
|
||||
}
|
||||
|
||||
return TryReadReverseEndianness(ref reader, out value);
|
||||
}
|
||||
|
||||
private static bool TryReadReverseEndianness(ref SequenceReader<byte> reader, out short value)
|
||||
{
|
||||
if (reader.TryRead(out value))
|
||||
{
|
||||
value = BinaryPrimitives.ReverseEndianness(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an <see cref="int"/> as little endian.
|
||||
/// </summary>
|
||||
/// <returns>False if there wasn't enough data for an <see cref="int"/>.</returns>
|
||||
public static bool TryReadLittleEndian(ref this SequenceReader<byte> reader, out int value)
|
||||
{
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
return reader.TryRead(out value);
|
||||
}
|
||||
|
||||
return TryReadReverseEndianness(ref reader, out value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an <see cref="int"/> as big endian.
|
||||
/// </summary>
|
||||
/// <returns>False if there wasn't enough data for an <see cref="int"/>.</returns>
|
||||
public static bool TryReadBigEndian(ref this SequenceReader<byte> reader, out int value)
|
||||
{
|
||||
if (!BitConverter.IsLittleEndian)
|
||||
{
|
||||
return reader.TryRead(out value);
|
||||
}
|
||||
|
||||
return TryReadReverseEndianness(ref reader, out value);
|
||||
}
|
||||
|
||||
private static bool TryReadReverseEndianness(ref SequenceReader<byte> reader, out int value)
|
||||
{
|
||||
if (reader.TryRead(out value))
|
||||
{
|
||||
value = BinaryPrimitives.ReverseEndianness(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an <see cref="long"/> as little endian.
|
||||
/// </summary>
|
||||
/// <returns>False if there wasn't enough data for an <see cref="long"/>.</returns>
|
||||
public static bool TryReadLittleEndian(ref this SequenceReader<byte> reader, out long value)
|
||||
{
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
return reader.TryRead(out value);
|
||||
}
|
||||
|
||||
return TryReadReverseEndianness(ref reader, out value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an <see cref="long"/> as big endian.
|
||||
/// </summary>
|
||||
/// <returns>False if there wasn't enough data for an <see cref="long"/>.</returns>
|
||||
public static bool TryReadBigEndian(ref this SequenceReader<byte> reader, out long value)
|
||||
{
|
||||
if (!BitConverter.IsLittleEndian)
|
||||
{
|
||||
return reader.TryRead(out value);
|
||||
}
|
||||
|
||||
return TryReadReverseEndianness(ref reader, out value);
|
||||
}
|
||||
|
||||
private static bool TryReadReverseEndianness(ref SequenceReader<byte> reader, out long value)
|
||||
{
|
||||
if (reader.TryRead(out value))
|
||||
{
|
||||
value = BinaryPrimitives.ReverseEndianness(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
public static partial class SequenceReaderExtensions
|
||||
{
|
||||
public static bool TryReadBigEndian(this System.Buffers.SequenceReader<byte> reader, out short value) => throw new PlatformNotSupportedException();
|
||||
public static bool TryReadBigEndian(this System.Buffers.SequenceReader<byte> reader, out int value) => throw new PlatformNotSupportedException();
|
||||
public static bool TryReadBigEndian(this System.Buffers.SequenceReader<byte> reader, out long value) => throw new PlatformNotSupportedException();
|
||||
public static bool TryReadLittleEndian(this System.Buffers.SequenceReader<byte> reader, out short value) => throw new PlatformNotSupportedException();
|
||||
public static bool TryReadLittleEndian(this System.Buffers.SequenceReader<byte> reader, out int value) => throw new PlatformNotSupportedException();
|
||||
public static bool TryReadLittleEndian(this System.Buffers.SequenceReader<byte> reader, out long value) => throw new PlatformNotSupportedException();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -336,6 +336,7 @@
|
||||
<Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\Globalization\DaylightTime.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\Globalization\DigitShapes.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\Globalization\GlobalizationExtensions.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\Globalization\HebrewNumber.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\Globalization\InternalGlobalizationHelper.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\Globalization\NumberStyles.cs" />
|
||||
<Compile Include="..\..\..\external\corefx\src\Common\src\CoreLib\System\Globalization\SortVersion.cs" />
|
||||
@@ -1072,7 +1073,6 @@
|
||||
<Compile Include="..\referencesource\mscorlib\system\globalization\gregoriancalendarhelper.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\globalization\gregoriancalendartypes.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\globalization\hebrewcalendar.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\globalization\hebrewnumber.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\globalization\hijricalendar.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\globalization\japanesecalendar.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\system\globalization\japaneselunisolarcalendar.cs" />
|
||||
@@ -1861,6 +1861,7 @@
|
||||
<Compile Include="coreclr\SorterArray.cs" />
|
||||
<Compile Include="corefx\AesCcm.cs" />
|
||||
<Compile Include="corefx\AesGcm.cs" />
|
||||
<Compile Include="corefx\ArrayBufferWriter.cs" />
|
||||
<Compile Include="corefx\AwaitTaskContinuation.cs" />
|
||||
<Compile Include="corefx\BinaryEnums.cs" />
|
||||
<Compile Include="corefx\CompareInfo.cs" />
|
||||
@@ -1879,6 +1880,7 @@
|
||||
<Compile Include="corefx\IncrementingPollingCounter.cs" />
|
||||
<Compile Include="corefx\MethodInfo.cs" />
|
||||
<Compile Include="corefx\MonoLinqHelper.cs" />
|
||||
<Compile Include="corefx\NullableAttributes.cs" />
|
||||
<Compile Include="corefx\PbeEncryptionAlgorithm.cs" />
|
||||
<Compile Include="corefx\PbeParameters.cs" />
|
||||
<Compile Include="corefx\PollingCounter.cs" />
|
||||
@@ -1887,6 +1889,9 @@
|
||||
<Compile Include="corefx\RuntimeImports.cs" />
|
||||
<Compile Include="corefx\SR.cs" />
|
||||
<Compile Include="corefx\SR.missing.cs" />
|
||||
<Compile Include="corefx\SequenceReader.Search.cs" />
|
||||
<Compile Include="corefx\SequenceReader.cs" />
|
||||
<Compile Include="corefx\SequenceReaderExtensions.Binary.cs" />
|
||||
<Compile Include="corefx\Stream.cs" />
|
||||
<Compile Include="corefx\SwitchExpressionException.cs" />
|
||||
<Compile Include="corefx\SynchronizationContext.cs" />
|
||||
|
||||
@@ -1105,7 +1105,7 @@ ReferenceSources/AppContextDefaultValues.cs
|
||||
../referencesource/mscorlib/system/globalization/gregoriancalendarhelper.cs
|
||||
../referencesource/mscorlib/system/globalization/gregoriancalendartypes.cs
|
||||
../referencesource/mscorlib/system/globalization/hebrewcalendar.cs
|
||||
../referencesource/mscorlib/system/globalization/hebrewnumber.cs
|
||||
../../../external/corefx/src/Common/src/CoreLib/System/Globalization/HebrewNumber.cs
|
||||
../referencesource/mscorlib/system/globalization/hijricalendar.cs
|
||||
../referencesource/mscorlib/system/globalization/japanesecalendar.cs
|
||||
../referencesource/mscorlib/system/globalization/japaneselunisolarcalendar.cs
|
||||
@@ -1631,6 +1631,11 @@ corefx/AesGcm.cs
|
||||
corefx/IncrementingEventCounter.cs
|
||||
corefx/IncrementingPollingCounter.cs
|
||||
corefx/PollingCounter.cs
|
||||
corefx/NullableAttributes.cs
|
||||
corefx/ArrayBufferWriter.cs
|
||||
corefx/SequenceReader.cs
|
||||
corefx/SequenceReader.Search.cs
|
||||
corefx/SequenceReaderExtensions.Binary.cs
|
||||
|
||||
corert/DependencyReductionRootAttribute.cs
|
||||
corert/AddrofIntrinsics.cs
|
||||
|
||||
@@ -22,6 +22,7 @@ install-local:
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.7-api
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.7.1-api
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.7.2-api
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.8-api
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.5-api/Facades
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.5.1-api/Facades
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.5.2-api/Facades
|
||||
@@ -31,6 +32,7 @@ install-local:
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.7-api/Facades
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.7.1-api/Facades
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.7.2-api/Facades
|
||||
$(MKINSTALLDIRS) $(PROFILE_DIR)/4.8-api/Facades
|
||||
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v2.0/*.dll $(PROFILE_DIR)/2.0-api
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v3.5/*.dll $(PROFILE_DIR)/3.5-api
|
||||
@@ -44,6 +46,7 @@ install-local:
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.7/*.dll $(PROFILE_DIR)/4.7-api
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.7.1/*.dll $(PROFILE_DIR)/4.7.1-api
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.7.2/*.dll $(PROFILE_DIR)/4.7.2-api
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.8/*.dll $(PROFILE_DIR)/4.8-api
|
||||
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5/Facades/*.dll $(PROFILE_DIR)/4.5-api/Facades
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5.1/Facades/*.dll $(PROFILE_DIR)/4.5.1-api/Facades
|
||||
@@ -54,6 +57,7 @@ install-local:
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.7/Facades/*.dll $(PROFILE_DIR)/4.7-api/Facades
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.7.1/Facades/*.dll $(PROFILE_DIR)/4.7.1-api/Facades
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.7.2/Facades/*.dll $(PROFILE_DIR)/4.7.2-api/Facades
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.8/Facades/*.dll $(PROFILE_DIR)/4.8-api/Facades
|
||||
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/mono/*.dll $(PROFILE_DIR)/2.0-api
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/mono/*.dll $(PROFILE_DIR)/4.0-api
|
||||
@@ -65,9 +69,11 @@ install-local:
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/mono/*.dll $(PROFILE_DIR)/4.6.2-api
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/mono/*.dll $(PROFILE_DIR)/4.7-api
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/mono/*.dll $(PROFILE_DIR)/4.7.1-api
|
||||
rm -f $(PROFILE_DIR)/4.7.1-api/ICSharpCode.SharpZipLib.dll
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/mono/*.dll $(PROFILE_DIR)/4.7.2-api
|
||||
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/mono/*.dll $(PROFILE_DIR)/4.8-api
|
||||
rm -f $(PROFILE_DIR)/4.7.1-api/ICSharpCode.SharpZipLib.dll
|
||||
rm -f $(PROFILE_DIR)/4.7.2-api/ICSharpCode.SharpZipLib.dll
|
||||
rm -f $(PROFILE_DIR)/4.8-api/ICSharpCode.SharpZipLib.dll
|
||||
|
||||
# Unfortunately, a few programs (most notably NUnit and FSharp) have hardcoded checks for <prefix>/lib/mono/4.0/mscorlib.dll or Mono.Posix.dll,
|
||||
# so we need to place something there or those tools break. We decided to symlink to the reference assembly for now.
|
||||
@@ -77,6 +83,7 @@ install-local:
|
||||
ln -sf ../4.0-api/Mono.Posix.dll $(PROFILE_DIR)/4.0/Mono.Posix.dll
|
||||
|
||||
DISTFILES = \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.8/Facades/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.7.2/Facades/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.7.1/Facades/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.7/Facades/*.dll) \
|
||||
@@ -86,6 +93,7 @@ DISTFILES = \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.5.2/Facades/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.5.1/Facades/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.5/Facades/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.8/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.7.2/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.7.1/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v4.7/*.dll) \
|
||||
@@ -99,6 +107,7 @@ DISTFILES = \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v3.5/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/v2.0/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/mono/*.dll) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.8/Facades/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.7.2/Facades/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.7.1/Facades/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.7/Facades/*.cs) \
|
||||
@@ -108,6 +117,7 @@ DISTFILES = \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.5.2/Facades/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.5.1/Facades/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.5/Facades/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.8/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.7.2/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.7.1/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v4.7/*.cs) \
|
||||
@@ -121,6 +131,7 @@ DISTFILES = \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v3.5/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/v2.0/*.cs) \
|
||||
$(wildcard ../../../external/binary-reference-assemblies/src/mono/*.cs) \
|
||||
../../../external/binary-reference-assemblies/v4.8/Makefile \
|
||||
../../../external/binary-reference-assemblies/v4.7.2/Makefile \
|
||||
../../../external/binary-reference-assemblies/v4.7.1/Makefile \
|
||||
../../../external/binary-reference-assemblies/v4.7/Makefile \
|
||||
|
||||
@@ -7851,7 +7851,7 @@ namespace System.Net.Sockets {
|
||||
if (s_LoggingEnabled) Logging.Enter(Logging.Sockets, null, "ConnectAsync", "");
|
||||
|
||||
// Throw if multiple buffers specified.
|
||||
if (e.BufferList != null) {
|
||||
if (e.m_BufferList != null) {
|
||||
throw new ArgumentException(SR.GetString(SR.net_multibuffernotsupported), "BufferList");
|
||||
}
|
||||
|
||||
|
||||
+47
-14
@@ -19,8 +19,9 @@ namespace System.Diagnostics {
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
using System.Collections;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
|
||||
internal delegate void UserCallBack(String data);
|
||||
|
||||
@@ -58,10 +59,10 @@ namespace System.Diagnostics {
|
||||
|
||||
// Cache the last position scanned in sb when searching for lines.
|
||||
private int currentLinePos;
|
||||
|
||||
#if MONO
|
||||
//users to coordinate between Dispose and BeginReadLine
|
||||
private object syncObject = new Object ();
|
||||
//users to coordinate between Dispose and ReadBuffer
|
||||
private object syncObject = new Object ();
|
||||
private IAsyncResult asyncReadResult = null;
|
||||
#endif
|
||||
|
||||
internal AsyncStreamReader(Process process, Stream stream, UserCallBack callback, Encoding encoding)
|
||||
@@ -115,8 +116,31 @@ namespace System.Diagnostics {
|
||||
lock (syncObject) {
|
||||
#endif
|
||||
if (disposing) {
|
||||
if (stream != null)
|
||||
if (stream != null) {
|
||||
#if MONO
|
||||
if (asyncReadResult != null && !asyncReadResult.IsCompleted) {
|
||||
// Closing underlying stream when having pending async read request in progress is
|
||||
// not portable and racy by design. Try to cancel pending async read before closing stream.
|
||||
// We are still holding lock that will prevent new async read requests to queue up
|
||||
// before we have closed and invalidated the stream.
|
||||
if (stream is FileStream) {
|
||||
SafeHandle tmpStreamHandle = ((FileStream)stream).SafeFileHandle;
|
||||
while (!asyncReadResult.IsCompleted) {
|
||||
MonoIOError error;
|
||||
if (!MonoIO.Cancel (tmpStreamHandle, out error) && error == MonoIOError.ERROR_NOT_SUPPORTED) {
|
||||
// Platform don't support canceling pending IO requests on stream. If an async pending read
|
||||
// is still in flight when closing stream, it could trigger a race condition.
|
||||
break;
|
||||
}
|
||||
|
||||
// Wait for a short time for pending async read to cancel/complete/fail.
|
||||
asyncReadResult.AsyncWaitHandle.WaitOne (200);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
stream.Close();
|
||||
}
|
||||
}
|
||||
if (stream != null) {
|
||||
stream = null;
|
||||
@@ -151,7 +175,11 @@ namespace System.Diagnostics {
|
||||
|
||||
if( sb == null ) {
|
||||
sb = new StringBuilder(DefaultBufferSize);
|
||||
#if MONO
|
||||
asyncReadResult = stream.BeginRead (byteBuffer, 0 , byteBuffer.Length, new AsyncCallback (ReadBuffer), null);
|
||||
#else
|
||||
stream.BeginRead(byteBuffer, 0 , byteBuffer.Length, new AsyncCallback(ReadBuffer), null);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
FlushMessageQueue();
|
||||
@@ -169,12 +197,17 @@ namespace System.Diagnostics {
|
||||
|
||||
try {
|
||||
#if MONO
|
||||
var stream = this.stream;
|
||||
if (stream == null)
|
||||
byteLen = 0;
|
||||
else
|
||||
#endif
|
||||
lock (syncObject) {
|
||||
Debug.Assert (ar.IsCompleted);
|
||||
asyncReadResult = null;
|
||||
if (this.stream == null)
|
||||
byteLen = 0;
|
||||
else
|
||||
byteLen = stream.EndRead (ar);
|
||||
}
|
||||
#else
|
||||
byteLen = stream.EndRead(ar);
|
||||
#endif
|
||||
}
|
||||
catch (IOException ) {
|
||||
// We should ideally consume errors from operations getting cancelled
|
||||
@@ -242,10 +275,10 @@ retry_dispose:
|
||||
byteLen = 0;
|
||||
goto retry_dispose;
|
||||
}
|
||||
#endif
|
||||
stream.BeginRead(byteBuffer, 0 , byteBuffer.Length, new AsyncCallback(ReadBuffer), null);
|
||||
#if MONO
|
||||
asyncReadResult = stream.BeginRead (byteBuffer, 0 , byteBuffer.Length, new AsyncCallback(ReadBuffer), null);
|
||||
}
|
||||
#else
|
||||
stream.BeginRead(byteBuffer, 0 , byteBuffer.Length, new AsyncCallback(ReadBuffer), null);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1316,11 +1316,7 @@ namespace System.Threading
|
||||
{
|
||||
// capture the sync context
|
||||
if (0 == (options & CaptureOptions.IgnoreSyncCtx))
|
||||
#if MONO
|
||||
syncCtxNew = ecCurrent.SynchronizationContext;
|
||||
#else
|
||||
syncCtxNew = (ecCurrent.SynchronizationContext == null) ? null : ecCurrent.SynchronizationContext.CreateCopy();
|
||||
#endif
|
||||
|
||||
#if FEATURE_REMOTING
|
||||
// copy over the Logical Call Context
|
||||
|
||||
@@ -257,6 +257,7 @@ namespace Mono.CSharp
|
||||
sdk_directory.Add ("4.7", new string [] { "4.7-api", "v4.0.30319" });
|
||||
sdk_directory.Add ("4.7.1", new string [] { "4.7.1-api", "v4.0.30319" });
|
||||
sdk_directory.Add ("4.7.2", new string [] { "4.7.2-api", "v4.0.30319" });
|
||||
sdk_directory.Add ("4.8", new string [] { "4.8-api", "v4.0.30319" });
|
||||
sdk_directory.Add ("4.x", new string [] { "4.5", "net_4_x", "v4.0.30319" });
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -54,13 +54,15 @@ net_4_5_dirs := \
|
||||
build_SUBDIRS =
|
||||
build_PARALLEL_SUBDIRS := resgen gacutil security culevel upload-to-sentry mono-helix-client commoncryptogenerator resx2sr linker cil-strip corcompare mono-api-diff mono-api-html
|
||||
monodroid_tools_SUBDIRS =
|
||||
monodroid_tools_PARALLEL_SUBDIRS = cil-strip linker-analyzer mkbundle mdoc mono-symbolicate corcompare mono-api-diff mono-api-html pdb2mdb nunit-lite
|
||||
monodroid_tools_PARALLEL_SUBDIRS = aprofutil cil-strip linker-analyzer mkbundle mdoc mono-symbolicate corcompare mono-api-diff mono-api-html pdb2mdb nunit-lite
|
||||
monodroid_SUBDIRS = nunit-lite
|
||||
monotouch_SUBDIRS = nunit-lite
|
||||
monotouch_tv_SUBDIRS = nunit-lite
|
||||
monotouch_watch_SUBDIRS = nunit-lite
|
||||
monotouch_tools_SUBDIRS =
|
||||
monotouch_tools_PARALLEL_SUBDIRS = corcompare mono-api-html
|
||||
xammac_SUBDIRS = nunit-lite
|
||||
xammac_net_4_5_SUBDIRS = nunit-lite
|
||||
net_4_x_SUBDIRS =
|
||||
net_4_x_PARALLEL_SUBDIRS = $(net_4_5_dirs)
|
||||
wasm_tools_SUBDIRS =
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Text.RegularExpressions;
|
||||
using Mono.Options;
|
||||
using Mono.Profiler.Aot;
|
||||
@@ -11,6 +12,7 @@ namespace aotprofiletool {
|
||||
class MainClass {
|
||||
static readonly string Name = "aotprofile-tool";
|
||||
|
||||
static bool AdbForward;
|
||||
static bool Methods;
|
||||
static bool Modules;
|
||||
static bool Summary;
|
||||
@@ -23,6 +25,8 @@ namespace aotprofiletool {
|
||||
|
||||
static string Output;
|
||||
|
||||
static int Port = -1;
|
||||
|
||||
static string ProcessArguments (string [] args)
|
||||
{
|
||||
var help = false;
|
||||
@@ -43,21 +47,27 @@ namespace aotprofiletool {
|
||||
{ "d|modules",
|
||||
"Show modules in the profile",
|
||||
v => Modules = true },
|
||||
{ "f|adb-forward",
|
||||
"Set adb socket forwarding for Android",
|
||||
v => AdbForward = true },
|
||||
{ "filter-method=",
|
||||
"Filter by method with regex VALUE",
|
||||
"Filter by method with regex {VALUE}",
|
||||
v => FilterMethod = new Regex (v) },
|
||||
{ "filter-module=",
|
||||
"Filter by module with regex VALUE",
|
||||
"Filter by module with regex {VALUE}",
|
||||
v => FilterModule = new Regex (v) },
|
||||
{ "filter-type=",
|
||||
"Filter by type with regex VALUE",
|
||||
"Filter by type with regex {VALUE}",
|
||||
v => FilterType = new Regex (v) },
|
||||
{ "m|methods",
|
||||
"Show methods in the profile",
|
||||
v => Methods = true },
|
||||
{ "o|output=",
|
||||
"Write profile to OUTPUT file",
|
||||
"Write profile to {OUTPUT} file",
|
||||
v => Output = v },
|
||||
{ "p|port=",
|
||||
"Read profile from aot profiler using local connection on {PORT}",
|
||||
v => int.TryParse (v, out Port) },
|
||||
{ "s|summary",
|
||||
"Show summary of the profile",
|
||||
v => Summary = true },
|
||||
@@ -79,35 +89,92 @@ namespace aotprofiletool {
|
||||
Environment.Exit (0);
|
||||
}
|
||||
|
||||
if (remaining.Count != 1) {
|
||||
Error ("Please specify one <aotprofile-file> to process.");
|
||||
if (remaining.Count != 1 && Port < 0) {
|
||||
Error ("Please specify one <aotprofile-file> to process or network PORT with -p.");
|
||||
Environment.Exit (2);
|
||||
}
|
||||
|
||||
return remaining [0];
|
||||
return remaining.Count > 0 ? remaining [0] : null;
|
||||
}
|
||||
|
||||
static ProfileData ReadProfileFromPort (ProfileReader reader)
|
||||
{
|
||||
ProfileData pd;
|
||||
|
||||
if (AdbForward) {
|
||||
var cmdArgs = $"forward tcp:{Port} tcp:{Port}";
|
||||
if (Verbose)
|
||||
ColorWriteLine ($"Calling 'adb {cmdArgs}'...", ConsoleColor.Yellow);
|
||||
|
||||
System.Diagnostics.Process.Start ("adb", cmdArgs);
|
||||
}
|
||||
|
||||
using (var client = new TcpClient ("127.0.0.1", Port)) {
|
||||
using (var stream = client.GetStream ()) {
|
||||
var msgData = System.Text.Encoding.ASCII.GetBytes ("save\n");
|
||||
|
||||
stream.Write (msgData, 0, msgData.Length);
|
||||
|
||||
if (Verbose)
|
||||
ColorWriteLine ($"Reading from '127.0.0.1:{Port}'...", ConsoleColor.Yellow);
|
||||
|
||||
using (var memoryStream = new MemoryStream (128 * 1024)) {
|
||||
var data = new byte [4 * 1024];
|
||||
int len;
|
||||
|
||||
while ((len = stream.Read (data, 0, data.Length)) > 0) {
|
||||
memoryStream.Write (data, 0, len);
|
||||
|
||||
if (Verbose)
|
||||
ColorWrite ($"Read {len} bytes...\r", ConsoleColor.Yellow);
|
||||
}
|
||||
|
||||
if (Verbose)
|
||||
ColorWriteLine ($"Read total {memoryStream.Length} bytes...", ConsoleColor.Yellow);
|
||||
|
||||
memoryStream.Seek (0, SeekOrigin.Begin);
|
||||
|
||||
pd = reader.ReadAllData (memoryStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return pd;
|
||||
}
|
||||
|
||||
public static void Main (string [] args)
|
||||
{
|
||||
var path = ProcessArguments (args);
|
||||
|
||||
if (!File.Exists (path)) {
|
||||
Error ($"'{path}' doesn't exist.");
|
||||
Environment.Exit (3);
|
||||
}
|
||||
|
||||
if (args.Length == 1) {
|
||||
Modules = Types = Methods = true;
|
||||
}
|
||||
|
||||
var reader = new ProfileReader ();
|
||||
ProfileData pd;
|
||||
ProfileData pd = null;
|
||||
|
||||
using (var stream = new FileStream (path, FileMode.Open)) {
|
||||
if (Verbose)
|
||||
ColorWriteLine ($"Reading '{path}'...", ConsoleColor.Yellow);
|
||||
if (path == null) {
|
||||
if (Port < 0) {
|
||||
Error ($"You should specify path or -p PORT to read the profile.");
|
||||
Environment.Exit (4);
|
||||
} else {
|
||||
try {
|
||||
pd = ReadProfileFromPort (reader);
|
||||
} catch (Exception e) {
|
||||
Error ($"Unable to read profile through local port: {Port}.\n{e}");
|
||||
Environment.Exit (5);
|
||||
}
|
||||
}
|
||||
} else if (!File.Exists (path)) {
|
||||
Error ($"'{path}' doesn't exist.");
|
||||
Environment.Exit (3);
|
||||
} else {
|
||||
using (var stream = new FileStream (path, FileMode.Open)) {
|
||||
if (Verbose)
|
||||
ColorWriteLine ($"Reading '{path}'...", ConsoleColor.Yellow);
|
||||
|
||||
pd = reader.ReadAllData (stream);
|
||||
pd = reader.ReadAllData (stream);
|
||||
}
|
||||
}
|
||||
|
||||
List<MethodRecord> methods = new List<MethodRecord> (pd.Methods);
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-net_4_x-$(HostPlatform)</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monodroid_tools' ">
|
||||
<OutputPath>./../../class/lib/monodroid_tools</OutputPath>
|
||||
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-monodroid_tools</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_6;MONO;MONODROID_TOOLS;WIN_PLATFORM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- @ALL_PROFILE_PROPERTIES@ -->
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -49,8 +54,7 @@
|
||||
</ItemGroup>
|
||||
<!--End of common files-->
|
||||
<!-- @ALL_SOURCES@ -->
|
||||
<!-- @COMMON_PROJECT_REFERENCES@ -->
|
||||
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../../class/System/System.csproj" />
|
||||
<ProjectReference Include="../../class/System.Core/System.Core.csproj" />
|
||||
<ProjectReference Include="../../class/Mono.Profiler.Log/Mono.Profiler.Log.csproj" />
|
||||
|
||||
@@ -27,6 +27,7 @@ TEST_CASES := \
|
||||
|
||||
ifdef INCLUDE_DISABLED
|
||||
TEST_CASES += \
|
||||
System.Core/test-queryable-01.cs \
|
||||
System.Runtime.Serialization/test-dcs-01.cs \
|
||||
mscorlib/test-marshaling.cs
|
||||
endif
|
||||
@@ -40,9 +41,7 @@ endif
|
||||
ifndef AOT_FRIENDLY_PROFILE
|
||||
TEST_CASES += \
|
||||
mscorlib/test-remoting.cs \
|
||||
mscorlib/test-reflection.cs \
|
||||
System.Core/test-queryable-01.cs \
|
||||
System.Core/test-queryable-02.cs
|
||||
mscorlib/test-reflection.cs
|
||||
endif
|
||||
|
||||
TESTS_COMPILER = $(MCS) -nologo -noconfig -unsafe -nostdlib -debug:portable -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
|
||||
|
||||
@@ -1,30 +1,21 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq.Expressions;
|
||||
using System.Linq;
|
||||
|
||||
public class TestQueryableOrderBy
|
||||
{
|
||||
public class QueryableUsedViaExpression {
|
||||
public static void Main ()
|
||||
{
|
||||
Test ();
|
||||
var q = "Test".AsQueryable ();
|
||||
var count = CallQueryableCount (q);
|
||||
q.Count ();
|
||||
//Console.WriteLine ($"count: {count}");
|
||||
}
|
||||
|
||||
class Pet
|
||||
public static int CallQueryableCount (IQueryable source)
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public int Age { get; set; }
|
||||
}
|
||||
|
||||
static void Test ()
|
||||
{
|
||||
Pet[] pets = { new Pet { Name="Barley", Age=8 },
|
||||
new Pet { Name="Boots", Age=4 },
|
||||
new Pet { Name="Whiskers", Age=1 }
|
||||
};
|
||||
|
||||
var query = pets.AsQueryable ().OrderByDescending (pet => pet.Age);
|
||||
|
||||
foreach (Pet pet in query)
|
||||
Console.WriteLine("{0} - {1}", pet.Name, pet.Age);
|
||||
return source.Provider.Execute<int> (
|
||||
Expression.Call (
|
||||
typeof (Queryable), "Count",
|
||||
new Type [] { source.ElementType }, source.Expression));
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
using System.Linq;
|
||||
|
||||
public class QueryableUsedViaExpression {
|
||||
public static void Main ()
|
||||
{
|
||||
var q = "Test".AsQueryable ();
|
||||
var count = CallQueryableCount (q);
|
||||
Console.WriteLine ($"count: {count}");
|
||||
}
|
||||
|
||||
public static int CallQueryableCount (IQueryable source)
|
||||
{
|
||||
return source.Provider.Execute<int> (
|
||||
Expression.Call (
|
||||
typeof (Queryable), "Count",
|
||||
new Type [] { source.ElementType }, source.Expression));
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.Services.Client.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.dll,System.Json.dll,System.Net.Http.WinHttpHandler.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reflection.Context.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.Transactions.dll,System.Web.Services.dll,System.Windows.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
|
||||
System.Core/test-plinq-01.exe,1586176,12800,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-queryable-01.exe,1910784,14336,385024,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-queryable-02.exe,1910784,14336,385536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-plinq-01.exe,1585664,12800,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,1913856,101376,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10240,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1907712,71168,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,1579008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
@@ -12,7 +10,7 @@ mscorlib/test-exception-01.exe,1579008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,1581056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,1579008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,1579008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1588736,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1589248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,1580032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,1588736,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection.exe,1873920,13824,24576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.Services.Client.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.dll,System.Json.dll,System.Net.Http.WinHttpHandler.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reflection.Context.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.Transactions.dll,System.Web.Services.dll,System.Windows.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
|
||||
Newtonsoft.Json.Test/bin/iPhoneSimulator/Release/Newtonsoft.Json.Test.exe,1830400,672256,369152,420864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0,0,0,0,0,0,0,0,0,0,30720,0
|
||||
System.Core/test-plinq-01.exe,1020928,13824,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,1467904,574976,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9728,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
Newtonsoft.Json.Test/bin/iPhoneSimulator/Release/Newtonsoft.Json.Test.exe,1833472,672768,373248,420864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0,0,0,0,0,0,0,0,0,0,30720,0
|
||||
System.Core/test-plinq-01.exe,1021440,13824,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,1467392,574464,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9728,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1404928,64512,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,1014784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,1014784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
@@ -11,9 +11,9 @@ mscorlib/test-exception-01.exe,1014784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,1016832,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,1014784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,1014784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1025536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1028608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,1027584,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,1025024,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,1028096,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,1014784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-02.exe,1014784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-03.exe,1023488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
||||
|
@@ -1,22 +1,20 @@
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.Build.Engine.dll,Microsoft.Build.Framework.dll,Microsoft.Build.Tasks.v4.0.dll,Microsoft.Build.Utilities.v4.0.dll,Microsoft.Build.dll,Microsoft.CSharp.dll,Microsoft.VisualC.dll,Microsoft.Web.Infrastructure.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Configuration.Install.dll,System.Configuration.dll,System.Data.DataSetExtensions.dll,System.Data.Entity.dll,System.Data.Linq.dll,System.Data.OracleClient.dll,System.Data.Services.Client.dll,System.Data.Services.dll,System.Data.dll,System.Deployment.dll,System.Design.dll,System.DirectoryServices.Protocols.dll,System.DirectoryServices.dll,System.Drawing.Design.dll,System.Drawing.dll,System.Dynamic.dll,System.EnterpriseServices.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.Selectors.dll,System.IdentityModel.dll,System.Json.Microsoft.dll,System.Json.dll,System.Management.dll,System.Messaging.dll,System.Net.Http.Formatting.dll,System.Net.Http.WebRequest.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reactive.Core.dll,System.Reactive.Debugger.dll,System.Reactive.Experimental.dll,System.Reactive.Interfaces.dll,System.Reactive.Linq.dll,System.Reactive.Observable.Aliases.dll,System.Reactive.PlatformServices.dll,System.Reactive.Providers.dll,System.Reactive.Runtime.Remoting.dll,System.Reactive.Windows.Forms.dll,System.Reactive.Windows.Threading.dll,System.Reflection.Context.dll,System.Runtime.Caching.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.DurableInstancing.dll,System.Runtime.Remoting.dll,System.Runtime.Serialization.Formatters.Soap.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Activation.dll,System.ServiceModel.Discovery.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Routing.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.ServiceProcess.dll,System.Threading.Tasks.Dataflow.dll,System.Transactions.dll,System.Web.Abstractions.dll,System.Web.ApplicationServices.dll,System.Web.DynamicData.dll,System.Web.Extensions.Design.dll,System.Web.Extensions.dll,System.Web.Http.SelfHost.dll,System.Web.Http.WebHost.dll,System.Web.Http.dll,System.Web.Mobile.dll,System.Web.Mvc.dll,System.Web.Razor.dll,System.Web.RegularExpressions.dll,System.Web.Routing.dll,System.Web.Services.dll,System.Web.WebPages.Deployment.dll,System.Web.WebPages.Razor.dll,System.Web.WebPages.dll,System.Web.dll,System.Windows.Forms.DataVisualization.dll,System.Windows.Forms.dll,System.Windows.dll,System.Workflow.Activities.dll,System.Workflow.ComponentModel.dll,System.Workflow.Runtime.dll,System.Xaml.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
|
||||
Newtonsoft.Json.Test/bin/Release/Newtonsoft.Json.Test.exe,2390016,985088,346624,1318400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56832,0,0,0,0,0,0,616448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0
|
||||
System.Core/test-plinq-01.exe,1584640,67072,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-queryable-01.exe,2000896,62464,365056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-queryable-02.exe,2000896,62464,365568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,2174976,804352,7168,693760,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51712,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-02.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-exception-01.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,1580032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1587712,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,1679360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
Newtonsoft.Json.Test/bin/Release/Newtonsoft.Json.Test.exe,2387968,984576,346624,1320448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56832,0,0,0,0,0,0,616448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0
|
||||
System.Core/test-plinq-01.exe,1584128,67072,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,2165248,803328,7168,693760,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51712,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-02.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-exception-01.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,1579520,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,1587200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,1678848,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,1587200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection.exe,1964032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-remoting.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-02.exe,1577984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-03.exe,1582592,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-task-01.exe,1582080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection.exe,1963520,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-remoting.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-02.exe,1577472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-03.exe,1581568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-task-01.exe,1581056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
@@ -1,23 +1,23 @@
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.Net.Http.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.Transactions.dll,System.Xml.Linq.dll
|
||||
BlazingPizza.Client/bin/Release/netstandard2.0/BlazingPizza.Client.dll,1191936,101376,287744,0,0,0,0,0,0,0,0,0,0,0,0,0,10752,0,0,3072,0,0,0,0,0
|
||||
HelloWorld/bin/Release/netstandard2.0/dist/_framework/_bin/HelloWorld.dll,1170432,100864,286720,0,0,0,0,0,0,0,0,0,0,0,0,0,10752,0,0,0,0,0,0,0,0
|
||||
Microsoft.AspNetCore.Blazor.E2EPerformance/bin/Release/netstandard2.0/Microsoft.AspNetCore.Blazor.E2EPerformance.dll,1210880,102912,287744,0,0,0,0,0,0,0,0,0,0,0,0,0,10752,0,0,0,0,0,0,0,0
|
||||
Newtonsoft/bin/Release/netstandard2.0/dist/_framework/_bin/Newtonsoft.dll,1170432,100864,286720,0,0,0,0,0,0,0,0,0,0,0,0,0,10752,0,0,0,0,0,0,0,0
|
||||
System.Core/test-plinq-01.exe,613888,12288,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,779264,41472,7168,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1098240,70144,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-02.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-crypto-01.exe,880640,11264,24064,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-exception-01.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,561664,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,565760,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,657920,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,565248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-02.exe,553472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-03.exe,562176,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-task-01.exe,611328,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.Services.Client.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.dll,System.Json.dll,System.Net.Http.WinHttpHandler.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reflection.Context.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.Transactions.dll,System.Web.Services.dll,System.Windows.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
|
||||
BlazingPizza.Client/bin/Release/netstandard2.0/BlazingPizza.Client.dll,1191936,101376,287744,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10752,0,0,0,0,3072,0,0,0,0,0,0,0,0,0,0
|
||||
HelloWorld/bin/Release/netstandard2.0/dist/_framework/_bin/HelloWorld.dll,1170944,100864,286720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10752,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
Microsoft.AspNetCore.Blazor.E2EPerformance/bin/Release/netstandard2.0/Microsoft.AspNetCore.Blazor.E2EPerformance.dll,1211392,102912,287744,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10752,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
Newtonsoft/bin/Release/netstandard2.0/dist/_framework/_bin/Newtonsoft.dll,1170944,100864,286720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10752,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Core/test-plinq-01.exe,613888,12288,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System.Net.Http/test-handler-01.exe,779264,41472,7168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
System/test-security.exe,1098240,70144,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-array.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-01.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-calendar-02.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-crypto-01.exe,880640,11264,24064,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-exception-01.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-locale-01.exe,561664,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-methodimpl-01.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-01.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-02.exe,568320,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-03.exe,657920,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-reflection-04.exe,568320,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-01.exe,552960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-02.exe,553472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-string-03.exe,562176,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
mscorlib/test-task-01.exe,611328,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
|
@@ -83,6 +83,8 @@ install-frameworks:
|
||||
$(INSTALL_DATA) frameworks/net_4.7.1.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.7.1/RedistList/FrameworkList.xml
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.7.2/RedistList
|
||||
$(INSTALL_DATA) frameworks/net_4.7.2.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.7.2/RedistList/FrameworkList.xml
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.8/RedistList
|
||||
$(INSTALL_DATA) frameworks/net_4.8.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.8/RedistList/FrameworkList.xml
|
||||
|
||||
install-pcl-targets:
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)
|
||||
@@ -193,6 +195,7 @@ EXTRA_DISTFILES = \
|
||||
frameworks/net_4.7.xml \
|
||||
frameworks/net_4.7.1.xml \
|
||||
frameworks/net_4.7.2.xml \
|
||||
frameworks/net_4.8.xml \
|
||||
targets/Microsoft.WebApplication.targets \
|
||||
$(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportBefore.props \
|
||||
$(NUGET_BUILDTASKS_REPO_DIR)/src/Microsoft.NuGet.Build.Tasks/ImportBeforeAfter/Microsoft.NuGet.ImportAfter.targets \
|
||||
|
||||
Loaded 100 of 1058 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user