diff --git a/.gitignore b/.gitignore index 3253bba015e..08a17a7ccdf 100644 --- a/.gitignore +++ b/.gitignore @@ -79,6 +79,7 @@ releases stamp-h stamp-h1 stamp-h.in +/test-driver *~ *.swp *.o diff --git a/Makefile.am b/Makefile.am index 3542279772d..c44c4b93c09 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = $(WERROR_CFLAGS) + MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono if CROSS_COMPILING @@ -48,7 +50,9 @@ GIT_DIR ?= $(srcdir)/.git dist-hook: test -d $(distdir)/mcs || mkdir $(distdir)/mcs d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive - rm -rf `find $(top_distdir)/external -path '*\.git' -and -type d` + rm -rf `find $(top_distdir)/external -path '*\.git'` + rm -f `find $(top_distdir)/external -path '*\.exe'` + rm -f `find $(top_distdir)/external -path '*\.dll'` cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/ cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/ # Disable this for now because it is very slow and causes wrench to timeout: diff --git a/acinclude.m4 b/acinclude.m4 index 16fecf7f860..5216cd14a5e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -22,7 +22,7 @@ if test x$GCC != xyes; then dolt_supported=no fi case $host in -i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ +i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ |amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*) pic_options='-fPIC' ;; @@ -158,7 +158,7 @@ modeok=false tagok=false for arg in "$[]@"; do case "$arg" in - --silent) ;; + --silent) ;; --mode=compile) modeok=true ;; --tag=CC|--tag=CXX) tagok=true ;; --quiet) ;; diff --git a/configure.ac b/configure.ac index 37c5864f9a4..c35b45826a7 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Process this file with autoconf to produce a configure script. #AC_PREREQ([2.62]) -AC_INIT(mono, [3.6.1001], +AC_INIT(mono, [3.8.1], [http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono]) AC_CONFIG_SRCDIR([README.md]) @@ -36,20 +36,15 @@ case $host_os in *cygwin* ) LN_S='cp -p';; esac -dnl -dnl libgc checks -dnl - -gc_headers=no -gc=included -gc_msg="included Boehm" -use_included_gc=no +# +# libgc defaults +# libgc_configure_args= if test -d $srcdir/libgc ; then - gc_default=included + libgc_default=included else - gc_default=boehm + libgc_default=boehm fi # These variables are the CPPFLAGS/CFLAGS passed to libgc's configure @@ -59,6 +54,9 @@ CFLAGS_FOR_LIBGC=$CFLAGS CPPFLAGS_FOR_EGLIB=$CPPFLAGS CFLAGS_FOR_EGLIB=$CFLAGS +# libgc uses some deprecated APIs +CFLAGS_FOR_LIBGC="$CFLAGS -Wno-deprecated-declarations" + # # These are the flags that need to be stored in the mono.pc file for # compiling code that will embed Mono @@ -118,14 +116,15 @@ case "$host" in fi HOST_CC="gcc" # Windows 2000 is required that includes Internet Explorer 5.01 - CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024" + CPPFLAGS="$CPPFLAGS -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024" LDFLAGS="$LDFLAGS -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32" libmono_cflags="-mms-bitfields -mwindows" libmono_ldflags="-mms-bitfields -mwindows" libdl= libgc_threads=win32 - gc_default=included + libgc_default=included with_sigaltstack=no + with_tls=pthread LN_S=cp # This forces libgc to use the DllMain based thread registration code on win32 libgc_configure_args="$libgc_configure_args --enable-win32-dllmain=yes" @@ -178,7 +177,7 @@ case "$host" in need_link_unlink=yes AC_DEFINE(PTHREAD_POINTER_ID) libdl= - gc_default=boehm + libgc_default=boehm libgc_threads=pthreads with_sigaltstack=no use_sigposix=yes @@ -253,7 +252,7 @@ case "$host" in libmono_cflags="-D_REENTRANT" libdl= libgc_threads=pthreads - gc_default=boehm + libgc_default=boehm use_sigposix=yes ikvm_native=no AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support]) @@ -481,7 +480,7 @@ AC_CHECK_HEADERS(wchar.h) AC_CHECK_HEADERS(ieeefp.h) AC_MSG_CHECKING(for isinf) AC_TRY_LINK([#include ], [ - int f = isinf (1); + int f = isinf (1.0); ], [ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_ISINF, 1, [isinf available]) @@ -646,18 +645,6 @@ if test "x$USE_NLS" = "xyes"; then fi fi -AC_ARG_WITH([libgdiplus], - [ --with-libgdiplus=installed|sibling| Override the libgdiplus used for System.Drawing tests (defaults to installed)], - [], [with_libgdiplus=installed]) - -case $with_libgdiplus in -no|installed) libgdiplus_loc= ;; -yes|sibling) libgdiplus_loc=`cd ../libgdiplus && pwd`/src/libgdiplus.la ;; -/*) libgdiplus_loc=$with_libgdiplus ;; -*) libgdiplus_loc=`pwd`/$with_libgdiplus ;; -esac -AC_SUBST([libgdiplus_loc]) - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) pkg_config_path= @@ -673,6 +660,12 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Chan fi ) +AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no) +if test x$werror_flag = xyes; then + WERROR_CFLAGS="-Werror" +fi +AC_SUBST([WERROR_CFLAGS]) + ac_configure_args="$ac_configure_args \"CPPFLAGS_FOR_EGLIB=$EGLIB_CPPFLAGS\" \"CFLAGS_FOR_EGLIB=$CFLAGS_FOR_EGLIB\"" AC_CONFIG_SUBDIRS(eglib) @@ -690,8 +683,6 @@ AC_SUBST(GMODULE_LIBS) AC_SUBST(BUILD_GLIB_CFLAGS) AC_SUBST(BUILD_GLIB_LIBS) -AC_ARG_WITH(gc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[gc=$with_gc],[gc=$gc_default]) - # Enable support for fast thread-local storage # Some systems have broken support, so we allow to disable it. AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage implementation (defaults to __thread)],[],[with_tls=__thread]) @@ -999,22 +990,28 @@ AC_TRY_COMPILE([ AC_MSG_RESULT(no) ]) +dnl +dnl Boehm GC configuration +dnl + +AC_ARG_WITH(libgc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[libgc=$with_gc],[libgc=$libgc_default]) + +AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes}) +AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes) + AC_ARG_ENABLE(parallel-mark, [ --enable-parallel-mark Enables GC Parallel Marking], enable_parallel_mark=$enableval, enable_parallel_mark=$parallel_mark) if test x$enable_parallel_mark = xyes; then libgc_configure_args="$libgc_configure_args --enable-parallel-mark" fi -AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes}) -AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes) - -dnl -dnl Boehm GC configuration -dnl +gc_headers=no +gc_msg="" +use_included_gc=no LIBGC_CPPFLAGS= LIBGC_LIBS= LIBGC_STATIC_LIBS= libgc_dir= -case "x$gc" in +case "x$libgc" in xboehm|xbohem|xyes) AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes) AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl) @@ -1047,17 +1044,18 @@ case "x$gc" in fi # check whether we need to explicitly allow - # thread registering - AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl) - if test "x$found_allow_register_threads" = "xyes"; then - AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration]) - fi - + # thread registering + AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl) + if test "x$found_allow_register_threads" = "xyes"; then + AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration]) + fi ;; xincluded) use_included_gc=yes - libgc_dir=libgc + if test "x$support_boehm" = "xyes"; then + libgc_dir=libgc + fi LIBGC_CPPFLAGS='-I$(top_srcdir)/libgc/include' LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la' @@ -1070,7 +1068,7 @@ case "x$gc" in CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DGC_BUILD -DGC_NOT_DLL" fi - gc_msg="bundled Boehm GC with typed GC" + gc_msg="Included Boehm GC with typed GC" if test x$enable_parallel_mark = xyes; then AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC and Parallel Mark)", [GC description]) gc_msg="$gc_msg and parallel mark" @@ -1087,6 +1085,7 @@ case "x$gc" in AC_MSG_WARN("Compiling mono without GC.") AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "none", [GC description]) AC_DEFINE(HAVE_NULL_GC,1,[No GC support.]) + gc_msg="none" ;; *) AC_MSG_ERROR([Invalid argument to --with-gc.]) @@ -1106,7 +1105,7 @@ AC_SUBST(libgc_dir) AC_SUBST(BOEHM_DEFINES) dnl -dnl End of libgc checks +dnl End of Boehm GC Configuration dnl dnl ************************************* @@ -1522,30 +1521,6 @@ if test x$target_win32 = xno; then AC_CHECK_FUNCS(inet_pton inet_aton) - dnl *********************************************** - dnl *** Checks for size of sockaddr_un.sun_path *** - dnl *********************************************** - # AC_CHECK_SIZEOF can't cope with struct members :-( - AC_MSG_CHECKING(size of sockaddr_un.sun_path) - AC_CACHE_VAL(mono_cv_sizeof_sunpath, - [AC_TRY_RUN([ - #include - #include - #include - - int main(void) { - struct sockaddr_un sock_un; - FILE *f=fopen("conftestval", "w"); - if(!f) exit(1); - fprintf(f, "%d\n", sizeof(sock_un.sun_path)); - exit(0); - } - ], mono_cv_sizeof_sunpath=`cat conftestval`, - mono_cv_sizeof_sunpath=0, - mono_cv_sizeof_sunpath=0)])dnl - AC_MSG_RESULT($mono_cv_sizeof_sunpath) - AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $mono_cv_sizeof_sunpath, [Sizeof sock_un.sun_path]) - dnl ***************************** dnl *** Checks for libxnet *** dnl ***************************** @@ -2162,7 +2137,6 @@ else AC_MSG_RESULT(no) ]) ]) - AC_CHECK_FUNCS(GetProcessId) AC_CHECK_DECLS(InterlockedExchange64, [], [], [[#include ]]) AC_CHECK_DECLS(InterlockedCompareExchange64, [], [], [[#include ]]) AC_CHECK_DECLS(InterlockedDecrement64, [], [], [[#include ]]) @@ -2170,6 +2144,16 @@ else AC_CHECK_DECLS(InterlockedAdd, [], [], [[#include ]]) AC_CHECK_DECLS(InterlockedAdd64, [], [], [[#include ]]) AC_CHECK_DECLS(__readfsdword, [], [], [[#include ]]) + + AC_MSG_CHECKING(for GetProcessId) + AC_TRY_COMPILE([#include ], [ + GetProcessId (0); + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETPROCESSID) + ], [ + AC_MSG_RESULT(no) + ]) fi dnl socklen_t check @@ -2509,6 +2493,8 @@ INTL="libc.so.6" SQLITE="libsqlite.so.0" SQLITE3="libsqlite3.so.0" X11="libX11.so" +GDKX11="libgdk-x11-2.0.so.0" +GTKX11="libgtk-x11-2.0.so.0" XINERAMA="libXinerama.so" sizeof_register="SIZEOF_VOID_P" @@ -2579,7 +2565,7 @@ case "$host" in sgen_supported=true AOT_SUPPORTED="yes" ;; - darwin*|openbsd*|freebsd*) + openbsd*|freebsd*) sgen_supported=true ;; esac @@ -2597,7 +2583,14 @@ case "$host" in sgen_supported=true AOT_SUPPORTED="yes" ;; - darwin*|openbsd*|freebsd*) + darwin*) + sgen_supported=true + AOT_SUPPORTED="yes" + ;; + openbsd*|freebsd*) + sgen_supported=true + ;; + mingw*) sgen_supported=true ;; esac @@ -2671,8 +2664,6 @@ case "$host" in ACCESS_UNALIGNED="no" JIT_SUPPORTED=yes CPPFLAGS="$CPPFLAGS -D__ARM_EABI__" - # libgc's gc_locks.h depends on this - CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC" sgen_supported=true ;; arm*-linux*) @@ -2739,7 +2730,6 @@ if test "x$host" != "x$target"; then sizeof_register=8 target_byte_order=G_BIG_ENDIAN ;; - powerpc64-xbox360-linux-gnu) TARGET=POWERPC64 arch_target=powerpc64 @@ -2964,6 +2954,8 @@ case "$host" in SQLITE="libsqlite.0.dylib" SQLITE3="libsqlite3.0.dylib" X11="libX11.dylib" + GDKX11="libgdk-x11-2.0.dylib" + GTKX11="libgtk-x11-2.0.dylib" ;; *-*-*netbsd*) LIBC="libc.so.12" @@ -3016,24 +3008,32 @@ esac AC_SUBST(libsuffix) -if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then - if test "x$with_tls" = "x__thread"; then - # - # On some linux distributions, TLS works in executables, but linking - # against a shared library containing TLS fails with: - # undefined reference to `__tls_get_addr' - # - rm -f conftest.c conftest.so conftest - echo "static __thread int foo; int main () { foo = 5; return 0; }" > conftest.c - $CC -fPIC --shared -o conftest.so conftest.c > /dev/null 2>&1 - $CC -o conftest conftest.so > /dev/null 2>&1 - if test ! -f conftest; then - AC_MSG_WARN([Disabling usage of __thread.]); - with_tls=pthread - fi - rm -f conftest.c conftest.so conftest - fi -fi +AC_ARG_WITH([libgdiplus], + [ --with-libgdiplus=installed|sibling| Override the libgdiplus used for System.Drawing tests (defaults to installed)], + [], [with_libgdiplus=installed]) + +# default install location +libgdiplus_install_loc=libgdiplus${libsuffix} +case $with_libgdiplus in + no|installed) + libgdiplus_loc= + ;; + + yes|sibling) + libgdiplus_loc=`cd ../libgdiplus && pwd`/src/libgdiplus.la + ;; + + /*) # absolute path, assume it is an install location + libgdiplus_loc=$with_libgdiplus + libgdiplus_install_loc=$with_libgdiplus + ;; + + *) + libgdiplus_loc=`pwd`/$with_libgdiplus + ;; +esac +AC_SUBST([libgdiplus_loc]) +AC_SUBST([libgdiplus_install_loc]) AC_ARG_ENABLE(icall-symbol-map,[ --enable-icall-symbol-map Generate tables which map icall functions to their C symbols], icall_symbol_map=$enableval, icall_symbol_map=no) if test "x$icall_symbol_map" = "xyes"; then @@ -3200,7 +3200,7 @@ if test ${ACCESS_UNALIGNED} = no; then CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS" fi -case "x$gc" in +case "x$libgc" in xincluded) # Pass CPPFLAGS to libgc configure # We should use a separate variable for this to avoid passing useless and @@ -3218,7 +3218,9 @@ case "x$gc" in # (infinite recursion, undefined parking behavior, etc) TMP_CPPFLAGS=`echo $TMP_CPPFLAGS | sed -e 's/-finstrument-for-thread-suspension//g'` ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args \"CPPFLAGS_FOR_LIBGC=$TMP_CPPFLAGS\" \"CFLAGS_FOR_LIBGC=$CFLAGS_FOR_LIBGC\"" - AC_CONFIG_SUBDIRS(libgc) + if test "x$support_boehm" = "xyes"; then + AC_CONFIG_SUBDIRS(libgc) + fi ;; esac @@ -3352,13 +3354,15 @@ AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target") AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes) AM_CONDITIONAL(INTERP_SUPPORTED, test x$interp_wanted = xtrue) -AM_CONDITIONAL(INCLUDED_LIBGC, test x$gc = xincluded) +AM_CONDITIONAL(INCLUDED_LIBGC, test x$libgc = xincluded) AC_SUBST(LIBC) AC_SUBST(INTL) AC_SUBST(SQLITE) AC_SUBST(SQLITE3) AC_SUBST(X11) +AC_SUBST(GDKX11) +AC_SUBST(GTKX11) AC_SUBST(XINERAMA) AC_DEFINE_UNQUOTED(ARCHITECTURE,"$arch_target",[The architecture this is running on]) AC_SUBST(arch_target) @@ -3699,11 +3703,6 @@ fi enable_system_aot=yes fi - if test "x$enable_loadedllvm" = "xyes"; then - # This seems to fail on the x86 buildbots - enable_system_aot=no - fi - if test x$host_win32 = xno -a x$enable_system_aot = xyes; then echo "ENABLE_AOT = 1" >> $mcs_topdir/build/config.make fi @@ -3765,6 +3764,8 @@ echo " mcs source: $mcsdir Engine: + Host: $host + Target: $target GC: $gc_msg TLS: $with_tls SIGALTSTACK: $with_sigaltstack diff --git a/data/config.in b/data/config.in index 44fefc08027..51cac3f0b43 100644 --- a/data/config.in +++ b/data/config.in @@ -10,12 +10,14 @@ - + + + @@ -27,8 +29,8 @@ - - - - + + + + diff --git a/eglib/Makefile.am b/eglib/Makefile.am index b7e5cd63894..84cc8353c99 100644 --- a/eglib/Makefile.am +++ b/eglib/Makefile.am @@ -1,5 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = $(WERROR_CFLAGS) + if HOST_WIN32 SUBDIRS = m4 src else diff --git a/eglib/acinclude.m4 b/eglib/acinclude.m4 index 526d00c1be7..5216cd14a5e 100644 --- a/eglib/acinclude.m4 +++ b/eglib/acinclude.m4 @@ -22,8 +22,8 @@ if test x$GCC != xyes; then dolt_supported=no fi case $host in -i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ -|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*) +i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ +|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*) pic_options='-fPIC' ;; ?86-pc-cygwin*|i?86-pc-cygwin*) diff --git a/eglib/configure.ac b/eglib/configure.ac index fab57247699..1ff6c42ff28 100644 --- a/eglib/configure.ac +++ b/eglib/configure.ac @@ -179,7 +179,7 @@ if test "x$have_iso_varargs" = "xyes"; then fi AC_SUBST(G_HAVE_ISO_VARARGS) -AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h) +AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h) AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0]) AC_SUBST(HAVE_ALLOCA_H) @@ -235,6 +235,12 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Chan fi ) +AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no) +if test x$werror_flag = xyes; then + WERROR_CFLAGS="-Werror" +fi +AC_SUBST([WERROR_CFLAGS]) + AC_SUBST(GPOINTER_TO_INT) AC_SUBST(GPOINTER_TO_UINT) AC_SUBST(GINT_TO_POINTER) diff --git a/eglib/src/Makefile.am b/eglib/src/Makefile.am index 0d0e90354ee..70d519ea225 100644 --- a/eglib/src/Makefile.am +++ b/eglib/src/Makefile.am @@ -1,5 +1,7 @@ noinst_LTLIBRARIES = libeglib.la libeglib-static.la +AM_CFLAGS = $(WERROR_CFLAGS) + win_files = \ eglib-config.hw \ gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \ @@ -30,6 +32,7 @@ libeglib_la_SOURCES = \ garray.c \ gbytearray.c \ gerror.c \ + vasprintf.h \ ghashtable.c \ giconv.c \ gmem.c \ diff --git a/eglib/src/gerror.c b/eglib/src/gerror.c index 790c388c7ad..2ec089c9956 100644 --- a/eglib/src/gerror.c +++ b/eglib/src/gerror.c @@ -30,6 +30,8 @@ #include #include +#include "vasprintf.h" + GError * g_error_new (gpointer domain, gint code, const char *format, ...) { diff --git a/eglib/src/glib.h b/eglib/src/glib.h index 6d6dadff448..7cb8e6179c0 100644 --- a/eglib/src/glib.h +++ b/eglib/src/glib.h @@ -49,12 +49,6 @@ G_BEGIN_DECLS -#ifdef G_OS_WIN32 -/* MSC and Cross-compilatin will use this */ -int vasprintf (char **strp, const char *fmt, va_list ap); -#endif - - /* * Basic data types */ @@ -727,8 +721,16 @@ GUnicodeBreakType g_unichar_break_type (gunichar c); #define G_UNLIKELY(x) (x) #endif +#if defined(_MSC_VER) +#define eg_unreachable() __assume(0) +#elif defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 5))) +#define eg_unreachable() __builtin_unreachable() +#else +#define eg_unreachable() +#endif + #define g_assert(x) G_STMT_START { if (G_UNLIKELY (!(x))) g_assertion_message ("* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x); } G_STMT_END -#define g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); } G_STMT_END +#define g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); eg_unreachable(); } G_STMT_END /* * Unicode conversion @@ -1008,19 +1010,6 @@ glong g_utf8_pointer_to_offset (const gchar *str, const gchar *pos); #define G_PRIORITY_DEFAULT 0 #define G_PRIORITY_DEFAULT_IDLE 200 -/* - * Empty thread functions, not used by eglib - */ -#define g_thread_supported() TRUE -#define g_thread_init(x) G_STMT_START { if (x != NULL) { g_error ("No vtable supported in g_thread_init"); } } G_STMT_END - -#define G_LOCK_DEFINE(name) int name; -#define G_LOCK_DEFINE_STATIC(name) static int name; -#define G_LOCK_EXTERN(name) -#define G_LOCK(name) -#define G_TRYLOCK(name) -#define G_UNLOCK(name) - #define GUINT16_SWAP_LE_BE_CONSTANT(x) ((((guint16) x) >> 8) | ((((guint16) x) << 8))) #define GUINT16_SWAP_LE_BE(x) ((guint16) (((guint16) x) >> 8) | ((((guint16)(x)) & 0xff) << 8)) diff --git a/eglib/src/goutput.c b/eglib/src/goutput.c index aff9f460c57..73ef1f383de 100644 --- a/eglib/src/goutput.c +++ b/eglib/src/goutput.c @@ -31,6 +31,8 @@ #include #include +#include "vasprintf.h" + /* The current fatal levels, error is always fatal */ static GLogLevelFlags fatal = G_LOG_LEVEL_ERROR; diff --git a/eglib/src/gspawn.c b/eglib/src/gspawn.c index 4f4e5bef539..836e6f2aa9c 100644 --- a/eglib/src/gspawn.c +++ b/eglib/src/gspawn.c @@ -41,6 +41,10 @@ #include #endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif + #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/eglib/src/gstr.c b/eglib/src/gstr.c index 335ccff9365..3e976c5a2ed 100644 --- a/eglib/src/gstr.c +++ b/eglib/src/gstr.c @@ -32,6 +32,8 @@ #include #include +#include "vasprintf.h" + /* This is not a macro, because I dont want to put _GNU_SOURCE in the glib.h header */ gchar * g_strndup (const gchar *str, gsize n) diff --git a/eglib/src/sort.frag.h b/eglib/src/sort.frag.h index 2cf5a9ba1f3..6dc1950ae4e 100644 --- a/eglib/src/sort.frag.h +++ b/eglib/src/sort.frag.h @@ -88,12 +88,24 @@ merge_lists (list_node *first, list_node *second, GCompareFunc func) static inline list_node * sweep_up (struct sort_info *si, list_node *list, int upto) { +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) + /* + * GCC incorrectly thinks we're writing below si->ranks array bounds. + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + int i; for (i = si->min_rank; i < upto; ++i) { list = merge_lists (si->ranks [i], list, si->func); si->ranks [i] = NULL; } return list; + +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) +#pragma GCC diagnostic pop +#endif } /* @@ -124,6 +136,14 @@ sweep_up (struct sort_info *si, list_node *list, int upto) static inline void insert_list (struct sort_info *si, list_node* list, int rank) { +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) + /* + * GCC incorrectly thinks we're writing below si->ranks array bounds. + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + int i; if (rank > si->n_ranks) { @@ -149,6 +169,10 @@ insert_list (struct sort_info *si, list_node* list, int rank) si->n_ranks = i + 1; si->min_rank = i; si->ranks [i] = list; + +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) +#pragma GCC diagnostic pop +#endif } #undef stringify2 diff --git a/eglib/src/vasprintf.h b/eglib/src/vasprintf.h new file mode 100644 index 00000000000..3d294541a5b --- /dev/null +++ b/eglib/src/vasprintf.h @@ -0,0 +1,11 @@ +#ifndef __VASPRINTF_H +#define __VASPRINTF_H + +#include +#include + +#ifndef HAVE_VASPRINTF +int vasprintf(char **ret, const char *fmt, va_list ap); +#endif + +#endif /* __VASPRINTF_H */ diff --git a/eglib/test/file.c b/eglib/test/file.c index 411c9452966..19276c990c6 100644 --- a/eglib/test/file.c +++ b/eglib/test/file.c @@ -115,7 +115,7 @@ test_file () #ifndef G_OS_WIN32 /* FIXME */ gchar *sympath; - gint ignored; + gint ignored G_GNUC_UNUSED; #endif res = g_file_test (NULL, 0); diff --git a/ikvm-native/jni.c b/ikvm-native/jni.c index dec858e131f..e638db1d76f 100644 --- a/ikvm-native/jni.c +++ b/ikvm-native/jni.c @@ -486,11 +486,15 @@ static void* JNIEnv_vtable[] = 0 // jlong JNICALL GetDirectBufferCapacity(jobject buf); }; -JNIEXPORT void** JNICALL ikvm_GetJNIEnvVTable() +void** ikvm_GetJNIEnvVTable(void); + +JNIEXPORT void** JNICALL ikvm_GetJNIEnvVTable(void) { return JNIEnv_vtable; } +void* JNICALL ikvm_MarshalDelegate(void* p); + JNIEXPORT void* JNICALL ikvm_MarshalDelegate(void* p) { return p; @@ -498,6 +502,8 @@ JNIEXPORT void* JNICALL ikvm_MarshalDelegate(void* p) typedef jint (JNICALL *PJNI_ONLOAD)(JavaVM* vm, void* reserved); +jint JNICALL ikvm_CallOnLoad(PJNI_ONLOAD method, JavaVM* vm, void* reserved); + JNIEXPORT jint JNICALL ikvm_CallOnLoad(PJNI_ONLOAD method, JavaVM* vm, void* reserved) { return method(vm, reserved); diff --git a/ikvm-native/os.c b/ikvm-native/os.c index 9f2115f712b..43531ae0ea5 100644 --- a/ikvm-native/os.c +++ b/ikvm-native/os.c @@ -61,16 +61,22 @@ #include #include "jni.h" + void* JNICALL ikvm_LoadLibrary(char* psz); + JNIEXPORT void* JNICALL ikvm_LoadLibrary(char* psz) { return g_module_open(psz, 0); } + void JNICALL ikvm_FreeLibrary(GModule* handle); + JNIEXPORT void JNICALL ikvm_FreeLibrary(GModule* handle) { g_module_close(handle); } + void* JNICALL ikvm_GetProcAddress(GModule* handle, char* name, jint argc); + JNIEXPORT void* JNICALL ikvm_GetProcAddress(GModule* handle, char* name, jint argc) { void *symbol; @@ -83,16 +89,22 @@ return NULL; } + void* JNICALL ikvm_mmap(int fd, jboolean writeable, jboolean copy_on_write, jlong position, jint size); + JNIEXPORT void* JNICALL ikvm_mmap(int fd, jboolean writeable, jboolean copy_on_write, jlong position, jint size) { return mmap(0, size, writeable ? PROT_WRITE | PROT_READ : PROT_READ, copy_on_write ? MAP_PRIVATE : MAP_SHARED, fd, position); } + int JNICALL ikvm_munmap(void* address, jint size); + JNIEXPORT int JNICALL ikvm_munmap(void* address, jint size) { return munmap(address, size); } + int JNICALL ikvm_msync(void* address, jint size); + JNIEXPORT int JNICALL ikvm_msync(void* address, jint size) { #if defined(__native_client__) && defined(USE_NEWLIB) diff --git a/libgc/Makefile.am b/libgc/Makefile.am index 49dbe4be81c..a53aafcbf3e 100644 --- a/libgc/Makefile.am +++ b/libgc/Makefile.am @@ -68,7 +68,7 @@ libmonogc_static_la_LDFLAGS = -static EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.s sparc_mach_dep.S -AM_CFLAGS = @GC_CFLAGS@ +AM_CFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@ if CPLUSPLUS extra_checks = test_cpp diff --git a/libgc/acinclude.m4 b/libgc/acinclude.m4 index 526d00c1be7..5216cd14a5e 100644 --- a/libgc/acinclude.m4 +++ b/libgc/acinclude.m4 @@ -22,8 +22,8 @@ if test x$GCC != xyes; then dolt_supported=no fi case $host in -i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ -|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*) +i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ +|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*) pic_options='-fPIC' ;; ?86-pc-cygwin*|i?86-pc-cygwin*) diff --git a/libgc/configure.ac b/libgc/configure.ac index 837e2cb9f15..7dc04985a90 100644 --- a/libgc/configure.ac +++ b/libgc/configure.ac @@ -531,6 +531,12 @@ fi AC_ARG_ENABLE(quiet-build, [ --enable-quiet-build Enable quiet libgc build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes) AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host") +AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no) +if test x$werror_flag = xyes; then + WERROR_CFLAGS="-Werror" +fi +AC_SUBST([WERROR_CFLAGS]) + if test "${multilib}" = "yes"; then multilib_arg="--enable-multilib" else diff --git a/libgc/mark_rts.c b/libgc/mark_rts.c index 4074879a71a..b3e996a29c2 100644 --- a/libgc/mark_rts.c +++ b/libgc/mark_rts.c @@ -375,8 +375,15 @@ ptr_t GC_approx_sp() /* doing something wrong. */ # ifdef _MSC_VER # pragma warning(disable:4172) +# endif +# if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 408) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wreturn-local-addr" # endif return((ptr_t)(&dummy)); +# if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 408) +# pragma GCC diagnostic pop +# endif # ifdef _MSC_VER # pragma warning(default:4172) # endif diff --git a/man/mprof-report.1 b/man/mprof-report.1 index de40af60d8e..4b1b7816817 100644 --- a/man/mprof-report.1 +++ b/man/mprof-report.1 @@ -211,6 +211,15 @@ The following commands are available: .IP \[bu] 2 \f[I]heapshot\f[]: perform a heapshot as soon as possible .RE +.IP \[bu] 2 +\f[I]counters\f[]: sample counters values every 1 second. This allow +a really lightweight way to have insight in some of the runtime key +metrics. Counters displayed in non verbose mode are : Methods from AOT, +Methods JITted using mono JIT, Methods JITted using LLVM, Total time +spent JITting (sec), User Time, System Time, Total Time, Working Set, +Private Bytes, Virtual Bytes, Page Faults and CPU Load Average (1min, +5min and 15min). +.RE .SS Analyzing the profile data .PP Currently there is a command line program (\f[I]mprof-report\f[]) @@ -284,6 +293,16 @@ where \f[I]MODE\f[] can be: .IP \[bu] 2 \f[I]bytes\f[]: the total number of bytes used by objects of the given type +.PP +To change the sort order of counters, use the option: +.PP +\f[B]--counters-sort=MODE\f[] +.PP +where \f[I]MODE\f[] can be: +.IP \[bu] 2 +\f[I]time\f[]: sort values by time then category +.IP \[bu] 2 +\f[I]category\f[]: sort values by category then time .SS Selecting what data to report .PP The profiler by default collects data about many runtime subsystems @@ -319,6 +338,8 @@ version \f[I]thread\f[]: thread information .IP \[bu] 2 \f[I]heapshot\f[]: live heap usage at heap shots +.IP \[bu] 2 +\f[I]counters\f[]: counters samples .PP It is possible to limit some of the data displayed to a timeframe of the program execution with the option: diff --git a/mcs/Makefile b/mcs/Makefile index 14986b96ef5..85b75af4a73 100644 --- a/mcs/Makefile +++ b/mcs/Makefile @@ -24,7 +24,6 @@ centum_tests := \ class/System.XML \ class/Commons.Xml.Relaxng \ class/Cscompmgd \ - class/Microsoft.JScript \ class/Mono.Posix \ class/Mono.Security \ class/System.Design \ diff --git a/mcs/build/profiles/basic.make b/mcs/build/profiles/basic.make index c270cc81ccf..12f6c82cff2 100644 --- a/mcs/build/profiles/basic.make +++ b/mcs/build/profiles/basic.make @@ -65,7 +65,7 @@ do-profile-check: $(depsdir)/.stamp $(MAKE) -s do-profile-check-monolite ; \ else \ echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \ - echo "*** You need Mono version 2.4 or better installed to build MCS" 1>&2 ; \ + echo "*** You need Mono version 2.10 or better installed to build MCS" 1>&2 ; \ echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \ exit 1; fi; fi diff --git a/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs index 48a4e24b5f0..060d9292265 100644 --- a/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs +++ b/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs @@ -40,6 +40,8 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.COMException))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComMemberType))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComSourceInterfacesAttribute))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IStream))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STATSTG))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CriticalHandle))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CurrencyWrapper))] //[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceMode))] @@ -76,4 +78,3 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.UnmanagedType))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VarEnum))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VariantWrapper))] - diff --git a/mcs/class/Facades/System.ServiceModel.Security/TypeForwarders.cs b/mcs/class/Facades/System.ServiceModel.Security/TypeForwarders.cs index e0cc880df29..b8424b6abaf 100644 --- a/mcs/class/Facades/System.ServiceModel.Security/TypeForwarders.cs +++ b/mcs/class/Facades/System.ServiceModel.Security/TypeForwarders.cs @@ -24,6 +24,7 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.SecurityBindingElement))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.SecurityHeaderLayout))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.TransportSecurityBindingElement))] +#if !MOBILE [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DnsEndpointIdentity))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageSecurityVersion))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.BasicSecurityProfileVersion))] @@ -37,3 +38,4 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.TrustVersion))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SpnEndpointIdentity))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UpnEndpointIdentity))] +#endif \ No newline at end of file diff --git a/mcs/class/Makefile b/mcs/class/Makefile index b758a703aa0..03694f1032b 100644 --- a/mcs/class/Makefile +++ b/mcs/class/Makefile @@ -25,7 +25,7 @@ net_1_1_java_SUBDIRS = \ System.Runtime.Serialization.Formatters.Soap \ System.Runtime.Remoting -common_dirs := \ +net_2_0_dirs := \ corlib \ System \ System.XML \ @@ -78,14 +78,11 @@ common_dirs := \ Mono.Cecil \ Mono.Cecil.Mdb \ Mono.Debugger.Soft \ - SystemWebTestShim - -net_2_0_dirs := \ + SystemWebTestShim \ System.Xml.Linq \ System.Runtime.Serialization \ System.Data.DataSetExtensions \ System.Data.Linq \ - System.Web \ System.Web.Abstractions \ System.Web.Routing \ System.IdentityModel \ @@ -179,7 +176,6 @@ net_4_0_dirs := \ System.Xaml \ WindowsBase \ System.ServiceModel.Activation \ - System.ServiceModel \ System.ServiceModel.Routing \ System.ServiceModel.Discovery \ System.Runtime.Caching \ @@ -247,7 +243,7 @@ xbuild_4_0_dirs := \ $(xbuild_2_0_dirs) \ Microsoft.Build -net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler +net_2_0_SUBDIRS := $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler monodroid_SUBDIRS := $(mobile_dirs) $(monodroid_dirs) monotouch_SUBDIRS := $(mobile_dirs) $(monotouch_dirs) monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs) @@ -255,13 +251,13 @@ mobile_static_SUBDIRS := $(mobile_dirs) mobile_SUBDIRS := $(mobile_dirs) xammac_SUBDIRS := $(mobile_dirs) $(xammac_dirs) net_3_5_SUBDIRS := $(xbuild_2_0_dirs) -net_4_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs) -net_4_5_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler +net_4_0_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs) +net_4_5_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler xbuild_12_SUBDIRS := $(xbuild_4_0_dirs) include ../build/rules.make -SUBDIRS = $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs) +SUBDIRS = $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs) DIST_ONLY_SUBDIRS = dlr aot-compiler $(xbuild_4_0_dirs) @@ -291,7 +287,7 @@ all-local $(STD_TARGETS:=-local): @: # Files needed to bootstrap C# compiler -basic_files = basic.exe mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll +basic_files = basic.exe mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll monolite_files = $(basic_files:%=lib/monolite/%) lib/monolite: diff --git a/mcs/class/Managed.Windows.Forms/.gitignore b/mcs/class/Managed.Windows.Forms/.gitignore new file mode 100644 index 00000000000..f6cce0c5ff3 --- /dev/null +++ b/mcs/class/Managed.Windows.Forms/.gitignore @@ -0,0 +1,3 @@ +DummyAssembly.dll +DummyAssembly.mdb +test_file diff --git a/mcs/class/Managed.Windows.Forms/Makefile b/mcs/class/Managed.Windows.Forms/Makefile index 7a7439b7441..37a323899be 100644 --- a/mcs/class/Managed.Windows.Forms/Makefile +++ b/mcs/class/Managed.Windows.Forms/Makefile @@ -93,7 +93,10 @@ TEST_DISTFILES = \ Test/resources/32x32.ico \ Test/System.Resources/compat_1_1.resx \ Test/System.Resources/compat_2_0.resx \ - Test/System.Windows.Forms/bitmaps/a.png + Test/System.Windows.Forms/bitmaps/a.png \ + Test/DummyAssembly/AnotherSerializable.cs \ + Test/DummyAssembly/Convertable.cs \ + Test/DummyAssembly/Properties/AssemblyInfo.cs \ EXTRA_DISTFILES = \ README System.Windows.Forms.dll.resources \ @@ -106,6 +109,11 @@ TEST_MCS_FLAGS = /r:System.Data.dll /r:System.Drawing.dll /r:Accessibility.dll - -resource:Test/resources/32x32.ico,32x32.ico \ -nowarn:618,612 +DummyAssembly.dll: + $(CSCOMPILE) /target:library /out:$@ Test/DummyAssembly/AnotherSerializable.cs Test/DummyAssembly/Convertable.cs Test/DummyAssembly/Properties/AssemblyInfo.cs + +test-local: DummyAssembly.dll + include ../../build/library.make TEST_HARNESS_EXCLUDES = -exclude=Interactive,NotWorking,ValueAdd,CAS,InetAccess diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/X11Display.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/X11Display.cs index 43b39dcd4fc..a15b747d188 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/X11Display.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/X11Display.cs @@ -104,7 +104,7 @@ public X11Display (IntPtr display) { if (display == IntPtr.Zero) { throw new ArgumentNullException("Display", - "Could not open display (X-Server required. Check you DISPLAY environment variable)"); + "Could not open display (X-Server required. Check your DISPLAY environment variable)"); } this.display = display; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingSource.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingSource.cs index 3e928459ba0..a16a996355d 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingSource.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingSource.cs @@ -207,6 +207,7 @@ private void ConnectDataSourceEvents (object dataSource) private void OnParentCurrencyManagerChanged (object sender, EventArgs args) { // Essentially handles chained data sources (e.g. chained BindingSource) + ResetDataMemberIfInvalid (); ResetList (); } @@ -349,6 +350,7 @@ public object DataSource { DisconnectDataSourceEvents (datasource); datasource = value; + ResetDataMemberIfInvalid (); ConnectDataSourceEvents (datasource); ResetList (); @@ -454,6 +456,19 @@ public string Sort { } } + void ResetDataMemberIfInvalid () + { + if (datamember == String.Empty) + return; + + // if dataMember doesn't refer to a valid property of dataSource, we need to reset it + var property = ListBindingHelper.GetListItemProperties (datasource).Find (datamember, true); + if (property == null) { + datamember = String.Empty; + OnDataMemberChanged (EventArgs.Empty); + } + } + // NOTE: Probably the parsing can be improved void ProcessSortString (string sort) { diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs index 277e71c9c6b..e69308f62f3 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs @@ -390,7 +390,8 @@ private void ListChangedHandler (object sender, ListChangedEventArgs e) else if (e.NewIndex <= listposition) { /* the deleted row was either the current one, or one earlier in the list. Update the index and emit PositionChanged, CurrentChanged, and ItemChanged. */ - ChangeRecordState (listposition+1, + // FIXME: this looks wrong, shouldn't it be (listposition - 1) instead of e.NewIndex ? + ChangeRecordState (e.NewIndex, false, false, e.NewIndex != listposition, false); } else { @@ -412,7 +413,7 @@ private void ListChangedHandler (object sender, ListChangedEventArgs e) } else { if (e.NewIndex <= listposition) { - ChangeRecordState (e.NewIndex, + ChangeRecordState (listposition + 1, false, false, false, false); OnItemChanged (new ItemChangedEventArgs (-1)); OnListChanged (e); diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs index a930aa9301f..5fa129b4c06 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs @@ -150,7 +150,7 @@ static void WriteToFile (MemoryStream st) } */ - static byte [] header = new byte []{ 77, 83, 70, 116, 73, 76, 3, 0 }; + static byte [] header = new byte []{ 77, 83, 70, 116, 73, 76, 1, 1 }; public void GetObjectData (SerializationInfo si, StreamingContext context) { MemoryStream stream = new MemoryStream (); @@ -169,7 +169,7 @@ public void GetObjectData (SerializationInfo si, StreamingContext context) writer.Write ((ushort) (images [0].Width)); writer.Write ((ushort) (images [0].Height)); writer.Write (0xFFFFFFFF); //BackColor.ToArgb ()); //FIXME: should set the right one here. - writer.Write ((ushort) 0x1009); + writer.Write ((ushort) 0x21); for (int i = 0; i < 4; i++) writer.Write ((short) -1); diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs index c1b7d791f8d..f7075e8ef8f 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs @@ -3833,8 +3833,7 @@ public ListViewItem GetItemAt (int x, int y) { Size item_size = ItemSize; for (int i = 0; i < items.Count; i++) { - Point item_location = GetItemLocation (i); - Rectangle item_rect = new Rectangle (item_location, item_size); + Rectangle item_rect = items [i].Bounds; if (item_rect.Contains (x, y)) return items [i]; } diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericUpDown.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericUpDown.cs index 5ffc23eb615..856137cb17e 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericUpDown.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericUpDown.cs @@ -109,7 +109,7 @@ public NumericUpDown() { hexadecimal = false; increment = 1M; maximum = 100M; - minimum = 0.0M; + minimum = 0M; thousands_separator = false; Text = "0"; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs index e05a093aac5..1f3af258464 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs @@ -552,7 +552,7 @@ internal void SetDisplay(IntPtr display_handle) ErrorHandler = new XErrorHandler(HandleError); XSetErrorHandler(ErrorHandler); } else { - throw new ArgumentNullException("Display", "Could not open display (X-Server required. Check you DISPLAY environment variable)"); + throw new ArgumentNullException("Display", "Could not open display (X-Server required. Check your DISPLAY environment variable)"); } } #endregion // Internal Methods diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11GTK.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11GTK.cs index 77e89c4975a..b8820a9bed0 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11GTK.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11GTK.cs @@ -708,7 +708,7 @@ internal void SetDisplay (IntPtr display_handle) ErrorHandler = new XErrorHandler (HandleError); XSetErrorHandler (ErrorHandler); } else { - throw new ArgumentNullException ("Display", "Could not open display (X-Server required. Check you DISPLAY environment variable)"); + throw new ArgumentNullException ("Display", "Could not open display (X-Server required. Check your DISPLAY environment variable)"); } } #endregion // Internal Methods diff --git a/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/AnotherSerializable.cs b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/AnotherSerializable.cs new file mode 100644 index 00000000000..a6336ce2753 --- /dev/null +++ b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/AnotherSerializable.cs @@ -0,0 +1,88 @@ +// +// AnotherSerializable.cs : Serializable Class used to test types from other +// assemblies for resources tests +// +// Author: +// Gary Barnett (gary.barnett.mono@gmail.com) +// +// Copyright (C) Gary Barnett (2012) +// +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using System.Runtime.Serialization; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; + +namespace DummyAssembly { + [SerializableAttribute] + public class AnotherSerializable : ISerializable { + public string name; + public string value; + + public AnotherSerializable () + { + } + + public AnotherSerializable (string name, string value) + { + this.name = name; + this.value = value; + } + + public AnotherSerializable (SerializationInfo info, StreamingContext ctxt) + { + name = (string) info.GetValue ("sername", typeof (string)); + value = (String) info.GetValue ("servalue", typeof (string)); + } + + public AnotherSerializable (Stream stream) + { + BinaryFormatter bFormatter = new BinaryFormatter (); + AnotherSerializable deser = (AnotherSerializable) bFormatter.Deserialize (stream); + stream.Close (); + + name = deser.name; + value = deser.value; + } + + public void GetObjectData (SerializationInfo info, StreamingContext ctxt) + { + info.AddValue ("sername", name); + info.AddValue ("servalue", value); + } + + public override string ToString () + { + return String.Format ("name={0};value={1}", this.name, this.value); + } + + public override bool Equals (object obj) + { + AnotherSerializable o = obj as AnotherSerializable; + if (o == null) + return false; + return this.name.Equals (o.name) && this.value.Equals (o.value); + } + } +} + diff --git a/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Convertable.cs b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Convertable.cs new file mode 100644 index 00000000000..7f1ea031380 --- /dev/null +++ b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Convertable.cs @@ -0,0 +1,119 @@ +// +// Convertable.cs : Class with type converter used to test types from other +// assemblies for resources tests +// +// Author: +// Gary Barnett (gary.barnett.mono@gmail.com) +// +// Copyright (C) Gary Barnett (2012) +// +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Runtime.Serialization.Formatters.Binary; +using System.IO; +using System.Runtime.Serialization; +using System.ComponentModel; + +namespace DummyAssembly { + + [SerializableAttribute] + [TypeConverter (typeof (ConvertableConverter))] + public class Convertable { + protected string name; + protected string value; + + public Convertable () + { + } + + public Convertable (string name, string value) + { + this.name = name; + this.value = value; + } + + public void GetObjectData (SerializationInfo info, StreamingContext ctxt) + { + info.AddValue ("sername", name); + info.AddValue ("servalue", value); + } + + public override string ToString () + { + return String.Format ("{0}\t{1}",name, value); + } + + public override bool Equals (object obj) + { + Convertable o = obj as Convertable; + if (o == null) + return false; + return this.name.Equals (o.name) && this.value.Equals (o.value); + } + } + + class ConvertableConverter : TypeConverter { + public ConvertableConverter () + { + } + + public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType) + { + return sourceType == typeof (string); + } + + public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType) + { + return destinationType == typeof (string); + } + + public override object ConvertFrom (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) + { + if (value.GetType() != typeof (string)) + throw new Exception ("value not string"); + + string serialised = (string) value; + + string [] parts = serialised.Split ('\t'); + + if (parts.Length != 2) + throw new Exception ("string in incorrect format"); + + Convertable convertable = new Convertable (parts [0], parts [1]); + return convertable; + } + + public override object ConvertTo (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) + { + if (destinationType != typeof (String)) { + return base.ConvertTo (context, culture, value, destinationType); + } + + return ((Convertable) value).ToString (); + } + } + +} + diff --git a/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Properties/AssemblyInfo.cs b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..73e9fef7f11 --- /dev/null +++ b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle ("DummyAssembly")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("")] +[assembly: AssemblyProduct ("DummyAssembly")] +[assembly: AssemblyCopyright ("")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible (false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid ("c80e062b-a918-4aa5-b62c-7455ca2c56d5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion ("1.0.0.0")] +[assembly: AssemblyFileVersion ("1.0.0.0")] diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs index fb231e26345..4c6ba44c18c 100644 --- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs +++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs @@ -144,15 +144,14 @@ public void CommentNullToStringEmpty () [Test] public void WriteRead1 () { - ResXResourceWriter rw = new ResXResourceWriter ("resx.resx"); serializable ser = new serializable ("aaaaa", "bbbbb"); ResXDataNode dn = new ResXDataNode ("test", ser); dn.Comment = "comment"; - rw.AddResource (dn); - rw.Close (); + + string resXFile = GetResXFileWithNode (dn, "resx.resx"); bool found = false; - ResXResourceReader rr = new ResXResourceReader ("resx.resx"); + ResXResourceReader rr = new ResXResourceReader (resXFile); rr.UseResXDataNodes = true; IDictionaryEnumerator en = rr.GetEnumerator (); while (en.MoveNext ()) { @@ -224,7 +223,6 @@ public void DoesNotRequireResXFileToBeOpen_Serializable () ResXDataNode node = ((DictionaryEntry) en.Current).Value as ResXDataNode; rr.Close (); - File.Delete ("resx.resx"); Assert.IsNotNull (node,"#A1"); serializable o = node.GetValue ((AssemblyName []) null) as serializable; @@ -245,7 +243,6 @@ public void DoesNotRequireResXFileToBeOpen_TypeConverter () ResXDataNode node = ((DictionaryEntry) en.Current).Value as ResXDataNode; rr.Close (); - File.Delete ("resx.resx"); Assert.IsNotNull (node, "#A1"); object o = node.GetValue ((AssemblyName []) null); diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs index f90a1b98c12..198dcda4270 100644 --- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs +++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs @@ -104,6 +104,7 @@ private class CustomSerializableClass } [Test] + [Category ("NotWorking")] // Doesn't work under Xvfb. public void DataRemainsOnClipboard_Xamarin4959 () { // Compile an app that puts something on the clipboard diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs index e0261dc21bb..aef76e0777a 100644 --- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs +++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs @@ -172,6 +172,8 @@ public void TestDeleteOnlyRow () row.Delete (); + Assert.AreEqual (-1, cm.Position); + // Console.WriteLine (event_log); Assert.AreEqual ( @@ -221,6 +223,8 @@ public void TestDeleteRowBeforeCurrent () row.Delete (); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -273,6 +277,8 @@ public void TestDeleteRowAfterCurrent () row.Delete (); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); #if WITH_BINDINGS @@ -323,6 +329,8 @@ public void TestDeleteCurrentRowWithOthers () row.Delete (); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -379,6 +387,8 @@ public void TestAddFirstRow () DataRow newrow = dataSet1.Tables[0].NewRow (); dataSet1.Tables[0].Rows.Add(newrow); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -434,6 +444,8 @@ public void TestAppendRowAfterCurrent () newrow = dataSet1.Tables[0].NewRow (); dataSet1.Tables[0].Rows.Add(newrow); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); #if WITH_BINDINGS @@ -489,6 +501,8 @@ public void TestInsertRowBeforeCurrent () newrow = dataSet1.Tables[0].NewRow (); dataSet1.Tables[0].Rows.InsertAt(newrow, 0); + Assert.AreEqual (2, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -547,6 +561,8 @@ public void TestInsertRowAtCurrent () newrow = dataSet1.Tables[0].NewRow (); dataSet1.Tables[0].Rows.InsertAt(newrow, 1); + Assert.AreEqual (2, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -596,6 +612,8 @@ public void TestColumnAdd () dataSet1.Tables[0].Columns.Add(); + Assert.AreEqual (-1, cm.Position); + Console.WriteLine (event_log); #if NET_2_0 @@ -635,6 +653,8 @@ public void TestColumnRemove () dataSet1.Tables[0].Columns.Remove(dataSet1.Tables[0].Columns[1]); + Assert.AreEqual (-1, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ("0: MetaDataChanged\n", event_log, "2"); @@ -672,6 +692,8 @@ public void TestColumnRemoveBound () dataSet1.Tables[0].Columns.Remove(dataSet1.Tables[0].Columns[0]); + Assert.AreEqual (-1, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ("0: MetaDataChanged\n", event_log, "3"); @@ -717,6 +739,8 @@ public void TestColumnChangeName () dataSet1.Tables[0].Columns[0].ColumnName = "new name"; + Assert.AreEqual (-1, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ("0: MetaDataChanged\n", event_log, "3"); @@ -775,6 +799,8 @@ public void TestRowModify () row[column_name] = "hi"; row.EndEdit (); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -834,6 +860,8 @@ public void TestRowCancelModify () row[column_name] = "hi"; cm.CancelCurrentEdit (); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ("0: ItemChanged (index = 0)\n", event_log, "2"); @@ -875,6 +903,8 @@ public void TestDeleteInEdit () DataRowView row = (DataRowView)cm.Current; row.Delete (); + Assert.AreEqual (-1, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs index 9a7e9bcfb40..9712812c294 100644 --- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs +++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs @@ -642,6 +642,7 @@ public void MinimumSizeChangedTest () private static int oipt_t1 = 0; private static int oipt_t2 = 0; [Test] + [NUnit.Framework.Category ("NotWorking")] public void OneIdlePerThread () { Thread t = Thread.CurrentThread; oipt_t1 = t.ManagedThreadId; diff --git a/mcs/class/Managed.Windows.Forms/resources/keyboards.resx b/mcs/class/Managed.Windows.Forms/resources/keyboards.resx index f6f5fadb7df..4fac9f436ca 100644 --- a/mcs/class/Managed.Windows.Forms/resources/keyboards.resx +++ b/mcs/class/Managed.Windows.Forms/resources/keyboards.resx @@ -1,18 +1,96 @@  + + + + + + + + + + + + + + + + + + + - + + @@ -27,4 +105,1454 @@ -text/microsoft-resx1.3System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089AAEAAAD/////AQAAAAAAAAAMAgAAAEdjcmVhdGUta2V5Ym9hcmRzLCBWZXJzaW9uPTAuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbAcBAAAAAAEAAABAAAAABCNTeXN0ZW0uV2luZG93cy5Gb3Jtcy5LZXlib2FyZExheW91dAIAAAAJAwAAAAkEAAAACQUAAAAJBgAAAAkHAAAACQgAAAAJCQAAAAkKAAAACQsAAAAJDAAAAAkNAAAACQ4AAAAJDwAAAAkQAAAACREAAAAJEgAAAAkTAAAACRQAAAAJ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UAAABFAAAADxcCAAACAAAAD3IAAABSAAAADxgCAAACAAAAD3QAAABUAAAADxkCAAACAAAAD3kAAABZAAAADxoCAAACAAAAD3UAAABVAAAADxsCAAACAAAAD2kAAABJAAAADxwCAAACAAAAD28AAABPAAAADx0CAAACAAAAD3AAAABQAAAADx4CAAACAAAAD1sAAAB7AAAADx8CAAACAAAAD10AAAB9AAAADyACAAACAAAAD2EAAABBAAAADyECAAACAAAAD3MAAABTAAAADyICAAACAAAAD2QAAABEAAAADyMCAAACAAAAD2YAAABGAAAADyQCAAACAAAAD2cAAABHAAAADyUCAAACAAAAD2gAAABIAAAADyYCAAACAAAAD2oAAABKAAAADycCAAACAAAAD2sAAABLAAAADygCAAACAAAAD2wAAABMAAAADykCAAACAAAADzsAAAA6AAAADyoCAAACAAAADycAAABAAAAADysCAAACAAAADyMAAAB+AAAADywCAAACAAAAD3oAAABaAAAADy0CAAACAAAAD3gAAABYAAAADy4CAAACAAAAD2MAAABDAAAADy8CAAACAAAAD3YAAABWAAAADzACAAACAAAAD2IAAABCAAAADzECAAACAAAAD24AAABOAAAADzICAAACAAAAD20AAABNAAAADzMCAAACAAAADywAAAA8AAAADzQCAAACAAAADy4AAAA+AAAADzUCAAACAAAADy8AAAA/AAAADzYCAAACAAAAD1wAAAB8AAAADzcCAAAAAAAADw84AgAAAgAAAA9eAAAAsP///w85AgAAAgAAAA8xAAAAIQAAAA86AgAAAgAAAA8yAAAAIgAAAA87AgAAAgAAAA8zAAAAp////w88AgAAAgAAAA80AAAAJAAAAA89AgAAAgAAAA81AAAAJQAAAA8+AgAAAgAAAA82AAAAJgAAAA8/AgAAAgAAAA83AAAALwAAAA9AAgAAAgAAAA84AAAAKAAAAA9BAgAAAgAAAA85AAAAKQAAAA9CAgAAAgAAAA8wAAAAPQAAAA9DAgAAAgAAAA/f////PwAAAA9EAgAAAgAAAA+0////YAAAAA9FAgAAAgAAAA9xAAAAUQAAAA9GAgAAAgAAAA93AAAAVwAAAA9HAgAAAgAAA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AAAIAAAAPbgAAAE4AAAAPJwMAAAIAAAAPbQAAAE0AAAAPKAMAAAIAAAAPLAAAADsAAAAPKQMAAAIAAAAPLgAAADoAAAAPKgMAAAIAAAAPLQAAAF8AAAAPKwMAAAIAAAAPPAAAAD4AAAAPLAMAAAAAAAAPDy0DAAACAAAAD6f///+w////Dy4DAAACAAAADzEAAAArAAAADy8DAAACAAAADzIAAAAiAAAADzADAAACAAAADzMAAAAqAAAADzEDAAACAAAADzQAAADn////DzIDAAACAAAADzUAAAAlAAAADzMDAAACAAAADzYAAAAmAAAADzQDAAACAAAADzcAAAAvAAAADzUDAAACAAAADzgAAAAoAAAADzYDAAACAAAADzkAAAApAAAADzcDAAACAAAADzAAAAA9AAAADzgDAAACAAAADycAAAA/AAAADzkDAAACAAAAD14AAABgAAAADzoDAAACAAAAD3EAAABRAAAADzsDAAACAAAAD3cAAABXAAAADzwDAAACAAAAD2UAAABFAAAADz0DAAACAAAAD3IAAABSAAAADz4DAAACAAAAD3QAAABUAAAADz8DAAACAAAAD3oAAABaAAAAD0ADAAACAAAAD3UAAABVAAAAD0EDAAACAAAAD2kAAABJAAAAD0IDAAACAAAAD28AAABPAAAAD0MDAAACAAAAD3AAAABQAAAAD0QDAAACAAAAD+j////8////D0UDAAACAAAAD6j///8hAAAAD0YDAAACAAAAD2EAAABBAAAAD0cDAAACAAAAD3MAAABTAAAAD0gDAAACAAAAD2QAAABEAAAAD0kDAAACAAAAD2YAAABGAAAAD0oDAAACAAAAD2cAAABHAAAAD0sDAAACAAAAD2gAAABIAAAAD0wDAAACAAAAD2oAAABKAAAAD00DAAACAAAAD2sAAABLAAAAD04DAAACAAAAD2wAAABMAAAAD08DAAACAAAAD+n////2////D1ADAAACAAAAD+D////k////D1EDAAACAAAADyQAAACj////D1IDAAACAAAAD3kAAABZAAAAD1MDAAACAAAAD3gAAABYAAAAD1QDAAACAAAAD2MAAABDAAAAD1UDAAACAAAAD3YAAABWAAAAD1YDAAACAAAAD2IAAABCAAAAD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ACAAAADz0AAAArAAAAD5EEAAACAAAAD3EAAABRAAAAD5IEAAACAAAAD3cAAABXAAAAD5MEAAACAAAAD2UAAABFAAAAD5QEAAACAAAAD3IAAABSAAAAD5UEAAACAAAAD3QAAABUAAAAD5YEAAACAAAAD3kAAABZAAAAD5cEAAACAAAAD3UAAABVAAAAD5gEAAACAAAAD2kAAABJAAAAD5kEAAACAAAAD28AAABPAAAAD5oEAAACAAAAD3AAAABQAAAAD5sEAAACAAAAD14AAABeAAAAD5wEAAACAAAAD7j///+o////D50EAAACAAAAD2EAAABBAAAAD54EAAACAAAAD3MAAABTAAAAD58EAAACAAAAD2QAAABEAAAAD6AEAAACAAAAD2YAAABGAAAAD6EEAAACAAAAD2cAAABHAAAAD6IEAAACAAAAD2gAAABIAAAAD6MEAAACAAAAD2oAAABKAAAAD6QEAAACAAAAD2sAAABLAAAAD6UEAAACAAAAD2wAAABMAAAAD6YEAAACAAAADzsAAAA6AAAAD6cEAAACAAAAD2AAAABgAAAAD6gEAAACAAAADzwAAAA+AAAAD6kEAAACAAAAD3oAAABaAAAAD6oEAAACAAAAD3gAAABYAAAAD6sEAAACAAAAD2MAAABDAAAAD6wEAAACAAAAD3YAAABWAAAAD60EAAACAAAAD2IAAABCAAAAD64EAAACAAAAD24AAABOAAAAD68EAAACAAAAD20AAABNAAAAD7AEAAACAAAADywAAAAnAAAAD7EEAAABAAAADy4AAAAPsgQAAAIAAAAP6f///8n///8PswQAAAIAAAAPq////7v///8PtAQAAAAAAAAPD7UEAAACAAAADy8AAABcAAAAD7YEAAAEAAAADzEAAAAhAAAAuf///6H///8PtwQAAAMAAAAPMgAAAEAAAACy////D7gEAAAEAAAADzMAAAAjAAAAs////6P///8PuQQAAAQAAAAPNAAAACQAAAC8////pP///w+6BAAAAwAAAA81AAAAJQAAAL3///8PuwQAAAMAAAAPNgAAAD8AAAC+////D7wEAAACAAAADzcAAAAmAAAAD70EAAACAAAADzgAAAAqAAAAD74EAAACAAAADzkAAAAoAAAAD78EAAACAAAADzAAAAApAAAAD8AEAAACAAAADy0AAABfAAAAD8EEAAACAAAADz0AAAArAAAAD8IEAAACAAAAD3EAAABRAAAAD8MEAAACAAAAD3cAAABXAAAAD8QEAAACAAAAD2UAAABFAAAAD8UEAAACAAAAD3IAAABSAAAAD8YEAAACAAAAD3QAAABUAAAAD8cEAAACAAAAD3kAAABZAAAAD8gEAAACAAAAD3UAAABVAAAAD8kEAAACAAAAD2kAAABJAAAAD8oEAAAEAAAAD28AAABPAAAA+P///9j///8PywQAAAQAAAAPcAAAAFAAAAD+////3v///w/MBAAAAwAAAA9eAAAAqP///6j///8PzQQAAAMAAAAP5////8f///9+AAAAD84EAAAEAAAAD2EAAABBAAAA5v///8b///8PzwQAAAQAAAAPcwAAAFMAAADf////p////w/QBAAABAAAAA9kAAAARAAAAPD////Q////D9EEAAACAAAAD2YAAABGAAAAD9IEAAACAAAAD2cAAABHAAAAD9MEAAACAAAAD2gAAABIAAAAD9QEAAACAAAAD2oAAABKAAAAD9UEAAACAAAAD2sAAABLAAAAD9YEAAACAAAAD2wAAABMAAAAD9cEAAADAAAADzsAAAA6AAAAtP///w/YBAAAAgAAAA/o////yP///w/ZBAAAAgAAAA/g////wP///w/aBAAAAgAAAA96AAAAWgAAAA/bBAAAAgAAAA94AAAAWAAAAA/cBAAABAAAAA9jAAAAQwAAAKL///+p////D90EAAACAAAAD3YAAABWAAAAD94EAAACAAAAD2IAAABCAAAAD98EAAACAAAAD24AAABOAAAAD+AEAAAEAAAAD20AAABNAAAAtf///7r///8P4QQAAAIAAAAPLAAAACcAAAAP4gQAAAQAAAAPLgAAACIAAAC3////9////w/jBAAAAgAAAA/p////yf///w/kBAAAAgAAAA/5////2f///w/lBAAAAAAAAA8P5gQAAAAAAAAPD+cEAAADAAAADyYAAAAxAAAAfAAAAA/oBAAAAwAAAA/p////MgAAAEAAAAAP6QQAAAMAAAAPIgAAADMAAAAjAAAAD+oEAAACAAAADycAAAA0AAAAD+sEAAACAAAADygAAAA1AAAAD+wEAAADAAAAD6f///82AAAAXgAAAA/tBAAAAgAAAA/o////NwAAAA/uBAAAAgAAAA8hAAAAOAAAAA/vBAAAAwAAAA/n////OQAAAHsAAAAP8AQAAAMAAAAP4P///zAAAAB9AAAAD/EEAAACAAAADykAAACw////D/IEAAACAAAADy0AAABfAAAAD/MEAAACAAAAD2EAAABBAAAAD/QEAAACAAAAD3oAAABaAAAAD/UEAAADAAAAD2UAAABFAAAApP///w/2BAAAAgAAAA9yAAAAUgAAAA/3BAAAAgAAAA90AAAAVAAAAA/4BAAAAgAAAA95AAAAWQAAAA/5BAAAAgAAAA91AAAAVQAAAA/6BAAAAgAAAA9pAAAASQAAAA/7BAAAAgAAAA9vAAAATwAAAA/8BAAAAgAAAA9wAAAAUAAAAA/9BAAAAwAAAA9eAAAAqP///1sAAAAP/gQAAAMAAAAPJAAAACoAAABdAAAAD/8EAAACAAAAD3EAAABRAAAADwAFAAADAAAAD3MAAABTAAAA3////w8BBQAAAgAAAA9kAAAARAAAAA8CBQAAAgAAAA9mAAAARgAAAA8DBQAAAgAAAA9nAAAARwAAAA8EBQAAAgAAAA9oAAAASAAAAA8FBQAAAgAAAA9qAAAASgAAAA8GBQAAAgAAAA9rAAAASwAAAA8HBQAAAgAAAA9sAAAATAAAAA8IBQAAAgAAAA9tAAAATQAAAA8JBQAAAwAAAA/5////JQAAALT///8PCgUAAAMAAAAPtf///6P///9gAAAADwsFAAACAAAAD3cAAABXAAAADwwFAAACAAAAD3gAAABYAAAADw0FAAACAAAAD2MAAABDAAAADw4FAAACAAAAD3YAAABWAAAADw8FAAACAAAAD2IAAABCAAAADxAFAAACAAAAD24AAABOAAAADxEFAAACAAAADywAAAA/AAAADxIFAAACAAAADzsAAAAuAAAADxMFAAACAAAADzoAAAAvAAAADxQFAAADAAAADz0AAAArAAAAfgAAAA8VBQAAAwAAAA88AAAAPgAAAFwAAAAPFgUAAAAAAAAPDxcFAAACAAAAD1wAAAB8AAAADxgFAAACAAAADzEAAAAhAAAADxkFAAACAAAADzIAAAAiAAAADxoFAAACAAAADzMAAAAjAAAADxsFAAACAAAADzQAAAAkAAAADxwFAAACAAAADzUAAAAlAAAADx0FAAACAAAADzYAAAAmAAAADx4FAAACAAAADzcAAAAvAAAADx8FAAACAAAADzgAAAAoAAAADyAFAAACAAAADzkAAAApAAAADyEFAAACAAAADzAAAAA9AAAADyIFAAACAAAADycAAAA/AAAADyMFAAACAAAAD6v///+7////DyQFAAACAAAAD3EAAABRAAAADyUFAAACAAAAD3cAAABXAAAADyYFAAACAAAAD2UAAABFAAAADycFAAACAAAAD3IAAABSAAAADygFAAACAAAAD3QAAABUAAAADykFAAACAAAAD3kAAABZAAAADyoFAAACAAAAD3UAAABVAAAADysFAAACAAAAD2kAAABJAAAADywFAAACAAAAD28AAABPAAAADy0FAAACAAAAD3AAAABQAAAADy4FAAACAAAADysAAAAqAAAADy8FAAACAAAAD7T///9gAAAADzAFAAACAAAAD2EAAABBAAAADzEFAAACAAAAD3MAAABTAAAADzIFAAACAAAAD2QAAABEAAAADzMFAAACAAAAD2YAAABGAAAADzQFAAACAAAAD2cAAABHAAAADzUFAAACAAAAD2gAAABIAAAADzYFAAACAAAAD2oAAABKAAAADzcFAAACAAAAD2sAAABLAAAADzgFAAACAAAAD2wAAABMAAAADzkFAAACAAAAD+f////H////DzoFAAACAAAAD7r///+q////DzsFAAACAAAAD34AAABeAAAADzwFAAACAAAAD3oAAABaAAAADz0FAAACAAAAD3gAAABYAAAADz4FAAACAAAAD2MAAABDAAAADz8FAAACAAAAD3YAAABWAAAAD0AFAAACAAAAD2IAAABCAAAAD0EFAAACAAAAD24AAABOAAAAD0IFAAACAAAAD20AAABNAAAAD0MFAAACAAAADywAAAA7AAAAD0QFAAACAAAADy4AAAA6AAAAD0UFAAACAAAADy0AAABfAAAAD0YFAAACAAAADzwAAAA+AAAAD0cFAAAAAAAADw9IBQAAAgAAAA8nAAAAIgAAAA9JBQAAAgAAAA8xAAAAIQAAAA9KBQAAAgAAA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QAAADsAAAAP9AUAAAQAAAAPYQAAAEEAAAD8////3P///w/1BQAABAAAAA9zAAAAUwAAAP/////f////D/YFAAAEAAAAD2QAAABEAAAA4P///8D///8P9wUAAAQAAAAPZgAAAEYAAADu////zv///w/4BQAABAAAAA9nAAAARwAAAOb////G////D/kFAAAEAAAAD2gAAABIAAAA4////8P///8P+gUAAAQAAAAPagAAAEoAAADy////0v///w/7BQAABAAAAA9rAAAASwAAAO3////N////D/wFAAAEAAAAD2wAAABMAAAA4v///8L///8P/QUAAAQAAAAPOwAAADoAAADs////zP///w/+BQAABAAAAA8nAAAAIgAAAPf////X////D/8FAAAEAAAAD1wAAAB8AAAAJwAAANv///8PAAYAAAQAAAAPegAAAFoAAAD+////3v///w8BBgAABAAAAA94AAAAWAAAAOn////J////DwIGAAAEAAAAD2MAAABDAAAA+v///9r///8PAwYAAAQAAAAPdgAAAFYAAAD9////3f///w8EBgAABAAAAA9iAAAAQgAAAPT////U////DwUGAAAEAAAAD24AAABOAAAA9f///9X///8PBgYAAAQAAAAPbQAAAE0AAADv////z////w8HBgAABAAAAA8sAAAAPAAAAPD////Q////DwgGAAAEAAAADy4AAAA+AAAA6////8v///8PCQYAAAQAAAAPLwAAAD8AAADh////wf///w8KBgAAAgAAAA88AAAAPgAAAA8LBgAAAAAAAA8PDAYAAAQAAAAPYAAAAH4AAAD3////1////w8NBgAAAgAAAA8xAAAAIQAAAA8OBgAAAgAAAA8yAAAAQAAAAA8PBgAAAgAAAA8zAAAAIwAAAA8QBgAAAgAAAA80AAAAJAAAAA8RBgAAAgAAAA81AAAAJQAAAA8SBgAAAgAAAA82AAAAXgAAAA8TBgAAAgAAAA83AAAAJgAAAA8UBgAAAgAAAA84AAAAKgAAAA8VBgAAAgAAAA85AAAAKAAAAA8WBgAAAgAAAA8wAAAAKQAAAA8XBgAAAgAAAA8tAAAAXwAAAA8YBgAAAgAAAA89AAAAKwAAAA8ZBgAABAAAAA9xAAAAUQAAAP/////f////DxoGAAAEAAAAD3cAAABXAAAA4v///8L///8PGwYAAAQAAAAPZQAAAEUAAADl////xf///w8cBgAABAAAAA9yAAAAUgAAAPD////Q////Dx0GAAAEAAAAD3QAAABUAAAA8v///9L///8PHgYAAAQAAAAPeQAAAFkAAAD6////2v///w8fBgAABAAAAA91AAAAVQAAAPP////T////DyAGAAAEAAAAD2kAAABJAAAA6P///8j///8PIQYAAAQAAAAPbwAAAE8AAADu////zv///w8iBgAABAAAAA9wAAAAUAAAAO/////P////DyMGAAAEAAAAD1sAAAB7AAAA+P///9j///8PJAYAAAQAAAAPXQAAAH0AAAD5////2f///w8lBgAABAAAAA9hAAAAQQAAAOD////A////DyYGAAAEAAAAD3MAAABTAAAA8f///9H///8PJwYAAAQAAAAPZAAAAEQAAADk////xP///w8oBgAABAAAAA9mAAAARgAAAPT////U////DykGAAAEAAAAD2cAAABHAAAA4////8P///8PKgYAAAQAAAAPaAAAAEgAAAD1////1f///w8rBgAABAAAAA9qAAAASgAAAOn////J////DywGAAAEAAAAD2sAAABLAAAA6v///8r///8PLQYAAAQAAAAPbAAAAEwAAADr////y////w8uBgAAAgAAAA87AAAAOgAAAA8vBgAAAgAAAA8nAAAAIgAAAA8wBgAABAAAAA9cAAAAfAAAAP7////e////DzEGAAAEAAAAD3oAAABaAAAA5////8f///8PMgYAAAQAAAAPeAAAAFgAAAD8////3P///w8zBgAABAAAAA9jAAAAQwAAAPb////W////DzQGAAAEAAAAD3YAAABWAAAA5v///8b///8PNQYAAAQAAAAPYgAAAEIAAADh////wf///w82BgAABAAAAA9uAAAATgAAAO3////N////DzcGAAAEAAAAD20AAABNAAAA7P///8z///8POAYAAAIAAAAPLAAAADwAAAAPOQYAAAIAAAAPLgAAAD4AAAAPOgYAAAIAAAAPLwAAAD8AAAAPOwYAAAIAAAAPPAAAAD4AAAAPPAYAAAAAAAAPDz0GAAAEAAAAD2AAAAB+AAAAo////7P///8PPgYAAAIAAAAPMQAAACEAAAAPPwYAAAIAAAAPMgAAAEAAAAAPQAYAAAIAAAAPMwAAACMAAAAPQQYAAAIAAAAPNAAAACQAAAAPQgYAAAIAAAAPNQAAACUAAAAPQwYAAAIAAAAPNgAAAF4AAAAPRAYAAAIAAAAPNwAAACYAAAAPRQYAAAIAAAAPOAAAACoAAAAPRgYAAAIAAAAPOQAAACgAAAAPRwYAAAIAAAAPMAAAACkAAAAPSAYAAAIAAAAPLQAAAF8AAAAPSQYAAAIAAAAPPQAAACsAAAAPSgYAAAQAAAAPcQAAAFEAAADK////6v///w9LBgAABAAAAA93AAAAVwAAAMP////j////D0wGAAAEAAAAD2UAAABFAAAA1f////X///8PTQYAAAQAAAAPcgAAAFIAAADL////6////w9OBgAABAAAAA90AAAAVAAAAMX////l////D08GAAAEAAAAD3kAAABZAAAAzv///+7///8PUAYAAAQAAAAPdQAAAFUAAADH////5////w9RBgAABAAAAA9pAAAASQAAANv////7////D1IGAAAEAAAAD28AAABPAAAArv///77///8PUwYAAAQAAAAPcAAAAFAAAADa////+v///w9UBgAABAAAAA9bAAAAewAAAMj////o////D1UGAAAEAAAAD10AAAB9AAAAJwAAACcAAAAPVgYAAAQAAAAPYQAAAEEAAADG////5v///w9XBgAABAAAAA9zAAAAUwAAANn////5////D1gGAAAEAAAAD2QAAABEAAAA1/////f///8PWQYAAAQAAAAPZgAAAEYAAADB////4f///w9aBgAABAAAAA9nAAAARwAAAND////w////D1sGAAAEAAAAD2gAAABIAAAA0v////L///8PXAYAAAQAAAAPagAAAEoAAADP////7////w9dBgAABAAAAA9rAAAASwAAAMz////s////D14GAAAEAAAAD2wAAABMAAAAxP///+T///8PXwYAAAQAAAAPOwAAADoAAADW////9v///w9gBgAABAAAAA8nAAAAIgAAANz////8////D2EGAAAEAAAAD1wAAAB8AAAALwAAAHwAAAAPYgYAAAQAAAAPegAAAFoAAADR////8f///w9jBgAABAAAAA94AAAAWAAAAN7////+////D2QGAAAEAAAAD2MAAABDAAAA0/////P///8PZQYAAAQAAAAPdgAAAFYAAADN////7f///w9mBgAABAAAAA9iAAAAQgAAAKb///+2////D2cGAAAEAAAAD24AAABOAAAA1P////T///8PaAYAAAQAAAAPbQAAAE0AAADY////+P///w9pBgAABAAAAA8sAAAAPAAAAML////i////D2oGAAAEAAAADy4AAAA+AAAAwP///+D///8PawYAAAQAAAAPLwAAAD8AAAAuAAAALAAAAA9sBgAABAAAAA88AAAAPgAAAHwAAACm////D20GAAAAAAAADw9uBgAAAgAAAA9gAAAAfgAAAA9vBgAAAgAAAA8xAAAAIQAAAA9wBgAAAgAAAA8yAAAAQAAAAA9xBgAAAgAAAA8zAAAAIwAAAA9yBgAAAgAAAA80AAAAJAAAAA9zBgAAAgAAAA81AAAAJQAAAA90BgAAAgAAAA82AAAAXgAAAA91BgAAAgAAAA83AAAAJgAAAA92BgAAAgAAAA84AAAAKgAAAA93BgAAAgAAAA85AAAAKAAAAA94BgAAAgAAAA8wAAAAKQAAAA95BgAAAgAAAA8tAAAAXwAAAA96BgAAAgAAAA89AAAAKwAAAA97BgAABAAAAA9xAAAAUQAAAMr////q////D3wGAAAEAAAAD3cAAABXAAAAw////+P///8PfQYAAAQAAAAPZQAAAEUAAADV////9f///w9+BgAABAAAAA9yAAAAUgAAAMv////r////D38GAAAEAAAAD3QAAABUAAAAxf///+X///8PgAYAAAQAAAAPeQAAAFkAAADO////7v///w+BBgAABAAAAA91AAAAVQAAAMf////n////D4IGAAAEAAAAD2kAAABJAAAA2/////v///8PgwYAAAQAAAAPbwAAAE8AAADd/////f///w+EBgAABAAAAA9wAAAAUAAAANr////6////D4UGAAAEAAAAD1sAAAB7AAAAyP///+j///8PhgYAAAQAAAAPXQAAAH0AAADf/////////w+HBgAABAAAAA9hAAAAQQAAAMb////m////D4gGAAAEAAAAD3MAAABTAAAA2f////n///8PiQYAAAQAAAAPZAAAAEQAAADX////9////w+KBgAABAAAAA9mAAAARgAAAMH////h////D4sGAAAEAAAAD2cAAABHAAAA0P////D///8PjAYAAAQAAAAPaAAAAEgAAADS////8v///w+NBgAABAAAAA9qAAAASgAAAM/////v////D44GAAAEAAAAD2sAAABLAAAAzP///+z///8PjwYAAAQAAAAPbAAAAEwAAADE////5P///w+QBgAABAAAAA87AAAAOgAAANb////2////D5EGAAAEAAAADycAAAAiAAAA3P////z///8PkgYAAAIAAAAPXAAAAHwAAAAPkwYAAAQAAAAPegAAAFoAAADR////8f///w+UBgAABAAAAA94AAAAWAAAAN7////+////D5UGAAAEAAAAD2MAAABDAAAA0/////P///8PlgYAAAQAAAAPdgAAAFYAAADN////7f///w+XBgAABAAAAA9iAAAAQgAAAMn////p////D5gGAAAEAAAAD24AAABOAAAA1P////T///8PmQYAAAQAAAAPbQAAAE0AAADY////+P///w+aBgAABAAAAA8sAAAAPAAAAML////i////D5sGAAAEAAAADy4AAAA+AAAAwP///+D///8PnAYAAAIAAAAPLwAAAD8AAAAPnQYAAAAAAAAPD54GAAAAAAAADw+fBgAAAgAAAA9gAAAAfgAAAA+gBgAAAgAAAA8xAAAAIQAAAA+hBgAAAgAAAA8yAAAAQAAAAA+iBgAAAgAAAA8zAAAAIwAAAA+jBgAAAgAAAA80AAAAJAAAAA+kBgAAAgAAAA81AAAAJQAAAA+lBgAAAgAAAA82AAAAXgAAAA+mBgAAAgAAAA83AAAAJgAAAA+nBgAAAgAAAA84AAAAKgAAAA+oBgAAAgAAAA85AAAAKAAAAA+pBgAAAgAAAA8wAAAAKQAAAA+qBgAAAgAAAA8tAAAAXwAAAA+rBgAAAgAAAA89AAAAKwAAAA+sBgAABAAAAA9xAAAAUQAAAMr////q////D60GAAAEAAAAD3cAAABXAAAAw////+P///8PrgYAAAQAAAAPZQAAAEUAAADV////9f///w+vBgAABAAAAA9yAAAAUgAAAMv////r////D7AGAAAEAAAAD3QAAABUAAAAxf///+X///8PsQYAAAQAAAAPeQAAAFkAAADO////7v///w+yBgAABAAAAA91AAAAVQAAAMf////n////D7MGAAAEAAAAD2kAAABJAAAA2/////v///8PtAYAAAQAAAAPbwAAAE8AAADd/////f///w+1BgAABAAAAA9wAAAAUAAAANr////6////D7YGAAAEAAAAD1sAAAB7AAAAyP///+j///8PtwYAAAQAAAAPXQAAAH0AAADf/////////w+4BgAABAAAAA9hAAAAQQAAAMb////m////D7kGAAAEAAAAD3MAAABTAAAA2f////n///8PugYAAAQAAAAPZAAAAEQAAADX////9////w+7BgAABAAAAA9mAAAARgAAAMH////h////D7wGAAAEAAAAD2cAAABHAAAA0P////D///8PvQYAAAQAAAAPaAAAAEgAAADS////8v///w++BgAABAAAAA9qAAAASgAAAM/////v////D78GAAAEAAAAD2sAAABLAAAAzP///+z///8PwAYAAAQAAAAPbAAAAEwAAADE////5P///w/BBgAABAAAAA87AAAAOgAAANb////2////D8IGAAAEAAAADycAAAAiAAAA3P////z///8PwwYAAAIAAAAPXAAAAHwAAAAPxAYAAAQAAAAPegAAAFoAAADR////8f///w/FBgAABAAAAA94AAAAWAAAAN7////+////D8YGAAAEAAAAD2MAAABDAAAA0/////P///8PxwYAAAQAAAAPdgAAAFYAAADN////7f///w/IBgAABAAAAA9iAAAAQgAAAMn////p////D8kGAAAEAAAAD24AAABOAAAA1P////T///8PygYAAAQAAAAPbQAAAE0AAADY////+P///w/LBgAABAAAAA8sAAAAPAAAAML////i////D8wGAAAEAAAADy4AAAA+AAAAwP///+D///8PzQYAAAIAAAAPLwAAAD8AAAAPzgYAAAIAAAAPPAAAAD4AAAAPzwYAAAAAAAAPD9AGAAACAAAADygAAAApAAAAD9EGAAACAAAADzEAAAAhAAAAD9IGAAACAAAADzIAAAAiAAAAD9MGAAACAAAADzMAAAAvAAAAD9QGAAACAAAADzQAAAAkAAAAD9UGAAACAAAADzUAAAA6AAAAD9YGAAACAAAADzYAAAAsAAAAD9cGAAACAAAADzcAAAAuAAAAD9gGAAACAAAADzgAAAA7AAAAD9kGAAACAAAADzkAAAA/AAAAD9oGAAACAAAADzAAAAAlAAAAD9sGAAACAAAADy0AAABfAAAAD9wGAAACAAAADz0AAAArAAAAD90GAAACAAAAD8r////q////D94GAAACAAAAD8P////j////D98GAAACAAAAD9X////1////D+AGAAACAAAAD8v////r////D+EGAAACAAAAD8X////l////D+IGAAACAAAAD87////u////D+MGAAACAAAAD8f////n////D+QGAAACAAAAD9v////7////D+UGAAACAAAAD93////9////D+YGAAACAAAAD9r////6////D+cGAAACAAAAD8j////o////D+gGAAACAAAAD9//////////D+kGAAACAAAAD8b////m////D+oGAAACAAAAD9n////5////D+sGAAACAAAAD9f////3////D+wGAAACAAAAD8H////h////D+0GAAACAAAAD9D////w////D+4GAAACAAAAD9L////y////D+8GAAACAAAAD8/////v////D/AGAAACAAAAD8z////s////D/EGAAACAAAAD8T////k////D/IGAAACAAAAD9b////2////D/MGAAACAAAAD9z////8////D/QGAAACAAAAD1wAAAB8AAAAD/UGAAACAAAAD9H////x////D/YGAAACAAAAD97////+////D/cGAAACAAAAD9P////z////D/gGAAACAAAAD83////t////D/kGAAACAAAAD8n////p////D/oGAAACAAAAD9T////0////D/sGAAACAAAAD9j////4////D/wGAAACAAAAD8L////i////D/0GAAACAAAAD8D////g////D/4GAAACAAAADy8AAAA/AAAAD/8GAAACAAAADzwAAAA+AAAADwAHAAAAAAAADw8BBwAAAgAAAA9gAAAAfgAAAA8CBwAAAgAAAA8xAAAAIQAAAA8DBwAAAgAAAA8yAAAAQAAAAA8EBwAAAgAAAA8zAAAAIwAAAA8FBwAAAgAAAA80AAAAJAAAAA8GBwAAAgAAAA81AAAAJQAAAA8HBwAAAgAAAA82AAAAXgAAAA8IBwAAAgAAAA83AAAAJgAAAA8JBwAAAgAAAA84AAAAKgAAAA8KBwAAAgAAAA85AAAAKAAAAA8LBwAAAgAAAA8wAAAAKQAAAA8MBwAAAgAAAA8tAAAAXwAAAA8NBwAAAgAAAA89AAAAKwAAAA8OBwAABAAAAA9xAAAAUQAAAOn////J////Dw8HAAAEAAAAD3cAAABXAAAA9v///9b///8PEAcAAAQAAAAPZQAAAEUAAADz////0////w8RBwAABAAAAA9yAAAAUgAAAOr////K////DxIHAAAEAAAAD3QAAABUAAAA5f///8X///8PEwcAAAQAAAAPeQAAAFkAAADt////zf///w8UBwAABAAAAA91AAAAVQAAAOP////D////DxUHAAAEAAAAD2kAAABJAAAA+P///9j///8PFgcAAAQAAAAPbwAAAE8AAAD5////2f///w8XBwAABAAAAA9wAAAAUAAAAOf////H////DxgHAAAEAAAAD1sAAAB7AAAA9f///9X///8PGQcAAAQAAAAPXQAAAH0AAAD6////2v///w8aBwAABAAAAA9hAAAAQQAAAPT////U////DxsHAAAEAAAAD3MAAABTAAAA+////9v///8PHAcAAAQAAAAPZAAAAEQAAADi////wv///w8dBwAABAAAAA9mAAAARgAAAOD////A////Dx4HAAAEAAAAD2cAAABHAAAA7////8////8PHwcAAAQAAAAPaAAAAEgAAADw////0P///w8gBwAABAAAAA9qAAAASgAAAO7////O////DyEHAAAEAAAAD2sAAABLAAAA6////8v///8PIgcAAAQAAAAPbAAAAEwAAADk////xP///w8jBwAABAAAAA87AAAAOgAAAOb////G////DyQHAAAEAAAADycAAAAiAAAA/f///93///8PJQcAAAIAAAAPXAAAAHwAAAAPJgcAAAQAAAAPegAAAFoAAAD/////3////w8nBwAABAAAAA94AAAAWAAAAPf////X////DygHAAAEAAAAD2MAAABDAAAA8f///9H///8PKQcAAAQAAAAPdgAAAFYAAADs////zP///w8qBwAABAAAAA9iAAAAQgAAAOj////I////DysHAAAEAAAAD24AAABOAAAA8v///9L///8PLAcAAAQAAAAPbQAAAE0AAAD8////3P///w8tBwAABAAAAA8sAAAAPAAAAOH////B////Dy4HAAAEAAAADy4AAAA+AAAA/v///97///8PLwcAAAIAAAAPLwAAAD8AAAAPMAcAAAIAAAAPPAAAAD4AAAAPMQcAAAAAAAAPDzIHAAACAAAAD2AAAAB+AAAADzMHAAACAAAADzEAAAAhAAAADzQHAAACAAAADzIAAABAAAAADzUHAAACAAAADzMAAAAjAAAADzYHAAACAAAADzQAAAAkAAAADzcHAAACAAAADzUAAAAlAAAADzgHAAACAAAADzYAAABeAAAADzkHAAACAAAADzcAAAAmAAAADzoHAAACAAAADzgAAAAqAAAADzsHAAACAAAADzkAAAAoAAAADzwHAAACAAAADzAAAAApAAAADz0HAAACAAAADy0AAABfAAAADz4HAAACAAAADz0AAAArAAAADz8HAAAEAAAAD3EAAABRAAAA0f////H///8PQAcAAAQAAAAPdwAAAFcAAADX////9////w9BBwAABAAAAA9lAAAARQAAAMX////l////D0IHAAAEAAAAD3IAAABSAAAA0v////L///8PQwcAAAQAAAAPdAAAAFQAAADU////9P///w9EBwAABAAAAA95AAAAWQAAANn////5////D0UHAAAEAAAAD3UAAABVAAAA1f////X///8PRgcAAAQAAAAPaQAAAEkAAADJ////6f///w9HBwAABAAAAA9vAAAATwAAAM/////v////D0gHAAAEAAAAD3AAAABQAAAA0P////D///8PSQcAAAQAAAAPWwAAAHsAAADb////+////w9KBwAABAAAAA9dAAAAfQAAAN3////9////D0sHAAAEAAAAD2EAAABBAAAAwf///+H///8PTAcAAAQAAAAPcwAAAFMAAADT////8////w9NBwAABAAAAA9kAAAARAAAAMT////k////D04HAAAEAAAAD2YAAABGAAAAxv///+b///8PTwcAAAQAAAAPZwAAAEcAAADH////5////w9QBwAABAAAAA9oAAAASAAAAMj////o////D1EHAAAEAAAAD2oAAABKAAAAyv///+r///8PUgcAAAQAAAAPawAAAEsAAADL////6////w9TBwAABAAAAA9sAAAATAAAAMz////s////D1QHAAACAAAADzsAAAA6AAAAD1UHAAACAAAADycAAAAiAAAAD1YHAAACAAAAD1wAAAB8AAAAD1cHAAAEAAAAD3oAAABaAAAA2v////r///8PWAcAAAQAAAAPeAAAAFgAAADY////+P///w9ZBwAABAAAAA9jAAAAQwAAAMP////j////D1oHAAAEAAAAD3YAAABWAAAA1v////b///8PWwcAAAQAAAAPYgAAAEIAAADC////4v///w9cBwAABAAAAA9uAAAATgAAAM7////u////D10HAAAEAAAAD20AAABNAAAAzf///+3///8PXgcAAAIAAAAPLAAAADwAAAAPXwcAAAIAAAAPLgAAAD4AAAAPYAcAAAIAAAAPLwAAAD8AAAAPYQcAAAIAAAAPPAAAAD4AAAAPYgcAAAAAAAAPD2MHAAAEAAAAD2AAAAB+AAAArf///73///8PZAcAAAQAAAAPMQAAACEAAAAxAAAAIQAAAA9lBwAABAAAAA8yAAAAQAAAADIAAAAiAAAAD2YHAAAEAAAADzMAAAAjAAAAMwAAACcAAAAPZwcAAAQAAAAPNAAAACQAAAA0AAAAKgAAAA9oBwAABAAAAA81AAAAJQAAADUAAAA6AAAAD2kHAAAEAAAADzYAAABeAAAANgAAACwAAAAPagcAAAQAAAAPNwAAACYAAAA3AAAALgAAAA9rBwAABAAAAA84AAAAKgAAADgAAAA7AAAAD2wHAAAEAAAADzkAAAAoAAAAOQAAACgAAAAPbQcAAAQAAAAPMAAAACkAAAAwAAAAKQAAAA9uBwAABAAAAA8tAAAAXwAAAC0AAABfAAAAD28HAAAEAAAADz0AAAArAAAAPQAAACsAAAAPcAcAAAQAAAAPcQAAAFEAAADK////6v///w9xBwAABAAAAA93AAAAVwAAAMP////j////D3IHAAAEAAAAD2UAAABFAAAA1f////X///8PcwcAAAQAAAAPcgAAAFIAAADL////6////w90BwAABAAAAA90AAAAVAAAAMX////l////D3UHAAAEAAAAD3kAAABZAAAAzv///+7///8PdgcAAAQAAAAPdQAAAFUAAADH////5////w93BwAABAAAAA9pAAAASQAAANv////7////D3gHAAAEAAAAD28AAABPAAAA3f////3///8PeQcAAAQAAAAPcAAAAFAAAADa////+v///w96BwAABAAAAA9bAAAAewAAAMj////o////D3sHAAAEAAAAD10AAAB9AAAAp////7f///8PfAcAAAQAAAAPYQAAAEEAAADG////5v///w99BwAABAAAAA9zAAAAUwAAAKb///+2////D34HAAAEAAAAD2QAAABEAAAA1/////f///8PfwcAAAQAAAAPZgAAAEYAAADB////4f///w+ABwAABAAAAA9nAAAARwAAAND////w////D4EHAAAEAAAAD2gAAABIAAAA0v////L///8PggcAAAQAAAAPagAAAEoAAADP////7////w+DBwAABAAAAA9rAAAASwAAAMz////s////D4QHAAAEAAAAD2wAAABMAAAAxP///+T///8PhQcAAAQAAAAPOwAAADoAAADW////9v///w+GBwAABAAAAA8nAAAAIgAAAKT///+0////D4cHAAAEAAAAD1wAAAB8AAAAXAAAAHwAAAAPiAcAAAQAAAAPegAAAFoAAADR////8f///w+JBwAABAAAAA94AAAAWAAAAN7////+////D4oHAAAEAAAAD2MAAABDAAAA0/////P///8PiwcAAAQAAAAPdgAAAFYAAADN////7f///w+MBwAABAAAAA9iAAAAQgAAAMn////p////D40HAAAEAAAAD24AAABOAAAA1P////T///8PjgcAAAQAAAAPbQAAAE0AAADY////+P///w+PBwAABAAAAA8sAAAAPAAAAML////i////D5AHAAAEAAAADy4AAAA+AAAAwP///+D///8PkQcAAAQAAAAPLwAAAD8AAAAvAAAAPwAAAA+SBwAAAgAAAA88AAAAPgAAAA+TBwAAAAAAAA8PlAcAAAIAAAAPrf///73///8PlQcAAAIAAAAPMQAAACEAAAAPlgcAAAIAAAAPMgAAACIAAAAPlwcAAAIAAAAPMwAAACcAAAAPmAcAAAIAAAAPNAAAADsAAAAPmQcAAAIAAAAPNQAAACUAAAAPmgcAAAIAAAAPNgAAADoAAAAPmwcAAAIAAAAPNwAAAD8AAAAPnAcAAAIAAAAPOAAAACoAAAAPnQcAAAIAAAAPOQAAACgAAAAPngcAAAIAAAAPMAAAACkAAAAPnwcAAAIAAAAPLQAAAF8AAAAPoAcAAAIAAAAPPQAAACsAAAAPoQcAAAIAAAAPyv///+r///8PogcAAAIAAAAPw////+P///8PowcAAAIAAAAP1f////X///8PpAcAAAIAAAAPy////+v///8PpQcAAAIAAAAPxf///+X///8PpgcAAAIAAAAPzv///+7///8PpwcAAAIAAAAPx////+f///8PqAcAAAIAAAAP2/////v///8PqQcAAAIAAAAP3f////3///8PqgcAAAIAAAAP2v////r///8PqwcAAAIAAAAPyP///+j///8PrAcAAAIAAAAPp////7f///8PrQcAAAIAAAAPxv///+b///8PrgcAAAIAAAAPpv///7b///8PrwcAAAIAAAAP1/////f///8PsAcAAAIAAAAPwf///+H///8PsQcAAAIAAAAP0P////D///8PsgcAAAIAAAAP0v////L///8PswcAAAIAAAAPz////+////8PtAcAAAIAAAAPzP///+z///8PtQcAAAIAAAAPxP///+T///8PtgcAAAIAAAAP1v////b///8PtwcAAAIAAAAPpP///7T///8PuAcAAAIAAAAPXAAAAC8AAAAPuQcAAAIAAAAP0f////H///8PugcAAAIAAAAP3v////7///8PuwcAAAIAAAAP0/////P///8PvAcAAAIAAAAPzf///+3///8PvQcAAAIAAAAPyf///+n///8PvgcAAAIAAAAP1P////T///8PvwcAAAIAAAAP2P////j///8PwAcAAAIAAAAPwv///+L///8PwQcAAAIAAAAPwP///+D///8PwgcAAAIAAAAPLgAAACwAAAAPwwcAAAIAAAAPPAAAAD4AAAAPxAcAAAAAAAAPD8UHAAACAAAAD6P///+z////D8YHAAACAAAADzEAAAAhAAAAD8cHAAACAAAADzIAAAAiAAAAD8gHAAACAAAADzMAAAAnAAAAD8kHAAACAAAADzQAAAA7AAAAD8oHAAACAAAADzUAAAAlAAAAD8sHAAACAAAADzYAAAA6AAAAD8wHAAACAAAADzcAAAA/AAAAD80HAAACAAAADzgAAAAqAAAAD84HAAACAAAADzkAAAAoAAAAD88HAAACAAAADzAAAAApAAAAD9AHAAACAAAADy0AAABfAAAAD9EHAAACAAAADz0AAAArAAAAD9IHAAACAAAAD8r////q////D9MHAAACAAAAD8P////j////D9QHAAACAAAAD9X////1////D9UHAAACAAAAD8v////r////D9YHAAACAAAAD8X////l////D9cHAAACAAAAD87////u////D9gHAAACAAAAD8f////n////D9kHAAACAAAAD9v////7////D9oHAAACAAAAD93////9////D9sHAAACAAAAD9r////6////D9wHAAACAAAAD8j////o////D90HAAACAAAAD9//////////D94HAAACAAAAD8b////m////D98HAAACAAAAD9n////5////D+AHAAACAAAAD9f////3////D+EHAAACAAAAD8H////h////D+IHAAACAAAAD9D////w////D+MHAAACAAAAD9L////y////D+QHAAACAAAAD8/////v////D+UHAAACAAAAD8z////s////D+YHAAACAAAAD8T////k////D+cHAAACAAAAD9b////2////D+gHAAACAAAAD9z////8////D+kHAAACAAAAD1wAAAAvAAAAD+oHAAACAAAAD9H////x////D+sHAAACAAAAD97////+////D+wHAAACAAAAD9P////z////D+0HAAACAAAAD83////t////D+4HAAACAAAAD8n////p////D+8HAAACAAAAD9T////0////D/AHAAACAAAAD9j////4////D/EHAAACAAAAD8L////i////D/IHAAACAAAAD8D////g////D/MHAAACAAAADy4AAAAsAAAAD/QHAAACAAAADzwAAAA+AAAAD/UHAAAAAAAADw/2BwAAAgAAAA+6////qv///w/3BwAAAgAAAA8xAAAAIQAAAA/4BwAAAgAAAA8yAAAAIgAAAA/5BwAAAgAAAA8zAAAAt////w/6BwAAAgAAAA80AAAAJAAAAA/7BwAAAgAAAA81AAAAJQAAAA/8BwAAAgAAAA82AAAAJgAAAA/9BwAAAgAAAA83AAAALwAAAA/+BwAAAgAAAA84AAAAKAAAAA//BwAAAgAAAA85AAAAKQAAAA8ACAAAAgAAAA8wAAAAPQAAAA8BCAAAAgAAAA8nAAAAPwAAAA8CCAAAAgAAAA+h////v////w8DCAAAAgAAAA9xAAAAUQAAAA8ECAAAAgAAAA93AAAAVwAAAA8FCAAAAgAAAA9lAAAARQAAAA8GCAAAAgAAAA9yAAAAUgAAAA8HCAAAAgAAAA90AAAAVAAAAA8ICAAAAgAAAA95AAAAWQAAAA8JCAAAAgAAAA91AAAAVQAAAA8KCAAAAgAAAA9pAAAASQAAAA8LCAAAAgAAAA9vAAAATwAAAA8MCAAAAgAAAA9wAAAAUAAAAA8NCAAAAgAAAA9gAAAAXgAAAA8OCAAAAgAAAA8rAAAAKgAAAA8PCAAAAgAAAA9hAAAAQQAAAA8QCAAAAgAAAA9zAAAAUwAAAA8RCAAAAgAAAA9kAAAARAAAAA8SCAAAAgAAAA9mAAAARgAAAA8TCAAAAgAAAA9nAAAARwAAAA8UCAAAAgAAAA9oAAAASAAAAA8VCAAAAgAAAA9qAAAASgAAAA8WCAAAAgAAAA9rAAAASwAAAA8XCAAAAgAAAA9sAAA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ggAAAIAAAAPcwAAAFMAAAAPcwgAAAIAAAAPZAAAAEQAAAAPdAgAAAIAAAAPZgAAAEYAAAAPdQgAAAIAAAAPZwAAAEcAAAAPdggAAAIAAAAPaAAAAEgAAAAPdwgAAAIAAAAPagAAAEoAAAAPeAgAAAIAAAAPawAAAEsAAAAPeQgAAAIAAAAPbAAAAEwAAAAPeggAAAIAAAAP5v///8b///8PewgAAAIAAAAPtP///8T///8PfAgAAAIAAAAPKwAAACoAAAAPfQgAAAIAAAAPegAAAFoAAAAPfggAAAIAAAAPeAAAAFgAAAAPfwgAAAIAAAAPYwAAAEMAAAAPgAgAAAIAAAAPdgAAAFYAAAAPgQgAAAIAAAAPYgAAAEIAAAAPgggAAAIAAAAPbgAAAE4AAAAPgwgAAAIAAAAPbQAAAE0AAAAPhAgAAAIAAAAPLAAAADsAAAAPhQgAAAIAAAAPLgAAADoAAAAPhggAAAIAAAAP/v///97///8PhwgAAAIAAAAPPAAAAD4AAAAPiAgAAAAAAAAPD4kIAAACAAAADzAAAACn////D4oIAAADAAAADzEAAAAnAAAAfgAAAA+LCAAAAwAAAA8yAAAAIgAAALf///8PjAgAAAMAAAAPMwAAACsAAABeAAAAD40IAAADAAAADzQAAAAhAAAAov///w+OCAAABAAAAA81AAAAJQAAADAAAACw////D48IAAADAAAADzYAAAAvAAAAsv///w+QCAAAAwAAAA83AAAAPQAAAGAAAAAPkQgAAAMAAAAPOAAAACgAAAD/////D5IIAAADAAAADzkAAAApAAAAtP///w+TCAAAAwAAAA/2////1v///73///8PlAgAAAMAAAAP/P///9z///+o////D5UIAAADAAAAD/P////T////uP///w+WCAAAAwAAAA9xAAAAUQAAAFwAAAAPlwgAAAMAAAAPdwAAAFcAAAB8AAAAD5gIAAACAAAAD2UAAABFAAAAD5kIAAACAAAAD3IAAABSAAAAD5oIAAACAAAAD3QAAABUAAAAD5sIAAACAAAAD3oAAABaAAAAD5wIAAACAAAAD3UAAABVAAAAD50IAAADAAAAD2kAAABJAAAAzf///w+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PIAkAAAIAAAAPNAAAACQAAAAPIQkAAAIAAAAPNQAAACUAAAAPIgkAAAIAAAAPNgAAACYAAAAPIwkAAAIAAAAPNwAAAC8AAAAPJAkAAAIAAAAPOAAAACgAAAAPJQkAAAIAAAAPOQAAACkAAAAPJgkAAAIAAAAPMAAAAD0AAAAPJwkAAAIAAAAPJwAAAD8AAAAPKAkAAAIAAAAPKwAAACoAAAAPKQkAAAIAAAAPqf///7n///8PKgkAAAIAAAAPqv///7r///8PKwkAAAIAAAAPxf///+X///8PLAkAAAIAAAAP0v////L///8PLQkAAAIAAAAP1P////T///8PLgkAAAIAAAAP2v////r///8PLwkAAAIAAAAP1f////X///8PMAkAAAIAAAAPyf///+n///8PMQkAAAIAAAAPz////+////8PMgkAAAIAAAAP0P////D///8PMwkAAAIAAAAP2/////v///8PNAkAAAIAAAAPWwAAAF0AAAAPNQkAAAIAAAAPwf///+H///8PNgkAAAIAAAAP0/////P///8PNwkAAAIAAAAPxP///+T///8POAkAAAIAAAAPxv///+b///8POQkAAAIAAAAPx////+f///8POgkAAAIAAAAPyP///+j///8POwkAAAIAAAAPqP///7j///8PPAkAAAIAAAAPy////+v///8PPQkAAAIAAAAPzP///+z///8PPgkAAAIAAAAP3v////7///8PPwkAAAIAAAAPq////7v///8PQAkAAAIAAAAPLQAAAF8AAAAPQQkAAAIAAAAPof///7H///8PQgkAAAIAAAAPr////7////8PQwkAAAIAAAAPw////+P///8PRAkAAAIAAAAP1/////f///8PRQkAAAIAAAAPwv///+L///8PRgkAAAIAAAAPzv///+7///8PRwkAAAIAAAAPzf///+3///8PSAkAAAIAAAAPLAAAADsAAAAPSQkAAAIAAAAPLgAAADoAAAAPSgkAAAIAAAAP1v////b///8PSwkAAAIAAAAPPAAAAD4AAAAPTAkAAAAAAAAPD00JAAACAAAAD2AAAAB+AAAAD04JAAACAAAADzEAAAAhAAAAD08JAAAEAAAADzIAAABAAAAAMgAAACIAAAAPUAkAAAIAAAAPMwAAACMAAAAPUQkAAAIAAAAPNAAAACQAAAAPUgkAAAIAAAAPNQAAACUAAAAPUwkAAAQAAAAPNgAAAF4AAAA2AAAAJgAAAA9UCQAABAAAAA83AAAAJgAAADcAAAAvAAAAD1UJAAAEAAAADzgAAAAqAAAAOAAAACgAAAAPVgkAAAQAAAAPOQAAACgAAAA5AAAAKQAAAA9XCQAABAAAAA8wAAAAKQAAADAAAAA9AAAAD1gJAAAEAAAADy0AAABfAAAAJwAAAD8AAAAPWQkAAAQAAAAPPQAAACsAAAArAAAAKgAAAA9aCQAABAAAAA9xAAAAUQAAAKn///+5////D1sJAAAEAAAAD3cAAABXAAAAqv///7r///8PXAkAAAQAAAAPZQAAAEUAAADF////5f///w9dCQAABAAAAA9yAAAAUgAAANL////y////D14JAAAEAAAAD3QAAABUAAAA1P////T///8PXwkAAAQAAAAPeQAAAFkAAADa////+v///w9gCQAABAAAAA91AAAAVQAAANX////1////D2EJAAAEAAAAD2kAAABJAAAAyf///+n///8PYgkAAAQAAAAPbwAAAE8AAADP////7////w9jCQAABAAAAA9wAAAAUAAAAND////w////D2QJAAAEAAAAD1sAAAB7AAAA2/////v///8PZQkAAAQAAAAPXQAAAH0AAABbAAAAXQAAAA9mCQAABAAAAA9hAAAAQQAAAMH////h////D2cJAAAEAAAAD3MAAABTAAAA0/////P///8PaAkAAAQAAAAPZAAAAEQAAADE////5P///w9pCQAABAAAAA9mAAAARgAAAMb////m////D2oJAAAEAAAAD2cAAABHAAAAx////+f///8PawkAAAQAAAAPaAAAAEgAAADI////6P///w9sCQAABAAAAA9qAAAASgAAAKj///+4////D20JAAAEAAAAD2sAAABLAAAAy////+v///8PbgkAAAQAAAAPbAAAAEwAAADM////7P///w9vCQAABAAAAA87AAAAOgAAAN7////+////D3AJAAAEAAAADycAAAAiAAAAq////7v///8PcQkAAAQAAAAPXAAAAHwAAAAtAAAAXwAAAA9yCQAABAAAAA96AAAAWgAAAKH///+x////D3MJAAAEAAAAD3gAAABYAAAAr////7////8PdAkAAAQAAAAPYwAA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ACAAAAD3QAAABUAAAAD1QKAAACAAAAD3kAAABZAAAAD1UKAAACAAAAD3UAAABVAAAAD1YKAAACAAAAD2kAAABJAAAAD1cKAAACAAAAD28AAABPAAAAD1gKAAACAAAAD3AAAABQAAAAD1kKAAACAAAAD/r///8vAAAAD1oKAAACAAAAD+T///8oAAAAD1sKAAACAAAAD2EAAABBAAAAD1wKAAACAAAAD3MAAABTAAAAD10KAAACAAAAD2QAAABEAAAAD14KAAACAAAAD2YAAABGAAAAD18KAAACAAAAD2cAAABHAAAAD2AKAAACAAAAD2gAAABIAAAAD2EKAAACAAAAD2oAAABKAAAAD2IKAAACAAAAD2sAAABLAAAAD2MKAAACAAAAD2wAAABMAAAAD2QKAAACAAAAD/T///8iAAAAD2UKAAACAAAAD6f///8hAAAAD2YKAAACAAAAD/L///8pAAAAD2cKAAACAAAAD3oAAABaAAAAD2gKAAACAAAAD3gAAABYAAAAD2kKAAACAAAAD2MAAABDAAAAD2oKAAACAAAAD3YAAABWAAAAD2sKAAACAAAAD2IAAABCAAAAD2wKAAACAAAAD24AAABOAAAAD20KAAACAAAAD20AAABNAAAAD24KAAACAAAADywAAAA/AAAAD28KAAACAAAADy4AAAA6AAAAD3AKAAACAAAADy0AAABfAAAAD3EKAAACAAAADzwAAAA+AAAAD3IKAAAAAAAADw9zCgAAAgAAAA9gAAAAfgAAAA90CgAAAgAAAA8xAAAAIQAAAA91CgAAAgAAAA8yAAAAQAAAAA92CgAAAgAAAA8zAAAAIwAAAA93CgAAAgAAAA80AAAAJAAAAA94CgAAAgAAAA81AAAAJQAAAA95CgAAAgAAAA82AAAAXgAAAA96CgAAAgAAAA83AAAAJgAAAA97CgAAAgAAAA84AAAAKgAAAA98CgAAAgAAAA85AAAAKAAAAA99CgAAAgAAAA8wAAAAKQAAAA9+CgAAAgAAAA8tAAAAXwAAAA9/CgAAAgAAAA89AAAAKwAAAA+ACgAABAAAAA9xAAAAUQAAAOT////E////D4EKAAAEAAAAD3cAAABXAAAA7P///8z///8PggoAAAQAAAAPZQAAAEUAAADp////yf///w+DCgAABAAAAA9yAAAAUgAAAPj////Y////D4QKAAAEAAAAD3QAAABUAAAAu////6v///8PhQoAAAQAAAAPeQAAAFkAAAD9////3f///w+GCgAABAAAAA91AAAAVQAAAPn////Z////D4cKAAAEAAAAD2kAAABJAAAA7f///83///8PiAoAAAQAAAAPbwAAAE8AAADz////0////w+JCgAABAAAAA9wAAAAUAAAAPb////W////D4oKAAACAAAAD1sAAAB7AAAAD4sKAAACAAAAD10AAAB9AAAAD4wKAAAEAAAAD2EAAABBAAAA4f///8H///8PjQoAAAQAAAAPcwAAAFMAAAC5////qf///w+OCgAABAAAAA9kAAAARAAAAO/////P////D48KAAAEAAAAD2YAAABGAAAA6////8v///8PkAoAAAQAAAAPZwAAAEcAAADg////wP///w+RCgAABAAAAA9oAAAASAAAAPr////a////D5IKAAAEAAAAD2oAAABKAAAA/P///9z///8PkwoAAAQAAAAPawAAAEsAAAD0////1P///w+UCgAABAAAAA9sAAAATAAAALX///+l////D5UKAAACAAAADzsAAAA6AAAAD5YKAAACAAAADycAAAAiAAAAD5cKAAACAAAAD1wAAAB8AAAAD5gKAAAEAAAAD3oAAABaAAAAvv///67///8PmQoAAAMAAAAPeAAAAFgAAACk////D5oKAAAEAAAAD2MAAABDAAAA6P///8j///8PmwoAAAQAAAAPdgAAAFYAAADn////x////w+cCgAAAgAAAA9iAAAAQgAAAA+dCgAABAAAAA9uAAAATgAAAPL////S////D54KAAAEAAAAD20AAABNAAAA5f///8X///8PnwoAAAIAAAAPLAAAADwAAAAPoAoAAAIAAAAPLgAAAD4AAAAPoQoAAAIAAAAPLwAAAD8AAAAPogoAAAIAAAAPPAAAAD4AAAAPowoAAAAAAAAPD6QKAAABAAAADzsAAAAPpQoAAAIAAAAPKwAAADEAAAAPpgoAAAIAAAAP7P///zIAAAAPpwoAAAIAAAAPuf///zMAAAAPqAoAAAIAAAAP6P///zQAAAAPqQoAAAIAAAAP+P///zUAAAAPqgoAAAI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gAABAAAAA88AAAAPgAAAFwAAAB8AAAAD9QKAAAAAAAADw/VCgAAAQAAAA87AAAAD9YKAAACAAAADysAAAAxAAAAD9cKAAACAAAAD+z///8yAAAAD9gKAAACAAAAD7n///8zAAAAD9kKAAACAAAAD+j///80AAAAD9oKAAACAAAAD/j///81AAAAD9sKAAACAAAAD77///82AAAAD9wKAAACAAAAD/3///83AAAAD90KAAACAAAAD+H///84AAAAD94KAAACAAAAD+3///85AAAAD98KAAACAAAAD+n///8wAAAAD+AKAAACAAAADz0AAAAlAAAAD+EKAAACAAAAD7T///+3////D+IKAAACAAAAD3EAAABRAAAAD+MKAAACAAAAD3cAAABXAAAAD+QKAAACAAAAD2UAAABFAAAAD+UKAAACAAAAD3IAAABSAAAAD+YKAAACAAAAD3QAAABUAAAAD+cKAAACAAAAD3oAAABaAAAAD+gKAAACAAAAD3UAAABVAAAAD+kKAAACAAAAD2kAAABJAAAAD+oKAAACAAAAD28AAABPAAAAD+sKAAACAAAAD3AAAABQAAAAD+wKAAACAAAAD/r///8vAAAAD+0KAAACAAAADykAAAAoAAAAD+4KAAACAAAAD2EAAABBAAAAD+8KAAACAAAAD3MAAABTAAAAD/AKAAACAAAAD2QAAABEAAAAD/EKAAACAAAAD2YAAABGAAAAD/IKAAACAAAAD2cAAABHAAAAD/MKAAACAAAAD2gAAABIAAAAD/QKAAACAAAAD2oAAABKAAAAD/UKAAACAAAAD2sAAABLAAAAD/YKAAACAAAAD2wAAABMAAAAD/cKAAACAAAAD/n///8iAAAAD/gKAAACAAAAD6f///8hAAAAD/kKAAACAAAAD6j///8nAAAAD/oKAAACAAAAD3kAAABZAAAAD/sKAAACAAAAD3gAAABYAAAAD/wKAAACAAAAD2MAAABDAAAAD/0KAAACAAAAD3YAAABWAAAAD/4KAAACAAAAD2IAAABCAAAAD/8KAAACAAAAD24AAABOAAAADwALAAACAAAAD20AAABNAAAADwELAAACAAAADywAAAA/AAAADwILAAACAAAADy4AAAA6AAAADwMLAAACAAAADy0AA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AAD3////D2sMAAADAAAAD3cAAABXAAAA5f///w9sDAAAAwAAAA9lAAAARQAAAOD///8PbQwAAAMAAAAPcgAAAFIAAAD4////D24MAAADAAAAD3QAAABUAAAA+v///w9vDAAAAwAAAA95AAAAWQAAAPL///8PcAwAAAMAAAAPdQAAAFUAAADl////D3EMAAADAAAAD2kAAABJAAAA6f///w9yDAAAAwAAAA9vAAAATwAAAPH///8PcwwAAAMAAAAPcAAAAFAAAAD0////D3QMAAACAAAAD1sAAAB7AAAAD3UMAAACAAAAD10AAAB9AAAAD3YMAAADAAAAD2EAAABBAAAA4P///w93DAAAAwAAAA9zAAAAUwAAAPn///8PeAwAAAMAAAAPZAAAAEQAAADj////D3kMAAADAAAAD2YAAABGAAAA9P///w96DAAAAwAAAA9nAAAARwAAAOL///8PewwAAAMAAAAPaAAAAEgAAADk////D3wMAAADAAAAD2oAAABKAAAA6f///w99DAAAAwAAAA9rAAAASwAAAOv///8PfgwAAAMAAAAPbAAAAEwAAADs////D38MAAACAAAADzsAAAA6AAAAD4AMAAACAAAADycAAAAiAAAAD4EMAAACAAAAD1wAAAB8AAAAD4IMAAADAAAAD3oAAABaAAAA5v///w+DDAAAAwAAAA94AAAAWAAAAOf///8PhAwAAAMAAAAPYwAAAEMAAAD2////D4UMAAADAAAAD3YAAABWAAAA5f///w+GDAAAAwAAAA9iAAAAQgAAAOH///8PhwwAAAMAAAAPbgAAAE4AAADw////D4gMAAADAAAAD20AAABNAAAA7v///w+JDAAAAgAAAA8sAAAAPAAAAA+KDAAAAgAAAA8uAAAAPgAAAA+LDAAAAgAAAA8vAAAAPwAAAA+MDAAAAgAAAA88AAAAPgAAAA+NDAAAAAAAAA8PjgwAAAIAAAAPYAAAAH4AAAAPjwwAAAIAAAAPMQAAACEAAAAPkAwAAAIAAAAPMgAAAEAAAAAPkQwAAAIAAAAPMwAAACMAAAAPkgwAAAIAAAAPNAAAACQAAAAPkwwAAAIAAAAPNQAAACUAAAAPlAwAAAIAAAAPNgAAAF4AAAAPlQwAAAIAAAAPNwAAACYAAAAPlgwAAAIAAAAPOAAAACoAAAAPlwwAAAIAAAAPOQAAACgAAAAPmAwAAAIAAAAPMAAAACkAAAAPmQwAAAIAAAAPLQAAAF8AAAAPmgwAAAIAAAAPPQAAACsAAAAPmwwAAAMAAAAPcQAAAFEAAAD3////D5wMAAADAAAAD3cAAABXAAAA8f///w+dDAAAAgAAAA9lAAAARQAAAA+eDAAAAwAAAA9yAAAAUgAAAPj///8PnwwAAAMAAAAPdAAAAFQAAADo////D6AMAAADAAAAD3kAAABZAAAA4////w+hDAAAAgAAAA91AAAAVQAAAA+iDAAAAgAAAA9pAAAASQAAAA+jDAAAAgAAAA9vAAAATwAAAA+kDAAAAwAAAA9wAAAAUAAAAPT///8PpQwAAAIAAAAPWwAAAHsAAAAPpgwAAAIAAAAPXQAAAH0AAAAPpwwAAAMAAAAPYQAAAEEAAADg////D6gMAAADAAAAD3MAAABTAAAA5f///w+pDAAAAwAAAA9kAAAARAAAAOz///8PqgwAAAMAAAAPZgAAAEYAAAD6////D6sMAAADAAAAD2cAAABHAAAA4v///w+sDAAAAwAAAA9oAAAASAAAAOT///8PrQwAAAMAAAAPagAAAEoAAAD5////D64MAAADAAAAD2sAAABLAAAA6////w+vDAAAAwAAAA9sAAAATAAAAOn///8PsAwAAAIAAAAPOwAAADoAAAAPsQwAAAIAAAAPJwAAACIAAAAPsgwAAAIAAAAPXAAAAHwAAAAPswwAAAMAAAAPegAAAFoAAADm////D7QMAAADAAAAD3gAAABYAAAA5////w+1DAAAAwAAAA9jAAAAQwAAAPb///8PtgwAAAMAAAAPdgAAAFYAAADy////D7cMAAADAAAAD2IAAABCAAAA4f///w+4DAAAAwAAAA9uAAAATgAAAPD///8PuQwAAAMAAAAPbQAAAE0AAADu////D7oMAAACAAAADywAAAA8AAAAD7sMAAACAAAADy4AAAA+AAAAD7wMAAACAAAADy8AAAA/AAAAD70MAAACAAAADzwAAAA+AAAAD74MAAAAAAAADw+/DAAAAgAA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DAAAAgAAAA94AAAAWAAAAA/sDAAAAgAAAA95AAAAWQAAAA/tDAAAAgAAAA96AAAAWgAAAA/uDAAAAAAAAA8P7wwAAAAAAAAPD/AMAAACAAAAD2AAAAB+AAAAD/EMAAACAAAADzEAAAAhAAAAD/IMAAACAAAADzIAAABAAAAAD/MMAAACAAAADzMAAAAjAAAAD/QMAAACAAAADzQAAAAkAAAAD/UMAAACAAAADzUAAAAlAAAAD/YMAAACAAAADzYAAABeAAAAD/cMAAACAAAADzcAAAAmAAAAD/gMAAACAAAADzgAAAAqAAAAD/kMAAACAAAADzkAAAAoAAAAD/oMAAACAAAADzAAAAApAAAAD/sMAAACAAAADy0AAABfAAAAD/wMAAACAAAADz0AAAArAAAAD/0MAAAEAAAAD3EAAABRAAAAOwAAADoAAAAP/gwAAAIAAAAPdwAAAFcAAAAP/wwAAAQAAAAPZQAAAEUAAADl////xf///w8ADQAABAAAAA9yAAAAUgAAAPH////R////DwENAAAEAAAAD3QAAABUAAAA9P///9T///8PAg0AAAQAAAAPeQAAAFkAAAD1////1f///w8DDQAABAAAAA91AAAAVQAAAOj////I////DwQNAAAEAAAAD2kAAABJAAAA6f///8n///8PBQ0AAAQAAAAPbwAAAE8AAADv////z////w8GDQAABAAAAA9wAAAAUAAAAPD////Q////DwcNAAACAAAAD1sAAAB7AAAADwgNAAACAAAAD10AAAB9AAAADwkNAAAEAAAAD2EAAABBAAAA4f///8H///8PCg0AAAIAAAAPcwAAAFMAAAAPCw0AAAQAAAAPZAAAAEQAAADk////xP///w8MDQAABAAAAA9mAAAARgAAAPb////W////Dw0NAAAEAAAAD2cAAABHAAAA4////8P///8PDg0AAAQAAAAPaAAAAEgAAADn////x////w8PDQAABAAAAA9qAAAASgAAAO7////O////DxANAAAEAAAAD2sAAABLAAAA6v///8r///8PEQ0AAAQAAAAPbAAAAEwAAADr////y////w8SDQAABAAAAA87AAAAOgAAALT///+o////DxMNAAACAAAADycAAAAiAAAADxQNAAACAAAAD1wAAAB8AAAADxUNAAAEAAAAD3oAAABaAAAA5v///8b///8PFg0AAAQAAAAPeAAAAFgAAAD3////1////w8XDQAABAAAAA9jAAAAQwAAAPj////Y////DxgNAAAEAAAAD3YAAABWAAAA+f///9n///8PGQ0AAAQAAAAPYgAAAEIAAADi////wv///w8aDQAABAAAAA9uAAAATgAAAO3////N////DxsNAAAEAAAAD20AAABNAAAA7P///8z///8PHA0AAAIAAAAPLAAAADwAAAAPHQ0AAAIAAAAPLgAAAD4AAAAPHg0AAAIAAAAPLwAAAD8AAAAPHw0AAAIAAAAPPAAAAD4AAAAPIA0AAAAAAAAPDyENAAAEAAAAD2AAAAB+AAAAXwAAACUAAAAPIg0AAAQAAAAPMQAAACEAAADl////KwAAAA8jDQAABAAAAA8yAAAAQAAAAC8AAADx////DyQNAAAEAAAADzMAAAAjAAAALQAAAPL///8PJQ0AAAQAAAAPNAAAACQAAADA////8////w8mDQAABAAAAA81AAAAJQAAALb////0////DycNAAAEAAAADzYAAABeAAAA2P///9n///8PKA0AAAQAAAAPNwAAACYAAADW////3////w8pDQAABAAAAA84AAAAKgAAAKT////1////DyoNAAAEAAAADzkAAAAoAAAAtf////b///8PKw0AAAQAAAAPMAAAACkAAACo////9////w8sDQAABAAAAA8tAAAAXwAAAKL////4////Dy0NAAAEAAAADz0AAAArAAAAqv////n///8PLg0AAAQAAAAPcQAAAFEAAADm////8P///w8vDQAABAAAAA93AAAAVwAAAOT///8iAAAADzANAAAEAAAAD2UAAABFAAAA0////67///8PMQ0AAAQAAAAPcgAAAFIAAAC+////sf///w8yDQAABAAAAA90AAAAVAAAAND///+4////DzMNAAAEAAAAD3kAAABZAAAA0f///+3///8PNA0AAAQAAAAPdQAAAFUAAADV////6v///w81DQAABAAAAA9pAAAASQAAAMP///+z////DzYNAAAEAAAAD28AAABPAAAAuf///8////8PNw0AAAQAAAAPcAAAAFAAAADC////rf///w84DQAABAAAAA9bAAAAewAAALr///+w////DzkNAAAEAAAAD10AAAB9AAAAxf///ywAAAAPOg0AAAQAAAAPYQAAAEEAAAC/////xP///w87DQAABAAAAA9zAAAAUwAAAMv///+m////DzwNAAAEAAAAD2QAAABEAAAAof///6////8PPQ0AAAQAAAAPZgAAAEYAAAC0////4v///w8+DQAABAAAAA9nAAAARwAAAOD///+s////Dz8NAAAEAAAAD2gAAABIAAAA6f///+f///8PQA0AAAQAAAAPagAAAEoAAADo////6////w9BDQAABAAAAA9rAAAASwAAANL////J////D0INAAAEAAAAD2wAAABMAAAAyv///8j///8PQw0AAAQAAAAPOwAAADoAAADH////q////w9EDQAABAAAAA8nAAAAIgAAAKf///8uAAAAD0UNAAAEAAAAD1wAAAB8AAAAo////6X///8PRg0AAAQAAAAPegAAAFoAAAC8////KAAAAA9HDQAABAAAAA94AAAAWAAAALv///8pAAAAD0gNAAAEAAAAD2MAAABDAAAA4f///6n///8PSQ0AAAQAAAAPdgAAAFYAAADN////zv///w9KDQAAAwAAAA9iAAAAQgAAANr///8PSw0AAAQAAAAPbgAAAE4AAADX////7P///w9MDQAABAAAAA9tAAAATQAAALf///8/AAAAD00NAAAEAAAADywAAAA8AAAAwf///7L///8PTg0AAAQAAAAPLgAAAD4AAADj////zP///w9PDQAABAAAAA8vAAAAPwAAAL3////G////D1ANAAAAAAAADw9RDQAAAAAAAA8PUg0AAAIAAAAPQAAAAKf///8PUw0AAAIAAAAPMQAAACEAAAAPVA0AAAIAAAAPMgAAACIAAAAPVQ0AAAIAAAAPMwAAACMAAAAPVg0AAAIAAAAPNAAAACQAAAAPVw0AAAIAAAAPNQAAACUAAAAPWA0AAAIAAAAPNgAAACYAAAAPWQ0AAAIAAAAPNwAAAF8AAAAPWg0AAAIAAAAPOAAAACgAAAAPWw0AAAIAAAAPOQAAACkAAAAPXA0AAAIAAAAPMAAAACcAAAAPXQ0AAAIAAAAPLwAAAD8AAAAPXg0AAAIAAAAPsP///34AAAAPXw0AAAIAAAAPcQAAAFEAAAAPYA0AAAIAAAAPdwAAAFcAAAAPYQ0AAAIAAAAPZQAAAEUAA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AAZABUAIQAiAC4AEwAmADUADQAeABgAEgAWABcAIAAjABQAMQAfAAwAKwAnABAAJAAlAC0AMAAyABEALwAsAFYADwQAAAAyAAAABykAAgADAAQABQAGAAcACAAJAAoACwAMAA0AEAARABIAEwAUABUAFgAXABgAGQAaABsAHgAfACAAIQAiACMAJAAlACYAJwAoACsAXgAsAC0ALgAvADAAMQAyADMANAA1AFYANQAPBQAAADAAAAAHAgADAAQABQAGAAcACAAJAAoACwAMAA0AKQAQABEAEgATABQAFQAWABcAGAAZABoAGwAeAB8AIAAhACIAIwAkACUAJgAnACgAKwAsAC0ALgAvADAAMQAyADMANAA1AFYADwYAAAAwAAAABwIAAwAEAAUABgAHAAgACQAKAAsADAANABoAGwAnACgAKQAzADQANQArAB4AMAAuACAAEgAhACIAIwAXACQAJQAmADIAMQAYABkAEAATAB8AFAAWAC8AEQAtABUALABWAAs=AAEAAAD/////AQAAAAAAAAAHAQAAAAEBAAAACQAAAAcICQIAAAAJAwAAAAkEAAAACQUAAAAJBgAAAAkHAAAACQgAAAAJCQAAAAkKAAAADwIAAAAwAAAACMAAAAAxAAAAMgAAADMAAAA0AAAANQAAADYAAAA3AAAAOAAAADkAAAAwAAAAvQAAALsAAABRAAAAVwAAAEUAAABSAAAAVAAAAFkAAABVAAAASQAAAE8AAABQAAAA2wAAAN0AAABBAAAAUwAAAEQAAABGAAAARwAAAEgAAABKAAAASwAAAEwAAAC6AAAA3gAAANwAAABaAAAAWAAAAEMAAABWAAAAQgAAAE4AAABNAAAAvAAAAL4AAAC/AAAA4gAAAA8DAAAAMAAAAAjAAAAAMQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAAAA5AAAAMAAAAL0AAAC7AAAAUQAAAFcAAABFAAAAUgAAAFQAAABaAAAAVQAAAEkAAABPAAAAUAAAANsAAADdAAAAQQAAAFMAAABEAAAARgAAAEcAAABIAAAASgAAAEsAAABMAAAAugAAAN4AAADcAAAAWQAAAFgAAABDAAAAVgAAAEIAAABOAAAATQ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4AAAAxAAAAMgAAADMAAAA0AAAANQAAADYAAAA3AAAAOAAAADkAAAAwAAAAvQAAALsAAABRAAAAVwAAAEUAAABSAAAAVAAAAFkAAABVAAAASQAAAE8AAABQAAAAwAAAANsAAABBAAAAUwAAAEQAAABGAAAARwAAAEgAAABKAAAASwAAAEwAAADfAAAA4gAAAN0AAABaAAAAWAAAAEMAAABWAAAAQgAAAE4AAABNAAAAvAAAAL4AAAC6AAAAvwAAANwAAAAPCQAAADUAAAAI3gAAADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADAAAADbAAAAuwAAAEEAAABaAAAARQAAAFIAAABUAAAAWQAAAFUAAABJAAAATwAAAFAAAADdAAAAugAAAFEAAABTAAAARAAAAEYAAABHAAAASAAAAEoAAABLAAAATAAAAE0AAADAAAAA3AAAAFcAAABYAAAAQwAAAFYAAABCAAAATgAAALwAAAC+AAAAvwAAAN8AAADwAAAA4gAAAPIAAADzAAAA9AAAAPUAAAAPCgAAADAAAAAIMQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAAAA5AAAAMAAAAL0AAAC7AAAA2wAAAN0AAAC6AAAA3gAAAMAAAAC8AAAAvgAAAL8AAADcAAAAQQAAAEIAAABDAAAARAAAAEUAAABGAAAARwAAAEgAAABJAAAASgAAAEsAAABMAAAATQAAAE4AAABPAAAAUAAAAFEAAABSAAAAUwAAAFQAAABVAAAAVgAAAFcAAABYAAAAWQAAAFoAAADiAAAACw==A4gAAAAs= \ No newline at end of file + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEdjcmVhdGUta2V5Ym9hcmRzLCBWZXJzaW9uPTAuMC4wLjAsIEN1 + bHR1cmU9bmV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cyBrZXlib2FyZCBsYXlvdXQgKHBoYW50b20ga2V5IHZlcnNpb24pAbj/ + //+8////AAAAAAG3////u////wAAAAAJSgAAAAEFAAAAAwAAAAkEAAAGSwAAACZVbml0ZWQgU3RhdGVz + IGtleWJvYXJkIGxheW91dCAoZHZvcmFrKQG0////vP///wEAAAABs////7v///8CAAAACU4AAAABBgAA + AAMAAAAJBAAABk8AAAArVW5pdGVkIFN0YXRlcyBJbnRlcm5hdGlvbmFsIGtleWJvYXJkIGxheW91dAGw + ////vP///wAAAAABr////7v///8AAAAACVIAAAABBwAAAAMAAAAJCAAABlMAAAAXQnJpdGlzaCBrZXli + b2FyZCBsYXlvdXQBrP///7z///8AAAAAAav///+7////AAAAAAlWAAAAAQgAAAADAAAABwQAAAZXAAAA + Fkdlcm1hbiBrZXlib2FyZCBsYXlvdXQBqP///7z///8AAAAAAaf///+7////AQAAAAlaAAAAAQkAAAAD + AAAABwQAAAZbAAAAKEdlcm1hbiBrZXlib2FyZCBsYXlvdXQgd2l0aG91dCBkZWFkIGtleXMBpP///7z/ + //8AAAAAAaP///+7////AQAAAAleAAAAAQoAAAADAAAABwQAAAZfAAAAL0dlcm1hbiBrZXlib2FyZCBs + YXlvdXQgZm9yIGxvZ2l0ZWNoIGRlc2t0b3AgcHJvAaD///+8////AAAAAAGf////u////wEAAAAJYgAA + AAELAAAAAwAAAAcEAAAGYwAAACxHZXJtYW4ga2V5Ym9hcmQgbGF5b3V0IHdpdGhvdXQgZGVhZCBrZXlz + IDEwNQGc////vP///wAAAAABm////7v///8DAAAACWYAAAABDAAAAAMAAAAHCAAABmcAAAAcU3dpc3Mg + R2VybWFuIGtleWJvYXJkIGxheW91dAGY////vP///wAAAAABl////7v///8BAAAACWoAAAABDQAAAAMA + AAAMEAAABmsAAAAcU3dpc3MgRnJlbmNoIGtleWJvYXJkIGxheW91dAGU////vP///wAAAAABk////7v/ + //8BAAAACW4AAAABDgAAAAMAAAAdBAAABm8AAAAXU3dlZGlzaCBrZXlib2FyZCBsYXlvdXQBkP///7z/ + //8AAAAAAY////+7////BQAAAAlyAAAAAQ8AAAADAAAAJQQAAAZzAAAAGEVzdG9uaWFuIGtleWJvYXJk + IGxheW91dAGM////vP///wAAAAABi////7v///8AAAAACXYAAAABEAAAAAMAAAAUBAAABncAAAAZTm9y + d2VnaWFuIGtleWJvYXJkIGxheW91dAGI////vP///wAAAAABh////7v///8AAAAACXoAAAABEQAAAAMA + AAAGBAAABnsAAAAWRGFuaXNoIGtleWJvYXJkIGxheW91dAGE////vP///wAAAAABg////7v///8AAAAA + CX4AAAABEgAAAAMAAAAMBAAABn8AAAAWRnJlbmNoIGtleWJvYXJkIGxheW91dAGA////vP///wAAAAAB + f////7v///8EAAAACYIAAAABEwAAAAMAAAAMDAAABoMAAAAfQ2FuYWRpYW4gRnJlbmNoIGtleWJvYXJk + IGxheW91dAF8////vP///wAAAAABe////7v///8AAAAACYYAAAABFAAAAAMAAAAMDAAABocAAAAnQ2Fu + YWRpYW4gRnJlbmNoIGtleWJvYXJkIGxheW91dCAoQ0FfZnIpAXj///+8////AAAAAAF3////u////wAA + AAAJigAAAAEVAAAAAwAAAAwMAAAGiwAAABhDYW5hZGlhbiBrZXlib2FyZCBsYXlvdXQBdP///7z///8A + AAAAAXP///+7////AAAAAAmOAAAAARYAAAADAAAADAgAAAaPAAAAF0JlbGdpYW4ga2V5Ym9hcmQgbGF5 + b3V0AXD///+8////AAAAAAFv////u////wQAAAAJkgAAAAEXAAAAAwAAABYIAAAGkwAAABpQb3J0dWd1 + ZXNlIGtleWJvYXJkIGxheW91dAFs////vP///wAAAAABa////7v///8AAAAACZYAAAABGAAAAAMAAAAW + BAAABpcAAAAgQnJhemlsaWFuIEFCTlQtMiBrZXlib2FyZCBsYXlvdXQBaP///7z///8CAAAAAWf///+7 + ////BgAAAAmaAAAAARkAAAADAAAAFgQAAAabAAAAJ0JyYXppbGlhbiBBQk5ULTIga2V5Ym9hcmQgbGF5 + b3V0IEFMVCBHUgFk////vP///wIAAAABY////7v///8GAAAACZ4AAAABGgAAAAMAAAALBAAABp8AAAAX + RmlubmlzaCBrZXlib2FyZCBsYXlvdXQBYP///7z///8AAAAAAV////+7////AAAAAAmiAAAAARsAAAAD + AAAAAgQAAAajAAAAHUJ1bGdhcmlhbiBiZHMga2V5Ym9hcmQgbGF5b3V0AVz///+8////AAAAAAFb//// + u////wAAAAAJpgAAAAEcAAAAAwAAAAIEAAAGpwAAACJCdWxnYXJpYW4gcGhvbmV0aWMga2V5Ym9hcmQg + bGF5b3V0AVj///+8////AAAAAAFX////u////wAAAAAJqgAAAAEdAAAAAwAAACMEAAAGqwAAABpCZWxh + cnVzaWFuIGtleWJvYXJkIGxheW91dAFU////vP///wAAAAABU////7v///8AAAAACa4AAAABHgAAAAMA + AAAZBAAABq8AAAAXUnVzc2lhbiBrZXlib2FyZCBsYXlvdXQBUP///7z///8AAAAAAU////+7////AAAA + AAmyAAAAAR8AAAADAAAAGQQAAAazAAAALVJ1c3NpYW4ga2V5Ym9hcmQgbGF5b3V0IChwaGFudG9tIGtl + eSB2ZXJzaW9uKQFM////vP///wAAAAABS////7v///8AAAAACbYAAAABIAAAAAMAAAAZBAAABrcAAAAe + UnVzc2lhbiBrZXlib2FyZCBsYXlvdXQgS09JOC1SAUj///+8////AAAAAAFH////u////wAAAAAJugAA + AAEhAAAAAwAAABkEAAAGuwAAAB5SdXNzaWFuIGtleWJvYXJkIGxheW91dCBjcDEyNTEBRP///7z///8A + AAAAAUP///+7////AAAAAAm+AAAAASIAAAADAAAAGQQAAAa/AAAAIFJ1c3NpYW4gcGhvbmV0aWMga2V5 + Ym9hcmQgbGF5b3V0AUD///+8////AAAAAAE/////u////wAAAAAJwgAAAAEjAAAAAwAAACIEAAAGwwAA + ACBVa3JhaW5pYW4ga2V5Ym9hcmQgbGF5b3V0IEtPSTgtVQE8////vP///wAAAAABO////7v///8AAAAA + CcYAAAABJAAAAAMAAAAiBAAABscAAAAkVWtyYWluaWFuIGtleWJvYXJkIGxheW91dCAoc3RhbmRhcmQp + ATj///+8////AAAAAAE3////u////wAAAAAJygAAAAElAAAAAwAAABkEAAAGywAAACJSdXNzaWFuIGtl + eWJvYXJkIGxheW91dCAoc3RhbmRhcmQpATT///+8////AAAAAAEz////u////wAAAAAJzgAAAAEmAAAA + AwAAAAoEAAAGzwAAABdTcGFuaXNoIGtleWJvYXJkIGxheW91dAEw////vP///wAAAAABL////7v///8A + AAAACdIAAAABJwAAAAMAAAAQBAAABtMAAAAXSXRhbGlhbiBrZXlib2FyZCBsYXlvdXQBLP///7z///8A + AAAAASv///+7////AAAAAAnWAAAAASgAAAADAAAADwQAAAbXAAAAGUljZWxhbmRpYyBrZXlib2FyZCBs + YXlvdXQBKP///7z///8AAAAAASf///+7////AAAAAAnaAAAAASkAAAADAAAADgQAAAbbAAAAGUh1bmdh + cmlhbiBrZXlib2FyZCBsYXlvdXQBJP///7z///8AAAAAASP///+7////AQAAAAneAAAAASoAAAADAAAA + FQQAAAbfAAAAJVBvbGlzaCAocHJvZ3JhbW1lcidzKSBrZXlib2FyZCBsYXlvdXQBIP///7z///8AAAAA + AR////+7////AAAAAAniAAAAASsAAAADAAAAJAQAAAbjAAAAGVNsb3ZlbmlhbiBrZXlib2FyZCBsYXlv + dXQBHP///7z///8AAAAAARv///+7////AQAAAAnmAAAAASwAAAADAAAAGgwAAAbnAAAAGlNlcmJpYW4g + a2V5Ym9hcmQgbGF5b3V0IHNyARj///+8////AAAAAAEX////u////wAAAAAJ6gAAAAEtAAAAAwAAABoM + AAAG6wAAAB1TZXJiaWFuIGtleWJvYXJkIGxheW91dCB1cyxzcgEU////vP///wAAAAABE////7v///8A + AAAACe4AAAABLgAAAAMAAAAaBAAABu8AAAAYQ3JvYXRpYW4ga2V5Ym9hcmQgbGF5b3V0ARD///+8//// + AAAAAAEP////u////wEAAAAJ8gAAAAEvAAAAAwAAABoEAAAG8wAAACNDcm9hdGlhbiBrZXlib2FyZCBs + YXlvdXQgKHNwZWNpZmljKQEM////vP///wAAAAABC////7v///8AAAAACfYAAAABMAAAAAMAAAARBAAA + BvcAAAAcSmFwYW5lc2UgMTA2IGtleWJvYXJkIGxheW91dAEI////vP///wMAAAABB////7v///8HAAAA + CfoAAAABMQAAAAMAAAARBAAABvsAAAAfSmFwYW5lc2UgcGM5OHgxIGtleWJvYXJkIGxheW91dAEE//// + vP///wAAAAABA////7v///8AAAAACf4AAAABMgAAAAMAAAAbBAAABv8AAAAWU2xvdmFrIGtleWJvYXJk + IGxheW91dAEA////vP///wAAAAAB//7//7v///8AAAAACQIBAAABMwAAAAMAAAAbBAAABgMBAAAyU2xv + dmFrIGFuZCBDemVjaCBrZXlib2FyZCBsYXlvdXQgd2l0aG91dCBkZWFkIGtleXMB/P7//7z///8AAAAA + Afv+//+7////AAAAAAkGAQAAATQAAAADAAAABQQAAAYHAQAAFUN6ZWNoIGtleWJvYXJkIGxheW91dAH4 + /v//vP///wAAAAAB9/7//7v///8AAAAACQoBAAABNQAAAAMAAAAFBAAABgsBAAAYQ3plY2gga2V5Ym9h + cmQgbGF5b3V0IGN6AfT+//+8////AAAAAAHz/v//u////wEAAAAJDgEAAAE2AAAAAwAAAAUEAAAGDwEA + AB9DemVjaCBrZXlib2FyZCBsYXlvdXQgY3pfcXdlcnR5AfD+//+8////AAAAAAHv/v//u////wAAAAAJ + EgEAAAE3AAAAAwAAAAoEAAAGEwEAAB5MYXRpbiBBbWVyaWNhbiBrZXlib2FyZCBsYXlvdXQB7P7//7z/ + //8AAAAAAev+//+7////AAAAAAkWAQAAATgAAAADAAAAJwQAAAYXAQAAI0xpdGh1YW5pYW4gKEJhbHRp + Yykga2V5Ym9hcmQgbGF5b3V0Aej+//+8////AAAAAAHn/v//u////wAAAAAJGgEAAAE5AAAAAwAAAB8E + AAAGGwEAABdUdXJraXNoIGtleWJvYXJkIGxheW91dAHk/v//vP///wAAAAAB4/7//7v///8AAAAACR4B + AAABOgAAAAMAAAAfBAAABh8BAAAaVHVya2lzaCBrZXlib2FyZCBsYXlvdXQgdHIB4P7//7z///8AAAAA + Ad/+//+7////AAAAAAkiAQAAATsAAAADAAAAHwQAAAYjAQAAG1R1cmtpc2gga2V5Ym9hcmQgbGF5b3V0 + IHRyZgHc/v//vP///wAAAAAB2/7//7v///8AAAAACSYBAAABPAAAAAMAAAANBAAABicBAAAZSXNyYWVs + aWFuIGtleWJvYXJkIGxheW91dAHY/v//vP///wAAAAAB1/7//7v///8AAAAACSoBAAABPQAAAAMAAAAN + BAAABisBAAAiSXNyYWVsaWFuIHBob25ldGljIGtleWJvYXJkIGxheW91dAHU/v//vP///wAAAAAB0/7/ + /7v///8AAAAACS4BAAABPgAAAAMAAAANBAAABi8BAAAhSXNyYWVsaWFuIFNhaGFyb24ga2V5Ym9hcmQg + bGF5b3V0AdD+//+8////AAAAAAHP/v//u////wAAAAAJMgEAAAE/AAAAAwAAAAkEAAAGMwEAABNWTkMg + a2V5Ym9hcmQgbGF5b3V0Acz+//+8////BAAAAAHL/v//u////wgAAAAJNgEAAAFAAAAAAwAAAAgEAAAG + NwEAABVHcmVlayBrZXlib2FyZCBsYXlvdXQByP7//7z///8AAAAAAcf+//+7////AAAAAAk6AQAAAUEA + AAADAAAAHgQAAAY7AQAAIFRoYWkgKEtlZG1hbmVlKSAga2V5Ym9hcmQgbGF5b3V0AcT+//+8////AAAA + AAHD/v//u////wAAAAAJPgEAAAFCAAAAAwAAABMEAAAGPwEAABVEdXRjaCBrZXlib2FyZCBsYXlvdXQB + wP7//7z///8AAAAAAb/+//+7////AAAAAAlCAQAAB0YAAAABAQAAADEAAAAHDwlDAQAACUQBAAAJRQEA + AAlGAQAACUcBAAAJSAEAAAlJAQAACUoBAAAJSwEAAAlMAQAACU0BAAAJTgEAAAlPAQAACVABAAAJUQEA + AAlSAQAACVMBAAAJVAEAAAlVAQAACVYBAAAJVwEAAAlYAQAACVkBAAAJWgEAAAlbAQAACVwBAAAJXQEA + AAleAQAACV8BAAAJYAEAAAlhAQAACWIBAAAJYwEAAAlkAQAACW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AAD1EBAAACAAAAD3cAAABXAAAAD1IBAAACAAAAD2UAAABFAAAAD1MBAAACAAAAD3IAAABSAAAA + D1QBAAACAAAAD3QAAABUAAAAD1UBAAACAAAAD3kAAABZAAAAD1YBAAACAAAAD3UAAABVAAAAD1cBAAAC + AAAAD2kAAABJAAAAD1gBAAACAAAAD28AAABPAAAAD1kBAAACAAAAD3AAAABQAAAAD1oBAAACAAAAD1sA + AAB7AAAAD1sBAAACAAAAD10AAAB9AAAAD1wBAAACAAAAD2EAAABBAAAAD10BAAACAAAAD3MAAABTAAAA + D14BAAACAAAAD2QAAABEAAAAD18BAAACAAAAD2YAAABGAAAAD2ABAAACAAAAD2cAAABHAAAAD2EBAAAC + AAAAD2gAAABIAAAAD2IBAAACAAAAD2oAAABKAAAAD2MBAAACAAAAD2sAAABLAAAAD2QBAAACAAAAD2wA + AABMAAAAD2UBAAACAAAADzsAAAA6AAAAD2YBAAACAAAADycAAAAiAAAAD2cBAAACAAAAD1wAAAB8AAAA + D2gBAAACAAAAD3oAAABaAAAAD2kBAAACAAAAD3gAAABYAAAAD2oBAAACAAAAD2MAAABDAAAAD2sBAAAC + AAAAD3YAAABWAAAAD2wBAAACAAAAD2IAAABCAAAAD20BAAACAAAAD24AAABOAAAAD24BAAACAAAAD20A + AABNAAAAD28BAAACAAAADywAAAA8AAAAD3ABAAACAAAADy4AAAA+AAAAD3EBAAACAAAADy8AAAA/AAAA + D3IBAAAAAAAADw9zAQAAAAAAAA8PdAEAAAIAAAAPYAAAAH4AAAAPdQEAAAIAAAAPMQAAACEAAAAPdgEA + AAIAAAAPMgAAAEAAAAAPdwEAAAIAAAAPMwAAACMAAAAPeAEAAAIAAAAPNAAAACQAAAAPeQEAAAIAAAAP + NQAAACUAAAAPegEAAAIAAAAPNgAAAF4AAAAPewEAAAIAAAAPNwAAACYAAAAPfAEAAAIAAAAPOAAAACoA + AAAPfQEAAAIAAAAPOQAAACgAAAAPfgEAAAIAAAAPMAAAACkAAAAPfwEAAAIA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AAAD6sBAAACAAAADzYAAABeAAAA + D6wBAAACAAAADzcAAAAmAAAAD60BAAACAAAADzgAAAAqAAAAD64BAAACAAAADzkAAAAoAAAAD68BAAAC + AAAADzAAAAApAAAAD7ABAAACAAAAD1sAAAB7AAAAD7EBAAACAAAAD10AAAB9AAAAD7IBAAACAAAADycA + AAAiAAAAD7MBAAACAAAADywAAAA8AAAAD7QBAAACAAAADy4AAAA+AAAAD7UBAAACAAAAD3AAAABQAAAA + D7YBAAACAAAAD3kAAABZAAAAD7cBAAACAAAAD2YAAABGAAAAD7gBAAACAAAAD2cAAABHAAAAD7kBAAAC + AAAAD2MAAABDAAAAD7oBAAACAAAAD3IAAABSAAAAD7sBAAACAAAAD2wAAABMAAAAD7wBAAACAAAADy8A + AAA/AAAAD70BAAACAAAADz0AAAArAAAAD74BAAACAAAAD2EAAABBAAAAD78BAAACAAAAD28AAABPAAAA + D8ABAAACAAAAD2UAAABFAAAAD8EBAAACAAAAD3UAAABVAAAAD8IBAAACAAAAD2kAAABJAAAAD8MBAAAC + AAAAD2QAAABEAAAAD8QBAAACAAAAD2gAAABIAAAAD8UBAAACAAAAD3QAAABUAAAAD8YBAAACAAAAD24A + AABOAAAAD8cBAAACAAAAD3MAAABTAAAAD8gBAAACAAAADy0AAABfAAAAD8kBAAACAAAAD1wAAAB8AAAA + D8oBAAACAAAADzsAAAA6AAAAD8sBAAACAAAAD3EAAABRAAAAD8wBAAACAAAAD2oAAABKAAAAD80BAAAC + AAAAD2sAAABLAAAAD84BAAACAAAAD3gAAABYAAAAD88BAAACAAAAD2IAAABCAAAAD9ABAAACAAAAD20A + AABNAAAAD9EBAAACAAAAD3cAAABXAAAAD9IBAAACAAAAD3YAAABWAAAAD9MBAAACAAAAD3oAAABaAAAA + D9QBAAAAAAAADw/VAQAAAAAAAA8P1gEAAAIAAAAPYAAAAH4AAAAP1wEAAAIAAAAPMQAAACEAAAAP2AEA + AAIAAAAPMgAAAEAAAAAP2QEAAAIAAAAPMwAAACMA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LwAAAD8AAAAPBQIAAAAAAAAPDwYCAAAAAAAADw8HAgAAAQAAAA9gAAAA + DwgCAAACAAAADzEAAAAhAAAADwkCAAACAAAADzIAAAAiAAAADwoCAAACAAAADzMAAACj////DwsCAAAC + AAAADzQAAAAkAAAADwwCAAACAAAADzUAAAAlAAAADw0CAAACAAAADzYAAABeAAAADw4CAAACAAAADzcA + AAAmAAAADw8CAAACAAAADzgAAAAqAAAADxACAAACAAAADzkAAAAoAAAADxECAAACAAAADzAAAAApAAAA + DxICAAACAAAADy0AAABfAAAADxMCAAACAAAADz0AAAArAAAADxQCAAACAAAAD3EAAABRAAAADxUCAAAC + AAAAD3cAAABXAAAADxYCAAACAAAAD2UAAABFAAAADxcCAAACAAAAD3IAAABSAAAADxgCAAACAAAAD3QA + AABUAAAADxkCAAACAAAAD3kAAABZAAAADxoCAAACAAAAD3UAAABVAAAADxsCAAACAAAAD2kAAABJAAAA + DxwCAAACAAAAD28AAABPAAAADx0CAAACAAAAD3AAAABQAAAADx4CAAACAAAAD1sAAAB7AAAADx8CAAAC + AAAAD10AAAB9AAAADyACAAACAAAAD2EAAABBAAAADyECAAACAAAAD3MAAABTAAAADyICAAACAAAAD2QA + AABEAAAADyMCAAACAAAAD2YAAABGAAAADyQCAAACAAAAD2cAAABHAAAADyUCAAACAAAAD2gAAABIAAAA + DyYCAAACAAAAD2oAAABKAAAADycCAAACAAAAD2sAAABLAAAADygCAAACAAAAD2wAAABMAAAADykCAAAC + AAAADzsAAAA6AAAADyoCAAACAAAADycAAABAAAAADysCAAACAAAADyMAAAB+AAAADywCAAACAAAAD3oA + AABaAAAADy0CAAACAAAAD3gAAABYAAAADy4CAAACAAAAD2MAAABDAAAADy8CAAACAAAAD3YAAABWAAAA + DzACAAACAAAAD2IAAABCAAAADzECAAACAAAAD24AAABOAAAADzICAAACAAAAD20AAABNAAAADzMCAAAC + AAAADywAAAA8AAAADzQCAAACAAAADy4AAAA+AAAADzUCAAACAAAADy8AAAA/AAAADzYCAA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AAAAPcAAAAFAA + AAAPEwMAAAIAAAAP/P///+j///8PFAMAAAIAAAAPqP///yEAAAAPFQMAAAIAAAAPYQAAAEEAAAAPFgMA + AAIAAAAPcwAAAFMAAAAPFwMAAAIAAAAPZAAAAEQAAAAPGAMAAAIAAAAPZgAAAEYAAAAPGQMAAAIAAAAP + ZwAAAEcAAAAPGgMAAAIAAAAPaAAAAEgAAAAPGwMAAAIAAAAPagAAAEoAAAAPHAMAAAIAAAAPawAAAEsA + AAAPHQMAAAIAAAAPbAAAAEwAAAAPHgMAAAIAAAAP9v///+n///8PHwMAAAIAAAAP5P///+D///8PIAMA + AAIAAAAPJAAAAKP///8PIQMAAAIAAAAPeQAAAFkAAAAPIgMAAAIAAAAPeAAAAFgAAAAPIwMAAAIAAAAP + YwAAAEMAAAAPJAMAAAIAAAAPdgAAAFYAAAAPJQMAAAIAAAAPYgAAAEIAAAAPJgMAAAIAAAAPbgAAAE4A + AAAPJwMAAAIAAAAPbQAAAE0AAAAPKAMAAAIAAAAPLAAAADsAAAAPKQMAAAIAAAAPLgAAADoAAAAPKgMA + AAIAAAAPLQAAAF8AAAAPKwMAAAIAAAAPPAAAAD4AAAAPLAMAAAAAAAAPDy0DAAACAAAAD6f///+w//// + Dy4DAAACAAAADzEAAAArAAAADy8DAAACAAAADzIAAAAiAAAADzADAAACAAAADzMAAAAqAAAADzEDAAAC + AAAADzQAAADn////DzIDAAACAAAADzUAAAAlAAAADzMDAAACAAAADzYAAAAmAAAADzQDAAACAAAADzcA + AAAvAAAADzUDAAACAAAADzgAAAAoAAAADzYDAAACAAAADzkAAAApAAAADzcDAAACAAAADzAAAAA9AAAA + DzgDAAACAAAADycAAAA/AAAADzkDAAACAAAAD14AAABgAAAADzoDAAACAAAAD3EAAABRAAAADzsDAAAC + AAAAD3cAAABXAAAADzwDAAACAAAAD2UAAABFAAAADz0DAAACAAAAD3IAAABSAAAADz4DAAACAAAAD3QA + AABUAAAADz8DAAACAAAAD3oAAABaAAAAD0ADAAACAAAAD3UAAABVAAAAD0EDAAACAAAAD2kAAABJAAAA + D0IDAAACAAAAD28AAABPAAAAD0MDAAACAAAAD3AAAABQAAAAD0QDAAACAAAAD+j////8////D0UDAAAC + AAAAD6j///8hAAAAD0YDAAACAAAAD2EAAABBAAAAD0cDAAACAAAAD3MAAABTAAAAD0gDAAACAAAAD2QA + AABEAAAAD0kDAAACAAAAD2YAAABGAAAAD0oDAAACAAAAD2cAAABHAAAAD0sDAAACAAAAD2gAAABIAAAA + D0wDAAACAAAAD2oAAABKAAAAD00DAAACAAAAD2sAAABLAAAAD04DAAACAAAAD2wAAABMAAAAD08DAAAC + AAAAD+n////2////D1ADAAACAAAAD+D////k////D1EDAAACAAAADyQAAACj////D1IDAAACAAAAD3kA + AABZAAAAD1MDAAACAAAAD3gAAABYAAAAD1QDAAACAAAAD2MAAABDAAAAD1UDAAACAAAAD3YAAABWAAAA + D1YDAAACAAAAD2IAAABCAAAAD1cDAAACAAAAD24AAABOAAAAD1gDAAACAAAAD20AAABNAAAAD1kDAAAC + AAAADywAAAA7AAAAD1oDAAACAAAADy4AAAA6AAAAD1sDAAACAAAADy0AAABfAAAAD1wDAAACAAAADzwA + AAA+AAAAD10DAAAAAAAADw9eAwAAAgAAAA+n////vf///w9fAwAAAgAAAA8xAAAAIQAAAA9gAwAAAgAA + AA8yAAAAIgAAAA9hAwAAAgAAAA8zAAAAIwAAAA9iAwAAAgAAAA80AAAApP///w9jAwAAAgAAAA81AAAA + JQAAAA9kAwAAAgAAAA82AAAAJgAAAA9lAwAAAgAAAA83AAAALwAAAA9mAwAAAgAAAA84AAAAKAAAAA9n + AwAAAgAAAA85AAAAKQAAAA9oAwAAAgAAAA8wAAAAPQAAAA9pAwAAAgAAAA8rAAAAPwAAAA9qAwAAAgAA + AA+0////YAAAAA9rAwAAAgAAAA9xAAAAUQAAAA9sAwAAAgAAAA93AAAAVwAAAA9tAwAAAgAAAA9lAAAA + RQAAAA9uAwAAAgAAAA9yAAAAUgAAAA9v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vAAAA + ewAAAA/IAwAAAwAAAA84AAAAKAAAAFsAAAAPyQMAAAMAAAAPOQAAACkAAABdAAAAD8oDAAADAAAADzAA + AAA9AAAAfQAAAA/LAwAAAgAAAA8rAAAAPwAAAA/MAwAAAwAAAA9cAAAAYAAAALT///8PzQMAAAIAAAAP + cQAAAFEAAAAPzgMAAAIAAAAPdwAAAFcAAAAPzwMAAAIAAAAPZQAAAEUAAAAP0AMAAAIAAAAPcgAAAFIA + AAAP0QMAAAIAAAAPdAAAAFQAAAAP0gMAAAIAAAAPeQAAAFkAAAAP0wMAAAIAAAAPdQAAAFUAAAAP1AMA + AAIAAAAPaQAAAEkAAAAP1QMAAAIAAAAPbwAAAE8AAAAP1gMAAAIAAAAPcAAAAFAAAAAP1wMAAAIAAAAP + 5f///8X///8P2AMAAAMAAAAPqP///14AAAB+AAAAD9kDAAACAAAAD2EAAABBAAAAD9oDAAACAAAAD3MA + AABTAAAAD9sDAAACAAAAD2QAAABEAAAAD9wDAAACAAAAD2YAAABGAAAAD90DAAACAAAAD2cAAABHAAAA + D94DAAACAAAAD2gAAABIAAAAD98DAAACAAAAD2oAAABKAAAAD+ADAAACAAAAD2sAAABLAAAAD+EDAAAC + AAAAD2wAAABMAAAAD+IDAAACAAAAD/j////Y////D+MDAAACAAAAD+b////G////D+QDAAACAAAADycA + AAAqAAAAD+UDAAACAAAAD3oAAABaAAAAD+YDAAACAAAAD3gAAABYAAAAD+cDAAACAAAAD2MAAABDAAAA + D+gDAAACAAAAD3YAAABWAAAAD+kDAAACAAAAD2IAAABCAAAAD+oDAAACAAAAD24AAABOAAAAD+sDAAAC + AAAAD20AAABNAAAAD+wDAAACAAAADywAAAA7AAAAD+0DAAACAAAADy4AAAA6AAAAD+4DAAACAAAADy0A + AABfAAAAD+8DAAACAAAADzwAAAA+AAAAD/ADAAAAAAAADw/xAwAAAgAAAA+9////p////w/yAwAAAgAA + AA8xAAAAIQAAAA/zAwAAAgAAAA8yAAAAIgAAAA/0AwAAAgA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AAAA9LBAAAAgAAAA9iAAAAQgAAAA9MBAAAAgAAAA9uAAAATgAAAA9N + BAAAAgAAAA8sAAAAPwAAAA9OBAAAAgAAAA87AAAALgAAAA9PBAAAAgAAAA86AAAALwAAAA9QBAAAAgAA + AA8hAAAAp////w9RBAAAAgAAAA88AAAAPgAAAA9SBAAAAAAAAA8PUwQAAAMAAAAPIwAAAHwAAABcAAAA + D1QEAAADAAAADzEAAAAhAAAAsf///w9VBAAAAwAAAA8yAAAAIgAAAEAAAAAPVgQAAAMAAAAPMwAAAC8A + AACj////D1cEAAADAAAADzQAAAAkAAAAov///w9YBAAAAwAAAA81AAAAJQAAAKT///8PWQQAAAMAAAAP + NgAAAD8AAACs////D1oEAAADAAAADzcAAAAmAAAApv///w9bBAAAAwAAAA84AAAAKgAAALL///8PXAQA + AAMAAAAPOQAAACgAAACz////D10EAAADAAAADzAAAAApAAAAvP///w9eBAAAAwAAAA8tAAAAXwAAAL3/ + //8PXwQAAAMAAAAPPQAAACsAAAC+////D2AEAAACAAAAD3EAAABRAAAAD2EEAAACAAAAD3cAAABXAAAA + D2IEAAACAAAAD2UAAABFAAAAD2MEAAACAAAAD3IAAABSAAAAD2QEAAACAAAAD3QAAABUAAAAD2UEAAAC + AAAAD3kAAABZAAAAD2YEAAACAAAAD3UAAABVAAAAD2cEAAACAAAAD2kAAABJAAAAD2gEAAADAAAAD28A + AABPAAAAp////w9pBAAAAwAAAA9wAAAAUAAAALb///8PagQAAAMAAAAPXgAAAF4AAABbAAAAD2sEAAAD + AAAAD7j///+o////XQAAAA9sBAAAAgAAAA9hAAAAQQAAAA9tBAAAAgAAAA9zAAAAUwAAAA9uBAAAAgAA + AA9kAAAARAAAAA9vBAAAAgAAAA9mAAAARgAAAA9wBAAAAgAAAA9nAAAARwAAAA9xBAAAAgAAAA9oAAAA + SAAAAA9yBAAAAgAAAA9qAAAASgAAAA9zBAAAAgAAAA9rAAAASwAAAA90BAAAAgAAAA9sAAAATAAAAA91 + BAAAAwAAAA87AAAAOgAAAH4AAAAPdgQAAAMAAAAPYAAAAGAAAAB7AAAAD3cEAAADAAAADzwAAAA+AAAA + fQAAAA94BAAAAgAAAA96AAAAWgAAAA95BAAAAgAAAA94AAAAWAAAAA96BAAAAgAAAA9jAAAAQwAAAA97 + BAAAAgAAAA92AAAAVgAAAA98BAAAAgAAAA9iAAAAQgAAAA99BAAAAgAAAA9uAAAATgAAAA9+BAAAAgAA + AA9tAAAATQAAAA9/BAAAAwAAAA8sAAAAJwAAAC0AAAAPgAQAAAEAAAAPLgAAAA+BBAAAAgAAAA/p//// + yf///w+CBAAAAwAAAA+r////u////7D///8PgwQAAAAAAAAPD4QEAAACAAAADyMAAAB8AAAAD4UEAAAC + AAAADzEAAAAhAAAAD4YEAAACAAAADzIAAAAiAAAAD4cEAAACAAAADzMAAAAvAAAAD4gEAAACAAAADzQA + AAAkAAAAD4kEAAACAAAADzUAAAAlAAAAD4oEAAACAAAADzYAAAA/AAAAD4sEAAACAAAADzcAAAAmAAAA + D4wEAAACAAAADzgAAAAqAAAAD40EAAACAAAADzkAAAAoAAAAD44EAAACAAAADzAAAAApAAAAD48EAAAC + AAAADy0AAABfAAAAD5AEAAACAAAADz0AAAArAAAAD5EEAAACAAAAD3EAAABRAAAAD5IEAAACAAAAD3cA + AABXAAAAD5MEAAACAAAAD2UAAABFAAAAD5QEAAACAAAAD3IAAABSAAAAD5UEAAACAAAAD3QAAABUAAAA + D5YEAAACAAAAD3kAAABZAAAAD5cEAAACAAAAD3UAAABVAAAAD5gEAAACAAAAD2kAAABJAAAAD5kEAAAC + AAAAD28AAABPAAAAD5oEAAACAAAAD3AAAABQAAAAD5sEAAACAAAAD14AAABeAAAAD5wEAAACAAAAD7j/ + //+o////D50EAAACAAAAD2EAAABBAAAAD54EAAACAAAAD3MAAABTAAAAD58EAAACAAAAD2QAAABEAAAA + D6AEAAACAAAAD2YAAABGAAAAD6EEAAACAAAAD2cAAABHAAAAD6IEAAACAAAAD2gAAABIAAAAD6MEAAAC + AAAAD2oAAABKAAAAD6QEAAACAAAAD2sAAABLAAAAD6UEAAACAAAAD2wAAABMAAAAD6YEAAACAAAADzsA + AAA6AAAAD6cEAAACAAAAD2AAAABgAAAAD6gEAAACAAAADzwAAAA+AAAAD6kEAAACAAAAD3oAAABaAAAA + D6oEAAACAAAAD3gAAABYAAAAD6sEAAACAAAAD2MAAABDAAAAD6wEAAACAAAAD3YAAABWAAAAD60EAAAC + AAAAD2IAAABCAAAAD64EAAACAAAAD24AAABOAAAAD68EAAACAAAAD20AAABNAAAAD7AEAAACAAAADywA + AAAnAAAAD7EEAAABAAAADy4AAAAPsgQAAAIAAAAP6f///8n///8PswQAAAIAAAAPq////7v///8PtAQA + AAAAAAAPD7UEAAACAAAADy8AAABcAAAAD7YEAAAEAAAADzEAAAAhAAAAuf///6H///8PtwQAAAMAAAAP + MgAAAEAAAACy////D7gEAAAEAAAADzMAAAAjAAAAs////6P///8PuQQAAAQAAAAPNAAAACQAAAC8//// + pP///w+6BAAAAwAAAA81AAAAJQAAAL3///8PuwQAAAMAAAAPNgAAAD8AAAC+////D7wEAAACAAAADzcA + AAAmAAAAD70EAAACAAAADzgAAAAqAAAAD74EAAACAAAADzkAAAAoAAAAD78EAAACAAAADzAAAAApAAAA + D8AEAAACAAAADy0AAABfAAAAD8EEAAACAAAADz0AAAArAAAAD8IEAAACAAAAD3EAAABRAAAAD8MEAAAC + AAAAD3cAAABXAAAAD8QEAAACAAAAD2UAAABFAAAAD8UEAAACAAAAD3IAAABSAAAAD8YEAAACAAAAD3QA + AABUAAAAD8cEAAACAAAAD3kAAABZAAAAD8gEAAACAAAAD3UAAABVAAAAD8kEAAACAAAAD2kAAABJAAAA + D8oEAAAEAAAAD28AAABPAAAA+P///9j///8PywQAAAQAAAAPcAAAAFAAAAD+////3v///w/MBAAAAwAA + AA9eAAAAqP///6j///8PzQQAAAMAAAAP5////8f///9+AAAAD84EAAAEAAAAD2EAAABBAAAA5v///8b/ + //8PzwQAAAQAAAAPcwAAAFMAAADf////p////w/QBAAABAAAAA9kAAAARAAAAPD////Q////D9EEAAAC + AAAAD2YAAABGAAAAD9IEAAACAAAAD2cAAABHAAAAD9MEAAACAAAAD2gAAABIAAAAD9QEAAACAAAAD2oA + AABKAAAAD9UEAAACAAAAD2sAAABLAAAAD9YEAAACAAAAD2wAAABMAAAAD9cEAAADAAAADzsAAAA6AAAA + tP///w/YBAAAAgAAAA/o////yP///w/ZBAAAAgAAAA/g////wP///w/aBAAAAgAAAA96AAAAWgAAAA/b + BAAAAgAAAA94AAAAWAAAAA/cBAAABAAAAA9jAAAAQwAAAKL///+p////D90EAAACAAAAD3YAAABWAAAA + D94EAAACAAAAD2IAAABCAAAAD98EAAACAAAAD24AAABOAAAAD+AEAAAEAAAAD20AAABNAAAAtf///7r/ + //8P4QQAAAIAAAAPLAAAACcAAAAP4gQAAAQAAAAPLgAAACIAAAC3////9////w/jBAAAAgAAAA/p//// + yf///w/kBAAAAgAAAA/5////2f///w/lBAAAAAAAAA8P5gQAAAAAAAAPD+cEAAADAAAADyYAAAAxAAAA + fAAAAA/oBAAAAwAAAA/p////MgAAAEAAAAAP6QQAAAMAAAAPIgAAADMAAAAjAAAAD+oEAAACAAAADycA + AAA0AAAAD+sEAAACAAAADygAAAA1AAAAD+wEAAADAAAAD6f///82AAAAXgAAAA/tBAAAAgAAAA/o//// + NwAAAA/uBAAAAgAAAA8hAAAAOAAAAA/vBAAAAwAAAA/n////OQAAAHsAAAAP8AQAAAMAAAAP4P///zAA + AAB9AAAAD/EEAAACAAAADykAAACw////D/IEAAACAAAADy0AAABfAAAAD/MEAAACAAAAD2EAAABBAAAA + D/QEAAACAAAAD3oAAABaAAAAD/UEAAADAAAAD2UAAABFAAAApP///w/2BAAAAgAAAA9yAAAAUgAAAA/3 + BAAAAgAAAA90AAAAVAAAAA/4BAAAAgAAAA95AAAAWQAAAA/5BAAAAgAAAA91AAAAVQAAAA/6BAAAAgAA + AA9pAAAASQAAAA/7BAAAAgAAAA9vAAAATwAAAA/8BAAAAgAAAA9wAAAAUAAAAA/9BAAAAwAAAA9eAAAA + qP///1sAAAAP/gQAAAMAAAAPJAAAACoAAABdAAAAD/8EAAACAAAAD3EAAABRAAAADwAFAAADAAAAD3MA + AABTAAAA3////w8BBQAAAgAAAA9kAAAARAAAAA8CBQAAAgAAAA9mAAAARgAAAA8DBQAAAgAAAA9nAAAA + RwAAAA8EBQAAAgAAAA9oAAAASAAAAA8FBQAAAgAAAA9qAAAASgAAAA8GBQAAAgAAAA9rAAAASwAAAA8H + BQAAAgAAAA9sAAAATAAAAA8IBQAAAgAAAA9tAAAATQAAAA8JBQAAAwAAAA/5////JQAAALT///8PCgUA + AAMAAAAPtf///6P///9gAAAADwsFAAACAAAAD3cAAABXAAAADwwFAAACAAAAD3gAAABYAAAADw0FAAAC + AAAAD2MAAABDAAAADw4FAAACAAAAD3YAAABWAAAADw8FAAACAAAAD2IAAABCAAAADxAFAAACAAAAD24A + AABOAAAADxEFAAACAAAADywAAAA/AAAADxIFAAACAAAADzsAAAAuAAAADxMFAAACAAAADzoAAAAvAAAA + DxQFAAADAAAADz0AAAArAAAAfgAAAA8VBQAAAwAAAA88AAAAPgAAAFwAAAAPFgUAAAAAAAAPDxcFAAAC + AAAAD1wAAAB8AAAADxgFAAACAAAADzEAAAAhAAAADxkFAAACAAAADzIAAAAiAAAADxoFAAACAAAADzMA + AAAjAAAADxsFAAACAAAADzQAAAAkAAAADxwFAAACAAAADzUAAAAlAAAADx0FAAACAAAADzYAAAAmAAAA + Dx4FAAACAAAADzcAAAAvAAAADx8FAAACAAAADzgAAAAoAAAADyAFAAACAAAADzkAAAApAAAADyEFAAAC + AAAADzAAAAA9AAAADyIFAAACAAAADycAAAA/AAAADyMFAAACAAAAD6v///+7////DyQFAAACAAAAD3EA + AABRAAAADyUFAAACAAAAD3cAAABXAAAADyYFAAACAAAAD2UAAABFAAAADycFAAACAAAAD3IAAABSAAAA + DygFAAACAAAAD3QAAABUAAAADykFAAACAAAAD3kAAABZAAAADyoFAAACAAAAD3UAAABVAAAADysFAAAC + AAAAD2kAAABJAAAADywFAAACAAAAD28AAABPAAAADy0FAAACAAAAD3AAAABQAAAADy4FAAACAAAADysA + AAAqAAAADy8FAAACAAAAD7T///9gAAAADzAFAAACAAAAD2EAAABBAAAADzEFAAACAAAAD3MAAABTAAAA + DzIFAAACAAAAD2QAAABEAAAADzMFAAACAAAAD2YAAABGAAAADzQFAAACAAAAD2cAAABHAAAADzUFAAAC + AAAAD2gAAABIAAAADzYFAAACAAAAD2oAAABKAAAADzcFAAACAAAAD2sAAABLAAAADzgFAAACAAAAD2wA + AABMAAAADzkFAAACAAAAD+f////H////DzoFAAACAAAAD7r///+q////DzsFAAACAAAAD34AAABeAAAA + DzwFAAACAAAAD3oAAABaAAAADz0FAAACAAAAD3gAAABYAAAADz4FAAACAAAAD2MAAABDAAAADz8FAAAC + AAAAD3YAAABWAAAAD0AFAAACAAAAD2IAAABCAAAAD0EFAAACAAAAD24AAABOAAAAD0IFAAACAAAAD20A + AABNAAAAD0MFAAACAAAADywAAAA7AAAAD0QFAAACAAAADy4AAAA6AAAAD0UFAAACAAAADy0AAABfAAAA + D0YFAAACAAAADzwAAAA+AAAAD0cFAAAAAAAADw9IBQAAAgAAAA8nAAAAIgAAAA9JBQAAAgAAAA8xAAAA + IQAAAA9KBQAAAgAAAA8yAAAAQAAAAA9LBQAAAgAAAA8zAAAAIwAAAA9MBQAAAgAAAA80AAAAJAAAAA9N + BQAAAgAAAA81AAAAJQAAAA9OBQAAAgAAAA82AAAAqP///w9PBQAAAgAAAA83AAAAJgAAAA9QBQAAAgAA + AA84AAAAKgAAAA9RBQAAAgAAAA85AAAAKAAAAA9SBQAAAgAAAA8wAAAAKQAAAA9TBQAAAgAAAA8tAAAA + XwAAAA9UBQAAAgAAAA89AAAAKwAAAA9VBQAAAgAAAA9xAAAAUQAAAA9WBQAAAgAAAA93AAAAVwAAAA9X + BQAAAgAAAA9lAAAARQAAAA9YBQAAAgAA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PAAAAD4AAAAP2gUA + AAAAAAAPD9sFAAAEAAAAD2AAAAB+AAAAKAAAACkAAAAP3AUAAAIAAAAPMQAAACEAAAAP3QUAAAQAAAAP + MgAAAEAAAAAyAAAAPwAAAA/eBQAABAAAAA8zAAAAIwAAADMAAAArAAAAD98FAAAEAAAADzQAAAAkAAAA + NAAAACIAAAAP4AUAAAIAAAAPNQAAACUAAAAP4QUAAAQAAAAPNgAAAF4AAAA2AAAAPQAAAA/iBQAABAAA + AA83AAAAJgAAADcAAAA6AAAAD+MFAAAEAAAADzgAAAAqAAAAOAAAAC8AAAAP5AUAAAIAAAAPOQAAACgA + AAAP5QUAAAIAAAAPMAAAACkAAAAP5gUAAAQAAAAPLQAAAF8AAAAtAAAASQAAAA/nBQAABAAAAA89AAAA + KwAAAC4AAABWAAAAD+gFAAAEAAAAD3EAAABRAAAALAAAAPv///8P6QUAAAQAAAAPdwAAAFcAAADz//// + 0////w/qBQAABAAAAA9lAAAARQAAAOX////F////D+sFAAAEAAAAD3IAAABSAAAA6P///8j///8P7AUA + AAQAAAAPdAAAAFQAAAD4////2P///w/tBQAABAAAAA95AAAAWQAAAPn////Z////D+4FAAAEAAAAD3UA + AABVAAAA6v///8r///8P7wUAAAQAAAAPaQAAAEkAAADx////0f///w/wBQAABAAAAA9vAAAATwAAAOT/ + ///E////D/EFAAAEAAAAD3AAAABQAAAA5////8f///8P8gUAAAQAAAAPWwAAAHsAAAD2////1v///w/z + BQAAAwAAAA9dAAAAfQAAADsAAAAP9AUAAAQAAAAPYQAAAEEAAAD8////3P///w/1BQAABAAAAA9zAAAA + UwAAAP/////f////D/YFAAAEAAAAD2QAAABEAAAA4P///8D///8P9wUAAAQAAAAPZgAAAEYAAADu//// + zv///w/4BQAABAAAAA9nAAAARwAAAOb////G////D/kFAAAEAAAAD2gAAABIAAAA4////8P///8P+gUA + AAQAAAAPagAAAEoAAADy////0v///w/7BQAABAAAAA9rAAAASwAAAO3////N////D/wFAAAEAAAAD2wA + AABMAAAA4v///8L///8P/QUAAAQAAAAPOwAAADoAAADs////zP///w/+BQAABAAAAA8nAAAAIgAAAPf/ + ///X////D/8FAAAEAAAAD1wAAAB8AAAAJwAAANv///8PAAYAAAQAAAAPegAAAFoAAAD+////3v///w8B + BgAABAAAAA94AAAAWAAAAOn////J////DwIGAAAEAAAAD2MAAABDAAAA+v///9r///8PAwYAAAQAAAAP + dgAAAFYAAAD9////3f///w8EBgAABAAAAA9iAAAAQgAAAPT////U////DwUGAAAEAAAAD24AAABOAAAA + 9f///9X///8PBgYAAAQAAAAPbQAAAE0AAADv////z////w8HBgAABAAAAA8sAAAAPAAAAPD////Q//// + DwgGAAAEAAAADy4AAAA+AAAA6////8v///8PCQYAAAQAAAAPLwAAAD8AAADh////wf///w8KBgAAAgAA + AA88AAAAPgAAAA8LBgAAAAAAAA8PDAYAAAQAAAAPYAAAAH4AAAD3////1////w8NBgAAAgAAAA8xAAAA + IQAAAA8OBgAAAgAAAA8yAAAAQAAAAA8PBgAAAgAAAA8zAAAAIwAAAA8QBgAAAgAAAA80AAAAJAAAAA8R + BgAAAgAAAA81AAAAJQAAAA8SBgAAAgAAAA82AAAAXgAAAA8TBgAAAgAAAA83AAAAJgAAAA8UBgAAAgAA + AA84AAAAKgAAAA8VBgAAAgAAAA85AAAAKAAAAA8WBgAAAgAAAA8wAAAAKQAAAA8XBgAAAgAAAA8tAAAA + XwAAAA8YBgAAAgAAAA89AAAAKwAAAA8ZBgAABAAAAA9xAAAAUQAAAP/////f////DxoGAAAEAAAAD3cA + AABXAAAA4v///8L///8PGwYAAAQAAAAPZQAAAEUAAADl////xf///w8cBgAABAAAAA9yAAAAUgAAAPD/ + ///Q////Dx0GAAAEAAAAD3QAAABUAAAA8v///9L///8PHgYAAAQAAAAPeQAAAFkAAAD6////2v///w8f + BgAABAAAAA91AAAAVQAAAPP////T////DyAGAAAEAAAAD2kAAABJAAAA6P///8j///8PIQYAAAQAAAAP + bwAAAE8AAADu////zv///w8iBgAABAAAAA9wAAAAUAAAAO/////P////DyMGAAAEAAAAD1sAAAB7AAAA + +P///9j///8PJAYAAAQAAAAPXQAAAH0AAAD5////2f///w8lBgAABAAAAA9hAAAAQQAAAOD////A//// + DyYGAAAEAAAAD3MAAABTAAAA8f///9H///8PJwYAAAQAAAAPZAAAAEQAAADk////xP///w8oBgAABAAA + AA9mAAAARgAAAPT////U////DykGAAAEAAAAD2cAAABHAAAA4////8P///8PKgYAAAQAAAAPaAAAAEgA + AAD1////1f///w8rBgAABAAAAA9qAAAASgAAAOn////J////DywGAAAEAAAAD2sAAABLAAAA6v///8r/ + //8PLQYAAAQAAAAPbAAAAEwAAADr////y////w8uBgAAAgAAAA87AAAAOgAAAA8vBgAAAgAAAA8nAAAA + IgAAAA8wBgAABAAAAA9cAAAAfAAAAP7////e////DzEGAAAEAAAAD3oAAABaAAAA5////8f///8PMgYA + AAQAAAAPeAAAAFgAAAD8////3P///w8zBgAABAAAAA9jAAAAQwAAAPb////W////DzQGAAAEAAAAD3YA + AABWAAAA5v///8b///8PNQYAAAQAAAAPYgAAAEIAAADh////wf///w82BgAABAAAAA9uAAAATgAAAO3/ + ///N////DzcGAAAEAAAAD20AAABNAAAA7P///8z///8POAYAAAIAAAAPLAAAADwAAAAPOQYAAAIAAAAP + LgAAAD4AAAAPOgYAAAIAAAAPLwAAAD8AAAAPOwYAAAIAAAAPPAAAAD4AAAAPPAYAAAAAAAAPDz0GAAAE + AAAAD2AAAAB+AAAAo////7P///8PPgYAAAIAAAAPMQAAACEAAAAPPwYAAAIAAAAPMgAAAEAAAAAPQAYA + AAIAAAAPMwAAACMAAAAPQQYAAAIAAAAPNAAAACQAAAAPQgYAAAIAAAAPNQAAACUAAAAPQwYAAAIAAAAP + NgAAAF4AAAAPRAYAAAIAAAAPNwAAACYAAAAPRQYAAAIAAAAPOAAAACoAAAAPRgYAAAIAAAAPOQAAACgA + AAAPRwYAAAIAAAAPMAAAACkAAAAPSAYAAAIAAAAPLQAAAF8AAAAPSQYAAAIAAAAPPQAAACsAAAAPSgYA + AAQAAAAPcQAAAFEAAADK////6v///w9LBgAABAAAAA93AAAAVwAAAMP////j////D0wGAAAEAAAAD2UA + AABFAAAA1f////X///8PTQYAAAQAAAAPcgAAAFIAAADL////6////w9OBgAABAAAAA90AAAAVAAAAMX/ + ///l////D08GAAAEAAAAD3kAAABZAAAAzv///+7///8PUAYAAAQAAAAPdQAAAFUAAADH////5////w9R + BgAABAAAAA9pAAAASQAAANv////7////D1IGAAAEAAAAD28AAABPAAAArv///77///8PUwYAAAQAAAAP + cAAAAFAAAADa////+v///w9UBgAABAAAAA9bAAAAewAAAMj////o////D1UGAAAEAAAAD10AAAB9AAAA + JwAAACcAAAAPVgYAAAQAAAAPYQAAAEEAAADG////5v///w9XBgAABAAAAA9zAAAAUwAAANn////5//// + D1gGAAAEAAAAD2QAAABEAAAA1/////f///8PWQYAAAQAAAAPZgAAAEYAAADB////4f///w9aBgAABAAA + AA9nAAAARwAAAND////w////D1sGAAAEAAAAD2gAAABIAAAA0v////L///8PXAYAAAQAAAAPagAAAEoA + AADP////7////w9dBgAABAAAAA9rAAAASwAAAMz////s////D14GAAAEAAAAD2wAAABMAAAAxP///+T/ + //8PXwYAAAQAAAAPOwAAADoAAADW////9v///w9gBgAABAAAAA8nAAAAIgAAANz////8////D2EGAAAE + AAAAD1wAAAB8AAAALwAAAHwAAAAPYgYAAAQAAAAPegAAAFoAAADR////8f///w9jBgAABAAAAA94AAAA + WAAAAN7////+////D2QGAAAEAAAAD2MAAABDAAAA0/////P///8PZQYAAAQAAAAPdgAAAFYAAADN//// + 7f///w9mBgAABAAAAA9iAAAAQgAAAKb///+2////D2cGAAAEAAAAD24AAABOAAAA1P////T///8PaAYA + AAQAAAAPbQAAAE0AAADY////+P///w9pBgAABAAAAA8sAAAAPAAAAML////i////D2oGAAAEAAAADy4A + AAA+AAAAwP///+D///8PawYAAAQAAAAPLwAAAD8AAAAuAAAALAAAAA9sBgAABAAAAA88AAAAPgAAAHwA + AACm////D20GAAAAAAAADw9uBgAAAgAAAA9gAAAAfgAAAA9vBgAAAgAAAA8xAAAAIQAAAA9wBgAAAgAA + AA8yAAAAQAAAAA9xBgAAAgAAAA8zAAAAIwAAAA9yBgAAAgAAAA80AAAAJAAAAA9zBgAAAgAAAA81AAAA + JQAAAA90BgAAAgAAAA82AAAAXgAAAA91BgAAAgAAAA83AAAAJgAAAA92BgAAAgAAAA84AAAAKgAAAA93 + BgAAAgAAAA85AAAAKAAAAA94BgAAAgAAAA8wAAAAKQAAAA95BgAAAgAAAA8tAAAAXwAAAA96BgAAAgAA + AA89AAAAKwAAAA97BgAABAAAAA9xAAAAUQAAAMr////q////D3wGAAAEAAAAD3cAAABXAAAAw////+P/ + //8PfQYAAAQAAAAPZQAAAEUAAADV////9f///w9+BgAABAAAAA9yAAAAUgAAAMv////r////D38GAAAE + AAAAD3QAAABUAAAAxf///+X///8PgAYAAAQAAAAPeQAAAFkAAADO////7v///w+BBgAABAAAAA91AAAA + VQAAAMf////n////D4IGAAAEAAAAD2kAAABJAAAA2/////v///8PgwYAAAQAAAAPbwAAAE8AAADd//// + /f///w+EBgAABAAAAA9wAAAAUAAAANr////6////D4UGAAAEAAAAD1sAAAB7AAAAyP///+j///8PhgYA + AAQAAAAPXQAAAH0AAADf/////////w+HBgAABAAAAA9hAAAAQQAAAMb////m////D4gGAAAEAAAAD3MA + AABTAAAA2f////n///8PiQYAAAQAAAAPZAAAAEQAAADX////9////w+KBgAABAAAAA9mAAAARgAAAMH/ + ///h////D4sGAAAEAAAAD2cAAABHAAAA0P////D///8PjAYAAAQAAAAPaAAAAEgAAADS////8v///w+N + BgAABAAAAA9qAAAASgAAAM/////v////D44GAAAEAAAAD2sAAABLAAAAzP///+z///8PjwYAAAQAAAAP + bAAAAEwAAADE////5P///w+QBgAABAAAAA87AAAAOgAAANb////2////D5EGAAAEAAAADycAAAAiAAAA + 3P////z///8PkgYAAAIAAAAPXAAAAHwAAAAPkwYAAAQAAAAPegAAAFoAAADR////8f///w+UBgAABAAA + AA94AAAAWAAAAN7////+////D5UGAAAEAAAAD2MAAABDAAAA0/////P///8PlgYAAAQAAAAPdgAAAFYA + AADN////7f///w+XBgAABAAAAA9iAAAAQgAAAMn////p////D5gGAAAEAAAAD24AAABOAAAA1P////T/ + //8PmQYAAAQAAAAPbQAAAE0AAADY////+P///w+aBgAABAAAAA8sAAAAPAAAAML////i////D5sGAAAE + AAAADy4AAAA+AAAAwP///+D///8PnAYAAAIAAAAPLwAAAD8AAAAPnQYAAAAAAAAPD54GAAAAAAAADw+f + BgAAAgAAAA9gAAAAfgAAAA+gBgAAAgAAAA8xAAAAIQAAAA+hBgAAAgAAAA8yAAAAQAAAAA+iBgAAAgAA + AA8zAAAAIwAAAA+jBgAAAgAAAA80AAAAJAAAAA+kBgAAAgAAAA81AAAAJQAAAA+lBgAAAgAAAA82AAAA + XgAAAA+mBgAAAgAAAA83AAAAJgAAAA+nBgAAAgAAAA84AAAAKgAAAA+oBgAAAgAAAA85AAAAKAAAAA+p + BgAAAgAAAA8wAAAAKQAAAA+qBgAAAgAAAA8tAAAAXwAAAA+rBgAAAgAAAA89AAAAKwAAAA+sBgAABAAA + AA9xAAAAUQAAAMr////q////D60GAAAEAAAAD3cAAABXAAAAw////+P///8PrgYAAAQAAAAPZQAAAEUA + AADV////9f///w+vBgAABAAAAA9yAAAAUgAAAMv////r////D7AGAAAEAAAAD3QAAABUAAAAxf///+X/ + //8PsQYAAAQAAAAPeQAAAFkAAADO////7v///w+yBgAABAAAAA91AAAAVQAAAMf////n////D7MGAAAE + AAAAD2kAAABJAAAA2/////v///8PtAYAAAQAAAAPbwAAAE8AAADd/////f///w+1BgAABAAAAA9wAAAA + UAAAANr////6////D7YGAAAEAAAAD1sAAAB7AAAAyP///+j///8PtwYAAAQAAAAPXQAAAH0AAADf//// + /////w+4BgAABAAAAA9hAAAAQQAAAMb////m////D7kGAAAEAAAAD3MAAABTAAAA2f////n///8PugYA + AAQAAAAPZAAAAEQAAADX////9////w+7BgAABAAAAA9mAAAARgAAAMH////h////D7wGAAAEAAAAD2cA + AABHAAAA0P////D///8PvQYAAAQAAAAPaAAAAEgAAADS////8v///w++BgAABAAAAA9qAAAASgAAAM// + ///v////D78GAAAEAAAAD2sAAABLAAAAzP///+z///8PwAYAAAQAAAAPbAAAAEwAAADE////5P///w/B + BgAABAAAAA87AAAAOgAAANb////2////D8IGAAAEAAAADycAAAAiAAAA3P////z///8PwwYAAAIAAAAP + XAAAAHwAAAAPxAYAAAQAAAAPegAAAFoAAADR////8f///w/FBgAABAAAAA94AAAAWAAAAN7////+//// + D8YGAAAEAAAAD2MAAABDAAAA0/////P///8PxwYAAAQAAAAPdgAAAFYAAADN////7f///w/IBgAABAAA + AA9iAAAAQgAAAMn////p////D8kGAAAEAAAAD24AAABOAAAA1P////T///8PygYAAAQAAAAPbQAAAE0A + AADY////+P///w/LBgAABAAAAA8sAAAAPAAAAML////i////D8wGAAAEAAAADy4AAAA+AAAAwP///+D/ + //8PzQYAAAIAAAAPLwAAAD8AAAAPzgYAAAIAAAAPPAAAAD4AAAAPzwYAAAAAAAAPD9AGAAACAAAADygA + AAApAAAAD9EGAAACAAAADzEAAAAhAAAAD9IGAAACAAAADzIAAAAiAAAAD9MGAAACAAAADzMAAAAvAAAA + D9QGAAACAAAADzQAAAAkAAAAD9UGAAACAAAADzUAAAA6AAAAD9YGAAACAAAADzYAAAAsAAAAD9cGAAAC + AAAADzcAAAAuAAAAD9gGAAACAAAADzgAAAA7AAAAD9kGAAACAAAADzkAAAA/AAAAD9oGAAACAAAADzAA + AAAlAAAAD9sGAAACAAAADy0AAABfAAAAD9wGAAACAAAADz0AAAArAAAAD90GAAACAAAAD8r////q//// + D94GAAACAAAAD8P////j////D98GAAACAAAAD9X////1////D+AGAAACAAAAD8v////r////D+EGAAAC + AAAAD8X////l////D+IGAAACAAAAD87////u////D+MGAAACAAAAD8f////n////D+QGAAACAAAAD9v/ + ///7////D+UGAAACAAAAD93////9////D+YGAAACAAAAD9r////6////D+cGAAACAAAAD8j////o//// + D+gGAAACAAAAD9//////////D+kGAAACAAAAD8b////m////D+oGAAACAAAAD9n////5////D+sGAAAC + AAAAD9f////3////D+wGAAACAAAAD8H////h////D+0GAAACAAAAD9D////w////D+4GAAACAAAAD9L/ + ///y////D+8GAAACAAAAD8/////v////D/AGAAACAAAAD8z////s////D/EGAAACAAAAD8T////k//// + D/IGAAACAAAAD9b////2////D/MGAAACAAAAD9z////8////D/QGAAACAAAAD1wAAAB8AAAAD/UGAAAC + AAAAD9H////x////D/YGAAACAAAAD97////+////D/cGAAACAAAAD9P////z////D/gGAAACAAAAD83/ + ///t////D/kGAAACAAAAD8n////p////D/oGAAACAAAAD9T////0////D/sGAAACAAAAD9j////4//// + D/wGAAACAAAAD8L////i////D/0GAAACAAAAD8D////g////D/4GAAACAAAADy8AAAA/AAAAD/8GAAAC + AAAADzwAAAA+AAAADwAHAAAAAAAADw8BBwAAAgAAAA9gAAAAfgAAAA8CBwAAAgAAAA8xAAAAIQAAAA8D + BwAAAgAAAA8yAAAAQAAAAA8EBwAAAgAAAA8zAAAAIwAAAA8FBwAAAgAAAA80AAAAJAAAAA8GBwAAAgAA + AA81AAAAJQAAAA8HBwAAAgAAAA82AAAAXgAAAA8IBwAAAgAAAA83AAAAJgAAAA8JBwAAAgAAAA84AAAA + KgAAAA8KBwAAAgAAAA85AAAAKAAAAA8LBwAAAgAAAA8wAAAAKQAAAA8MBwAAAgAAAA8tAAAAXwAAAA8N + BwAAAgAAAA89AAAAKwAAAA8OBwAABAAAAA9xAAAAUQAAAOn////J////Dw8HAAAEAAAAD3cAAABXAAAA + 9v///9b///8PEAcAAAQAAAAPZQAAAEUAAADz////0////w8RBwAABAAAAA9yAAAAUgAAAOr////K//// + DxIHAAAEAAAAD3QAAABUAAAA5f///8X///8PEwcAAAQAAAAPeQAAAFkAAADt////zf///w8UBwAABAAA + AA91AAAAVQAAAOP////D////DxUHAAAEAAAAD2kAAABJAAAA+P///9j///8PFgcAAAQAAAAPbwAAAE8A + AAD5////2f///w8XBwAABAAAAA9wAAAAUAAAAOf////H////DxgHAAAEAAAAD1sAAAB7AAAA9f///9X/ + //8PGQcAAAQAAAAPXQAAAH0AAAD6////2v///w8aBwAABAAAAA9hAAAAQQAAAPT////U////DxsHAAAE + AAAAD3MAAABTAAAA+////9v///8PHAcAAAQAAAAPZAAAAEQAAADi////wv///w8dBwAABAAAAA9mAAAA + RgAAAOD////A////Dx4HAAAEAAAAD2cAAABHAAAA7////8////8PHwcAAAQAAAAPaAAAAEgAAADw//// + 0P///w8gBwAABAAAAA9qAAAASgAAAO7////O////DyEHAAAEAAAAD2sAAABLAAAA6////8v///8PIgcA + AAQAAAAPbAAAAEwAAADk////xP///w8jBwAABAAAAA87AAAAOgAAAOb////G////DyQHAAAEAAAADycA + AAAiAAAA/f///93///8PJQcAAAIAAAAPXAAAAHwAAAAPJgcAAAQAAAAPegAAAFoAAAD/////3////w8n + BwAABAAAAA94AAAAWAAAAPf////X////DygHAAAEAAAAD2MAAABDAAAA8f///9H///8PKQcAAAQAAAAP + dgAAAFYAAADs////zP///w8qBwAABAAAAA9iAAAAQgAAAOj////I////DysHAAAEAAAAD24AAABOAAAA + 8v///9L///8PLAcAAAQAAAAPbQAAAE0AAAD8////3P///w8tBwAABAAAAA8sAAAAPAAAAOH////B//// + Dy4HAAAEAAAADy4AAAA+AAAA/v///97///8PLwcAAAIAAAAPLwAAAD8AAAAPMAcAAAIAAAAPPAAAAD4A + AAAPMQcAAAAAAAAPDzIHAAACAAAAD2AAAAB+AAAADzMHAAACAAAADzEAAAAhAAAADzQHAAACAAAADzIA + AABAAAAADzUHAAACAAAADzMAAAAjAAAADzYHAAACAAAADzQAAAAkAAAADzcHAAACAAAADzUAAAAlAAAA + DzgHAAACAAAADzYAAABeAAAADzkHAAACAAAADzcAAAAmAAAADzoHAAACAAAADzgAAAAqAAAADzsHAAAC + AAAADzkAAAAoAAAADzwHAAACAAAADzAAAAApAAAADz0HAAACAAAADy0AAABfAAAADz4HAAACAAAADz0A + AAArAAAADz8HAAAEAAAAD3EAAABRAAAA0f////H///8PQAcAAAQAAAAPdwAAAFcAAADX////9////w9B + BwAABAAAAA9lAAAARQAAAMX////l////D0IHAAAEAAAAD3IAAABSAAAA0v////L///8PQwcAAAQAAAAP + dAAAAFQAAADU////9P///w9EBwAABAAAAA95AAAAWQAAANn////5////D0UHAAAEAAAAD3UAAABVAAAA + 1f////X///8PRgcAAAQAAAAPaQAAAEkAAADJ////6f///w9HBwAABAAAAA9vAAAATwAAAM/////v//// + D0gHAAAEAAAAD3AAAABQAAAA0P////D///8PSQcAAAQAAAAPWwAAAHsAAADb////+////w9KBwAABAAA + AA9dAAAAfQAAAN3////9////D0sHAAAEAAAAD2EAAABBAAAAwf///+H///8PTAcAAAQAAAAPcwAAAFMA + AADT////8////w9NBwAABAAAAA9kAAAARAAAAMT////k////D04HAAAEAAAAD2YAAABGAAAAxv///+b/ + //8PTwcAAAQAAAAPZwAAAEcAAADH////5////w9QBwAABAAAAA9oAAAASAAAAMj////o////D1EHAAAE + AAAAD2oAAABKAAAAyv///+r///8PUgcAAAQAAAAPawAAAEsAAADL////6////w9TBwAABAAAAA9sAAAA + TAAAAMz////s////D1QHAAACAAAADzsAAAA6AAAAD1UHAAACAAAADycAAAAiAAAAD1YHAAACAAAAD1wA + AAB8AAAAD1cHAAAEAAAAD3oAAABaAAAA2v////r///8PWAcAAAQAAAAPeAAAAFgAAADY////+P///w9Z + BwAABAAAAA9jAAAAQwAAAMP////j////D1oHAAAEAAAAD3YAAABWAAAA1v////b///8PWwcAAAQAAAAP + YgAAAEIAAADC////4v///w9cBwAABAAAAA9uAAAATgAAAM7////u////D10HAAAEAAAAD20AAABNAAAA + zf///+3///8PXgcAAAIAAAAPLAAAADwAAAAPXwcAAAIAAAAPLgAAAD4AAAAPYAcAAAIAAAAPLwAAAD8A + AAAPYQcAAAIAAAAPPAAAAD4AAAAPYgcAAAAAAAAPD2MHAAAEAAAAD2AAAAB+AAAArf///73///8PZAcA + AAQAAAAPMQAAACEAAAAxAAAAIQAAAA9lBwAABAAAAA8yAAAAQAAAADIAAAAiAAAAD2YHAAAEAAAADzMA + AAAjAAAAMwAAACcAAAAPZwcAAAQAAAAPNAAAACQAAAA0AAAAKgAAAA9oBwAABAAAAA81AAAAJQAAADUA + AAA6AAAAD2kHAAAEAAAADzYAAABeAAAANgAAACwAAAAPagcAAAQAAAAPNwAAACYAAAA3AAAALgAAAA9r + BwAABAAAAA84AAAAKgAAADgAAAA7AAAAD2wHAAAEAAAADzkAAAAoAAAAOQAAACgAAAAPbQcAAAQAAAAP + MAAAACkAAAAwAAAAKQAAAA9uBwAABAAAAA8tAAAAXwAAAC0AAABfAAAAD28HAAAEAAAADz0AAAArAAAA + PQAAACsAAAAPcAcAAAQAAAAPcQAAAFEAAADK////6v///w9xBwAABAAAAA93AAAAVwAAAMP////j//// + D3IHAAAEAAAAD2UAAABFAAAA1f////X///8PcwcAAAQAAAAPcgAAAFIAAADL////6////w90BwAABAAA + AA90AAAAVAAAAMX////l////D3UHAAAEAAAAD3kAAABZAAAAzv///+7///8PdgcAAAQAAAAPdQAAAFUA + AADH////5////w93BwAABAAAAA9pAAAASQAAANv////7////D3gHAAAEAAAAD28AAABPAAAA3f////3/ + //8PeQcAAAQAAAAPcAAAAFAAAADa////+v///w96BwAABAAAAA9bAAAAewAAAMj////o////D3sHAAAE + AAAAD10AAAB9AAAAp////7f///8PfAcAAAQAAAAPYQAAAEEAAADG////5v///w99BwAABAAAAA9zAAAA + UwAAAKb///+2////D34HAAAEAAAAD2QAAABEAAAA1/////f///8PfwcAAAQAAAAPZgAAAEYAAADB//// + 4f///w+ABwAABAAAAA9nAAAARwAAAND////w////D4EHAAAEAAAAD2gAAABIAAAA0v////L///8PggcA + AAQAAAAPagAAAEoAAADP////7////w+DBwAABAAAAA9rAAAASwAAAMz////s////D4QHAAAEAAAAD2wA + AABMAAAAxP///+T///8PhQcAAAQAAAAPOwAAADoAAADW////9v///w+GBwAABAAAAA8nAAAAIgAAAKT/ + //+0////D4cHAAAEAAAAD1wAAAB8AAAAXAAAAHwAAAAPiAcAAAQAAAAPegAAAFoAAADR////8f///w+J + BwAABAAAAA94AAAAWAAAAN7////+////D4oHAAAEAAAAD2MAAABDAAAA0/////P///8PiwcAAAQAAAAP + dgAAAFYAAADN////7f///w+MBwAABAAAAA9iAAAAQgAAAMn////p////D40HAAAEAAAAD24AAABOAAAA + 1P////T///8PjgcAAAQAAAAPbQAAAE0AAADY////+P///w+PBwAABAAAAA8sAAAAPAAAAML////i//// + D5AHAAAEAAAADy4AAAA+AAAAwP///+D///8PkQcAAAQAAAAPLwAAAD8AAAAvAAAAPwAAAA+SBwAAAgAA + AA88AAAAPgAAAA+TBwAAAAAAAA8PlAcAAAIAAAAPrf///73///8PlQcAAAIAAAAPMQAAACEAAAAPlgcA + AAIAAAAPMgAAACIAAAAPlwcAAAIAAAAPMwAAACcAAAAPmAcAAAIAAAAPNAAAADsAAAAPmQcAAAIAAAAP + NQAAACUAAAAPmgcAAAIAAAAPNgAAADoAAAAPmwcAAAIAAAAPNwAAAD8AAAAPnAcAAAIAAAAPOAAAACoA + AAAPnQcAAAIAAAAPOQAAACgAAAAPngcAAAIAAAAPMAAAACkAAAAPnwcAAAIAAAAPLQAAAF8AAAAPoAcA + AAIAAAAPPQAAACsAAAAPoQcAAAIAAAAPyv///+r///8PogcAAAIAAAAPw////+P///8PowcAAAIAAAAP + 1f////X///8PpAcAAAIAAAAPy////+v///8PpQcAAAIAAAAPxf///+X///8PpgcAAAIAAAAPzv///+7/ + //8PpwcAAAIAAAAPx////+f///8PqAcAAAIAAAAP2/////v///8PqQcAAAIAAAAP3f////3///8PqgcA + AAIAAAAP2v////r///8PqwcAAAIAAAAPyP///+j///8PrAcAAAIAAAAPp////7f///8PrQcAAAIAAAAP + xv///+b///8PrgcAAAIAAAAPpv///7b///8PrwcAAAIAAAAP1/////f///8PsAcAAAIAAAAPwf///+H/ + //8PsQcAAAIAAAAP0P////D///8PsgcAAAIAAAAP0v////L///8PswcAAAIAAAAPz////+////8PtAcA + AAIAAAAPzP///+z///8PtQcAAAIAAAAPxP///+T///8PtgcAAAIAAAAP1v////b///8PtwcAAAIAAAAP + pP///7T///8PuAcAAAIAAAAPXAAAAC8AAAAPuQcAAAIAAAAP0f////H///8PugcAAAIAAAAP3v////7/ + //8PuwcAAAIAAAAP0/////P///8PvAcAAAIAAAAPzf///+3///8PvQcAAAIAAAAPyf///+n///8PvgcA + AAIAAAAP1P////T///8PvwcAAAIAAAAP2P////j///8PwAcAAAIAAAAPwv///+L///8PwQcAAAIAAAAP + wP///+D///8PwgcAAAIAAAAPLgAAACwAAAAPwwcAAAIAAAAPPAAAAD4AAAAPxAcAAAAAAAAPD8UHAAAC + AAAAD6P///+z////D8YHAAACAAAADzEAAAAhAAAAD8cHAAACAAAADzIAAAAiAAAAD8gHAAACAAAADzMA + AAAnAAAAD8kHAAACAAAADzQAAAA7AAAAD8oHAAACAAAADzUAAAAlAAAAD8sHAAACAAAADzYAAAA6AAAA + D8wHAAACAAAADzcAAAA/AAAAD80HAAACAAAADzgAAAAqAAAAD84HAAACAAAADzkAAAAoAAAAD88HAAAC + AAAADzAAAAApAAAAD9AHAAACAAAADy0AAABfAAAAD9EHAAACAAAADz0AAAArAAAAD9IHAAACAAAAD8r/ + ///q////D9MHAAACAAAAD8P////j////D9QHAAACAAAAD9X////1////D9UHAAACAAAAD8v////r//// + D9YHAAACAAAAD8X////l////D9cHAAACAAAAD87////u////D9gHAAACAAAAD8f////n////D9kHAAAC + AAAAD9v////7////D9oHAAACAAAAD93////9////D9sHAAACAAAAD9r////6////D9wHAAACAAAAD8j/ + ///o////D90HAAACAAAAD9//////////D94HAAACAAAAD8b////m////D98HAAACAAAAD9n////5//// + D+AHAAACAAAAD9f////3////D+EHAAACAAAAD8H////h////D+IHAAACAAAAD9D////w////D+MHAAAC + AAAAD9L////y////D+QHAAACAAAAD8/////v////D+UHAAACAAAAD8z////s////D+YHAAACAAAAD8T/ + ///k////D+cHAAACAAAAD9b////2////D+gHAAACAAAAD9z////8////D+kHAAACAAAAD1wAAAAvAAAA + D+oHAAACAAAAD9H////x////D+sHAAACAAAAD97////+////D+wHAAACAAAAD9P////z////D+0HAAAC + AAAAD83////t////D+4HAAACAAAAD8n////p////D+8HAAACAAAAD9T////0////D/AHAAACAAAAD9j/ + ///4////D/EHAAACAAAAD8L////i////D/IHAAACAAAAD8D////g////D/MHAAACAAAADy4AAAAsAAAA + D/QHAAACAAAADzwAAAA+AAAAD/UHAAAAAAAADw/2BwAAAgAAAA+6////qv///w/3BwAAAgAAAA8xAAAA + IQAAAA/4BwAAAgAAAA8yAAAAIgAAAA/5BwAAAgAAAA8zAAAAt////w/6BwAAAgAAAA80AAAAJAAAAA/7 + BwAAAgAAAA81AAAAJQAAAA/8BwAAAgAAAA82AAAAJgAAAA/9BwAAAgAAAA83AAAALwAAAA/+BwAAAgAA + AA84AAAAKAAAAA//BwAAAgAAAA85AAAAKQAAAA8ACAAAAgAAAA8wAAAAPQAAAA8BCAAAAgAAAA8nAAAA + PwAAAA8CCAAAAgAAAA+h////v////w8DCAAAAgAAAA9xAAAAUQAAAA8ECAAAAgAAAA93AAAAVwAAAA8F + CAAAAgAAAA9lAAAARQAAAA8GCAAAAgAAAA9yAAAAUgAAAA8HCAAAAgAAAA90AAAAVAAAAA8ICAAAAgAA + AA95AAAAWQAAAA8JCAAAAgAAAA91AAAAVQAAAA8KCAAAAgAAAA9pAAAASQAAAA8LCAAAAgAAAA9vAAAA + TwAAAA8MCAAAAgAAAA9wAAAAUAAAAA8NCAAAAgAAAA9gAAAAXgAAAA8OCAAAAgAAAA8rAAAAKgAAAA8P + CAAAAgAAAA9hAAAAQQAAAA8QCAAAAgAAAA9zAAAAUwAAAA8RCAAAAgAAAA9kAAAARAAAAA8SCAAAAgAA + AA9mAAAARgAAAA8TCAAAAgAAAA9nAAAARwAAAA8UCAAAAgAAAA9oAAAASAAAAA8VCAAAAgAAAA9qAA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FAAAAAPbwgAAAIAAAAP8P///9D///8PcAgAAAIAAAAPJwAAAD8A + AAAPcQgAAAIAAAAPYQAAAEEAAAAPcggAAAIAAAAPcwAAAFMAAAAPcwgAAAIAAAAPZAAAAEQAAAAPdAgA + AAIAAAAPZgAAAEYAAAAPdQgAAAIAAAAPZwAAAEcAAAAPdggAAAIAAAAPaAAAAEgAAAAPdwgAAAIAAAAP + agAAAEoAAAAPeAgAAAIAAAAPawAAAEsAAAAPeQgAAAIAAAAPbAAAAEwAAAAPeggAAAIAAAAP5v///8b/ + //8PewgAAAIAAAAPtP///8T///8PfAgAAAIAAAAPKwAAACoAAAAPfQgAAAIAAAAPegAAAFoAAAAPfggA + AAIAAAAPeAAAAFgAAAAPfwgAAAIAAAAPYwAAAEMAAAAPgAgAAAIAAAAPdgAAAFYAAAAPgQgAAAIAAAAP + YgAAAEIAAAAPgggAAAIAAAAPbgAAAE4AAAAPgwgAAAIAAAAPbQAAAE0AAAAPhAgAAAIAAAAPLAAAADsA + AAAPhQgAAAIAAAAPLgAAADoAAAAPhggAAAIAAAAP/v///97///8PhwgAAAIAAAAPPAAAAD4AAAAPiAgA + AAAAAAAPD4kIAAACAAAADzAAAACn////D4oIAAADAAAADzEAAAAnAAAAfgAAAA+LCAAAAwAAAA8yAAAA + IgAAALf///8PjAgAAAMAAAAPMwAAACsAAABeAAAAD40IAAADAAAADzQAAAAhAAAAov///w+OCAAABAAA + AA81AAAAJQAAADAAAACw////D48IAAADAAAADzYAAAAvAAAAsv///w+QCAAAAwAAAA83AAAAPQAAAGAA + AAAPkQgAAAMAAAAPOAAAACgAAAD/////D5IIAAADAAAADzkAAAApAAAAtP///w+TCAAAAwAAAA/2//// + 1v///73///8PlAgAAAMAAAAP/P///9z///+o////D5UIAAADAAAAD/P////T////uP///w+WCAAAAwAA + AA9xAAAAUQAAAFwAAAAPlwgAAAMAAAAPdwAAAFcAAAB8AAAAD5gIAAACAAAAD2UAAABFAAAAD5kIAAAC + AAAAD3IAAABSAAAAD5oIAAACAAAAD3QAAABUAAAAD5sIAAACAAAAD3oAAABaAAAAD5wIAAACAAAAD3UA + AABVAAAAD50IAAADAAAAD2kAAABJAAAAzf///w+eCAAAAwAAAA9vAAAATwAAAPj///8PnwgAAAIAAAAP + cAAAAFAAAAAPoAgAAAMAAAAP9f///9X////3////D6EIAAADAAAAD/r////a////1////w+iCAAAAgAA + AA9hAAAAQQAAAA+jCAAAAwAAAA9zAAAAUwAAAPD///8PpAgAAAMAAAAPZAAAAEQAAADQ////D6UIAAAD + AAAAD2YAAABGAAAAWwAAAA+mCAAAAwAAAA9nAAAARwAAAF0AAAAPpwgAAAIAAAAPaAAAAEgAAAAPqAgA + AAMAAAAPagAAAEoAAADt////D6kIAAADAAAAD2sAAABLAAAAs////w+qCAAAAwAAAA9sAAAATAAAAKP/ + //8PqwgAAAMAAAAP6f///8n///8kAAAAD6wIAAADAAAAD+H////B////3////w+tCAAAAwAAAA/7//// + 2////6T///8PrggAAAMAAAAPeQAAAFkAAAA+AAAAD68IAAADAAAAD3gAAABYAAAAIwAAAA+wCAAAAwAA + AA9jAAAAQwAAACYAAAAPsQgAAAMAAAAPdgAAAFYAAABAAAAAD7IIAAADAAAAD2IAAABCAAAAewAAAA+z + CAAAAwAAAA9uAAAATgAAAH0AAAAPtAgAAAIAAAAPbQAAAE0AAAAPtQgAAAMAAAAPLAAAAD8AAAA7AAAA + D7YIAAADAAAADy4AAAA6AAAAPgAAAA+3CAAAAwAAAA8tAAAAXwAAACoAAAAPuAgAAAMAAAAP7f///83/ + //88AAAAD7kIAAAAAAAADw+6CAAAAgAAAA9gAAAAfgAAAA+7CAAAAgAAAA8xAAAAIQAAAA+8CAAAAgAA + AA8yAAAAQAAAAA+9CAAAAgAAAA8zAAAAIwAAAA++CAAAAgAAAA80AAAAJAAAAA+/CAAAAgAAAA81AAAA + JQAAAA/ACAAAAgAAAA82AAAAXgAAAA/BCAAAAwAAAA83AAAAJgAAAKf///8PwggAAAIAAAAPOAAAACoA + AAAPwwgAAAIAAAAPOQAAACgAAAAPxAgAAAIAAAAPMAAAACkAAAAPxQgAAAIAAAAPLQAAAF8AAAAPxggA + AAIAAAAPPQAAACsAAAAPxwgAAAIAAAAPcQAAAFEAAAAPyAgAAAIAAAAPdwAAAFcAAAAPyQgAAAQAAAAP + ZQAAAEUAAADq////yv///w/KCAAAAgAAAA9yAAAAUgAAAA/LCAAAAgAAAA90AAAAVAAAAA/MCAAAAgAA + AA95AAAAWQAAAA/NCAAAAgAAAA91AAAAVQAAAA/OCAAAAgAAAA9pAAAASQAAAA/PCAAABAAAAA9vAAAA + TwAAAPP////T////D9AIAAACAAAAD3AAAABQAAAAD9EIAAACAAAAD1sAAAB7AAAAD9IIAAACAAAAD10A + AAB9AAAAD9MIAAAEAAAAD2EAAABBAAAAsf///6H///8P1AgAAAQAAAAPcwAAAFMAAAC2////pv///w/V + CAAAAgAAAA9kAAAARAAAAA/WCAAAAgAAAA9mAAAARgAAAA/XCAAAAgAAAA9nAAAARwAAAA/YCAAAAgAA + AA9oAAAASAAAAA/ZCAAAAgAAAA9qAAAASgAAAA/aCAAAAgAAAA9rAAAASwAAAA/bCAAABAAAAA9sAAAA + TAAAALP///+j////D9wIAAACAAAADzsAAAA6AAAAD90IAAACAAAADycAAAAiAAAAD94IAAACAAAAD1wA + AAB8AAAAD98IAAAEAAAAD3oAAABaAAAAv////6////8P4AgAAAQAAAAPeAAAAFgAAAC8////rP///w/h + CAAABAAAAA9jAAAAQwAAAOb////G////D+IIAAACAAAAD3YAAABWAAAAD+MIAAACAAAAD2IAAABCAAAA + D+QIAAAEAAAAD24AAABOAAAA8f///9H///8P5QgAAAIAAAAPbQAAAE0AAAAP5ggAAAIAAAAPLAAAADwA + AAAP5wgAAAIAAAAPLgAAAD4AAAAP6AgAAAIAAAAPLwAAAD8AAAAP6QgAAAMAAAAPPAAAAD4AAAB8AAAA + D+oIAAAAAAAADw/rCAAAAgAAAA+4////qP///w/sCAAAAgAAAA8xAAAAIQAAAA/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AAAgAAAA8tAAAAXwAAAA8aCQAAAgAAAA88AAAAPgAAAA8bCQAAAAAAAA8PHAkAAAIAAAAPYAAAAH4A + AAAPHQkAAAIAAAAPMQAAACEAAAAPHgkAAAIAAAAPMgAAACIAAAAPHwkAAAIAAAAPMwAAACMAAAAPIAkA + AAIAAAAPNAAAACQAAAAPIQkAAAIAAAAPNQAAACUAAAAPIgkAAAIAAAAPNgAAACYAAAAPIwkAAAIAAAAP + NwAAAC8AAAAPJAkAAAIAAAAPOAAAACgAAAAPJQkAAAIAAAAPOQAAACkAAAAPJgkAAAIAAAAPMAAAAD0A + AAAPJwkAAAIAAAAPJwAAAD8AAAAPKAkAAAIAAAAPKwAAACoAAAAPKQkAAAIAAAAPqf///7n///8PKgkA + AAIAAAAPqv///7r///8PKwkAAAIAAAAPxf///+X///8PLAkAAAIAAAAP0v////L///8PLQkAAAIAAAAP + 1P////T///8PLgkAAAIAAAAP2v////r///8PLwkAAAIAAAAP1f////X///8PMAkAAAIAAAAPyf///+n/ + //8PMQkAAAIAAAAPz////+////8PMgkAAAIAAAAP0P////D///8PMwkAAAIAAAAP2/////v///8PNAkA + AAIAAAAPWwAAAF0AAAAPNQkAAAIAAAAPwf///+H///8PNgkAAAIAAAAP0/////P///8PNwkAAAIAAAAP + xP///+T///8POAkAAAIAAAAPxv///+b///8POQkAAAIAAAAPx////+f///8POgkAAAIAAAAPyP///+j/ + //8POwkAAAIAAAAPqP///7j///8PPAkAAAIAAAAPy////+v///8PPQkAAAIAAAAPzP///+z///8PPgkA + AAIAAAAP3v////7///8PPwkAAAIAAAAPq////7v///8PQAkAAAIAAAAPLQAAAF8AAAAPQQkAAAIAAAAP + of///7H///8PQgkAAAIAAAAPr////7////8PQwkAAAIAAAAPw////+P///8PRAkAAAIAAAAP1/////f/ + //8PRQkAAAIAAAAPwv///+L///8PRgkAAAIAAAAPzv///+7///8PRwkAAAIAAAAPzf///+3///8PSAkA + AAIAAAAPLAAAADsAAAAPSQkAAAIAAAAPLgAAADoAAAAPSgkAAAIAAAAP1v////b///8PSwkAAAIAAAAP + PAAAAD4AAAAPTAkAAAAAAAAPD00JAAACAAAAD2AAAAB+AAAAD04JAAACAAAADzEAAAAhAAAAD08JAAAE + AAAADzIAAABAAAAAMgAAACIAAAAPUAkAAAIAAAAPMwAAACMAAAAPUQkAAAIAAAAPNAAAACQAAAAPUgkA + AAIAAAAPNQAAACUAAAAPUwkAAAQAAAAPNgAAAF4AAAA2AAAAJgAAAA9UCQAABAAAAA83AAAAJgAAADcA + AAAvAAAAD1UJAAAEAAAADzgAAAAqAAAAOAAAACgAAAAPVgkAAAQAAAAPOQAAACgAAAA5AAAAKQAAAA9X + CQAABAAAAA8wAAAAKQAAADAAAAA9AAAAD1gJAAAEAAAADy0AAABfAAAAJwAAAD8AAAAPWQkAAAQAAAAP + PQAAACsAAAArAAAAKgAAAA9aCQAABAAAAA9xAAAAUQAAAKn///+5////D1sJAAAEAAAAD3cAAABXAAAA + qv///7r///8PXAkAAAQAAAAPZQAAAEUAAADF////5f///w9dCQAABAAAAA9yAAAAUgAAANL////y//// + D14JAAAEAAAAD3QAAABUAAAA1P////T///8PXwkAAAQAAAAPeQAAAFkAAADa////+v///w9gCQAABAAA + AA91AAAAVQAAANX////1////D2EJAAAEAAAAD2kAAABJAAAAyf///+n///8PYgkAAAQAAAAPbwAAAE8A + AADP////7////w9jCQAABAAAAA9wAAAAUAAAAND////w////D2QJAAAEAAAAD1sAAAB7AAAA2/////v/ + //8PZQkAAAQAAAAPXQAAAH0AAABbAAAAXQAAAA9mCQAABAAAAA9hAAAAQQAAAMH////h////D2cJAAAE + AAAAD3MAAABTAAAA0/////P///8PaAkAAAQAAAAPZAAAAEQAAADE////5P///w9pCQAABAAAAA9mAAAA + RgAAAMb////m////D2oJAAAEAAAAD2cAAABHAAAAx////+f///8PawkAAAQAAAAPaAAAAEgAAADI//// + 6P///w9sCQAABAAAAA9qAAAASgAAAKj///+4////D20JAAAEAAAAD2sAAABLAAAAy////+v///8PbgkA + AAQAAAAPbAAAAEwAAADM////7P///w9vCQAABAAAAA87AAAAOgAAAN7////+////D3AJAAAEAAAADycA + AAAiAAAAq////7v///8PcQkAAAQAAAAPXAAAAHwAAAAtAAAAXwAAAA9yCQAABAAAAA96AAAAWgAAAKH/ + //+x////D3MJAAAEAAAAD3gAAABYAAAAr////7////8PdAkAAAQAAAAPYwAAAEMAAADD////4////w91 + CQAABAAAAA92AAAAVgAAANf////3////D3YJAAAEAAAAD2IAAABCAAAAwv///+L///8PdwkAAAQAAAAP + bgAAAE4AAADO////7v///w94CQAABAAAAA9tAAAATQAAAM3////t////D3kJAAAEAAAADywAAAA8AAAA + LAAAADsAAAAPegkAAAQAAAAPLgAAAD4AAAAuAAAAOgAAAA97CQAABAAAAA8vAAAAPwAAANb////2//// + D3wJAAACAAAADzwAAAA+AAAAD30JAAAAAAAADw9+CQAAAgAAAA+4////qP///w9/CQAAAgAAAA8xAAAA + IQAAAA+ACQAAAgAAAA8yAAAAIgAAAA+BCQAAAgAAAA8zAAAAIwAAAA+CCQAAAgAAAA80AAAAJAAAAA+D + CQAAAgAAAA81AAAAJQAAAA+ECQAAAgAAAA82AAAAJgAAAA+FCQAAAgAAAA83AAAALwAAAA+GCQAAAgAA + AA84AAAAKAAAAA+HCQAAAgAAAA85AAAAKQAAAA+ICQAAAgAAAA8wAAAAPQAAAA+JCQAAAgAAAA8nAAAA + PwAAAA+KCQAAAgAAAA8rAAAAKgAAAA+LCQAAAgAAAA9xAAAAUQAAAA+MCQAAAgAAAA93AAAAVwAAAA+N + CQAAAgAAAA9lAAAARQAAAA+OCQAAAgAAAA9yAAAAUgAAAA+PCQAAAgAAAA90AAAAVAAAAA+QCQAAAgAA + AA96AAAAWgAAAA+RCQAAAgAAAA91AAAAVQAAAA+SCQAAAgAAAA9pAAAASQAAAA+TCQAAAgAAAA9vAAAA + TwAAAA+UCQAAAgAAAA9wAAAAUAAAAA+VCQAAAgAAAA+5////qf///w+WCQAAAgAAAA/w////0P///w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kAAAIAAAAPaQAAAEkAAAAPxAkAAAIAAAAPbwAAAE8AAAAPxQkAAAIAAAAPcAAAAFAAAAAPxgkA + AAQAAAAPWwAAAHsAAAC5////qf///w/HCQAABAAAAA9dAAAAfQAAAPD////Q////D8gJAAACAAAAD2EA + AABBAAAAD8kJAAACAAAAD3MAAABTAAAAD8oJAAACAAAAD2QAAABEAAAAD8sJAAACAAAAD2YAAABGAAAA + D8wJAAACAAAAD2cAAABHAAAAD80JAAACAAAAD2gAAABIAAAAD84JAAACAAAAD2oAAABKAAAAD88JAAAC + AAAAD2sAAABLAAAAD9AJAAACAAAAD2wAAABMAAAAD9EJAAAEAAAADzsAAAA6AAAA6P///8j///8P0gkA + AAQAAAAPJwAAACIAAADm////xv///w/TCQAABAAAAA9cAAAAfAAAAL7///+u////D9QJAAACAAAAD3oA + AABaAAAAD9UJAAACAAAAD3gAAABYAAAAD9YJAAACAAAAD2MAAABDAAAAD9cJAAACAAAAD3YAAABWAAAA + D9gJAAACAAAAD2IAAABCAAAAD9kJAAACAAAAD24AAABOAAAAD9oJAAACAAAAD20AAABNAAAAD9sJAAAC + AAAADywAAAA8AAAAD9wJAAACAAAADy4AAAA+AAAAD90JAAACAAAADy8AAAA/AAAAD94JAAADAAAADzwA + AAA+AAAAfAAAAA/fCQAAAAAAAA8P4AkAAAIAAAAPMQAAACEAAAAP4QkAAAIAAAAPMgAAACIAAAAP4gkA + AAIAAAAPMwAAACMAAAAP4wkAAAIAAAAPNAAAACQAAAAP5AkAAAIAAAAPNQAAACUAAAAP5QkAAAIAAAAP + NgAAACYAAAAP5gkAAAIAAAAPNwAAACcAAAAP5wkAAAIAAAAPOAAAACgAAAAP6AkAAAIAAAAPOQAAACkA + AAAP6QkAAAIAAAAPMAAAAH4AAAAP6gkAAAIAAAAPLQAAAD0AAAAP6wkAAAIAAAAPXgAAAH4AAAAP7AkA + AAIAAAAPXAAAAHwAAAAP7QkAAAIAAAAPcQAAAFEAAAAP7gkAAAIAAAAPdwAAA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AACAAAAD+j///80AAAAD0cKAAAC + AAAAD7v///81AAAAD0gKAAACAAAAD77///82AAAAD0kKAAACAAAAD/3///83AAAAD0oKAAACAAAAD+H/ + //84AAAAD0sKAAACAAAAD+3///85AAAAD0wKAAACAAAAD+n///8wAAAAD00KAAACAAAADz0AAAAlAAAA + D04KAAACAAAADycAAAB2AAAAD08KAAACAAAAD3EAAABRAAAAD1AKAAACAAAAD3cAAABXAAAAD1EKAAAC + AAAAD2UAAABFAAAAD1IKAAACAAAAD3IAAABSAAAAD1MKAAACAAAAD3QAAABUAAAAD1QKAAACAAAAD3kA + AABZAAAAD1UKAAACAAAAD3UAAABVAAAAD1YKAAACAAAAD2kAAABJAAAAD1cKAAACAAAAD28AAABPAAAA + D1gKAAACAAAAD3AAAABQAAAAD1kKAAACAAAAD/r///8vAAAAD1oKAAACAAAAD+T///8oAAAAD1sKAAAC + AAAAD2EAAABBAAAAD1wKAAACAAAAD3MAAABTAAAAD10KAAACAAAAD2QAAABEAAAAD14KAAACAAAAD2YA + AABGAAAAD18KAAACAAAAD2cAAABHAAAAD2AKAAACAAAAD2gAAABIAAAAD2EKAAACAAAAD2oAAABKAAAA + D2IKAAACAAAAD2sAAABLAAAAD2MKAAACAAAAD2wAAABMAAAAD2QKAAACAAAAD/T///8iAAAAD2UKAAAC + AAAAD6f///8hAAAAD2YKAAACAAAAD/L///8pAAAAD2cKAAACAAAAD3oAAABaAAAAD2gKAAACAAAAD3gA + AABYAAAAD2kKAAACAAAAD2MAAABDAAAAD2oKAAACAAAAD3YAAABWAAAAD2sKAAACAAAAD2IAAABCAAAA + D2wKAAACAAAAD24AAABOAAAAD20KAAACAAAAD20AAABNAAAAD24KAAACAAAADywAAAA/AAAAD28KAAAC + AAAADy4AAAA6AAAAD3AKAAACAAAADy0AAABfAAAAD3EKAAACAAAADzwAAAA+AAAAD3IKAAAAAAAADw9z + CgAAAgAAAA9gAAAAfgAAAA90CgAAAgAAAA8xAAAAIQAAAA91CgAAAgAAAA8yAAAAQAAAAA92CgAAAgAA + AA8zAAAAIwAAAA93CgAAAgAAAA80AAAAJAAAAA94CgAAAgAAAA81AAAAJQAAAA95CgAAAgAAAA82AAAA + XgAAAA96CgAAAgAAAA83AAAAJgAAAA97CgAAAgAAAA84AAAAKgAAAA98CgAAAgAAAA85AAAAKAAAAA99 + CgAAAgAAAA8wAAAAKQAAAA9+CgAAAgAAAA8tAAAAXwAAAA9/CgAAAgAAAA89AAAAKwAAAA+ACgAABAAA + AA9xAAAAUQAAAOT////E////D4EKAAAEAAAAD3cAAABXAAAA7P///8z///8PggoAAAQAAAAPZQAAAEUA + AADp////yf///w+DCgAABAAAAA9yAAAAUgAAAPj////Y////D4QKAAAEAAAAD3QAAABUAAAAu////6v/ + //8PhQoAAAQAAAAPeQAAAFkAAAD9////3f///w+GCgAABAAAAA91AAAAVQAAAPn////Z////D4cKAAAE + AAAAD2kAAABJAAAA7f///83///8PiAoAAAQAAAAPbwAAAE8AAADz////0////w+JCgAABAAAAA9wAAAA + UAAAAPb////W////D4oKAAACAAAAD1sAAAB7AAAAD4sKAAACAAAAD10AAAB9AAAAD4wKAAAEAAAAD2EA + AABBAAAA4f///8H///8PjQoAAAQAAAAPcwAAAFMAAAC5////qf///w+OCgAABAAAAA9kAAAARAAAAO// + ///P////D48KAAAEAAAAD2YAAABGAAAA6////8v///8PkAoAAAQAAAAPZwAAAEcAAADg////wP///w+R + CgAABAAAAA9oAAAASAAAAPr////a////D5IKAAAEAAAAD2oAAABKAAAA/P///9z///8PkwoAAAQAAAAP + awAAAEsAAAD0////1P///w+UCgAABAAAAA9sAAAATAAAALX///+l////D5UKAAACAAAADzsAAAA6AAAA + D5YKAAACAAAADycAAAAiAAAAD5cKAAACAAAAD1wAAAB8AAAAD5gKAAAEAAAAD3oAAABaAAAAvv///67/ + //8PmQoAAAMAAAAPeAAAAFgAAACk////D5oKAAAEAAAAD2MAAABDAAAA6P///8j///8PmwoAAAQAAAAP + dgAAAFYAAADn////x////w+cCgAAAgAAAA9iAAAAQgAAAA+dCgAABAAAAA9uAAAATgAAAPL////S//// + D54KAAAEAAAAD20AAABNAAAA5f///8X///8PnwoAAAIAAAAPLAAAADwAAAAPoAoAAAIAAAAPLgAAAD4A + AAAPoQoAAAIAAAAPLwAAAD8AAAAPogoAAAIAAAAPPAAAAD4AAAAPowoAAAAAAAAPD6QKAAABAAAADzsA + AAAPpQoAAAIAAAAPKwAAADEAAAAPpgoAAAIAAAAP7P///zIAAAAPpwoAAAIAAAAPuf///zMAAAAPqAoA + AAIAAAAP6P///zQAAAAPqQoAAAIAAAAP+P///zUAAAAPqgoAAAIAAAAPvv///zYAAAAPqwoAAAIAAAAP + /f///zcAAAAPrAoAAAIAAAAP4f///zgAAAAPrQoAAAIAAAAP7f///zkAAAAPrgoAAAQAAAAP6f///zAA + AAC9////KQAAAA+vCgAAAgAAAA89AAAAJQAAAA+wCgAAAAAAAA8PsQoAAAMAAAAPcQAAAFEAAABcAAAA + D7IKAAADAAAAD3cAAABXAAAAfAAAAA+zCgAAAgAAAA9lAAAARQAAAA+0CgAAAgAAAA9yAAAAUgAAAA+1 + CgAAAgAAAA90AAAAVAAAAA+2CgAAAgAAAA95AAAAWQAAAA+3CgAAAgAAAA91AAAAVQAAAA+4CgAAAgAA + AA9pAAAASQAAAA+5CgAAAgAAAA9vAAAATwAAAA+6CgAAAgAAAA9wAAAAUAAAAA+7CgAABAAAAA/6//// + LwAAAFsAAAB7AAAAD7wKAAAEAAAADykAAAAoAAAAXQAAAH0AAAAPvQoAAAIAAAAPYQAAAEEAAAAPvgoA + AAMAAAAPcwAAAFMAAADw////D78KAAADAAAAD2QAAABEAAAA0P///w/ACgAAAwAAAA9mAAAARgAAAFsA + AAAPwQoAAAMAAAAPZwAAAEcAAABdAAAAD8IKAAACAAAAD2gAAABIAAAAD8MKAAACAAAAD2oAAABKAAAA + D8QKAAADAAAAD2sAAABLAAAAs////w/FCgAAAwAAAA9sAAAATAAAAKP///8PxgoAAAMAAAAP+f///yIA + AAAkAAAAD8cKAAADAAAAD6f///8hAAAA3////w/ICgAAAgAAAA+o////JwAAAA/JCgAAAwAAAA96AAAA + WgAAAD4AAAAPygoAAAMAAAAPeAAAAFgAAAAjAAAAD8sKAAADAAAAD2MAAABDAAAAJgAAAA/MCgAAAwAA + AA92AAAAVgAAAEAAAAAPzQoAAAMAAAAPYgAAAEIAAAB7AAAAD84KAAADAAAAD24AAABOAAAAfQAAAA/P + CgAAAgAAAA9tAAAATQAAAA/QCgAAAwAAAA8sAAAAPwAAADwAAAAP0QoAAAMAAAAPLgAAADoAAAA+AAAA + D9IKAAADAAAADy0AAABfAAAAKgAAAA/TCgAABAAAAA88AAAAPgAAAFwAAAB8AAAAD9QKAAAAAAAADw/V + CgAAAQAAAA87AAAAD9YKAAACAAAADysAAAAxAAAAD9cKAAACAAAAD+z///8yAAAAD9gKAAACAAAAD7n/ + //8zAAAAD9kKAAACAAAAD+j///80AAAAD9oKAAACAAAAD/j///81AAAAD9sKAAACAAAAD77///82AAAA + D9wKAAACAAAAD/3///83AAAAD90KAAACAAAAD+H///84AAAAD94KAAACAAAAD+3///85AAAAD98KAAAC + AAAAD+n///8wAAAAD+AKAAACAAAADz0AAAAlAAAAD+EKAAACAAAAD7T///+3////D+IKAAACAAAAD3EA + AABRAAAAD+MKAAACAAAAD3cAAABXAAAAD+QKAAACAAAAD2UAAABFAAAAD+UKAAACAAAAD3IAAABSAAAA + D+YKAAACAAAAD3QAAABUAAAAD+cKAAACAAAAD3oAAABaAAAAD+gKAAACAAAAD3UAAABVAAAAD+kKAAAC + AAAAD2kAAABJAAAAD+oKAAACAAAAD28AAABPAAAAD+sKAAACAAAAD3AAAABQAAAAD+wKAAACAAAAD/r/ + //8vAAAAD+0KAAACAAAADykAAAAoAAAAD+4KAAACAAAAD2EAAABBAAAAD+8KAAACAAAAD3MAAABTAAAA + D/AKAAACAAAAD2QAAABEAAAAD/EKAAACAAAAD2YAAABGAAAAD/IKAAACAAAAD2cAAABHAAAAD/MKAAAC + AAAAD2gAAABIAAAAD/QKAAACAAAAD2oAAABKAAAAD/UKAAACAAAAD2sAAABLAAAAD/YKAAACAAAAD2wA + AABMAAAAD/cKAAACAAAAD/n///8iAAAAD/gKAAACAAAAD6f///8hAAAAD/kKAAACAAAAD6j///8nAAAA + D/oKAAACAAAAD3kAAABZAAAAD/sKAAACAAAAD3gAAABYAAAAD/wKAAACAAAAD2MAAABDAAAAD/0KAAAC + AAAAD3YAAABWAAAAD/4KAAACAAAAD2IAAABCAAAAD/8KAAACAAAAD24AAABOAAAADwALAAACAAAAD20A + AABNAAAADwELAAACAAAADywAAAA/AAAADwILAAACAAAADy4AAAA6AAAADwMLAAACAAAADy0AAABfAAAA + DwQLAAABAAAAD1wAAAAPBQsAAAAAAAAPDwYLAAABAAAADzsAAAAPBwsAAAIAAAAPKwAAADEAAAAPCAsA + AAIAAAAP7P///zIAAAAPCQsAAAIAAAAPuf///zMAAAAPCgsAAAIAAAAP6P///zQAAAAPCwsAAAIAAAAP + +P///zUAAAAPDAsAAAIAAAAPvv///zYAAAAPDQsAAAIAAAAP/f///zcAAAAPDgsAAAIAAAAP4f///zgA + AAAPDwsAAAIAAAAP7f///zkAAAAPEAsAAAIAAAAP6f///zAAAAAPEQsAAAIAAAAPPQAAACUAAAAPEgsA + AAIAAAAPtP///7f///8PEwsAAAIAAAAPcQAAAFEAAAAPFAsAAAIAAAAPdwAAAFcAAAAPFQsAAAIAAAAP + ZQAAAEUAAAAPFgsAAAIAAAAPcgAAAFIAAAAPFwsAAAIAAAAPdAAAAFQAAAAPGAsAAAIAAAAPeQAAAFkA + AAAPGQsAAAIAAAAPdQAAAFUAAAAPGgsAAAIAAAAPaQAAAEkAAAAPGwsAAAIAAAAPbwAAAE8AAAAPHAsA + AAIAAAAPcAAAAFAAAAAPHQsAAAIAAAAP+v///y8AAAAPHgsAAAIAAAAPKQAAACgAAAAPHwsAAAIAAAAP + YQAAAEEAAAAPIAsAAAIAAAAPcwAAAFMAAAAPIQsAAAIA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D04LAAACAAAAD7T/ + //+o////D08LAAACAAAADysAAAAqAAAAD1ALAAACAAAAD2EAAABBAAAAD1ELAAACAAAAD3MAAABTAAAA + D1ILAAACAAAAD2QAAABEAAAAD1MLAAACAAAAD2YAAABGAAAAD1QLAAACAAAAD2cAAABHAAAAD1ULAAAC + AAAAD2gAAABIAAAAD1YLAAACAAAAD2oAAABKAAAAD1cLAAACAAAAD2sAAABLAAAAD1gLAAACAAAAD2wA + AABMAAAAD1kLAAACAAAAD/H////R////D1oLAAADAAAAD3sAAABbAAAAXgAAAA9bCwAAAgAAAA99AAAA + XQAAAA9cCwAAAgAAAA96AAAAWgAAAA9dCwAAAgAAAA94AAAAWAAAAA9eCwAAAgAAAA9jAAAAQwAAAA9f + CwAAAgAAAA92AAAAVgAAAA9gCwAAAgAAAA9iAAAAQgAAAA9hCwAAAgAAAA9uAAAATgAAAA9iCwAAAgAA + AA9tAAAATQAAAA9jCwAAAgAAAA8sAAAAOwAAAA9kCwAAAgAAAA8uAAAAOgAAAA9lCwAAAgAAAA8tAAAA + XwAAAA9mCwAAAgAAAA88AAAAPgAAAA9nCwAAAAAAAA8PaAsAAAIAAAAPYAAAAH4AAAAPaQsAAAIAAAAP + 4P///8D///8PagsAAAIAAAAP6P///8j///8PawsAAAIAAAAP5v///8b///8PbAsAAAIAAAAP6////8v/ + //8PbQsAAAIAAAAP4f///8H///8PbgsAAAIAAAAP8P///9D///8PbwsAAAIAAAAP+P///9j///8PcAsA + AAIAAAAP+////9v///8PcQsAAAIAAAAPpf///ygAAAAPcgsAAAIAAAAPtP///ykAAAAPcwsAAAIAAAAP + LQAAAF8AAAAPdAsAAAIAAAAP/v///97///8PdQsAAAIAAAAPXAAAAHwAAAAPdgsAAAIAAAAPcQAAAFEA + AAAPdwsAAAIAAAAPdwAAAFcAAAAPeAsAAAIAAAAPZQAAAEUAAAAPeQsAAAIAAAAPcgAAAFIAAAAPegsA + AAIAAAAPdAAAAFQAAAAPewsAAAIAAAAPeQAAAFkA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AAA7AAAADy0MAAACAAAADzEAAAAhAAAA + Dy4MAAACAAAADzIAAABAAAAADy8MAAACAAAADzMAAAAjAAAADzAMAAACAAAADzQAAAAkAAAADzEMAAAC + AAAADzUAAAAlAAAADzIMAAACAAAADzYAAABeAAAADzMMAAACAAAADzcAAAAmAAAADzQMAAACAAAADzgA + AAAqAAAADzUMAAACAAAADzkAAAAoAAAADzYMAAACAAAADzAAAAApAAAADzcMAAACAAAADy0AAABfAAAA + DzgMAAACAAAADz0AAAArAAAADzkMAAADAAAAD3EAAABRAAAALwAAAA86DAAAAwAAAA93AAAAVwAAACcA + AAAPOwwAAAMAAAAPZQAAAEUAAAD3////DzwMAAADAAAAD3IAAABSAAAA+P///w89DAAAAwAAAA90AAAA + VAAAAOD///8PPgwAAAMAAAAPeQAAAFkAAADo////Dz8MAAADAAAAD3UAAABVAAAA5f///w9ADAAAAwAA + AA9pAAAASQAAAO////8PQQwAAAMAAAAPbwAAAE8AAADt////D0IMAAADAAAAD3AAAABQAAAA9P///w9D + DAAAAgAAAA9bAAAAewAAAA9EDAAAAgAAAA9dAAAAfQAAAA9FDAAAAwAAAA9hAAAAQQAAAPn///8PRgwA + AAMAAAAPcwAAAFMAAADj////D0cMAAADAAAAD2QAAABEAAAA4v///w9IDAAAAwAAAA9mAAAARgAAAOv/ + //8PSQwAAAMAAAAPZwAAAEcAAADy////D0oMAAADAAAAD2gAAABIAAAA6f///w9LDAAAAwAAAA9qAAAA + SgAAAOf///8PTAwAAAMAAAAPawAAAEsAAADs////D00MAAADAAAAD2wAAABMAAAA6v///w9ODAAAAwAA + AA87AAAAOgAAAPP///8PTwwAAAMAAAAPJwAAACIAAAAsAAAAD1AMAAACAAAAD1wAAAB8AAAAD1EMAAAD + AAAAD3oAAABaAAAA5v///w9SDAAAAwAAAA94AAAAWAAAAPH///8PUwwAAAMAAAAPYwAAAEMAAADh//// + D1QMAAADAAAAD3YAAABWAAAA5P///w9VDAAAAwAAAA9iAAAAQgAAAPD///8PVgwAAAMAAAAPbgAAAE4A + AADu////D1cMAAADAAAAD20AAABNAAAA9v///w9YDAAAAwAAAA8sAAAAPAAAAPr///8PWQwAAAMAAAAP + LgAAAD4AAAD1////D1oMAAADAAAADy8AAAA/AAAALgAAAA9bDAAAAgAAAA88AAAAPgAAAA9cDAAAAAAA + AA8PXQwAAAIAAAAPYAAAAH4AAAAPXgwAAAIAAAAPMQAAACEAAAAPXwwAAAIAAAAPMgAAAEAAAAAPYAwA + AAIAAAAPMwAAACMAAAAPYQwAAAIAAAAPNAAAACQAAAAPYgwAAAIAAAAPNQAAACUAAAAPYwwAAAIAAAAP + NgAAAF4AAAAPZAwAAAIAAAAPNwAAACYAAAAPZQwAAAIAAAAPOAAAACoAAAAPZgwAAAIAAAAPOQAAACgA + AAAPZwwAAAIAAAAPMAAAACkAAAAPaAwAAAIAAAAPLQAAAF8AAAAPaQwAAAIAAAAPPQAAACsAAAAPagwA + AAMAAAAPcQAAAFEAAAD3////D2sMAAADAAAAD3cAAABXAAAA5f///w9sDAAAAwAAAA9lAAAARQAAAOD/ + //8PbQwAAAMAAAAPcgAAAFIAAAD4////D24MAAADAAAAD3QAAABUAAAA+v///w9vDAAAAwAAAA95AAAA + WQAAAPL///8PcAwAAAMAAAAPdQAAAFUAAADl////D3EMAAADAAAAD2kAAABJAAAA6f///w9yDAAAAwAA + AA9vAAAATwAAAPH///8PcwwAAAMAAAAPcAAAAFAAAAD0////D3QMAAACAAAAD1sAAAB7AAAAD3UMAAAC + AAAAD10AAAB9AAAAD3YMAAADAAAAD2EAAABBAAAA4P///w93DAAAAwAAAA9zAAAAUwAAAPn///8PeAwA + AAMAAAAPZAAAAEQAAADj////D3kMAAADAAAAD2YAAABGAAAA9P///w96DAAAAwAAAA9nAAAARwAAAOL/ + //8PewwAAAMAAAAPaAAAAEgAAADk////D3wMAAADAAAAD2oAAABKAAAA6f///w99DAAAAwAAAA9rAAAA + SwAAAOv///8PfgwAAAMAAAAPbAAAAEwAAADs////D38MAAACAAAAD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9yAAAAUgAAAPH////R////DwENAAAEAAAAD3QAAABUAAAA9P///9T///8PAg0AAAQAAAAPeQAAAFkA + AAD1////1f///w8DDQAABAAAAA91AAAAVQAAAOj////I////DwQNAAAEAAAAD2kAAABJAAAA6f///8n/ + //8PBQ0AAAQAAAAPbwAAAE8AAADv////z////w8GDQAABAAAAA9wAAAAUAAAAPD////Q////DwcNAAAC + AAAAD1sAAAB7AAAADwgNAAACAAAAD10AAAB9AAAADwkNAAAEAAAAD2EAAABBAAAA4f///8H///8PCg0A + AAIAAAAPcwAAAFMAAAAPCw0AAAQAAAAPZAAAAEQAAADk////xP///w8MDQAABAAAAA9mAAAARgAAAPb/ + ///W////Dw0NAAAEAAAAD2cAAABHAAAA4////8P///8PDg0AAAQAAAAPaAAAAEgAAADn////x////w8P + DQAABAAAAA9qAAAASgAAAO7////O////DxANAAAEAAAAD2sAAABLAAAA6v///8r///8PEQ0AAAQAAAAP + bAAAAEwAAADr////y////w8SDQAABAAAAA87AAAAOgAAALT///+o////DxMNAAACAAAADycAAAAiAAAA + DxQNAAACAAAAD1wAAAB8AAAADxUNAAAEAAAAD3oAAABaAAAA5v///8b///8PFg0AAAQAAAAPeAAAAFgA + AAD3////1////w8XDQAABAAAAA9jAAAAQwAAAPj////Y////DxgNAAAEAAAAD3YAAABWAAAA+f///9n/ + //8PGQ0AAAQAAAAPYgAAAEIAAADi////wv///w8aDQAABAAAAA9uAAAATgAAAO3////N////DxsNAAAE + AAAAD20AAABNAAAA7P///8z///8PHA0AAAIAAAAPLAAAADwAAAAPHQ0AAAIAAAAPLgAAAD4AAAAPHg0A + AAIAAAAPLwAAAD8AAAAPHw0AAAIAAAAPPAAAAD4AAAAPIA0AAAAAAAAPDyENAAAEAAAAD2AAAAB+AAAA + XwAAACUAAAAPIg0AAAQAAAAPMQAAACEAAADl////KwAAAA8jDQAABAAAAA8yAAAAQAAAAC8AAADx//// + DyQNAAAEAAAADzMAAAAjAAAALQAAAPL///8PJQ0AAAQAAAAPNAAAACQAAADA////8////w8mDQAABAAA + AA81AAAAJQAAALb////0////DycNAAAEAAAADzYAAABeAAAA2P///9n///8PKA0AAAQAAAAPNwAAACYA + AADW////3////w8pDQAABAAAAA84AAAAKgAAAKT////1////DyoNAAAEAAAADzkAAAAoAAAAtf////b/ + //8PKw0AAAQAAAAPMAAAACkAAACo////9////w8sDQAABAAAAA8tAAAAXwAAAKL////4////Dy0NAAAE + AAAADz0AAAArAAAAqv////n///8PLg0AAAQAAAAPcQAAAFEAAADm////8P///w8vDQAABAAAAA93AAAA + VwAAAOT///8iAAAADzANAAAEAAAAD2UAAABFAAAA0////67///8PMQ0AAAQAAAAPcgAAAFIAAAC+//// + sf///w8yDQAABAAAAA90AAAAVAAAAND///+4////DzMNAAAEAAAAD3kAAABZAAAA0f///+3///8PNA0A + AAQAAAAPdQAAAFUAAADV////6v///w81DQAABAAAAA9pAAAASQAAAMP///+z////DzYNAAAEAAAAD28A + AABPAAAAuf///8////8PNw0AAAQAAAAPcAAAAFAAAADC////rf///w84DQAABAAAAA9bAAAAewAAALr/ + //+w////DzkNAAAEAAAAD10AAAB9AAAAxf///ywAAAAPOg0AAAQAAAAPYQAAAEEAAAC/////xP///w87 + DQAABAAAAA9zAAAAUwAAAMv///+m////DzwNAAAEAAAAD2QAAABEAAAAof///6////8PPQ0AAAQAAAAP + ZgAAAEYAAAC0////4v///w8+DQAABAAAAA9nAAAARwAAAOD///+s////Dz8NAAAEAAAAD2gAAABIAAAA + 6f///+f///8PQA0AAAQAAAAPagAAAEoAAADo////6////w9BDQAABAAAAA9rAAAASwAAANL////J//// + D0INAAAEAAAAD2wAAABMAAAAyv///8j///8PQw0AAAQAAAAPOwAAADoAAADH////q////w9EDQAABAAA + AA8nAAAAIgAAAKf///8uAAAAD0UNAAAEAAAAD1wAAAB8AAAAo////6X///8PRg0AAAQAAAAPegAAAFoA + AAC8////KAAAAA9HDQAABAAAAA94AAAAWAAAALv///8pAAAAD0gNAAAEAAAAD2MAAABDAAAA4f///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AAPcw0AAAIAAAAPbAAAAEwAAAAPdA0AAAIAAAAPKwAAALH///8PdQ0AAAIAAAAP + JwAAAGAAAAAPdg0AAAIAAAAPPAAAAD4AAAAPdw0AAAIAAAAPegAAAFoAAAAPeA0AAAIAAAAPeAAAAFgA + AAAPeQ0AAAIAAAAPYwAAAEMAAAAPeg0AAAIAAAAPdgAAAFYAAAAPew0AAAIAAAAPYgAAAEIAAAAPfA0A + AAIAAAAPbgAAAE4AAAAPfQ0AAAIAAAAPbQAAAE0AAAAPfg0AAAIAAAAPLAAAADsAAAAPfw0AAAIAAAAP + LgAAADoAAAAPgA0AAAIAAAAPLQAAAD0AAAAPgQ0AAAIAAAAPWwAAAF0AAAAPgg0AAAAAAAAPCw== + + + + + AAEAAAD/////AQAAAAAAAAAHAQAAAAEBAAAABQAAAAcHCQIAAAAJAwAAAAkEAAAACQUAAAAJBgAAAA8C + AAAAMAAAAAcpAAIAAwAEAAUABgAHAAgACQAKAAsADAANABAAEQASABMAFAAVABYAFwAYABkAGgAbAB4A + HwAgACEAIgAjACQAJQAmACcAKAArACwALQAuAC8AMAAxADIAMwA0ADUAVgAPAwAAADAAAAAHKQACAAMA + BAAFAAYABwAIAAkACgALABoAGwAoADMANAAZABUAIQAiAC4AEwAmADUADQAeABgAEgAWABcAIAAjABQA + MQAfAAwAKwAnABAAJAAlAC0AMAAyABEALwAsAFYADwQAAAAyAAAABykAAgADAAQABQAGAAcACAAJAAoA + CwAMAA0AEAARABIAEwAUABUAFgAXABgAGQAaABsAHgAfACAAIQAiACMAJAAlACYAJwAoACsAXgAsAC0A + LgAvADAAMQAyADMANAA1AFYANQAPBQAAADAAAAAHAgADAAQABQAGAAcACAAJAAoACwAMAA0AKQAQABEA + EgATABQAFQAWABcAGAAZABoAGwAeAB8AIAAhACIAIwAkACUAJgAnACgAKwAsAC0ALgAvADAAMQAyADMA + NAA1AFYADwYAAAAwAAAABwIAAwAEAAUABgAHAAgACQAKAAsADAANABoAGwAnACgAKQAzADQANQArAB4A + MAAuACAAEgAhACIAIwAXACQAJQAmADIAMQAYABkAEAATAB8AFAAWAC8AEQAtABUALABWAAs= + + + + + AAEAAAD/////AQAAAAAAAAAHAQAAAAEBAAAACQAAAAcICQIAAAAJAwAAAAkEAAAACQUAAAAJBgAAAAkH + AAAACQgAAAAJCQAAAAkKAAAADwIAAAAwAAAACMAAAAAxAAAAMgAAADMAAAA0AAAANQAAADYAAAA3AAAA + OAAAADkAAAAwAAAAvQAAALsAAABRAAAAVwAAAEUAAABSAAAAVAAAAFkAAABVAAAASQAAAE8AAABQAAAA + 2wAAAN0AAABBAAAAUwAAAEQAAABGAAAARwAAAEgAAABKAAAASwAAAEwAAAC6AAAA3gAAANwAAABaAAAA + WAAAAEMAAABWAAAAQgAAAE4AAABNAAAAvAAAAL4AAAC/AAAA4gAAAA8DAAAAMAAAAAjAAAAAMQAAADIA + AAAzAAAANAAAADUAAAA2AAAANwAAADgAAAA5AAAAMAAAAL0AAAC7AAAAUQAAAFcAAABFAAAAUgAAAFQA + AABaAAAAVQAAAEkAAABPAAAAUAAAANsAAADdAAAAQQAAAFMAAABEAAAARgAAAEcAAABIAAAASgAAAEsA + AABMAAAAugAAAN4AAADcAAAAWQAAAFgAAABDAAAAVgAAAEIAAABOAAAATQAAALwAAAC+AAAAvwAAAOIA + AAAPBAAAADAAAAAIwAAAADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADAAAADbAAAA + 3QAAAN4AAAC8AAAAvgAAAFAAAABZAAAARgAAAEcAAABDAAAAUgAAAEwAAAC/AAAAuwAAAEEAAABPAAAA + RQAAAFUAAABJAAAARAAAAEgAAABUAAAATgAAAFMAAAC9AAAA3AAAALoAAABRAAAASgAAAEsAAABYAAAA + QgAAAE0AAABXAAAAVgAAAFoAAADiAAAADwUAAAAwAAAACN4AAAAxAAAAMgAAADMAAAA0AAAANQAAADYA + AAA3AAAAOAAAADkAAAAwAAAA2wAAALsAAABBAAAAWgAAAEUAAABSAAAAVAAAAFkAAABVAAAASQAAAE8A + AABQAAAA3QAAALoAAABRAAAAUwAAAEQAAABGAAAARwAAAEgAAABKAAAASwAAAEwAAABNAAAAwAAAANwA + AABXAAAAWAAAAEMAAABWAAAAQgAAAE4AAAC8AAAAvgAAAL8AAADfAAAA4gAAAA8GAAAAMAAAAAjeAAAA + MQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAAAA5AAAAMAAAANsAAAC7AAAAQQAAAFoAAABFAAAA + UgAAAFQAAABZAAAAVQAAAEkAAABPAAAAUAAAAN0AAAC6AAAAUQAAAFMAAABEAAAARgAAAEcAAABIAAAA + SgAAAEsAAABMAAAATQAAAMAAAADcAAAAVwAAAFgAAABDAAAAVgAAAEIAAABOAAAAvAAAAL4AAAC/AAAA + 3wAAAOIAAAAPBwAAADAAAAAI3gAAADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADAA + AADbAAAAuwAAAEEAAABaAAAARQAAAFIAAABUAAAAWQAAAFUAAABJAAAATwAAAFAAAADdAAAAugAAAFEA + AABTAAAARAAAAEYAAABHAAAASAAAAEoAAABLAAAATAAAAE0AAADAAAAA3AAAAFcAAABYAAAAQwAAAFYA + AABCAAAATgAAALwAAAC+AAAAvwAAAN8AAADiAAAADwgAAAAxAAAACN4AAAAxAAAAMgAAADMAAAA0AAAA + NQAAADYAAAA3AAAAOAAAADkAAAAwAAAAvQAAALsAAABRAAAAVwAAAEUAAABSAAAAVAAAAFkAAABVAAAA + SQAAAE8AAABQAAAAwAAAANsAAABBAAAAUwAAAEQAAABGAAAARwAAAEgAAABKAAAASwAAAEwAAADfAAAA + 4gAAAN0AAABaAAAAWAAAAEMAAABWAAAAQgAAAE4AAABNAAAAvAAAAL4AAAC6AAAAvwAAANwAAAAPCQAA + ADUAAAAI3gAAADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADAAAADbAAAAuwAAAEEA + AABaAAAARQAAAFIAAABUAAAAWQAAAFUAAABJAAAATwAAAFAAAADdAAAAugAAAFEAAABTAAAARAAAAEYA + AABHAAAASAAAAEoAAABLAAAATAAAAE0AAADAAAAA3AAAAFcAAABYAAAAQwAAAFYAAABCAAAATgAAALwA + AAC+AAAAvwAAAN8AAADwAAAA4gAAAPIAAADzAAAA9AAAAPUAAAAPCgAAADAAAAAIMQAAADIAAAAzAAAA + NAAAADUAAAA2AAAANwAAADgAAAA5AAAAMAAAAL0AAAC7AAAA2wAAAN0AAAC6AAAA3gAAAMAAAAC8AAAA + vgAAAL8AAADcAAAAQQAAAEIAAABDAAAARAAAAEUAAABGAAAARwAAAEgAAABJAAAASgAAAEsAAABMAAAA + TQAAAE4AAABPAAAAUAAAAFEAAABSAAAAUwAAAFQAAABVAAAAVgAAAFcAAABYAAAAWQAAAFoAAADiAAAA + Cw== + + + \ No newline at end of file diff --git a/mcs/class/Managed.Windows.Forms/resx.resx b/mcs/class/Managed.Windows.Forms/resx.resx deleted file mode 100644 index 11d642e4b60..00000000000 --- a/mcs/class/Managed.Windows.Forms/resx.resx +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -text/microsoft-resx1.3System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089AAEAAAD/////AQAAAAAAAAAMAgAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtc190ZXN0X25ldF8yXzAFAQAAACdNb25vVGVzdHMuU3lzdGVtLlJlc291cmNlcy5zZXJpYWxpemFibGUCAAAAB3Nlcm5hbWUIc2VydmFsdWUBAQIAAAAGAwAAAAVhYWFhYQYEAAAABWJiYmJiCw==comment \ No newline at end of file diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs index ec538abc29f..b5e2e809ae4 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs @@ -182,7 +182,7 @@ ConditionExpression ParseFactorExpression () e = new ConditionFactorExpression (token); } else if (token.Type == TokenType.Item || token.Type == TokenType.Property || token.Type == TokenType.Metadata) { - e = ParseReferenceExpression (token.Value); + e = ParseReferenceExpression (token.Value [0]); } else if (token.Type == TokenType.Not) { e = ParseNotExpression (); } else @@ -224,21 +224,33 @@ ConditionExpression ParseFunctionExpression (string function_name) } //@prefix: @ or $ - ConditionExpression ParseReferenceExpression (string prefix) + ConditionExpression ParseReferenceExpression (char prefix) { - StringBuilder sb = new StringBuilder (); - - string ref_type = prefix [0] == '$' ? "a property" : "an item list"; int token_pos = tokenizer.Token.Position; + string ref_type = prefix == '$' ? "a property" : "an item list"; IsAtToken (TokenType.LeftParen, String.Format ( "Expected {0} at position {1} in condition \"{2}\". Missing opening parantheses after the '{3}'.", ref_type, token_pos, conditionStr, prefix)); - tokenizer.GetNextToken (); + + if (prefix == '$') { + // + // Tjhe scan should consider quoted parenthesis but it breaks on .net as well + // we are bug compatible + // + tokenizer.ScanForClosingParens (); + } else { + tokenizer.GetNextToken (); + } + + if (tokenizer.IsEOF ()) + throw new ExpressionParseException ("Missing closing parenthesis in condition " + conditionStr); + + StringBuilder sb = new StringBuilder (); sb.AppendFormat ("{0}({1}", prefix, tokenizer.Token.Value); tokenizer.GetNextToken (); - if (prefix == "@" && tokenizer.Token.Type == TokenType.Transform) { + if (prefix == '@' && tokenizer.Token.Type == TokenType.Transform) { tokenizer.GetNextToken (); sb.AppendFormat ("->'{0}'", tokenizer.Token.Value); @@ -250,9 +262,7 @@ ConditionExpression ParseReferenceExpression (string prefix) } } - IsAtToken (TokenType.RightParen, String.Format ( - "Expected {0} at position {1} in condition \"{2}\". Missing closing parantheses'.", - ref_type, token_pos, conditionStr, prefix)); + IsAtToken (TokenType.RightParen, "Missing closing parenthesis in condition " + conditionStr); tokenizer.GetNextToken (); sb.Append (")"); diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs index 29a4aba628a..d9ee74475d6 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs @@ -257,6 +257,29 @@ public void GetNextToken () } else throw new ExpressionParseException (String.Format ("Invalid token: {0}", ch)); } + + public void ScanForClosingParens (int parensCounter = 1) + { + tokenPosition = position; + int start = position; + int ch; + while ((ch = ReadChar ()) >= 0) { + switch (ch) { + case ')': + if (--parensCounter == 0) { + --position; + token = new Token (inputString.Substring (start, position - start), TokenType.String, tokenPosition); + return; + } + break; + case '(': + ++parensCounter; + break; + } + } + + token = new Token (null, TokenType.EOF, tokenPosition); + } public int TokenPosition { get { return tokenPosition; } diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Expression.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Expression.cs index 1e0fda2fdd8..ccfc0fa3a0e 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Expression.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Expression.cs @@ -55,6 +55,14 @@ namespace Microsoft.Build.BuildEngine { internal class Expression { + enum TokenKind + { + OpenParens, + CloseParens, + Dot, + End + } + ExpressionCollection expressionCollection; static Regex item_regex; @@ -232,6 +240,7 @@ static List ExtractProperties (string text) pos += 2; int start = pos; int end = 0; + bool requires_closing_parens = true; var ch = text [pos]; if ((ch == 'r' || ch == 'R') && text.Substring (pos + 1).StartsWith ("egistry:", StringComparison.OrdinalIgnoreCase)) { @@ -273,6 +282,7 @@ static List ExtractProperties (string text) // Simple property reference $(Foo) // phase.Add (new PropertyReference (name)); + requires_closing_parens = false; } else { end = 0; } @@ -287,6 +297,14 @@ static List ExtractProperties (string text) pos = end; } + + if (requires_closing_parens) { + end = text.IndexOf (')', pos); + if (end < 0) + end = 0; + else + pos = end + 1; + } } end = text.IndexOf ("$(", pos, StringComparison.Ordinal); @@ -493,53 +511,71 @@ static List ParseArguments (string text, ref int pos) static MemberInvocationReference ParseInvocation (string text, ref int p, Type type, IReference instance) { - var open_parens = text.IndexOf ('(', p); - string name; - int end; - List args; + TokenKind token; + MemberInvocationReference mir = null; + + while (true) { + int prev = p; + token = ScanName (text, ref p); + var name = text.Substring (prev, p - prev).TrimEnd (); + + switch (token) { + case TokenKind.Dot: + case TokenKind.OpenParens: + break; + case TokenKind.CloseParens: + return new MemberInvocationReference (type, name) { + Instance = instance + }; + + case TokenKind.End: + if (mir == null || name.Length != 0) + throw new InvalidProjectFileException (string.Format ("Invalid static method invocation syntax '{0}'", text.Substring (p))); + + return mir; + default: + throw new NotImplementedException (); + } - // - // Is it method or property - // - if (open_parens > 0) { - name = text.Substring (p, open_parens - p); - - // - // It can be instance method on static property - // - if (name.IndexOf ('.') > 0) { - var names = name.Split ('.'); - int i; - for (i = 0; i < names.Length - 1; ++i) { - instance = new MemberInvocationReference (type, names [i]) { - Instance = instance - }; - } + instance = mir = new MemberInvocationReference (type, name) { + Instance = instance + }; + + if (type != null) { + if (!IsMethodAllowed (type, name)) + throw new InvalidProjectFileException (string.Format ("The function '{0}' on type '{1}' has not been enabled for execution", name, type.FullName)); type = null; - name = names [i]; } - ++open_parens; - args = ParseArguments (text, ref open_parens); - end = text.IndexOf (')', open_parens); - } else { - end = text.IndexOf (')', p); - if (end < 0) - throw new InvalidProjectFileException (string.Format ("Invalid static method invocation syntax '{0}'", text.Substring (p))); - name = text.Substring (p, end - p); - args = null; + if (token == TokenKind.OpenParens) { + ++p; + mir.Arguments = ParseArguments (text, ref p); + } + + if (p < text.Length && text [p] == '.') { + ++p; + continue; + } + + return mir; } + } - name = name.TrimEnd (); - if (!IsMethodAllowed (type, name)) - throw new InvalidProjectFileException (string.Format ("The function '{0}' on type '{1}' has not been enabled for execution", name, type.FullName)); + static TokenKind ScanName (string text, ref int p) + { + for (; p < text.Length; ++p) { + switch (text [p]) { + case '(': + return TokenKind.OpenParens; + case '.': + return TokenKind.Dot; + case ')': + return TokenKind.CloseParens; + } + } - p = end + 1; - return new MemberInvocationReference (type, name) { - Arguments = args, - Instance = instance - }; + return TokenKind.End; } ArrayList SplitMetadata (string text) diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs index 351aea02087..b4d996faa9c 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs @@ -274,7 +274,11 @@ static IEnumerable GetExtensionPaths (Project project) continue; if (!Directory.Exists (extn_path)) { - project.ParentEngine.LogMessage (MessageImportance.Low, "Extension path '{0}' not found, ignoring.", extn_path); + if (extn_path != DotConfigExtensionsPath) + project.ParentEngine.LogMessage ( + MessageImportance.Low, + "Extension path '{0}' not found, ignoring.", + extn_path); continue; } diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/MemberInvocationReference.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/MemberInvocationReference.cs index ada57788f2a..6430992fba9 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/MemberInvocationReference.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/MemberInvocationReference.cs @@ -63,10 +63,16 @@ object Invoke (Project project, ExpressionOptions options) { var flags = BindingFlags.IgnoreCase | BindingFlags.Public; object target; + string member_name = name; if (Instance == null) { target = null; - flags |= BindingFlags.Static; + if (string.Equals (member_name, "new", StringComparison.OrdinalIgnoreCase)) { + member_name = ConstructorInfo.ConstructorName; + flags |= BindingFlags.CreateInstance | BindingFlags.Instance; + } else { + flags |= BindingFlags.Static; + } } else { var mir = Instance as MemberInvocationReference; if (mir != null) { @@ -91,14 +97,14 @@ object Invoke (Project project, ExpressionOptions options) } else { flags |= BindingFlags.InvokeMethod; ExpandArguments (project, options); - args = PrepareMethodArguments (flags); + args = PrepareMethodArguments (member_name, flags); if (args == null) throw new InvalidProjectFileException (string.Format ("Method '{0}({1})' arguments cannot be evaluated'", name, string.Join (", ", Arguments.ToArray ()))); } object value; try { - value = type.InvokeMember (name, flags, null, target, args, CultureInfo.InvariantCulture); + value = type.InvokeMember (member_name, flags, null, target, args, CultureInfo.InvariantCulture); } catch (MissingFieldException) { // // It can be field/constant instead of a property @@ -106,7 +112,7 @@ object Invoke (Project project, ExpressionOptions options) if (args == null && Instance == null) { flags &= ~BindingFlags.GetProperty; flags |= BindingFlags.GetField; - value = type.InvokeMember (name, flags, null, null, null, CultureInfo.InvariantCulture); + value = type.InvokeMember (member_name, flags, null, null, null, CultureInfo.InvariantCulture); } else { throw; } @@ -132,9 +138,9 @@ void ExpandArguments (Project project, ExpressionOptions options) } } - object[] PrepareMethodArguments (BindingFlags flags) + object[] PrepareMethodArguments (string name, BindingFlags flags) { - var candidates = type.GetMember (name, MemberTypes.Method, flags); + var candidates = type.GetMember (name, MemberTypes.Method | MemberTypes.Constructor, flags); object[] args = null; ParameterInfo[] best = null; foreach (MethodBase candidate in candidates) { diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_0.sln b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_0.sln deleted file mode 100644 index 6f9b584447d..00000000000 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_0.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine-net_4_0", "Microsoft.Build.Engine-net_4_0.csproj", "{155AEF28-C81F-405D-9072-9D52780E3E70}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine-tests-net_4_0", "Microsoft.Build.Engine-tests-net_4_0.csproj", "{155AEF28-C81F-405D-9072-9D52780E3E71}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {155AEF28-C81F-405D-9072-9D52780E3E70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {155AEF28-C81F-405D-9072-9D52780E3E71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {155AEF28-C81F-405D-9072-9D52780E3E70}.Debug|Any CPU.Build.0 = Debug|Any CPU - {155AEF28-C81F-405D-9072-9D52780E3E71}.Debug|Any CPU.Build.0 = Debug|Any CPU - {155AEF28-C81F-405D-9072-9D52780E3E70}.Release|Any CPU.ActiveCfg = Release|Any CPU - {155AEF28-C81F-405D-9072-9D52780E3E71}.Release|Any CPU.ActiveCfg = Release|Any CPU - {155AEF28-C81F-405D-9072-9D52780E3E70}.Release|Any CPU.Build.0 = Release|Any CPU - {155AEF28-C81F-405D-9072-9D52780E3E71}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = Microsoft.Build.Engine-net_4_0.csproj - EndGlobalSection -EndGlobal diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.csproj b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.csproj deleted file mode 100644 index 8ce515a3c75..00000000000 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.csproj +++ /dev/null @@ -1,106 +0,0 @@ - - - Library - Microsoft.Build.Engine.Test - Microsoft.Build.Engine.Test - Debug - AnyCPU - {A2F451CD-8701-434A-A562-EF1809E2DB7D} - - - .\ - False - DEBUG;TRACE - True - Full - True - true - - - false - - - .\ - False - DEBUG;TRACE - True - Full - True - true - - - false - - - bin\Release\ - True - TRACE - False - None - False - true - - - false - - - - - - - - - False - ..\..\nunit24\NUnitCore\core\bin\Debug2005\nunit.core.dll - - - False - ..\..\nunit24\NUnitFramework\framework\bin\Debug2005\nunit.framework.dll - - - - - - - - {49CC9B64-E28A-4818-97F9-301E14B383B9} - Microsoft.Build.Engine - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe /r:Microsoft.Build.Framework.dll /r:Microsoft.Build.Utilities.dll /target:library /out:$(ProjectDir)Test\resources\TestTasks.dll $(ProjectDir)Test\resources\TestTasks.cs - - \ No newline at end of file diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.sln b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.sln deleted file mode 100644 index c6101a2c43c..00000000000 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.sln +++ /dev/null @@ -1,16 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# SharpDevelop 2.0.0.1135 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine.Test", "Microsoft.Build.Engine.Test.csproj", "{A2F451CD-8701-434A-A562-EF1809E2DB7D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Release|Any CPU.Build.0 = Release|Any CPU - {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Release|Any CPU.ActiveCfg = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.csproj b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.csproj deleted file mode 100644 index 3b9be7cdedd..00000000000 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.csproj +++ /dev/null @@ -1,115 +0,0 @@ - - - Library - Microsoft.Build.Engine - Microsoft.Build.Engine - Debug - AnyCPU - {49CC9B64-E28A-4818-97F9-301E14B383B9} - - - .\ - False - TRACE;DEBUG;NET_2_0 - True - Full - True - true - - - false - - - bin\Release\ - True - TRACE;NET_2_0 - False - None - False - true - - - false - - - true - bin\DebugMS\ - TRACE;DEBUG;NET_2_0 - true - Full - AnyCPU - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mdp b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mdp deleted file mode 100644 index 0cc9acef0f4..00000000000 --- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mdp +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mds b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mds deleted file mode 100644 index bc65d10979c..00000000000 --- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mds +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs b/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs index 51c3da6cfbf..c3c8dacabc5 100644 --- a/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs +++ b/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs @@ -357,6 +357,24 @@ public void TestCondition12 () Assert.IsNull (proj.EvaluatedProperties ["A"], "A1"); } + [Test] + public void TestCondition_References () + { + Engine engine = new Engine (Consts.BinPath); + Project proj = engine.CreateNewProject (); + + string documentString = @" + + + valid + + + "; + + proj.LoadXml (documentString); + + Assert.AreEqual ("valid", proj.GetEvaluatedProperty ("A"), "#1"); + } [Test] public void TestHasTrailingSlash1 () diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs b/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs index ee93c4b932d..3a07eb289fb 100755 --- a/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs +++ b/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs @@ -1402,6 +1402,8 @@ public void TestItemsInTarget9 () } [Test] + // Fails on wrench + [Category ("NotWorking")] public void TestItemsWithWildcards () { Engine engine = new Engine (Consts.BinPath); @@ -1476,6 +1478,8 @@ public void TestItemsWithWildcards () } [Test] + // Fails on wrench + [Category ("NotWorking")] public void TestReservedMetadata () { Engine engine = new Engine (Consts.BinPath); diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/Properties.cs b/mcs/class/Microsoft.Build.Engine/Test/various/Properties.cs index fba19683c18..795a7123066 100644 --- a/mcs/class/Microsoft.Build.Engine/Test/various/Properties.cs +++ b/mcs/class/Microsoft.Build.Engine/Test/various/Properties.cs @@ -160,6 +160,37 @@ public void InstanceMethodOnStaticProperty () Assert.AreEqual (DateTime.Now.ToString ("yyyy.MM.dd"), proj.GetEvaluatedProperty ("Prop1"), "#1"); } + [Test] + public void InstanceMemberOnStaticProperty () + { + string documentString = @" + + + $([System.DateTime]::Now.Year) + + + "; + + proj.LoadXml (documentString); + Assert.AreEqual (DateTime.Now.Year.ToString (), proj.GetEvaluatedProperty ("Prop1"), "#1"); + } + + [Test] + public void InstanceMembersOnStaticMethod () + { + string documentString = @" + + + $([System.String]::Concat('a', 'bb', 'c').Length.GetHashCode ()) + + + + "; + + proj.LoadXml (documentString); + Assert.AreEqual (4.GetHashCode ().ToString (), proj.GetEvaluatedProperty ("Prop1"), "#1"); + } + [Test] public void MSBuildPropertyFunctions () { @@ -175,6 +206,23 @@ public void MSBuildPropertyFunctions () proj.LoadXml (documentString); Assert.AreEqual ("6.6", proj.GetEvaluatedProperty ("Prop1"), "#1"); - } + } + + [Test] + public void Constructor () + { + string documentString = @" + + + 0.6 + 6 + $([System.String]::new('value').EndsWith ('ue')) + + + "; + + proj.LoadXml (documentString); + Assert.AreEqual ("True", proj.GetEvaluatedProperty ("Prop1"), "#1"); + } } } diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs index c50ddf774c0..1a8fac12b7c 100644 --- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs +++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs @@ -328,8 +328,13 @@ public void AppendSwitchUnquotedIfNotNull (string switchName, } } } - - protected void AppendTextUnquoted (string textToAppend) + +#if NET_4_0 + public +#else + protected +#endif + void AppendTextUnquoted (string textToAppend) { commandLine.Append (textToAppend); } diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs index 7717a1f9ee0..f3aa310c09b 100644 --- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs +++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs @@ -190,9 +190,9 @@ static string GetPathToStandardLibrariesWith (string xbuildFxDir, string targetFrameworkProfile) { var path = Path.Combine (xbuildFxDir, targetFrameworkIdentifier); - if (targetFrameworkVersion != null) { + if (!string.IsNullOrEmpty (targetFrameworkVersion)) { path = Path.Combine (path, targetFrameworkVersion); - if (targetFrameworkProfile != null) + if (!string.IsNullOrEmpty (targetFrameworkProfile)) path = Path.Combine (path, "Profile", targetFrameworkProfile); } if (!Directory.Exists (path)) @@ -200,7 +200,6 @@ static string GetPathToStandardLibrariesWith (string xbuildFxDir, var flist = Path.Combine (path, "RedistList", "FrameworkList.xml"); if (!File.Exists (flist)) return null; - var xml = XmlReader.Create (flist); xml.MoveToContent (); var targetFxDir = xml.GetAttribute ("TargetFrameworkDirectory"); diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources index b1a3758e980..4e2248a2d48 100644 --- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources +++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources @@ -2,4 +2,5 @@ Microsoft.Build.Utilities/CommandLineBuilderTest.cs Microsoft.Build.Utilities/LoggerTest.cs Microsoft.Build.Utilities/TaskItemTest.cs Microsoft.Build.Utilities/TaskLoggingHelperTest.cs +Microsoft.Build.Utilities/ToolLocationHelperTest.cs Microsoft.Build.Utilities/ToolTaskTest.cs diff --git a/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolLocationHelperTest.cs b/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolLocationHelperTest.cs new file mode 100644 index 00000000000..fbb567d2827 --- /dev/null +++ b/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolLocationHelperTest.cs @@ -0,0 +1,21 @@ +#if NET_4_0 +using System; +using NUnit.Framework; +using Microsoft.Build.Utilities; + +namespace MonoTests.Microsoft.Build.Utilities +{ + [TestFixture] + public class ToolLocationHelperTest + { + [Test] + [Category ("NotWorking")] // this test needs extra xbuild testing settings, as the target framework path is different. + public void GetPathToStandardLibraries () + { + Assert.IsTrue (!string.IsNullOrEmpty (ToolLocationHelper.GetPathToStandardLibraries (".NETFramework", "v4.0", null)), "std path"); + Assert.IsTrue (!string.IsNullOrEmpty (ToolLocationHelper.GetPathToStandardLibraries (".NETFramework", "v4.0", string.Empty)), "empty Profile path"); + } + } +} + +#endif diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectRootElement.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectRootElement.cs index d7d5d77249b..c9bcf5cdda4 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectRootElement.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectRootElement.cs @@ -533,6 +533,8 @@ internal override ProjectElement LoadChildElement (XmlReader reader) var item = CreateItemGroupElement (); AppendChild (item); return item; + case "ImportGroup": + return AddImportGroup (); case "Import": return AddImport (null); case "Target": diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs index 4c776657334..4170fa00253 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs @@ -494,6 +494,11 @@ IEnumerable GetReservedProperties (Toolset toolset, ProjectRootElement pro }); yield return create ("MSBuildToolsPath", () => toolset.ToolsPath); yield return create ("MSBuildToolsVersion", () => toolset.ToolsVersion); + + // This is an implementation specific special property for this Microsoft.Build.dll to differentiate + // the build from Microsoft.Build.Engine.dll. It is significantly used in some *.targets file we share + // between old and new build engine. + yield return create ("MonoUseMicrosoftBuildDll", () => "True"); } // These are required for reserved property, represents dynamically changing property values. diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs index cb6badde216..00d9802134c 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs @@ -164,7 +164,7 @@ void InitializeProperties (ProjectRootElement xml) // FIXME: this is kind of workaround for unavoidable issue that PLATFORM=* is actually given // on some platforms and that prevents setting default "PLATFORM=AnyCPU" property. if (!string.Equals ("PLATFORM", (string) p.Key, StringComparison.OrdinalIgnoreCase)) - this.properties [(string) p.Key] = new ProjectPropertyInstance ((string) p.Key, false, (string) p.Value); + this.properties [(string) p.Key] = new ProjectPropertyInstance ((string) p.Key, true, (string) p.Value); foreach (var p in global_properties) this.properties [p.Key] = new ProjectPropertyInstance (p.Key, false, p.Value); var tools = projects.GetToolset (tools_version) ?? projects.GetToolset (projects.DefaultToolsVersion); @@ -256,7 +256,7 @@ internal IEnumerable GetAllItems (string include, string exclude, Func elements) { - foreach (var child in elements) { + foreach (var child in elements.Reverse ()) { var ige = child as ProjectItemGroupElement; if (ige != null) { foreach (var p in ige.Items) { @@ -435,6 +435,7 @@ public bool Build (string[] targets, IEnumerable loggers, IEnumerable p.Name).Select (p => string.Format ("{0} = {1}", p.Name, p.EvaluatedValue)).ToArray ()); - LogMessageEvent (new BuildMessageEventArgs (initialPropertiesFormatted, null, null, MessageImportance.Low)); + var initialGlobalPropertiesFormatted = "Initial Global Properties:\n" + string.Join (Environment.NewLine, project.Properties.OrderBy (p => p.Name).Where (p => p.IsImmutable).Select (p => string.Format ("{0} = {1}", p.Name, p.EvaluatedValue)).ToArray ()); + LogMessageEvent (new BuildMessageEventArgs (initialGlobalPropertiesFormatted, null, null, MessageImportance.Low)); + var initialProjectPropertiesFormatted = "Initial Project Properties:\n" + string.Join (Environment.NewLine, project.Properties.OrderBy (p => p.Name).Where (p => !p.IsImmutable).Select (p => string.Format ("{0} = {1}", p.Name, p.EvaluatedValue)).ToArray ()); + LogMessageEvent (new BuildMessageEventArgs (initialProjectPropertiesFormatted, null, null, MessageImportance.Low)); var initialItemsFormatted = "Initial Items:\n" + string.Join (Environment.NewLine, project.Items.OrderBy (i => i.ItemType).Select (i => string.Format ("{0} : {1}", i.ItemType, i.EvaluatedInclude)).ToArray ()); LogMessageEvent (new BuildMessageEventArgs (initialItemsFormatted, null, null, MessageImportance.Low)); // null targets -> success. empty targets -> success(!) + foreach (var targetName in (request.ProjectInstance.InitialTargets).Where (t => t != null)) + BuildTargetByName (targetName, args); if (request.TargetNames == null) - args.Result.OverallResult = BuildResultCode.Success; + args.Result.OverallResult = args.CheckCancel () ? BuildResultCode.Failure : args.Result.ResultsByTarget.Any (p => p.Value.ResultCode == TargetResultCode.Failure) ? BuildResultCode.Failure : BuildResultCode.Success; else { - foreach (var targetName in (args.TargetNames ?? request.TargetNames).Where (t => t != null)) - BuildTargetByName (targetName, args); + foreach (var targetName in (args.TargetNames ?? request.TargetNames).Where (t => t != null)) { + if (!BuildTargetByName (targetName, args)) + break; + } // FIXME: check .NET behavior, whether cancellation always results in failure. args.Result.OverallResult = args.CheckCancel () ? BuildResultCode.Failure : args.Result.ResultsByTarget.Any (p => p.Value.ResultCode == TargetResultCode.Failure) ? BuildResultCode.Failure : BuildResultCode.Success; @@ -253,6 +260,7 @@ bool DoBuildTarget (ProjectTargetInstance target, TargetResult targetResult, Int var value = args.Project.ExpandString (p.Value); project.SetProperty (p.Name, value); } + continue; } var ii = child as ProjectItemGroupTaskInstance; @@ -264,6 +272,7 @@ bool DoBuildTarget (ProjectTargetInstance target, TargetResult targetResult, Int continue; project.AddItem (item.ItemType, project.ExpandString (item.Include)); } + continue; } var task = child as ProjectTaskInstance; @@ -275,7 +284,14 @@ bool DoBuildTarget (ProjectTargetInstance target, TargetResult targetResult, Int } if (!RunBuildTask (target, task, targetResult, args)) return false; + continue; } + + var onError = child as ProjectOnErrorInstance; + if (onError != null) + continue; // evaluated under catch clause. + + throw new NotSupportedException (string.Format ("Unexpected Target element children \"{0}\"", child.GetType ())); } } catch (Exception ex) { // fallback task specified by OnError element @@ -452,7 +468,7 @@ public string GetMetadataValueEscaped (string metadataName) } public void SetMetadataValueLiteral (string metadataName, string metadataValue) { - metadata [metadataName] = ProjectCollection.Unescape (metadataValue); + metadata [metadataName] = WindowsCompatibilityExtensions.NormalizeFilePath (ProjectCollection.Unescape (metadataValue)); } public IDictionary CloneCustomMetadataEscaped () { @@ -490,7 +506,7 @@ public void RemoveMetadata (string metadataName) } public void SetMetadata (string metadataName, string metadataValue) { - metadata [metadataName] = metadataValue; + metadata [metadataName] = WindowsCompatibilityExtensions.NormalizeFilePath (metadataValue); } public string ItemSpec { get; set; } public int MetadataCount { @@ -574,13 +590,16 @@ public void Yield () // To NOT reuse this IBuildEngine instance for different build, we create another BuildManager and BuildSubmisson and then run it. public bool BuildProjectFile (string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs, string toolsVersion) { + toolsVersion = string.IsNullOrEmpty (toolsVersion) ? project.ToolsVersion : toolsVersion; var globalPropertiesThatMakeSense = new Dictionary (); foreach (DictionaryEntry p in globalProperties) globalPropertiesThatMakeSense [(string) p.Key] = (string) p.Value; - var result = new BuildManager ().Build (this.submission.BuildManager.OngoingBuildParameters.Clone (), new BuildRequestData (projectFileName, globalPropertiesThatMakeSense, toolsVersion, targetNames, null)); - foreach (var p in result.ResultsByTarget) - targetOutputs [p.Key] = p.Value.Items; - return result.OverallResult == BuildResultCode.Success; + var projectToBuild = new ProjectInstance (ProjectRootElement.Create (XmlReader.Create (projectFileName)), globalPropertiesThatMakeSense, toolsVersion, Projects); + IDictionary outs; + var ret = projectToBuild.Build (targetNames ?? new string [] {"Build"}, Projects.Loggers, out outs); + foreach (var p in outs) + targetOutputs [p.Key] = p.Value.Items ?? new ITaskItem [0]; + return ret; } public bool BuildProjectFilesInParallel (string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IDictionary[] targetOutputsPerProject, string[] toolsVersion, bool useResultsCache, bool unloadProjectsOnCompletion) diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionConstructs.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionConstructs.cs index 587db749621..6cd0b1670e2 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionConstructs.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionConstructs.cs @@ -212,6 +212,16 @@ public string ExpressionString { get { return string.Format ("%([{0}].[{1}])", ItemType, Metadata); } } } + + partial class QuotedExpression : Expression + { + public char QuoteChar { get; set; } + public ExpressionList Contents { get; set; } + + public override string ExpressionString { + get { return QuoteChar + string.Concat (Contents.Select (e => e.ExpressionString)).Replace (QuoteChar.ToString (), "\\" + QuoteChar) + QuoteChar; } + } + } partial class StringLiteral : Expression { diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionEvaluator.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionEvaluator.cs index 696447c8842..7fbd1cf5542 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionEvaluator.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionEvaluator.cs @@ -346,12 +346,12 @@ object DoEvaluateAsObject (EvaluationContext context) var args = Access.Arguments.Select (e => e.EvaluateAsObject (context)).ToArray (); var method = FindMethod (type, Access.Name.Name, args); if (method == null) - throw new InvalidProjectFileException (Location, string.Format ("access to undefined static method '{0}' of '{1}' at {2}", Access.Name.Name, Access.Target.EvaluateAsString (context), Location)); + throw new InvalidProjectFileException (Location, string.Format ("access to undefined static method '{0}' of '{1}' at {2}", Access.Name.Name, type, Location)); return method.Invoke (null, AdjustArgsForCall (method, args)); } else { var prop = type.GetProperty (Access.Name.Name); if (prop == null) - throw new InvalidProjectFileException (Location, string.Format ("access to undefined static property '{0}' of '{1}' at {2}", Access.Name.Name, Access.Target.EvaluateAsString (context), Location)); + throw new InvalidProjectFileException (Location, string.Format ("access to undefined static property '{0}' of '{1}' at {2}", Access.Name.Name, type, Location)); return prop.GetValue (null, null); } } @@ -491,6 +491,30 @@ public override object EvaluateAsObject (EvaluationContext context) return EvaluateAsString (context); } } + + partial class QuotedExpression : Expression + { + public override string EvaluateAsString (EvaluationContext context) + { + return QuoteChar + EvaluateAsStringWithoutQuote (context) + QuoteChar; + } + + public string EvaluateAsStringWithoutQuote (EvaluationContext context) + { + return string.Concat (Contents.Select (e => e.EvaluateAsString (context))); + } + + public override bool EvaluateAsBoolean (EvaluationContext context) + { + var ret = EvaluateAsStringWithoutQuote (context); + return EvaluateStringAsBoolean (context, ret); + } + + public override object EvaluateAsObject (EvaluationContext context) + { + return EvaluateAsStringWithoutQuote (context); + } + } partial class FunctionCallExpression : Expression { diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionParserManual.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionParserManual.cs index a8c7dc4d61d..73bac64445e 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionParserManual.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionParserManual.cs @@ -60,14 +60,13 @@ ExpressionList Parse (int start, int end) while (start < end) { int bak = start; ret.Add (ParseSingle (ref start, end)); - SkipSpaces (ref start); if (bak == start) throw new Exception ("Parser failed to progress token position: " + source); } return ret; } - static readonly char [] token_starters = "$@%(),".ToCharArray (); + static readonly char [] token_starters = "$@%(),'\"".ToCharArray (); Expression ParseSingle (ref int start, int end) { @@ -101,7 +100,23 @@ Expression ParseSingle (ref int start, int end) ret = EvaluateItemExpression (start, last); start = last + 1; return ret; - + + case '\'': + case '"': + var quoteChar = source [start]; + start++; + last = FindMatchingCloseQuote (quoteChar, start, end); + if (last < 0) { + if (validation_type == ExpressionValidationType.StrictBoolean) + throw new InvalidProjectFileException (string.Format ("expression did not have matching ')' since index {0} in \"{1}\"", start, source)); + else { + start--; + goto default; // treat as raw literal to the section end + } + } + ret = new QuotedExpression () { QuoteChar = quoteChar, Contents = Parse (start, last) }; + start = last + 1; + return ret; // Below (until default) are important only for Condition evaluation case '(': if (validation_type == ExpressionValidationType.LaxString) @@ -134,7 +149,7 @@ Expression ParseSingle (ref int start, int end) return ret; } } - + int FindMatchingCloseParen (int start, int end) { int n = 0; @@ -148,7 +163,21 @@ int FindMatchingCloseParen (int start, int end) } return -1; // invalid } - + + int FindMatchingCloseQuote (char quote, int start, int end) + { + int n = 0; + for (int i = start; i < end; i++) { + if (i < end + 1 && source [i] == '\\' && (source [i + 1] == quote || source [i + 1] == '\\')) + n += 2; + else if (source [i] == quote) { + if (n-- == 0) + return i; + } + } + return -1; // invalid + } + static readonly string spaces = " \t\r\n"; void SkipSpaces (ref int start) @@ -166,6 +195,7 @@ PropertyAccessExpression EvaluatePropertyExpression (int start, int end) // property access without member specification int parenAt = source.IndexOf ('(', start, end - start); string name = parenAt < 0 ? source.Substring (start, end - start) : source.Substring (start, parenAt - start); + name = name.Trim (); var access = new PropertyAccess () { Name = new NameToken () { Name = name }, TargetType = PropertyTargetType.Object @@ -181,6 +211,7 @@ PropertyAccessExpression EvaluatePropertyExpression (int start, int end) int mstart = dotAt + 1; int parenAt = source.IndexOf ('(', mstart, end - mstart); string name = parenAt < 0 ? source.Substring (mstart, end - mstart) : source.Substring (mstart, parenAt - mstart); + name = name.Trim (); var access = new PropertyAccess () { Name = new NameToken () { Name = name }, TargetType = PropertyTargetType.Object, @@ -196,10 +227,11 @@ PropertyAccessExpression EvaluatePropertyExpression (int start, int end) string type = source.Substring (start, colonsAt - start); if (type.Length < 2 || type [0] != '[' || type [type.Length - 1] != ']') throw new InvalidProjectFileException (string.Format ("Static function call misses appropriate type name surrounded by '[' and ']' at {0} in \"{1}\"", start, source)); - type = type.Substring (1, type.Length - 2); + type = type.Substring (1, type.Length - 2).Trim (); start = colonsAt + 2; int parenAt = source.IndexOf ('(', start, end - start); string member = parenAt < 0 ? source.Substring (start, end - start) : source.Substring (start, parenAt - start); + member = member.Trim (); if (member.Length == 0) throw new InvalidProjectFileException ("Static member name is missing"); var access = new PropertyAccess () { @@ -228,6 +260,7 @@ ExpressionList ParseFunctionArguments (ref int start, int end) if (source [start] != ',') throw new InvalidProjectFileException (string.Format ("invalid function call arguments specification. ',' is expected, got '{0}'", source [start])); start++; + SkipSpaces (ref start); } args.Add (ParseSingle (ref start, end)); } while (true); diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs index 700a41663d3..2430ecce09e 100644 --- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs +++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs @@ -40,6 +40,10 @@ namespace MonoTests.Microsoft.Build.Evaluation public class ProjectCollectionTest { [Test] +#if NET_4_0 + // BXC #20961 + [Category ("NotWorking")] +#endif public void GlobalProperties () { var g = ProjectCollection.GlobalProjectCollection; diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs index ed81f8155d2..f5f880a0b5f 100644 --- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs +++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs @@ -173,6 +173,10 @@ public void ProperiesMustBeDistinct () } [Test] +#if NET_4_0 + // BXC #20961 + [Category ("NotWorking")] +#endif public void BuildCSharpTargetBuild () { string project_xml = @" @@ -254,6 +258,10 @@ public void DirtyMarking2 () } [Test] +#if NET_4_0 + // BXC #20961 + [Category ("NotWorking")] +#endif public void CreateProjectInstance () { string project_xml = @" @@ -270,6 +278,10 @@ public void CreateProjectInstance () } [Test] +#if NET_4_0 + // BXC #20961 + [Category ("NotWorking")] +#endif public void LoadCaseInsensitive () { string project_xml = @" diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs index 44157a84444..30524ffd278 100644 --- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs +++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs @@ -291,6 +291,56 @@ public void Choose () Assert.IsNotNull (p, "#1"); Assert.AreEqual ("False", p.EvaluatedValue, "#2"); } + + [Test] + public void ConditionalExpression () + { + string project_xml = @" + + true + $(ResolveAssemblyReferencesDependsOn);_AddCorlibReference + +"; + var xml = XmlReader.Create (new StringReader (project_xml)); + var root = ProjectRootElement.Create (xml); + root.FullPath = "ProjectInstanceTest.ConditionalExpression.proj"; + var proj = new ProjectInstance (root); + var p = proj.GetProperty ("ResolveAssemblyReferencesDependsOn"); + Assert.IsNotNull (p, "#1"); + Assert.AreEqual (";_AddCorlibReference", p.EvaluatedValue, "#2"); + } + + [Test] + [Category ("NotWorking")] // until we figure out why it fails on wrench. + public void ItemsInTargets () + { + string project_xml = @" + + + <_ExplicitMSCorlibPath>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries ('$(TargetFrameworkIdentifier)', '$(TargetFrameworkVersion)', '$(TargetFrameworkProfile)'))\mscorlib.dll + + + <_ExplicitReference + Include='$(_ExplicitMSCorlibPath)' + Condition='Exists($(_ExplicitMSCorlibPath))'> + false + + + + +"; + var xml = XmlReader.Create (new StringReader (project_xml)); + var root = ProjectRootElement.Create (xml); + root.FullPath = "ProjectInstanceTest.ConditionalExpression.proj"; + var proj = new ProjectInstance (root, null, "4.0", ProjectCollection.GlobalProjectCollection); + proj.Build (); + // make sure the property value expansion is done successfully. + Assert.IsTrue (!string.IsNullOrEmpty (proj.GetPropertyValue ("_ExplicitMSCorlibPath")), "premise: propertyValue by ToolLocationHelper func call"); + var items = proj.GetItems ("_ExplicitReference"); + // make sure items are stored after build. + Assert.IsTrue (items.Any (), "items.Any"); + Assert.IsTrue (!string.IsNullOrEmpty (items.First ().EvaluatedInclude), "item.EvaluatedInclude"); + } } namespace SubNamespace diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Internal/ExpressionParserTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Internal/ExpressionParserTest.cs index ebd662e249f..16694f76225 100644 --- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Internal/ExpressionParserTest.cs +++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Internal/ExpressionParserTest.cs @@ -335,6 +335,22 @@ public void MultipleBinaryCondition () var result = p.Build (new ILogger [] { new ConsoleLogger (LoggerVerbosity.Minimal, sw.WriteLine, null, null)}); Assert.IsTrue (result, "#1: " + sw); } + + [Test] + public void FunctionCall () + { + string project_xml = @" + + + +"; + var xml = XmlReader.Create (new StringReader (project_xml)); + var root = ProjectRootElement.Create (xml); + var p = new ProjectInstance (root, null, "4.0", ProjectCollection.GlobalProjectCollection); + var sw = new StringWriter (); + var result = p.Build (new ILogger [] { new ConsoleLogger (LoggerVerbosity.Minimal, sw.WriteLine, null, null)}); + Assert.IsTrue (result, "#1: " + sw); + } } } diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs index 1eff46c1ec1..57cb86cd8b0 100644 --- a/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs +++ b/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs @@ -161,10 +161,10 @@ public Operator Operator { } } - [Obsolete ("Use SetSourceRGBA method")] + [Obsolete ("Use SetSourceColor method")] public Color Color { set { - NativeMethods.cairo_set_source_rgba (handle, value.R, value.G, value.B, value.A); + SetSourceColor (value); } } @@ -280,6 +280,12 @@ public PointD CurrentPoint { } } + public bool HasCurrentPoint { + get { + return NativeMethods.cairo_has_current_point (handle); + } + } + [Obsolete ("Use GetTarget/SetTarget")] public Cairo.Surface Target { set { @@ -331,6 +337,11 @@ public uint ReferenceCount { get { return NativeMethods.cairo_get_reference_count (handle); } } + public void SetSourceColor (Color color) + { + NativeMethods.cairo_set_source_rgba (handle, color.R, color.G, color.B, color.A); + } + public void SetSourceRGB (double r, double g, double b) { NativeMethods.cairo_set_source_rgb (handle, r, g, b); @@ -548,6 +559,11 @@ public void ResetClip () NativeMethods.cairo_reset_clip (handle); } + public bool InClip (double x, double y) + { + return NativeMethods.cairo_in_clip (handle, x, y); + } + public bool InStroke (double x, double y) { return NativeMethods.cairo_in_stroke (handle, x, y); diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs b/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs index c53f0009c00..8509c6db25f 100644 --- a/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs +++ b/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs @@ -258,6 +258,10 @@ internal static class NativeMethods [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] internal static extern void cairo_glyph_path (IntPtr cr, IntPtr glyphs, int num_glyphs); + [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] + [return: MarshalAs (UnmanagedType.U1)] + internal static extern bool cairo_has_current_point (IntPtr cr); + [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] internal static extern void cairo_identity_matrix (IntPtr cr); @@ -292,6 +296,10 @@ internal static class NativeMethods [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] internal static extern int cairo_image_surface_get_width (IntPtr surface); + [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] + [return: MarshalAs (UnmanagedType.U1)] + internal static extern bool cairo_in_clip (IntPtr cr, double x, double y); + [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.U1)] internal static extern bool cairo_in_fill (IntPtr cr, double x, double y); diff --git a/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs b/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs index 567d6bc1bfb..d2ef1f63165 100644 --- a/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs +++ b/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs @@ -652,11 +652,37 @@ internal override int AggregateCount(IntPtr context) return UnsafeNativeMethods.sqlite3_aggregate_count(context); } +#if MONOTOUCH + class FunctionData { + public SQLiteCallback Func; + public SQLiteCallback FuncStep; + public SQLiteFinalCallback FuncFinal; + } +#endif + internal override void CreateFunction(string strFunction, int nArgs, bool needCollSeq, SQLiteCallback func, SQLiteCallback funcstep, SQLiteFinalCallback funcfinal) { int n; -#if !SQLITE_STANDARD +#if MONOTOUCH + var data = new FunctionData(); + data.Func = func; + data.FuncStep = funcstep; + data.FuncFinal = funcfinal; + SQLiteCallback func_callback = func == null ? null : new SQLiteCallback(scalar_callback); + SQLiteCallback funcstep_callback = funcstep == null ? null : new SQLiteCallback(step_callback); + SQLiteFinalCallback funcfinal_callback = funcfinal == null ? null : new SQLiteFinalCallback(final_callback); + + IntPtr user_data; + user_data = GCHandle.ToIntPtr(GCHandle.Alloc(data)); + n = UnsafeNativeMethods.sqlite3_create_function_v2(_sql, ToUTF8(strFunction), nArgs, 4, user_data, func_callback, funcstep_callback, funcfinal_callback, destroy_callback); + + if (n == 0) { + // sqlite3_create_function_v2 will call 'destroy_callback' if it fails, so we need to recreate the gchandle here. + user_data = GCHandle.ToIntPtr(GCHandle.Alloc(data)); + n = UnsafeNativeMethods.sqlite3_create_function_v2(_sql, ToUTF8(strFunction), nArgs, 1, user_data, func_callback, funcstep_callback, funcfinal_callback, destroy_callback); + } +#elif !SQLITE_STANDARD n = UnsafeNativeMethods.sqlite3_create_function_interop(_sql, ToUTF8(strFunction), nArgs, 4, IntPtr.Zero, func, funcstep, funcfinal, (needCollSeq == true) ? 1 : 0); if (n == 0) n = UnsafeNativeMethods.sqlite3_create_function_interop(_sql, ToUTF8(strFunction), nArgs, 1, IntPtr.Zero, func, funcstep, funcfinal, (needCollSeq == true) ? 1 : 0); #else @@ -673,6 +699,38 @@ internal override void CreateCollation(string strCollation, SQLiteCollation func if (n > 0) throw new SqliteException(n, SQLiteLastError()); } +#if MONOTOUCH + [MonoTouch.MonoPInvokeCallback(typeof(SQLiteCallback))] + internal static void scalar_callback(IntPtr context, int nArgs, IntPtr argsptr) + { + var handle = GCHandle.FromIntPtr (UnsafeNativeMethods.sqlite3_user_data(context)); + var func = (FunctionData)handle.Target; + func.Func(context, nArgs, argsptr); + } + + [MonoTouch.MonoPInvokeCallback(typeof(SQLiteCallback))] + internal static void step_callback(IntPtr context, int nArgs, IntPtr argsptr) + { + var handle = GCHandle.FromIntPtr(UnsafeNativeMethods.sqlite3_user_data(context)); + var func = (FunctionData)handle.Target; + func.FuncStep(context, nArgs, argsptr); + } + + [MonoTouch.MonoPInvokeCallback(typeof(SQLiteFinalCallback))] + internal static void final_callback(IntPtr context) + { + var handle = GCHandle.FromIntPtr(UnsafeNativeMethods.sqlite3_user_data(context)); + var func = (FunctionData)handle.Target; + func.FuncFinal(context); + } + + [MonoTouch.MonoPInvokeCallback(typeof(SQLiteFinalCallback))] + internal static void destroy_callback(IntPtr context) + { + GCHandle.FromIntPtr(context).Free(); + } +#endif + internal override int ContextCollateCompare(CollationEncodingEnum enc, IntPtr context, string s1, string s2) { #if !SQLITE_STANDARD diff --git a/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs b/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs index 7e5c153906d..bde7bdeb3da 100644 --- a/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs +++ b/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs @@ -141,6 +141,13 @@ internal static class UnsafeNativeMethods #endif internal static extern int sqlite3_create_function(IntPtr db, byte[] strName, int nArgs, int nType, IntPtr pvUser, SQLiteCallback func, SQLiteCallback fstep, SQLiteFinalCallback ffinal); +#if !PLATFORM_COMPACTFRAMEWORK + [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] +#else + [DllImport(SQLITE_DLL)] +#endif + internal static extern int sqlite3_create_function_v2(IntPtr db, byte[] strName, int nArgs, int nType, IntPtr pvUser, SQLiteCallback func, SQLiteCallback fstep, SQLiteFinalCallback ffinal, SQLiteFinalCallback fdestroy); + #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else @@ -692,7 +699,14 @@ internal static class UnsafeNativeMethods [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_config (SQLiteConfig config); - + +#if !PLATFORM_COMPACTFRAMEWORK + [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] +#else + [DllImport(SQLITE_DLL)] +#endif + internal static extern IntPtr sqlite3_user_data (IntPtr context); + #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else diff --git a/mcs/class/Mono.Data.Sqlite/Test/SqliteFunctionTests.cs b/mcs/class/Mono.Data.Sqlite/Test/SqliteFunctionTests.cs index 55038e926fc..294a591a81c 100644 --- a/mcs/class/Mono.Data.Sqlite/Test/SqliteFunctionTests.cs +++ b/mcs/class/Mono.Data.Sqlite/Test/SqliteFunctionTests.cs @@ -43,5 +43,27 @@ public override int Compare (string param1, string param2) return string.Compare (param1, param2); } } + + [SqliteFunction(Name = "TestScalar", FuncType = FunctionType.Scalar)] + public class TestScalar : SqliteFunction + { + public override object Invoke (object[] args) + { + return null; + } + } + + [SqliteFunction(Name = "TestAggregate", FuncType = FunctionType.Aggregate)] + public class TestAggregate : SqliteFunction + { + public override void Step(object[] args, int stepNumber, ref object contextData) + { + } + + public override object Final (object contextData) + { + return null; + } + } } } diff --git a/mcs/class/Mono.Debugger.Soft/Makefile b/mcs/class/Mono.Debugger.Soft/Makefile index 57e2b054b13..1c4dd2792a7 100644 --- a/mcs/class/Mono.Debugger.Soft/Makefile +++ b/mcs/class/Mono.Debugger.Soft/Makefile @@ -8,6 +8,11 @@ LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:Mono.Cecil.dll /r:System.Core.dll TEST_MCS_FLAGS = /r:Mono.Cecil.dll /r:System.dll /r:System.Core.dll +VALID_TEST_PROFILE := $(filter net_4_5, $(PROFILE)) + +# The test exe is not profile specific, and compiling a 2.0 will make the 4.5 tests fail +ifdef VALID_TEST_PROFILE + test-local: dtest-app.exe dtest-excfilter.exe dtest-app.exe: Test/dtest-app.cs @@ -16,6 +21,13 @@ dtest-app.exe: Test/dtest-app.cs dtest-excfilter.exe: Test/dtest-excfilter.il MONO_PATH=$(topdir)/class/lib/$(PROFILE) $(INTERNAL_ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il +else + +NO_TEST=1 +check: + +endif + CLEAN_FILES = dtest-app.exe dtest-app.exe.mdb dtest-excfilter.exe dtest-excfilter.exe.mdb EXTRA_DISTFILES = \ diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index 03d2d3af13a..14bf701f46f 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -157,7 +157,9 @@ enum ValueTypeId { enum InvokeFlags { NONE = 0x0, DISABLE_BREAKPOINTS = 0x1, - SINGLE_THREADED = 0x2 + SINGLE_THREADED = 0x2, + OUT_THIS = 0x4, + OUT_ARGS = 0x8, } enum ElementType { @@ -404,8 +406,7 @@ public abstract class Connection static readonly bool EnableConnectionLogging = !String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MONO_SDB_LOG")); static int ConnectionId; - readonly StreamWriter LoggingStream = EnableConnectionLogging ? - new StreamWriter (string.Format ("/tmp/sdb_conn_log_{0}", ConnectionId++), false) : null; + readonly StreamWriter LoggingStream; /* * Th version of the wire-protocol implemented by the library. The library @@ -415,7 +416,7 @@ public abstract class Connection * with newer runtimes, and vice versa. */ internal const int MAJOR_VERSION = 2; - internal const int MINOR_VERSION = 34; + internal const int MINOR_VERSION = 35; enum WPSuspendPolicy { NONE = 0, @@ -1068,6 +1069,19 @@ protected Connection () { reply_cbs = new Dictionary (); reply_cb_counts = new Dictionary (); reply_packets_monitor = new Object (); + if (EnableConnectionLogging) { + var path = Environment.GetEnvironmentVariable ("MONO_SDB_LOG"); + if (path.Contains ("{0}")) { + //C:\SomeDir\sdbLog{0}.txt -> C:\SomeDir\sdbLog1.txt + LoggingStream = new StreamWriter (string.Format (path, ConnectionId++), false); + } else if (Path.HasExtension (path)) { + //C:\SomeDir\sdbLog.txt -> C:\SomeDir\sdbLog1.txt + LoggingStream = new StreamWriter (Path.GetDirectoryName (path) + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension (path) + ConnectionId++ + "." + Path.GetExtension (path), false); + } else { + //C:\SomeDir\sdbLog -> C:\SomeDir\sdbLog1 + LoggingStream = new StreamWriter (path + ConnectionId++, false); + } + } } protected abstract int TransportReceive (byte[] buf, int buf_offset, int len); @@ -1443,7 +1457,7 @@ public void StopBuffering () { WritePackets (buffered_packets); if (EnableConnectionLogging) { - LoggingStream.WriteLine (String.Format ("Sent {1} packets.", buffered_packets.Count)); + LoggingStream.WriteLine (String.Format ("Sent {0} packets.", buffered_packets.Count)); LoggingStream.Flush (); } buffered_packets.Clear (); @@ -1655,24 +1669,39 @@ internal ValueImpl VM_InvokeMethod (long thread, long method, ValueImpl this_arg } } - internal delegate void InvokeMethodCallback (ValueImpl v, ValueImpl exc, ErrorCode error, object state); + internal delegate void InvokeMethodCallback (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state); + + void read_invoke_res (PacketReader r, out ValueImpl v, out ValueImpl exc, out ValueImpl out_this, out ValueImpl[] out_args) { + int resflags = r.ReadByte (); + v = null; + exc = null; + out_this = null; + out_args = null; + if (resflags == 0) { + exc = r.ReadValue (); + } else { + v = r.ReadValue (); + if ((resflags & 2) != 0) + out_this = r.ReadValue (); + if ((resflags & 4) != 0) { + int nargs = r.ReadInt (); + out_args = new ValueImpl [nargs]; + for (int i = 0; i < nargs; ++i) + out_args [i] = r.ReadValue (); + } + } + } internal int VM_BeginInvokeMethod (long thread, long method, ValueImpl this_arg, ValueImpl[] arguments, InvokeFlags flags, InvokeMethodCallback callback, object state) { return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHOD, new PacketWriter ().WriteId (thread).WriteInt ((int)flags).WriteId (method).WriteValue (this_arg).WriteInt (arguments.Length).WriteValues (arguments), delegate (PacketReader r) { - ValueImpl v, exc; + ValueImpl v, exc, out_this = null; + ValueImpl[] out_args = null; if (r.ErrorCode != 0) { - callback (null, null, (ErrorCode)r.ErrorCode, state); + callback (null, null, null, null, (ErrorCode)r.ErrorCode, state); } else { - if (r.ReadByte () == 0) { - exc = r.ReadValue (); - v = null; - } else { - v = r.ReadValue (); - exc = null; - } - - callback (v, exc, 0, state); + read_invoke_res (r, out v, out exc, out out_this, out out_args); + callback (v, exc, out_this, out_args, 0, state); } }, 1); } @@ -1690,20 +1719,14 @@ internal int VM_BeginInvokeMethods (long thread, long[] methods, ValueImpl this_ w.WriteValues (arguments [i]); } return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHODS, w, delegate (PacketReader r) { - ValueImpl v, exc; + ValueImpl v, exc, out_this = null; + ValueImpl[] out_args = null; if (r.ErrorCode != 0) { - callback (null, null, (ErrorCode)r.ErrorCode, state); + callback (null, null, null, null, (ErrorCode)r.ErrorCode, state); } else { - if (r.ReadByte () == 0) { - exc = r.ReadValue (); - v = null; - } else { - v = r.ReadValue (); - exc = null; - } - - callback (v, exc, 0, state); + read_invoke_res (r, out v, out exc, out out_this, out out_args); + callback (v, exc, out_this, out_args, 0, state); } }, methods.Length); } diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInterpreter.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInterpreter.cs index e0175f36bdf..b4d6073819c 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInterpreter.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInterpreter.cs @@ -23,67 +23,347 @@ public Value Evaluate (Value this_val, Value[] args) { // IL_0008: br IL_000d // IL_000d: ldloc.0 // IL_000e: ret + // ... or returns a simple constant: + // IL_0000: ldc.i4 1024 + // IL_0005: conv.i8 + // IL_0006: ret if (args != null && args.Length != 0) - throw new NotSupportedException (); + throw new NotSupportedException (); + if (method.IsStatic || method.DeclaringType.IsValueType || this_val == null || !(this_val is ObjectMirror)) throw new NotSupportedException (); var instructions = body.Instructions; - if (instructions.Count > 16) + if (instructions.Count < 1 || instructions.Count > 16) throw new NotSupportedException (); - Value[] stack = new Value [16]; + var stack = new Value [16]; + var ins = instructions [0]; Value locals_0 = null; - Value res = null; - - int sp = 0; int ins_count = 0; - var ins = instructions [0]; + int sp = 0; + while (ins != null) { if (ins_count > 16) throw new NotImplementedException (); - ins_count ++; + var next = ins.Next; + ins_count++; var op = ins.OpCode; if (op == OpCodes.Nop) { } else if (op == OpCodes.Ldarg_0) { - if (sp > 0) + if (sp != 0) throw new NotSupportedException (); + stack [sp++] = this_val; } else if (op == OpCodes.Ldfld) { if (sp != 1) throw new NotSupportedException (); - var obj = (ObjectMirror)stack [--sp]; - var field = (FieldInfoMirror)ins.Operand; + + var obj = (ObjectMirror) stack [--sp]; + var field = (FieldInfoMirror) ins.Operand; try { stack [sp++] = obj.GetValue (field); } catch (ArgumentException) { throw new NotSupportedException (); } + } else if (op == OpCodes.Ldc_I4_0) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 0); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_1) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 1); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_2) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 2); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_3) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 3); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_4) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 4); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_5) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 5); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_6) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 6); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_7) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 7); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_8) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 8); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_M1) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, -1); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_S) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I8) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_R4) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_R8) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_I) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt32 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_I1) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToSByte (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_U1) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToByte (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_I2) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt16 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_U2) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt16 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_I4) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt32 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_U4) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt32 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_I8) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt64 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_U8) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt64 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_R4) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToSingle (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_R8) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToDouble (primitive.Value)); + } catch { + throw new NotSupportedException (); + } } else if (op == OpCodes.Stloc_0) { if (sp != 1) throw new NotSupportedException (); + locals_0 = stack [--sp]; } else if (op == OpCodes.Br) { - next = (ILInstruction)ins.Operand; + next = (ILInstruction) ins.Operand; } else if (op == OpCodes.Ldloc_0) { if (sp != 0) throw new NotSupportedException (); + stack [sp++] = locals_0; } else if (op == OpCodes.Ret) { - if (sp == 0) - res = null; - else - res = stack [--sp]; - break; + if (sp > 0) { + var res = stack [--sp]; + + var primitive = res as PrimitiveValue; + if (method.ReturnType.IsPrimitive && primitive != null) { + // cast the primitive value to the return type + try { + switch (method.ReturnType.CSharpName) { + case "double": res = new PrimitiveValue (method.VirtualMachine, Convert.ToDouble (primitive.Value)); break; + case "float": res = new PrimitiveValue (method.VirtualMachine, Convert.ToSingle (primitive.Value)); break; + case "ulong": res = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt64 (primitive.Value)); break; + case "long": res = new PrimitiveValue (method.VirtualMachine, Convert.ToInt64 (primitive.Value)); break; + case "uint": res = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt32 (primitive.Value)); break; + case "int": res = new PrimitiveValue (method.VirtualMachine, Convert.ToInt32 (primitive.Value)); break; + case "ushort": res = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt16 (primitive.Value)); break; + case "short": res = new PrimitiveValue (method.VirtualMachine, Convert.ToInt16 (primitive.Value)); break; + case "sbyte": res = new PrimitiveValue (method.VirtualMachine, Convert.ToSByte (primitive.Value)); break; + case "byte": res = new PrimitiveValue (method.VirtualMachine, Convert.ToByte (primitive.Value)); break; + case "char": res = new PrimitiveValue (method.VirtualMachine, Convert.ToChar (primitive.Value)); break; + case "bool": res = new PrimitiveValue (method.VirtualMachine, Convert.ToBoolean (primitive.Value)); break; + } + } catch { + throw new NotSupportedException (); + } + } + + return res; + } + + return null; } else { throw new NotSupportedException (); } + ins = next; } - return res; + return null; } } } diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs index bc064795083..5ca987ec694 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs @@ -13,6 +13,15 @@ public enum InvokeOptions { /* * Only resume the target thread during the invoke */ - SingleThreaded = 2 + SingleThreaded = 2, + /* + * Return the changed receiver when invoking + * a valuetype method. + */ + ReturnOutThis = 4, + /* + * Return the values of out arguments + */ + ReturnOutArgs = 8 } } diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs index 030fa3e3e4a..d83e3a1a481 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs @@ -8,6 +8,22 @@ namespace Mono.Debugger.Soft { + public class InvokeResult { + public Value Result { get; set; } + // + // The value of the receiver after the call for calls to valuetype methods or null. + // Only set when using the InvokeOptions.ReturnOutThis flag. + // Since protocol version 2.35 + // + public Value OutThis { get; set; } + // + // The value of the arguments after the call + // Only set when using the InvokeOptions.ReturnOutArgs flag. + // Since protocol version 2.35 + // + public Value[] OutArgs { get; set; } + } + public class ObjectMirror : Value { TypeMirror type; AppDomainMirror domain; @@ -149,6 +165,10 @@ public Value EndInvokeMethod (IAsyncResult asyncResult) { return EndInvokeMethodInternal (asyncResult); } + public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) { + return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult); + } + #if NET_4_5 public Task InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList arguments, InvokeOptions options = InvokeOptions.None) { var tcs = new TaskCompletionSource (); @@ -164,6 +184,21 @@ public Task InvokeMethodAsync (ThreadMirror thread, MethodMirror method, }, null); return tcs.Task; } + + public Task InvokeMethodAsyncWithResult (ThreadMirror thread, MethodMirror method, IList arguments, InvokeOptions options = InvokeOptions.None) { + var tcs = new TaskCompletionSource (); + BeginInvokeMethod (thread, method, arguments, options, iar => + { + try { + tcs.SetResult (EndInvokeMethodInternalWithResult (iar)); + } catch (OperationCanceledException) { + tcs.TrySetCanceled (); + } catch (Exception ex) { + tcs.TrySetException (ex); + } + }, null); + return tcs.Task; + } #endif // @@ -223,6 +258,14 @@ public ValueImpl Value { get; set; } + public ValueImpl OutThis { + get; set; + } + + public ValueImpl[] OutArgs { + get; set; + } + public ValueImpl Exception { get; set; } @@ -260,6 +303,10 @@ internal static IInvokeAsyncResult BeginInvokeMethod (VirtualMachine vm, ThreadM f |= InvokeFlags.DISABLE_BREAKPOINTS; if ((options & InvokeOptions.SingleThreaded) != 0) f |= InvokeFlags.SINGLE_THREADED; + if ((options & InvokeOptions.ReturnOutThis) != 0) + f |= InvokeFlags.OUT_THIS; + if ((options & InvokeOptions.ReturnOutArgs) != 0) + f |= InvokeFlags.OUT_ARGS; InvokeAsyncResult r = new InvokeAsyncResult { AsyncState = state, AsyncWaitHandle = new ManualResetEvent (false), VM = vm, Thread = thread, Callback = callback }; thread.InvalidateFrames (); @@ -269,7 +316,7 @@ internal static IInvokeAsyncResult BeginInvokeMethod (VirtualMachine vm, ThreadM } // This is called when the result of an invoke is received - static void InvokeCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) { + static void InvokeCB (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state) { InvokeAsyncResult r = (InvokeAsyncResult)state; if (error != 0) { @@ -279,6 +326,9 @@ static void InvokeCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) r.Exception = exc; } + r.OutThis = out_this; + r.OutArgs = out_args; + r.IsCompleted = true; ((ManualResetEvent)r.AsyncWaitHandle).Set (); @@ -286,7 +336,7 @@ static void InvokeCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) r.Callback.BeginInvoke (r, null, null); } - internal static Value EndInvokeMethodInternal (IAsyncResult asyncResult) { + internal static InvokeResult EndInvokeMethodInternalWithResult (IAsyncResult asyncResult) { if (asyncResult == null) throw new ArgumentNullException ("asyncResult"); @@ -309,10 +359,22 @@ internal static Value EndInvokeMethodInternal (IAsyncResult asyncResult) { if (r.Exception != null) throw new InvocationException ((ObjectMirror)r.VM.DecodeValue (r.Exception)); - return r.VM.DecodeValue (r.Value); + Value out_this = null; + if (r.OutThis != null) + out_this = r.VM.DecodeValue (r.OutThis); + Value[] out_args = null; + if (r.OutArgs != null) + out_args = r.VM.DecodeValues (r.OutArgs); + + return new InvokeResult () { Result = r.VM.DecodeValue (r.Value), OutThis = out_this, OutArgs = out_args }; } } + internal static Value EndInvokeMethodInternal (IAsyncResult asyncResult) { + InvokeResult res = EndInvokeMethodInternalWithResult (asyncResult); + return res.Result; + } + internal static void EndInvokeMultipleInternal (IAsyncResult asyncResult) { if (asyncResult == null) throw new ArgumentNullException ("asyncResult"); @@ -377,7 +439,7 @@ internal static IInvokeAsyncResult BeginInvokeMultiple (VirtualMachine vm, Threa } // This is called when the result of an invoke is received - static void InvokeMultipleCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) { + static void InvokeMultipleCB (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state) { var r = (InvokeAsyncResult)state; Interlocked.Decrement (ref r.NumPending); diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs index 696f6493f40..2ba50c84d4c 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs @@ -22,8 +22,11 @@ public object Value { public override bool Equals (object obj) { if (value == obj) return true; - if (obj != null && obj is PrimitiveValue) - return value == (obj as PrimitiveValue).Value; + + var primitive = obj as PrimitiveValue; + if (primitive != null) + return value == primitive.Value; + return base.Equals (obj); } @@ -52,5 +55,9 @@ public IAsyncResult BeginInvokeMethod (ThreadMirror thread, MethodMirror method, public Value EndInvokeMethod (IAsyncResult asyncResult) { return ObjectMirror.EndInvokeMethodInternal (asyncResult); } + + public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) { + return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult); + } } } \ No newline at end of file diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs index b6e43eb4e23..1aa1a4ef5ee 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs @@ -1,5 +1,8 @@ using System; using System.Collections.Generic; +#if NET_4_5 +using System.Threading.Tasks; +#endif namespace Mono.Debugger.Soft { @@ -83,7 +86,53 @@ public IAsyncResult BeginInvokeMethod (ThreadMirror thread, MethodMirror method, } public Value EndInvokeMethod (IAsyncResult asyncResult) { - return ObjectMirror.EndInvokeMethodInternal (asyncResult); + var result = ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult); + var outThis = result.OutThis as StructMirror; + if (outThis != null) { + SetFields (outThis.Fields); + } + return result.Result; + } + + public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) { + var result = ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult); + var outThis = result.OutThis as StructMirror; + if (outThis != null) { + SetFields (outThis.Fields); + } + return result; + } + +#if NET_4_5 + public Task InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList arguments, InvokeOptions options = InvokeOptions.None) { + var tcs = new TaskCompletionSource (); + BeginInvokeMethod (thread, method, arguments, options, iar => + { + try { + tcs.SetResult (EndInvokeMethod (iar)); + } catch (OperationCanceledException) { + tcs.TrySetCanceled (); + } catch (Exception ex) { + tcs.TrySetException (ex); + } + }, null); + return tcs.Task; + } + + public Task InvokeMethodAsyncWithResult (ThreadMirror thread, MethodMirror method, IList arguments, InvokeOptions options = InvokeOptions.None) { + var tcs = new TaskCompletionSource (); + BeginInvokeMethod (thread, method, arguments, options, iar => + { + try { + tcs.SetResult (ObjectMirror.EndInvokeMethodInternalWithResult (iar)); + } catch (OperationCanceledException) { + tcs.TrySetCanceled (); + } catch (Exception ex) { + tcs.TrySetException (ex); + } + }, null); + return tcs.Task; } +#endif } } diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs index 437689163ec..3970f2a5768 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs @@ -806,6 +806,10 @@ public Value EndInvokeMethod (IAsyncResult asyncResult) { return ObjectMirror.EndInvokeMethodInternal (asyncResult); } + public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) { + return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult); + } + #if NET_4_5 public Task InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList arguments, InvokeOptions options = InvokeOptions.None) { var tcs = new TaskCompletionSource (); diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs index a057455538d..3c9b2877c21 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs @@ -81,6 +81,7 @@ public struct AStruct { public string s; public byte k; public IntPtr j; + public int l; [MethodImplAttribute (MethodImplOptions.NoInlining)] public int foo (int val) { @@ -106,6 +107,11 @@ public static int invoke_static () { public IntPtr invoke_return_intptr () { return j; } + + [MethodImplAttribute (MethodImplOptions.NoInlining)] + public void invoke_mutate () { + l = 5; + } } public class GClass { @@ -953,6 +959,11 @@ public int invoke_iface () { return 42; } + public void invoke_out (out int foo, out int[] arr) { + foo = 5; + arr = new int [10]; + } + [MethodImplAttribute (MethodImplOptions.NoInlining)] public static void exceptions () { try { diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs index 9d6e5c41271..9a671202a82 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs @@ -2110,6 +2110,21 @@ public void Invoke () { Assert.AreEqual ("Exception", ex.Exception.Type.Name); } +#if NET_4_5 + // out argument + m = t.GetMethod ("invoke_out"); + var out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1), vm.CreateValue (null) }, InvokeOptions.ReturnOutArgs); + var out_args = out_task.Result.OutArgs; + AssertValue (5, out_args [0]); + Assert.IsTrue (out_args [1] is ArrayMirror); + Assert.AreEqual (10, (out_args [1] as ArrayMirror).Length); + + // without ReturnOutArgs flag + out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1), vm.CreateValue (null) }); + out_args = out_task.Result.OutArgs; + Assert.IsNull (out_args); +#endif + // newobj m = t.GetMethod (".ctor"); v = t.InvokeMethod (e.Thread, m, null); @@ -2212,6 +2227,24 @@ public void InvokeVType () { m = t.GetMethod ("invoke_return_int"); v = s.InvokeMethod (e.Thread, m, null); AssertValue (42, v); + +#if NET_4_5 + // Invoke a method which changes state + s = frame.GetArgument (1) as StructMirror; + t = s.Type; + m = t.GetMethod ("invoke_mutate"); + var task = s.InvokeMethodAsyncWithResult (e.Thread, m, null, InvokeOptions.ReturnOutThis); + var out_this = task.Result.OutThis as StructMirror; + AssertValue (5, out_this ["l"]); + + // Without the ReturnOutThis flag + s = frame.GetArgument (1) as StructMirror; + t = s.Type; + m = t.GetMethod ("invoke_mutate"); + task = s.InvokeMethodAsyncWithResult (e.Thread, m, null); + out_this = task.Result.OutThis as StructMirror; + Assert.AreEqual (null, out_this); +#endif } [Test] diff --git a/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs b/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs index 7ba53e922bf..0b8f1e6fa02 100644 --- a/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs +++ b/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs @@ -2842,7 +2842,7 @@ public static int epoll_ctl (int epfd, EpollOp op, int fd, EpollEvents events) ee.events = events; ee.fd = fd; - return sys_epoll_ctl (epfd, op, fd, ref ee); + return epoll_ctl (epfd, op, fd, ref ee); } public static int epoll_wait (int epfd, EpollEvent [] events, int max_events, int timeout) @@ -2860,7 +2860,7 @@ public static int epoll_wait (int epfd, EpollEvent [] events, int max_events, in private static extern int sys_epoll_create1 (EpollFlags flags); [DllImport (LIBC, SetLastError=true, EntryPoint="epoll_ctl")] - private static extern int sys_epoll_ctl (int epfd, EpollOp op, int fd, ref EpollEvent ee); + public static extern int epoll_ctl (int epfd, EpollOp op, int fd, ref EpollEvent ee); [DllImport (LIBC, SetLastError=true, EntryPoint="epoll_wait")] private static extern int sys_epoll_wait (int epfd, EpollEvent [] ee, int maxevents, int timeout); diff --git a/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs b/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs index 3fae43a4926..38b1dea8de9 100644 --- a/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs +++ b/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs @@ -156,9 +156,9 @@ public override string SignatureAlgorithm { // clear keys protected override void Dispose(bool disposing) { if (!m_Disposed) { - m_P.Clear(); - m_G.Clear(); - m_X.Clear(); + if (m_P != null) m_P.Clear(); + if (m_G != null) m_G.Clear(); + if (m_X != null) m_X.Clear(); } m_Disposed = true; } diff --git a/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources b/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources index 5072270d8f1..ac779fcd516 100644 --- a/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources +++ b/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources @@ -22,10 +22,8 @@ src/ComponentModel/Microsoft/Internal/GenerationServices.cs src/ComponentModel/Microsoft/Internal/Runtime/Serialization/SerializationServices.cs src/ComponentModel/Microsoft/Internal/Collections/CollectionServices.cs src/ComponentModel/Microsoft/Internal/Collections/WeakReferenceCollection.cs -src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs src/ComponentModel/Microsoft/Internal/Collections/CollectionServices.CollectionOfObject.cs src/ComponentModel/Microsoft/Internal/Collections/EnumerableCardinality.cs -src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs src/ComponentModel/System/LazyOfTTMetadata.cs src/ComponentModel/System/ComponentModel/Composition/PartMetadataAttribute.cs src/ComponentModel/System/ComponentModel/Composition/ExceptionBuilder.cs diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs deleted file mode 100644 index 03269317f54..00000000000 --- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs +++ /dev/null @@ -1,106 +0,0 @@ -// ----------------------------------------------------------------------- -// Copyright (c) Microsoft Corporation. All rights reserved. -// ----------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using Microsoft.Internal; - -// This is using the desktop namespace for ReadOnlyDictionary, the source code is in Microsoft\Internal\Collections to keep it seperate from the main MEF codebase. -namespace System.Collections.ObjectModel -{ - - [DebuggerDisplay("Count = {Count}")] - [DebuggerTypeProxy(typeof(ReadOnlyDictionaryDebuggerProxy<,>))] - internal sealed partial class ReadOnlyDictionary : IDictionary - { - private readonly IDictionary _innerDictionary; - - public ReadOnlyDictionary(IDictionary dictionary) - { - this._innerDictionary = dictionary ?? new Dictionary(0); - } - - public int Count - { - get { return this._innerDictionary.Count; } - } - - public bool IsReadOnly - { - get { return true; } - } - - public ICollection Keys - { - get { return this._innerDictionary.Keys; } - } - - public TValue this[TKey key] - { - get { return this._innerDictionary[key]; } - set { throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); } - } - - public ICollection Values - { - get { return this._innerDictionary.Values; } - } - - public bool Contains(KeyValuePair item) - { - return this._innerDictionary.Contains(item); - } - - public bool ContainsKey(TKey key) - { - return this._innerDictionary.ContainsKey(key); - } - - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - this._innerDictionary.CopyTo(array, arrayIndex); - } - - public IEnumerator> GetEnumerator() - { - return this._innerDictionary.GetEnumerator(); - } - - public bool TryGetValue(TKey key, out TValue value) - { - return this._innerDictionary.TryGetValue(key, out value); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return this._innerDictionary.GetEnumerator(); - } - - void IDictionary.Add(TKey key, TValue value) - { - throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); - } - - void ICollection>.Add(KeyValuePair item) - { - throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); - } - - void ICollection>.Clear() - { - throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); - } - - bool IDictionary.Remove(TKey key) - { - throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); - } - - bool ICollection>.Remove(KeyValuePair item) - { - throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); - } - } -} diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs deleted file mode 100644 index 9dda8f4bc58..00000000000 --- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs +++ /dev/null @@ -1,34 +0,0 @@ -// ----------------------------------------------------------------------- -// Copyright (c) Microsoft Corporation. All rights reserved. -// ----------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using Microsoft.Internal; - -namespace System.Collections.ObjectModel -{ - - // NOTE: This type cannot be a nested proxy of ReadOnlyDictionary due to a bug - // in the Visual Studio Debugger which causes it to ignore nested generic proxies. - internal class ReadOnlyDictionaryDebuggerProxy - { - private readonly ReadOnlyDictionary _dictionary; - - public ReadOnlyDictionaryDebuggerProxy(ReadOnlyDictionary dictionary) - { - Requires.NotNull(dictionary, "dictionary"); - - _dictionary = dictionary; - } - - [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] - public KeyValuePair[] Items - { - // NOTE: This shouldn't be cached, so that on every query of - // the current value of the underlying dictionary is respected. - get { return this._dictionary.ToArray(); } - } - } -} diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs index b7cf6b04c72..73f12afc504 100644 --- a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs +++ b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs @@ -37,14 +37,17 @@ namespace Microsoft.Win32.SafeHandles { public sealed class SafeMemoryMappedViewHandle : SafeBuffer { - internal SafeMemoryMappedViewHandle (IntPtr handle, long size) : base (true) { - this.handle = handle; + IntPtr mmap_handle; + + internal SafeMemoryMappedViewHandle (IntPtr mmap_handle, IntPtr base_address, long size) : base (true) { + this.mmap_handle = mmap_handle; + this.handle = base_address; Initialize ((ulong)size); } protected override bool ReleaseHandle () { if (this.handle != (IntPtr) (-1)) - return MemoryMapImpl.Unmap (this.handle, ByteLength); + return MemoryMapImpl.Unmap (this.mmap_handle); throw new NotImplementedException (); } } diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs index 20973c00c65..feaaa5ab984 100644 --- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs +++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs @@ -25,7 +25,6 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // - #if NET_4_0 using System; @@ -33,425 +32,84 @@ using System.Collections.Generic; using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; - - -#if !MOBILE -using Mono.Unix.Native; -using Mono.Unix; -#else using System.Runtime.CompilerServices; -#endif + namespace System.IO.MemoryMappedFiles { -#if !MOBILE - internal static class MemoryMapImpl { - // - // Turns the FileMode into the first half of open(2) flags - // - static OpenFlags ToUnixMode (FileMode mode) - { - switch (mode){ - case FileMode.CreateNew: - return OpenFlags.O_CREAT | OpenFlags.O_EXCL; - - case FileMode.Create: - return OpenFlags.O_CREAT | OpenFlags.O_TRUNC; - - case FileMode.OpenOrCreate: - return OpenFlags.O_CREAT; - - case FileMode.Truncate: - return OpenFlags.O_TRUNC; - - case FileMode.Append: - return OpenFlags.O_APPEND; - default: - case FileMode.Open: - return 0; - } - } - - // - // Turns the MemoryMappedFileAccess into the second half of open(2) flags - // - static OpenFlags ToUnixMode (MemoryMappedFileAccess access) - { - switch (access){ - case MemoryMappedFileAccess.CopyOnWrite: - case MemoryMappedFileAccess.ReadWriteExecute: - case MemoryMappedFileAccess.ReadWrite: - return OpenFlags.O_RDWR; - - case MemoryMappedFileAccess.Write: - return OpenFlags.O_WRONLY; - - case MemoryMappedFileAccess.ReadExecute: - case MemoryMappedFileAccess.Read: - default: - return OpenFlags.O_RDONLY; - } - } - - static MmapProts ToUnixProts (MemoryMappedFileAccess access) - { - switch (access){ - case MemoryMappedFileAccess.ReadWrite: - return MmapProts.PROT_WRITE | MmapProts.PROT_READ; - - case MemoryMappedFileAccess.Write: - return MmapProts.PROT_WRITE; - - case MemoryMappedFileAccess.CopyOnWrite: - return MmapProts.PROT_WRITE | MmapProts.PROT_READ; - - case MemoryMappedFileAccess.ReadExecute: - return MmapProts.PROT_EXEC; - - case MemoryMappedFileAccess.ReadWriteExecute: - return MmapProts.PROT_WRITE | MmapProts.PROT_READ | MmapProts.PROT_EXEC; - - case MemoryMappedFileAccess.Read: - default: - return MmapProts.PROT_READ; - } - } - - internal static int Open (string path, FileMode mode, ref long capacity, MemoryMappedFileAccess access) - { - if (MonoUtil.IsUnix){ - Stat buf; - if (Syscall.stat (path, out buf) == -1) - UnixMarshal.ThrowExceptionForLastError (); - - if (capacity == 0) { - // Special files such as FIFOs, sockets, and devices can - // have a size of 0. Specifying a capacity for these - // also makes little sense, so don't do the check if the - // file is one of these. - if (buf.st_size == 0 && - (buf.st_mode & (FilePermissions.S_IFCHR | - FilePermissions.S_IFBLK | - FilePermissions.S_IFIFO | - FilePermissions.S_IFSOCK)) == 0) { - throw new ArgumentException ("A positive capacity must be specified for a Memory Mapped File backed by an empty file."); - } - - capacity = buf.st_size; - } else if (capacity < buf.st_size) { - throw new ArgumentException ("The capacity may not be smaller than the file size."); - } - - int fd = Syscall.open (path, ToUnixMode (mode) | ToUnixMode (access), FilePermissions.DEFFILEMODE); - - if (fd == -1) - UnixMarshal.ThrowExceptionForLastError (); - return fd; - } - - throw new NotImplementedException (); - } - - internal static void CloseFD (int fd) { - Syscall.close (fd); - } - - internal static void Flush (int fd) { - if (MonoUtil.IsUnix) - Syscall.fsync (fd); - else - throw new NotImplementedException ("Not implemented on Windows"); - - } - - static int pagesize; - - internal static unsafe void Map (int file_handle, long offset, ref long size, MemoryMappedFileAccess access, out IntPtr map_addr, out int offset_diff) - { - if (!MonoUtil.IsUnix) - throw new NotImplementedException ("Not implemented on windows."); - - if (pagesize == 0) - pagesize = Syscall.getpagesize (); - - Stat buf; - Syscall.fstat (file_handle, out buf); - long fsize = buf.st_size; - - if (size == 0 || size > fsize) - size = fsize; - - // Align offset - long real_offset = offset & ~(pagesize - 1); - - offset_diff = (int)(offset - real_offset); - - // FIXME: Need to determine the unix fd for the file, Handle is only - // equal to it by accident - // - // The new API no longer uses FileStream everywhere, but exposes instead - // the filename (with one exception), we could move this API to use - // file descriptors instead of the FileStream plus its Handle. - // - map_addr = Syscall.mmap (IntPtr.Zero, (ulong) size, - ToUnixProts (access), - access == MemoryMappedFileAccess.CopyOnWrite ? MmapFlags.MAP_PRIVATE : MmapFlags.MAP_SHARED, - file_handle, real_offset); - - if (map_addr == (IntPtr)(-1)) - throw new IOException ("mmap failed for fd#" + file_handle + "(" + offset + ", " + size + ")"); - } - - internal static bool Unmap (IntPtr map_addr, ulong map_size) - { - if (!MonoUtil.IsUnix) - return false; - return Syscall.munmap (map_addr, map_size) == 0; - } - - static void ConfigureUnixFD (IntPtr handle, HandleInheritability h) - { - // TODO: Mono.Posix is lacking O_CLOEXEC definitions for fcntl. - } - - - [DllImport("kernel32", SetLastError = true)] - static extern bool SetHandleInformation (IntPtr hObject, int dwMask, int dwFlags); - static void ConfigureWindowsFD (IntPtr handle, HandleInheritability h) - { - SetHandleInformation (handle, 1 /* FLAG_INHERIT */, h == HandleInheritability.None ? 0 : 1); - } - - internal static void ConfigureFD (IntPtr handle, HandleInheritability inheritability) - { - if (MonoUtil.IsUnix) - ConfigureUnixFD (handle, inheritability); - else - ConfigureWindowsFD (handle, inheritability); - } - - } -#else internal static class MemoryMapImpl { - [DllImport ("libc")] - static extern int fsync (int fd); - - [DllImport ("libc")] - static extern int close (int fd); - - [DllImport ("libc")] - static extern int fcntl (int fd, int cmd, int arg0); - - //XXX check if android off_t is 64bits or not. on iOS / darwin it is. - [DllImport ("libc")] - static extern IntPtr mmap (IntPtr addr, IntPtr len, int prot, int flags, int fd, long offset); - - [DllImport ("libc")] - static extern int munmap (IntPtr addr, IntPtr size); - - [DllImport ("libc", SetLastError=true)] - static extern int open (string path, int flags, int access); - -#if MONODROID - [DllImport ("__Internal")] - static extern int monodroid_getpagesize (); - - static int getpagesize () - { - return monodroid_getpagesize (); - } -#else - [DllImport ("libc")] - static extern int getpagesize (); -#endif - [MethodImplAttribute (MethodImplOptions.InternalCall)] - static extern long mono_filesize_from_path (string str); + static extern IntPtr OpenFileInternal (string path, FileMode mode, string mapName, out long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, out int error); [MethodImplAttribute (MethodImplOptions.InternalCall)] - static extern long mono_filesize_from_fd (int fd); + static extern IntPtr OpenHandleInternal (IntPtr handle, string mapName, out long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, out int error); - //Values valid on iOS/OSX and android ndk r6 - const int F_GETFD = 1; - const int F_SETFD = 2; - const int FD_CLOEXEC = 1; - const int DEFFILEMODE = 0x666; - - const int O_RDONLY = 0x0; - const int O_WRONLY = 0x1; - const int O_RDWR = 0x2; - - const int PROT_READ = 0x1; - const int PROT_WRITE = 0x2; - const int PROT_EXEC = 0x4; - - const int MAP_PRIVATE = 0x2; - const int MAP_SHARED = 0x1; - - const int EINVAL = 22; - -#if MONODROID - const int O_CREAT = 0x040; - const int O_TRUNC = 0x080; - const int O_EXCL = 0x200; - - const int ENAMETOOLONG = 63; -#else - /* MONOTOUCH - usr/include/sys/fcntl.h */ - const int O_CREAT = 0x0200; - const int O_TRUNC = 0x0400; - const int O_EXCL = 0x0800; - - // usr/include/sys/errno.h - const int ENAMETOOLONG = 63; -#endif + [MethodImplAttribute (MethodImplOptions.InternalCall)] + internal extern static void CloseMapping (IntPtr handle); - static int ToUnixMode (FileMode mode) - { - switch (mode) { - case FileMode.CreateNew: - return O_CREAT | O_EXCL; - - case FileMode.Create: - return O_CREAT | O_TRUNC; - - case FileMode.OpenOrCreate: - return O_CREAT; - - case FileMode.Truncate: - return O_TRUNC; - default: - case FileMode.Open: - return 0; - } - } + [MethodImplAttribute (MethodImplOptions.InternalCall)] + internal extern static void Flush (IntPtr file_handle); - // - // Turns the MemoryMappedFileAccess into the second half of open(2) flags - // - static int ToUnixMode (MemoryMappedFileAccess access) - { - switch (access) { - case MemoryMappedFileAccess.CopyOnWrite: - case MemoryMappedFileAccess.ReadWriteExecute: - case MemoryMappedFileAccess.ReadWrite: - return O_RDWR; - - case MemoryMappedFileAccess.Write: - return O_WRONLY; + [MethodImplAttribute (MethodImplOptions.InternalCall)] + internal extern static void ConfigureHandleInheritability (IntPtr handle, HandleInheritability inheritability); - case MemoryMappedFileAccess.ReadExecute: - case MemoryMappedFileAccess.Read: - default: - return O_RDONLY; - } - } + [MethodImplAttribute (MethodImplOptions.InternalCall)] + internal extern static bool Unmap (IntPtr mmap_handle); - static int ToUnixProts (MemoryMappedFileAccess access) - { - switch (access){ - case MemoryMappedFileAccess.ReadWrite: - return PROT_WRITE | PROT_READ; - - case MemoryMappedFileAccess.Write: - return PROT_WRITE; - - case MemoryMappedFileAccess.CopyOnWrite: - return PROT_WRITE | PROT_READ; - - case MemoryMappedFileAccess.ReadExecute: - return PROT_EXEC; - - case MemoryMappedFileAccess.ReadWriteExecute: - return PROT_WRITE | PROT_READ | PROT_EXEC; - - case MemoryMappedFileAccess.Read: + [MethodImplAttribute (MethodImplOptions.InternalCall)] + extern static int MapInternal (IntPtr handle, long offset, ref long size, MemoryMappedFileAccess access, out IntPtr mmap_handle, out IntPtr base_address); + + internal static void Map (IntPtr handle, long offset, ref long size, MemoryMappedFileAccess access, out IntPtr mmap_handle, out IntPtr base_address) + { + int error = MapInternal (handle, offset, ref size, access, out mmap_handle, out base_address); + if (error != 0) + throw CreateException (error, ""); + } + + static Exception CreateException (int error, string path) { + switch (error){ + case 1: + return new ArgumentException ("A positive capacity must be specified for a Memory Mapped File backed by an empty file."); + case 2: + return new ArgumentOutOfRangeException ("The capacity may not be smaller than the file size."); + case 3: + return new FileNotFoundException (path); + case 4: + return new IOException ("The file already exists"); + case 5: + return new PathTooLongException (); + case 6: + return new IOException ("Could not open file"); + case 7: + return new ArgumentException ("Capacity must be bigger than zero for non-file mappings"); + case 8: + return new ArgumentException ("Invalid FileMode value."); + case 9: + return new IOException ("Could not map file"); default: - return PROT_READ; - } - } - - static void ThrowErrorFromErrno (int errno) - { - switch (errno) { - case EINVAL: throw new ArgumentException (); - case ENAMETOOLONG: throw new PathTooLongException (); - default: throw new IOException ("Failed with errno " + errno); + return new IOException ("Failed with unknown error code " + error); } } - internal static int Open (string path, FileMode mode, ref long capacity, MemoryMappedFileAccess access) - { - long file_size = mono_filesize_from_path (path); - if (file_size < 0) - throw new FileNotFoundException (path); - - if (capacity > file_size) - throw new ArgumentException ("capacity"); - - int fd = open (path, ToUnixMode (mode) | ToUnixMode (access), DEFFILEMODE); - - if (fd == -1) - ThrowErrorFromErrno (Marshal.GetLastWin32Error ()); - return fd; - } - - internal static void CloseFD (int fd) - { - close (fd); - } - - internal static void Flush (int fd) - { - fsync (fd); - } - - internal static bool Unmap (IntPtr map_addr, ulong map_size) - { - return munmap (map_addr, (IntPtr)map_size) == 0; - } - - static int pagesize; - - internal static unsafe void Map (int file_handle, long offset, ref long size, MemoryMappedFileAccess access, out IntPtr map_addr, out int offset_diff) + internal static IntPtr OpenFile (string path, FileMode mode, string mapName, out long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options) { - if (pagesize == 0) - pagesize = getpagesize (); - - long fsize = mono_filesize_from_fd (file_handle); - if (fsize < 0) - throw new FileNotFoundException (); - - if (size == 0 || size > fsize) - size = fsize; - - // Align offset - long real_offset = offset & ~(pagesize - 1); - - offset_diff = (int)(offset - real_offset); - - map_addr = mmap (IntPtr.Zero, (IntPtr) size, - ToUnixProts (access), - access == MemoryMappedFileAccess.CopyOnWrite ? MAP_PRIVATE : MAP_SHARED, - file_handle, real_offset); - - if (map_addr == (IntPtr)(-1)) - throw new IOException ("mmap failed for fd#" + file_handle + "(" + offset + ", " + size + ")"); + int error = 0; + IntPtr res = OpenFileInternal (path, mode, mapName, out capacity, access, options, out error); + if (error != 0) + throw CreateException (error, path); + return res; } - internal static void ConfigureFD (IntPtr handle, HandleInheritability inheritability) + internal static IntPtr OpenHandle (IntPtr handle, string mapName, out long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options) { - int fd = (int)handle; - int flags = fcntl (fd, F_GETFD, 0); - if (inheritability == HandleInheritability.None) - flags &= ~FD_CLOEXEC; - else - flags |= FD_CLOEXEC; - fcntl (fd, F_SETFD, flags); + int error = 0; + IntPtr res = OpenHandleInternal (handle, mapName, out capacity, access, options, out error); + if (error != 0) + throw CreateException (error, ""); + return res; } - } -#endif + public class MemoryMappedFile : IDisposable { MemoryMappedFileAccess fileAccess; @@ -466,7 +124,7 @@ public class MemoryMappedFile : IDisposable { // FileStream stream; bool keepOpen; - int unix_fd; + IntPtr handle; public static MemoryMappedFile CreateFromFile (string path) { @@ -475,7 +133,21 @@ public static MemoryMappedFile CreateFromFile (string path) public static MemoryMappedFile CreateFromFile (string path, FileMode mode) { - return CreateFromFile (path, mode, null, 0, MemoryMappedFileAccess.ReadWrite); + long capacity = 0; + if (path == null) + throw new ArgumentNullException ("path"); + if (path.Length == 0) + throw new ArgumentException ("path"); + if (mode == FileMode.Append) + throw new ArgumentException ("mode"); + + IntPtr handle = MemoryMapImpl.OpenFile (path, mode, null, out capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages); + + return new MemoryMappedFile () { + handle = handle, + fileAccess = MemoryMappedFileAccess.ReadWrite, + fileCapacity = capacity + }; } public static MemoryMappedFile CreateFromFile (string path, FileMode mode, string mapName) @@ -501,26 +173,21 @@ public static MemoryMappedFile CreateFromFile (string path, FileMode mode, strin if (capacity < 0) throw new ArgumentOutOfRangeException ("capacity"); - int fd = MemoryMapImpl.Open (path, mode, ref capacity, access); + IntPtr handle = MemoryMapImpl.OpenFile (path, mode, mapName, out capacity, access, MemoryMappedFileOptions.DelayAllocatePages); return new MemoryMappedFile () { - unix_fd = fd, + handle = handle, fileAccess = access, name = mapName, fileCapacity = capacity }; } -#if MOBILE - public static MemoryMappedFile CreateFromFile (FileStream fileStream, string mapName, long capacity, MemoryMappedFileAccess access, - HandleInheritability inheritability, - bool leaveOpen) -#else + [MonoLimitation ("memoryMappedFileSecurity is currently ignored")] public static MemoryMappedFile CreateFromFile (FileStream fileStream, string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability inheritability, bool leaveOpen) -#endif { if (fileStream == null) throw new ArgumentNullException ("fileStream"); @@ -529,86 +196,92 @@ public static MemoryMappedFile CreateFromFile (FileStream fileStream, string map if ((!MonoUtil.IsUnix && capacity == 0 && fileStream.Length == 0) || (capacity > fileStream.Length)) throw new ArgumentException ("capacity"); - MemoryMapImpl.ConfigureFD (fileStream.Handle, inheritability); + IntPtr handle = MemoryMapImpl.OpenHandle (fileStream.Handle, mapName, out capacity, access, MemoryMappedFileOptions.DelayAllocatePages); + + MemoryMapImpl.ConfigureHandleInheritability (handle, inheritability); return new MemoryMappedFile () { - stream = fileStream, + handle = handle, fileAccess = access, name = mapName, fileCapacity = capacity, + + stream = fileStream, keepOpen = leaveOpen }; } - [MonoLimitation ("CreateNew requires that mapName be a file name on Unix")] + + static MemoryMappedFile CoreShmCreate (string mapName, long capacity, MemoryMappedFileAccess access, + MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity, + HandleInheritability inheritability, FileMode mode) + { + if (mapName != null && mapName.Length == 0) + throw new ArgumentException ("mapName"); + if (capacity < 0) + throw new ArgumentOutOfRangeException ("capacity"); + + IntPtr handle = MemoryMapImpl.OpenFile (null, mode, mapName, out capacity, access, options); + + return new MemoryMappedFile () { + handle = handle, + fileAccess = access, + name = mapName, + fileCapacity = capacity + }; + } + + [MonoLimitation ("Named mappings scope is process local")] public static MemoryMappedFile CreateNew (string mapName, long capacity) { -#if MOBILE - return CreateNew (mapName, capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages, 0); -#else - return CreateNew (mapName, capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages, null, 0); -#endif + return CreateNew (mapName, capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages, null, HandleInheritability.None); } - [MonoLimitation ("CreateNew requires that mapName be a file name on Unix")] + [MonoLimitation ("Named mappings scope is process local")] public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access) { -#if MOBILE - return CreateNew (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, 0); -#else - return CreateNew (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, 0); -#endif + return CreateNew (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, HandleInheritability.None); } -#if MOBILE - public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access, - MemoryMappedFileOptions options, - HandleInheritability handleInheritability) -#else - [MonoLimitation ("CreateNew requires that mapName be a file name on Unix; options and memoryMappedFileSecurity are ignored")] + [MonoLimitation ("Named mappings scope is process local; options and memoryMappedFileSecurity are ignored")] public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability inheritability) -#endif { - return CreateFromFile (mapName, FileMode.CreateNew, mapName, capacity, access); + return CoreShmCreate (mapName, capacity, access, options, memoryMappedFileSecurity, inheritability, FileMode.CreateNew); } - [MonoLimitation ("CreateOrOpen requires that mapName be a file name on Unix")] + [MonoLimitation ("Named mappings scope is process local")] public static MemoryMappedFile CreateOrOpen (string mapName, long capacity) { return CreateOrOpen (mapName, capacity, MemoryMappedFileAccess.ReadWrite); } - [MonoLimitation ("CreateOrOpen requires that mapName be a file name on Unix")] + [MonoLimitation ("Named mappings scope is process local")] public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access) { - return CreateFromFile (mapName, FileMode.OpenOrCreate, mapName, capacity, access); + return CreateOrOpen (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, HandleInheritability.None); } - [MonoTODO] -#if MOBILE - public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, HandleInheritability inheritability) -#else + [MonoLimitation ("Named mappings scope is process local")] public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability inheritability) -#endif { - throw new NotImplementedException (); + return CoreShmCreate (mapName, capacity, access, options, memoryMappedFileSecurity, inheritability, FileMode.OpenOrCreate); } - [MonoTODO] + [MonoLimitation ("Named mappings scope is process local")] public static MemoryMappedFile OpenExisting (string mapName) { throw new NotImplementedException (); } - [MonoTODO] + [MonoLimitation ("Named mappings scope is process local")] public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRights desiredAccessRights) { throw new NotImplementedException (); } - [MonoTODO] + [MonoLimitation ("Named mappings scope is process local")] public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRights desiredAccessRights, HandleInheritability inheritability) { throw new NotImplementedException (); @@ -616,7 +289,7 @@ public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRig public MemoryMappedViewStream CreateViewStream () { - return CreateViewStream (0, 0); + return CreateViewStream (0, 0);//FIXME this is wrong } public MemoryMappedViewStream CreateViewStream (long offset, long size) @@ -626,7 +299,7 @@ public MemoryMappedViewStream CreateViewStream (long offset, long size) public MemoryMappedViewStream CreateViewStream (long offset, long size, MemoryMappedFileAccess access) { - return new MemoryMappedViewStream (stream != null ? (int)stream.Handle : unix_fd, offset, size, access); + return new MemoryMappedViewStream (handle, offset, size, access); } public MemoryMappedViewAccessor CreateViewAccessor () @@ -641,9 +314,7 @@ public MemoryMappedViewAccessor CreateViewAccessor (long offset, long size) public MemoryMappedViewAccessor CreateViewAccessor (long offset, long size, MemoryMappedFileAccess access) { - int file_handle = stream != null ? (int) stream.Handle : unix_fd; - - return new MemoryMappedViewAccessor (file_handle, offset, size, access); + return new MemoryMappedViewAccessor (handle, offset, size, access); } MemoryMappedFile () @@ -661,17 +332,15 @@ protected virtual void Dispose (bool disposing) if (stream != null){ if (keepOpen == false) stream.Close (); - unix_fd = -1; stream = null; } - if (unix_fd != -1) { - MemoryMapImpl.CloseFD (unix_fd); - unix_fd = -1; + if (handle != IntPtr.Zero) { + MemoryMapImpl.CloseMapping (handle); + handle = IntPtr.Zero; } } } -#if !MOBILE [MonoTODO] public MemoryMappedFileSecurity GetAccessControl () { @@ -683,7 +352,6 @@ public void SetAccessControl (MemoryMappedFileSecurity memoryMappedFileSecurity) { throw new NotImplementedException (); } -#endif [MonoTODO] public SafeMemoryMappedFileHandle SafeMemoryMappedFileHandle { diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs index 0535337210d..c66acdb55c6 100644 --- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs +++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs @@ -36,14 +36,12 @@ namespace System.IO.MemoryMappedFiles { public sealed class MemoryMappedViewAccessor : UnmanagedMemoryAccessor, IDisposable { - int file_handle; - IntPtr mmap_addr; - SafeMemoryMappedViewHandle handle; + IntPtr mmap_handle; + SafeMemoryMappedViewHandle safe_handle; - internal MemoryMappedViewAccessor (int file_handle, long offset, long size, MemoryMappedFileAccess access) + internal MemoryMappedViewAccessor (IntPtr handle, long offset, long size, MemoryMappedFileAccess access) { - this.file_handle = file_handle; - Create (offset, size, access); + Create (handle, offset, size, access); } static FileAccess ToFileAccess (MemoryMappedFileAccess access) @@ -64,19 +62,19 @@ static FileAccess ToFileAccess (MemoryMappedFileAccess access) } } - unsafe void Create (long offset, long size, MemoryMappedFileAccess access) + unsafe void Create (IntPtr handle, long offset, long size, MemoryMappedFileAccess access) { - int offset_diff; + IntPtr base_address; - MemoryMapImpl.Map (file_handle, offset, ref size, access, out mmap_addr, out offset_diff); + MemoryMapImpl.Map (handle, offset, ref size, access, out mmap_handle, out base_address); + safe_handle = new SafeMemoryMappedViewHandle (mmap_handle, base_address, size); - handle = new SafeMemoryMappedViewHandle ((IntPtr)((long)mmap_addr + offset_diff), size); - Initialize (handle, 0, size, ToFileAccess (access)); + Initialize (safe_handle, 0, size, ToFileAccess (access)); } public SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle { get { - return handle; + return safe_handle; } } @@ -91,7 +89,7 @@ void IDisposable.Dispose () { public void Flush () { - MemoryMapImpl.Flush (file_handle); + MemoryMapImpl.Flush (mmap_handle); } } } diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs index 0f6aa75dc42..651e2d0d262 100644 --- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs +++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs @@ -35,15 +35,12 @@ namespace System.IO.MemoryMappedFiles { public sealed class MemoryMappedViewStream : UnmanagedMemoryStream { - IntPtr mmap_addr; - ulong mmap_size; + IntPtr mmap_handle; object monitor; - int fd; - internal MemoryMappedViewStream (int fd, long offset, long size, MemoryMappedFileAccess access) { - this.fd = fd; + internal MemoryMappedViewStream (IntPtr handle, long offset, long size, MemoryMappedFileAccess access) { monitor = new Object (); - CreateStream (fd, offset, size, access); + CreateStream (handle, offset, size, access); } public SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle { @@ -52,13 +49,13 @@ public SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle { } } - unsafe void CreateStream (int fd, long offset, long size, MemoryMappedFileAccess access) + unsafe void CreateStream (IntPtr handle, long offset, long size, MemoryMappedFileAccess access) { - int offset_diff; - mmap_size = (ulong) size; - MemoryMapImpl.Map (fd, offset, ref size, access, out mmap_addr, out offset_diff); - FileAccess faccess; + IntPtr base_address; + + MemoryMapImpl.Map (handle, offset, ref size, access, out mmap_handle, out base_address); + FileAccess faccess; switch (access) { case MemoryMappedFileAccess.ReadWrite: faccess = FileAccess.ReadWrite; @@ -72,23 +69,23 @@ unsafe void CreateStream (int fd, long offset, long size, MemoryMappedFileAccess default: throw new NotImplementedException ("access mode " + access + " not supported."); } - Initialize ((byte*)mmap_addr + offset_diff, size, size, faccess); + Initialize ((byte*)base_address, size, size, faccess); } protected override void Dispose (bool disposing) { base.Dispose (disposing); lock (monitor) { - if (mmap_addr != (IntPtr)(-1)) { - MemoryMapImpl.Unmap (mmap_addr, mmap_size); - mmap_addr = (IntPtr)(-1); + if (mmap_handle != (IntPtr)(-1)) { + MemoryMapImpl.Unmap (mmap_handle); + mmap_handle = (IntPtr)(-1); } } } public override void Flush () { - MemoryMapImpl.Flush (fd); + MemoryMapImpl.Flush (mmap_handle); } } } diff --git a/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs b/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs index 96a5fe1f8e3..d1d639b9a14 100644 --- a/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs +++ b/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs @@ -230,18 +230,23 @@ public void Process () var implementerToken = options.ImplementerToken; try { + // Avoid cache thrashing of locals array + var local = locals [index]; + if (seedFunc == null) { if (!enumerator.MoveNext ()) return; - locals[index] = (U)(object)enumerator.Current; + local = (U)(object)enumerator.Current; } while (enumerator.MoveNext ()) { if (implementerToken.IsCancellationRequested) break; token.ThrowIfCancellationRequested (); - locals[index] = localCall (locals[index], enumerator.Current); + local = localCall (local, enumerator.Current); } + + locals [index] = local; } finally { enumerator.Dispose (); } diff --git a/mcs/class/System.Core/Test/System.IO.MemoryMappedFiles/MemoryMappedFileTest.cs b/mcs/class/System.Core/Test/System.IO.MemoryMappedFiles/MemoryMappedFileTest.cs index 8047da25ee2..21aba946c55 100644 --- a/mcs/class/System.Core/Test/System.IO.MemoryMappedFiles/MemoryMappedFileTest.cs +++ b/mcs/class/System.Core/Test/System.IO.MemoryMappedFiles/MemoryMappedFileTest.cs @@ -51,6 +51,13 @@ void AssertThrows (Action del) where ExType : Exception { Assert.IsTrue (thrown); } + static int named_index; + static String MkNamedMapping () + { + return "test-" + named_index++; + } + + static string tempDir = Path.Combine (Path.GetTempPath (), typeof (MemoryMappedFileTest).FullName); string fname; @@ -92,6 +99,43 @@ public void Basic () { } } + [Test] + public void CreateNew () + { + // This must succeed + MemoryMappedFile.CreateNew (Path.Combine (tempDir, "createNew.test"), 8192); + } + + [Test] + [ExpectedException (typeof (IOException))] + public void CreateNew_OnExistingFile () + { + // This must succeed + MemoryMappedFile.CreateNew (Path.Combine (tempDir, "createNew.test"), 8192); + + // This should fail, the file exists + MemoryMappedFile.CreateNew (Path.Combine (tempDir, "createNew.test"), 8192); + } + + // Call this twice, it should always work + [Test] + public void CreateOrOpen_Multiple () + { + MemoryMappedFile.CreateOrOpen (Path.Combine (tempDir, "createOrOpen.test"), 8192); + MemoryMappedFile.CreateOrOpen (Path.Combine (tempDir, "createOrOpen.test"), 8192); + } + + [Test] + [ExpectedException(typeof(ArgumentOutOfRangeException))] + public void CreateFromFileWithSmallerCapacityThanFile () + { + var f = Path.Combine (tempDir, "8192-file"); + File.WriteAllBytes (f, new byte [8192]); + + // We are requesting fewer bytes to map. + MemoryMappedFile.CreateFromFile (f, FileMode.Open, "myMap", 4192); + } + [Test] public void CreateFromFile_Null () { AssertThrows (delegate () { @@ -169,6 +213,109 @@ public unsafe void ViewReadArray () { Assert.AreEqual ("Hello", s); } } + + + [Test] + public void NamedMappingToInvalidFile () + { + var fileName = Path.Combine (tempDir, "temp_file_123"); + if (File.Exists (fileName)) + File.Delete (fileName); + var memoryMappedFile90 = MemoryMappedFile.CreateNew (fileName, 4194304, MemoryMappedFileAccess.ReadWrite); + memoryMappedFile90.CreateViewStream (4186112, 3222, MemoryMappedFileAccess.Write); + } + + [Test] + public void CreateTheSameAreaTwiceShouldFail () + { + var name = MkNamedMapping (); + using (var m0 = MemoryMappedFile.CreateNew(name, 4096, MemoryMappedFileAccess.ReadWrite)) { + try { + using (var m1 = MemoryMappedFile.CreateNew (name, 4096, MemoryMappedFileAccess.ReadWrite)) { + Assert.Fail ("Must fail"); + } + } catch (IOException) {} + } + } + + [Test] + public void MapAFileToAMemoryAreaShouldFail () + { + var name = MkNamedMapping (); + using (var m0 = MemoryMappedFile.CreateNew(name, 4096, MemoryMappedFileAccess.ReadWrite)) { + try { + using (var m1 = MemoryMappedFile.CreateFromFile (fname, FileMode.OpenOrCreate, name)) { + Assert.Fail ("Must fail"); + } + } catch (IOException) {} + } + } + + [Test] + public void NamedMappingsShareMemoryArea () + { + var name = MkNamedMapping (); + using (var m0 = MemoryMappedFile.CreateNew(name, 4096, MemoryMappedFileAccess.ReadWrite)) { + using (var m1 = MemoryMappedFile.CreateOrOpen (name, 4096, MemoryMappedFileAccess.ReadWrite)) { + using (MemoryMappedViewAccessor v0 = m0.CreateViewAccessor (), v1 = m1.CreateViewAccessor ()) { + v0.Write (10, 0x12345); + Assert.AreEqual (0x12345, v1.ReadInt32 (10)); + } + } + } + } + + [Test] + public void NamedFileCanBeOpen () + { + var name = MkNamedMapping (); + using (var sw = new FileStream (fname, FileMode.Open)) { + byte[] b = new byte[20]; + for (int i = 0; i < 20; ++i) + b[i] = 0xFF; + sw.Write (b, 0, 20); + } + + using (var m0 = MemoryMappedFile.CreateFromFile (fname, FileMode.Open, name)) { + using (var m1 = MemoryMappedFile.CreateOrOpen (name, 4096)) { + using (MemoryMappedViewAccessor v0 = m0.CreateViewAccessor (), v1 = m1.CreateViewAccessor ()) { + v0.Write (10, 0x11223344); + Assert.AreEqual (0x11223344, v1.ReadInt32 (10)); + } + } + } + } + + [Test] + public void MapAtEdgeOfPage () + { + using (var f = new FileStream (fname, FileMode.Open)) { + var b = new byte [4096]; + for (int i = 0; i < 4096; ++i) + b[i] = 0xAA; + for (int i = 0; i < 2; ++i) + f.Write (b, 0, 4096); + } + var m0 = MemoryMappedFile.CreateFromFile (fname, FileMode.Open); + var v0 = m0.CreateViewAccessor (500, 4096); + var v1 = m0.CreateViewAccessor (0, 4096 * 2); + for (int i = 0; i < 4096; ++i) { + Assert.AreEqual (0xAA, v1.ReadByte (i + 500)); + v0.Write (i, (byte)0xFF); + Assert.AreEqual (0xFF, v1.ReadByte (i + 500)); + } + } + + [Test] + public void DoubleAccountingInOffsetCalculation () + { + var memoryMappedFile90 = MemoryMappedFile.CreateNew (MkNamedMapping (), 4194304, MemoryMappedFileAccess.ReadWrite); + var stream = memoryMappedFile90.CreateViewStream (4186112, 3222, MemoryMappedFileAccess.Write); + using (var tw = new StreamWriter(stream)) + { + tw.WriteLine ("Hello World!"); + } + } } } diff --git a/mcs/class/System.Core/mobile_System.Core.dll.sources b/mcs/class/System.Core/mobile_System.Core.dll.sources index ba66db603d7..a63481f69d6 100644 --- a/mcs/class/System.Core/mobile_System.Core.dll.sources +++ b/mcs/class/System.Core/mobile_System.Core.dll.sources @@ -93,6 +93,7 @@ System.IO.MemoryMappedFiles/MemoryMappedFile.cs System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs +System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs diff --git a/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs b/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs index 3208718e7da..256da0cfa14 100644 --- a/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs +++ b/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs @@ -136,10 +136,10 @@ private object ReadNumber () string str = sb.ToString (); - if (str.IndexOf(".") == -1) - return Int64.Parse (str); - else - return double.Parse (str); + if (str.IndexOf ('.') < 0) + return Int64.Parse (str, CultureInfo.InvariantCulture); + + return double.Parse (str, CultureInfo.InvariantCulture); } private char ProcessEscapes(char c) @@ -327,7 +327,7 @@ private int ParseToken () case '#': string date = ReadString ('#'); - val = DateTime.Parse (date); + val = DateTime.Parse (date, CultureInfo.InvariantCulture); return Token.DateLiteral; case '\'': diff --git a/mcs/class/System.Data/System.Data/DataColumn.cs b/mcs/class/System.Data/System.Data/DataColumn.cs index 166be8d8f48..7e7cedae6f2 100644 --- a/mcs/class/System.Data/System.Data/DataColumn.cs +++ b/mcs/class/System.Data/System.Data/DataColumn.cs @@ -474,7 +474,7 @@ void SetDefaultValue (object value, bool forcedTypeCheck) public string Expression { get { return _expression; } set { - if (value == null) + if (value == null || value.Trim () == string.Empty) value = String.Empty; CompileExpression (value); diff --git a/mcs/class/System.Data/System.Data/DataRow.cs b/mcs/class/System.Data/System.Data/DataRow.cs index 6b6299f41a8..f3fa2a8e77c 100644 --- a/mcs/class/System.Data/System.Data/DataRow.cs +++ b/mcs/class/System.Data/System.Data/DataRow.cs @@ -134,10 +134,7 @@ public bool HasErrors { public object this [string columnName] { get { return this [columnName, DataRowVersion.Default]; } set { - DataColumn column = _table.Columns [columnName]; - if (column == null) - throw new ArgumentException ("The column '" + columnName + - "' does not belong to the table : " + _table.TableName); + DataColumn column = GetColumn (columnName); this [column.Ordinal] = value; } } @@ -202,10 +199,7 @@ public object this [int columnIndex] { /// public object this [string columnName, DataRowVersion version] { get { - DataColumn column = _table.Columns [columnName]; - if (column == null) - throw new ArgumentException ("The column '" + columnName + - "' does not belong to the table : " + _table.TableName); + DataColumn column = GetColumn (columnName); return this [column.Ordinal, version]; } } @@ -1248,7 +1242,7 @@ public bool IsNull (int columnIndex) /// public bool IsNull (string columnName) { - return IsNull (Table.Columns [columnName]); + return IsNull (GetColumn (columnName)); } /// @@ -1257,6 +1251,17 @@ public bool IsNull (string columnName) /// public bool IsNull (DataColumn column, DataRowVersion version) { + if (column == null) + throw new ArgumentNullException ("column"); + + // use the expresion if there is one + if (column.Expression != String.Empty) { + // FIXME: how does this handle 'version'? + // TODO: Can we avoid the Eval each time by using the cached value? + object o = column.CompiledExpression.Eval (this); + return o == null && o == DBNull.Value; + } + return column.DataContainer.IsNull (IndexFromVersion (version)); } @@ -1692,5 +1697,15 @@ internal void Load (object [] values, LoadOption loadOption) } } #endif // NET_2_0 + + DataColumn GetColumn (string columnName) + { + DataColumn column = _table.Columns [columnName]; + + if (column == null) + throw new ArgumentException ("The column '" + columnName + "' does not belong to the table " + _table.TableName); + + return column; + } } } diff --git a/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs b/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs index f0f68c3207c..096c72fd1cf 100644 --- a/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs @@ -542,6 +542,23 @@ public void Expression() Assert.AreEqual(sExpression,dc.Expression, "dce#2"); } + [Test] + public void Expression_Whitespace () + { + DataColumn dc = new DataColumn ("ColName", typeof(string)); + + string plainWhitespace = " "; + string surroundWhitespace = " 'abc' "; + + Assert.AreEqual (string.Empty, dc.Expression, "dce#1"); + + dc.Expression = plainWhitespace; + Assert.AreEqual (string.Empty, dc.Expression, "dce#2"); + + dc.Expression = surroundWhitespace; + Assert.AreEqual (surroundWhitespace, dc.Expression, "dce#3"); + } + [Test] public void Expression_Exceptions() { diff --git a/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs b/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs index 14333e2201a..4dc0d77495e 100644 --- a/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs @@ -2125,6 +2125,59 @@ public void IsNull_ByName() #endregion } + [Test] + public void IsNull_BeforeGetValue () + { + DataTable table = new DataTable (); + + // add the row, with the value in the column + DataColumn staticColumn = table.Columns.Add ("static", typeof(string), null); // static + DataRow row = table.Rows.Add ("the value"); + Assert.IsFalse (row.IsNull ("static"), "static null check failed"); + Assert.AreEqual ("the value", row ["static"], "static value check failed"); + + // add the first derived column + DataColumn firstColumn = table.Columns.Add ("first", typeof(string), "static"); // first -> static + Assert.IsFalse (row.IsNull ("first"), "first level null check failed"); + Assert.AreEqual ("the value", row ["first"], "first level value check failed"); + + // add the second level of related + DataColumn secondColumn = table.Columns.Add ("second", typeof(string), "first"); // second -> first -> static + Assert.IsFalse (row.IsNull ("second"), "second level null check failed"); + Assert.AreEqual ("the value", row ["second"], "second level value check failed"); + } + + [Test] + public void IsNull_NullValueArguments () + { + DataTable table = new DataTable (); + + // add the row, with the value in the column + DataColumn staticColumn = table.Columns.Add ("static", typeof(string), null); + DataRow row = table.Rows.Add ("the value"); + + try { + row.IsNull ((string)null); + Assert.Fail ("expected an arg null exception for passing a null string"); + } catch (ArgumentNullException) { + // do nothing as null columns aren't allowed + } + + try { + row.IsNull (""); + Assert.Fail ("expected an arg exception for passing an empty string"); + } catch (ArgumentException) { + // do nothing as we can't find a col with no name + } + + try { + row.IsNull (null, DataRowVersion.Default); + Assert.Fail ("null column with version check failed"); + } catch (ArgumentNullException) { + // do nothing as null columns aren't allowed + } + } + [Test] public void Item() { // init table with columns diff --git a/mcs/class/System.Drawing/System.Drawing/Graphics.cs b/mcs/class/System.Drawing/System.Drawing/Graphics.cs index 827bdee0881..6e18fe690df 100644 --- a/mcs/class/System.Drawing/System.Drawing/Graphics.cs +++ b/mcs/class/System.Drawing/System.Drawing/Graphics.cs @@ -1744,7 +1744,7 @@ public static Graphics FromHwnd (IntPtr hwnd) if (GDIPlus.Display == IntPtr.Zero) { GDIPlus.Display = GDIPlus.XOpenDisplay (IntPtr.Zero); if (GDIPlus.Display == IntPtr.Zero) - throw new NotSupportedException ("Could not open display (X-Server required. Check you DISPLAY environment variable)"); + throw new NotSupportedException ("Could not open display (X-Server required. Check your DISPLAY environment variable)"); } if (hwnd == IntPtr.Zero) { hwnd = GDIPlus.XRootWindow (GDIPlus.Display, GDIPlus.XDefaultScreen (GDIPlus.Display)); diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs index b07e5b9415d..444e1e6066e 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs @@ -28,6 +28,7 @@ using System; +using System.IO; using System.Drawing; using System.Drawing.Imaging; using System.Drawing.Drawing2D; @@ -125,6 +126,7 @@ public void TestDrawing () // save the drawing string file = "TestHatchBrush" + getOutSufix() + ".png"; bmp.Save (file, ImageFormat.Png); + File.Delete (file); } private void Constructors () diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs index 784e19b0ede..dcca275389d 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs @@ -27,6 +27,7 @@ // using System; +using System.IO; using System.Drawing; using System.Drawing.Imaging; using System.Security.Permissions; @@ -114,6 +115,8 @@ public void ColorMatrix2 () private void Bug80323 (Color c) { + string fileName = String.Format ("80323-{0}.png", c.ToArgb ().ToString ("X")); + // test case from bug #80323 ColorMatrix cm = new ColorMatrix (new float[][] { new float[] {1, 0, 0, 0, 0}, //R @@ -138,12 +141,14 @@ private void Bug80323 (Color c) g.DrawImage (bmp, new Rectangle (0, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.Pixel, null); g.DrawImage (bmp, new Rectangle (100, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.Pixel, ia); } - b.Save (String.Format ("80323-{0}.png", c.ToArgb ().ToString ("X"))); + b.Save (fileName); Assert.AreEqual (Color.FromArgb (255, 255, 155, 155), b.GetPixel (50, 50), "50,50"); Assert.AreEqual (Color.FromArgb (255, 255, 205, 205), b.GetPixel (150, 50), "150,50"); } } } + + File.Delete (fileName); } [Test] diff --git a/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs b/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs index ea7f6d3818b..8158dfd757b 100644 --- a/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs +++ b/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs @@ -58,6 +58,8 @@ public void ZipGetEntryReadMode() var nullEntry = archive.GetEntry("nonexisting"); Assert.IsNull(nullEntry); } + + File.Delete ("test.zip"); } [Test] @@ -75,6 +77,8 @@ public void ZipGetEntryCreateMode() Assert.Fail(); } + + File.Delete ("test.zip"); } [Test] @@ -90,6 +94,8 @@ public void ZipGetEntryUpdateMode() var nullEntry = archive.GetEntry("nonexisting"); Assert.IsNull(nullEntry); } + + File.Delete ("test.zip"); } [Test] @@ -104,6 +110,8 @@ public void ZipGetEntryOpen() var foo = entry.Open(); } + + File.Delete ("test.zip"); } [Test] @@ -125,6 +133,8 @@ public void ZipGetEntryDeleteReadMode() var entry = archive.GetEntry("foo.txt"); Assert.IsNull(entry); } + + File.Delete ("delete.zip"); } [Test] @@ -146,6 +156,8 @@ public void ZipGetEntryDeleteUpdateMode() var entry = archive.GetEntry("foo.txt"); Assert.IsNull(entry); } + + File.Delete ("delete.zip"); } [Test] @@ -157,6 +169,8 @@ public void ZipCreateArchive() var entry = archive.CreateEntry("foo.txt"); using (var stream = entry.Open()) { + using (var streamWriter = new StreamWriter(stream)) + streamWriter.Write("foo"); } } @@ -165,7 +179,14 @@ public void ZipCreateArchive() { var entry = archive.GetEntry("foo.txt"); Assert.IsNotNull(entry); + + var streamReader = new StreamReader(entry.Open()); + var text = streamReader.ReadToEnd(); + + Assert.AreEqual("foo", text); } + + File.Delete ("create.zip"); } [Test] @@ -184,6 +205,8 @@ public void ZipEnumerateEntriesReadMode() Assert.AreEqual("foobar/bar.txt", entries[3].FullName); Assert.AreEqual("foobar/foo.txt", entries[4].FullName); } + + File.Delete ("test.zip"); } [Test] @@ -202,6 +225,8 @@ public void ZipEnumerateEntriesUpdateMode() Assert.AreEqual("foobar/bar.txt", entries[3].FullName); Assert.AreEqual("foobar/foo.txt", entries[4].FullName); } + + File.Delete ("test.zip"); } [Test] @@ -219,6 +244,8 @@ public void ZipEnumerateEntriesCreateMode() Assert.Fail(); } + + File.Delete ("test.zip"); } } } diff --git a/mcs/class/System.IO.Compression/ZipArchiveEntry.cs b/mcs/class/System.IO.Compression/ZipArchiveEntry.cs index acfb8f3f2a2..cd783b8eb0c 100644 --- a/mcs/class/System.IO.Compression/ZipArchiveEntry.cs +++ b/mcs/class/System.IO.Compression/ZipArchiveEntry.cs @@ -112,15 +112,9 @@ public Stream Open() if (Archive.Mode == ZipArchiveMode.Create && openStream != null) throw new IOException("The archive for this entry was opened with the Create mode, and this entry has already been written to."); - var memoryStream = new MemoryStream(); - openStream = memoryStream; + openStream = entry.OpenEntryStream(); - if (Archive.Mode == ZipArchiveMode.Read || Archive.Mode == ZipArchiveMode.Update) - entry.WriteTo(memoryStream); - - memoryStream.Seek(0, SeekOrigin.Begin); - - return memoryStream; + return openStream; } } } diff --git a/mcs/class/System.Json/System.Json/JsonPrimitive.cs b/mcs/class/System.Json/System.Json/JsonPrimitive.cs index 64518785b87..5d47eb4a4e6 100644 --- a/mcs/class/System.Json/System.Json/JsonPrimitive.cs +++ b/mcs/class/System.Json/System.Json/JsonPrimitive.cs @@ -163,7 +163,16 @@ internal string GetFormattedString () return (string) value; throw new NotImplementedException ("GetFormattedString from value type " + value.GetType ()); case JsonType.Number: - return ((IFormattable) value).ToString ("G", NumberFormatInfo.InvariantInfo); + string s; + if (value is float || value is double) + // Use "round-trip" format + s = ((IFormattable) value).ToString ("R", NumberFormatInfo.InvariantInfo); + else + s = ((IFormattable) value).ToString ("G", NumberFormatInfo.InvariantInfo); + if (s == "NaN" || s == "Infinity" || s == "-Infinity") + return "\"" + s + "\""; + else + return s; default: throw new InvalidOperationException (); } diff --git a/mcs/class/System.Json/System.Json/JsonValue.cs b/mcs/class/System.Json/System.Json/JsonValue.cs index 1d16b88e3f4..d703edd5512 100644 --- a/mcs/class/System.Json/System.Json/JsonValue.cs +++ b/mcs/class/System.Json/System.Json/JsonValue.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Runtime.Serialization.Json; @@ -218,8 +219,8 @@ string DoEscapeString (StringBuilder sb, string src, int cur) if (src [i] == '"' || src [i] == '\\') { sb.Append (src, start, i - start); sb.Append ('\\'); - sb.Append (src [i++]); - start = i; + sb.Append (src [i]); + start = i + 1; } sb.Append (src, start, src.Length - start); return sb.ToString (); @@ -328,70 +329,70 @@ public static implicit operator bool (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToBoolean (((JsonPrimitive) value).Value); + return Convert.ToBoolean (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator byte (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToByte (((JsonPrimitive) value).Value); + return Convert.ToByte (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator char (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToChar (((JsonPrimitive) value).Value); + return Convert.ToChar (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator decimal (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToDecimal (((JsonPrimitive) value).Value); + return Convert.ToDecimal (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator double (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToDouble (((JsonPrimitive) value).Value); + return Convert.ToDouble (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator float (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToSingle (((JsonPrimitive) value).Value); + return Convert.ToSingle (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator int (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToInt32 (((JsonPrimitive) value).Value); + return Convert.ToInt32 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator long (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToInt64 (((JsonPrimitive) value).Value); + return Convert.ToInt64 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator sbyte (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToSByte (((JsonPrimitive) value).Value); + return Convert.ToSByte (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator short (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToInt16 (((JsonPrimitive) value).Value); + return Convert.ToInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator string (JsonValue value) @@ -405,21 +406,21 @@ public static implicit operator uint (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToUInt16 (((JsonPrimitive) value).Value); + return Convert.ToUInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator ulong (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToUInt64(((JsonPrimitive) value).Value); + return Convert.ToUInt64(((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator ushort (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToUInt16 (((JsonPrimitive) value).Value); + return Convert.ToUInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator DateTime (JsonValue value) diff --git a/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs b/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs index 2459c1fc3ad..02dd106dfd8 100644 --- a/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs +++ b/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs @@ -11,6 +11,8 @@ using System.IO; using System.Text; using System.Json; +using System.Globalization; +using System.Threading; namespace MonoTests.System { @@ -24,6 +26,14 @@ public void LoadWithTrailingComma () Assert.AreEqual (1, j.Count, "itemcount"); Assert.AreEqual (JsonType.String, j ["a"].JsonType, "type"); Assert.AreEqual ("b", (string) j ["a"], "value"); + + JsonValue.Parse ("[{ \"a\": \"b\",}]"); + } + + [Test] + public void LoadWithTrailingComma2 () + { + JsonValue.Parse ("[{ \"a\": \"b\",}]"); } // Test that we correctly serialize JsonArray with null elements. @@ -35,5 +45,141 @@ public void ToStringOnJsonArrayWithNulls () { var str = j.ToString (); Assert.AreEqual (str, "[1, 2, 3, null]"); } + + [Test] + public void QuoteEscapeBug_20869 () + { + Assert.AreEqual ((new JsonPrimitive ("\"\"")).ToString (), "\"\\\"\\\"\""); + } + + void ExpectError (string s) + { + try { + JsonValue.Parse (s); + Assert.Fail ("Expected ArgumentException for `" + s + "'"); + } catch (ArgumentException) { + } + } + + // Test whether an exception is thrown for invalid JSON + [Test] + public void CheckErrors () + { + ExpectError (@"-"); + ExpectError (@"- "); + ExpectError (@"1."); + ExpectError (@"1. "); + ExpectError (@"1e+"); + ExpectError (@"1 2"); + ExpectError (@"077"); + + ExpectError (@"[1,]"); + + //ExpectError (@"{""a"":1,}"); // Not valid JSON, allowed anyway + } + + // Parse a json string and compare to the expected value + void CheckDouble (double expected, string json) + { + double jvalue = (double) JsonValue.Parse (json); + Assert.AreEqual (expected, jvalue); + } + + // Convert a number to json and parse the string, then compare the result to the original value + void CheckDouble (double number) + { + double jvalue = (double) JsonValue.Parse (new JsonPrimitive (number).ToString ()); + Assert.AreEqual (number, jvalue); // should be exactly the same + } + + [Test] + public void CheckNumbers () + { + CheckDouble (0, "0"); + CheckDouble (0, "-0"); + CheckDouble (0, "0.00"); + CheckDouble (0, "-0.00"); + CheckDouble (1, "1"); + CheckDouble (1.1, "1.1"); + CheckDouble (-1, "-1"); + CheckDouble (-1.1, "-1.1"); + CheckDouble (1e-10, "1e-10"); + CheckDouble (1e+10, "1e+10"); + CheckDouble (1e-30, "1e-30"); + CheckDouble (1e+30, "1e+30"); + + CheckDouble (1, "\"1\""); + CheckDouble (1.1, "\"1.1\""); + CheckDouble (-1, "\"-1\""); + CheckDouble (-1.1, "\"-1.1\""); + + CheckDouble (double.NaN, "\"NaN\""); + CheckDouble (double.PositiveInfinity, "\"Infinity\""); + CheckDouble (double.NegativeInfinity, "\"-Infinity\""); + + ExpectError ("NaN"); + ExpectError ("Infinity"); + ExpectError ("-Infinity"); + + Assert.AreEqual ("1.1", new JsonPrimitive (1.1).ToString ()); + Assert.AreEqual ("-1.1", new JsonPrimitive (-1.1).ToString ()); + Assert.AreEqual ("1E-20", new JsonPrimitive (1e-20).ToString ()); + Assert.AreEqual ("1E+20", new JsonPrimitive (1e+20).ToString ()); + Assert.AreEqual ("1E-30", new JsonPrimitive (1e-30).ToString ()); + Assert.AreEqual ("1E+30", new JsonPrimitive (1e+30).ToString ()); + Assert.AreEqual ("\"NaN\"", new JsonPrimitive (double.NaN).ToString ()); + Assert.AreEqual ("\"Infinity\"", new JsonPrimitive (double.PositiveInfinity).ToString ()); + Assert.AreEqual ("\"-Infinity\"", new JsonPrimitive (double.NegativeInfinity).ToString ()); + + Assert.AreEqual ("1E-30", JsonValue.Parse ("1e-30").ToString ()); + Assert.AreEqual ("1E+30", JsonValue.Parse ("1e+30").ToString ()); + + CheckDouble (1); + CheckDouble (1.1); + CheckDouble (1.25); + CheckDouble (-1); + CheckDouble (-1.1); + CheckDouble (-1.25); + CheckDouble (1e-20); + CheckDouble (1e+20); + CheckDouble (1e-30); + CheckDouble (1e+30); + CheckDouble (3.1415926535897932384626433); + CheckDouble (3.1415926535897932384626433e-20); + CheckDouble (3.1415926535897932384626433e+20); + CheckDouble (double.NaN); + CheckDouble (double.PositiveInfinity); + CheckDouble (double.NegativeInfinity); + CheckDouble (double.MinValue); + CheckDouble (double.MaxValue); + + // A number which needs 17 digits (see http://stackoverflow.com/questions/6118231/why-do-i-need-17-significant-digits-and-not-16-to-represent-a-double) + CheckDouble (18014398509481982.0); + + // Values around the smallest positive decimal value + CheckDouble (1.123456789e-29); + CheckDouble (1.123456789e-28); + + CheckDouble (1.1E-29, "0.000000000000000000000000000011"); + // This is being parsed as a decimal and rounded to 1e-28, even though it can be more accurately be represented by a double + //CheckDouble (1.1E-28, "0.00000000000000000000000000011"); + } + + // Retry the test with different locales + [Test] + public void CheckNumbersCulture () + { + CultureInfo old = Thread.CurrentThread.CurrentCulture; + try { + Thread.CurrentThread.CurrentCulture = new CultureInfo ("en"); + CheckNumbers (); + Thread.CurrentThread.CurrentCulture = new CultureInfo ("fr"); + CheckNumbers (); + Thread.CurrentThread.CurrentCulture = new CultureInfo ("de"); + CheckNumbers (); + } finally { + Thread.CurrentThread.CurrentCulture = old; + } + } } } diff --git a/mcs/class/System.Net.Http/System.Net.Http/DelegatingHandler.cs b/mcs/class/System.Net.Http/System.Net.Http/DelegatingHandler.cs index 2458975d687..fe940df8962 100644 --- a/mcs/class/System.Net.Http/System.Net.Http/DelegatingHandler.cs +++ b/mcs/class/System.Net.Http/System.Net.Http/DelegatingHandler.cs @@ -34,6 +34,7 @@ namespace System.Net.Http public abstract class DelegatingHandler : HttpMessageHandler { bool disposed; + HttpMessageHandler handler; protected DelegatingHandler () { @@ -47,13 +48,24 @@ protected DelegatingHandler(HttpMessageHandler innerHandler) InnerHandler = innerHandler; } - public HttpMessageHandler InnerHandler { get; set; } + public HttpMessageHandler InnerHandler { + get { + return handler; + } + set { + if (value == null) + throw new ArgumentNullException ("InnerHandler"); + + handler = value; + } + } protected override void Dispose (bool disposing) { if (disposing && !disposed) { disposed = true; - InnerHandler.Dispose (); + if (InnerHandler != null) + InnerHandler.Dispose (); } base.Dispose (disposing); diff --git a/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs b/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs index fd9e444f7ed..7f74497c60b 100644 --- a/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs +++ b/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs @@ -327,6 +327,11 @@ protected async internal override Task SendAsync (HttpReque var stream = await wrequest.GetRequestStreamAsync ().ConfigureAwait (false); await request.Content.CopyToAsync (stream).ConfigureAwait (false); + } else if (HttpMethod.Post.Equals (request.Method) || HttpMethod.Put.Equals (request.Method) || HttpMethod.Delete.Equals (request.Method)) { + // Explicitly set this to make sure we're sending a "Content-Length: 0" header. + // This fixes the issue that's been reported on the forums: + // http://forums.xamarin.com/discussion/17770/length-required-error-in-http-post-since-latest-release + wrequest.ContentLength = 0; } HttpWebResponse wresponse = null; diff --git a/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources b/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources index e5ce8f75050..29d4d75f5e3 100644 --- a/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources +++ b/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources @@ -1,3 +1,4 @@ +System.Net.Http/DelegatingHandlerTest.cs System.Net.Http/ByteArrayContentTest.cs System.Net.Http/FormUrlEncodedContentTest.cs System.Net.Http/HttpClientHandlerTest.cs diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/DelegatingHandlerTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/DelegatingHandlerTest.cs new file mode 100644 index 00000000000..d6812e7f1d2 --- /dev/null +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/DelegatingHandlerTest.cs @@ -0,0 +1,63 @@ +// +// DelegatingHandlerTest.cs +// +// Authors: +// Marek Safar +// +// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using NUnit.Framework; +using System.Net.Http; +using System.IO; +using System.Threading.Tasks; + +namespace MonoTests.System.Net.Http +{ + [TestFixture] + public class DelegatingHandlerTest + { + class DefaultHandler : DelegatingHandler + { + } + + + [Test] + public void DisposeTest () + { + var handler = new DefaultHandler (); + handler.Dispose (); + } + + [Test] + public void InnerHandler_Invalid () + { + var handler = new DefaultHandler (); + try { + handler.InnerHandler = null; + Assert.Fail ("#1"); + } catch (ArgumentNullException) { + } + } + } +} diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs index edcd18fe2a4..d2871f60875 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs @@ -533,6 +533,38 @@ public void Send_Complete_Content_MaxResponseContentBufferSize_Error () } } + [Test] + public void Send_Complete_NoContent () + { + foreach (var method in new HttpMethod[] { HttpMethod.Post, HttpMethod.Put, HttpMethod.Delete }) { + bool? failed = null; + var listener = CreateListener (l => { + try { + var request = l.Request; + + Assert.AreEqual (2, request.Headers.Count, "#1"); + Assert.AreEqual ("0", request.Headers ["Content-Length"], "#1b"); + Assert.AreEqual (method.Method, request.HttpMethod, "#2"); + failed = false; + } catch { + failed = true; + } + }); + + try { + var client = new HttpClient (); + var request = new HttpRequestMessage (method, LocalServer); + var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result; + + Assert.AreEqual ("", response.Content.ReadAsStringAsync ().Result, "#100"); + Assert.AreEqual (HttpStatusCode.OK, response.StatusCode, "#101"); + Assert.AreEqual (false, failed, "#102"); + } finally { + listener.Close (); + } + } + } + [Test] public void Send_Complete_Error () { diff --git a/mcs/class/System.Numerics/System.Numerics/BigInteger.cs b/mcs/class/System.Numerics/System.Numerics/BigInteger.cs index b067997cb7c..329f91eed1f 100644 --- a/mcs/class/System.Numerics/System.Numerics/BigInteger.cs +++ b/mcs/class/System.Numerics/System.Numerics/BigInteger.cs @@ -315,12 +315,14 @@ public BigInteger (byte[] value) word = (uint)sub; borrow = (uint)(sub >> 32) & 0x1u; - data [data.Length - 1] = ~word & store_mask; + if ((~word & store_mask) == 0) + data = Resize (data, data.Length - 1); + else + data [data.Length - 1] = ~word & store_mask; } if (borrow != 0) //FIXME I believe this can't happen, can someone write a test for it? throw new Exception ("non zero final carry"); } - } public bool IsEven { diff --git a/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs b/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs index 4aa0ffbd029..817d13e40c1 100644 --- a/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs +++ b/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs @@ -550,13 +550,18 @@ public void LongCtorRoundTrip () { long[] values = new long [] { 0, long.MinValue, long.MaxValue, -1, 1L + int.MaxValue, -1L + int.MinValue, 0x1234, 0xFFFFFFFFL, 0x1FFFFFFFFL, -0xFFFFFFFFL, -0x1FFFFFFFFL, - 0x100000000L, -0x100000000L, 0x100000001L, -0x100000001L }; + 0x100000000L, -0x100000000L, 0x100000001L, -0x100000001L, 4294967295L, -4294967295L, 4294967296L, -4294967296L }; foreach (var val in values) { - var a = new BigInteger (val); - var b = new BigInteger (a.ToByteArray ()); - - Assert.AreEqual (val, (long)a, "#a_" + val); - Assert.AreEqual (val, (long)b, "#b_" + val); + try { + var a = new BigInteger (val); + var b = new BigInteger (a.ToByteArray ()); + + Assert.AreEqual (val, (long)a, "#a_" + val); + Assert.AreEqual (val, (long)b, "#b_" + val); + Assert.AreEqual (a, b, "#a == #b (" + val + ")"); + } catch (Exception e) { + Assert.Fail ("could not roundtrip {0}", val); + } } } diff --git a/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs b/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs index 2c9cafb0f6a..39b66d9ca19 100644 --- a/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs +++ b/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs @@ -1254,7 +1254,7 @@ public void TestCacheShrink () // add some short duration entries for (int i = 0; i < HEAP_RESIZE_SHORT_ENTRIES; i++) { - var expireAt = DateTimeOffset.Now.AddSeconds (1); + var expireAt = DateTimeOffset.Now.AddSeconds (3); mc.Add ("short-" + i, i.ToString (), expireAt); } @@ -1262,20 +1262,20 @@ public void TestCacheShrink () // add some long duration entries for (int i = 0; i < HEAP_RESIZE_LONG_ENTRIES; i++) { - var expireAt = DateTimeOffset.Now.AddSeconds (10); + var expireAt = DateTimeOffset.Now.AddSeconds (12); mc.Add ("long-" + i, i.ToString (), expireAt); } Assert.AreEqual (HEAP_RESIZE_LONG_ENTRIES + HEAP_RESIZE_SHORT_ENTRIES, mc.GetCount(), "#CS3"); // wait for the cache thread to expire the short duration items, this will also shrink the size of the cache - global::System.Threading.Thread.Sleep (3 * 1000); + global::System.Threading.Thread.Sleep (5 * 1000); Assert.AreEqual (HEAP_RESIZE_LONG_ENTRIES, mc.GetCount (), "#CS4"); // add some new items into the cache, this will grow the cache again for (int i = 0; i < HEAP_RESIZE_LONG_ENTRIES; i++) { - mc.Add("final-" + i, i.ToString (), DateTimeOffset.Now.AddSeconds (2)); + mc.Add("final-" + i, i.ToString (), DateTimeOffset.Now.AddSeconds (4)); } Assert.AreEqual (HEAP_RESIZE_LONG_ENTRIES + HEAP_RESIZE_LONG_ENTRIES, mc.GetCount (), "#CS5"); diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs index 891be5db3ee..2d11b1727ae 100644 --- a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs +++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs @@ -26,7 +26,7 @@ public object Read () { object v = ReadCore (); SkipSpaces (); - if (r.Read () >= 0) + if (ReadChar () >= 0) throw JsonError (String.Format ("extra characters in JSON input")); return v; } @@ -68,8 +68,10 @@ object ReadCore () } while (true) { SkipSpaces (); - if (PeekChar () == '}') + if (PeekChar () == '}') { + ReadChar (); break; + } string name = ReadStringLiteral (); SkipSpaces (); Expect (':'); @@ -160,98 +162,89 @@ void SkipSpaces () // It could return either int, long or decimal, depending on the parsed value. object ReadNumericLiteral () { + var sb = new StringBuilder (); + bool negative = false; if (PeekChar () == '-') { negative = true; - ReadChar (); - if (PeekChar () < 0) - throw JsonError ("Invalid JSON numeric literal; extra negation"); + sb.Append ((char) ReadChar ()); } int c; - decimal val = 0; int x = 0; bool zeroStart = PeekChar () == '0'; for (; ; x++) { c = PeekChar (); if (c < '0' || '9' < c) break; - val = val * 10 + (c - '0'); - ReadChar (); - if (zeroStart && x == 1 && c == '0') - throw JsonError ("leading multiple zeros are not allowed"); + sb.Append ((char) ReadChar ()); + if (zeroStart && x == 1) + throw JsonError ("leading zeros are not allowed"); } + if (x == 0) // Reached e.g. for "- " + throw JsonError ("Invalid JSON numeric literal; no digit found"); // fraction - bool hasFrac = false; - decimal frac = 0; int fdigits = 0; if (PeekChar () == '.') { hasFrac = true; - ReadChar (); + sb.Append ((char) ReadChar ()); if (PeekChar () < 0) throw JsonError ("Invalid JSON numeric literal; extra dot"); - decimal d = 10; while (true) { c = PeekChar (); if (c < '0' || '9' < c) break; - ReadChar (); - frac += (c - '0') / d; - d *= 10; + sb.Append ((char) ReadChar ()); fdigits++; } if (fdigits == 0) throw JsonError ("Invalid JSON numeric literal; extra dot"); } - frac = Decimal.Round (frac, fdigits); c = PeekChar (); if (c != 'e' && c != 'E') { if (!hasFrac) { - if (negative && int.MinValue <= -val || - !negative && val <= int.MaxValue) - return (int) (negative ? -val : val); - if (negative && long.MinValue <= -val || - !negative && val <= long.MaxValue) - return (long) (negative ? -val : val); + int valueInt; + if (int.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueInt)) + return valueInt; + + long valueLong; + if (long.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueLong)) + return valueLong; + + ulong valueUlong; + if (ulong.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueUlong)) + return valueUlong; } - var v = val + frac; - return negative ? -v : v; - } - - // exponent - - ReadChar (); - - int exp = 0; - if (PeekChar () < 0) - throw new ArgumentException ("Invalid JSON numeric literal; incomplete exponent"); + decimal valueDecimal; + if (decimal.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueDecimal) && valueDecimal != 0) + return valueDecimal; + } else { + // exponent + sb.Append ((char) ReadChar ()); + if (PeekChar () < 0) + throw new ArgumentException ("Invalid JSON numeric literal; incomplete exponent"); - bool negexp = false; - c = PeekChar (); - if (c == '-') { - ReadChar (); - negexp = true; - } - else if (c == '+') - ReadChar (); - - if (PeekChar () < 0) - throw JsonError ("Invalid JSON numeric literal; incomplete exponent"); - while (true) { c = PeekChar (); - if (c < '0' || '9' < c) - break; - exp = exp * 10 + (c - '0'); - ReadChar (); + if (c == '-') { + sb.Append ((char) ReadChar ()); + } + else if (c == '+') + sb.Append ((char) ReadChar ()); + + if (PeekChar () < 0) + throw JsonError ("Invalid JSON numeric literal; incomplete exponent"); + while (true) { + c = PeekChar (); + if (c < '0' || '9' < c) + break; + sb.Append ((char) ReadChar ()); + } } - // it is messy to handle exponent, so I just use Decimal.Parse() with assured JSON format. - if (negexp) - return new Decimal ((double) (val + frac) / Math.Pow (10, exp)); - int [] bits = Decimal.GetBits (val + frac); - return new Decimal (bits [0], bits [1], bits [2], negative, (byte) exp); + + return double.Parse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture); } StringBuilder vb = new StringBuilder (); diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs index cf1038dac22..99376fbcd64 100644 --- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs +++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs @@ -45,7 +45,7 @@ public class WebServiceHostTest [Category("NotWorking")] public void ServiceDebugBehaviorTest () { - var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/")); + var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/")); ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding"); Assert.AreEqual (true, host.Description.Behaviors.Find ().HttpHelpPageEnabled, "HttpHelpPageEnabled #1"); @@ -63,7 +63,7 @@ public void ServiceDebugBehaviorTest () { [Category ("NotWorking")] public void WebHttpBehaviorTest1 () { - var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/")); + var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/")); ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding"); ServiceEndpoint basicHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new BasicHttpBinding (), "BasicHttpBinding"); @@ -83,7 +83,7 @@ public void WebHttpBehaviorTest1 () { [Category("NotWorking")] public void WebHttpBehaviorTest2 () { - var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/")); + var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/")); ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding"); MyWebHttpBehavior behavior = new MyWebHttpBehavior (); behavior.ApplyDispatchBehaviorBegin += delegate { @@ -103,7 +103,7 @@ public void WebHttpBehaviorTest2 () { [Test] public void ServiceBaseUriTest () { - var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/")); + var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/")); Assert.AreEqual (0, host.Description.Endpoints.Count, "no endpoints yet"); host.Open (); Assert.AreEqual (1, host.Description.Endpoints.Count, "default endpoint after open"); @@ -136,4 +136,4 @@ public string Greet (string input) { } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs index 50ae808fcbd..d145ed18e4f 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs @@ -52,11 +52,7 @@ public HttpChannelFactory (HttpTransportBindingElement source, BindingContext ct MessageEncoder = CreateEncoder (mbe); continue; } -#if NET_2_1 - var cbe = be as HttpCookieContainerBindingElement; - if (cbe != null) - cookie_manager = cbe.GetProperty (ctx); -#elif NET_4_0 +#if NET_2_1 || NET_4_0 var tbe = be as HttpTransportBindingElement; if (tbe != null) cookie_manager = tbe.GetProperty (ctx); diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/MetadataExchangeBindingsTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/MetadataExchangeBindingsTest.cs index 8f0be289fda..35cd408af1a 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/MetadataExchangeBindingsTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/MetadataExchangeBindingsTest.cs @@ -69,7 +69,7 @@ public void CreateMexHttpBinding () Assert.AreEqual (MessageVersion.Soap12WSAddressing10, b.GetProperty (new BindingParameterCollection ()), "#6"); var host = new ServiceHost (typeof (MetadataExchange)); - host.AddServiceEndpoint (typeof (IMetadataExchange), MetadataExchangeBindings.CreateMexHttpBinding (), CreateUri ("http://localhost:8080")); + host.AddServiceEndpoint (typeof (IMetadataExchange), MetadataExchangeBindings.CreateMexHttpBinding (), CreateUri ("http://localhost:30158")); host.Open (); try { // it still does not rewrite MessageVersion.None. It's rather likely ServiceMetadataExtension which does overwriting. @@ -96,7 +96,7 @@ public void CreateMexHttpsBinding() Assert.AreEqual(Uri.UriSchemeHttps, b.Scheme, "#8"); var host = new ServiceHost(typeof(MetadataExchange)); - host.AddServiceEndpoint(typeof(IMetadataExchange), MetadataExchangeBindings.CreateMexHttpsBinding(), CreateUri("https://localhost:8080")); + host.AddServiceEndpoint(typeof(IMetadataExchange), MetadataExchangeBindings.CreateMexHttpsBinding(), CreateUri("https://localhost:30158")); host.Open(); try { diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceMetadataBehaviorTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceMetadataBehaviorTest.cs index 38bece2f990..a4a22cb18d2 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceMetadataBehaviorTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceMetadataBehaviorTest.cs @@ -56,7 +56,7 @@ public string GetData () { [Test] public void InitializeRuntime1 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "e1"); host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true }); @@ -93,10 +93,10 @@ public void InitializeRuntime1 () { [Test] public void InitializeRuntime2 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), ""); - host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex_and_help") }); - host.Description.Behaviors.Find ().HttpHelpPageUrl = new Uri ("http://localhost:8080/mex_and_help"); + host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex_and_help") }); + host.Description.Behaviors.Find ().HttpHelpPageUrl = new Uri ("http://localhost:30158/mex_and_help"); Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1"); @@ -125,10 +125,10 @@ public void InitializeRuntime2 () { [Test] public void InitializeRuntime3 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), ""); - host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") }); - host.Description.Behaviors.Find ().HttpHelpPageUrl = new Uri ("http://localhost:8080/help"); + host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") }); + host.Description.Behaviors.Find ().HttpHelpPageUrl = new Uri ("http://localhost:30158/help"); Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1"); @@ -176,9 +176,9 @@ public void InitializeRuntime3 () { [Test] public void InitializeRuntime4 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), ""); - host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") }); + host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") }); host.Description.Behaviors.Remove (); Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1"); @@ -204,7 +204,7 @@ public void InitializeRuntime4 () { Assert.AreEqual (0, ed.FilterPriority, "FilterPriority"); EndpointAddress ea = ed.EndpointAddress; - Assert.AreEqual (new Uri ("http://localhost:8080/mex"), ea.Uri, "Uri"); + Assert.AreEqual (new Uri ("http://localhost:30158/mex"), ea.Uri, "Uri"); DispatchRuntime dr = ed.DispatchRuntime; Assert.AreEqual (1, dr.Operations.Count, "Operations.Count"); @@ -221,9 +221,9 @@ public void InitializeRuntime4 () { [Test] public void ServiceMetadataExtension1 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), ""); - host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") }); + host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") }); host.Description.Behaviors.Remove (); host.Open (); @@ -237,9 +237,9 @@ public void ServiceMetadataExtension1 () { [Test] public void ServiceMetadataExtension2 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), ""); - host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") }); + host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") }); host.Description.Behaviors.Remove (); ServiceMetadataExtension extension = new ServiceMetadataExtension (); diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs index adff5706c8d..3607b4f2a02 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs @@ -53,7 +53,7 @@ public void TestConstructor () // free to change if MS implementation does not make // sense. DispatchRuntime r = new EndpointDispatcher ( - new EndpointAddress ("http://localhost:8080"), "IFoo", "urn:foo").DispatchRuntime; + new EndpointAddress ("http://localhost:30158"), "IFoo", "urn:foo").DispatchRuntime; Assert.AreEqual (AuditLogLocation.Default, r.SecurityAuditLogLocation, "#1"); @@ -153,7 +153,7 @@ public void TestInstanceBehavior4 () void TestInstanceBehavior (MessageInspectBehavior b, string expected, Result actual, int invocations) { - ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158")); try { h.AddServiceEndpoint (typeof (IAllActions).FullName, new BasicHttpBinding (), "AllActions"); h.Description.Behaviors.Add (b); @@ -167,7 +167,7 @@ void TestInstanceBehavior (MessageInspectBehavior b, string expected, Result act Assert.AreEqual (typeof (AllActions), ed.DispatchRuntime.Type, "Type property: " + ed.ContractName); } } - AllActionsProxy p = new AllActionsProxy (new BasicHttpBinding () { SendTimeout = TimeSpan.FromSeconds (5), ReceiveTimeout = TimeSpan.FromSeconds (5) }, new EndpointAddress ("http://localhost:8080/AllActions")); + AllActionsProxy p = new AllActionsProxy (new BasicHttpBinding () { SendTimeout = TimeSpan.FromSeconds (5), ReceiveTimeout = TimeSpan.FromSeconds (5) }, new EndpointAddress ("http://localhost:30158/AllActions")); for (int i = 0; i < invocations; ++i) p.Get (10); diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs index a6bc6c5e6fc..593ded1b011 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs @@ -30,6 +30,7 @@ protected void SetUp () } [Test] + [Category ("NotWorking")] public void CloseTest () { cprs.Open (); @@ -79,6 +80,7 @@ public void OpenTest3 () [Test] [ExpectedException (typeof (InvalidOperationException))] + [Category ("NotWorking")] public void OpenTest4 () { cprs.Open (); diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs index 427127e9468..70efef2761c 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs @@ -483,12 +483,12 @@ public void OneWayOperationWithRequestReplyChannel () var host = new ServiceHost (typeof (OneWayService)); host.AddServiceEndpoint (typeof (IOneWayService), new BasicHttpBinding (), - new Uri ("http://localhost:8080")); + new Uri ("http://localhost:30158")); host.Open (); try { var cf = new ChannelFactory ( new BasicHttpBinding (), - new EndpointAddress ("http://localhost:8080")); + new EndpointAddress ("http://localhost:30158")); var ch = cf.CreateChannel (); ch.GiveMessage ("test"); diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs index a5684e24b5f..d73d516cbbb 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs @@ -159,7 +159,7 @@ public string GetData () { [Test] public void ChannelDispatchers_NoDebug () { - ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158")); h.AddServiceEndpoint (typeof (AllActions).FullName, new BasicHttpBinding (), "address"); ServiceDebugBehavior b = h.Description.Behaviors.Find (); @@ -173,7 +173,7 @@ public void ChannelDispatchers_NoDebug () { Assert.IsTrue (channelDispatcher.Endpoints.Count == 1, "#2"); EndpointAddressMessageFilter filter = channelDispatcher.Endpoints [0].AddressFilter as EndpointAddressMessageFilter; Assert.IsNotNull (filter, "#3"); - Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:8080/address")), "#4"); + Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:30158/address")), "#4"); Assert.IsFalse (filter.IncludeHostNameInComparison, "#5"); Assert.IsTrue (channelDispatcher.Endpoints [0].ContractFilter is MatchAllMessageFilter, "#6"); } finally { @@ -183,11 +183,11 @@ public void ChannelDispatchers_NoDebug () { [Test] public void ChannelDispatchers_WithDebug () { - ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158")); h.AddServiceEndpoint (typeof (AllActions).FullName, new BasicHttpBinding (), "address"); ServiceMetadataBehavior b = new ServiceMetadataBehavior (); b.HttpGetEnabled = true; - b.HttpGetUrl = new Uri( "http://localhost:8080" ); + b.HttpGetUrl = new Uri( "http://localhost:30158" ); h.Description.Behaviors.Add (b); h.Open (); @@ -197,7 +197,7 @@ public void ChannelDispatchers_WithDebug () { Assert.IsTrue (channelDispatcher.Endpoints.Count == 1, "#3"); EndpointAddressMessageFilter filter = channelDispatcher.Endpoints [0].AddressFilter as EndpointAddressMessageFilter; Assert.IsNotNull (filter, "#4"); - Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:8080")), "#5"); + Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:30158")), "#5"); Assert.IsFalse (filter.IncludeHostNameInComparison, "#6"); Assert.IsTrue (channelDispatcher.Endpoints [0].ContractFilter is MatchAllMessageFilter, "#7"); h.Close (); @@ -207,7 +207,7 @@ public void ChannelDispatchers_WithDebug () { public void SpecificActionTest () { //EndpointDispatcher d = new EndpointDispatcher( - ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:30158")); h.AddServiceEndpoint (typeof (Action1Interface), new BasicHttpBinding (), "address"); h.Open (); @@ -222,7 +222,7 @@ public void SpecificActionTest () [Test] public void InitializeRuntimeBehaviors1 () { HostState st = new HostState (); - ServiceHost h = new ServiceHost (typeof (SpecificAction2), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (SpecificAction2), new Uri ("http://localhost:30158")); h.AddServiceEndpoint (typeof (SpecificAction2), new BasicHttpBinding (), "temp"); h.Description.Behaviors.Add (new MyServiceBehavior (st, h)); @@ -241,7 +241,7 @@ public void InitializeRuntimeBehaviors1 () { [Test] public void InitializeRuntimeBehaviors2 () { HostState st = new HostState (); - ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:30158")); h.AddServiceEndpoint (typeof (Action1Interface), new BasicHttpBinding (), "temp"); h.AddServiceEndpoint (typeof (Action2Interface), new BasicHttpBinding (), "temp2"); @@ -368,7 +368,7 @@ ServiceHost OpenHost (string address, Binding binding) public void AddServiceEndpoint_Directly () { var host = new ServiceHost (typeof (DummyService)); - var address = new EndpointAddress ("http://localhost:8080"); + var address = new EndpointAddress ("http://localhost:30158"); var binding = new BasicHttpBinding (); var contract = ContractDescription.GetContract (typeof (IDummyService)); host.AddServiceEndpoint (new ServiceEndpoint (contract, binding, address)); @@ -389,7 +389,7 @@ public void AddServiceEndpoint_Directly_NullAddress () public void AddServiceEndpoint_Directly_NullBinding () { var host = new ServiceHost (typeof (DummyService)); - var address = new EndpointAddress ("http://localhost:8080"); + var address = new EndpointAddress ("http://localhost:30158"); var contract = ContractDescription.GetContract (typeof (IDummyService)); host.AddServiceEndpoint (new ServiceEndpoint (contract, null, address)); } @@ -407,7 +407,7 @@ public void AddServiceMetadataEndpoint () public void AddServiceEndpoint_Directly_ContractMismatch () { var host = new ServiceHost (typeof (DummyService)); - var address = new EndpointAddress ("http://localhost:8080"); + var address = new EndpointAddress ("http://localhost:30158"); var binding = new BasicHttpBinding (); var contract = ContractDescription.GetContract (typeof (INotImplementedService)); host.AddServiceEndpoint (new ServiceEndpoint (contract, binding, address)); diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs b/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs index f8f65c52e8b..70e6fc9bebd 100644 --- a/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs +++ b/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs @@ -180,16 +180,20 @@ object ConvertToType (object obj, Type targetType) return c.ConvertFrom (obj); } - /* - * Take care of the special case whereas in JSON an empty string ("") really means - * an empty value - * (see: https://bugzilla.novell.com/show_bug.cgi?id=328836) - */ - if ((targetType.IsGenericType) && (targetType.GetGenericTypeDefinition() == typeof(Nullable<>))) - { - string s = obj as String; - if (String.IsNullOrEmpty(s)) + if ((targetType.IsGenericType) && (targetType.GetGenericTypeDefinition () == typeof (Nullable<>))) { + if (obj is String) { + /* + * Take care of the special case whereas in JSON an empty string ("") really means + * an empty value + * (see: https://bugzilla.novell.com/show_bug.cgi?id=328836) + */ + if(String.IsNullOrEmpty ((String)obj)) return null; + } else if (c.CanConvertFrom (typeof (string))) { + TypeConverter objConverter = TypeDescriptor.GetConverter (obj); + string s = objConverter.ConvertToInvariantString (obj); + return c.ConvertFromInvariantString (s); + } } return Convert.ChangeType (obj, targetType); diff --git a/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs b/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs index 5883104a95e..995590eeb2e 100644 --- a/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs +++ b/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs @@ -1365,5 +1365,28 @@ public void DeserializeDictionaryOfArrayList () var ret2vad = (IDictionary) ret2va [0]; Assert.AreEqual ("subval", ret2vad ["subkey"], "#2.4"); } + + class ClassWithNullableEnum + { + public MyEnum? Value { get; set; } + } + + [Test] + public void DeserializeNullableEnum () + { + var jsonValues = new Dictionary { + { "{\"Value\":0}", MyEnum.AAA}, + { "{\"Value\":\"0\"}", MyEnum.AAA}, + { "{\"Value\":null}", null} + }; + + var ser = new JavaScriptSerializer (); + + foreach (var kv in jsonValues) + { + var obj = ser.Deserialize (kv.Key); + Assert.AreEqual (kv.Value, obj.Value); + } + } } } diff --git a/mcs/class/System.Web/System.Web/HttpResponse.cs b/mcs/class/System.Web/System.Web/HttpResponse.cs index ad18b88a3c4..2491c9035d1 100644 --- a/mcs/class/System.Web/System.Web/HttpResponse.cs +++ b/mcs/class/System.Web/System.Web/HttpResponse.cs @@ -446,7 +446,7 @@ public bool SuppressContent { } [MonoTODO ("Not implemented")] - public void AddCacheDependency (CacheDependency[] dependencies) + public void AddCacheDependency (params CacheDependency[] dependencies) { throw new NotImplementedException (); } diff --git a/mcs/class/System.Web/System.Web/MimeTypes.cs b/mcs/class/System.Web/System.Web/MimeTypes.cs index 82ce306f60b..8b7bfcadf75 100644 --- a/mcs/class/System.Web/System.Web/MimeTypes.cs +++ b/mcs/class/System.Web/System.Web/MimeTypes.cs @@ -195,6 +195,7 @@ static MimeTypes () mimeTypes.Add ("htx", "text/html"); mimeTypes.Add ("ice", "x-conference/x-cooltalk"); mimeTypes.Add ("ico", "image/x-icon"); + mimeTypes.Add ("ics", "text/calendar"); mimeTypes.Add ("idc", "text/plain"); mimeTypes.Add ("ief", "image/ief"); mimeTypes.Add ("iefs", "image/ief"); @@ -271,11 +272,11 @@ static MimeTypes () mimeTypes.Add ("mme", "application/base64"); mimeTypes.Add ("mny", "application/x-msmoney"); mimeTypes.Add ("mod", "audio/mod"); - mimeTypes.Add ("moov", "video/quicktime"); - mimeTypes.Add ("movie", "video/x-sgi-movie"); mimeTypes.Add ("mov", "video/quicktime"); + mimeTypes.Add ("movie", "video/x-sgi-movie"); + mimeTypes.Add ("moov", "video/quicktime"); mimeTypes.Add ("mp2", "video/mpeg"); - mimeTypes.Add ("mp3", "audio/mpeg3"); + mimeTypes.Add ("mp3", "audio/mpeg"); mimeTypes.Add ("mp4", "video/mp4"); //mimeTypes.Add ("mp4a", "audio/mp4"); // A common but unofficial alternative to m4a mimeTypes.Add ("mpa", "audio/mpeg"); diff --git a/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs b/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs index d2bd8ce643f..1440358de4d 100644 --- a/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs @@ -135,8 +135,8 @@ static string DummySubstitutionCallback (HttpContext ctx) static readonly byte[] badSubstitutionResponseElement = { 0x0, 0x1, 0x0, 0x0, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC, 0x2, 0x0, 0x0, 0x0, 0x4D, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2C, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x30, 0x2C, 0x20, 0x43, 0x75, 0x6C, 0x74, 0x75, 0x72, 0x65, 0x3D, 0x6E, 0x65, 0x75, 0x74, 0x72, 0x61, 0x6C, 0x2C, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x4B, 0x65, 0x79, 0x54, 0x6F, 0x6B, 0x65, 0x6E, 0x3D, 0x62, 0x30, 0x33, 0x66, 0x35, 0x66, 0x37, 0x66, 0x31, 0x31, 0x64, 0x35, 0x30, 0x61, 0x33, 0x61, 0x5, 0x1, 0x0, 0x0, 0x0, 0x2E, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2E, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6E, 0x67, 0x2E, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6F, 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0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x1,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x9,0x6,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x7,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x8,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0x9,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xA,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; - static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x3,0x4,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x9,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xA,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xB,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xC,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xD,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,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0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; + static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1C,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x6F,0x6E,0x6F,0x4D,0x65,0x74,0x68,0x6F,0x64,0x9,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x8,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x9,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0xA,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xB,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x4,0x7,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x6,0x0,0x0,0x0,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x4,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0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6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x3,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x4,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x1C,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x6F,0x6E,0x6F,0x4D,0x65,0x74,0x68,0x6F,0x64,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x9,0x9,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0xA,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xB,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xC,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xD,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xE,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x4,0x9,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x6,0x0,0x0,0x0,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x4,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69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0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; #else static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x1,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x9,0x6,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x7,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x8,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0x9,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xA,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x3,0x4,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x9,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xA,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xB,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xC,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xD,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0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x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; @@ -208,7 +208,7 @@ public void Serialize () AssertExtensions.AreEqual (bytes, substitutionResponseElement, "#B3"); bytes = SerializeElement (sreBad); - AssertExtensions.AreEqual (bytes, badSubstitutionResponseElement, "#B3"); + AssertExtensions.AreEqual (bytes, badSubstitutionResponseElement, "#B4"); } [Test] diff --git a/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs index db2ea356666..1990089323b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs @@ -165,7 +165,6 @@ public void RenderPostBackEvent () pd.SaveStateComplete = RenderPostBackEvent_OnSaveStateComplete; t.Invoker = new PageInvoker (pd); string html = t.Run (); - File.WriteAllText("response.html", html); } public static void RenderPostBackEvent_OnSaveStateComplete (Page p) diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.cs index 0b1254fa5ea..03ced5c3918 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.cs @@ -18,11 +18,6 @@ namespace MonoTests.SystemWeb.Framework { internal class MyHost : MarshalByRefObject { - AutoResetEvent _done; - AutoResetEvent _doNext; - WebTest _currentTest; - Exception _e; - #region MyData class MyData { @@ -30,40 +25,12 @@ class MyData public Exception exception; } #endregion - - public MyHost () - { - _done = new AutoResetEvent (false); - _doNext = new AutoResetEvent (false); - ThreadPool.QueueUserWorkItem (new WaitCallback (param => { - try { - AsyncRun (param); - } catch {} - }), null); - } public AppDomain AppDomain { get { return AppDomain.CurrentDomain; } } public WebTest Run (WebTest t) { - _currentTest = t; - _doNext.Set (); - _done.WaitOne (); - if (_e != null) { - Exception e = _e; - _e = null; - throw e; - } - return t; - } - - void AsyncRun (object param) - { - for (;;) { - _doNext.WaitOne (); - try { - WebTest t = _currentTest; HttpWorkerRequest wr = t.Request.CreateWorkerRequest (); MyData data = GetMyData (wr); data.currentTest = t; @@ -74,12 +41,8 @@ void AsyncRun (object param) if (data.exception != null) RethrowException (data.exception); - } catch (Exception e) { - _e = e; - } - - _done.Set (); - } + + return t; } private static void RethrowException (Exception inner) diff --git a/mcs/class/System.Xaml/Makefile b/mcs/class/System.Xaml/Makefile index 04ad2dda799..17d16132910 100644 --- a/mcs/class/System.Xaml/Makefile +++ b/mcs/class/System.Xaml/Makefile @@ -18,7 +18,7 @@ TEST_EXTRA_DISTFILES = \ Test/XmlFiles/*.xml \ Test/XmlFiles/*.xaml -VALID_PROFILE := $(filter 4, $(FRAMEWORK_VERSION_MAJOR)) +VALID_PROFILE := $(filter 4 monodroid monotouch, $(FRAMEWORK_VERSION_MAJOR)) ifndef VALID_PROFILE LIBRARY_NAME = dummy-System.Xaml.dll NO_INSTALL = yes diff --git a/mcs/class/System.Xaml/System.Windows.Markup/AmbientAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/AmbientAttribute.cs index ff55aefc7cf..003f0c789e3 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/AmbientAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/AmbientAttribute.cs @@ -31,9 +31,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class AmbientAttribute : Attribute { } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ArrayExtension.cs b/mcs/class/System.Xaml/System.Windows.Markup/ArrayExtension.cs index 7a99b796010..e3da18695d9 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/ArrayExtension.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ArrayExtension.cs @@ -32,9 +32,7 @@ namespace System.Windows.Markup { [MarkupExtensionReturnType (typeof (Array))] [ContentProperty ("Items")] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)] -#endif public class ArrayExtension : MarkupExtension { public ArrayExtension () @@ -62,9 +60,7 @@ public ArrayExtension (Type arrayType) public Type Type { get; set; } IList items; -#if !NET_2_1 [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)] -#endif public IList Items { get { return items; } } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ConstructorArgumentAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/ConstructorArgumentAttribute.cs index 69a8b3f0ba6..7708fe7c078 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/ConstructorArgumentAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ConstructorArgumentAttribute.cs @@ -25,9 +25,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class ConstructorArgumentAttribute : Attribute { public ConstructorArgumentAttribute (string argumentName) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ContentPropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/ContentPropertyAttribute.cs index f772a2bd82e..5b3c078b70d 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/ContentPropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ContentPropertyAttribute.cs @@ -29,9 +29,7 @@ namespace System.Windows.Markup // member regardless of this attribute. [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class ContentPropertyAttribute : Attribute { public ContentPropertyAttribute () diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ContentWrapperAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/ContentWrapperAttribute.cs index 12e10c5e151..d64a2a9645b 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/ContentWrapperAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ContentWrapperAttribute.cs @@ -25,9 +25,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = true, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class ContentWrapperAttribute : Attribute { public ContentWrapperAttribute (Type contentWrapper) @@ -36,7 +34,8 @@ public ContentWrapperAttribute (Type contentWrapper) } public Type ContentWrapper { get; private set; } -#if !NET_2_1 + +#if !__MOBILE__ public override Object TypeId { get { return this; } } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/DateTimeValueSerializer.cs b/mcs/class/System.Xaml/System.Windows.Markup/DateTimeValueSerializer.cs index 5556e7f43c1..720a3517dcc 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/DateTimeValueSerializer.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/DateTimeValueSerializer.cs @@ -28,9 +28,7 @@ namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public class DateTimeValueSerializer : ValueSerializer { const DateTimeStyles styles = DateTimeStyles.RoundtripKind | DateTimeStyles.NoCurrentDateDefault | DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite; diff --git a/mcs/class/System.Xaml/System.Windows.Markup/DependsOnAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/DependsOnAttribute.cs index f49ce4fb5be..361df14ed60 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/DependsOnAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/DependsOnAttribute.cs @@ -25,9 +25,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class DependsOnAttribute : Attribute { public DependsOnAttribute (string name) @@ -37,7 +35,7 @@ public DependsOnAttribute (string name) public string Name { get; private set; } -#if !NET_2_1 +#if !__MOBILE__ // really? I doubt it should be overriden. public override Object TypeId { get { return this; } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs index df7f4482bdc..1664fe23a8d 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs @@ -25,9 +25,7 @@ namespace System.Windows.Markup { [AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class DictionaryKeyPropertyAttribute : Attribute { public DictionaryKeyPropertyAttribute (string name) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/IComponentConnector.cs b/mcs/class/System.Xaml/System.Windows.Markup/IComponentConnector.cs index 8b143b92791..5e6081628fd 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/IComponentConnector.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/IComponentConnector.cs @@ -28,9 +28,7 @@ namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public interface IComponentConnector { void Connect (int connectionId, object target); diff --git a/mcs/class/System.Xaml/System.Windows.Markup/INameScope.cs b/mcs/class/System.Xaml/System.Windows.Markup/INameScope.cs index 5c142ec0afa..3035a7cbc17 100644 --- a/mcs/class/System.Xaml/System.Windows.Markup/INameScope.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/INameScope.cs @@ -25,9 +25,7 @@ namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public interface INameScope { object FindName (string name); diff --git a/mcs/class/System.Xaml/System.Windows.Markup/IProvideValueTarget.cs b/mcs/class/System.Xaml/System.Windows.Markup/IProvideValueTarget.cs index 65c124bfc36..6a44ce005d1 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/IProvideValueTarget.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/IProvideValueTarget.cs @@ -28,9 +28,7 @@ namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)] -#endif public interface IProvideValueTarget { object TargetObject { get; } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/IUriContext.cs b/mcs/class/System.Xaml/System.Windows.Markup/IUriContext.cs index 7ace4b70cd7..252ab6964cd 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/IUriContext.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/IUriContext.cs @@ -28,9 +28,7 @@ namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationCore_3_5)] -#endif public interface IUriContext { Uri BaseUri { get; set; } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/IValueSerializerContext.cs b/mcs/class/System.Xaml/System.Windows.Markup/IValueSerializerContext.cs index 011c32e983a..bfc1e0a3720 100644 --- a/mcs/class/System.Xaml/System.Windows.Markup/IValueSerializerContext.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/IValueSerializerContext.cs @@ -29,9 +29,7 @@ namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public interface IValueSerializerContext : ITypeDescriptorContext, IServiceProvider { ValueSerializer GetValueSerializerFor (PropertyDescriptor descriptor); diff --git a/mcs/class/System.Xaml/System.Windows.Markup/IXamlTypeResolver.cs b/mcs/class/System.Xaml/System.Windows.Markup/IXamlTypeResolver.cs index c78be097471..563387c8421 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/IXamlTypeResolver.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/IXamlTypeResolver.cs @@ -28,9 +28,7 @@ namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public interface IXamlTypeResolver { Type Resolve (string qualifiedTypeName); diff --git a/mcs/class/System.Xaml/System.Windows.Markup/MarkupExtension.cs b/mcs/class/System.Xaml/System.Windows.Markup/MarkupExtension.cs index 9277a3ca7ac..f79cefd6e02 100644 --- a/mcs/class/System.Xaml/System.Windows.Markup/MarkupExtension.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/MarkupExtension.cs @@ -29,9 +29,7 @@ namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public abstract class MarkupExtension { public abstract object ProvideValue (IServiceProvider serviceProvider); diff --git a/mcs/class/System.Xaml/System.Windows.Markup/NameScopePropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/NameScopePropertyAttribute.cs index 3ecd55b2001..8e33e017cfc 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/NameScopePropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/NameScopePropertyAttribute.cs @@ -25,9 +25,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class NameScopePropertyAttribute : Attribute { public NameScopePropertyAttribute (string name) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/NullExtension.cs b/mcs/class/System.Xaml/System.Windows.Markup/NullExtension.cs index 9aef4b4d78f..19cd2cbf598 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/NullExtension.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/NullExtension.cs @@ -29,9 +29,7 @@ namespace System.Windows.Markup { [MarkupExtensionReturnType (typeof (Object))] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)] -#endif public class NullExtension : MarkupExtension { public override Object ProvideValue (IServiceProvider serviceProvider) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/RootNamespaceAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/RootNamespaceAttribute.cs index 392968b4328..040f1945a7a 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/RootNamespaceAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/RootNamespaceAttribute.cs @@ -25,9 +25,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Assembly)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class RootNamespaceAttribute : Attribute { public RootNamespaceAttribute (string nameSpace) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/RuntimeNamePropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/RuntimeNamePropertyAttribute.cs index ccd2cbc95bf..44c3706b502 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/RuntimeNamePropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/RuntimeNamePropertyAttribute.cs @@ -25,9 +25,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class RuntimeNamePropertyAttribute : Attribute { public RuntimeNamePropertyAttribute (string name) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/StaticExtension.cs b/mcs/class/System.Xaml/System.Windows.Markup/StaticExtension.cs index 465ba56521d..24df4f5a169 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/StaticExtension.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/StaticExtension.cs @@ -30,9 +30,7 @@ namespace System.Windows.Markup { [MarkupExtensionReturnType (typeof (object))] [TypeConverter (typeof (StaticExtensionConverter))] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)] -#endif public class StaticExtension : MarkupExtension { public StaticExtension () diff --git a/mcs/class/System.Xaml/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs index bf4309d6e33..371e3e06f8e 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs @@ -31,9 +31,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class TrimSurroundingWhitespaceAttribute : Attribute { } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/TypeExtension.cs b/mcs/class/System.Xaml/System.Windows.Markup/TypeExtension.cs index 00af705581e..42da7a13783 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/TypeExtension.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/TypeExtension.cs @@ -30,9 +30,7 @@ namespace System.Windows.Markup { [MarkupExtensionReturnType (typeof (Type))] [TypeConverter (typeof (TypeExtensionConverter))] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)] -#endif public class TypeExtension : MarkupExtension { public TypeExtension () @@ -56,9 +54,7 @@ public TypeExtension (Type type) [ConstructorArgument ("type")] [DefaultValue (null)] public Type Type { get; set; } -#if !NET_2_1 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] -#endif public string TypeName { get; set; } public override object ProvideValue (IServiceProvider serviceProvider) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/UidPropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/UidPropertyAttribute.cs index bd66ca26145..1898e16a207 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/UidPropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/UidPropertyAttribute.cs @@ -31,9 +31,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = false)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class UidPropertyAttribute : Attribute { public UidPropertyAttribute (string name) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializer.cs b/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializer.cs index bee7ad65908..45adefabec7 100644 --- a/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializer.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializer.cs @@ -32,24 +32,19 @@ namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public abstract class ValueSerializer { -#if !NET_2_1 public static ValueSerializer GetSerializerFor (PropertyDescriptor descriptor) { return GetSerializerFor (descriptor, null); } -#endif public static ValueSerializer GetSerializerFor (Type type) { return GetSerializerFor (type, null); } -#if !NET_2_1 // untested public static ValueSerializer GetSerializerFor (PropertyDescriptor descriptor, IValueSerializerContext context) { @@ -63,7 +58,6 @@ public static ValueSerializer GetSerializerFor (PropertyDescriptor descriptor, I return new TypeConverterValueSerializer (tc); return null; } -#endif public static ValueSerializer GetSerializerFor (Type type, IValueSerializerContext context) { diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializerAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializerAttribute.cs index fdb4e951e2f..37dec5262a9 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializerAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializerAttribute.cs @@ -31,9 +31,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Interface, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class ValueSerializerAttribute : Attribute { public ValueSerializerAttribute (string valueSerializerTypeName) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs index 893d79c1aa3..36cdf56aa28 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs @@ -31,9 +31,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class WhitespaceSignificantCollectionAttribute : Attribute { } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/XmlLangPropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/XmlLangPropertyAttribute.cs index 18978a84645..4789120383b 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/XmlLangPropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/XmlLangPropertyAttribute.cs @@ -31,9 +31,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = false)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class XmlLangPropertyAttribute : Attribute { public XmlLangPropertyAttribute (string name) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs index e77ae359726..0e16db2f15d 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs @@ -31,9 +31,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class XmlnsCompatibleWithAttribute : Attribute { public XmlnsCompatibleWithAttribute (string oldNamespace, string newNamespace) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsDefinitionAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsDefinitionAttribute.cs index 078623fb082..81be2dae73d 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsDefinitionAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsDefinitionAttribute.cs @@ -31,9 +31,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class XmlnsDefinitionAttribute : Attribute { public XmlnsDefinitionAttribute (string xmlNamespace, string clrNamespace) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsPrefixAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsPrefixAttribute.cs index 4bdf0d97aff..c907c8eb427 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsPrefixAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsPrefixAttribute.cs @@ -31,9 +31,7 @@ namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class XmlnsPrefixAttribute : Attribute { public XmlnsPrefixAttribute (string xmlNamespace, string prefix) diff --git a/mcs/class/System.Xaml/System.Xaml/XamlDuplicateMemberException.cs b/mcs/class/System.Xaml/System.Xaml/XamlDuplicateMemberException.cs index e65e23faf1f..10e18587261 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlDuplicateMemberException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlDuplicateMemberException.cs @@ -27,9 +27,7 @@ namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlDuplicateMemberException : XamlException { public XamlDuplicateMemberException () @@ -54,25 +52,21 @@ public XamlDuplicateMemberException (string message, Exception innerException) { } -#if !NET_2_1 protected XamlDuplicateMemberException (SerializationInfo info, StreamingContext context) : base (info, context) { DuplicateMember = (XamlMember) info.GetValue ("member", typeof (XamlMember)); ParentType = (XamlType) info.GetValue ("type", typeof (XamlType)); } -#endif public XamlMember DuplicateMember { get; set; } public XamlType ParentType { get; set; } -#if !NET_2_1 public override void GetObjectData (SerializationInfo info, StreamingContext context) { base.GetObjectData (info, context); info.AddValue ("member", DuplicateMember); info.AddValue ("type", ParentType); } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlException.cs b/mcs/class/System.Xaml/System.Xaml/XamlException.cs index ecccbb4ced5..669b2245ece 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlException.cs @@ -27,9 +27,7 @@ namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlException : Exception { public XamlException () @@ -63,14 +61,12 @@ public XamlException (string message, Exception innerException, int lineNumber, LinePosition = linePosition; } -#if !NET_2_1 protected XamlException (SerializationInfo info, StreamingContext context) : base (info, context) { LineNumber = info.GetInt32 ("lineNumber"); LinePosition = info.GetInt32 ("linePosition"); } -#endif public int LineNumber { get; protected internal set; } public int LinePosition { get; protected internal set; } @@ -78,12 +74,10 @@ public override string Message { get { return FormatLine (base.Message, LineNumber, LinePosition); } } -#if !NET_2_1 public override void GetObjectData (SerializationInfo info, StreamingContext context) { info.AddValue ("lineNumber", LineNumber); info.AddValue ("linePosition", LinePosition); } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlInternalException.cs b/mcs/class/System.Xaml/System.Xaml/XamlInternalException.cs index a24cffe420a..d98aa4c4df2 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlInternalException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlInternalException.cs @@ -27,9 +27,7 @@ namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlInternalException : XamlException { public XamlInternalException () @@ -47,11 +45,9 @@ public XamlInternalException (string message, Exception innerException) { } -#if !NET_2_1 protected XamlInternalException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlMember.cs b/mcs/class/System.Xaml/System.Xaml/XamlMember.cs index 7b85eb322d5..ad03cbf6283 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlMember.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlMember.cs @@ -166,7 +166,6 @@ public string PreferredXamlNamespace { get { return directive_ns ?? (DeclaringType == null ? null : DeclaringType.PreferredXamlNamespace); } } -#if !NET_2_1 public DesignerSerializationVisibility SerializationVisibility { get { var c= GetCustomAttributeProvider (); @@ -174,7 +173,6 @@ public DesignerSerializationVisibility SerializationVisibility { return a != null ? a.Visibility : DesignerSerializationVisibility.Visible; } } -#endif public bool IsAttachable { get { return is_attachable; } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlObjectReaderException.cs b/mcs/class/System.Xaml/System.Xaml/XamlObjectReaderException.cs index 89c64fe1adc..0bad880d68d 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlObjectReaderException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlObjectReaderException.cs @@ -27,9 +27,7 @@ namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlObjectReaderException : XamlException { public XamlObjectReaderException () @@ -47,11 +45,9 @@ public XamlObjectReaderException (string message, Exception innerException) { } -#if !NET_2_1 protected XamlObjectReaderException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterException.cs b/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterException.cs index b5ce0b3b803..17708cc0344 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterException.cs @@ -27,9 +27,7 @@ namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlObjectWriterException : XamlException { public XamlObjectWriterException () @@ -47,11 +45,9 @@ public XamlObjectWriterException (string message, Exception innerException) { } -#if !NET_2_1 protected XamlObjectWriterException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterSettings.cs b/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterSettings.cs index 4ecbe75e6f7..a46dded4edf 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterSettings.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterSettings.cs @@ -25,7 +25,7 @@ using System.ComponentModel; using System.Reflection; using System.Windows.Markup; -#if !NET_2_1 +#if !__MOBILE__ using System.Xaml.Permissions; #endif using System.Xaml.Schema; @@ -42,7 +42,7 @@ public XamlObjectWriterSettings (XamlObjectWriterSettings settings) : base (settings) { var s = settings; -#if !NET_2_1 +#if !__MOBILE__ AccessLevel = s.AccessLevel; #endif AfterBeginInitHandler = s.AfterBeginInitHandler; @@ -65,7 +65,7 @@ public XamlObjectWriterSettings (XamlObjectWriterSettings settings) public EventHandler BeforePropertiesHandler { get; set; } public EventHandler XamlSetValueHandler { get; set; } -#if !NET_2_1 +#if !__MOBILE__ [MonoTODO ("Ignored")] public XamlAccessLevel AccessLevel { get; set; } #endif diff --git a/mcs/class/System.Xaml/System.Xaml/XamlParseException.cs b/mcs/class/System.Xaml/System.Xaml/XamlParseException.cs index 1ae1667b53a..4bb8340a48a 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlParseException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlParseException.cs @@ -27,9 +27,7 @@ namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlParseException : XamlException { public XamlParseException () @@ -47,11 +45,9 @@ public XamlParseException (string message, Exception innerException) { } -#if !NET_2_1 protected XamlParseException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlSchemaContext.cs b/mcs/class/System.Xaml/System.Xaml/XamlSchemaContext.cs index de31e46de24..64cf91ea71c 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlSchemaContext.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlSchemaContext.cs @@ -57,10 +57,8 @@ public XamlSchemaContext (IEnumerable referenceAssemblies, XamlSchemaC { if (referenceAssemblies != null) reference_assemblies = new List (referenceAssemblies); -#if !NET_2_1 else AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoaded; -#endif if (settings == null) return; @@ -69,13 +67,11 @@ public XamlSchemaContext (IEnumerable referenceAssemblies, XamlSchemaC SupportMarkupExtensionsWithDuplicateArity = settings.SupportMarkupExtensionsWithDuplicateArity; } -#if !NET_2_1 ~XamlSchemaContext () { if (reference_assemblies == null) AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoaded; } -#endif IList reference_assemblies; @@ -255,7 +251,6 @@ public virtual bool TryGetCompatibleXamlNamespace (string xamlNamespace, out str return compat_nss.TryGetValue (xamlNamespace, out compatibleNamespace); } -#if !NET_2_1 void OnAssemblyLoaded (object o, AssemblyLoadEventArgs e) { if (reference_assemblies != null) @@ -270,8 +265,7 @@ void OnAssemblyLoaded (object o, AssemblyLoadEventArgs e) if (all_xaml_types != null) FillAllXamlTypes (e.LoadedAssembly); } -#endif - + // cache updater methods void FillXamlNamespaces (Assembly ass) { diff --git a/mcs/class/System.Xaml/System.Xaml/XamlSchemaException.cs b/mcs/class/System.Xaml/System.Xaml/XamlSchemaException.cs index 9681927b39b..78de4f8e482 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlSchemaException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlSchemaException.cs @@ -27,9 +27,7 @@ namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlSchemaException : XamlException { public XamlSchemaException () @@ -47,11 +45,9 @@ public XamlSchemaException (string message, Exception innerException) { } -#if !NET_2_1 protected XamlSchemaException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlServices.cs b/mcs/class/System.Xaml/System.Xaml/XamlServices.cs index cf686d8506f..c8026d195a4 100755 --- a/mcs/class/System.Xaml/System.Xaml/XamlServices.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlServices.cs @@ -71,13 +71,11 @@ public static string Save (object instance) return sw.ToString (); } -#if !NET_2_1 public static void Save (string fileName, object instance) { using (var xw = XmlWriter.Create (fileName, new XmlWriterSettings () { OmitXmlDeclaration = true, Indent = true })) Save (xw, instance); } -#endif public static void Save (Stream stream, object instance) { diff --git a/mcs/class/System.Xaml/System.Xaml/XamlXmlWriterException.cs b/mcs/class/System.Xaml/System.Xaml/XamlXmlWriterException.cs index d784b9df2d0..ffa402cc7df 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlXmlWriterException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlXmlWriterException.cs @@ -27,9 +27,7 @@ namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlXmlWriterException : XamlException { public XamlXmlWriterException () @@ -47,11 +45,9 @@ public XamlXmlWriterException (string message, Exception innerException) { } -#if !NET_2_1 protected XamlXmlWriterException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System/System.ComponentModel/BindingList.cs b/mcs/class/System/System.ComponentModel/BindingList.cs index b4c0ce8b69b..181b91dbbc9 100644 --- a/mcs/class/System/System.ComponentModel/BindingList.cs +++ b/mcs/class/System/System.ComponentModel/BindingList.cs @@ -248,7 +248,14 @@ protected override void InsertItem (int index, T item) void Item_PropertyChanged (object item, PropertyChangedEventArgs args) { - OnListChanged (new ListChangedEventArgs (ListChangedType.ItemChanged, base.IndexOf ((T) item)) ); + var property_info = item.GetType ().GetProperty (args.PropertyName); + + if (property_info != null) { + OnListChanged (new ListChangedEventArgs (ListChangedType.ItemChanged, base.IndexOf ((T) item), + new ReflectionPropertyDescriptor (property_info)) ); + } else { + OnListChanged (new ListChangedEventArgs (ListChangedType.ItemChanged, base.IndexOf ((T) item)) ); + } } protected virtual void OnAddingNew (AddingNewEventArgs e) diff --git a/mcs/class/System/System.IO.Compression/DeflateStream.cs b/mcs/class/System/System.IO.Compression/DeflateStream.cs index 02c0c9f6b02..1a67e39e0c7 100644 --- a/mcs/class/System/System.IO.Compression/DeflateStream.cs +++ b/mcs/class/System/System.IO.Compression/DeflateStream.cs @@ -395,24 +395,15 @@ static int UnmanagedRead (IntPtr buffer, int length, IntPtr data) int UnmanagedRead (IntPtr buffer, int length) { - int total = 0; - int n = 1; - while (length > 0 && n > 0) { - if (io_buffer == null) - io_buffer = new byte [BufferSize]; + if (io_buffer == null) + io_buffer = new byte [BufferSize]; - int count = Math.Min (length, io_buffer.Length); - n = base_stream.Read (io_buffer, 0, count); - if (n > 0) { - Marshal.Copy (io_buffer, 0, buffer, n); - unsafe { - buffer = new IntPtr ((byte *) buffer.ToPointer () + n); - } - length -= n; - total += n; - } - } - return total; + int count = Math.Min (length, io_buffer.Length); + int n = base_stream.Read (io_buffer, 0, count); + if (n > 0) + Marshal.Copy (io_buffer, 0, buffer, n); + + return n; } #if MONOTOUCH diff --git a/mcs/class/System/System.Net.Mail/SmtpClient.cs b/mcs/class/System/System.Net.Mail/SmtpClient.cs index 829deecedab..4188a96c321 100644 --- a/mcs/class/System/System.Net.Mail/SmtpClient.cs +++ b/mcs/class/System/System.Net.Mail/SmtpClient.cs @@ -550,8 +550,12 @@ private void SendToFile (MailMessage message) MailAddress from = message.From; if (from == null) from = defaultFrom; - - SendHeader (HeaderName.Date, DateTime.Now.ToString ("ddd, dd MMM yyyy HH':'mm':'ss zzz", DateTimeFormatInfo.InvariantInfo)); + + string dt = DateTime.Now.ToString("ddd, dd MMM yyyy HH':'mm':'ss zzz", DateTimeFormatInfo.InvariantInfo); + // remove ':' from time zone offset (e.g. from "+01:00") + dt = dt.Remove(dt.Length - 3, 1); + SendHeader(HeaderName.Date, dt); + SendHeader (HeaderName.From, EncodeAddress(from)); SendHeader (HeaderName.To, EncodeAddresses(message.To)); if (message.CC.Count > 0) @@ -762,7 +766,7 @@ public Task SendMailAsync (string from, string recipients, string subject, strin static void SendMailAsyncCompletedHandler (TaskCompletionSource source, AsyncCompletedEventArgs e, SendCompletedEventHandler handler, SmtpClient client) { - if (handler != e.UserState) + if ((object) handler != e.UserState) return; client.SendCompleted -= handler; diff --git a/mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs b/mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs index 249a55b0f4c..feeaec42d50 100644 --- a/mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs +++ b/mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs @@ -85,8 +85,15 @@ struct sockaddr_ll public ushort sll_hatype; public byte sll_pkttype; public byte sll_halen; - +#if MONODROID + // In MonoDroid the structure has larger space allocated for the address part since there exist + // addresses (Infiniband, ipv6 tunnels) which exceed the standard 8 bytes. In fact, glibc's + // getifaddrs implementation also uses the bigger size, but for compatibility with other libc + // implementations we use the standard address size + [MarshalAs (UnmanagedType.ByValArray, SizeConst=24)] +#else [MarshalAs (UnmanagedType.ByValArray, SizeConst=8)] +#endif public byte[] sll_addr; } @@ -96,11 +103,18 @@ enum LinuxArpHardware { PRONET = 4, ATM = 19, SLIP = 256, + CSLIP = 257, + SLIP6 = 258, + CSLIP6 = 259, PPP = 512, LOOPBACK = 772, FDDI = 774, TUNNEL = 768, - TUNNEL6 = 769 + TUNNEL6 = 769, + SIT = 776, // IPv6-in-IPv4 tunnel + IPDDP = 777, // IP over DDP tunnel + IPGRE = 778, // GRE over IP + IP6GRE = 823 // GRE over IPv6 } } diff --git a/mcs/class/System/System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs b/mcs/class/System/System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs index 940a993f7c7..840fc531030 100644 --- a/mcs/class/System/System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs +++ b/mcs/class/System/System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs @@ -79,4 +79,23 @@ internal enum MacOsArpHardware { LOOPBACK = 0x18, FDDI = 0xf } + + internal enum MacOsInterfaceFlags { + IFF_UP = 0x1, /* interface is up */ + IFF_BROADCAST = 0x2, /* broadcast address valid */ + IFF_DEBUG = 0x4, /* turn on debugging */ + IFF_LOOPBACK = 0x8, /* is a loopback net */ + IFF_POINTOPOINT = 0x10, /* interface is point-to-point link */ + IFF_NOTRAILERS = 0x20, /* avoid use of trailers */ + IFF_RUNNING = 0x40, /* resources allocated */ + IFF_NOARP = 0x80, /* no address resolution protocol */ + IFF_PROMISC = 0x100, /* receive all packets */ + IFF_ALLMULTI = 0x200, /* receive all multicast packets */ + IFF_OACTIVE = 0x400, /* transmission in progress */ + IFF_SIMPLEX = 0x800, /* can't hear own transmissions */ + IFF_LINK0 = 0x1000, /* per link layer defined bit */ + IFF_LINK1 = 0x2000, /* per link layer defined bit */ + IFF_LINK2 = 0x4000, /* per link layer defined bit */ + IFF_MULTICAST = 0x8000 /* supports multicast */ + } } diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs index 4ad2720909f..aa7a8969fc6 100644 --- a/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs +++ b/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs @@ -238,11 +238,29 @@ internal string IfacePath { get { return iface_path; } } + static int GetInterfaceAddresses (out IntPtr ifap) + { +#if MONODROID + return AndroidPlatform.GetInterfaceAddresses (out ifap); +#else + return getifaddrs (out ifap); +#endif + } + + static void FreeInterfaceAddresses (IntPtr ifap) + { +#if MONODROID + AndroidPlatform.FreeInterfaceAddresses (ifap); +#else + freeifaddrs (ifap); +#endif + } + public static NetworkInterface [] ImplGetAllNetworkInterfaces () { var interfaces = new Dictionary (); IntPtr ifap; - if (getifaddrs (out ifap) != 0) + if (GetInterfaceAddresses (out ifap) != 0) throw new SystemException ("getifaddrs() failed"); try { @@ -295,6 +313,9 @@ public static NetworkInterface [] ImplGetAllNetworkInterfaces () break; case LinuxArpHardware.SLIP: + case LinuxArpHardware.CSLIP: + case LinuxArpHardware.SLIP6: + case LinuxArpHardware.CSLIP6: type = NetworkInterfaceType.Slip; break; @@ -311,9 +332,11 @@ public static NetworkInterface [] ImplGetAllNetworkInterfaces () type = NetworkInterfaceType.Fddi; break; + case LinuxArpHardware.SIT: + case LinuxArpHardware.IPDDP: + case LinuxArpHardware.IPGRE: + case LinuxArpHardware.IP6GRE: case LinuxArpHardware.TUNNEL6: - goto case LinuxArpHardware.TUNNEL; - case LinuxArpHardware.TUNNEL: type = NetworkInterfaceType.Tunnel; break; @@ -344,7 +367,7 @@ public static NetworkInterface [] ImplGetAllNetworkInterfaces () next = addr.ifa_next; } } finally { - freeifaddrs (ifap); + FreeInterfaceAddresses (ifap); } NetworkInterface [] result = new NetworkInterface [interfaces.Count]; @@ -446,6 +469,8 @@ class MacOsNetworkInterface : UnixNetworkInterface const int AF_INET = 2; const int AF_INET6 = 30; const int AF_LINK = 18; + + private uint _ifa_flags; public static NetworkInterface [] ImplGetAllNetworkInterfaces () { @@ -465,6 +490,7 @@ public static NetworkInterface [] ImplGetAllNetworkInterfaces () NetworkInterfaceType type = NetworkInterfaceType.Unknown; if (addr.ifa_addr != IntPtr.Zero) { + // optain IPAddress MacOsStructs.sockaddr sockaddr = (MacOsStructs.sockaddr) Marshal.PtrToStructure (addr.ifa_addr, typeof (MacOsStructs.sockaddr)); if (sockaddr.sa_family == AF_INET6) { @@ -478,7 +504,10 @@ public static NetworkInterface [] ImplGetAllNetworkInterfaces () sockaddrdl.Read (addr.ifa_addr); macAddress = new byte [(int) sockaddrdl.sdl_alen]; + // copy mac address from sdl_data field starting at last index pos of interface name into array macaddress, starting + // at index 0 Array.Copy (sockaddrdl.sdl_data, sockaddrdl.sdl_nlen, macAddress, 0, Math.Min (macAddress.Length, sockaddrdl.sdl_data.Length - sockaddrdl.sdl_nlen)); + index = sockaddrdl.sdl_index; int hwtype = (int) sockaddrdl.sdl_type; @@ -515,14 +544,17 @@ public static NetworkInterface [] ImplGetAllNetworkInterfaces () MacOsNetworkInterface iface = null; + // create interface if not already present if (!interfaces.TryGetValue (name, out iface)) { - iface = new MacOsNetworkInterface (name); + iface = new MacOsNetworkInterface (name, addr.ifa_flags); interfaces.Add (name, iface); } + // if a new address has been found, add it if (!address.Equals (IPAddress.None)) iface.AddAddress (address); + // set link layer info, if iface has macaddress or is loopback device if (macAddress != null || type == NetworkInterfaceType.Loopback) iface.SetLinkLayerInfo (index, macAddress, type); @@ -541,9 +573,10 @@ public static NetworkInterface [] ImplGetAllNetworkInterfaces () return result; } - MacOsNetworkInterface (string name) + MacOsNetworkInterface (string name, uint ifa_flags) : base (name) { + _ifa_flags = ifa_flags; } public override IPInterfaceProperties GetIPProperties () @@ -562,13 +595,16 @@ public override IPv4InterfaceStatistics GetIPv4Statistics () public override OperationalStatus OperationalStatus { get { + if(((MacOsInterfaceFlags)_ifa_flags & MacOsInterfaceFlags.IFF_UP) == MacOsInterfaceFlags.IFF_UP){ + return OperationalStatus.Up; + } return OperationalStatus.Unknown; } } public override bool SupportsMulticast { get { - return false; + return ((MacOsInterfaceFlags)_ifa_flags & MacOsInterfaceFlags.IFF_MULTICAST) == MacOsInterfaceFlags.IFF_MULTICAST; } } } diff --git a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs index 609583a73f2..a7eeb67d883 100644 --- a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs +++ b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs @@ -231,7 +231,7 @@ static void DispatcherCB (IAsyncResult ares) else if (op == SocketAsyncOperation.Disconnect) args.DisconnectCallback (ares); else if (op == SocketAsyncOperation.Connect) - args.ConnectCallback (); + args.ConnectCallback (ares); /* else if (op == Socket.SocketOperation.ReceiveMessageFrom) else if (op == Socket.SocketOperation.SendPackets) @@ -254,10 +254,12 @@ internal void ReceiveCallback (IAsyncResult ares) } } - void ConnectCallback () + void ConnectCallback (IAsyncResult ares) { try { - SocketError = (SocketError) Worker.result.error; + curSocket.EndConnect (ares); + } catch (SocketException se) { + SocketError = se.SocketErrorCode; } finally { OnCompleted (this); } diff --git a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs index 11a7eda8a45..7616b88c788 100644 --- a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs +++ b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs @@ -1253,7 +1253,7 @@ public void Connect (EndPoint remoteEP) throw new SocketException (error); } - if (socket_type == SocketType.Dgram && (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any))) + if (socket_type == SocketType.Dgram && ep != null && (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any))) connected = false; else connected = true; diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs index 3778c740538..add2c20075c 100644 --- a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs +++ b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs @@ -196,7 +196,30 @@ public override Task SendAsync (ArraySegment buffer, WebSocketMessageType underlyingSocket.Send (sendBuffer, 0, buffer.Count + headerLength, SocketFlags.None); }); } + + const int messageTypeText = 1; + const int messageTypeBinary = 2; + const int messageTypeClose = 8; + static WebSocketMessageType WireToMessageType (byte msgType) + { + + if (msgType == messageTypeText) + return WebSocketMessageType.Text; + if (msgType == messageTypeBinary) + return WebSocketMessageType.Binary; + return WebSocketMessageType.Close; + } + + static byte MessageTypeToWire (WebSocketMessageType type) + { + if (type == WebSocketMessageType.Text) + return messageTypeText; + if (type == WebSocketMessageType.Binary) + return messageTypeBinary; + return messageTypeClose; + } + public override Task ReceiveAsync (ArraySegment buffer, CancellationToken cancellationToken) { EnsureWebSocketConnected (); @@ -208,7 +231,7 @@ public override Task ReceiveAsync (ArraySegment bu var isLast = (headerBuffer[0] >> 7) > 0; var isMasked = (headerBuffer[1] >> 7) > 0; int mask = 0; - var type = (WebSocketMessageType)(headerBuffer[0] & 0xF); + var type = WireToMessageType ((byte)(headerBuffer[0] & 0xF)); long length = headerBuffer[1] & 0x7F; int offset = 0; if (length == 126) { @@ -279,10 +302,10 @@ async Task SendCloseFrame (WebSocketCloseStatus closeStatus, string statusDescri int WriteHeader (WebSocketMessageType type, ArraySegment buffer, bool endOfMessage) { - var opCode = (byte)type; + var opCode = MessageTypeToWire (type); var length = buffer.Count; - headerBuffer[0] = (byte)(opCode | (endOfMessage ? 0 : 0x80)); + headerBuffer[0] = (byte)(opCode | (endOfMessage ? 0x80 : 0)); if (length < 126) { headerBuffer[1] = (byte)length; } else if (length <= ushort.MaxValue) { diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs index 50cbc003c0f..f6cb2fc2a86 100644 --- a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs +++ b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs @@ -35,9 +35,9 @@ namespace System.Net.WebSockets { public enum WebSocketMessageType { - Text = 1, - Binary = 2, - Close = 8 + Text = 0, + Binary = 1, + Close = 2 } } diff --git a/mcs/class/System/System.Net/ChunkStream.cs b/mcs/class/System/System.Net/ChunkStream.cs index 1337fce4fce..addcc28907b 100644 --- a/mcs/class/System/System.Net/ChunkStream.cs +++ b/mcs/class/System/System.Net/ChunkStream.cs @@ -39,6 +39,7 @@ class ChunkStream { enum State { None, + PartialSize, Body, BodyFinished, Trailer @@ -139,9 +140,9 @@ public void Write (byte [] buffer, int offset, int size) void InternalWrite (byte [] buffer, ref int offset, int size) { - if (state == State.None) { + if (state == State.None || state == State.PartialSize) { state = GetChunkSize (buffer, ref offset, size); - if (state == State.None) + if (state == State.PartialSize) return; saved.Length = 0; @@ -262,7 +263,7 @@ State GetChunkSize (byte [] buffer, ref int offset, int size) ThrowProtocolViolation ("Cannot parse chunk size."); } - return State.None; + return State.PartialSize; } chunkRead = 0; diff --git a/mcs/class/System/System.Net/DigestClient.cs b/mcs/class/System/System.Net/DigestClient.cs index be618771eb9..f570a739650 100644 --- a/mcs/class/System/System.Net/DigestClient.cs +++ b/mcs/class/System/System.Net/DigestClient.cs @@ -181,7 +181,7 @@ bool GetKeywordAndValue (out string key, out string value) } value = header.Substring (beginQ, pos - beginQ); - pos += 2; + pos += useQuote ? 2 : 1; return true; } } diff --git a/mcs/class/System/System.Net/ServicePointManager.cs b/mcs/class/System/System.Net/ServicePointManager.cs index 26578856fae..66cdc7296fe 100644 --- a/mcs/class/System/System.Net/ServicePointManager.cs +++ b/mcs/class/System/System.Net/ServicePointManager.cs @@ -264,7 +264,6 @@ public static int MaxServicePoints { throw new ArgumentException ("value"); maxServicePoints = value; - RecycleServicePoints (); } } @@ -329,9 +328,6 @@ public static ServicePoint FindServicePoint (Uri address, IWebProxy proxy) if (address == null) throw new ArgumentNullException ("address"); - if ((servicePoints.Count % 4) == 0) - RecycleServicePoints (); - var origAddress = new Uri (address.Scheme + "://" + address.Authority); bool usesProxy = false; @@ -378,41 +374,6 @@ public static ServicePoint FindServicePoint (Uri address, IWebProxy proxy) return sp; } - // Internal Methods - - static void RecycleServicePoints () - { - lock (servicePoints) { - var toRemove = new ArrayList (); - var idleList = new SortedDictionary (); - IDictionaryEnumerator e = servicePoints.GetEnumerator (); - while (e.MoveNext ()) { - ServicePoint sp = (ServicePoint) e.Value; - DateTime idleSince; - if (sp.CheckAvailableForRecycling (out idleSince)) { - toRemove.Add (e.Key); - continue; - } - - while (idleList.ContainsKey (idleSince)) - idleSince = idleSince.AddMilliseconds (1); - idleList.Add (idleSince, sp); - } - - for (int i = 0; i < toRemove.Count; i++) - servicePoints.Remove (toRemove [i]); - - if (maxServicePoints == 0 || servicePoints.Count <= maxServicePoints) - return; - - // get rid of the ones with the longest idle time - foreach (var sp in idleList.Values) { - if (servicePoints.Count <= maxServicePoints) - break; - servicePoints.Remove (sp); - } - } - } #if SECURITY_DEP internal class ChainValidationHelper { object sender; diff --git a/mcs/class/System/System.Net/SimpleAsyncResult.cs b/mcs/class/System/System.Net/SimpleAsyncResult.cs index 4d143153ddf..b18d2adf34a 100644 --- a/mcs/class/System/System.Net/SimpleAsyncResult.cs +++ b/mcs/class/System/System.Net/SimpleAsyncResult.cs @@ -159,18 +159,10 @@ protected void DoCallback_internal () { if (!callbackDone && cb != null) { callbackDone = true; -// if (true || synch) - cb (this); -// else -// ThreadPool.QueueUserWorkItem (CB, null); + cb (this); } } - void CB (object unused) - { - cb (this); - } - internal void WaitUntilComplete () { if (IsCompleted) diff --git a/mcs/class/System/System.Net/WebClient.cs b/mcs/class/System/System.Net/WebClient.cs index 7ee338a0a26..97f9759dcc3 100644 --- a/mcs/class/System/System.Net/WebClient.cs +++ b/mcs/class/System/System.Net/WebClient.cs @@ -1405,10 +1405,12 @@ public void UploadStringAsync (Uri address, string method, string data, object u string data2 = UploadString ((Uri) args [0], (string) args [1], (string) args [2]); OnUploadStringCompleted ( new UploadStringCompletedEventArgs (data2, null, false, args [3])); - } catch (ThreadInterruptedException){ - OnUploadStringCompleted ( - new UploadStringCompletedEventArgs (null, null, true, args [3])); } catch (Exception e){ + if (e is ThreadInterruptedException || e.InnerException is ThreadInterruptedException) { + OnUploadStringCompleted ( + new UploadStringCompletedEventArgs (null, null, true, args [3])); + return; + } OnUploadStringCompleted ( new UploadStringCompletedEventArgs (null, e, false, args [3])); }}); diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs index 54af1f44994..0f35c49b3e4 100644 --- a/mcs/class/System/System.Net/WebConnection.cs +++ b/mcs/class/System/System.Net/WebConnection.cs @@ -356,8 +356,6 @@ WebHeaderCollection ReadHeaders (Stream stream, out byte [] retBuffer, out int s byte [] buffer = new byte [1024]; MemoryStream ms = new MemoryStream (); - bool gotStatus = false; - WebHeaderCollection headers = null; while (true) { int n = stream.Read (buffer, 0, 1024); @@ -369,7 +367,8 @@ WebHeaderCollection ReadHeaders (Stream stream, out byte [] retBuffer, out int s ms.Write (buffer, 0, n); int start = 0; string str = null; - headers = new WebHeaderCollection (); + bool gotStatus = false; + WebHeaderCollection headers = new WebHeaderCollection (); while (ReadLine (ms.GetBuffer (), ref start, (int) ms.Length, ref str)) { if (str == null) { int contentLen = 0; @@ -399,13 +398,22 @@ WebHeaderCollection ReadHeaders (Stream stream, out byte [] retBuffer, out int s continue; } - int spaceidx = str.IndexOf (' '); - if (spaceidx == -1) { + string[] parts = str.Split (' '); + if (parts.Length < 2) { HandleError (WebExceptionStatus.ServerProtocolViolation, null, "ReadHeaders2"); return null; } - status = (int) UInt32.Parse (str.Substring (spaceidx + 1, 3)); + if (String.Compare (parts [0], "HTTP/1.1", true) == 0) + Data.ProxyVersion = HttpVersion.Version11; + else if (String.Compare (parts [0], "HTTP/1.0", true) == 0) + Data.ProxyVersion = HttpVersion.Version10; + else { + HandleError (WebExceptionStatus.ServerProtocolViolation, null, "ReadHeaders2"); + return null; + } + + status = (int)UInt32.Parse (parts [1]); gotStatus = true; } } @@ -841,6 +849,8 @@ internal void NextRead () string header = (sPoint.UsesProxy) ? "Proxy-Connection" : "Connection"; string cncHeader = (Data.Headers != null) ? Data.Headers [header] : null; bool keepAlive = (Data.Version == HttpVersion.Version11 && this.keepAlive); + if (Data.ProxyVersion != null && Data.ProxyVersion != HttpVersion.Version11) + keepAlive = false; if (cncHeader != null) { cncHeader = cncHeader.ToLower (); keepAlive = (this.keepAlive && cncHeader.IndexOf ("keep-alive", StringComparison.Ordinal) != -1); diff --git a/mcs/class/System/System.Net/WebConnectionData.cs b/mcs/class/System/System.Net/WebConnectionData.cs index 216b57f16c7..77d19540be1 100644 --- a/mcs/class/System/System.Net/WebConnectionData.cs +++ b/mcs/class/System/System.Net/WebConnectionData.cs @@ -39,6 +39,7 @@ class WebConnectionData public string StatusDescription; public WebHeaderCollection Headers; public Version Version; + public Version ProxyVersion; public Stream stream; public string[] Challenge; ReadState _readState; diff --git a/mcs/class/System/System.Net/WebConnectionGroup.cs b/mcs/class/System/System.Net/WebConnectionGroup.cs index 0348aeebe42..5e142154f91 100644 --- a/mcs/class/System/System.Net/WebConnectionGroup.cs +++ b/mcs/class/System/System.Net/WebConnectionGroup.cs @@ -70,14 +70,16 @@ public void Close () //TODO: abort requests or wait for them to finish lock (sPoint) { closing = true; - foreach (var cnc in connections) { - if (cnc.Connection == null) - continue; - cnc.Connection.Close (false); - cnc.Connection = null; + var iter = connections.First; + while (iter != null) { + var cnc = iter.Value.Connection; + var node = iter; + iter = iter.Next; + + connections.Remove (node); + cnc.Close (false); OnConnectionClosed (); } - connections.Clear (); } } @@ -120,7 +122,7 @@ static void PrepareSharingNtlm (WebConnection cnc, HttpWebRequest request) ConnectionState FindIdleConnection () { foreach (var cnc in connections) { - if (cnc.Busy || cnc.Connection == null) + if (cnc.Busy) continue; connections.Remove (cnc); @@ -140,7 +142,7 @@ WebConnection CreateOrReuseConnection (HttpWebRequest request, out bool created) return cnc.Connection; } - if (sPoint.ConnectionLimit > connections.Count) { + if (sPoint.ConnectionLimit > connections.Count || connections.Count == 0) { created = true; cnc = new ConnectionState (this); connections.AddFirst (cnc); @@ -177,14 +179,11 @@ internal bool TryRecycle (TimeSpan maxIdleTime, ref DateTime idleSince) } int count = 0; - for (var node = connections.First; node != null; node = node.Next) { - var cnc = node.Value; - - if (cnc.Connection == null) { - connections.Remove (node); - OnConnectionClosed (); - continue; - } + var iter = connections.First; + while (iter != null) { + var cnc = iter.Value; + var node = iter; + iter = iter.Next; ++count; if (cnc.Busy) @@ -205,7 +204,7 @@ internal bool TryRecycle (TimeSpan maxIdleTime, ref DateTime idleSince) if (connectionsToClose == null) connectionsToClose = new List (); connectionsToClose.Add (cnc.Connection); - cnc.Connection = null; + connections.Remove (node); } recycled = connections.Count == 0; @@ -224,7 +223,10 @@ internal bool TryRecycle (TimeSpan maxIdleTime, ref DateTime idleSince) } class ConnectionState : IWebConnectionState { - public WebConnection Connection; + public WebConnection Connection { + get; + private set; + } public WebConnectionGroup Group { get; diff --git a/mcs/class/System/System.Net/WebConnectionStream.cs b/mcs/class/System/System.Net/WebConnectionStream.cs index b946654f329..72977c4ce70 100644 --- a/mcs/class/System/System.Net/WebConnectionStream.cs +++ b/mcs/class/System/System.Net/WebConnectionStream.cs @@ -234,7 +234,8 @@ internal void ReadAll () return; } - pending.WaitOne (); + if (!pending.WaitOne (ReadTimeout)) + throw new WebException ("The operation has timed out.", WebExceptionStatus.Timeout); lock (locker) { if (totalRead >= contentLength) return; @@ -592,6 +593,14 @@ public override void EndWrite (IAsyncResult r) if (result.EndCalled) return; + if (sendChunked) { + lock (locker) { + pendingWrites--; + if (pendingWrites <= 0) + pending.Set (); + } + } + result.EndCalled = true; if (result.AsyncWriteAll) { result.WaitUntilComplete (); @@ -605,14 +614,6 @@ public override void EndWrite (IAsyncResult r) if (result.GotException) throw result.Exception; - - if (sendChunked) { - lock (locker) { - pendingWrites--; - if (pendingWrites == 0) - pending.Set (); - } - } } public override void Write (byte [] buffer, int offset, int size) @@ -761,7 +762,9 @@ public override void Close () if (disposed) return; disposed = true; - pending.WaitOne (); + if (!pending.WaitOne (WriteTimeout)) { + throw new WebException ("The operation has timed out.", WebExceptionStatus.Timeout); + } byte [] chunk = Encoding.ASCII.GetBytes ("0\r\n\r\n"); string err_msg = null; cnc.Write (request, chunk, 0, chunk.Length, ref err_msg); diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs index 701b4c534d0..229999df718 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs @@ -428,7 +428,19 @@ private string GetValueAsString (ASN1 pair) private MX.X509Certificate ImportPkcs12 (byte[] rawData, string password) { - MX.PKCS12 pfx = (password == null) ? new MX.PKCS12 (rawData) : new MX.PKCS12 (rawData, password); + MX.PKCS12 pfx = null; + if (string.IsNullOrEmpty (password)) { + try { + // Support both unencrypted PKCS#12.. + pfx = new MX.PKCS12 (rawData, (string)null); + } catch { + // ..and PKCS#12 encrypted with an empty password + pfx = new MX.PKCS12 (rawData, string.Empty); + } + } else { + pfx = new MX.PKCS12 (rawData, password); + } + if (pfx.Certificates.Count == 0) { // no certificate was found return null; diff --git a/mcs/class/System/System.dll.sources b/mcs/class/System/System.dll.sources index 55e98bb0f2f..dffa27ef690 100644 --- a/mcs/class/System/System.dll.sources +++ b/mcs/class/System/System.dll.sources @@ -1012,6 +1012,7 @@ System/Uri.cs System/UriFormat.cs System/UriFormatException.cs System/UriHostNameType.cs +System/UriHelper.cs System/UriIdnScope.cs System/UriKind.cs System/UriParser.cs diff --git a/mcs/class/System/System/AndroidPlatform.cs b/mcs/class/System/System/AndroidPlatform.cs index 45adf27af71..e2e89448d18 100644 --- a/mcs/class/System/System/AndroidPlatform.cs +++ b/mcs/class/System/System/AndroidPlatform.cs @@ -38,12 +38,15 @@ namespace System { internal static class AndroidPlatform { - + delegate int GetInterfaceAddressesDelegate (out IntPtr ifap); + delegate void FreeInterfaceAddressesDelegate (IntPtr ifap); + #if SECURITY_DEP static readonly Converter, bool> trustEvaluateSsl; #endif // SECURITY_DEP static readonly Func getDefaultProxy; - + static readonly GetInterfaceAddressesDelegate getInterfaceAddresses; + static readonly FreeInterfaceAddressesDelegate freeInterfaceAddresses; static AndroidPlatform () { @@ -60,6 +63,16 @@ static AndroidPlatform () typeof (Func), t, "GetDefaultProxy", ignoreCase:false, throwOnBindFailure:true); + + getInterfaceAddresses = (GetInterfaceAddressesDelegate)Delegate.CreateDelegate ( + typeof (GetInterfaceAddressesDelegate), t, "GetInterfaceAddresses", + ignoreCase: false, + throwOnBindFailure: false); + + freeInterfaceAddresses = (FreeInterfaceAddressesDelegate)Delegate.CreateDelegate ( + typeof (FreeInterfaceAddressesDelegate), t, "FreeInterfaceAddresses", + ignoreCase: false, + throwOnBindFailure: false); } #if SECURITY_DEP @@ -76,6 +89,23 @@ internal static IWebProxy GetDefaultProxy () { return getDefaultProxy (); } + + internal static int GetInterfaceAddresses (out IntPtr ifap) + { + ifap = IntPtr.Zero; + if (getInterfaceAddresses == null) + return -1; + + return getInterfaceAddresses (out ifap); + } + + internal static void FreeInterfaceAddresses (IntPtr ifap) + { + if (freeInterfaceAddresses == null) + return; + + freeInterfaceAddresses (ifap); + } } } #endif // MONODROID diff --git a/mcs/class/System/System/Uri.cs b/mcs/class/System/System/Uri.cs index 83bcb2a8810..9c0bbcf2c7f 100644 --- a/mcs/class/System/System/Uri.cs +++ b/mcs/class/System/System/Uri.cs @@ -90,6 +90,13 @@ public class Uri : ISerializable { private string cachedToString; private string cachedLocalPath; private int cachedHashCode; + + private static bool s_IriParsing; + + internal static bool IriParsing { + get { return s_IriParsing; } + set { s_IriParsing = value; } + } #if BOOTSTRAP_BASIC private static readonly string hexUpperChars = "0123456789ABCDEF"; @@ -112,7 +119,11 @@ public class Uri : ISerializable { public static readonly string UriSchemeNntp = "nntp"; public static readonly string UriSchemeNetPipe = "net.pipe"; public static readonly string UriSchemeNetTcp = "net.tcp"; - + + internal static readonly string UriSchemeTelnet = "telnet"; + internal static readonly string UriSchemeLdap = "ldap"; + internal static readonly string UriSchemeUuid = "uuid"; + private static readonly string [] knownUriSchemes = { UriSchemeFile, @@ -127,7 +138,22 @@ public class Uri : ISerializable { UriSchemeNetTcp }; - // Constructors + // Constructors + + static Uri() + { +#if NET_4_5 + IriParsing = true; +#else + IriParsing = false; +#endif + + var iriparsingVar = Environment.GetEnvironmentVariable ("MONO_URI_IRIPARSING"); + if (iriparsingVar == "true") + IriParsing = true; + if (iriparsingVar == "false") + IriParsing = false; + } public Uri (string uriString) : this (uriString, false) { @@ -213,9 +239,6 @@ public Uri (string uriString, UriKind uriKind) success = false; break; } - - if (success && isAbsoluteUri && (path.Length > 0)) - path = EscapeString (path); } } @@ -256,188 +279,88 @@ private void Merge (Uri baseUri, string relativeUri) throw new ArgumentNullException ("baseUri"); if (!baseUri.IsAbsoluteUri) throw new ArgumentOutOfRangeException ("baseUri"); - if (relativeUri == null) - relativeUri = String.Empty; - - // See RFC 2396 Par 5.2 and Appendix C - - // Check Windows UNC (for // it is scheme/host separator) - if (relativeUri.Length >= 2 && relativeUri [0] == '\\' && relativeUri [1] == '\\') { - source = relativeUri; + if (string.IsNullOrEmpty (relativeUri)) { + source = baseUri.OriginalString; ParseUri (UriKind.Absolute); return; } - int pos = relativeUri.IndexOf (':'); - if (pos != -1) { - - int pos2 = relativeUri.IndexOfAny (new char [] {'/', '\\', '?'}); - - // pos2 < 0 ... e.g. mailto - // pos2 > pos ... to block ':' in query part - if (pos2 > pos || pos2 < 0) { - // in some cases, it is equivanent to new Uri (relativeUri, dontEscape): - // 1) when the URI scheme in the - // relative path is different from that - // of the baseUri, or - // 2) the URI scheme is non-standard - // ones (non-standard URIs are always - // treated as absolute here), or - // 3) the relative URI path is absolute. - if (String.CompareOrdinal (baseUri.Scheme, 0, relativeUri, 0, pos) != 0 || - !IsPredefinedScheme (baseUri.Scheme) || - (relativeUri.Length > pos + 1 && relativeUri [pos + 1] == '/')) { - Uri tmp = null; - if (Uri.TryCreate (relativeUri, UriKind.Absolute, out tmp)) { - source = relativeUri; - ParseUri (UriKind.Absolute); - return; - } else if (pos == 1) { - // special case as this looks like a windows path - string msg = ParseAsWindowsAbsoluteFilePath (relativeUri); - if (msg != null) - throw new UriFormatException (msg); - } - // otherwise continue with 'full' relativeUri - } - else - relativeUri = relativeUri.Substring (pos + 1); + string error; + bool startsWithSlash = false; + + UriElements baseEl; + if (!UriParseComponents.TryParseComponents (baseUri.OriginalString, UriKind.Absolute, null, out baseEl, out error)) + throw new UriFormatException (error); + + if (relativeUri.StartsWith (baseEl.scheme + ":")) + relativeUri = relativeUri.Substring (baseEl.scheme.Length + 1); + + if (relativeUri.Length >= 1 && relativeUri [0] == '/') { + if (relativeUri.Length >= 2 && relativeUri [1] == '/') { + source = baseEl.scheme + ":" + relativeUri; + ParseUri (UriKind.Absolute); + return; } + + relativeUri = relativeUri.Substring (1); + startsWithSlash = true; } - this.scheme = baseUri.scheme; - this.host = baseUri.host; - this.port = baseUri.port; - this.userinfo = baseUri.userinfo; - this.isUnc = baseUri.isUnc; - this.isUnixFilePath = baseUri.isUnixFilePath; - this.isOpaquePart = baseUri.isOpaquePart; + UriElements relativeEl; + if (!UriParseComponents.TryParseComponents (relativeUri, UriKind.RelativeOrAbsolute, null, out relativeEl, out error)) + throw new UriFormatException (error); - if (relativeUri.Length == 0) { - this.path = baseUri.path; - this.query = baseUri.query; - this.fragment = baseUri.fragment; + if (relativeEl.isAbsoluteUri) { + source = relativeUri; + ParseUri (UriKind.Absolute); return; } - // 8 fragment - // Note that in relative constructor, file URI cannot handle '#' as a filename character, but just regarded as a fragment identifier. - string original_fragment = String.Empty; - pos = relativeUri.IndexOf ('#'); - if (pos != -1) { - original_fragment = relativeUri.Substring (pos); - if (userEscaped) - fragment = original_fragment; - else - fragment = "#" + EscapeString (relativeUri.Substring (pos+1)); - relativeUri = pos == 0 ? String.Empty : relativeUri.Substring (0, pos); - } + source = baseEl.scheme + baseEl.delimiter; - bool consider_query = false; + if (baseEl.user != null) + source += baseEl.user + "@"; - // 6 query - pos = relativeUri.IndexOf ('?'); - if (pos != -1) { - query = relativeUri.Substring (pos); - if (!userEscaped) - query = EscapeString (query); -#if !NET_4_0 && !MOBILE - consider_query = query.Length > 0; -#endif - relativeUri = pos == 0 ? String.Empty : relativeUri.Substring (0, pos); - } else if (relativeUri.Length == 0) { - // if there is no relative path then we keep the Query and Fragment from the absolute - query = baseUri.query; - } + source += baseEl.host; - if (relativeUri.Length > 0 && relativeUri [0] == '/') { - if (relativeUri.Length > 1 && relativeUri [1] == '/') { - source = scheme + ':' + relativeUri; - ParseUri (UriKind.Absolute); - return; - } else { - path = relativeUri; - if (!userEscaped) - path = EscapeString (path); - return; - } - } - - // par 5.2 step 6 a) - path = baseUri.path; - if ((relativeUri.Length > 0) || consider_query) { - pos = path.LastIndexOf ('/'); - if (pos >= 0) - path = path.Substring (0, pos + 1); - } + if (baseEl.port >= 0) + source += ":" + baseEl.port.ToString (CultureInfo.InvariantCulture); - if (relativeUri.Length == 0) { - // when merging URI the OriginalString is not quite original - source = GetLeftPart (UriPartial.Authority) + query + original_fragment; - return; - } - - // 6 b) - path += relativeUri; - - // 6 c) - int startIndex = 0; - while (true) { - pos = path.IndexOf ("./", startIndex); - if (pos == -1) - break; - if (pos == 0) - path = path.Remove (0, 2); - else if (path [pos - 1] != '.') - path = path.Remove (pos, 2); - else - startIndex = pos + 1; - } - - // 6 d) - if (path.Length > 1 && - path [path.Length - 1] == '.' && - path [path.Length - 2] == '/') - path = path.Remove (path.Length - 1, 1); - - // 6 e) - startIndex = 0; - while (true) { - pos = path.IndexOf ("/../", startIndex); - if (pos == -1) - break; - if (pos == 0) { - startIndex = 3; - continue; - } - int pos2 = path.LastIndexOf ('/', pos - 1); - if (pos2 == -1) { - startIndex = pos + 1; - } else { - if (path.Substring (pos2 + 1, pos - pos2 - 1) != "..") - path = path.Remove (pos2 + 1, pos - pos2 + 3); - else - startIndex = pos + 1; + var canUseBase = true; + + string path; + if (!string.IsNullOrEmpty (relativeEl.path) || startsWithSlash) { + canUseBase = false; + path = relativeEl.path; + if (startsWithSlash) + path = relativeEl.path; + else { + var pathEnd = baseEl.path.LastIndexOf ('/'); + path = (pathEnd > 0)? baseEl.path.Substring (0, pathEnd+1) : ""; + path += relativeEl.path; } - } - - // 6 f) - if (path.Length > 3 && path.EndsWith ("/..")) { - pos = path.LastIndexOf ('/', path.Length - 4); - if (pos != -1) - if (path.Substring (pos + 1, path.Length - pos - 4) != "..") - path = path.Remove (pos + 1, path.Length - pos - 1); - } - - // 6 g) - while (path.StartsWith ("/../", StringComparison.Ordinal)) - path = path.Substring (3); - - if (!userEscaped) - path = EscapeString (path); + } else + path = baseEl.path; + + if ((path.Length == 0 || path [0] != '/') && baseEl.delimiter == SchemeDelimiter) + path = "/" + path; + + source += UriHelper.Reduce (path, true); + + if (relativeEl.query != null) { + canUseBase = false; + source += "?" + relativeEl.query; + } else if (canUseBase && baseEl.query != null) + source += "?" + baseEl.query; + + if (relativeEl.fragment != null) + source += "#" + relativeEl.fragment; + else if (canUseBase && baseEl.fragment != null) + source += "#" + baseEl.fragment; + + ParseUri (UriKind.Absolute); - // when merging URI the OriginalString is not quite original - source = GetLeftPart (UriPartial.Authority) + path + query + original_fragment; + return; } // Properties @@ -463,13 +386,10 @@ public string AbsolutePath { public string AbsoluteUri { get { EnsureAbsoluteUri (); - if (cachedAbsoluteUri == null) { - cachedAbsoluteUri = GetLeftPart (UriPartial.Path); - if (query.Length > 0) - cachedAbsoluteUri += query; - if (fragment.Length > 0) - cachedAbsoluteUri += fragment; - } + + if (cachedAbsoluteUri == null) + cachedAbsoluteUri = GetComponents (UriComponents.AbsoluteUri, UriFormat.UriEscaped); + return cachedAbsoluteUri; } } @@ -576,24 +496,29 @@ public string LocalPath { if (cachedLocalPath != null) return cachedLocalPath; + string unescapedPath = UriHelper.FormatAbsolute (path, scheme, + UriComponents.Path, UriFormat.Unescaped, UriHelper.FormatFlags.NoSlashReplace); + + if (path.StartsWith("/") && !unescapedPath.StartsWith("/")) + unescapedPath = "/" + unescapedPath; + if (IsLocalIdenticalToAbsolutePath ()) { - cachedLocalPath = Unescape (AbsolutePath); + cachedLocalPath = unescapedPath; return cachedLocalPath; } if (!IsUnc) { - string p = Unescape (path); bool windows = (path.Length > 3 && path [1] == ':' && (path [2] == '\\' || path [2] == '/')); if (windows) - cachedLocalPath = p.Replace ('/', '\\'); + cachedLocalPath = unescapedPath.Replace ('/', '\\'); else - cachedLocalPath = p; + cachedLocalPath = unescapedPath; } else { // support *nix and W32 styles if (path.Length > 1 && path [1] == ':') - cachedLocalPath = Unescape (path.Replace (Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar)); + cachedLocalPath = unescapedPath.Replace (Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); // LAMESPEC: ok, now we cannot determine // if such URI like "file://foo/bar" is @@ -603,12 +528,12 @@ public string LocalPath { string h = host; if (path.Length > 0) { if ((path.Length > 1) || (path[0] != '/')) { - h += path.Replace ('/', '\\'); + h += unescapedPath.Replace ('/', '\\'); } } - cachedLocalPath = "\\\\" + Unescape (h); + cachedLocalPath = "\\\\" + h; } else - cachedLocalPath = Unescape (path); + cachedLocalPath = unescapedPath; } if (cachedLocalPath.Length == 0) cachedLocalPath = Path.DirectorySeparatorChar.ToString (); @@ -727,13 +652,8 @@ public bool IsAbsoluteUri { get { return isAbsoluteUri; } } - // LAMESPEC: source field is supplied in such case that this - // property makes sense. For such case that source field is - // not supplied (i.e. .ctor(Uri, string), this property - // makes no sense. To avoid silly regression it just returns - // ToString() value now. See bug #78374. public string OriginalString { - get { return source != null ? source : ToString (); } + get { return source; } } // Methods @@ -1095,13 +1015,10 @@ public override string ToString () if (cachedToString != null) return cachedToString; - if (isAbsoluteUri) { - cachedToString = Unescape (GetLeftPart (UriPartial.Path), true); - AppendQueryAndFragment (ref cachedToString); - } else { - // Everything is contained in path in this case. - cachedToString = path; - } + if (isAbsoluteUri) + cachedToString = Parser.GetComponentsHelper (this, UriComponents.AbsoluteUri, UriHelper.ToStringUnescape); + else + cachedToString = UriHelper.FormatRelative (source, scheme, UriHelper.ToStringUnescape); return cachedToString; } @@ -1216,15 +1133,10 @@ private void ParseUri (UriKind kind) if (userEscaped) return; - // non-ascii characters are not escaped for the host name - host = EscapeString (host, EscapeCommonHex, false); if (host.Length > 1 && host [0] != '[' && host [host.Length - 1] != ']') { // host name present (but not an IPv6 address) host = host.ToLower (CultureInfo.InvariantCulture); } - - if (isAbsoluteUri && (path.Length > 0)) - path = EscapeString (path); } [Obsolete] @@ -1354,301 +1266,62 @@ private void Parse (UriKind kind, string uriString) private bool SupportsQuery () { - return ((scheme != Uri.UriSchemeNntp) && (scheme != Uri.UriSchemeFtp) && (scheme != Uri.UriSchemeFile)); + return UriHelper.SupportsQuery (scheme); } - // - // This parse method will not throw exceptions on failure - // - // Returns null on success, or a description of the error in the parsing - // + private string ParseNoExceptions (UriKind kind, string uriString) { - // - // From RFC 2396 : - // - // ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? - // 12 3 4 5 6 7 8 9 - // - - uriString = uriString.Trim(); - int len = uriString.Length; + UriElements elements; + string error; + if (!UriParseComponents.TryParseComponents (uriString, kind, null, out elements, out error)) + return error; - if (len == 0){ - if (kind == UriKind.Relative || kind == UriKind.RelativeOrAbsolute){ - isAbsoluteUri = false; - return null; - } - } - - if (len <= 1 && (kind == UriKind.Absolute)) - return "Absolute URI is too short"; - - int pos = 0; - - // 1, 2 - // Identify Windows path, unix path, or standard URI. - if (uriString [0] == '/' && Path.DirectorySeparatorChar == '/'){ - //Unix Path - ParseAsUnixAbsoluteFilePath (uriString); - if (kind == UriKind.Relative) - isAbsoluteUri = false; - return null; - } else if (uriString.Length >= 2 && uriString [0] == '\\' && uriString [1] == '\\') { - //Windows UNC - ParseAsWindowsUNC (uriString); - return null; - } - - - pos = uriString.IndexOf (':'); - if (pos == 0) { - if (kind == UriKind.Absolute) - return "Invalid URI: The format of the URI could not be determined."; - isAbsoluteUri = false; - path = uriString; - return null; - } else if (pos < 0) { - /* Relative path */ - isAbsoluteUri = false; - path = uriString; - return null; - } else if (pos == 1) { - if (!IsAlpha (uriString [0])) { - if (kind == UriKind.Absolute) - return "Invalid URI: The URI scheme is not valid."; - isAbsoluteUri = false; - path = uriString; - return null; - } - // This means 'a:' == windows full path. - string msg = ParseAsWindowsAbsoluteFilePath (uriString); - if (msg != null) - return msg; - return null; - } - - // scheme - scheme = uriString.Substring (0, pos).ToLower (CultureInfo.InvariantCulture); - - // Check scheme name characters as specified in RFC2396. - // Note: different checks in 1.x and 2.0 - if (!CheckSchemeName (scheme)) { - if (kind == UriKind.Absolute) - return "Invalid URI: The URI scheme is not valid."; - isAbsoluteUri = false; - path = uriString; - return null; - } - - scheme = TryGetKnownUriSchemeInstance (scheme); + var formatFlags = UriHelper.FormatFlags.None; + if (UriHelper.HasCharactersToNormalize (uriString)) + formatFlags |= UriHelper.FormatFlags.HasUriCharactersToNormalize; - // from here we're practically working on uriString.Substring(startpos,endpos-startpos) - int startpos = pos + 1; - int endpos = uriString.Length; + if (userEscaped) + formatFlags |= UriHelper.FormatFlags.UserEscaped; - // 8 fragment - pos = uriString.IndexOf ('#', startpos); - if (!IsUnc && pos != -1) { - if (userEscaped) - fragment = uriString.Substring (pos); - else - fragment = "#" + EscapeString (uriString.Substring (pos+1)); + if (elements.host != null) + formatFlags |= UriHelper.FormatFlags.HasHost; - endpos = pos; - } + scheme = elements.scheme; - // special case: there is no query part for 'news' - if (scheme == Uri.UriSchemeNews) { - pos = scheme.Length + 1; - path = EscapeString (uriString.Substring (pos, endpos - pos), EscapeNews); - return null; - } + userinfo = elements.user; - // special case: there is no query part for 'nntp', 'file' and 'ftp' but there is an host, port, user... - if (SupportsQuery ()) { - // 6 query - pos = uriString.IndexOf ('?', startpos, endpos-startpos); - if (pos != -1) { - query = uriString.Substring (pos, endpos-pos); - endpos = pos; - if (!userEscaped) - query = EscapeString (query); - } + if (elements.host != null) { + host = UriHelper.FormatAbsolute (elements.host, scheme, + UriComponents.Host, UriFormat.UriEscaped, formatFlags); } - // 3 - if (IsPredefinedScheme (scheme) && scheme != UriSchemeMailto && ( - (endpos-startpos < 2) || - (endpos-startpos >= 2 && uriString [startpos] == '/' && uriString [startpos+1] != '/'))) - return "Invalid URI: The Authority/Host could not be parsed."; - - - bool startsWithSlashSlash = endpos-startpos >= 2 && uriString [startpos] == '/' && uriString [startpos+1] == '/'; - bool unixAbsPath = scheme == UriSchemeFile && startsWithSlashSlash && (endpos-startpos == 2 || uriString [startpos+2] == '/'); - bool windowsFilePath = false; - if (startsWithSlashSlash) { - if (kind == UriKind.Relative) - return "Absolute URI when we expected a relative one"; - - if (scheme != UriSchemeMailto) - startpos += 2; - - if (scheme == UriSchemeFile) { - int num_leading_slash = 2; - for (int i = startpos; i < endpos; i++) { - if (uriString [i] != '/') - break; - num_leading_slash++; - } - if (num_leading_slash >= 4) { - unixAbsPath = false; - while (startpos < endpos && uriString[startpos] == '/') { - startpos++; - } - } else if (num_leading_slash >= 3) { - startpos += 1; - } - } - - if (endpos - startpos > 1 && uriString [startpos + 1] == ':') { - unixAbsPath = false; - windowsFilePath = true; - } + port = elements.port; - } else if (!IsPredefinedScheme (scheme)) { - path = uriString.Substring(startpos, endpos-startpos); - isOpaquePart = true; - return null; - } + if (port == -1) + port = GetDefaultPort (scheme); - // 5 path - if (unixAbsPath) { - pos = -1; - } else { - pos = uriString.IndexOf ('/', startpos, endpos - startpos); - if (pos == -1 && windowsFilePath) - pos = uriString.IndexOf ('\\', startpos, endpos - startpos); - } - if (pos != -1) { - path = uriString.Substring (pos, endpos - pos); - if (!SupportsQuery ()) { - if (scheme != Uri.UriSchemeNntp) - path = path.Replace ('\\', '/'); - path = EscapeString (path, EscapeNews); - } - endpos = pos; - } else { - if (scheme != Uri.UriSchemeMailto) + if (elements.path != null) { + path = UriHelper.FormatAbsolute (elements.path, scheme, + UriComponents.Path, UriFormat.UriEscaped, formatFlags); + if (elements.delimiter == SchemeDelimiter && string.IsNullOrEmpty(path)) path = "/"; } - // 4.a user info - if (unixAbsPath) - pos = -1; - else - pos = uriString.IndexOf ('@', startpos, endpos-startpos); - if (pos != -1) { - // supplying username / password on a file URI is not supported - if (scheme == UriSchemeFile) - return "Invalid host"; - userinfo = uriString.Substring (startpos, pos-startpos); - startpos = pos + 1; + if (elements.query != null) { + query = "?" + UriHelper.FormatAbsolute (elements.query, scheme, + UriComponents.Query, UriFormat.UriEscaped, formatFlags); } - // 4.b port - bool valid_port = true; - port = -1; - if (unixAbsPath) - pos = -1; - else - pos = uriString.LastIndexOf (':', endpos-1, endpos-startpos); - if (pos != -1 && pos != endpos - 1) { - string portStr = uriString.Substring(pos + 1, endpos - (pos + 1)); - if (portStr.Length > 0 && portStr[portStr.Length - 1] != ']') { - if (!Int32.TryParse (portStr, NumberStyles.None, CultureInfo.InvariantCulture, out port) || - port < 0 || port > UInt16.MaxValue) - valid_port = false; // delay reporting - else - endpos = pos; - } else { - if (port == -1) { - port = GetDefaultPort (scheme); - } - } - } else if (!IsFile) { - // if no port is specified by a colon ':' is present then we must ignore it - // since it would be part of the host name and, as such, would be invalid - if (pos == endpos - 1) - endpos--; - - if (port == -1) - port = GetDefaultPort (scheme); - } - - // 4 authority - uriString = uriString.Substring(startpos, endpos-startpos); - host = uriString; - - if (unixAbsPath) { - path = Reduce ('/' + uriString, true); - host = String.Empty; - } else if (host.Length == 2 && host [1] == ':') { - if (scheme != UriSchemeFile) { - host = host [0].ToString (); - } else { - // windows filepath - path = host + path; - host = String.Empty; - } - } else if (isUnixFilePath) { - uriString = "//" + uriString; - host = String.Empty; - } else if (scheme == UriSchemeFile) { - // under Windows all file:// URI are considered UNC, which is not the case other MacOS (e.g. Silverlight) -#if BOOTSTRAP_BASIC - isUnc = isWin32; -#else - isUnc = Environment.IsRunningOnWindows; -#endif - } else if (host.Length == 0 && - (scheme == UriSchemeHttp || scheme == UriSchemeGopher || scheme == UriSchemeNntp || - scheme == UriSchemeHttps || scheme == UriSchemeFtp)) { - return "Invalid URI: The Authority/Host could not be parsed."; - } - - if (host.Length > 0) { - switch (CheckHostName (host)) { - case UriHostNameType.Unknown: - if ((host [0] == ':') || (host [0] == '@')) - return "Invalid URI: The hostname could not be parsed."; - if (host.IndexOf (':') != -1) - return "Invalid URI: Invalid port specified."; - if (Parser is DefaultUriParser || Parser == null) - return "Invalid URI: The hostname could not be parsed."; - break; - case UriHostNameType.IPv6: - IPv6Address ipv6addr; - if (IPv6Address.TryParse (host, out ipv6addr)) { - host = "[" + ipv6addr.ToString (true) + "]"; - scope_id = ipv6addr.ScopeId; - } - break; - } + if (elements.fragment != null) { + fragment = "#" + UriHelper.FormatAbsolute (elements.fragment, scheme, + UriComponents.Fragment, UriFormat.UriEscaped, formatFlags); } - // delayed reporting (to throw the expected exception in the right order) - if (!valid_port) - return "Invalid URI: Invalid port number"; - UriFormatException ex = null; - if (Parser != null) - Parser.InitializeAndValidate (this, out ex); - if (ex != null) - return ex.Message; - - if ((scheme != Uri.UriSchemeMailto) && (scheme != Uri.UriSchemeFile)) { - path = Reduce (path, CompactEscaped (scheme)); - } + isAbsoluteUri = elements.isAbsoluteUri; + isUnc = elements.isUnc; + isUnixFilePath = elements.isUnixFilePath; + scope_id = elements.scopeId; return null; } @@ -1780,7 +1453,7 @@ private static string Reduce (string path, bool compact_escaped) // A variant of HexUnescape() which can decode multi-byte escaped // sequences such as (e.g.) %E3%81%8B into a single character - private static char HexUnescapeMultiByte (string pattern, ref int index, out char surrogate) + internal static char HexUnescapeMultiByte (string pattern, ref int index, out char surrogate) { surrogate = char.MinValue; @@ -1888,6 +1561,7 @@ public UriScheme (string s, string d, int p) new UriScheme (UriSchemeFile, SchemeDelimiter, -1), new UriScheme (UriSchemeMailto, ":", 25), new UriScheme (UriSchemeNews, ":", 119), + new UriScheme (UriSchemeUuid, ":", -1), new UriScheme (UriSchemeNntp, SchemeDelimiter, 119), new UriScheme (UriSchemeGopher, SchemeDelimiter, 70), }; @@ -2072,19 +1746,19 @@ public static int Compare (Uri uri1, Uri uri2, UriComponents partsToCompare, Uri // static bool NeedToEscapeDataChar (char b) { -#if NET_4_0 - // .NET 4.0 follows RFC 3986 Unreserved Characters - return !((b >= 'A' && b <= 'Z') || - (b >= 'a' && b <= 'z') || - (b >= '0' && b <= '9') || - b == '-' || b == '.' || b == '_' || b == '~'); -#else + if (IriParsing) { + // .NET 4.0 follows RFC 3986 Unreserved Characters + return !((b >= 'A' && b <= 'Z') || + (b >= 'a' && b <= 'z') || + (b >= '0' && b <= '9') || + b == '-' || b == '.' || b == '_' || b == '~'); + } + return !((b >= 'A' && b <= 'Z') || (b >= 'a' && b <= 'z') || (b >= '0' && b <= '9') || b == '_' || b == '~' || b == '!' || b == '\'' || b == '(' || b == ')' || b == '*' || b == '-' || b == '.'); -#endif } public static string EscapeDataString (string stringToEscape) @@ -2123,27 +1797,15 @@ public static string EscapeDataString (string stringToEscape) // static bool NeedToEscapeUriChar (char b) { - if ((b >= 'A' && b <= 'Z') || (b >= 'a' && b <= 'z') || (b >= '&' && b <= ';')) + if ((b >= 'A' && b <= 'Z') || (b >= 'a' && b <= 'z') || (b >= '&' && b <= ';') || + b == '!' || b == '#' || b == '$' || b == '=' || b == '?' || b == '@' || b == '_' || b == '~') return false; - switch (b) { - case '!': - case '#': - case '$': - case '=': - case '?': - case '@': - case '_': - case '~': #if NET_4_0 - // .NET 4.0 follows RFC 3986 - case '[': - case ']': + if (b == '[' || b == ']') + return !IriParsing; #endif - return false; - default: - return true; - } + return true; } public static string EscapeUriString (string stringToEscape) diff --git a/mcs/class/System/System/UriElements.cs b/mcs/class/System/System/UriElements.cs index 52319c64114..f0534da5af4 100644 --- a/mcs/class/System/System/UriElements.cs +++ b/mcs/class/System/System/UriElements.cs @@ -33,20 +33,29 @@ internal class UriElements public UriElements() { scheme = String.Empty; - user = String.Empty; + delimiter = String.Empty; + user = null; host = String.Empty; - port = String.Empty; + port = -1; path = String.Empty; - query = String.Empty; - fragment = String.Empty; + query = null; + fragment = null; + + isAbsoluteUri = true; } public string scheme; + public string delimiter; public string user; public string host; - public string port; + public int port; public string path; public string query; public string fragment; + + public bool isAbsoluteUri; + public bool isUnixFilePath; + public bool isUnc; + public long scopeId; } } diff --git a/mcs/class/System/System/UriHelper.cs b/mcs/class/System/System/UriHelper.cs new file mode 100644 index 00000000000..cbfdbd1afee --- /dev/null +++ b/mcs/class/System/System/UriHelper.cs @@ -0,0 +1,537 @@ +using System; +using System.Globalization; +using System.Text; +using System.Collections.Generic; + +namespace System { + internal class UriHelper { + internal const UriFormat ToStringUnescape = (UriFormat) 0x7FFF; + + internal static bool IriParsing { + get { return Uri.IriParsing; } + } + + [Flags] + internal enum FormatFlags { + None = 0, + HasComponentCharactersToNormalize = 1 << 0, + HasUriCharactersToNormalize = 1 << 1, + HasHost = 1 << 2, + HasFragmentPercentage = 1 << 3, + UserEscaped = 1 << 4, + IPv6Host = 1 << 5, + NoSlashReplace = 1 << 6, + } + + [Flags] + internal enum UriSchemes { + Http = 1 << 0, + Https = 1 << 1, + File = 1 << 2, + Ftp = 1 << 3, + Gopher = 1 << 4, + Ldap = 1 << 5, + Mailto = 1 << 6, + NetPipe = 1 << 7, + NetTcp = 1 << 8, + News = 1 << 9, + Nntp = 1 << 10, + Telnet = 1 << 11, + Uuid = 1 << 12, + Custom = 1 << 13, + CustomWithHost = 1 << 14, + All = ~0, + None = 0 + } + + private static UriSchemes GetScheme (string schemeName) + { + schemeName = schemeName.ToLowerInvariant (); + + if (schemeName == "") + return UriSchemes.None; + if (schemeName == Uri.UriSchemeHttp) + return UriSchemes.Http; + if (schemeName == Uri.UriSchemeHttps) + return UriSchemes.Https; + if (schemeName == Uri.UriSchemeFile) + return UriSchemes.File; + if (schemeName == Uri.UriSchemeFtp) + return UriSchemes.Ftp; + if (schemeName == Uri.UriSchemeGopher) + return UriSchemes.Gopher; + if (schemeName == Uri.UriSchemeLdap) + return UriSchemes.Ldap; + if (schemeName == Uri.UriSchemeMailto) + return UriSchemes.Mailto; + if (schemeName == Uri.UriSchemeNetPipe) + return UriSchemes.NetPipe; + if (schemeName == Uri.UriSchemeNetTcp) + return UriSchemes.NetTcp; + if (schemeName == Uri.UriSchemeNews) + return UriSchemes.News; + if (schemeName == Uri.UriSchemeNntp) + return UriSchemes.Nntp; + if (schemeName == Uri.UriSchemeTelnet) + return UriSchemes.Telnet; + if (schemeName == Uri.UriSchemeUuid) + return UriSchemes.Uuid; + + return UriSchemes.Custom; + } + + internal static bool SchemeContains (UriSchemes keys, UriSchemes flag) + { + return (keys & flag) != 0; + } + + internal static bool IsKnownScheme(string scheme) + { + return GetScheme(scheme) != UriSchemes.Custom; + } + + internal static string HexEscapeMultiByte (char character) + { + const string hex_upper_chars = "0123456789ABCDEF"; + string ret = ""; + byte [] bytes = Encoding.UTF8.GetBytes (new [] {character}); + foreach (byte b in bytes) + ret += "%" + hex_upper_chars [((b & 0xf0) >> 4)] + hex_upper_chars [((b & 0x0f))]; + + return ret; + } + + internal static bool SupportsQuery (string scheme) + { + return SupportsQuery (GetScheme (scheme)); + } + + internal static bool SupportsQuery(UriSchemes scheme) + { + if (SchemeContains (scheme, UriSchemes.File)) + return IriParsing; + + return !SchemeContains (scheme, UriSchemes.Ftp | UriSchemes.Gopher | UriSchemes.Nntp | UriSchemes.Telnet | UriSchemes.News); + } + + internal static bool HasCharactersToNormalize(string str) + { + int len = str.Length; + for (int i = 0; i < len; i++) { + char c = str [i]; + if (c != '%') + continue; + + int iStart = i; + char surrogate; + char x = Uri.HexUnescapeMultiByte (str, ref i, out surrogate); + + bool isEscaped = i - iStart > 1; + if (!isEscaped) + continue; + + if ((x >= 'A' && x <= 'Z') || (x >= 'a' && x <= 'z') || (x >= '0' && x <= '9') || + x == '-' || x == '.' || x == '_' || x == '~') + return true; + + if (x > 0x7f) + return true; + } + + return false; + } + + internal static bool HasPercentage (string str) + { + int len = str.Length; + for (int i = 0; i < len; i++) { + char c = str [i]; + if (c != '%') + continue; + + int iStart = i; + char surrogate; + char x = Uri.HexUnescapeMultiByte (str, ref i, out surrogate); + + bool isEscaped = i - iStart > 1; + if (!isEscaped || x == '%') + return true; + } + + return false; + } + + internal static string FormatAbsolute (string str, string schemeName, + UriComponents component, UriFormat uriFormat, FormatFlags formatFlags = FormatFlags.None) + { + return Format (str, schemeName, UriKind.Absolute, component, uriFormat, formatFlags); + } + + internal static string FormatRelative (string str, string schemeName, UriFormat uriFormat) + { + var formatFlags = FormatFlags.None; + if (HasCharactersToNormalize (str)) + formatFlags |= FormatFlags.HasUriCharactersToNormalize; + + return Format (str, schemeName, UriKind.Relative, UriComponents.Path, uriFormat, formatFlags); + } + + private static string Format (string str, string schemeName, UriKind uriKind, + UriComponents component, UriFormat uriFormat, FormatFlags formatFlags) + { + if (string.IsNullOrEmpty (str)) + return ""; + + if (UriHelper.HasCharactersToNormalize (str)) + formatFlags |= UriHelper.FormatFlags.HasComponentCharactersToNormalize; + + if (component == UriComponents.Fragment && UriHelper.HasPercentage (str)) + formatFlags |= UriHelper.FormatFlags.HasFragmentPercentage; + + if (component == UriComponents.Host && + str.Length > 1 && str [0] == '[' && str [str.Length - 1] == ']') + formatFlags |= UriHelper.FormatFlags.IPv6Host; + + UriSchemes scheme = GetScheme (schemeName); + + if (scheme == UriSchemes.Custom && (formatFlags & FormatFlags.HasHost) != 0) + scheme = UriSchemes.CustomWithHost; + + var reduceAfter = UriSchemes.Http | UriSchemes.Https | UriSchemes.File | UriSchemes.NetPipe | UriSchemes.NetTcp; + + if (IriParsing) { + reduceAfter |= UriSchemes.Ftp; + } else if (component == UriComponents.Path) { + if(scheme == UriSchemes.Ftp) + str = Reduce (str.Replace ('\\', '/'), !IriParsing); + if (scheme == UriSchemes.CustomWithHost) + str = Reduce (str.Replace ('\\', '/'), false); + } + + str = FormatString (str, scheme, uriKind, component, uriFormat, formatFlags); + + if (component == UriComponents.Path) { + if (SchemeContains (scheme, reduceAfter)) + str = Reduce (str, !IriParsing); + if(IriParsing && scheme == UriSchemes.CustomWithHost) + str = Reduce (str, false); + } + + return str; + } + + private static string FormatString (string str, UriSchemes scheme, UriKind uriKind, + UriComponents component, UriFormat uriFormat, FormatFlags formatFlags) + { + var s = new StringBuilder (); + int len = str.Length; + for (int i = 0; i < len; i++) { + char c = str [i]; + if (c == '%') { + int iStart = i; + char surrogate; + char x = Uri.HexUnescapeMultiByte (str, ref i, out surrogate); + + string cStr = str.Substring(iStart, i-iStart); + s.Append (FormatChar (x, cStr, scheme, uriKind, component, uriFormat, formatFlags)); + if (surrogate != char.MinValue) + s.Append (surrogate); + + i--; + } else + s.Append (FormatChar (c, "" + c, scheme, uriKind, component, uriFormat, formatFlags)); + } + + return s.ToString(); + } + + private static string FormatChar (char c, string cStr, UriSchemes scheme, UriKind uriKind, + UriComponents component, UriFormat uriFormat, FormatFlags formatFlags) + { + var isEscaped = cStr.Length != 1; + + var userEscaped = (formatFlags & FormatFlags.UserEscaped) != 0; + if (!isEscaped && !userEscaped && NeedToEscape (c, scheme, component, uriKind, uriFormat, formatFlags)) + return HexEscapeMultiByte (c); + + if (isEscaped && !NeedToUnescape (c, scheme, component, uriKind, uriFormat, formatFlags)) { + if (IriParsing && + (c == '<' || c == '>' || c == '^' || c == '{' || c == '|' || c == '}' || c > 0x7F) && + (formatFlags & FormatFlags.HasUriCharactersToNormalize) != 0) + return HexEscapeMultiByte (c); //Upper case escape + + return cStr; //Keep original case + } + + if ((formatFlags & FormatFlags.NoSlashReplace) == 0 && + c == '\\' && component == UriComponents.Path) { + if (!IriParsing && uriFormat != UriFormat.UriEscaped && + SchemeContains (scheme, UriSchemes.Http | UriSchemes.Https)) + return "/"; + + if (SchemeContains (scheme, UriSchemes.Http | UriSchemes.Https | UriSchemes.Ftp | UriSchemes.CustomWithHost)) + return (isEscaped && uriFormat != UriFormat.UriEscaped) ? "\\" : "/"; + + if (SchemeContains (scheme, UriSchemes.NetPipe | UriSchemes.NetTcp | UriSchemes.File)) + return "/"; + } + + return c.ToString (CultureInfo.InvariantCulture); + } + + private static bool NeedToUnescape (char c, UriSchemes scheme, UriComponents component, UriKind uriKind, + UriFormat uriFormat, FormatFlags formatFlags) + { + if ((formatFlags & FormatFlags.IPv6Host) != 0) + return false; + + if (uriFormat == UriFormat.Unescaped) + return true; + + UriSchemes sDecoders = UriSchemes.NetPipe | UriSchemes.NetTcp; + + if (!IriParsing) + sDecoders |= UriSchemes.Http | UriSchemes.Https; + + if (c == '/' || c == '\\') { + if (!IriParsing && uriKind == UriKind.Absolute && uriFormat != UriFormat.UriEscaped && + uriFormat != UriFormat.SafeUnescaped) + return true; + + if (SchemeContains (scheme, UriSchemes.File)) { + return component != UriComponents.Fragment && + (component != UriComponents.Query || !IriParsing); + } + + return component != UriComponents.Query && component != UriComponents.Fragment && + SchemeContains (scheme, sDecoders); + } + + if (c == '?') { + //Avoid creating new query + if (SupportsQuery (scheme) && component == UriComponents.Path) + return false; + + if (!IriParsing && uriFormat == ToStringUnescape) { + if (SupportsQuery (scheme)) + return component == UriComponents.Query || component == UriComponents.Fragment; + + return component == UriComponents.Fragment; + } + + return false; + } + + if (c == '#') { + //Avoid creating new fragment + if (component == UriComponents.Path || component == UriComponents.Query) + return false; + + return false; + } + + if (uriFormat == ToStringUnescape && !IriParsing) { + if (uriKind == UriKind.Relative) + return false; + + if (c == '$' || c == '&' || c == '+' || c == ',' || c == ';' || c == '=' || c == '@') + return true; + + if (c < 0x20 || c == 0x7f) + return true; + } + + if (uriFormat == UriFormat.SafeUnescaped || uriFormat == ToStringUnescape) { + if (c == '-' || c == '.' || c == '_' || c == '~') + return true; + + if (c == ' ' || c == '!' || c == '"' || c == '\'' || c == '(' || c == ')' || c == '*' || + c == '<' || c == '>' || c == '^' || c == '`' || c == '{' || c == '}' || c == '|') + return uriKind != UriKind.Relative || + (IriParsing && (formatFlags & FormatFlags.HasUriCharactersToNormalize) != 0); + + if (c == ':' || c == '[' || c == ']') + return uriKind != UriKind.Relative; + + if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')) + return true; + + if (c > 0x7f) + return true; + + return false; + } + + if (uriFormat == UriFormat.UriEscaped) { + if (!IriParsing) { + if (c == '.') { + if (SchemeContains (scheme, UriSchemes.File)) + return component != UriComponents.Fragment; + + return component != UriComponents.Query && component != UriComponents.Fragment && + SchemeContains (scheme, sDecoders); + } + + return false; + } + + if (c == '-' || c == '.' || c == '_' || c == '~') + return true; + + if ((formatFlags & FormatFlags.HasUriCharactersToNormalize) != 0 && + (c == '!' || c == '\'' || c == '(' || c == ')' || c == '*' || + c == ':' || c == '[' || c == ']')) + return true; + + if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')) + return true; + + return false; + } + + return false; + } + + private static bool NeedToEscape (char c, UriSchemes scheme, UriComponents component, UriKind uriKind, + UriFormat uriFormat, FormatFlags formatFlags) + { + if ((formatFlags & FormatFlags.IPv6Host) != 0) + return false; + + if (c == '?') { + if (uriFormat == UriFormat.Unescaped) + return false; + + if (!SupportsQuery (scheme)) + return component != UriComponents.Fragment; + + //Avoid removing query + if (component == UriComponents.Path) + return false; + + return false; + } + + if (c == '#') { + //Avoid removing fragment + if (component == UriComponents.Path || component == UriComponents.Query) + return false; + + if (component == UriComponents.Fragment && + (uriFormat == ToStringUnescape || uriFormat == UriFormat.SafeUnescaped) && + (formatFlags & FormatFlags.HasFragmentPercentage) != 0) + return true; + + if (IriParsing) + return false; + + return uriFormat == UriFormat.UriEscaped || + (uriFormat != UriFormat.Unescaped && (formatFlags & FormatFlags.HasComponentCharactersToNormalize) != 0); + } + + if (uriFormat == UriFormat.SafeUnescaped || uriFormat == ToStringUnescape) { + if (c == '%') + return uriKind != UriKind.Relative; + } + + if (uriFormat == UriFormat.SafeUnescaped) { + if (c < 0x20 || c == 0x7F) + return true; + } + + if (uriFormat == UriFormat.UriEscaped) { + if (c < 0x20 || c >= 0x7F) + return component != UriComponents.Host; + + if (c == ' ' || c == '"' || c == '%' || c == '<' || c == '>' || c == '^' || + c == '`' || c == '{' || c == '}' || c == '|') + return true; + + if (c == '[' || c == ']') + return !IriParsing; + + if (c == '\\') { + return component != UriComponents.Path || + SchemeContains (scheme, + UriSchemes.Gopher | UriSchemes.Ldap | UriSchemes.Mailto | UriSchemes.Nntp | + UriSchemes.Telnet | UriSchemes.News | UriSchemes.Custom); + } + } + + return false; + } + + // This is called "compacting" in the MSDN documentation + internal static string Reduce (string path, bool trimDots) + { + // quick out, allocation-free, for a common case + if (path == "/") + return path; + + bool endWithSlash = false; + + List result = new List (); + + bool begin = true; + for (int startpos = 0; startpos < path.Length; ) { + endWithSlash = true; + + int endpos = path.IndexOf ('/', startpos); + if (endpos == -1) + endpos = path.Length; + string current = path.Substring (startpos, endpos-startpos); + startpos = endpos + 1; + if (begin && current.Length == 0) { + begin = false; + continue; + } + + begin = false; + if (current == "..") { + int resultCount = result.Count; + // in 2.0 profile, skip leading ".." parts + if (resultCount == 0) { + continue; + } + + result.RemoveAt (resultCount - 1); + continue; + } + + if (current == "." || + (trimDots && current.EndsWith("."))) { + current = current.TrimEnd('.'); + if (current == "" && endpos < path.Length) + continue; + } + + endWithSlash = false; + + result.Add (current); + } + + if (result.Count == 0) + return "/"; + + StringBuilder res = new StringBuilder (); + + if (path [0] == '/') + res.Append ('/'); + + bool first = true; + foreach (string part in result) { + if (first) { + first = false; + } else { + res.Append ('/'); + } + res.Append(part); + } + + if (path [path.Length - 1] == '/' || endWithSlash) + res.Append ('/'); + + return res.ToString(); + } + } +} diff --git a/mcs/class/System/System/UriParseComponents.cs b/mcs/class/System/System/UriParseComponents.cs index cf3613078f8..dc93feb3bf8 100644 --- a/mcs/class/System/System/UriParseComponents.cs +++ b/mcs/class/System/System/UriParseComponents.cs @@ -26,32 +26,64 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.IO; +using System.Net; using System.Text; - +using System.Globalization; namespace System { internal class ParserState { - public ParserState (string uri) + public ParserState (string uri, UriKind kind) { remaining = uri; + this.kind = kind; elements = new UriElements (); } public string remaining; + public UriKind kind; public UriElements elements; + public string error; } // Parse Uri components (scheme, userinfo, host, query, fragment) // http://www.ietf.org/rfc/rfc3986.txt internal static class UriParseComponents { - public static UriElements ParseComponents (string uri) + public static UriElements ParseComponents (string uri, UriKind kind, UriParser parser) + { + UriElements elements; + string error; + + if (!TryParseComponents (uri, kind, parser, out elements, out error)) + throw new UriFormatException (error); + + return elements; + } + + public static bool TryParseComponents (string uri, UriKind kind, UriParser parser, out UriElements elements, out string error) { - ParserState state = new ParserState (uri); + uri = uri.Trim (); + + var ok = true; + ParserState state = new ParserState (uri, kind); + + if (uri.Length == 0 && (kind == UriKind.Relative || kind == UriKind.RelativeOrAbsolute)){ + state.elements.isAbsoluteUri = false; + ok = false; + } - bool ok = ParseScheme (ref state); + if (uri.Length <= 1 && kind == UriKind.Absolute) { + state.error = "Absolute URI is too short"; + ok = false; + } + + if (ok) + ok = ParseFilePath (ref state); + if (ok) + ok = ParseScheme (ref state); if (ok) ok = ParseAuthority (ref state); if (ok) @@ -60,24 +92,140 @@ public static UriElements ParseComponents (string uri) ok = ParseQuery (ref state); if (ok) ParseFragment (ref state); + + var scheme = state.elements.scheme; + if (string.IsNullOrEmpty (state.elements.host) && + (scheme == Uri.UriSchemeHttp || scheme == Uri.UriSchemeGopher || scheme == Uri.UriSchemeNntp || + scheme == Uri.UriSchemeHttps || scheme == Uri.UriSchemeFtp)) + state.error = "Invalid URI: The Authority/Host could not be parsed."; + + parser = parser ?? UriParser.GetParser (scheme); + if (!string.IsNullOrEmpty (state.elements.host) && + Uri.CheckHostName (state.elements.host) == UriHostNameType.Unknown && + parser is DefaultUriParser) + state.error = "Invalid URI: The hostname could not be parsed."; + + if (!string.IsNullOrEmpty (state.error)) { + elements = null; + error = state.error; + return false; + } - return state.elements; + elements = state.elements; + error = null; + return true; } + // ALPHA private static bool IsAlpha (char ch) { return (('a' <= ch) && (ch <= 'z')) || (('A' <= ch) && (ch <= 'Z')); } + + private static bool ParseFilePath (ref ParserState state) + { + bool ok = ParseWindowsFilePath (ref state); + if (ok) + ok = ParseWindowsUNC (ref state); + if (ok) + ok = ParseUnixFilePath (ref state); + + return ok; + } + + private static bool ParseWindowsFilePath (ref ParserState state) + { + var scheme = state.elements.scheme; + + if (!string.IsNullOrEmpty (scheme) && + scheme != Uri.UriSchemeFile && UriHelper.IsKnownScheme (scheme)) + return state.remaining.Length > 0; + + string part = state.remaining; + + if (part.Length > 0 && (part [0] == '/' || part [0] == '\\')) + part = part.Substring (1); + + if (part.Length < 2 || part [1] != ':') + return state.remaining.Length > 0; + + if (!IsAlpha (part [0])) { + if (state.kind == UriKind.Absolute) { + state.error = "Invalid URI: The URI scheme is not valid."; + return false; + } + state.elements.isAbsoluteUri = false; + state.elements.path = part; + return false; + } + + if (part.Length > 2 && part [2] != '\\' && part [2] != '/') { + state.error = "Relative file path is not allowed."; + return false; + } + + if (string.IsNullOrEmpty (scheme)) { + state.elements.scheme = Uri.UriSchemeFile; + state.elements.delimiter = "://"; + } + + state.elements.path = part.Replace ("\\", "/"); + + return false; + } + + private static bool ParseWindowsUNC (ref ParserState state) + { + string part = state.remaining; + + if (part.Length < 2 || part [0] != '\\' || part [1] != '\\') + return state.remaining.Length > 0; + + state.elements.scheme = Uri.UriSchemeFile; + state.elements.delimiter = "://"; + state.elements.isUnc = true; + + part = part.TrimStart (new char [] {'\\'}); + int pos = part.IndexOf ('\\'); + if (pos > 0) { + state.elements.path = part.Substring (pos); + state.elements.host = part.Substring (0, pos); + } else { // "\\\\server" + state.elements.host = part; + state.elements.path = String.Empty; + } + state.elements.path = state.elements.path.Replace ("\\", "/"); + + return false; + } + + private static bool ParseUnixFilePath (ref ParserState state) + { + string part = state.remaining; + + if (part.Length < 1 || part [0] != '/' || Path.DirectorySeparatorChar != '/') + return state.remaining.Length > 0; + + state.elements.scheme = Uri.UriSchemeFile; + state.elements.delimiter = "://"; + state.elements.isUnixFilePath = true; + state.elements.isAbsoluteUri = (state.kind == UriKind.Relative)? false : true; + + if (part.Length >= 2 && part [0] == '/' && part [1] == '/') { + part = part.TrimStart (new char [] {'/'}); + state.elements.path = '/' + part; + } else + state.elements.path = part; + + return false; + } // 3.1) scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) private static bool ParseScheme (ref ParserState state) { string part = state.remaining; - if (!IsAlpha (part [0])) - return part.Length > 0; - StringBuilder sb = new StringBuilder (); sb.Append (part [0]); @@ -90,23 +238,80 @@ private static bool ParseScheme (ref ParserState state) sb.Append (ch); } - if (index + 1 <= part.Length && part [index] == ':') { - state.elements.scheme = sb.ToString (); - state.remaining = part.Substring (index + 1); + if (index == 0 || index >= part.Length) { + if (state.kind == UriKind.Absolute) { + state.error = "Invalid URI: The format of the URI could not be determined."; + return false; + } + + state.elements.isAbsoluteUri = false; + return state.remaining.Length > 0; + } + + if (part [index] != ':') { + if (state.kind == UriKind.Absolute) { + state.error = "Invalid URI: The URI scheme is not valid."; + return false; + } + + state.elements.isAbsoluteUri = false; + return state.remaining.Length > 0; + } + + state.elements.scheme = sb.ToString ().ToLowerInvariant (); + state.remaining = part.Substring (index); + + // Check scheme name characters as specified in RFC2396. + // Note: different checks in 1.x and 2.0 + if (!Uri.CheckSchemeName (state.elements.scheme)) { + if (state.kind == UriKind.Absolute) { + state.error = "Invalid URI: The URI scheme is not valid."; + return false; + } + + state.elements.isAbsoluteUri = false; + return state.remaining.Length > 0; + } + + if (state.elements.scheme == Uri.UriSchemeFile) { + // under Windows all file:// URI are considered UNC, which is not the case other MacOS (e.g. Silverlight) +#if BOOTSTRAP_BASIC + state.elements.isUnc = (Path.DirectorySeparatorChar == '\\'); +#else + state.elements.isUnc = Environment.IsRunningOnWindows; +#endif + } + + return ParseDelimiter (ref state); + } + + private static bool ParseDelimiter (ref ParserState state) + { + var delimiter = Uri.GetSchemeDelimiter (state.elements.scheme); + + if (!state.remaining.StartsWith (delimiter)) { + if (UriHelper.IsKnownScheme (state.elements.scheme)) { + state.error = "Invalid URI: The Authority/Host could not be parsed."; + return false; + } + + delimiter = ":"; } + state.elements.delimiter = delimiter; + + state.remaining = state.remaining.Substring (delimiter.Length); + return state.remaining.Length > 0; } private static bool ParseAuthority (ref ParserState state) { + if (state.elements.delimiter != Uri.SchemeDelimiter && state.elements.scheme != Uri.UriSchemeMailto) + return state.remaining.Length > 0; + string part = state.remaining; - if (part.Length < 2 || part [0] != '/' || part [1] != '/') - return part.Length > 0; - - state.remaining = part.Substring (2); - bool ok = ParseUser (ref state); if (ok) ok = ParseHost (ref state); @@ -152,6 +357,11 @@ private static bool ParseUser (ref ParserState state) } if (index + 1 <= part.Length && part [index] == '@') { + if (state.elements.scheme == Uri.UriSchemeFile) { + state.error = "Invalid URI: The hostname could not be parsed."; + return false; + } + state.elements.user = sb == null ? "" : sb.ToString (); state.remaining = state.remaining.Substring (index + 1); } @@ -163,23 +373,59 @@ private static bool ParseUser (ref ParserState state) private static bool ParseHost (ref ParserState state) { string part = state.remaining; + + if (state.elements.scheme == Uri.UriSchemeFile && part.Length >= 2 && + (part [0] == '\\' || part [0] == '/') && part [1] == part [0]) { + part = part.TrimStart (part [0]); + state.remaining = part; + } + + if (!ParseWindowsFilePath (ref state)) + return false; + StringBuilder sb = new StringBuilder (); + var tmpHost = ""; + + var possibleIpv6 = false; + int index; for (index = 0; index < part.Length; index++) { char ch = part [index]; - if (ch == '/' || ch == ':' || ch == '#' || ch == '?') + if (ch == '/' || ch == '#' || ch == '?') break; + + // Possible IPv6 + if (string.IsNullOrEmpty (tmpHost) && ch == ':') { + tmpHost = sb.ToString (); + possibleIpv6 = true; + } sb.Append (ch); + + if (possibleIpv6 && ch == ']') + break; } - if (index <= part.Length) - state.remaining = part.Substring (index); - - state.elements.host = sb.ToString(); + if (possibleIpv6) { + IPv6Address ipv6addr; + if (IPv6Address.TryParse (sb.ToString (), out ipv6addr)) { + var ipStr = ipv6addr.ToString (!Uri.IriParsing).Split ('%') [0]; + state.elements.host = "[" + ipStr + "]"; + state.elements.scopeId = ipv6addr.ScopeId; + + state.remaining = part.Substring (sb.Length); + return state.remaining.Length > 0; + } + state.elements.host = tmpHost; + } else + state.elements.host = sb.ToString (); + + state.elements.host = state.elements.host.ToLowerInvariant (); + + state.remaining = part.Substring (state.elements.host.Length); return state.remaining.Length > 0; } @@ -197,16 +443,31 @@ private static bool ParsePort (ref ParserState state) for (index = 1; index < part.Length; index++ ) { char ch = part [index]; - if (!char.IsDigit (ch)) - break; + if (!char.IsDigit (ch)) { + if (ch == '/' || ch == '#' || ch == '?') + break; + + state.error = "Invalid URI: Invalid port specified."; + return false; + } sb.Append (ch); } - + if (index <= part.Length) state.remaining = part.Substring (index); + + if (sb.Length == 0) + return state.remaining.Length > 0; - state.elements.port = sb.ToString(); + int port; + if (!Int32.TryParse (sb.ToString (), NumberStyles.None, CultureInfo.InvariantCulture, out port) || + port < 0 || port > UInt16.MaxValue) { + state.error = "Invalid URI: Invalid port number"; + return false; + } + + state.elements.port = port; return state.remaining.Length > 0; } @@ -221,7 +482,9 @@ private static bool ParsePath (ref ParserState state) char ch = part [index]; - if (ch == '#' || ch == '?') + var supportsQuery = UriHelper.SupportsQuery (state.elements.scheme); + + if (ch == '#' || (supportsQuery && ch == '?')) break; sb.Append (ch); @@ -238,6 +501,9 @@ private static bool ParsePath (ref ParserState state) private static bool ParseQuery (ref ParserState state) { string part = state.remaining; + + if (!UriHelper.SupportsQuery (state.elements.scheme)) + return part.Length > 0; if (part.Length == 0 || part [0] != '?') return part.Length > 0; diff --git a/mcs/class/System/System/UriParser.cs b/mcs/class/System/System/UriParser.cs index d5786bb04a6..07bfe502259 100644 --- a/mcs/class/System/System/UriParser.cs +++ b/mcs/class/System/System/UriParser.cs @@ -50,7 +50,12 @@ protected internal virtual string GetComponents (Uri uri, UriComponents componen if ((format < UriFormat.UriEscaped) || (format > UriFormat.SafeUnescaped)) throw new ArgumentOutOfRangeException ("format"); - UriElements elements = UriParseComponents.ParseComponents (uri.OriginalString.Trim ()); + return GetComponentsHelper (uri, components, format); + } + + internal string GetComponentsHelper (Uri uri, UriComponents components, UriFormat format) + { + UriElements elements = UriParseComponents.ParseComponents (uri.OriginalString.Trim (), UriKind.Absolute, this); string scheme = scheme_name; int dp = default_port; @@ -62,29 +67,44 @@ protected internal virtual string GetComponents (Uri uri, UriComponents componen throw new SystemException ("URI Parser: scheme mismatch: " + scheme + " vs. " + elements.scheme); } + var formatFlags = UriHelper.FormatFlags.None; + if (UriHelper.HasCharactersToNormalize (uri.OriginalString)) + formatFlags |= UriHelper.FormatFlags.HasUriCharactersToNormalize; + + if (uri.UserEscaped) + formatFlags |= UriHelper.FormatFlags.UserEscaped; + + if (!string.IsNullOrEmpty(elements.host)) + formatFlags |= UriHelper.FormatFlags.HasHost; + // it's easier to answer some case directly (as the output isn't identical // when mixed with others components, e.g. leading slash, # ...) switch (components) { case UriComponents.Scheme: return scheme; case UriComponents.UserInfo: - return elements.user; + return elements.user ?? ""; case UriComponents.Host: return elements.host; case UriComponents.Port: { - string p = elements.port; - if (p != null && p.Length != 0 && p != dp.ToString ()) - return p; + int p = elements.port; + if (p != null && p >= 0 && p != dp) + return p.ToString (CultureInfo.InvariantCulture); return String.Empty; } case UriComponents.Path: - return Format (IgnoreFirstCharIf (elements.path, '/'), format); + var path = elements.path; + if (scheme != Uri.UriSchemeMailto && scheme != Uri.UriSchemeNews) + path = IgnoreFirstCharIf (elements.path, '/'); + return UriHelper.FormatAbsolute (path, scheme, UriComponents.Path, format, formatFlags); case UriComponents.Query: - return Format (elements.query, format); + return UriHelper.FormatAbsolute (elements.query, scheme, UriComponents.Query, format, formatFlags); case UriComponents.Fragment: - return Format (elements.fragment, format); + return UriHelper.FormatAbsolute (elements.fragment, scheme, UriComponents.Fragment, format, formatFlags); case UriComponents.StrongPort: { - return elements.port.Length != 0 ? elements.port : dp.ToString (); + return elements.port >= 0 + ? elements.port.ToString (CultureInfo.InvariantCulture) + : dp.ToString (CultureInfo.InvariantCulture); } case UriComponents.SerializationInfoString: components = UriComponents.AbsoluteUri; @@ -97,12 +117,12 @@ protected internal virtual string GetComponents (Uri uri, UriComponents componen if ((components & UriComponents.Scheme) != 0) { sb.Append (scheme); - sb.Append (Uri.GetSchemeDelimiter (scheme)); + sb.Append (elements.delimiter); } if ((components & UriComponents.UserInfo) != 0) { string userinfo = elements.user; - if (!String.IsNullOrEmpty (userinfo)) { + if (userinfo != null) { sb.Append (elements.user); sb.Append ('@'); } @@ -115,7 +135,7 @@ protected internal virtual string GetComponents (Uri uri, UriComponents componen // otherwise only display if ut's not the default port if ((components & UriComponents.StrongPort) != 0) { sb.Append (":"); - if (elements.port.Length != 0) { + if (elements.port >= 0) { sb.Append (elements.port); } else { sb.Append (dp); @@ -123,36 +143,38 @@ protected internal virtual string GetComponents (Uri uri, UriComponents componen } if ((components & UriComponents.Port) != 0) { - string p = elements.port; - if (p != null && p.Length != 0 && p != dp.ToString ()) { + int p = elements.port; + if (p != null && p >= 0 && p != dp) { sb.Append (":"); sb.Append (elements.port); } } if ((components & UriComponents.Path) != 0) { + string path = elements.path; if ((components & UriComponents.PathAndQuery) != 0 && - (elements.path.Length == 0 || !elements.path.StartsWith ("/"))) + (path.Length == 0 || !path.StartsWith ("/")) && + elements.delimiter == Uri.SchemeDelimiter) sb.Append ("/"); - sb.Append (elements.path); + sb.Append (UriHelper.FormatAbsolute (path, scheme, UriComponents.Path, format, formatFlags)); } if ((components & UriComponents.Query) != 0) { string query = elements.query; - if (!String.IsNullOrEmpty (query)) { + if (query != null) { sb.Append ("?"); - sb.Append (elements.query); + sb.Append (UriHelper.FormatAbsolute (query, scheme, UriComponents.Query, format, formatFlags)); } } - string result = Format (sb.ToString (), format); if ((components & UriComponents.Fragment) != 0) { string f = elements.fragment; - if (!String.IsNullOrEmpty (f)) { - result += "#" + Format (f, format); + if (f != null) { + sb.Append ("#"); + sb.Append (UriHelper.FormatAbsolute (f, scheme, UriComponents.Fragment, format, formatFlags)); } } - return result; + return sb.ToString (); } protected internal virtual void InitializeAndValidate (Uri uri, out UriFormatException parsingError) @@ -226,23 +248,6 @@ private string IgnoreFirstCharIf (string s, char c) return s; } - private string Format (string s, UriFormat format) - { - if (s.Length == 0) - return String.Empty; - - switch (format) { - case UriFormat.UriEscaped: - return Uri.EscapeString (s, Uri.EscapeCommonHexBrackets); - case UriFormat.SafeUnescaped: - return Uri.UnescapeDataString (s, true); - case UriFormat.Unescaped: - return Uri.Unescape (s, false); - default: - throw new ArgumentOutOfRangeException ("format"); - } - } - // static methods private static void CreateDefaults () diff --git a/mcs/class/System/System_test.dll.sources b/mcs/class/System/System_test.dll.sources index 33f8326b2d6..e47a4c98214 100644 --- a/mcs/class/System/System_test.dll.sources +++ b/mcs/class/System/System_test.dll.sources @@ -25,11 +25,13 @@ System/LdapStyleUriParserTest.cs System/NetPipeStyleUriParserTest.cs System/NetTcpStyleUriParserTest.cs System/NewsStyleUriParserTest.cs +System/StringTester.cs System/UriBuilderTest.cs System/UriParserTest.cs System/UriTest.cs System/UriTest2.cs System/UriTest3.cs +System/UriPermutationsTest.cs System/UriTypeConverterTest.cs System.CodeDom/CodeArgumentReferenceExpressionTest.cs System.CodeDom/CodeArrayCreateExpressionTest.cs @@ -246,6 +248,7 @@ System.Net.Sockets/TcpClientTest.cs System.Net.Sockets/TcpListenerTest.cs System.Net.Sockets/SocketTest.cs System.Net.Sockets/SocketAsyncEventArgsTest.cs +System.Net.Sockets/SocketConnectAsyncTest.cs System.Net.Sockets/UdpClientTest.cs System.Net.Sockets/SocketAsyncTest.cs System.Net.Mail/LinkedResourceTest.cs diff --git a/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs b/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs index 92a6253db91..43faa5cc107 100644 --- a/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs @@ -639,6 +639,62 @@ public void Bug16902 () Assert.AreEqual (1, count, "1"); } + + private class Person : INotifyPropertyChanged + { + private string _lastName; + private string _firstName; + + public string FirstName { + get { return _firstName; } + set { + _firstName = value; + OnPropertyChanged ("FirstName"); // string matches property name + } + } + + public string LastName { + get { return _lastName; } + set { + _lastName = value; + OnPropertyChanged ("Apepe"); // string doesn't match property name + } + } + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void OnPropertyChanged (string propertyName = null) + { + PropertyChangedEventHandler handler = PropertyChanged; + if (handler != null) + handler (this, new PropertyChangedEventArgs (propertyName)); + } + } + + [Test] // https://bugzilla.xamarin.com/show_bug.cgi?id=20672 + public void Bug20672 () + { + string changedPropertyName = string.Empty; + bool isEventRaised = false; + bool? hasPropertyDescriptor = false; + + var persons = new BindingList(); + persons.Add (new Person() { FirstName = "Stefaan", LastName = "de Vogelaere" }); + persons.Add (new Person() { FirstName = "Christophe", LastName = "De Langhe" }); + persons.ListChanged += (object sender, ListChangedEventArgs e) => { + isEventRaised = true; + hasPropertyDescriptor = e.PropertyDescriptor != null; + }; + + //if the OnPropertyChanged string matches a valid property name, PropertyDescriptor should be generated + persons[0].FirstName = "Stefan"; + Assert.IsTrue (isEventRaised); + Assert.IsTrue ((bool) hasPropertyDescriptor, "#1"); + + //if the OnPropertyChanged string doesn't match a valid property name, no PropertyDescriptor should be generated + persons[0].LastName = "de le Vulu"; + Assert.IsFalse ((bool) hasPropertyDescriptor, "#2"); + } } } diff --git a/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs b/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs index 61eda5b8030..84cc1c419ae 100644 --- a/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs +++ b/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs @@ -297,6 +297,35 @@ public void JunkAtTheEnd () } } } + + class Bug19313Stream : MemoryStream + { + public Bug19313Stream (byte [] buffer) + : base (buffer) + { + } + + public override int Read (byte [] buffer, int offset, int count) + { + // Thread was blocking when DeflateStream uses a NetworkStream. + // Because the NetworkStream.Read calls Socket.Receive that + // blocks the thread waiting for at least a byte to return. + // This assert guarantees that Read is called only when there + // is something to be read. + Assert.IsTrue (Position < Length, "Trying to read empty stream."); + + return base.Read (buffer, offset, count); + } + } + + [Test] + public void Bug19313 () + { + byte [] buffer = new byte [512]; + using (var backing = new Bug19313Stream (compressed_data)) + using (var decompressing = new DeflateStream (backing, CompressionMode.Decompress)) + decompressing.Read (buffer, 0, buffer.Length); + } } } diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs b/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs new file mode 100644 index 00000000000..99c48048013 --- /dev/null +++ b/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections; +using System.Threading; +using System.Net; +using System.Net.Sockets; +using NUnit.Framework; + +namespace MonoTests.System.Net.Sockets +{ + [TestFixture] + public class SocketConnectAsyncTest + { + Socket serverSocket; + Socket clientSocket; + SocketAsyncEventArgs clientSocketAsyncArgs; + ManualResetEvent readyEvent; + ManualResetEvent mainEvent; + Exception error; + + [TestFixtureSetUp] + public void SetUp () + { + readyEvent = new ManualResetEvent (false); + mainEvent = new ManualResetEvent (false); + } + + [TestFixtureTearDown] + public void TearDown () + { + readyEvent.Close (); + mainEvent.Close (); + } + + void StartServer() + { + readyEvent.Reset(); + mainEvent.Reset(); + ThreadPool.QueueUserWorkItem (_ => DoWork ()); + readyEvent.WaitOne (); + } + + void StopServer() + { + if (serverSocket != null) + serverSocket.Close (); + } + + void DoWork () + { + serverSocket = new Socket ( + AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + serverSocket.Bind (new IPEndPoint (IPAddress.Loopback, 0)); + serverSocket.Listen (1); + + var async = new SocketAsyncEventArgs (); + async.Completed += (s,e) => OnAccepted (e); + + readyEvent.Set (); + + if (!serverSocket.AcceptAsync (async)) + OnAccepted (async); + } + + void OnAccepted (SocketAsyncEventArgs e) + { + var acceptSocket = e.AcceptSocket; + mainEvent.Set (); + } + + [Test] + [Category("Test")] + public void Connect () + { + StartServer(); + + EndPoint serverEndpoint = serverSocket.LocalEndPoint; + + var m = new ManualResetEvent (false); + var e = new SocketAsyncEventArgs (); + + clientSocket = new Socket ( + AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + clientSocketAsyncArgs = new SocketAsyncEventArgs(); + clientSocketAsyncArgs.RemoteEndPoint = serverEndpoint; + clientSocketAsyncArgs.Completed += (s,o) => { + if (o.SocketError != SocketError.Success) + error = new SocketException ((int)o.SocketError); + m.Set (); + }; + bool res = clientSocket.ConnectAsync(clientSocketAsyncArgs); + if (res) { + if (!m.WaitOne (1500)) + throw new TimeoutException (); + } + + if (!mainEvent.WaitOne (1500)) + throw new TimeoutException (); + if (error != null) + throw error; + + m.Reset (); + mainEvent.Reset (); + + StopServer(); + + // Try again to non-listening endpoint, expect error + + error = null; + clientSocket = new Socket ( + AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + clientSocketAsyncArgs = new SocketAsyncEventArgs (); + clientSocketAsyncArgs.RemoteEndPoint = serverEndpoint; + clientSocketAsyncArgs.Completed += (s,o) => { + if (o.SocketError != SocketError.Success) + error = new SocketException ((int)o.SocketError); + m.Set (); + }; + res = clientSocket.ConnectAsync (clientSocketAsyncArgs); + if (res) { + if (!m.WaitOne (1500)) + throw new TimeoutException (); + } + + Assert.IsTrue (error != null, "Connect - no error"); + SocketException socketException = (SocketException)error; + Assert.IsTrue(socketException.ErrorCode == (int)SocketError.ConnectionRefused); + + m.Reset (); + mainEvent.Reset (); + } + + } +} \ No newline at end of file diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs index 0ae72b4c29a..b6ddbf164a5 100755 --- a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs @@ -1648,7 +1648,15 @@ private static void BCCallback (IAsyncResult asyncResult) { Socket sock = (Socket)asyncResult.AsyncState; - sock.EndConnect (asyncResult); + try { + sock.EndConnect (asyncResult); + } catch (Exception e) { + Console.WriteLine ("BCCallback exception:"); + Console.WriteLine (e); + + throw; + } + BCConnected = true; BCCalledBack.Set (); @@ -1783,9 +1791,22 @@ public void BeginConnectMultiple () /* Longer wait here, because the ms runtime * takes a lot longer to not connect */ - if (BCCalledBack.WaitOne (10000, false) == false) { + /* + if (BCCalledBack.WaitOne (30000, false) == false) { Assert.Fail ("BeginConnectMultiple wait failed"); } + */ + + var sw = new global::System.Diagnostics.Stopwatch (); + sw.Start (); + + BCCalledBack.WaitOne (); + + sw.Stop (); + Console.WriteLine (sw.ElapsedMilliseconds); + + if (sw.ElapsedMilliseconds > 30000) + Assert.Fail ("BeginConnectMultiple wait failed"); Assert.AreEqual (true, BCConnected, "BeginConnectMultiple #1"); Assert.AreEqual (AddressFamily.InterNetwork, sock.RemoteEndPoint.AddressFamily, "BeginConnectMultiple #2"); diff --git a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs index c9193919223..488518c38bd 100644 --- a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs @@ -74,6 +74,13 @@ public void Constructor2 () //Assert.AreEqual (32, client.Ttl, "#A:Ttl"); #endif +#if NET_2_0 + if (!Socket.OSSupportsIPv6) +#else + if (!Socket.SupportsIPv6) +#endif + Assert.Ignore ("IPv6 not enabled."); + client = new MyUdpClient (AddressFamily.InterNetworkV6); s = client.Client; Assert.IsNotNull (s, "#B:Client"); @@ -297,6 +304,13 @@ public void Constructor5 () Assert.AreEqual (AddressFamily.InterNetwork, localEP.AddressFamily, "#A:Client:LocalEndPoint/AddressFamily"); } +#if NET_2_0 + if (!Socket.OSSupportsIPv6) +#else + if (!Socket.SupportsIPv6) +#endif + Assert.Ignore ("IPv6 not enabled."); + using (MyUdpClient client = new MyUdpClient (IPEndPoint.MaxPort, AddressFamily.InterNetworkV6)) { s = client.Client; @@ -656,6 +670,13 @@ public void JoinMulticastGroup2_MulticastAddr_Null () [Test] // JoinMulticastGroup (Int32, IPAddress) public void JoinMulticastGroup2_Socket_Closed () { +#if NET_2_0 + if (!Socket.OSSupportsIPv6) +#else + if (!Socket.SupportsIPv6) +#endif + Assert.Ignore ("IPv6 not enabled."); + IPAddress mcast_addr = null; UdpClient client = new UdpClient (new IPEndPoint (IPAddress.IPv6Any, 1234)); diff --git a/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs b/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs index e193a5f5307..7c89da6ef71 100644 --- a/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs +++ b/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs @@ -210,6 +210,41 @@ public void SendAsyncWrongState_CloseSent () } Assert.Fail ("Should have thrown"); } + + [Test] + public async Task SendAsyncEndOfMessageTest() { + var cancellationToken = new CancellationTokenSource(TimeSpan.FromSeconds(30)).Token; + await SendAsyncEndOfMessageTest(false, WebSocketMessageType.Text, cancellationToken); + await SendAsyncEndOfMessageTest(true, WebSocketMessageType.Text, cancellationToken); + await SendAsyncEndOfMessageTest(false, WebSocketMessageType.Binary, cancellationToken); + await SendAsyncEndOfMessageTest(true, WebSocketMessageType.Binary, cancellationToken); + } + + public async Task SendAsyncEndOfMessageTest(bool expectedEndOfMessage, WebSocketMessageType webSocketMessageType, CancellationToken cancellationToken){ + using (var client = new ClientWebSocket()) { + // Configure the listener. + var serverReceive = HandleHttpWebSocketRequestAsync(async socket => await socket.ReceiveAsync(new ArraySegment(new byte[32]), cancellationToken), cancellationToken); + + // Connect to the listener and make the request. + await client.ConnectAsync (new Uri ("ws://localhost:" + Port + "/"), cancellationToken); + await client.SendAsync(new ArraySegment(Encoding.UTF8.GetBytes("test")), webSocketMessageType, expectedEndOfMessage, cancellationToken); + + // Wait for the listener to handle the request and return its result. + var result = await serverReceive; + + // Cleanup and check results. + await client.CloseAsync(WebSocketCloseStatus.NormalClosure, "Finished", cancellationToken); + Assert.AreEqual(expectedEndOfMessage, result.EndOfMessage, "EndOfMessage should be " + expectedEndOfMessage); + } + } + + async Task HandleHttpWebSocketRequestAsync(Func> action, CancellationToken cancellationToken) { + var ctx = await this.listener.GetContextAsync(); + var wsContext = await ctx.AcceptWebSocketAsync(null); + var result = await action(wsContext.WebSocket); + await wsContext.WebSocket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "Finished", cancellationToken); + return result; + } async Task HandleHttpRequestAsync (Action handler) { diff --git a/mcs/class/System/Test/System.Net/HttpListener2Test.cs b/mcs/class/System/Test/System.Net/HttpListener2Test.cs index abff4e15a9a..f499921e47e 100644 --- a/mcs/class/System/Test/System.Net/HttpListener2Test.cs +++ b/mcs/class/System/Test/System.Net/HttpListener2Test.cs @@ -144,7 +144,7 @@ public void Test1 () Send (ns, "GET / HTTP/1.1\r\n\r\n"); // No host string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 400")); + StringAssert.StartsWith ("HTTP/1.1 400", response); } [Test] @@ -155,7 +155,7 @@ public void Test2 () Send (ns, "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n"); // no prefix string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 400")); + StringAssert.StartsWith ("HTTP/1.1 400", response); } [Test] @@ -192,7 +192,7 @@ public void Test3 () string response = Receive (ns, 512); ns.Close (); listener.Close (); - Assert.AreEqual (true, response.StartsWith ("HTTP/1.1 400"), String.Format ("Failed on {0}", (int) b)); + StringAssert.StartsWith ("HTTP/1.1 400", response, String.Format ("Failed on {0}", (int) b)); } } @@ -204,7 +204,7 @@ public void Test4 () Send (ns, "POST /test4/ HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n"); // length required string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 411")); + StringAssert.StartsWith ("HTTP/1.1 411", response); } [Test] @@ -215,7 +215,7 @@ public void Test5 () Send (ns, "POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nTransfer-Encoding: pepe\r\n\r\n"); // not implemented string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 501")); + StringAssert.StartsWith ("HTTP/1.1 501", response); } [Test] @@ -227,7 +227,7 @@ public void Test6 () Send (ns, "POST /test6/ HTTP/1.1\r\nHost: 127.0.0.1\r\nTransfer-Encoding: identity\r\n\r\n"); string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 501")); + StringAssert.StartsWith ("HTTP/1.1 501", response); } [Test] @@ -241,8 +241,8 @@ public void Test7 () ctx.Response.Close (); string response = Receive (ns, 1024); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 200")); - Assert.IsTrue (-1 != response.IndexOf ("Transfer-Encoding: chunked")); + StringAssert.StartsWith ("HTTP/1.1 200", response); + StringAssert.Contains ("Transfer-Encoding: chunked", response); } [Test] @@ -257,7 +257,7 @@ public void Test8 () ctx.Response.Close (); string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 200")); + StringAssert.StartsWith ("HTTP/1.1 200", response); Assert.IsTrue (-1 == response.IndexOf ("Transfer-Encoding: chunked")); } @@ -272,7 +272,7 @@ public void Test9 () string response = ReceiveWithTimeout (ns, 512, 1000, out timeout); ns.Close (); Assert.IsFalse (timeout); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 411")); + StringAssert.StartsWith ("HTTP/1.1 411", response); } [Test] @@ -287,7 +287,7 @@ public void Test10 () string response = ReceiveWithTimeout (ns, 512, 1000, out timeout); ns.Close (); Assert.IsFalse (timeout); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 411")); + StringAssert.StartsWith ("HTTP/1.1 411", response); } [Test] @@ -300,7 +300,7 @@ public void Test11 () ns.GetSocket ().Shutdown (SocketShutdown.Send); string input = Receive (ns, 512); ns.Close (); - Assert.IsTrue (input.StartsWith ("HTTP/1.1 400")); + StringAssert.StartsWith ("HTTP/1.1 400", input); } [Test] @@ -313,7 +313,7 @@ public void Test12 () ns.GetSocket ().Shutdown (SocketShutdown.Send); string input = Receive (ns, 512); ns.Close (); - Assert.IsTrue (input.StartsWith ("HTTP/1.1 400")); + StringAssert.StartsWith ("HTTP/1.1 400", input); } [Test] @@ -326,7 +326,7 @@ public void Test13 () ns.GetSocket ().Shutdown (SocketShutdown.Send); string input = Receive (ns, 512); ns.Close (); - Assert.IsTrue (input.StartsWith ("HTTP/1.1 400")); + StringAssert.StartsWith ("HTTP/1.1 400", input); } HttpListenerRequest test14_request; @@ -418,8 +418,8 @@ public void Test17 () ctx.Response.Close (); string response = Receive (ns, 1024); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 200")); - Assert.IsTrue (-1 != response.IndexOf ("Transfer-Encoding: chunked")); + StringAssert.StartsWith ("HTTP/1.1 200", response); + StringAssert.Contains ("Transfer-Encoding: chunked", response); } [Test] @@ -723,11 +723,11 @@ public void Test_HostInUri () public void ClosePort () { var h = new HttpListener (); - h.Prefixes.Add ("http://127.0.0.1:8080/"); + h.Prefixes.Add ("http://127.0.0.1:30158/"); h.Start (); h.BeginGetContext (null, null); h.Stop (); - TcpListener t = new TcpListener (IPAddress.Parse ("127.0.0.1"), 8080); + TcpListener t = new TcpListener (IPAddress.Parse ("127.0.0.1"), 30158); t.Start (); t.Stop (); } diff --git a/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs b/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs index f0826d1c990..ccf2484dfdd 100644 --- a/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs +++ b/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs @@ -1472,7 +1472,7 @@ internal void LaunchWebRequest () } } - void TestTimeOut (string url) + void TestTimeOut (string url, WebExceptionStatus expectedExceptionStatus) { var timeoutWorker = new TimeoutTestHelper (url, three_seconds_in_milliseconds); var threadStart = new ThreadStart (timeoutWorker.LaunchWebRequest); @@ -1492,15 +1492,14 @@ void TestTimeOut (string url) Assert.Fail ("Should not be reached, timeout exception was not thrown and webrequest managed to retrieve an incorrect body: " + timeoutWorker.Body); } - Assert.IsNotNull (timeoutWorker.Exception, - "Timeout exception was not thrown"); + Assert.IsNotNull (timeoutWorker.Exception, "Exception was not thrown"); var webEx = timeoutWorker.Exception as WebException; Assert.IsNotNull (webEx, "Exception thrown should be WebException, but was: " + timeoutWorker.Exception.GetType ().FullName); - Assert.AreEqual (webEx.Status, WebExceptionStatus.Timeout, - "WebException was thrown, but with a wrong status (should be timeout): " + webEx.Status); + Assert.AreEqual (expectedExceptionStatus, webEx.Status, + "WebException was thrown, but with a wrong status (should be " + expectedExceptionStatus + "): " + webEx.Status); Assert.IsFalse (timeoutWorker.End > (timeoutWorker.Start + TimeSpan.FromMilliseconds (three_seconds_in_milliseconds + 500)), "Timeout exception should have been thrown shortly after timeout is reached, however it was at least half-second late"); @@ -1516,18 +1515,19 @@ public void TestTimeoutPropertyWithServerThatExistsAndRespondsButTooLate () { responder.Start (); - TestTimeOut (url); + TestTimeOut (url, WebExceptionStatus.Timeout); responder.Stop (); } } [Test] // 2nd possible case of https://bugzilla.novell.com/show_bug.cgi?id=MONO74177 - public void TestTimeoutPropertyWithServerThatDoesntExist () + public void TestTimeoutWithEndpointThatDoesntExistThrowsConnectFailureBeforeTimeout () { - string url = "http://10.128.200.100:8271/"; // some endpoint that is unlikely to exist + string url = "http://127.0.0.1:8271/"; // some endpoint that is unlikely to exist - TestTimeOut (url); + // connecting to a non-existing endpoint should throw a ConnectFailure before the timeout is reached + TestTimeOut (url, WebExceptionStatus.ConnectFailure); } const string response_of_timeout_handler = "RESPONSE_OF_TIMEOUT_HANDLER"; @@ -2319,7 +2319,7 @@ public void BeginGetResponseAborts () void DoRequest (Action request) { - int port = rand.Next (20000, 65535); + int port = 30158; ManualResetEvent completed = new ManualResetEvent (false); Uri address = new Uri (string.Format ("http://localhost:{0}", port)); @@ -2333,7 +2333,7 @@ void DoRequest (Action request) void DoRequest (Action request, Action processor) { - int port = rand.Next (20000, 65535); + int port = 30158; ManualResetEvent [] completed = new ManualResetEvent [2]; completed [0] = new ManualResetEvent (false); diff --git a/mcs/class/System/Test/System.Net/WebClientTest.cs b/mcs/class/System/Test/System.Net/WebClientTest.cs index 3505926f410..48722d45510 100644 --- a/mcs/class/System/Test/System.Net/WebClientTest.cs +++ b/mcs/class/System/Test/System.Net/WebClientTest.cs @@ -2156,5 +2156,97 @@ public void DefaultProxy () // and return the same instance as WebRequest.DefaultWebProxy Assert.AreSame (wc.Proxy, WebRequest.DefaultWebProxy); } + +#if NET_4_5 + [Test] + public void UploadStringAsyncCancelEvent () + { + UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) => + { + + webClient.UploadStringCompleted += (sender, args) => + { + if (args.Cancelled) + cancelEvent.Set (); + }; + + webClient.UploadStringAsync (uri, "PUT", "text"); + }); + } + + [Test] + public void UploadDataAsyncCancelEvent () + { + UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) => + { + webClient.UploadDataCompleted += (sender, args) => + { + if (args.Cancelled) + cancelEvent.Set (); + }; + + webClient.UploadDataAsync (uri, "PUT", new byte[] { }); + }); + } + + [Test] + public void UploadValuesAsyncCancelEvent () + { + UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) => + { + webClient.UploadValuesCompleted += (sender, args) => + { + if (args.Cancelled) + cancelEvent.Set (); + }; + + webClient.UploadValuesAsync (uri, "PUT", new NameValueCollection ()); + }); + } + + [Test] + public void UploadFileAsyncCancelEvent () + { + UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) => + { + string tempFile = Path.Combine (_tempFolder, "upload.tmp"); + File.Create (tempFile).Close (); + + webClient.UploadFileCompleted += (sender, args) => + { + if (args.Cancelled) + cancelEvent.Set (); + }; + + webClient.UploadFileAsync (uri, "PUT", tempFile); + }); + } +#endif + +#if NET_4_0 + public void UploadAsyncCancelEventTest (Action uploadAction) + { + var ep = new IPEndPoint (IPAddress.Loopback, 8000); + string url = "http://" + IPAddress.Loopback + ":8000/test/"; + + using (var responder = new SocketResponder (ep, EchoRequestHandler)) + { + responder.Start (); + + var webClient = new WebClient (); + + var cancellationTokenSource = new CancellationTokenSource (); + cancellationTokenSource.Token.Register (webClient.CancelAsync); + + var cancelEvent = new ManualResetEvent (false); + + uploadAction.Invoke (webClient, new Uri (url), cancelEvent); + + cancellationTokenSource.Cancel (); + + Assert.IsTrue (cancelEvent.WaitOne (1000)); + } + } +#endif } } diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs index 19a7c19f821..9fceaca05ca 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs @@ -286,6 +286,23 @@ public class X509Certificate2Test { 0x89, 0x53, 0xBD, 0x10, 0xAA, 0x1E, 0xC6, 0x41, 0x7C, 0x71, 0xCA, 0x47, 0x79, 0x60, 0x95, 0x2E, 0xAB, 0xF6, 0x17, 0xBE, 0x1D, 0xF1, 0x05, 0xAD, 0x76, 0xD8, 0xBB, 0xF2, 0xBB, 0x36, 0xEE, 0xCD, 0xAA, 0xBC, 0xBA, 0xBE, 0x94, 0x42, 0x9A, 0xA8, 0xEE, 0xE5, 0x93, 0x5C, 0x3C, 0x23, 0xE2, 0x75, 0xD3, 0x59, 0xB4, 0xB3, 0xC4, 0x01, 0xBB, 0xC9, 0x05, 0xFE, 0xFA, 0x1B, 0x31, 0x7A, 0x15, 0x29, 0x91, 0xE6, 0xB9, 0xB2, 0x1E, 0xF9, 0x36, 0xC5, 0x17, 0xB9, 0x9D, 0x32, 0x0D, 0x0D, 0x80, 0x4A, 0x0D, 0x14, 0xB4, 0xDF, 0x89, 0x3A, 0x4B, 0xCA, 0x4B, 0xDE, 0xF8, 0xC0, 0x1B, 0xA6, 0x6D, 0xD9, 0x19, 0xFB, 0x0E, 0x02, 0x22, 0x82, 0x8E, 0x25, 0x8E, 0x9F, 0xD5, 0x7B, 0xB6, 0x14, 0x15, 0x08, 0x61, 0xCD, 0xA6, 0xB3, 0x0F, 0xC8, 0xE8, 0xF9, 0xEE, 0xDB, 0xAF, 0x25, 0x40, 0x01, 0x85, 0x0E, 0x89, 0x0D, 0x0D, 0x85, 0xA6, 0xA3, 0xC9, 0x65, 0x64, 0x8A, 0xD1, 0xF7, 0x55, 0xF9, 0x31, 0x24, 0x41, 0x30, 0x3B, 0x30, 0x1F, 0x30, 0x07, 0x06, 0x05, 0x2B, 0x0E, 0x03, 0x02, 0x1A, 0x04, 0x14, 0xD4, 0x77, 0x3F, 0x92, 0xB6, 0xA6, 0x1B, 0xD5, 0x7F, 0xC1, 0x1B, 0x93, 0xB3, 0x6E, 0x87, 0x67, 0x80, 0xE7, 0x4C, 0x7C, 0x04, 0x14, 0x58, 0x4C, 0x92, 0xDD, 0x0B, 0xEF, 0x09, 0x35, 0xE0, 0x06, 0x33, 0x54, 0xB2, 0xA8, 0x8E, 0x0C, 0x60, 0x67, 0xB5, 0x0F, 0x02, 0x02, 0x07, 0xD0 }; + + public static byte[] openssl_emptypwd_pfx = { 0x30, 0x82, 0x06, 0x19, 0x02, 0x01, 0x03, 0x30, 0x82, 0x05, 0xDF, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x01, 0xA0, 0x82, 0x05, 0xD0, 0x04, 0x82, 0x05, 0xCC, 0x30, 0x82, 0x05, 0xC8, 0x30, 0x82, 0x02, 0xC7, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x06, 0xA0, 0x82, 0x02, 0xB8, 0x30, 0x82, 0x02, 0xB4, 0x02, 0x01, 0x00, 0x30, 0x82, 0x02, 0xAD, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x01, 0x30, 0x1C, 0x06, 0x0A, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x0C, 0x01, 0x06, 0x30, 0x0E, 0x04, 0x08, 0xE4, 0x0A, 0x2F, 0x48, 0xE6, 0x07, 0x62, + 0x5D, 0x02, 0x02, 0x08, 0x00, 0x80, 0x82, 0x02, 0x80, 0x35, 0x6F, 0x44, 0xFA, 0xA8, 0x0D, 0x41, 0xBA, 0x1A, 0xAE, 0xB1, 0xFB, 0xA4, 0xBB, 0x91, 0x28, 0x75, 0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xF9, 0x0D, 0xC1, 0x5B, 0x06, 0x4D, 0x43, 0x1D, 0x13, 0x6C, 0xDB, 0x3D, 0xD2, 0x1C, 0x94, 0xA3, 0xBB, 0x62, 0xEB, 0x4F, 0x78, 0xC9, 0x43, 0x5E, 0x5F, 0x84, 0xCB, 0xE8, 0x31, 0x5F, 0xE9, 0xB7, 0xA9, 0xEA, 0x4A, 0xF2, 0xAB, 0x1E, 0x37, 0x7C, 0xAF, 0xE4, 0xF0, 0x4E, 0x3F, 0x6A, 0xA9, 0x04, 0xAB, 0x20, 0x44, 0xFD, 0x81, 0x47, 0x9F, 0x86, 0xF3, 0x59, 0xA5, 0x2A, 0x3D, 0x60, 0xB1, 0xF7, 0x31, 0x25, 0x30, 0x23, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x15, 0x31, 0x16, 0x04, 0x14, 0x30, 0x29, 0x69, 0x4B, 0x22, 0xB2, + 0xEE, 0x6A, 0xEC, 0x9B, 0x78, 0x44, 0x9E, 0x51, 0x0F, 0x7C, 0x34, 0x8D, 0xBA, 0x33, 0x30, 0x31, 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x0E, 0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14, 0xC7, 0xDD, 0xD6, 0xA5, 0xC4, 0x14, 0xB6, 0x24, 0xF9, 0x03, 0xB9, 0xB6, 0xA3, 0x5A, 0x4A, 0x09, 0x51, 0x18, 0x5A, 0x19, 0x04, 0x08, 0x35, 0xB5, 0x1D, 0xC3, 0x17, 0x45, 0x8B, 0x92, 0x02, 0x02, 0x08, 0x00 }; public const string base64_cert = @"-----BEGIN CERTIFICATE----- MIIBxTCCATKgAwIBAgIQx3WuSFObHp5EgBXKeBVHaTAJBgUrDgMCHQUAMCUxIzAh @@ -1252,6 +1269,12 @@ public void Pkcs12_5_Properties () CheckPkcs12 (new X509Certificate2 (farscape_strong_path_pfx, "farscape")); } + [Test] + public void Pkcs12_6_Properties () + { + CheckPkcs12 (new X509Certificate2 (openssl_emptypwd_pfx)); + } + private void CheckBase64 (X509Certificate2 x) { // note: the raw data is still the DER encoded ASN.1 (not the base64 string) diff --git a/mcs/class/System/Test/System/StringTester.cs b/mcs/class/System/Test/System/StringTester.cs new file mode 100644 index 00000000000..f3bd94274bb --- /dev/null +++ b/mcs/class/System/Test/System/StringTester.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Reflection; +using System.Text; +using System.Text.RegularExpressions; +using NUnit.Framework; + +namespace MonoTests.System { + public class StringTester { + private const string ext = ".txt"; + public static string Location = "./StringTests/"; + public static bool CreateMode = false; + + private static readonly Dictionary asserts = new Dictionary (); + + public static void Assert (string id, string actual, string message = "") + { + string testFullName = GetTestMethodName (); + + Asserts testAsserts; + if (!asserts.TryGetValue (testFullName, out testAsserts)) { + testAsserts = new Asserts (); + + if (!CreateMode) { + string filePath = Path.GetFullPath (Path.Combine (Location, testFullName + ext)); + if (!File.Exists (filePath)) { + NUnit.Framework.Assert.Ignore (filePath + " does not exist. \n" + + "The file should be generated by running on .NET the same test with StringTester.CreateMode = true."); + } + + testAsserts.Load (filePath); + } + + asserts.Add (testFullName, testAsserts); + } + + if (CreateMode) { + testAsserts.AddExpected (id, actual); + return; + } + + if (string.IsNullOrEmpty(message)) + message = id; + + string expected = testAsserts.GetExpected (id); + NUnit.Framework.Assert.AreEqual (expected, actual, message); + } + + public static void Save () + { + if (!CreateMode) + return; + + foreach (var test in asserts) + test.Value.Save (Path.Combine (Location, test.Key + ext)); + } + + public static string GetTestMethodName () + { + var stackTrace = new StackTrace (); + foreach (StackFrame stackFrame in stackTrace.GetFrames ()) { + MethodBase methodBase = stackFrame.GetMethod (); + Object [] attributes = methodBase.GetCustomAttributes (typeof (TestAttribute), false); + if (attributes.Length >= 1) + return methodBase.DeclaringType.FullName + "." + methodBase.Name; + } + return "Not called from a test method"; + } + + public class Asserts { + private const string escapes = "\n\t\0\r\\"; + private const string unescapes = @"\n\t\0\r\\"; + private static readonly Regex regex = new Regex (@"\\u(?[a-zA-Z0-9]{4})", RegexOptions.Compiled); + private readonly Dictionary values = new Dictionary (); + + public void AddExpected (string id, string value) + { + values.Add (id, value); + } + + public string GetExpected (string id) + { + return values [id]; + } + + public void Save (string filePath) + { + string dir = Path.GetDirectoryName (filePath); + if (!Directory.Exists (dir)) + Directory.CreateDirectory (dir); + + var sw = new StreamWriter (filePath, false, Encoding.UTF8); + + foreach (var kv in values) { + sw.WriteLine (Escape (kv.Key)); + sw.WriteLine (Escape (kv.Value)); + } + + sw.Close (); + } + + public void Load (string filePath) + { + if (!File.Exists (filePath)) + return; + + var sr = new StreamReader (filePath, Encoding.UTF8); + + while (sr.Peek () > 0) { + string id = Unescape (sr.ReadLine ()); + + if (sr.Peek () == 0) + break; + + string value = Unescape (sr.ReadLine ()); + values.Add (id, value); + } + + sr.Close (); + } + + private static string Escape (string str) + { + var sb = new StringBuilder (); + foreach (char c in str) { + int i = escapes.IndexOf (c); + if (i != -1) { + sb.Append (unescapes.Substring (i*2, 2)); + continue; + } + + if (c >= 0x7f || c < 0x20) { + sb.Append (string.Format (@"\u{0:x4}", (int) c)); + continue; + } + + sb.Append (c); + } + return sb.ToString (); + } + + private static string Unescape (string str) + { + for (int i = 0; i < escapes.Length; i++) + str = str.Replace (unescapes.Substring (i*2, 2), "" + escapes [i]); + + return regex.Replace (str, + m => ((char) int.Parse (m.Groups ["Value"].Value, NumberStyles.HexNumber)).ToString ()); + } + } + } +} \ No newline at end of file diff --git a/mcs/class/System/Test/System/UriPermutationsTest.cs b/mcs/class/System/Test/System/UriPermutationsTest.cs new file mode 100644 index 00000000000..2577d4b2ad5 --- /dev/null +++ b/mcs/class/System/Test/System/UriPermutationsTest.cs @@ -0,0 +1,303 @@ +using System; +using System.IO; +using System.Reflection; +using System.Text; +using NUnit.Framework; + +namespace MonoTests.System { + [TestFixture] + public class UriPermutationsTest { + + // Set this to true to generate the expected values + // The tests should run first on .NET with CreateMode = true + // The generated files should then be used when running the tests in Mono with CreateMode = false + private const bool createMode = false; + + private const string location = "./Test/System/UriPermutationsTest/"; + + private const string nonAsciiTestedChars = "☕"; + + // Chars that can change the current component. + // Those characters are tested alone. + private const string specialTestedChars = "@:?#"; + + // Scheme news: and custom: are not tested because there is a strange behavior on .NET 4.5 + // new Uri("news:a/a%30").ToString() == "news:a/a%30a/a0" + private static readonly string [] schemes = { + "http://", "https://", "file://", "ftp://", "gopher://", "ldap://", "mailto:", + "net.pipe://", "net.tcp://", "nntp://", "telnet://", "custom://", + //"news:", "custom:" + }; + + private static readonly string [] componentLocations = { + "a/a{0}?", "b/a{0}#", "c/a?", "d/a#", + "a/a{0}?%30#", "a/a?{0}#%30", "a/a%30?#", // see why on TestChars comment + }; + + private static readonly string [] specialCases = { + "a/a#%#", "a/a#%25#" // '%' cause '#' to escape in some cases + }; + + private static readonly string [] reduceLocations = { + "a/b/{0}", "a/b/{0}a", "a/b/c{0}", + "a/b/{0}/a", "a/b/{0}a/a", "a/b/c{0}/a", + // Test '\\' + "a/b\\{0}", "a/b\\{0}a", "a/b\\c{0}", + "a/b\\{0}\\a", "a/b\\{0}a\\a", "a/b\\c{0}\\a", + // Test '/' %2F + "a/b%2F{0}", "a/b%2F{0}a", "a/b%2Fc{0}", + "a/b/{0}%2Fa", "a/b/{0}a%2Fa", "a/b/c{0}%2Fa", + "a/b%2F{0}/a", "a/b%2F{0}a/a", "a/b%2Fc{0}/a", + // Test '\\' %5C + "a/b%5C{0}", "a/b%5C{0}a", "a/b%5Cc{0}", + "a/b/{0}%5Ca", "a/b/{0}a%5Ca", "a/b/c{0}%5Ca", + "a/b%5C{0}/a", "a/b%5C{0}a/a", "a/b%5Cc{0}/a", + }; + + private static readonly string [] reduceElements = { + "", ".", "..", "...", "%2E", "%2E%2E", "%2E%2E%2E" + }; + + public static readonly bool IriParsing; + + static UriPermutationsTest () + { + FieldInfo iriParsingField = typeof (Uri).GetField ("s_IriParsing", + BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic); + if (iriParsingField != null) + IriParsing = (bool) iriParsingField.GetValue (null); + } + + [SetUp] + public void Setup() + { + StringTester.CreateMode = createMode; + StringTester.Location = location; + StringTester.Location += (IriParsing) ? "IriParsing" : "NoIriParsing"; + } + + [TearDown] + public void Teardown() + { + StringTester.Save(); + } + + // With IriParsing: http://a/a%21 does not unescape to http://a/a! + // but http://a/a%21%30 does unescape to http://a/a!0 + // This happens with alpha numeric characters, non ASCII,'-','.','_' and '~'. + // So we tests characters with and without those characters. + private void TestChars (Action action) + { + var sb1 = new StringBuilder (); + var sb2 = new StringBuilder (); + for (char c = '\0'; c <= 0x7f; c++) { + if (specialTestedChars.Contains ("" + c)) + continue; + + if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || + c == '-' || c == '.' || c == '_' || c == '~') { + sb2.Append (c); + continue; + } + + sb1.Append (c); + sb2.Append (c); + } + + foreach (char c in nonAsciiTestedChars) + sb2.Append (c); + + action (sb1.ToString ()); + action (sb2.ToString ()); + + foreach (char c in specialTestedChars) + action ("" + c); + } + + internal static string HexEscapeMultiByte (char character, bool upper) + { + const string hex_upper_chars = "0123456789ABCDEF"; + const string hex_lower_chars = "0123456789abcdef"; + + string hex_chars = (upper)? hex_upper_chars : hex_lower_chars; + string ret = ""; + byte [] bytes = Encoding.UTF8.GetBytes (new [] {character}); + foreach (byte b in bytes) + ret += "%" + hex_chars [((b & 0xf0) >> 4)] + hex_chars [((b & 0x0f))]; + + return ret; + } + + private void TestScheme(Action action) + { + foreach (string scheme in schemes) + action(scheme); + } + + private delegate string UriToStringDelegate (Uri uri); + + private void TestLocation (string id, string str, UriToStringDelegate toString, bool testRelative = true) + { + TestScheme (scheme => { + string uri = scheme + str; + string actual = toString (new Uri (scheme + str, UriKind.Absolute)); + StringTester.Assert (scheme + id, actual); + }); + + if (!testRelative) + return; + + string relActual = toString (new Uri ("./" + str, UriKind.Relative)); + StringTester.Assert ("./" + id, relActual); + } + + private void TestLocations (string [] locations, string id, string str, UriToStringDelegate toString, + bool testRelative = true) + { + foreach (string location in locations) { + if (location.Contains ("{0}")) + TestLocation (string.Format (location, id), string.Format (location, str), toString, testRelative); + else + TestLocation (location + id, location + str, toString, testRelative); + } + } + + private void TestPercentageEncoding (UriToStringDelegate toString, bool testRelative = false, string id = "") + { + TestChars (unescapedStr => { + var sbUpper = new StringBuilder (); + var sbLower = new StringBuilder (); + foreach (char c in unescapedStr) { + sbUpper.Append (HexEscapeMultiByte (c, true)); + sbLower.Append (HexEscapeMultiByte (c, false)); + } + string escapedUpperStr = sbUpper.ToString (); + string escapedLowerStr = sbLower.ToString (); + + TestLocations (componentLocations, unescapedStr+id, unescapedStr, toString, testRelative); + TestLocations (componentLocations, escapedUpperStr+id+"[Upper]", escapedUpperStr, toString, testRelative); + TestLocations (componentLocations, escapedLowerStr+id+"[Lower]", escapedLowerStr, toString, testRelative); + }); + + TestLocations (specialCases, id, "", toString, testRelative); + } + + private void TestReduce (UriToStringDelegate toString, bool testRelative = true, string id = "") + { + foreach(var el in reduceElements) + TestLocations (reduceLocations, el + id, el, toString, testRelative); + } + + private void TestComponent (UriComponents component) + { + TestPercentageEncoding (uri => uri.GetComponents (component, UriFormat.SafeUnescaped), id: "[SafeUnescaped]"); + TestPercentageEncoding (uri => uri.GetComponents (component, UriFormat.Unescaped), id: "[Unescaped]"); + TestPercentageEncoding (uri => uri.GetComponents (component, UriFormat.UriEscaped), id: "[UriEscaped]"); + } + + private delegate void TestStringDelegate (UriToStringDelegate toString, bool testRelative = true, string id = ""); + + private void TestLocalPath (TestStringDelegate test) + { + var id = (Path.DirectorySeparatorChar == '/') ? "[UNIX]" : "[MS]"; + test (uri => uri.LocalPath, false, id); + + if (!createMode) + return; + + var altId = (Path.AltDirectorySeparatorChar == '/') ? "[UNIX]" : "[MS]"; + test (uri => { + var result = uri.LocalPath; + + if (uri.Scheme == Uri.UriSchemeFile) + result = result.Replace (Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); + + return result; + }, false, altId); + } + + [Test] + public void PercentageEncoding_AbsoluteUri () + { + TestPercentageEncoding (uri => uri.AbsoluteUri); + } + + [Test] + public void PercentageEncoding_Fragment () + { + TestPercentageEncoding (uri => uri.Fragment); + } + + [Test] + public void PercentageEncoding_GetComponents_AbsoluteUri () + { + TestComponent (UriComponents.AbsoluteUri); + } + + [Test] + public void PercentageEncoding_GetComponents_Fragment () + { + TestComponent (UriComponents.Fragment); + } + + [Test] + public void PercentageEncoding_GetComponents_Host () + { + TestComponent (UriComponents.Host); + } + + [Test] + public void PercentageEncoding_GetComponents_Path () + { + TestComponent (UriComponents.Path); + } + + [Test] + public void PercentageEncoding_GetComponents_PathAndQuery () + { + TestComponent (UriComponents.PathAndQuery); + } + + [Test] + public void PercentageEncoding_GetComponents_Query () + { + TestComponent (UriComponents.Query); + } + + [Test] + public void PercentageEncoding_LocalPath () + { + TestLocalPath (TestPercentageEncoding); + } + + [Test] + public void PercentageEncoding_Query () + { + TestPercentageEncoding (uri => uri.Query); + } + + [Test] + public void PercentageEncoding_ToString () + { + TestPercentageEncoding (uri => uri.ToString (), true); + } + + [Test] + public void Reduce_AbsoluteUri () + { + TestReduce (uri => uri.AbsoluteUri, false); + } + + [Test] + public void Reduce_LocalPath () + { + TestLocalPath (TestReduce); + } + + [Test] + public void Reduce_ToString () + { + TestReduce (uri => uri.ToString (), true); + } + } +} \ No newline at end of file diff --git a/mcs/class/System/Test/System/UriTest.cs b/mcs/class/System/Test/System/UriTest.cs index 65fd3a5847a..865313f667e 100644 --- a/mcs/class/System/Test/System/UriTest.cs +++ b/mcs/class/System/Test/System/UriTest.cs @@ -10,6 +10,7 @@ // (C) 2003 Ben Maurer // +using System.Reflection; using NUnit.Framework; using System; using System.IO; @@ -21,11 +22,20 @@ namespace MonoTests.System public class UriTest { protected bool isWin32 = false; + public bool IriParsing; [TestFixtureSetUp] public void GetReady () { isWin32 = (Path.DirectorySeparatorChar == '\\'); + + //Make sure Uri static constructor is called + Uri.EscapeDataString (""); + + FieldInfo iriParsingField = typeof (Uri).GetField ("s_IriParsing", + BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic); + if (iriParsingField != null) + IriParsing = (bool)iriParsingField.GetValue (null); } [Test] @@ -604,7 +614,11 @@ public void QueryEscape () Uri u1 = new Uri("http://localhost:8080/test.aspx?ReturnUrl=%2fSearchDoc%2fSearcher.aspx"); Uri u2 = new Uri("http://localhost:8080/test.aspx?ReturnUrl=%252fSearchDoc%252fSearcher.aspx"); - Assert.AreEqual ("http://localhost:8080/test.aspx?ReturnUrl=/SearchDoc/Searcher.aspx", u1.ToString (), "QE1"); + if (IriParsing) + Assert.AreEqual ("http://localhost:8080/test.aspx?ReturnUrl=%2fSearchDoc%2fSearcher.aspx", u1.ToString (), "QE1"); + else + Assert.AreEqual ("http://localhost:8080/test.aspx?ReturnUrl=/SearchDoc/Searcher.aspx", u1.ToString (), "QE1"); + Assert.AreEqual ("http://localhost:8080/test.aspx?ReturnUrl=%252fSearchDoc%252fSearcher.aspx", u2.ToString (), "QE2"); } @@ -688,10 +702,15 @@ public void Unescape () { Assert.AreEqual ("#", UriEx.UnescapeString ("file://localhost/c#", "%23"), "#1"); Assert.AreEqual ("c#", UriEx.UnescapeString ("file://localhost/c#", "c%23"), "#2"); - Assert.AreEqual ("\xA9", UriEx.UnescapeString ("file://localhost/c#", "%A9"), "#3"); Assert.AreEqual ("#", UriEx.UnescapeString ("http://localhost/c#", "%23"), "#1"); Assert.AreEqual ("c#", UriEx.UnescapeString ("http://localhost/c#", "c%23"), "#2"); +#if NET_4_0 + Assert.AreEqual ("%A9", UriEx.UnescapeString ("file://localhost/c#", "%A9"), "#3"); + Assert.AreEqual ("%A9", UriEx.UnescapeString ("http://localhost/c#", "%A9"), "#3"); +#else + Assert.AreEqual ("\xA9", UriEx.UnescapeString ("file://localhost/c#", "%A9"), "#3"); Assert.AreEqual ("\xA9", UriEx.UnescapeString ("http://localhost/c#", "%A9"), "#3"); +#endif } [Test] @@ -767,9 +786,13 @@ public void HexUnescapeMultiByte () // 2-byte escape sequence, 2 individual characters uri = new Uri ("file:///foo/a%C2%F8b", true); path = uri.LocalPath; +#if NET_4_0 + Assert.AreEqual ("/foo/a%C2%F8b", path, "#7"); +#else Assert.AreEqual (9, path.Length, "#7"); Assert.AreEqual (0xC2, path [6], "#8"); Assert.AreEqual (0xF8, path [7], "#9"); +#endif } [Test] @@ -844,7 +867,11 @@ public void NewsDefaultPort () public void Fragment_Escape () { Uri u = new Uri("http://localhost/index.asp#main#start", false); - Assert.AreEqual (u.Fragment, "#main%23start", "#1"); + + if (IriParsing) + Assert.AreEqual (u.Fragment, "#main#start", "#1"); + else + Assert.AreEqual (u.Fragment, "#main%23start", "#1"); u = new Uri("http://localhost/index.asp#main#start", true); Assert.AreEqual (u.Fragment, "#main#start", "#2"); @@ -853,7 +880,10 @@ public void Fragment_Escape () Uri b = new Uri ("http://www.gnome.org"); Uri n = new Uri (b, "blah#main#start"); - Assert.AreEqual (n.Fragment, "#main%23start", "#3"); + if (IriParsing) + Assert.AreEqual (n.Fragment, "#main#start", "#3"); + else + Assert.AreEqual (n.Fragment, "#main%23start", "#3"); n = new Uri (b, "blah#main#start", true); Assert.AreEqual (n.Fragment, "#main#start", "#4"); @@ -1071,8 +1101,14 @@ public void CaseSensitivity () // IPv6 Address Uri ftp = new Uri ("FTP://[::ffFF:169.32.14.5]/"); Assert.AreEqual ("ftp", ftp.Scheme, "#7"); - Assert.AreEqual ("[0000:0000:0000:0000:0000:FFFF:A920:0E05]", ftp.Host, "#8"); - Assert.AreEqual ("ftp://[0000:0000:0000:0000:0000:FFFF:A920:0E05]/", ftp.ToString (), "#9"); + + if (IriParsing) { + Assert.AreEqual ("[::ffff:169.32.14.5]", ftp.Host, "#8"); + Assert.AreEqual ("ftp://[::ffff:169.32.14.5]/", ftp.ToString (), "#9"); + } else { + Assert.AreEqual ("[0000:0000:0000:0000:0000:FFFF:A920:0E05]", ftp.Host, "#8"); + Assert.AreEqual ("ftp://[0000:0000:0000:0000:0000:FFFF:A920:0E05]/", ftp.ToString (), "#9"); + } } [Test] @@ -1480,13 +1516,21 @@ public void TestEscapeDataString () for (int i = 0; i < 128; i++) sb.Append ((char) i); - Assert.AreEqual ( #if NET_4_0 - "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F", + if (IriParsing) { + Assert.AreEqual ( + "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F", + Uri.EscapeDataString (sb.ToString ())); + } else { + Assert.AreEqual ( + "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22%23%24%25%26'()*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F", + Uri.EscapeDataString (sb.ToString ())); + } #else + Assert.AreEqual ( "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22%23%24%25%26'()*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F", + Uri.EscapeDataString (sb.ToString ())); #endif - Uri.EscapeDataString (sb.ToString ())); Assert.AreEqual ("%C3%A1", Uri.EscapeDataString ("á")); } @@ -1497,13 +1541,21 @@ public void TestEscapeUriString () for (int i = 0; i < 128; i++) sb.Append ((char) i); - Assert.AreEqual ( #if NET_4_0 - "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22#$%25&'()*+,-./0123456789:;%3C=%3E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[%5C]%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F", + if (IriParsing) { + Assert.AreEqual ( + "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22#$%25&'()*+,-./0123456789:;%3C=%3E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[%5C]%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F", + Uri.EscapeUriString (sb.ToString ())); + } else { + Assert.AreEqual ( + "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22#$%25&'()*+,-./0123456789:;%3C=%3E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F", + Uri.EscapeUriString (sb.ToString ())); + } #else + Assert.AreEqual ( "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22#$%25&'()*+,-./0123456789:;%3C=%3E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F", -#endif Uri.EscapeUriString (sb.ToString ())); +#endif Assert.AreEqual ("%C3%A1", Uri.EscapeDataString ("á")); } diff --git a/mcs/class/System/Test/System/UriTest2.cs b/mcs/class/System/Test/System/UriTest2.cs index 2375fdf5ab6..73b143aae2f 100644 --- a/mcs/class/System/Test/System/UriTest2.cs +++ b/mcs/class/System/Test/System/UriTest2.cs @@ -1,538 +1,561 @@ -// -// UriTest2.cs - More NUnit Test Cases for System.Uri -// - -using System; -using System.IO; -using System.Reflection; -using System.Text; -using NUnit.Framework; - -namespace MonoTests.System -{ - // help bring Moonlight tests back to mono/mcs nunit - - public delegate void TestCode (); - - static class Assert2 { - - public static void Throws (TestCode code, string message) where TException : Exception - { - Throws (code, typeof (TException), null, message); - } - - public static void Throws (TestCode code, Type expected_exception, Type expected_inner_exception, string message) - { - bool failed = false; - try { - code (); - failed = true; - } - catch (Exception ex) { - if (!(ex.GetType () == expected_exception)) - throw new AssertionException (string.Format ("Expected '{0}', got '{1}'. {2}", expected_exception.FullName, ex.GetType ().FullName, message)); - //System.Diagnostics.Debug.WriteLine (ex.ToString ()); - if (expected_inner_exception != null) { - // we only check if the inner exception was supplied - if (ex.InnerException.GetType () != expected_inner_exception) - throw new AssertionException (string.Format ("Expected InnerException '{0}', got '{1}'. {2}", expected_inner_exception.FullName, ex.InnerException.GetType ().FullName, message)); - } - } - if (failed) - throw new AssertionException (string.Format ("Expected '{0}', but got no exception. {1}", expected_exception.FullName, message)); - } - } - - [TestFixture] - public class UriTest2 - { - protected bool isWin32 = false; - - [SetUp] - public void SetUp () - { - isWin32 = (Path.DirectorySeparatorChar == '\\'); - } - - // Segments cannot be validated here... - public void AssertUri (string relsrc, Uri uri, - string toString, - string absoluteUri, - string scheme, - string host, - string localPath, - string query, - int port, - bool isFile, - bool isUnc, - bool isLoopback, - bool userEscaped, - UriHostNameType hostNameType, - string absolutePath, - string pathAndQuery, - string authority, - string fragment, - string userInfo) - { - Assert.AreEqual (absoluteUri, uri.AbsoluteUri, relsrc + " AbsoluteUri"); - Assert.AreEqual (scheme, uri.Scheme, relsrc + " Scheme"); - Assert.AreEqual (host, uri.Host, relsrc + " Host"); - Assert.AreEqual (port, uri.Port, relsrc + " Port"); - // Windows UNC path is not automatically testable on *nix environment, - if (relsrc.StartsWith ("\\\\") && Path.DirectorySeparatorChar == '\\') - Assert.AreEqual (localPath, uri.LocalPath, relsrc + " LocalPath"); - Assert.AreEqual (query, uri.Query, relsrc + " Query"); - Assert.AreEqual (fragment, uri.Fragment, relsrc + " Fragment"); - Assert.AreEqual (isFile, uri.IsFile, relsrc + " IsFile"); - Assert.AreEqual (isUnc, uri.IsUnc, relsrc + " IsUnc"); - Assert.AreEqual (isLoopback, uri.IsLoopback, relsrc + " IsLoopback"); - Assert.AreEqual (authority, uri.Authority, relsrc + " Authority"); - Assert.AreEqual (userEscaped, uri.UserEscaped, relsrc + " UserEscaped"); - Assert.AreEqual (userInfo, uri.UserInfo, relsrc + " UserInfo"); - Assert.AreEqual (hostNameType, uri.HostNameType, relsrc + " HostNameType"); - Assert.AreEqual (absolutePath, uri.AbsolutePath, relsrc + " AbsolutePath"); - Assert.AreEqual (pathAndQuery, uri.PathAndQuery, relsrc + " PathAndQuery"); - Assert.AreEqual (toString, uri.ToString (), relsrc + " ToString()"); - } - - [Test] - [Ignore ("Tests needs to be updated for 2.0")] - public void AbsoluteUriFromFile () - { - FromResource ("test-uri-props.txt", null); - } - - [Test] - [Category("NotDotNet")] - [Ignore ("Tests needs to be updated for 2.0")] - public void AbsoluteUriFromFileManual () - { - if (Path.DirectorySeparatorChar == '\\') - return; - FromResource ("test-uri-props-manual.txt", null); - } - - [Test] - [Ignore ("Tests needs to be updated for 2.0")] - public void RelativeUriFromFile () - { - FromResource ("test-uri-relative-props.txt", new Uri ("http://www.go-mono.com")); - } - - private void FromResource (string res, Uri baseUri) - { - Assembly a = Assembly.GetExecutingAssembly (); - Stream s = a.GetManifestResourceStream (res); - StreamReader sr = new StreamReader (s, Encoding.UTF8); - while (sr.Peek () > 0) { - sr.ReadLine (); // skip - string uriString = sr.ReadLine (); -/* -TextWriter sw = Console.Out; - sw.WriteLine ("-------------------------"); - sw.WriteLine (uriString); -*/ - if (uriString == null || uriString.Length == 0) - break; - - try { - Uri uri = baseUri == null ? new Uri (uriString) : new Uri (baseUri, uriString); -/* - sw.WriteLine ("ToString(): " + uri.ToString ()); - sw.WriteLine (uri.AbsoluteUri); - sw.WriteLine (uri.Scheme); - sw.WriteLine (uri.Host); - sw.WriteLine (uri.LocalPath); - sw.WriteLine (uri.Query); - sw.WriteLine ("Port: " + uri.Port); - sw.WriteLine (uri.IsFile); - sw.WriteLine (uri.IsUnc); - sw.WriteLine (uri.IsLoopback); - sw.WriteLine (uri.UserEscaped); - sw.WriteLine ("HostNameType: " + uri.HostNameType); - sw.WriteLine (uri.AbsolutePath); - sw.WriteLine ("PathAndQuery: " + uri.PathAndQuery); - sw.WriteLine (uri.Authority); - sw.WriteLine (uri.Fragment); - sw.WriteLine (uri.UserInfo); -*/ - AssertUri (uriString, uri, - sr.ReadLine (), - sr.ReadLine (), - sr.ReadLine (), - sr.ReadLine (), - sr.ReadLine (), - sr.ReadLine (), - int.Parse (sr.ReadLine ()), - bool.Parse (sr.ReadLine ()), - bool.Parse (sr.ReadLine ()), - bool.Parse (sr.ReadLine ()), - bool.Parse (sr.ReadLine ()), - (UriHostNameType) Enum.Parse (typeof (UriHostNameType), sr.ReadLine (), false), - sr.ReadLine (), - sr.ReadLine (), - sr.ReadLine (), - sr.ReadLine (), - sr.ReadLine ()); -// Console.WriteLine ("Passed: " + uriString); - } catch (UriFormatException ex) { - Assert.Fail (String.Format ("Construction failed: [{0}] {1}", uriString, ex.Message)); - } - } - } - - [Test] - public void MoreUnescape () // bug 733316 - { - int index = 0; - char unesc = Uri.HexUnescape ("%F6", ref index); - Assert.AreEqual (3, index, "#01"); - Assert.AreEqual (0xf6, unesc, "#02"); - } - - [Test] - public void UriScheme () - { - Assert.AreEqual ("://", Uri.SchemeDelimiter, "://"); - Assert.AreEqual ("file", Uri.UriSchemeFile, "file"); - Assert.AreEqual ("ftp", Uri.UriSchemeFtp, "ftp"); - Assert.AreEqual ("gopher", Uri.UriSchemeGopher, "gopher"); - Assert.AreEqual ("http", Uri.UriSchemeHttp, "http"); - Assert.AreEqual ("https", Uri.UriSchemeHttps, "https"); - Assert.AreEqual ("mailto", Uri.UriSchemeMailto, "mailto"); - Assert.AreEqual ("news", Uri.UriSchemeNews, "news"); - Assert.AreEqual ("nntp", Uri.UriSchemeNntp, "file"); - Assert.AreEqual ("net.pipe", Uri.UriSchemeNetPipe, "net.pipe"); - Assert.AreEqual ("net.tcp", Uri.UriSchemeNetTcp, "net.tcp"); - } - - [Test] // bug #71049 - [ExpectedException (typeof (UriFormatException))] - public void StarsInHost () - { - new Uri ("http://w*w*w.go-mono.com"); - } - - [Test] - public void NoHostName1_Bug76146 () - { - Uri u = new Uri ("foo:///?bar"); - Assert.AreEqual ("/", u.AbsolutePath, "AbsolutePath"); - Assert.AreEqual ("foo:///?bar", u.AbsoluteUri, "AbsoluteUri"); - Assert.AreEqual (String.Empty, u.Authority, "Authority"); - Assert.AreEqual (String.Empty, u.Fragment, "Fragment"); - Assert.AreEqual (String.Empty, u.Host, "Host"); - // FIXME (2.0) - Normally this is never Basic without an Host name :( - // Assert.AreEqual (UriHostNameType.Basic, u.HostNameType, "HostNameType"); - Assert.IsTrue (u.IsDefaultPort, "IsDefaultPort"); - Assert.IsFalse (u.IsFile, "IsFile"); - // FIXME Assert.IsTrue (u.IsLoopback, "IsLoopback"); - Assert.IsFalse (u.IsUnc, "IsUnc"); - Assert.AreEqual ("/", u.LocalPath, "LocalPath"); - Assert.AreEqual ("/?bar", u.PathAndQuery, "PathAndQuery"); - Assert.AreEqual ("foo", u.Scheme, "Scheme"); - Assert.IsFalse (u.UserEscaped, "UserEscaped"); - Assert.AreEqual (String.Empty, u.UserInfo, "UserInfo"); - } - - [Test] - public void NoHostName2_Bug76146 () - { - Uri u = new Uri ("foo:///bar"); - Assert.AreEqual ("/bar", u.AbsolutePath, "AbsolutePath"); - Assert.AreEqual ("foo:///bar", u.AbsoluteUri, "AbsoluteUri"); - Assert.AreEqual (String.Empty, u.Authority, "Authority"); - Assert.AreEqual (String.Empty, u.Fragment, "Fragment"); - Assert.AreEqual (String.Empty, u.Host, "Host"); - // FIXME (2.0) - Normally this is never Basic without an Host name :( - // Assert.AreEqual (UriHostNameType.Basic, u.HostNameType, "HostNameType"); - Assert.IsTrue (u.IsDefaultPort, "IsDefaultPort"); - Assert.IsFalse (u.IsFile, "IsFile"); - // FIXME Assert.IsTrue (u.IsLoopback, "IsLoopback"); - Assert.IsFalse (u.IsUnc, "IsUnc"); - Assert.AreEqual ("/bar", u.LocalPath, "LocalPath"); - Assert.AreEqual ("/bar", u.PathAndQuery, "PathAndQuery"); - Assert.AreEqual ("foo", u.Scheme, "Scheme"); - Assert.IsFalse (u.UserEscaped, "UserEscaped"); - Assert.AreEqual (String.Empty, u.UserInfo, "UserInfo"); - } - - [Test] - [ExpectedException (typeof (UriFormatException))] - public void InvalidIPAddress_Bug76659 () - { - new Uri ("http://127.0.0.1::::/"); - } - - [Test] - public void File () - { - string s = "file:///dir1%2f..%2fdir%2fapp.xap#header"; - Uri uri = new Uri (s); - Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath"); - // default port is removed - Assert.AreEqual ("file:///dir/app.xap#header", uri.AbsoluteUri, "AbsoluteUri"); - Assert.AreEqual (String.Empty, uri.DnsSafeHost, "DnsSafeHost"); - Assert.AreEqual ("#header", uri.Fragment, "Fragment"); - Assert.AreEqual (String.Empty, uri.Host, "Host"); - Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); - Assert.IsFalse (uri.IsUnc, "IsUnc"); - Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath"); - Assert.AreEqual (s, uri.OriginalString, "OriginalString"); - Assert.AreEqual (-1, uri.Port, "Port"); - Assert.AreEqual (String.Empty, uri.Query, "Query"); - Assert.AreEqual ("file", uri.Scheme, "Scheme"); - Assert.IsFalse (uri.UserEscaped, "UserEscaped"); - Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); - Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); - } - - [Test] - public void HttpWithDefaultPort () - { - string s = "HTTP://host.domain.com:80/app.xap"; - Uri uri = new Uri (s); - Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath"); - // default port is removed - Assert.AreEqual ("http://host.domain.com/app.xap", uri.AbsoluteUri, "AbsoluteUri"); - Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); - Assert.AreEqual (String.Empty, uri.Fragment, "Fragment"); - Assert.AreEqual ("host.domain.com", uri.Host, "Host"); - Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); - Assert.IsFalse (uri.IsUnc, "IsUnc"); - Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath"); - Assert.AreEqual (s, uri.OriginalString, "OriginalString"); - Assert.AreEqual (80, uri.Port, "Port"); - Assert.AreEqual (String.Empty, uri.Query, "Query"); - Assert.AreEqual ("http", uri.Scheme, "Scheme"); - Assert.IsFalse (uri.UserEscaped, "UserEscaped"); - Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); - Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); - } - - [Test] - public void HttpWithoutPort () - { - string s = "Http://host.DOMAIN.com/dir/app.xap#options"; - Uri uri = new Uri (s); - Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath"); - Assert.AreEqual ("http://host.domain.com/dir/app.xap#options", uri.AbsoluteUri, "AbsoluteUri"); - Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); - Assert.AreEqual ("#options", uri.Fragment, "Fragment"); - Assert.AreEqual ("host.domain.com", uri.Host, "Host"); - Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); - Assert.IsFalse (uri.IsUnc, "IsUnc"); - Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath"); - Assert.AreEqual (s, uri.OriginalString, "OriginalString"); - Assert.AreEqual (80, uri.Port, "Port"); - Assert.AreEqual (String.Empty, uri.Query, "Query"); - Assert.AreEqual ("http", uri.Scheme, "Scheme"); - Assert.IsFalse (uri.UserEscaped, "UserEscaped"); - Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); - Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); - } - - [Test] - public void HttpWithNonStandardPort () - { - string s = "http://monkey:s3kr3t@HOST.domain.Com:8080/dir/../app.xap?option=1"; - Uri uri = new Uri (s); - Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath"); - // non-standard port is present - Assert.AreEqual ("http://monkey:s3kr3t@host.domain.com:8080/app.xap?option=1", uri.AbsoluteUri, "AbsoluteUri"); - Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); - Assert.AreEqual (String.Empty, uri.Fragment, "Fragment"); - Assert.AreEqual ("host.domain.com", uri.Host, "Host"); - Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); - Assert.IsFalse (uri.IsUnc, "IsUnc"); - Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath"); - Assert.AreEqual (s, uri.OriginalString, "OriginalString"); - Assert.AreEqual (8080, uri.Port, "Port"); - Assert.AreEqual ("?option=1", uri.Query, "Query"); - Assert.AreEqual ("http", uri.Scheme, "Scheme"); - Assert.IsFalse (uri.UserEscaped, "UserEscaped"); - Assert.AreEqual ("monkey:s3kr3t", uri.UserInfo, "UserInfo"); - Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); - } - - [Test] - public void HttpsWithDefaultPort () - { - string s = "httpS://host.domain.com:443/"; - Uri uri = new Uri (s); - Assert.AreEqual ("/", uri.AbsolutePath, "AbsolutePath"); - // default port is removed - Assert.AreEqual ("https://host.domain.com/", uri.AbsoluteUri, "AbsoluteUri"); - Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); - Assert.AreEqual (String.Empty, uri.Fragment, "Fragment"); - Assert.AreEqual ("host.domain.com", uri.Host, "Host"); - Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); - Assert.IsFalse (uri.IsUnc, "IsUnc"); - Assert.AreEqual ("/", uri.LocalPath, "LocalPath"); - Assert.AreEqual (s, uri.OriginalString, "OriginalString"); - Assert.AreEqual (443, uri.Port, "Port"); - Assert.AreEqual (String.Empty, uri.Query, "Query"); - Assert.AreEqual ("https", uri.Scheme, "Scheme"); - Assert.IsFalse (uri.UserEscaped, "UserEscaped"); - Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); - Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); - } - - [Test] - public void HttpsWithoutPort () - { - string s = "Https://host.DOMAIN.com/dir%2fapp.xap#"; - Uri uri = new Uri (s); - Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath"); - Assert.AreEqual ("https://host.domain.com/dir/app.xap#", uri.AbsoluteUri, "AbsoluteUri"); - Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); - Assert.AreEqual ("#", uri.Fragment, "Fragment"); - Assert.AreEqual ("host.domain.com", uri.Host, "Host"); - Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); - Assert.IsFalse (uri.IsUnc, "IsUnc"); - Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath"); - Assert.AreEqual (s, uri.OriginalString, "OriginalString"); - Assert.AreEqual (443, uri.Port, "Port"); - Assert.AreEqual (String.Empty, uri.Query, "Query"); - Assert.AreEqual ("https", uri.Scheme, "Scheme"); - Assert.IsFalse (uri.UserEscaped, "UserEscaped"); - Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); - Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); - } - - [Test] - public void HttpsWithNonStandardPort () - { - string s = "https://monkey:s3kr3t@HOST.domain.Com:4430/dir/..%5Capp.xap?"; - Uri uri = new Uri (s); - Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath"); - // non-standard port is present - Assert.AreEqual ("https://monkey:s3kr3t@host.domain.com:4430/app.xap?", uri.AbsoluteUri, "AbsoluteUri"); - Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); - Assert.AreEqual (String.Empty, uri.Fragment, "Fragment"); - Assert.AreEqual ("host.domain.com", uri.Host, "Host"); - Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); - Assert.IsFalse (uri.IsUnc, "IsUnc"); - Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath"); - Assert.AreEqual (s, uri.OriginalString, "OriginalString"); - Assert.AreEqual (4430, uri.Port, "Port"); - Assert.AreEqual ("?", uri.Query, "Query"); - Assert.AreEqual ("https", uri.Scheme, "Scheme"); - Assert.IsFalse (uri.UserEscaped, "UserEscaped"); - Assert.AreEqual ("monkey:s3kr3t", uri.UserInfo, "UserInfo"); - Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); - } - - [Test] - public void Relative () - { - Uri relative = new Uri ("/Moonlight", UriKind.Relative); - - Assert2.Throws (delegate { - new Uri (null, "/Moonlight"); - }, "null,string"); - Assert2.Throws (delegate { - new Uri (null, relative); - }, "null,Uri"); - - Assert2.Throws (delegate { - new Uri (relative, "/Moonlight"); - }, "Uri,string"); - Assert2.Throws (delegate { - new Uri (relative, relative); - }, "Uri,Uri"); - - Assert2.Throws (delegate { - new Uri (relative, (string) null); - }, "Uri,string-null"); - Assert2.Throws (delegate { - new Uri (relative, (Uri) null); - }, "Uri,Uri-null"); - } - - private void CheckRelativeUri (Uri uri) - { - Assert2.Throws (delegate { - Assert.IsNotNull (uri.AbsolutePath); - }, "AbsolutePath"); - Assert2.Throws (delegate { - Assert.IsNotNull (uri.AbsoluteUri); - }, "AbsoluteUri"); - Assert2.Throws (delegate { - Assert.IsNotNull (uri.DnsSafeHost); - }, "DnsSafeHost"); - Assert2.Throws (delegate { - Assert.IsNotNull (uri.Fragment); - }, "Fragment"); - Assert2.Throws (delegate { - Assert.IsNotNull (uri.Host); - }, "Host"); - - Assert.IsFalse (uri.IsAbsoluteUri, "IsAbsoluteUri"); - - Assert2.Throws (delegate { - Assert.IsNotNull (uri.IsUnc); - }, "IsUnc"); - Assert2.Throws (delegate { - Assert.IsNotNull (uri.LocalPath); - }, "LocalPath"); - - Assert.AreEqual ("/Moonlight", uri.OriginalString, "OriginalString"); - - Assert2.Throws (delegate { - Assert.IsNotNull (uri.Port); - }, "Port"); - Assert2.Throws (delegate { - Assert.IsNotNull (uri.Query); - }, "Query"); - Assert2.Throws (delegate { - Assert.IsNotNull (uri.Scheme); - }, "Scheme"); - - Assert.IsFalse (uri.UserEscaped, "UserEscaped"); - - Assert2.Throws (delegate { - Assert.IsNotNull (uri.UserInfo); - }, "UserInfo"); - - Assert.AreEqual ("/Moonlight", uri.ToString (), "ToString"); - } - - [Test] - public void Relative_AsRelative () - { - Uri uri = new Uri ("/Moonlight", UriKind.Relative); - CheckRelativeUri (uri); - } - - [Test] - public void Bug496783 () - { - string s = "tcp://csve2.csse.unimelb.edu.au:9090/Aneka"; - Uri uri = new Uri (s); - // this is not parsed by a known UriParser - Assert.IsFalse (UriParser.IsKnownScheme (uri.Scheme), "UriParser"); - - Uri uri2 = new Uri ("tcp://csve2.csse.unimelb.edu.au:9090/"); - Assert.IsTrue (uri2.IsBaseOf (uri), "IsBaseOf"); - - Assert.AreEqual (uri.AbsoluteUri, uri.GetComponents (UriComponents.AbsoluteUri, UriFormat.Unescaped), "AbsoluteUri"); - Assert.AreEqual (uri.Fragment, uri.GetComponents (UriComponents.Fragment, UriFormat.Unescaped), "Fragment"); - Assert.AreEqual (uri.Host, uri.GetComponents (UriComponents.Host, UriFormat.Unescaped), "Host"); - Assert.AreEqual (uri.Authority, uri.GetComponents (UriComponents.HostAndPort, UriFormat.Unescaped), "HostAndPort"); - Assert.AreEqual (uri.AbsoluteUri, uri.GetComponents (UriComponents.HttpRequestUrl, UriFormat.Unescaped), "HttpRequestUrl"); - Assert.AreEqual (String.Empty, uri.GetComponents (UriComponents.KeepDelimiter, UriFormat.Unescaped), "KeepDelimiter"); - Assert.AreEqual ("Aneka", uri.GetComponents (UriComponents.Path, UriFormat.Unescaped), "Path"); - Assert.AreEqual (uri.LocalPath, uri.GetComponents (UriComponents.PathAndQuery, UriFormat.Unescaped), "PathAndQuery"); - Assert.AreEqual (uri.Port.ToString (), uri.GetComponents (UriComponents.Port, UriFormat.Unescaped), "Port"); - Assert.AreEqual (uri.Query, uri.GetComponents (UriComponents.Query, UriFormat.Unescaped), "Query"); - Assert.AreEqual (uri.Scheme, uri.GetComponents (UriComponents.Scheme, UriFormat.Unescaped), "Scheme"); - Assert.AreEqual ("tcp://csve2.csse.unimelb.edu.au:9090", uri.GetComponents (UriComponents.SchemeAndServer, UriFormat.Unescaped), "SchemeAndServer"); - Assert.AreEqual (uri.OriginalString, uri.GetComponents (UriComponents.SerializationInfoString, UriFormat.Unescaped), "SerializationInfoString"); - Assert.AreEqual (uri.Authority, uri.GetComponents (UriComponents.StrongAuthority, UriFormat.Unescaped), "StrongAuthority"); - Assert.AreEqual (uri.Port.ToString (), uri.GetComponents (UriComponents.StrongPort, UriFormat.Unescaped), "StrongPort"); - Assert.AreEqual (uri.UserInfo, uri.GetComponents (UriComponents.UserInfo, UriFormat.Unescaped), "UserInfo"); - } +// +// UriTest2.cs - More NUnit Test Cases for System.Uri +// + +using System; +using System.IO; +using System.Reflection; +using System.Text; +using NUnit.Framework; + +namespace MonoTests.System +{ + // help bring Moonlight tests back to mono/mcs nunit + + public delegate void TestCode (); + + static class Assert2 { + + public static void Throws (TestCode code, string message) where TException : Exception + { + Throws (code, typeof (TException), null, message); + } + + public static void Throws (TestCode code, Type expected_exception, Type expected_inner_exception, string message) + { + bool failed = false; + try { + code (); + failed = true; + } + catch (Exception ex) { + if (!(ex.GetType () == expected_exception)) + throw new AssertionException (string.Format ("Expected '{0}', got '{1}'. {2}", expected_exception.FullName, ex.GetType ().FullName, message)); + //System.Diagnostics.Debug.WriteLine (ex.ToString ()); + if (expected_inner_exception != null) { + // we only check if the inner exception was supplied + if (ex.InnerException.GetType () != expected_inner_exception) + throw new AssertionException (string.Format ("Expected InnerException '{0}', got '{1}'. {2}", expected_inner_exception.FullName, ex.InnerException.GetType ().FullName, message)); + } + } + if (failed) + throw new AssertionException (string.Format ("Expected '{0}', but got no exception. {1}", expected_exception.FullName, message)); + } + } + + [TestFixture] + public class UriTest2 + { + protected bool isWin32 = false; + public bool IriParsing; + + [SetUp] + public void SetUp () + { + isWin32 = (Path.DirectorySeparatorChar == '\\'); + + //Make sure Uri static constructor is called + Uri.EscapeDataString (""); + + FieldInfo iriParsingField = typeof (Uri).GetField ("s_IriParsing", + BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic); + if (iriParsingField != null) + IriParsing = (bool)iriParsingField.GetValue (null); + } + + // Segments cannot be validated here... + public void AssertUri (string relsrc, Uri uri, + string toString, + string absoluteUri, + string scheme, + string host, + string localPath, + string query, + int port, + bool isFile, + bool isUnc, + bool isLoopback, + bool userEscaped, + UriHostNameType hostNameType, + string absolutePath, + string pathAndQuery, + string authority, + string fragment, + string userInfo) + { + Assert.AreEqual (absoluteUri, uri.AbsoluteUri, relsrc + " AbsoluteUri"); + Assert.AreEqual (scheme, uri.Scheme, relsrc + " Scheme"); + Assert.AreEqual (host, uri.Host, relsrc + " Host"); + Assert.AreEqual (port, uri.Port, relsrc + " Port"); + // Windows UNC path is not automatically testable on *nix environment, + if (relsrc.StartsWith ("\\\\") && Path.DirectorySeparatorChar == '\\') + Assert.AreEqual (localPath, uri.LocalPath, relsrc + " LocalPath"); + Assert.AreEqual (query, uri.Query, relsrc + " Query"); + Assert.AreEqual (fragment, uri.Fragment, relsrc + " Fragment"); + Assert.AreEqual (isFile, uri.IsFile, relsrc + " IsFile"); + Assert.AreEqual (isUnc, uri.IsUnc, relsrc + " IsUnc"); + Assert.AreEqual (isLoopback, uri.IsLoopback, relsrc + " IsLoopback"); + Assert.AreEqual (authority, uri.Authority, relsrc + " Authority"); + Assert.AreEqual (userEscaped, uri.UserEscaped, relsrc + " UserEscaped"); + Assert.AreEqual (userInfo, uri.UserInfo, relsrc + " UserInfo"); + Assert.AreEqual (hostNameType, uri.HostNameType, relsrc + " HostNameType"); + Assert.AreEqual (absolutePath, uri.AbsolutePath, relsrc + " AbsolutePath"); + Assert.AreEqual (pathAndQuery, uri.PathAndQuery, relsrc + " PathAndQuery"); + Assert.AreEqual (toString, uri.ToString (), relsrc + " ToString()"); + } + + [Test] + [Ignore ("Tests needs to be updated for 2.0")] + public void AbsoluteUriFromFile () + { + FromResource ("test-uri-props.txt", null); + } + + [Test] + [Category("NotDotNet")] + [Ignore ("Tests needs to be updated for 2.0")] + public void AbsoluteUriFromFileManual () + { + if (Path.DirectorySeparatorChar == '\\') + return; + FromResource ("test-uri-props-manual.txt", null); + } + + [Test] + [Ignore ("Tests needs to be updated for 2.0")] + public void RelativeUriFromFile () + { + FromResource ("test-uri-relative-props.txt", new Uri ("http://www.go-mono.com")); + } + + private void FromResource (string res, Uri baseUri) + { + Assembly a = Assembly.GetExecutingAssembly (); + Stream s = a.GetManifestResourceStream (res); + StreamReader sr = new StreamReader (s, Encoding.UTF8); + while (sr.Peek () > 0) { + sr.ReadLine (); // skip + string uriString = sr.ReadLine (); +/* +TextWriter sw = Console.Out; + sw.WriteLine ("-------------------------"); + sw.WriteLine (uriString); +*/ + if (uriString == null || uriString.Length == 0) + break; + + try { + Uri uri = baseUri == null ? new Uri (uriString) : new Uri (baseUri, uriString); +/* + sw.WriteLine ("ToString(): " + uri.ToString ()); + sw.WriteLine (uri.AbsoluteUri); + sw.WriteLine (uri.Scheme); + sw.WriteLine (uri.Host); + sw.WriteLine (uri.LocalPath); + sw.WriteLine (uri.Query); + sw.WriteLine ("Port: " + uri.Port); + sw.WriteLine (uri.IsFile); + sw.WriteLine (uri.IsUnc); + sw.WriteLine (uri.IsLoopback); + sw.WriteLine (uri.UserEscaped); + sw.WriteLine ("HostNameType: " + uri.HostNameType); + sw.WriteLine (uri.AbsolutePath); + sw.WriteLine ("PathAndQuery: " + uri.PathAndQuery); + sw.WriteLine (uri.Authority); + sw.WriteLine (uri.Fragment); + sw.WriteLine (uri.UserInfo); +*/ + AssertUri (uriString, uri, + sr.ReadLine (), + sr.ReadLine (), + sr.ReadLine (), + sr.ReadLine (), + sr.ReadLine (), + sr.ReadLine (), + int.Parse (sr.ReadLine ()), + bool.Parse (sr.ReadLine ()), + bool.Parse (sr.ReadLine ()), + bool.Parse (sr.ReadLine ()), + bool.Parse (sr.ReadLine ()), + (UriHostNameType) Enum.Parse (typeof (UriHostNameType), sr.ReadLine (), false), + sr.ReadLine (), + sr.ReadLine (), + sr.ReadLine (), + sr.ReadLine (), + sr.ReadLine ()); +// Console.WriteLine ("Passed: " + uriString); + } catch (UriFormatException ex) { + Assert.Fail (String.Format ("Construction failed: [{0}] {1}", uriString, ex.Message)); + } + } + } + + [Test] + public void MoreUnescape () // bug 733316 + { + int index = 0; + char unesc = Uri.HexUnescape ("%F6", ref index); + Assert.AreEqual (3, index, "#01"); + Assert.AreEqual (0xf6, unesc, "#02"); + } + + [Test] + public void UriScheme () + { + Assert.AreEqual ("://", Uri.SchemeDelimiter, "://"); + Assert.AreEqual ("file", Uri.UriSchemeFile, "file"); + Assert.AreEqual ("ftp", Uri.UriSchemeFtp, "ftp"); + Assert.AreEqual ("gopher", Uri.UriSchemeGopher, "gopher"); + Assert.AreEqual ("http", Uri.UriSchemeHttp, "http"); + Assert.AreEqual ("https", Uri.UriSchemeHttps, "https"); + Assert.AreEqual ("mailto", Uri.UriSchemeMailto, "mailto"); + Assert.AreEqual ("news", Uri.UriSchemeNews, "news"); + Assert.AreEqual ("nntp", Uri.UriSchemeNntp, "file"); + Assert.AreEqual ("net.pipe", Uri.UriSchemeNetPipe, "net.pipe"); + Assert.AreEqual ("net.tcp", Uri.UriSchemeNetTcp, "net.tcp"); + } + + [Test] // bug #71049 + [ExpectedException (typeof (UriFormatException))] + public void StarsInHost () + { + new Uri ("http://w*w*w.go-mono.com"); + } + + [Test] + public void NoHostName1_Bug76146 () + { + Uri u = new Uri ("foo:///?bar"); + Assert.AreEqual ("/", u.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("foo:///?bar", u.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual (String.Empty, u.Authority, "Authority"); + Assert.AreEqual (String.Empty, u.Fragment, "Fragment"); + Assert.AreEqual (String.Empty, u.Host, "Host"); + // FIXME (2.0) - Normally this is never Basic without an Host name :( + // Assert.AreEqual (UriHostNameType.Basic, u.HostNameType, "HostNameType"); + Assert.IsTrue (u.IsDefaultPort, "IsDefaultPort"); + Assert.IsFalse (u.IsFile, "IsFile"); + // FIXME Assert.IsTrue (u.IsLoopback, "IsLoopback"); + Assert.IsFalse (u.IsUnc, "IsUnc"); + Assert.AreEqual ("/", u.LocalPath, "LocalPath"); + Assert.AreEqual ("/?bar", u.PathAndQuery, "PathAndQuery"); + Assert.AreEqual ("foo", u.Scheme, "Scheme"); + Assert.IsFalse (u.UserEscaped, "UserEscaped"); + Assert.AreEqual (String.Empty, u.UserInfo, "UserInfo"); + } + + [Test] + public void NoHostName2_Bug76146 () + { + Uri u = new Uri ("foo:///bar"); + Assert.AreEqual ("/bar", u.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("foo:///bar", u.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual (String.Empty, u.Authority, "Authority"); + Assert.AreEqual (String.Empty, u.Fragment, "Fragment"); + Assert.AreEqual (String.Empty, u.Host, "Host"); + // FIXME (2.0) - Normally this is never Basic without an Host name :( + // Assert.AreEqual (UriHostNameType.Basic, u.HostNameType, "HostNameType"); + Assert.IsTrue (u.IsDefaultPort, "IsDefaultPort"); + Assert.IsFalse (u.IsFile, "IsFile"); + // FIXME Assert.IsTrue (u.IsLoopback, "IsLoopback"); + Assert.IsFalse (u.IsUnc, "IsUnc"); + Assert.AreEqual ("/bar", u.LocalPath, "LocalPath"); + Assert.AreEqual ("/bar", u.PathAndQuery, "PathAndQuery"); + Assert.AreEqual ("foo", u.Scheme, "Scheme"); + Assert.IsFalse (u.UserEscaped, "UserEscaped"); + Assert.AreEqual (String.Empty, u.UserInfo, "UserInfo"); + } + + [Test] + [ExpectedException (typeof (UriFormatException))] + public void InvalidIPAddress_Bug76659 () + { + new Uri ("http://127.0.0.1::::/"); + } + + [Test] + public void File () + { + string s = "file:///dir1%2f..%2fdir%2fapp.xap#header"; + Uri uri = new Uri (s); + Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath"); + // default port is removed + Assert.AreEqual ("file:///dir/app.xap#header", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual (String.Empty, uri.DnsSafeHost, "DnsSafeHost"); + Assert.AreEqual ("#header", uri.Fragment, "Fragment"); + Assert.AreEqual (String.Empty, uri.Host, "Host"); + Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); + Assert.IsFalse (uri.IsUnc, "IsUnc"); + Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath"); + Assert.AreEqual (s, uri.OriginalString, "OriginalString"); + Assert.AreEqual (-1, uri.Port, "Port"); + Assert.AreEqual (String.Empty, uri.Query, "Query"); + Assert.AreEqual ("file", uri.Scheme, "Scheme"); + Assert.IsFalse (uri.UserEscaped, "UserEscaped"); + Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); + Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); + } + + [Test] + public void HttpWithDefaultPort () + { + string s = "HTTP://host.domain.com:80/app.xap"; + Uri uri = new Uri (s); + Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath"); + // default port is removed + Assert.AreEqual ("http://host.domain.com/app.xap", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); + Assert.AreEqual (String.Empty, uri.Fragment, "Fragment"); + Assert.AreEqual ("host.domain.com", uri.Host, "Host"); + Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); + Assert.IsFalse (uri.IsUnc, "IsUnc"); + Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath"); + Assert.AreEqual (s, uri.OriginalString, "OriginalString"); + Assert.AreEqual (80, uri.Port, "Port"); + Assert.AreEqual (String.Empty, uri.Query, "Query"); + Assert.AreEqual ("http", uri.Scheme, "Scheme"); + Assert.IsFalse (uri.UserEscaped, "UserEscaped"); + Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); + Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); + } + + [Test] + public void HttpWithoutPort () + { + string s = "Http://host.DOMAIN.com/dir/app.xap#options"; + Uri uri = new Uri (s); + Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("http://host.domain.com/dir/app.xap#options", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); + Assert.AreEqual ("#options", uri.Fragment, "Fragment"); + Assert.AreEqual ("host.domain.com", uri.Host, "Host"); + Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); + Assert.IsFalse (uri.IsUnc, "IsUnc"); + Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath"); + Assert.AreEqual (s, uri.OriginalString, "OriginalString"); + Assert.AreEqual (80, uri.Port, "Port"); + Assert.AreEqual (String.Empty, uri.Query, "Query"); + Assert.AreEqual ("http", uri.Scheme, "Scheme"); + Assert.IsFalse (uri.UserEscaped, "UserEscaped"); + Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); + Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); + } + + [Test] + public void HttpWithNonStandardPort () + { + string s = "http://monkey:s3kr3t@HOST.domain.Com:8080/dir/../app.xap?option=1"; + Uri uri = new Uri (s); + Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath"); + // non-standard port is present + Assert.AreEqual ("http://monkey:s3kr3t@host.domain.com:8080/app.xap?option=1", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); + Assert.AreEqual (String.Empty, uri.Fragment, "Fragment"); + Assert.AreEqual ("host.domain.com", uri.Host, "Host"); + Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); + Assert.IsFalse (uri.IsUnc, "IsUnc"); + Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath"); + Assert.AreEqual (s, uri.OriginalString, "OriginalString"); + Assert.AreEqual (8080, uri.Port, "Port"); + Assert.AreEqual ("?option=1", uri.Query, "Query"); + Assert.AreEqual ("http", uri.Scheme, "Scheme"); + Assert.IsFalse (uri.UserEscaped, "UserEscaped"); + Assert.AreEqual ("monkey:s3kr3t", uri.UserInfo, "UserInfo"); + Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); + } + + [Test] + public void HttpsWithDefaultPort () + { + string s = "httpS://host.domain.com:443/"; + Uri uri = new Uri (s); + Assert.AreEqual ("/", uri.AbsolutePath, "AbsolutePath"); + // default port is removed + Assert.AreEqual ("https://host.domain.com/", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); + Assert.AreEqual (String.Empty, uri.Fragment, "Fragment"); + Assert.AreEqual ("host.domain.com", uri.Host, "Host"); + Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); + Assert.IsFalse (uri.IsUnc, "IsUnc"); + Assert.AreEqual ("/", uri.LocalPath, "LocalPath"); + Assert.AreEqual (s, uri.OriginalString, "OriginalString"); + Assert.AreEqual (443, uri.Port, "Port"); + Assert.AreEqual (String.Empty, uri.Query, "Query"); + Assert.AreEqual ("https", uri.Scheme, "Scheme"); + Assert.IsFalse (uri.UserEscaped, "UserEscaped"); + Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); + Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); + } + + [Test] + public void HttpsWithoutPort () + { + string s = "Https://host.DOMAIN.com/dir%2fapp.xap#"; + Uri uri = new Uri (s); + + if (IriParsing) { + Assert.AreEqual ("/dir%2fapp.xap", uri.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("https://host.domain.com/dir%2fapp.xap#", uri.AbsoluteUri, "AbsoluteUri"); + } else { + Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("https://host.domain.com/dir/app.xap#", uri.AbsoluteUri, "AbsoluteUri"); + } + + Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); + Assert.AreEqual ("#", uri.Fragment, "Fragment"); + Assert.AreEqual ("host.domain.com", uri.Host, "Host"); + Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); + Assert.IsFalse (uri.IsUnc, "IsUnc"); + Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath"); + Assert.AreEqual (s, uri.OriginalString, "OriginalString"); + Assert.AreEqual (443, uri.Port, "Port"); + Assert.AreEqual (String.Empty, uri.Query, "Query"); + Assert.AreEqual ("https", uri.Scheme, "Scheme"); + Assert.IsFalse (uri.UserEscaped, "UserEscaped"); + Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); + Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); + } + + [Test] + public void HttpsWithNonStandardPort () + { + string s = "https://monkey:s3kr3t@HOST.domain.Com:4430/dir/..%5Capp.xap?"; + Uri uri = new Uri (s); + + if (IriParsing) { + Assert.AreEqual ("/dir/..%5Capp.xap", uri.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("https://monkey:s3kr3t@host.domain.com:4430/dir/..%5Capp.xap?", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual ("/dir/..\\app.xap", uri.LocalPath, "LocalPath"); + } else { + Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("https://monkey:s3kr3t@host.domain.com:4430/app.xap?", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath"); + } + + Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost"); + Assert.AreEqual (String.Empty, uri.Fragment, "Fragment"); + Assert.AreEqual ("host.domain.com", uri.Host, "Host"); + Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri"); + Assert.IsFalse (uri.IsUnc, "IsUnc"); + Assert.AreEqual (s, uri.OriginalString, "OriginalString"); + Assert.AreEqual (4430, uri.Port, "Port"); + Assert.AreEqual ("?", uri.Query, "Query"); + Assert.AreEqual ("https", uri.Scheme, "Scheme"); + Assert.IsFalse (uri.UserEscaped, "UserEscaped"); + Assert.AreEqual ("monkey:s3kr3t", uri.UserInfo, "UserInfo"); + Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString"); + } + + [Test] + public void Relative () + { + Uri relative = new Uri ("/Moonlight", UriKind.Relative); + + Assert2.Throws (delegate { + new Uri (null, "/Moonlight"); + }, "null,string"); + Assert2.Throws (delegate { + new Uri (null, relative); + }, "null,Uri"); + + Assert2.Throws (delegate { + new Uri (relative, "/Moonlight"); + }, "Uri,string"); + Assert2.Throws (delegate { + new Uri (relative, relative); + }, "Uri,Uri"); + + Assert2.Throws (delegate { + new Uri (relative, (string) null); + }, "Uri,string-null"); + Assert2.Throws (delegate { + new Uri (relative, (Uri) null); + }, "Uri,Uri-null"); + } + + private void CheckRelativeUri (Uri uri) + { + Assert2.Throws (delegate { + Assert.IsNotNull (uri.AbsolutePath); + }, "AbsolutePath"); + Assert2.Throws (delegate { + Assert.IsNotNull (uri.AbsoluteUri); + }, "AbsoluteUri"); + Assert2.Throws (delegate { + Assert.IsNotNull (uri.DnsSafeHost); + }, "DnsSafeHost"); + Assert2.Throws (delegate { + Assert.IsNotNull (uri.Fragment); + }, "Fragment"); + Assert2.Throws (delegate { + Assert.IsNotNull (uri.Host); + }, "Host"); + + Assert.IsFalse (uri.IsAbsoluteUri, "IsAbsoluteUri"); + + Assert2.Throws (delegate { + Assert.IsNotNull (uri.IsUnc); + }, "IsUnc"); + Assert2.Throws (delegate { + Assert.IsNotNull (uri.LocalPath); + }, "LocalPath"); + + Assert.AreEqual ("/Moonlight", uri.OriginalString, "OriginalString"); + + Assert2.Throws (delegate { + Assert.IsNotNull (uri.Port); + }, "Port"); + Assert2.Throws (delegate { + Assert.IsNotNull (uri.Query); + }, "Query"); + Assert2.Throws (delegate { + Assert.IsNotNull (uri.Scheme); + }, "Scheme"); + + Assert.IsFalse (uri.UserEscaped, "UserEscaped"); + + Assert2.Throws (delegate { + Assert.IsNotNull (uri.UserInfo); + }, "UserInfo"); + + Assert.AreEqual ("/Moonlight", uri.ToString (), "ToString"); + } + + [Test] + public void Relative_AsRelative () + { + Uri uri = new Uri ("/Moonlight", UriKind.Relative); + CheckRelativeUri (uri); + } + + [Test] + public void Bug496783 () + { + string s = "tcp://csve2.csse.unimelb.edu.au:9090/Aneka"; + Uri uri = new Uri (s); + // this is not parsed by a known UriParser + Assert.IsFalse (UriParser.IsKnownScheme (uri.Scheme), "UriParser"); + + Uri uri2 = new Uri ("tcp://csve2.csse.unimelb.edu.au:9090/"); + Assert.IsTrue (uri2.IsBaseOf (uri), "IsBaseOf"); + + Assert.AreEqual (uri.AbsoluteUri, uri.GetComponents (UriComponents.AbsoluteUri, UriFormat.Unescaped), "AbsoluteUri"); + Assert.AreEqual (uri.Fragment, uri.GetComponents (UriComponents.Fragment, UriFormat.Unescaped), "Fragment"); + Assert.AreEqual (uri.Host, uri.GetComponents (UriComponents.Host, UriFormat.Unescaped), "Host"); + Assert.AreEqual (uri.Authority, uri.GetComponents (UriComponents.HostAndPort, UriFormat.Unescaped), "HostAndPort"); + Assert.AreEqual (uri.AbsoluteUri, uri.GetComponents (UriComponents.HttpRequestUrl, UriFormat.Unescaped), "HttpRequestUrl"); + Assert.AreEqual (String.Empty, uri.GetComponents (UriComponents.KeepDelimiter, UriFormat.Unescaped), "KeepDelimiter"); + Assert.AreEqual ("Aneka", uri.GetComponents (UriComponents.Path, UriFormat.Unescaped), "Path"); + Assert.AreEqual (uri.LocalPath, uri.GetComponents (UriComponents.PathAndQuery, UriFormat.Unescaped), "PathAndQuery"); + Assert.AreEqual (uri.Port.ToString (), uri.GetComponents (UriComponents.Port, UriFormat.Unescaped), "Port"); + Assert.AreEqual (uri.Query, uri.GetComponents (UriComponents.Query, UriFormat.Unescaped), "Query"); + Assert.AreEqual (uri.Scheme, uri.GetComponents (UriComponents.Scheme, UriFormat.Unescaped), "Scheme"); + Assert.AreEqual ("tcp://csve2.csse.unimelb.edu.au:9090", uri.GetComponents (UriComponents.SchemeAndServer, UriFormat.Unescaped), "SchemeAndServer"); + Assert.AreEqual (uri.OriginalString, uri.GetComponents (UriComponents.SerializationInfoString, UriFormat.Unescaped), "SerializationInfoString"); + Assert.AreEqual (uri.Authority, uri.GetComponents (UriComponents.StrongAuthority, UriFormat.Unescaped), "StrongAuthority"); + Assert.AreEqual (uri.Port.ToString (), uri.GetComponents (UriComponents.StrongPort, UriFormat.Unescaped), "StrongPort"); + Assert.AreEqual (uri.UserInfo, uri.GetComponents (UriComponents.UserInfo, UriFormat.Unescaped), "UserInfo"); + } [Test] public void Merge_Query_Fragment () @@ -717,7 +740,10 @@ public void UnknownScheme () // special characters uri = new Uri ("mono://host/<>%\"{}|\\^`;/:@&=+$,[]#abc"); - Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/:@&=+$,%5B%5D", uri.AbsolutePath, "Special"); + if (IriParsing) + Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/:@&=+$,[]", uri.AbsolutePath, "Special"); + else + Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/:@&=+$,%5B%5D", uri.AbsolutePath, "Special"); } [Test] @@ -763,8 +789,11 @@ public void NewsScheme () // special escaped characters - they differs a bit from other URI uri = new Uri ("news:novell.mono.moonlight/<>%\"{}|\\^`;/?:@&=+$,[]#abc"); - Assert.AreEqual ("novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special"); Assert.AreEqual ("#abc", uri.Fragment, "Special/Fragment"); + if (IriParsing) + Assert.AreEqual ("novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,[]", uri.AbsolutePath, "Special"); + else + Assert.AreEqual ("novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special"); } [Test] @@ -798,8 +827,11 @@ public void NntpScheme () // special escaped characters - they differs a bit from other URI uri = new Uri ("nntp://news.mono-project.com/novell.mono.moonlight/<>%\"{}|\\^`;/?:@&=+$,[]#abc"); - Assert.AreEqual ("/novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special"); Assert.AreEqual ("#abc", uri.Fragment, "Special/Fragment"); + if (IriParsing) + Assert.AreEqual ("/novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,[]", uri.AbsolutePath, "Special"); + else + Assert.AreEqual ("/novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special"); } [Test] @@ -832,16 +864,34 @@ public void FtpScheme () // special characters and fragment uri = new Uri ("ftp://ftp.mono-project.com/<>%\"{}|\\^`;/?:@&=+$,[]#abc"); - Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special"); Assert.AreEqual ("#abc", uri.Fragment, "Special/Fragment"); + if (IriParsing) + Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/%3F:@&=+$,[]", uri.AbsolutePath, "Special"); + else + Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special"); } [Test] public void FileScheme () { Uri uri = new Uri ("file://host/dir/subdir/file?this-is-not-a-query#but-this-is-a-fragment"); - Assert.AreEqual ("/dir/subdir/file%3Fthis-is-not-a-query", uri.AbsolutePath, "AbsolutePath"); - Assert.AreEqual ("file://host/dir/subdir/file%3Fthis-is-not-a-query#but-this-is-a-fragment", uri.AbsoluteUri, "AbsoluteUri"); + + if (IriParsing) { + Assert.AreEqual ("/dir/subdir/file", uri.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("file://host/dir/subdir/file?this-is-not-a-query#but-this-is-a-fragment", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual (isWin32 ? "\\\\host\\dir\\subdir\\file" : "/dir/subdir/file", uri.LocalPath, "LocalPath"); + Assert.AreEqual ("/dir/subdir/file?this-is-not-a-query", uri.PathAndQuery, "PathAndQuery"); + Assert.AreEqual ("?this-is-not-a-query", uri.Query, "Query"); + Assert.AreEqual ("file", uri.Segments [3], "Segments [3]"); + } else { + Assert.AreEqual ("/dir/subdir/file%3Fthis-is-not-a-query", uri.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("file://host/dir/subdir/file%3Fthis-is-not-a-query#but-this-is-a-fragment", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual (isWin32 ? "\\\\host\\dir\\subdir\\file?this-is-not-a-query" : "/dir/subdir/file?this-is-not-a-query", uri.LocalPath, "LocalPath"); + Assert.AreEqual ("/dir/subdir/file%3Fthis-is-not-a-query", uri.PathAndQuery, "PathAndQuery"); + Assert.AreEqual (String.Empty, uri.Query, "Query"); + Assert.AreEqual ("file%3Fthis-is-not-a-query", uri.Segments [3], "Segments [3]"); + } + Assert.AreEqual ("host", uri.Authority, "Authority"); Assert.AreEqual ("host", uri.DnsSafeHost, "DnsSafeHost"); Assert.AreEqual ("#but-this-is-a-fragment", uri.Fragment, "Fragment"); @@ -852,22 +902,21 @@ public void FileScheme () Assert.IsTrue (uri.IsFile, "IsFile"); Assert.IsFalse (uri.IsLoopback, "IsLoopback"); Assert.AreEqual (isWin32, uri.IsUnc, "IsUnc"); - Assert.AreEqual (isWin32 ? "\\\\host\\dir\\subdir\\file?this-is-not-a-query" : "/dir/subdir/file?this-is-not-a-query", uri.LocalPath, "LocalPath"); Assert.AreEqual ("file://host/dir/subdir/file?this-is-not-a-query#but-this-is-a-fragment", uri.OriginalString, "OriginalString"); - Assert.AreEqual ("/dir/subdir/file%3Fthis-is-not-a-query", uri.PathAndQuery, "PathAndQuery"); Assert.AreEqual (-1, uri.Port, "Port"); - Assert.AreEqual (String.Empty, uri.Query, "Query"); Assert.AreEqual ("file", uri.Scheme, "Scheme"); Assert.AreEqual ("/", uri.Segments [0], "Segments [0]"); Assert.AreEqual ("dir/", uri.Segments [1], "Segments [1]"); Assert.AreEqual ("subdir/", uri.Segments [2], "Segments [2]"); - Assert.AreEqual ("file%3Fthis-is-not-a-query", uri.Segments [3], "Segments [3]"); Assert.IsFalse (uri.UserEscaped, "UserEscaped"); Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo"); // special characters - uri = new Uri ("file://host/<>%\"{}|\\^`;/?:@&=+$,[]#abc"); - Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special"); + uri = new Uri ("file://host/<>%\"{}|\\^`;/:@&=+$,[]?#abc"); + if (IriParsing) + Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/:@&=+$,[]", uri.AbsolutePath, "Special"); + else + Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/:@&=+$,%5B%5D%3F", uri.AbsolutePath, "Special"); } [Test] @@ -901,22 +950,37 @@ public void IPv6SafeDnsName () { Uri uri = new Uri ("http://[1:2:3:4:5:6:7:8]"); Assert.AreEqual (UriHostNameType.IPv6, uri.HostNameType, "1.HostNameType"); - Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", uri.Authority, "1.Authority"); - Assert.AreEqual ("0001:0002:0003:0004:0005:0006:0007:0008", uri.DnsSafeHost, "1.DnsSafeHost"); - Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", uri.Host, "1.Host"); + if (IriParsing) { + Assert.AreEqual ("[1:2:3:4:5:6:7:8]", uri.Authority, "1.Authority"); + Assert.AreEqual ("1:2:3:4:5:6:7:8", uri.DnsSafeHost, "1.DnsSafeHost"); + Assert.AreEqual ("[1:2:3:4:5:6:7:8]", uri.Host, "1.Host"); + } else { + Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", uri.Authority, "1.Authority"); + Assert.AreEqual ("0001:0002:0003:0004:0005:0006:0007:0008", uri.DnsSafeHost, "1.DnsSafeHost"); + Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", uri.Host, "1.Host"); + } uri = new Uri ("http://[fe80::200:39ff:fe36:1a2d%4]/temp/example.htm"); Assert.AreEqual (UriHostNameType.IPv6, uri.HostNameType, "1.HostNameType"); - Assert.AreEqual ("[FE80:0000:0000:0000:0200:39FF:FE36:1A2D]", uri.Authority, "2.Authority"); - Assert.AreEqual ("FE80:0000:0000:0000:0200:39FF:FE36:1A2D%4", uri.DnsSafeHost, "2.DnsSafeHost"); - Assert.AreEqual ("[FE80:0000:0000:0000:0200:39FF:FE36:1A2D]", uri.Host, "2.Host"); + if (IriParsing) { + Assert.AreEqual ("[fe80::200:39ff:fe36:1a2d]", uri.Authority, "2.Authority"); + Assert.AreEqual ("fe80::200:39ff:fe36:1a2d%4", uri.DnsSafeHost, "2.DnsSafeHost"); + Assert.AreEqual ("[fe80::200:39ff:fe36:1a2d]", uri.Host, "2.Host"); + } else { + Assert.AreEqual ("[FE80:0000:0000:0000:0200:39FF:FE36:1A2D]", uri.Authority, "2.Authority"); + Assert.AreEqual ("FE80:0000:0000:0000:0200:39FF:FE36:1A2D%4", uri.DnsSafeHost, "2.DnsSafeHost"); + Assert.AreEqual ("[FE80:0000:0000:0000:0200:39FF:FE36:1A2D]", uri.Host, "2.Host"); + } } [Test] public void RelativeEscapes () { Uri uri = new Uri ("%2e%2e/dir/%2e%2e/subdir/file?query#fragment", UriKind.Relative); - Assert.AreEqual ("%2e%2e/dir/%2e%2e/subdir/file?query#fragment", uri.ToString (), "1.ToString"); + if (IriParsing) + Assert.AreEqual ("../dir/../subdir/file?query#fragment", uri.ToString (), "1.ToString"); + else + Assert.AreEqual ("%2e%2e/dir/%2e%2e/subdir/file?query#fragment", uri.ToString (), "1.ToString"); } [Test] @@ -963,26 +1027,38 @@ public void EmptyUserInfo () public void Fragment_SpecialCharacters () { Uri uri = new Uri ("http://host/dir/file#fragment <>%\"{}|\\^`;/?:@&=+$,[]#second"); - Assert.AreEqual ("#fragment%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,%5B%5D%23second", uri.Fragment, "Fragment"); Assert.AreEqual ("http://host/dir/file#fragment <>%25\"{}|\\^`;/?:@&=+$,[]%23second", uri.ToString (), "ToString"); + if (IriParsing) + Assert.AreEqual ("#fragment%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,[]#second", uri.Fragment, "Fragment"); + else + Assert.AreEqual ("#fragment%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,%5B%5D%23second", uri.Fragment, "Fragment"); } [Test] public void Query_SpecialCharacters () { Uri uri = new Uri ("http://host/dir/file?query <>%\"{}|\\^`;/?:@&=+$,[]"); - Assert.AreEqual ("?query%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,%5B%5D", uri.Query, "Query"); Assert.AreEqual ("http://host/dir/file?query <>%25\"{}|\\^`;/?:@&=+$,[]", uri.ToString (), "ToString"); + if (IriParsing) + Assert.AreEqual ("?query%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,[]", uri.Query, "Query"); + else + Assert.AreEqual ("?query%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,%5B%5D", uri.Query, "Query"); } [Test] public void OriginalPathEscaped () { Uri uri = new Uri ("http://www.mono-project.com/%41/%42/%43", UriKind.Absolute); - Assert.AreEqual ("http://www.mono-project.com/%41/%42/%43", uri.AbsoluteUri, "AbsoluteUri"); - Assert.AreEqual ("/%41/%42/%43", uri.AbsolutePath, "AbsolutePath"); Assert.AreEqual ("/A/B/C", uri.LocalPath, "LocalPath"); - Assert.AreEqual ("http://www.mono-project.com/%41/%42/%43", uri.GetLeftPart (UriPartial.Path), "GetLeftPart(Path)"); + if (IriParsing) { + Assert.AreEqual ("http://www.mono-project.com/A/B/C", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual ("/A/B/C", uri.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("http://www.mono-project.com/A/B/C", uri.GetLeftPart (UriPartial.Path), "GetLeftPart(Path)"); + } else { + Assert.AreEqual ("http://www.mono-project.com/%41/%42/%43", uri.AbsoluteUri, "AbsoluteUri"); + Assert.AreEqual ("/%41/%42/%43", uri.AbsolutePath, "AbsolutePath"); + Assert.AreEqual ("http://www.mono-project.com/%41/%42/%43", uri.GetLeftPart (UriPartial.Path), "GetLeftPart(Path)"); + } } [Test] @@ -1037,5 +1113,5 @@ public void NonAsciiHost () Assert.AreEqual ("ftp", uri.Scheme, "Scheme"); Assert.AreEqual ("/", uri.Segments [0], "Segments [0]"); } - } -} + } +} diff --git a/mcs/class/System/mobile_System.dll.sources b/mcs/class/System/mobile_System.dll.sources index a26cf769906..b8a2698a10d 100644 --- a/mcs/class/System/mobile_System.dll.sources +++ b/mcs/class/System/mobile_System.dll.sources @@ -680,6 +680,7 @@ System/UriBuilder.cs System/UriComponents.cs System/UriFormat.cs System/UriFormatException.cs +System/UriHelper.cs System/UriHostNameType.cs System/UriIdnScope.cs System/UriKind.cs diff --git a/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs b/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs index 8e02384f58f..d6586ab4d5e 100644 --- a/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs +++ b/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs @@ -165,7 +165,7 @@ void LoadRelationships (Dictionary relationships, S if (node.Attributes["TargetMode"] != null) mode = (TargetMode) Enum.Parse (typeof(TargetMode), node.Attributes ["TargetMode"].Value); - CreateRelationship (new Uri (node.Attributes["Target"].Value.ToString(), UriKind.Relative), + CreateRelationship (new Uri (node.Attributes["Target"].Value.ToString(), UriKind.RelativeOrAbsolute), mode, node.Attributes["Type"].Value.ToString (), node.Attributes["Id"].Value.ToString (), diff --git a/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs b/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs index a0f2aa67669..b9184aac055 100644 --- a/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs +++ b/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs @@ -257,7 +257,14 @@ internal override void WriteTo(XmlTextWriter writer) if (ContentType != null) coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "contentType", NSPackageProperties)).InnerXml = ContentType; if (Created.HasValue) - coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "created", NSDcTerms)).InnerXml = Created.Value.ToString (); + { + XmlAttribute att = doc.CreateAttribute ("xsi", "type", NSXsi); + att.Value = "dcterms:W3CDTF"; + + XmlNode created = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "created", NSDcTerms)); + created.Attributes.Append (att); + created.InnerXml = Created.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z"; + } if (Creator != null) coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dc", "creator", NSDc)).InnerXml = Creator; if (Description != null) @@ -271,7 +278,11 @@ internal override void WriteTo(XmlTextWriter writer) if (LastModifiedBy != null) coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastModifiedBy", NSPackageProperties)).InnerXml = LastModifiedBy; if (LastPrinted.HasValue) - coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastPrinted", NSPackageProperties)).InnerXml = LastPrinted.Value.ToString (); + { + XmlNode lastPrinted = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastPrinted", NSPackageProperties)); + + lastPrinted.InnerXml = LastPrinted.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z"; + } if (Revision != null) coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "revision", NSPackageProperties)).InnerXml = Revision; if (Subject != null) @@ -288,7 +299,7 @@ internal override void WriteTo(XmlTextWriter writer) XmlNode modified = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "modified", NSDcTerms)); modified.Attributes.Append (att); - modified.InnerXml = Modified.Value.ToString (); + modified.InnerXml = Modified.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z"; } doc.WriteContentTo (writer); diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile index e716ed1a060..f3126697a04 100644 --- a/mcs/class/corlib/Makefile +++ b/mcs/class/corlib/Makefile @@ -134,7 +134,7 @@ $(vtsdir)/$(PROFILE)_TestLib/%/Address.dll: $(vtsdir)/VersionTolerantSerializati @mkdir -p $(dir $@) $(CSCOMPILE) -target:library -r:$(corlib) -warn:0 -out:$@ $^ -$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll +$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(test_nunit_dep) $(CSCOMPILE) $(test_nunit_ref) -warn:0 -r:$(corlib) \ -r:$(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \ $(vtsdir)/BinarySerializationOverVersions.cs -out:$@ diff --git a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs index d19cc4cec7d..ea8984394b4 100644 --- a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs +++ b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs @@ -97,12 +97,13 @@ bool IProducerConsumerCollection.TryAdd (T item) public bool TryDequeue (out T result) { result = default (T); + Node oldNext = null; bool advanced = false; while (!advanced) { Node oldHead = head; Node oldTail = tail; - Node oldNext = oldHead.Next; + oldNext = oldHead.Next; if (oldHead == head) { // Empty case ? @@ -122,6 +123,8 @@ public bool TryDequeue (out T result) } } + oldNext.Value = default (T); + Interlocked.Decrement (ref count); return true; @@ -129,14 +132,24 @@ public bool TryDequeue (out T result) public bool TryPeek (out T result) { - Node first = head.Next; + result = default (T); + bool update = true; + + while (update) + { + Node oldHead = head; + Node oldNext = oldHead.Next; - if (first == null) { - result = default (T); - return false; - } + if (oldNext == null) { + result = default (T); + return false; + } - result = first.Value; + result = oldNext.Value; + + //check if head has been updated + update = head != oldHead; + } return true; } diff --git a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs index 74ee14d9a52..9fcc7475627 100644 --- a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs +++ b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs @@ -79,7 +79,7 @@ public class Dictionary : IDictionary, IDictionary, // to be ORed with HASH_FLAG before comparing it with the save hashcode. // "touchedSlots" and "emptySlot" manage the free space in the heap - const int INITIAL_SIZE = 10; + const int INITIAL_SIZE = 4; const float DEFAULT_LOAD_FACTOR = (90f / 100); const int NO_SLOT = -1; const int HASH_FLAG = -2147483648; @@ -233,22 +233,25 @@ public Dictionary (IDictionary dictionary) } public Dictionary (int capacity) + : this (capacity, null) { - Init (capacity, null); } public Dictionary (IDictionary dictionary, IEqualityComparer comparer) { if (dictionary == null) throw new ArgumentNullException ("dictionary"); - int capacity = dictionary.Count; - Init (capacity, comparer); + + Init (dictionary.Count, comparer); foreach (KeyValuePair entry in dictionary) this.Add (entry.Key, entry.Value); } public Dictionary (int capacity, IEqualityComparer comparer) { + if (capacity < 0) + throw new ArgumentOutOfRangeException ("capacity"); + Init (capacity, comparer); } @@ -257,22 +260,16 @@ protected Dictionary (SerializationInfo info, StreamingContext context) serialization_info = info; } - private void Init (int capacity, IEqualityComparer hcp) + void Init (int capacity, IEqualityComparer hcp) { - if (capacity < 0) - throw new ArgumentOutOfRangeException ("capacity"); - this.hcp = (hcp != null) ? hcp : EqualityComparer.Default; - if (capacity == 0) - capacity = INITIAL_SIZE; + this.hcp = hcp ?? EqualityComparer.Default; - /* Modify capacity so 'capacity' elements can be added without resizing */ - capacity = (int)(capacity / DEFAULT_LOAD_FACTOR) + 1; - + capacity = Math.Max (1, (int)(capacity / DEFAULT_LOAD_FACTOR)); InitArrays (capacity); - generation = 0; } - private void InitArrays (int size) { + void InitArrays (int size) + { table = new int [size]; linkSlots = new Link [size]; @@ -456,6 +453,9 @@ public IEqualityComparer Comparer { public void Clear () { + if (count == 0) + return; + count = 0; // clear the hash table Array.Clear (table, 0, table.Length); diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs index 578a7ab0576..64b5bf4bde5 100644 --- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs @@ -44,19 +44,17 @@ using System.Security.Permissions; using System.Diagnostics.SymbolStore; +#if !NET_4_5 +using TypeInfo = System.Type; +#endif + namespace System.Reflection.Emit { [ComVisible (true)] [ComDefaultInterface (typeof (_TypeBuilder))] [ClassInterface (ClassInterfaceType.None)] [StructLayout (LayoutKind.Sequential)] - public sealed class TypeBuilder : -#if NET_4_5 - TypeInfo -#else - Type -#endif - , _TypeBuilder + public sealed class TypeBuilder : TypeInfo, _TypeBuilder { #pragma warning disable 169 #region Sync with reflection.h @@ -82,7 +80,7 @@ public sealed class TypeBuilder : private IntPtr generic_container; private GenericTypeParameterBuilder[] generic_params; private RefEmitPermissionSet[] permissions; - private Type created; + private TypeInfo created; #endregion #pragma warning restore 169 @@ -727,7 +725,7 @@ public ConstructorBuilder DefineTypeInitializer() } [MethodImplAttribute(MethodImplOptions.InternalCall)] - private extern Type create_runtime_class (TypeBuilder tb); + private extern TypeInfo create_runtime_class (TypeBuilder tb); private bool is_nested_in (Type t) { @@ -753,8 +751,16 @@ private bool has_ctor_method () { return false; } + + public Type CreateType () + { + return CreateTypeInfo (); + } - public Type CreateType() +#if NET_4_5 + public +#endif + TypeInfo CreateTypeInfo () { /* handle nesting_type */ if (createTypeCalled) diff --git a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs index 243984706ce..e339f94955a 100644 --- a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs +++ b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs @@ -414,11 +414,9 @@ public static IntPtr GetHINSTANCE (Module m) #endif // !FULL_AOT_RUNTIME #if !FULL_AOT_RUNTIME + [MonoTODO ("SetErrorInfo")] public static int GetHRForException (Exception e) { - var errorInfo = new ManagedErrorInfo(e); - SetErrorInfo (0, errorInfo); - return e.hresult; } @@ -1316,308 +1314,25 @@ public static void WriteIntPtr([In, Out, MarshalAs(UnmanagedType.AsAny)] object throw new NotImplementedException (); } - private static Exception ConvertHrToException (int errorCode) - { - const int MSEE_E_APPDOMAINUNLOADED = unchecked ((int)0x80131014L); - const int COR_E_APPLICATION = unchecked ((int)0x80131600L); - const int E_INVALIDARG = unchecked ((int)0x80070057); - const int COR_E_ARGUMENTOUTOFRANGE = unchecked ((int)0x80131502L); - const int COR_E_ARITHMETIC = unchecked ((int)0x80070216); - const int COR_E_ARRAYTYPEMISMATCH = unchecked ((int)0x80131503L); - const int COR_E_BADIMAGEFORMAT = unchecked ((int)0x8007000BL); - const int ERROR_BAD_FORMAT = unchecked ((int)0x0B); - //const int COR_E_COMEMULATE_ERROR = unchecked ((int)?); - const int COR_E_CONTEXTMARSHAL = unchecked ((int)0x80131504L); - //const int COR_E_CORE = unchecked ((int)?); - const int NTE_FAIL = unchecked ((int)0x80090020L); - const int COR_E_DIRECTORYNOTFOUND = unchecked ((int)0x80070003L); - const int ERROR_PATH_NOT_FOUND = unchecked ((int)0x03); - const int COR_E_DIVIDEBYZERO = unchecked ((int)0x80020012L); - const int COR_E_DUPLICATEWAITOBJECT = unchecked ((int)0x80131529L); - const int COR_E_ENDOFSTREAM = unchecked ((int)0x80070026L); - const int COR_E_TYPELOAD = unchecked ((int)0x80131522L); - const int COR_E_EXCEPTION = unchecked ((int)0x80131500L); - const int COR_E_EXECUTIONENGINE = unchecked ((int)0x80131506L); - const int COR_E_FIELDACCESS = unchecked ((int)0x80131507L); - const int COR_E_FILENOTFOUND = unchecked ((int)0x80070002L); - const int ERROR_FILE_NOT_FOUND = unchecked ((int)0x02); - const int COR_E_FORMAT = unchecked ((int)0x80131537L); - const int COR_E_INDEXOUTOFRANGE = unchecked ((int)0x80131508L); - const int COR_E_INVALIDCAST = unchecked ((int)0x80004002L); - const int COR_E_INVALIDCOMOBJECT = unchecked ((int)0x80131527L); - const int COR_E_INVALIDFILTERCRITERIA = unchecked ((int)0x80131601L); - const int COR_E_INVALIDOLEVARIANTTYPE = unchecked ((int)0x80131531L); - const int COR_E_INVALIDOPERATION = unchecked ((int)0x80131509L); - const int COR_E_IO = unchecked ((int)0x80131620L); - const int COR_E_MEMBERACCESS = unchecked ((int)0x8013151AL); - const int COR_E_METHODACCESS = unchecked ((int)0x80131510L); - const int COR_E_MISSINGFIELD = unchecked ((int)0x80131511L); - const int COR_E_MISSINGMANIFESTRESOURCE = unchecked ((int)0x80131532L); - const int COR_E_MISSINGMEMBER = unchecked ((int)0x80131512L); - const int COR_E_MISSINGMETHOD = unchecked ((int)0x80131513L); - const int COR_E_MULTICASTNOTSUPPORTED = unchecked ((int)0x80131514L); - const int COR_E_NOTFINITENUMBER = unchecked ((int)0x80131528L); - const int E_NOTIMPL = unchecked ((int)0x80004001L); - const int COR_E_NOTSUPPORTED = unchecked ((int)0x80131515L); - const int COR_E_NULLREFERENCE = unchecked ((int)0x80004003L); - const int E_OUTOFMEMORY = unchecked ((int)0x8007000EL); - const int COR_E_OVERFLOW = unchecked ((int)0x80131516L); - const int COR_E_PATHTOOLONG = unchecked ((int)0x800700CEL); - const int ERROR_FILENAME_EXCED_RANGE = unchecked ((int)0xCE); - const int COR_E_RANK = unchecked ((int)0x80131517L); - const int COR_E_REFLECTIONTYPELOAD = unchecked ((int)0x80131602L); - const int COR_E_REMOTING = unchecked ((int)0x8013150BL); - const int COR_E_SAFEARRAYTYPEMISMATCH = unchecked ((int)0x80131533L); - const int COR_E_SECURITY = unchecked ((int)0x8013150AL); - const int COR_E_SERIALIZATION = unchecked ((int)0x8013150CL); - const int COR_E_STACKOVERFLOW = unchecked ((int)0x800703E9L); - const int ERROR_STACK_OVERFLOW = unchecked ((int)0x03E9); - const int COR_E_SYNCHRONIZATIONLOCK = unchecked ((int)0x80131518L); - const int COR_E_SYSTEM = unchecked ((int)0x80131501L); - const int COR_E_TARGET = unchecked ((int)0x80131603L); - const int COR_E_TARGETINVOCATION = unchecked ((int)0x80131604L); - const int COR_E_TARGETPARAMCOUNT = unchecked ((int)0x8002000EL); - const int COR_E_THREADABORTED = unchecked ((int)0x80131530L); - const int COR_E_THREADINTERRUPTED = unchecked ((int)0x80131519L); - const int COR_E_THREADSTATE = unchecked ((int)0x80131520L); - const int COR_E_THREADSTOP = unchecked ((int)0x80131521L); - const int COR_E_TYPEINITIALIZATION = unchecked ((int)0x80131534L); - const int COR_E_VERIFICATION = unchecked ((int)0x8013150DL); - //const int COR_E_WEAKREFERENCE = unchecked ((int)?); - //const int COR_E_VTABLECALLSNOTSUPPORTED = unchecked ((int)); - - switch (errorCode) { - case MSEE_E_APPDOMAINUNLOADED: - return new AppDomainUnloadedException (); - case COR_E_APPLICATION: - return new ApplicationException (); - case E_INVALIDARG: - return new ArgumentException (); - case COR_E_ARGUMENTOUTOFRANGE: - return new ArgumentOutOfRangeException (); - case COR_E_ARITHMETIC: - return new ArithmeticException (); - case COR_E_ARRAYTYPEMISMATCH: - return new ArrayTypeMismatchException (); - case COR_E_BADIMAGEFORMAT: - case ERROR_BAD_FORMAT: - return new BadImageFormatException (); -// case COR_E_COMEMULATE_ERROR: -// return new COMEmulateException (); - case COR_E_CONTEXTMARSHAL: - return new ContextMarshalException (); -// case COR_E_CORE: -// return new CoreException (); - case NTE_FAIL: - return new System.Security.Cryptography.CryptographicException (); - case COR_E_DIRECTORYNOTFOUND: - case ERROR_PATH_NOT_FOUND: - return new System.IO.DirectoryNotFoundException (); - case COR_E_DIVIDEBYZERO: - return new DivideByZeroException (); - case COR_E_DUPLICATEWAITOBJECT: - return new DuplicateWaitObjectException (); - case COR_E_ENDOFSTREAM: - return new System.IO.EndOfStreamException (); - case COR_E_EXCEPTION: - return new Exception (); - case COR_E_EXECUTIONENGINE: - return new ExecutionEngineException (); - case COR_E_FIELDACCESS: - return new FieldAccessException (); - case COR_E_FILENOTFOUND: - case ERROR_FILE_NOT_FOUND: - return new System.IO.FileNotFoundException (); - case COR_E_FORMAT: - return new FormatException (); - case COR_E_INDEXOUTOFRANGE: - return new IndexOutOfRangeException (); - case COR_E_INVALIDCAST: - // E_NOINTERFACE has same value as COR_E_INVALIDCAST - return new InvalidCastException (); - case COR_E_INVALIDCOMOBJECT: - return new InvalidComObjectException (); - case COR_E_INVALIDFILTERCRITERIA: - return new InvalidFilterCriteriaException (); - case COR_E_INVALIDOLEVARIANTTYPE: - return new InvalidOleVariantTypeException (); - case COR_E_INVALIDOPERATION: - return new InvalidOperationException (); - case COR_E_IO: - return new System.IO.IOException (); - case COR_E_MEMBERACCESS: - return new MemberAccessException (); - case COR_E_METHODACCESS: - return new MethodAccessException (); - case COR_E_MISSINGFIELD: - return new MissingFieldException (); - case COR_E_MISSINGMANIFESTRESOURCE: - return new System.Resources.MissingManifestResourceException (); - case COR_E_MISSINGMEMBER: - return new MissingMemberException (); - case COR_E_MISSINGMETHOD: - return new MissingMethodException (); - case COR_E_MULTICASTNOTSUPPORTED: - return new MulticastNotSupportedException (); - case COR_E_NOTFINITENUMBER: - return new NotFiniteNumberException (); - case E_NOTIMPL: - return new NotImplementedException (); - case COR_E_NOTSUPPORTED: - return new NotSupportedException (); - case COR_E_NULLREFERENCE: - // E_POINTER has the same value as COR_E_NULLREFERENCE - return new NullReferenceException (); - case E_OUTOFMEMORY: - // COR_E_OUTOFMEMORY has the same value as E_OUTOFMEMORY - return new OutOfMemoryException (); - case COR_E_OVERFLOW: - return new OverflowException (); - case COR_E_PATHTOOLONG: - case ERROR_FILENAME_EXCED_RANGE: - return new System.IO.PathTooLongException (); - case COR_E_RANK: - return new RankException (); - case COR_E_REFLECTIONTYPELOAD: - return new System.Reflection.ReflectionTypeLoadException (new Type[] { }, new Exception[] { }); - case COR_E_REMOTING: - return new System.Runtime.Remoting.RemotingException (); - case COR_E_SAFEARRAYTYPEMISMATCH: - return new SafeArrayTypeMismatchException (); - case COR_E_SECURITY: - return new SecurityException (); - case COR_E_SERIALIZATION: - return new System.Runtime.Serialization.SerializationException (); - case COR_E_STACKOVERFLOW: - case ERROR_STACK_OVERFLOW: - return new StackOverflowException (); - case COR_E_SYNCHRONIZATIONLOCK: - return new SynchronizationLockException (); - case COR_E_SYSTEM: - return new SystemException (); - case COR_E_TARGET: - return new TargetException (); - case COR_E_TARGETINVOCATION: - return new System.Reflection.TargetInvocationException (null); - case COR_E_TARGETPARAMCOUNT: - return new TargetParameterCountException (); -// case COR_E_THREADABORTED: -// ThreadAbortException c'tor is inaccessible -// return new System.Threading.ThreadAbortException (); - case COR_E_THREADINTERRUPTED: - return new ThreadInterruptedException (); - case COR_E_THREADSTATE: - return new ThreadStateException (); -// case COR_E_THREADSTOP: -// ThreadStopException does not exist -// return new System.Threading.ThreadStopException (); - case COR_E_TYPELOAD: - return new TypeLoadException (); - // MSDN lists COR_E_TYPELOAD twice with different exceptions. - // return new EntryPointNotFoundException (); - case COR_E_TYPEINITIALIZATION: - return new TypeInitializationException("", null); - case COR_E_VERIFICATION: - return new VerificationException (); -// case COR_E_WEAKREFERENCE: -// return new WeakReferenceException (); -// case COR_E_VTABLECALLSNOTSUPPORTED: -// return new VTableCallsNotSupportedException (); - } - if (errorCode < 0) - return new COMException ("", errorCode); - return null; - } - - [DllImport ("oleaut32.dll", CharSet=CharSet.Unicode, EntryPoint = "SetErrorInfo")] - static extern int _SetErrorInfo (int dwReserved, - [MarshalAs(UnmanagedType.Interface)] IErrorInfo pIErrorInfo); - - [DllImport ("oleaut32.dll", CharSet=CharSet.Unicode, EntryPoint = "GetErrorInfo")] - static extern int _GetErrorInfo (int dwReserved, - [MarshalAs(UnmanagedType.Interface)] out IErrorInfo ppIErrorInfo); - - static bool SetErrorInfoNotAvailable; - static bool GetErrorInfoNotAvailable; - - internal static int SetErrorInfo (int dwReserved, IErrorInfo errorInfo) - { - int retVal = 0; - errorInfo = null; - - if (SetErrorInfoNotAvailable) - return -1; - - try { - retVal = _SetErrorInfo (dwReserved, errorInfo); - } - catch (Exception) { - // ignore any exception - probably there's no suitable SetErrorInfo - // method available. - SetErrorInfoNotAvailable = true; - } - return retVal; - } - - internal static int GetErrorInfo (int dwReserved, out IErrorInfo errorInfo) - { - int retVal = 0; - errorInfo = null; - - if (GetErrorInfoNotAvailable) - return -1; - - try { - retVal = _GetErrorInfo (dwReserved, out errorInfo); - } - catch (Exception) { - // ignore any exception - probably there's no suitable GetErrorInfo - // method available. - GetErrorInfoNotAvailable = true; - } - return retVal; - } - - public static Exception GetExceptionForHR (int errorCode) - { + public static Exception GetExceptionForHR (int errorCode) { return GetExceptionForHR (errorCode, IntPtr.Zero); } - public static Exception GetExceptionForHR (int errorCode, IntPtr errorInfoPtr) - { - IErrorInfo errorInfo = null; - if (errorInfoPtr != (IntPtr)(-1)) { - if (errorInfoPtr == IntPtr.Zero) { - if (GetErrorInfo (0, out errorInfo) != 0) { - errorInfo = null; - } - } else { - errorInfo = Marshal.GetObjectForIUnknown (errorInfoPtr) as IErrorInfo; - } - } - - if (errorInfo is ManagedErrorInfo && ((ManagedErrorInfo)errorInfo).Exception.hresult == errorCode) { - return ((ManagedErrorInfo)errorInfo).Exception; - } + public static Exception GetExceptionForHR (int errorCode, IntPtr errorInfo) { - Exception e = ConvertHrToException (errorCode); - if (errorInfo != null && e != null) { - uint helpContext; - errorInfo.GetHelpContext (out helpContext); - string str; - errorInfo.GetSource (out str); - e.Source = str; - errorInfo.GetDescription (out str); - e.SetMessage (str); - errorInfo.GetHelpFile (out str); - - if (helpContext == 0) { - e.HelpLink = str; - } else { - e.HelpLink = string.Format ("{0}#{1}", str, helpContext); - } + const int E_OUTOFMEMORY = unchecked ((int)0x8007000EL); + const int E_INVALIDARG = unchecked ((int)0X80070057); + + switch (errorCode) + { + case E_OUTOFMEMORY: + return new OutOfMemoryException (); + case E_INVALIDARG: + return new ArgumentException (); } - return e; + if (errorCode < 0) + return new COMException ("", errorCode); + return null; } #if !FULL_AOT_RUNTIME diff --git a/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs b/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs index ca849bd6ad7..e1fa6e36ecd 100644 --- a/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs +++ b/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs @@ -32,30 +32,58 @@ namespace System.Security.Claims { public static class ClaimTypes { + public const string Actor = "http://schemas.xmlsoap.org/ws/2009/09/identity/claims/actor"; + public const string Anonymous = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/anonymous"; public const string Authentication = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/authentication"; + public const string AuthenticationInstant = "http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant"; + + public const string AuthenticationMethod = "http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod"; + public const string AuthorizationDecision = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/authorizationdecision"; + public const string ClaimsType2005Namespace = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims"; + + public const string ClaimsType2009Namespace = "http://schemas.xmlsoap.org/ws/2009/09/identity/claims"; + + public const string ClaimsTypeNamespace = "http://schemas.microsoft.com/ws/2008/06/identity/claims"; + + public const string CookiePath = "http://schemas.microsoft.com/ws/2008/06/identity/claims/cookiepath"; + public const string Country = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country"; public const string DateOfBirth = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth"; + public const string DenyOnlyPrimaryGroup = "http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarygroup"; + + public const string DenyOnlyPrimarySid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarysid"; + public const string DenyOnlySid = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/denyonlysid"; public const string Dns = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dns"; - public const string Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"; + public const string Dsa = "http://schemas.microsoft.com/ws/2008/06/identity/claims/dsa"; + + public const string Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/email"; + + public const string Expiration = "http://schemas.microsoft.com/ws/2008/06/identity/claims/expiration"; + + public const string Expired = "http://schemas.microsoft.com/ws/2008/06/identity/claims/expired"; public const string Gender = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/gender"; public const string GivenName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"; + public const string GroupSid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid"; + public const string Hash = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/hash"; public const string HomePhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone"; + public const string IsPersistent = "http://schemas.microsoft.com/ws/2008/06/identity/claims/ispersistent"; + public const string Locality = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality"; public const string MobilePhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone"; @@ -70,8 +98,16 @@ public static class ClaimTypes public const string PPID = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier"; + public const string PrimaryGroupSid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/primarygroupsid"; + + public const string PrimarySid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid"; + + public const string Role = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role"; + public const string Rsa = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/rsa"; + public const string SerialNumber = "http://schemas.microsoft.com/ws/2008/06/identity/claims/serialnumber"; + public const string Sid = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid"; public const string Spn = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/spn"; @@ -90,9 +126,15 @@ public static class ClaimTypes public const string Uri = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/uri"; + public const string UserData = "http://schemas.microsoft.com/ws/2008/06/identity/claims/userdata"; + + public const string Version = "http://schemas.microsoft.com/ws/2008/06/identity/claims/version"; + public const string Webpage = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage"; + public const string WindowsAccountName = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname"; + public const string X500DistinguishedName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/x500distinguishedname"; } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs b/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs index 852e4f40085..24066a1da85 100644 --- a/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs +++ b/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs @@ -49,6 +49,10 @@ public ClaimsIdentity () : this (claims: null, authenticationType: null, nameType: null, roleType: null) { } + public ClaimsIdentity(IEnumerable claims) + : this (claims: claims, authenticationType: null, nameType: null, roleType: null) + { } + public ClaimsIdentity (string authenticationType) : this (claims: null, authenticationType: authenticationType, nameType: null, roleType: null) { } @@ -97,13 +101,16 @@ public ClaimsIdentity (IIdentity identity, IEnumerable claims, string aut foreach (var c in ci.Claims) this.claims.Add (c); - foreach (var c in claims) - this.claims.Add (c); Label = ci.Label; NameClaimType = ci.NameClaimType; RoleClaimType = ci.RoleClaimType; auth_type = ci.AuthenticationType; } + + if (claims != null) { + foreach (var c in claims) + this.claims.Add (c); + } } [MonoTODO] @@ -264,4 +271,4 @@ public virtual bool TryRemoveClaim (Claim claim) } } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs b/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs index d3827b8d1a2..cf1fe29e9d1 100644 --- a/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs +++ b/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs @@ -59,14 +59,16 @@ public ClaimsPrincipal (IEnumerable identities) if (identities == null) throw new ArgumentNullException ("identities"); - identities = new List (identities); + this.identities = new List (identities); } public ClaimsPrincipal (IIdentity identity) { if (identity == null) throw new ArgumentNullException ("identity"); - // TODO + + identities = new List (); + identities.Add (new ClaimsIdentity (identity)); } public ClaimsPrincipal (IPrincipal principal) @@ -187,4 +189,4 @@ public virtual bool IsInRole (string role) } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs b/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs index 3fe5c6aaaea..0e5339969af 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs @@ -38,7 +38,7 @@ namespace System.Security.Cryptography { [ComVisible (true)] public class CryptographicException : SystemException, _Exception { public CryptographicException () - : base (Locale.GetText ("Error occured during a cryptographic operation.")) + : base (Locale.GetText ("Error occurred during a cryptographic operation.")) { // default to CORSEC_E_CRYPTO // defined as EMAKEHR(0x1430) in CorError.h diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs b/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs index 7720e8e8512..3f5d52e92a3 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs @@ -38,7 +38,7 @@ namespace System.Security.Cryptography { public class CryptographicUnexpectedOperationException : CryptographicException { public CryptographicUnexpectedOperationException () - : base (Locale.GetText ("Unexpected error occured during a cryptographic operation.")) + : base (Locale.GetText ("Unexpected error occurred during a cryptographic operation.")) { // Default to CORSEC_E_CRYPTO_UNEX_OPER (CorError.h) HResult = unchecked ((int)0x80131431); diff --git a/mcs/class/corlib/System.Text/DecoderReplacementFallbackBuffer.cs b/mcs/class/corlib/System.Text/DecoderReplacementFallbackBuffer.cs index 38eff7631fd..3ecf21bc4f5 100644 --- a/mcs/class/corlib/System.Text/DecoderReplacementFallbackBuffer.cs +++ b/mcs/class/corlib/System.Text/DecoderReplacementFallbackBuffer.cs @@ -60,7 +60,7 @@ public override bool Fallback (byte [] bytesUnknown, int index) if (bytesUnknown == null) throw new ArgumentNullException ("bytesUnknown"); if (fallback_assigned && Remaining != 0) - throw new ArgumentException ("Reentrant Fallback method invocation occured. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten."); + throw new ArgumentException ("Reentrant Fallback method invocation occurred. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten."); if (index < 0 || bytesUnknown.Length < index) throw new ArgumentOutOfRangeException ("index"); fallback_assigned = true; diff --git a/mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs b/mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs index 7bf94251ac9..736537e68d8 100644 --- a/mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs +++ b/mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs @@ -69,7 +69,7 @@ public override bool Fallback (char charUnknownHigh, char charUnknownLow, int in private bool Fallback (int index) { if (fallback_assigned && Remaining != 0) - throw new ArgumentException ("Reentrant Fallback method invocation occured. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten."); + throw new ArgumentException ("Reentrant Fallback method invocation occurred. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten."); if (index < 0) throw new ArgumentOutOfRangeException ("index"); fallback_assigned = true; diff --git a/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs b/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs index 1c352ff7d3e..54fe237c793 100644 --- a/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs +++ b/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs @@ -26,14 +26,13 @@ #if NET_4_0 using System; -using System.Threading; namespace System.Threading { public struct CancellationTokenRegistration: IDisposable, IEquatable { - int id; - CancellationTokenSource source; + readonly int id; + readonly CancellationTokenSource source; internal CancellationTokenRegistration (int id, CancellationTokenSource source) { @@ -52,7 +51,7 @@ public void Dispose () #region IEquatable implementation public bool Equals (CancellationTokenRegistration other) { - return this.id == other.id && this.source == other.source; + return id == other.id && source == other.source; } public static bool operator== (CancellationTokenRegistration left, CancellationTokenRegistration right) @@ -73,7 +72,7 @@ public override int GetHashCode () public override bool Equals (object obj) { - return (obj is CancellationTokenRegistration) ? Equals ((CancellationTokenRegistration)obj) : false; + return (obj is CancellationTokenRegistration) && Equals ((CancellationTokenRegistration)obj); } } } diff --git a/mcs/class/corlib/System/AggregateException.cs b/mcs/class/corlib/System/AggregateException.cs index 067cd64d6f6..769ba549db1 100644 --- a/mcs/class/corlib/System/AggregateException.cs +++ b/mcs/class/corlib/System/AggregateException.cs @@ -40,7 +40,7 @@ namespace System public class AggregateException : Exception { List innerExceptions = new List (); - const string defaultMessage = "One or more errors occured"; + const string defaultMessage = "One or more errors occurred"; public AggregateException () : base (defaultMessage) { @@ -63,7 +63,7 @@ protected AggregateException (SerializationInfo info, StreamingContext context) } public AggregateException (params Exception[] innerExceptions) - : this (string.Empty, innerExceptions) + : this (defaultMessage, innerExceptions) { } diff --git a/mcs/class/corlib/System/AndroidPlatform.cs b/mcs/class/corlib/System/AndroidPlatform.cs index 5a2483dcc3e..75e3d6a855f 100644 --- a/mcs/class/corlib/System/AndroidPlatform.cs +++ b/mcs/class/corlib/System/AndroidPlatform.cs @@ -27,6 +27,7 @@ // #if MONODROID +using System.Reflection; using System.Threading; namespace System { @@ -35,20 +36,26 @@ internal class AndroidPlatform { static readonly Func getDefaultSyncContext; static readonly Func getDefaultTimeZone; + static readonly Func getCurrentSystemTimeZone; static AndroidPlatform () { + Type androidRuntime = Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true); + getDefaultSyncContext = (Func) Delegate.CreateDelegate (typeof(Func), - Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true) - .GetMethod ("GetDefaultSyncContext", + androidRuntime.GetMethod ("GetDefaultSyncContext", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic)); getDefaultTimeZone = (Func) Delegate.CreateDelegate (typeof(Func), - Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true) - .GetMethod ("GetDefaultTimeZone", + androidRuntime.GetMethod ("GetDefaultTimeZone", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic)); + + MethodInfo mi = androidRuntime.GetMethod ("GetCurrentSystemTimeZone", + System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic); + if (mi != null) + getCurrentSystemTimeZone = (Func) Delegate.CreateDelegate (typeof(Func), mi); } internal static SynchronizationContext GetDefaultSyncContext () @@ -60,6 +67,13 @@ internal static string GetDefaultTimeZone () { return getDefaultTimeZone (); } + + internal static TimeZone GetCurrentSystemTimeZone () + { + if (getCurrentSystemTimeZone == null) + return null; + return getCurrentSystemTimeZone (); + } } } #endif diff --git a/mcs/class/corlib/System/Array.cs b/mcs/class/corlib/System/Array.cs index b3272b16a96..519b8d1a09a 100644 --- a/mcs/class/corlib/System/Array.cs +++ b/mcs/class/corlib/System/Array.cs @@ -1480,9 +1480,9 @@ static bool QSortArrange (Array keys, Array items, int lo, ref object v0, int hi return false; } - private static void qsort (Array keys, Array items, int low0, int high0, IComparer comparer) + unsafe static void qsort (Array keys, Array items, int low0, int high0, IComparer comparer) { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; object key, hi, lo; @@ -1934,9 +1934,9 @@ static bool QSortArrange (T [] keys, int lo, int hi) where T : IComparable return false; } - private static void qsort (T[] keys, U[] items, int low0, int high0) where T : IComparable + unsafe static void qsort (T[] keys, U[] items, int low0, int high0) where T : IComparable { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; int sp = 1; @@ -2043,9 +2043,9 @@ private static void qsort (T[] keys, U[] items, int low0, int high0) where } // Specialized version for items==null - private static void qsort (T[] keys, int low0, int high0) where T : IComparable + unsafe static void qsort (T[] keys, int low0, int high0) where T : IComparable { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; int sp = 1; @@ -2232,9 +2232,9 @@ static bool QSortArrange (K [] keys, int lo, int hi, IComparer comparer) return false; } - private static void qsort (K [] keys, V [] items, int low0, int high0, IComparer comparer) + unsafe static void qsort (K [] keys, V [] items, int low0, int high0, IComparer comparer) { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; IComparable gcmp; @@ -2378,9 +2378,9 @@ private static void qsort (K [] keys, V [] items, int low0, int high0, ICo } // Specialized version for items==null - private static void qsort (K [] keys, int low0, int high0, IComparer comparer) + unsafe static void qsort (K [] keys, int low0, int high0, IComparer comparer) { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; IComparable gcmp; @@ -2535,9 +2535,9 @@ static bool QSortArrange (T [] array, int lo, int hi, Comparison compare) return false; } - private static void qsort (T [] array, int low0, int high0, Comparison compare) + unsafe static void qsort (T [] array, int low0, int high0, Comparison compare) { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; int sp = 1; diff --git a/mcs/class/corlib/System/DateTime.cs b/mcs/class/corlib/System/DateTime.cs index c3da055efc0..30bc6f8edf8 100644 --- a/mcs/class/corlib/System/DateTime.cs +++ b/mcs/class/corlib/System/DateTime.cs @@ -214,6 +214,10 @@ public struct DateTime : IFormattable, IConvertible, IComparable, ISerializable, "yyyy/MMMM", }; + private static readonly string[] ExoticAndNonStandardFormats = new string[] { + "ddMMMyyyy" + }; + private enum Which { Day, @@ -927,6 +931,9 @@ internal static bool CoreParse (string s, IFormatProvider provider, DateTimeStyl if (ParseExact (s, dfi.GetAllDateTimePatternsInternal (), dfi, styles, out result, false, ref longYear, setExceptionOnError, ref exception)) return true; + if (ParseExact (s, ExoticAndNonStandardFormats, dfi, styles, out result, false, ref longYear, setExceptionOnError, ref exception)) + return true; + if (!setExceptionOnError) return false; diff --git a/mcs/class/corlib/System/Delegate.cs b/mcs/class/corlib/System/Delegate.cs index 507153c421a..8b9ade4dd46 100644 --- a/mcs/class/corlib/System/Delegate.cs +++ b/mcs/class/corlib/System/Delegate.cs @@ -5,12 +5,11 @@ // Miguel de Icaza (miguel@ximian.com) // Daniel Stodden (stodden@in.tum.de) // Dietmar Maurer (dietmar@ximian.com) +// Marek Safar (marek.safar@gmail.com) // // (C) Ximian, Inc. http://www.ximian.com -// - -// // Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// Copyright 2014 Xamarin, Inc (http://www.xamarin.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -41,9 +40,11 @@ namespace System { /* Contains the rarely used fields of Delegate */ - class DelegateData { + sealed class DelegateData + { public Type target_type; public string method_name; + public bool curried_first_arg; } [ClassInterface (ClassInterfaceType.AutoDual)] @@ -230,6 +231,8 @@ static Delegate CreateDelegate (Type type, object firstArgument, MethodInfo meth return null; bool argsMatch; + DelegateData delegate_data = new DelegateData (); + if (target != null) { if (!method.IsStatic) { argsMatch = arg_type_match_this (target.GetType (), method.DeclaringType, true); @@ -238,7 +241,9 @@ static Delegate CreateDelegate (Type type, object firstArgument, MethodInfo meth } else { argsMatch = arg_type_match (target.GetType (), args [0].ParameterType); for (int i = 1; i < args.Length; i++) - argsMatch &= arg_type_match (delargs [i - 1].ParameterType, args [i].ParameterType); + argsMatch &= arg_type_match (delargs [i - 1].ParameterType, args [i].ParameterType); + + delegate_data.curried_first_arg = true; } } else { if (!method.IsStatic) { @@ -259,6 +264,8 @@ static Delegate CreateDelegate (Type type, object firstArgument, MethodInfo meth argsMatch = !(args [0].ParameterType.IsValueType || args [0].ParameterType.IsByRef) && allowClosed; for (int i = 0; i < delargs.Length; i++) argsMatch &= arg_type_match (delargs [i].ParameterType, args [i + 1].ParameterType); + + delegate_data.curried_first_arg = true; } else { argsMatch = true; for (int i = 0; i < args.Length; i++) @@ -276,6 +283,8 @@ static Delegate CreateDelegate (Type type, object firstArgument, MethodInfo meth Delegate d = CreateDelegate_internal (type, target, method, throwOnBindFailure); if (d != null) d.original_method_info = method; + if (delegate_data != null) + d.data = delegate_data; return d; } @@ -398,6 +407,21 @@ public object DynamicInvoke (params object[] args) return DynamicInvokeImpl (args); } + void InitializeDelegateData () + { + DelegateData delegate_data = new DelegateData (); + if (method_info.IsStatic) { + if (m_target != null) { + delegate_data.curried_first_arg = true; + } else { + MethodInfo invoke = GetType ().GetMethod ("Invoke"); + if (invoke.GetParametersCount () + 1 == method_info.GetParametersCount ()) + delegate_data.curried_first_arg = true; + } + } + this.data = delegate_data; + } + protected virtual object DynamicInvokeImpl (object[] args) { if (Method == null) { @@ -408,20 +432,34 @@ protected virtual object DynamicInvokeImpl (object[] args) method_info = m_target.GetType ().GetMethod (data.method_name, mtypes); } - if (Method.IsStatic && (args != null ? args.Length : 0) == Method.GetParametersCount () - 1) { + var target = m_target; + if (this.data == null) + InitializeDelegateData (); + + if (Method.IsStatic) { + // // The delegate is bound to m_target - if (args != null) { - object[] newArgs = new object [args.Length + 1]; - args.CopyTo (newArgs, 1); - newArgs [0] = m_target; - args = newArgs; - } else { - args = new object [] { m_target }; + // + if (data.curried_first_arg) { + if (args == null) { + args = new [] { target }; + } else { + Array.Resize (ref args, args.Length + 1); + Array.Copy (args, 0, args, 1, args.Length - 1); + args [0] = target; + } + + target = null; + } + } else { + if (m_target == null && args != null && args.Length > 0) { + target = args [0]; + Array.Copy (args, 1, args, 0, args.Length - 1); + Array.Resize (ref args, args.Length - 1); } - return Method.Invoke (null, args); } - return Method.Invoke (m_target, args); + return Method.Invoke (target, args); } public virtual object Clone () @@ -440,8 +478,13 @@ internal bool Compare (Delegate d) /* Uncommon case */ if (d.data != null && data != null) return (d.data.target_type == data.target_type && d.data.method_name == data.method_name); - else + else { + if (d.data != null) + return d.data.target_type == null; + if (data != null) + return data.target_type == null; return false; + } } return true; } diff --git a/mcs/class/corlib/System/DelegateSerializationHolder.cs b/mcs/class/corlib/System/DelegateSerializationHolder.cs index c36dbc7de7c..74d704422d2 100644 --- a/mcs/class/corlib/System/DelegateSerializationHolder.cs +++ b/mcs/class/corlib/System/DelegateSerializationHolder.cs @@ -46,7 +46,7 @@ class DelegateEntry { string type; string assembly; - public object target; + object target; string targetTypeAssembly; string targetTypeName; string methodName; @@ -64,15 +64,18 @@ public DelegateEntry (Delegate del, string targetLabel) methodName = del.Method.Name; } - public Delegate DeserializeDelegate (SerializationInfo info) + public Delegate DeserializeDelegate (SerializationInfo info, int index) { object realTarget = null; if (target != null) realTarget = info.GetValue (target.ToString(), typeof(object)); + var key = "method" + index; + var method = info.HasKey (key) ? (MethodInfo)info.GetValue (key, typeof (MethodInfo)) : null; + Assembly dasm = Assembly.Load (assembly); Type dt = dasm.GetType (type); - Delegate del; + if (realTarget != null) { #if !DISABLE_REMOTING if (RemotingServices.IsTransparentProxy (realTarget)) { @@ -86,15 +89,16 @@ public Delegate DeserializeDelegate (SerializationInfo info) throw new RemotingException ("Unexpected proxy type."); } #endif - del = Delegate.CreateDelegate (dt, realTarget, methodName); - } - else { - Assembly tasm = Assembly.Load (targetTypeAssembly); - Type tt = tasm.GetType (targetTypeName); - del = Delegate.CreateDelegate (dt, tt, methodName); + return method == null ? + Delegate.CreateDelegate (dt, realTarget, methodName) : + Delegate.CreateDelegate (dt, realTarget, method); } - return del; + if (method != null) + return Delegate.CreateDelegate (dt, realTarget, method); + + Type tt2 = Assembly.Load (targetTypeAssembly).GetType (targetTypeName); + return Delegate.CreateDelegate (dt, tt2, methodName); } } @@ -112,14 +116,14 @@ public Delegate DeserializeDelegate (SerializationInfo info) // Deserializes and combines the delegates if (count == 1) - _delegate = entryChain.DeserializeDelegate (info); + _delegate = entryChain.DeserializeDelegate (info, 0); else { Delegate[] delegates = new Delegate[count]; entry = entryChain; for (int n=0; n (string value, bool ignoreCase, out TEnum res result = default (TEnum); - if (value == null || value.Trim ().Length == 0) + if (value == null) + return false; + + value = value.Trim (); + if (value.Length == 0) return false; return Parse (tenum_type, value, ignoreCase, out result); diff --git a/mcs/class/corlib/System/Int32.cs b/mcs/class/corlib/System/Int32.cs index 981a2f01ffc..39ff76d15f8 100644 --- a/mcs/class/corlib/System/Int32.cs +++ b/mcs/class/corlib/System/Int32.cs @@ -31,6 +31,7 @@ using System.Globalization; using System.Threading; +using System.Runtime.CompilerServices; namespace System { @@ -77,12 +78,10 @@ public override int GetHashCode () public int CompareTo (int value) { - if (m_value == value) - return 0; - if (m_value > value) - return 1; - else - return -1; + return + m_value == value ? 0 : + m_value > value ? 1 : + -1; } public bool Equals (int obj) diff --git a/mcs/class/corlib/System/TimeZone.cs b/mcs/class/corlib/System/TimeZone.cs index 43c7181f8b8..cea224133e4 100644 --- a/mcs/class/corlib/System/TimeZone.cs +++ b/mcs/class/corlib/System/TimeZone.cs @@ -73,7 +73,11 @@ public static TimeZone CurrentTimeZone { lock (tz_lock) { if (tz == null || Math.Abs (now - timezone_check) > TimeSpan.TicksPerMinute) { - tz = new CurrentSystemTimeZone (now); +#if MONODROID + tz = AndroidPlatform.GetCurrentSystemTimeZone (); + if (tz == null) +#endif + tz = new CurrentSystemTimeZone (now); timezone_check = now; currentTimeZone = tz; diff --git a/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentQueueTests.cs b/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentQueueTests.cs index b0006440afa..91436a05b21 100644 --- a/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentQueueTests.cs +++ b/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentQueueTests.cs @@ -30,6 +30,7 @@ using System.Collections.Concurrent; using NUnit.Framework; +using MonoTests.System.Threading.Tasks; namespace MonoTests.System.Collections.Concurrent { @@ -115,6 +116,34 @@ public void StressDequeueTestCase () CollectionStressTestHelper.RemoveStressTest (new ConcurrentQueue (), CheckOrderingType.InOrder); } + [Test] + public void StressTryPeekTestCase () + { + ParallelTestHelper.Repeat (delegate { + var queue = new ConcurrentQueue (); + queue.Enqueue (new object()); + + const int threads = 10; + int threadCounter = 0; + bool success = true; + + ParallelTestHelper.ParallelStressTest (queue, (q) => { + int threadId = Interlocked.Increment (ref threadCounter); + object temp; + if (threadId < threads) + { + while (queue.TryPeek (out temp)) + if (temp == null) + success = false; + } else { + queue.TryDequeue (out temp); + } + }, threads); + + Assert.IsTrue (success, "TryPeek returned unexpected null value."); + }, 10); + } + [Test] public void CountTestCase() { @@ -215,6 +244,30 @@ public void ToExistingArray_Overflow () { queue.CopyTo (new int[3], 0); } + + static WeakReference CreateWeakReference (object obj) + { + return new WeakReference (obj); + } + + [Test] + // This depends on precise stack scanning + [Category ("NotWorking")] + public void TryDequeueReferenceTest () + { + var obj = new Object (); + var weakReference = CreateWeakReference(obj); + var queue = new ConcurrentQueue (); + + queue.Enqueue (obj); + queue.TryDequeue (out obj); + obj = null; + + GC.Collect (); + GC.WaitForPendingFinalizers (); + + Assert.IsFalse (weakReference.IsAlive); + } } } #endif diff --git a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs index ab281cb8178..eabe77e48e5 100644 --- a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs @@ -783,6 +783,51 @@ public void MethodToStringShouldPrintFullNameOfGenericStructs () var m = GetType ().GetMethod ("Bug12856"); Assert.AreEqual ("System.Nullable`1[System.Int32] Bug12856()", m.ToString (), "#1"); } + +#if !MONOTOUCH + class GenericClass + { + public void Method () + { + T lv = default(T); + Console.WriteLine(lv); + } + + public void Method2 (T a0, K a1) + { + T var0 = a0; + K var1 = a1; + Console.WriteLine (var0); + Console.WriteLine (var1); + } + } + + [Test] + public void TestLocalVariableTypes () + { + var typeofT = typeof (GenericClass<>).GetGenericArguments () [0]; + var typeofK = typeof (GenericClass<>).GetMethod ("Method2").GetGenericArguments () [0]; + + var type = typeof (GenericClass<>).GetMethod("Method").GetMethodBody().LocalVariables[0].LocalType; + Assert.AreEqual (typeofT, type); + Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType); + + type = typeof (GenericClass<>).GetMethod("Method2").GetMethodBody().LocalVariables[0].LocalType; + Assert.AreEqual (typeofT, type); + Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType); + + type = typeof (GenericClass<>).GetMethod("Method2").GetMethodBody().LocalVariables[1].LocalType; + Assert.AreEqual (typeofK, type); + Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType); + + type = typeof (GenericClass).GetMethod("Method2").GetMethodBody().LocalVariables[0].LocalType; + Assert.AreEqual (typeof (int), type); + + type = typeof (GenericClass).GetMethod("Method2").GetMethodBody().LocalVariables[1].LocalType; + Assert.AreEqual (typeofK, type); + Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType); + } +#endif } #if NET_2_0 diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs index 1b3fc898891..92d19fe367e 100644 --- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs @@ -196,9 +196,13 @@ public void Reachability () { if (GC.MaxGeneration == 0) /*Boehm doesn't handle ephemerons */ Assert.Ignore ("Not working on Boehm."); var cwt = new ConditionalWeakTable (); - List keepAlive; - List keys; - FillStuff (cwt, out keepAlive, out keys); + List keepAlive = null; + List keys = null; + Thread t = new Thread (delegate () { + FillStuff (cwt, out keepAlive, out keys); + }); + t.Start (); + t.Join (); GC.Collect (); diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs index a403d5287e2..5237e377e38 100644 --- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs @@ -44,14 +44,15 @@ public class TaskAwaiterTest class Scheduler : TaskScheduler { string name; + int ic, qc; public Scheduler (string name) { this.name = name; } - public int InlineCalls { get; set; } - public int QueueCalls { get; set; } + public int InlineCalls { get { return ic; } } + public int QueueCalls { get { return qc; } } protected override IEnumerable GetScheduledTasks () { @@ -60,7 +61,7 @@ protected override IEnumerable GetScheduledTasks () protected override void QueueTask (Task task) { - ++QueueCalls; + Interlocked.Increment (ref qc); ThreadPool.QueueUserWorkItem (o => { TryExecuteTask (task); }); @@ -68,7 +69,7 @@ protected override void QueueTask (Task task) protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued) { - ++InlineCalls; + Interlocked.Increment (ref ic); return false; } } @@ -102,6 +103,7 @@ public override void Send (SendOrPostCallback d, object state) string progress; SynchronizationContext sc; + ManualResetEvent mre; [SetUp] public void Setup () @@ -176,7 +178,7 @@ public void CustomScheduler () Assert.IsTrue (t.Wait (3000), "#0"); Assert.AreEqual (0, t.Result, "#1"); Assert.AreEqual (0, b.InlineCalls, "#2b"); - Assert.AreEqual (2, a.QueueCalls, "#3a"); + Assert.IsTrue (a.QueueCalls == 1 || a.QueueCalls == 2, "#3a"); Assert.AreEqual (1, b.QueueCalls, "#3b"); } @@ -270,12 +272,15 @@ async Task Wait (SynchronizationContext ctx) [Test] public void CompletionOnDifferentCustomSynchronizationContext () { + mre = new ManualResetEvent (false); progress = ""; var syncContext = new SingleThreadSynchronizationContext (); SynchronizationContext.SetSynchronizationContext (syncContext); syncContext.Post (delegate { - Go2 (syncContext); + Task t = new Task (delegate() { }); + Go2 (syncContext, t); + t.Start (); }, null); // Custom message loop @@ -286,21 +291,30 @@ public void CompletionOnDifferentCustomSynchronizationContext () Thread.Sleep (0); } - Assert.AreEqual ("132", progress); + Assert.AreEqual ("13xa2", progress); } - async void Go2 (SynchronizationContext ctx) + async void Go2 (SynchronizationContext ctx, Task t) { - await Wait2 (ctx); + await Wait2 (ctx, t); - progress += "2"; + progress += "a"; + + if (mre.WaitOne (5000)) + progress += "2"; + else + progress += "b"; } - async Task Wait2 (SynchronizationContext ctx) + async Task Wait2 (SynchronizationContext ctx, Task t) { - await Task.Delay (10); // Force block suspend/return + await t; // Force block suspend/return - ctx.Post (l => progress += "3", null); + ctx.Post (l => { + progress += "3"; + mre.Set (); + progress += "x"; + }, null); progress += "1"; diff --git a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs index da8bb8ee432..90b2d3f73fc 100644 --- a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs @@ -18,6 +18,7 @@ using System.Runtime.Remoting.Messaging; using System.Collections; using NUnit.Framework; +using System.Text; namespace MonoTests.System.Runtime.Serialization { @@ -41,6 +42,41 @@ public void TestSerialization () RemotingServices.Disconnect (mt); } +#if !MONOTOUCH + [Test] + public void DelegateSerializationTest () + { + var a = new DelegateSerialization (); + a.E += HandleE1; + + var d2 = Delegate.CreateDelegate (typeof(Func), "val", typeof(SerializationTest).GetMethod ("HandleE2")); + a.E += (Func) d2; + + using (var ms = new MemoryStream ()) { + var fmt = new BinaryFormatter (); + fmt.Serialize (ms, a); + ms.Flush (); + + ms.Seek (0, SeekOrigin.Begin); + var a2 = (DelegateSerialization) fmt.Deserialize (ms); + a2.Test (); + } + } +#endif + + static int HandleE1 (StringBuilder arg) + { + arg.Append ("E1"); + return 1; + } + + public static int HandleE2 (object o, StringBuilder arg) + { + arg.Append ("E2|"); + arg.Append (o); + return 2; + } + void WriteData () { StreamingContext context = new StreamingContext (StreamingContextStates.Other); @@ -814,5 +850,17 @@ public class BinderTester_B public int x; } + [Serializable] + class DelegateSerialization + { + public event Func E; + + public void Test () + { + var sb = new StringBuilder (); + Assert.AreEqual (2, E (sb), "#1"); + Assert.AreEqual ("E1E2|val", sb.ToString (), "#2"); + } + } } diff --git a/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs b/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs index 9aa0d46510b..df382b17008 100644 --- a/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs +++ b/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs @@ -276,7 +276,7 @@ public void WaitAll_ManyTasks () tasks[i] = Task.Factory.StartNew (delegate { Thread.Sleep (0); }); } - Assert.IsTrue (Task.WaitAll (tasks, 2000)); + Assert.IsTrue (Task.WaitAll (tasks, 5000)); } } @@ -904,7 +904,11 @@ public void UnobservedExceptionOnFinalizerThreadTest () args.SetObserved (); }; var inner = new ApplicationException (); - Task.Factory.StartNew (() => { throw inner; }); + Thread t = new Thread (delegate () { + Task.Factory.StartNew (() => { Console.WriteLine ("HIT!"); throw inner; }); + }); + t.Start (); + t.Join (); Thread.Sleep (1000); GC.Collect (); Thread.Sleep (1000); @@ -1928,7 +1932,7 @@ public void LazyCancelationTest () } [Test] - [Category("MobileNotWorking")] + [Category("NotWorking")] public void TaskContinuationChainLeak() { // Start cranking out tasks, starting each new task upon completion of and from inside the prior task. diff --git a/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs b/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs index d8c1299efe2..5bf805aae0b 100644 --- a/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs +++ b/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs @@ -90,9 +90,9 @@ public void CancelAfter_Disposed () int called = 0; var cts = new CancellationTokenSource (); cts.Token.Register (() => called++); - cts.CancelAfter (20); + cts.CancelAfter (50); cts.Dispose (); - Thread.Sleep (50); + Thread.Sleep (100); Assert.AreEqual (0, called, "#1"); } diff --git a/mcs/class/corlib/Test/System/DateTimeTest.cs b/mcs/class/corlib/Test/System/DateTimeTest.cs index 0e7b294f3b9..343e723be82 100644 --- a/mcs/class/corlib/Test/System/DateTimeTest.cs +++ b/mcs/class/corlib/Test/System/DateTimeTest.cs @@ -1216,6 +1216,15 @@ public void Parse_Bug71289b () DateTime.Parse ("Sat,,, 01,,, Oct,,, ,,,1994 03:00:00", CultureInfo.InvariantCulture); } + [Test] + public void TryParse_Bug11630 () + { + DateTime parsed; + + Assert.IsTrue (DateTime.TryParse ("10Feb2013", out parsed)); + Assert.AreEqual (new DateTime (2013, 2, 10), parsed); + } + [Test] [ExpectedException (typeof (FormatException))] public void Parse_CommaAfterHours () diff --git a/mcs/class/corlib/Test/System/DelegateTest.cs b/mcs/class/corlib/Test/System/DelegateTest.cs index ddfc099b73d..e45efdbd1a3 100644 --- a/mcs/class/corlib/Test/System/DelegateTest.cs +++ b/mcs/class/corlib/Test/System/DelegateTest.cs @@ -1116,20 +1116,68 @@ public void CreateDelegateOpenOnly () typeof (Action), this.GetType ().GetMethod ("Banga")); } -#if !MONOTOUCH + [Test] // #664205 - public void DynamicInvokeNullTarget () + public void DynamicInvokeClosedStatic () { - var method = new DynamicMethod ("test", typeof (int), new [] { typeof (object) }, true); - var il = method.GetILGenerator (); - il.Emit (OpCodes.Ldc_I4, 42); - il.Emit (OpCodes.Ret); + var d1 = Delegate.CreateDelegate (typeof(Func), null, typeof(DelegateTest).GetMethod ("DynamicInvokeClosedStaticDelegate_CB")); + Assert.AreEqual (1, d1.DynamicInvoke (), "#1"); + + var d2 = Delegate.CreateDelegate (typeof(Func), "arg", typeof(DelegateTest).GetMethod ("DynamicInvokeClosedStaticDelegate_CB")); + Assert.AreEqual (2, d2.DynamicInvoke (), "#2"); + } + + public static int DynamicInvokeClosedStaticDelegate_CB (string instance) + { + switch (instance) { + case null: + return 1; + case "arg": + return 2; + default: + Assert.Fail (); + return -1; + } + } - var @delegate = method.CreateDelegate (typeof (Func), null); + [Test] + public void DynamicInvokeOpenInstanceDelegate () + { + var d1 = Delegate.CreateDelegate (typeof (Func), typeof(DelegateTest).GetMethod ("DynamicInvokeOpenInstanceDelegate_CB")); + Assert.AreEqual (5, d1.DynamicInvoke (new DelegateTest ()), "#1"); - Assert.AreEqual (42, (int) @delegate.DynamicInvoke ()); + var d3 = (Func) d1; + Assert.AreEqual (5, d3 (null), "#2"); } -#endif + + public int DynamicInvokeOpenInstanceDelegate_CB () + { + return 5; + } + + [Test] + public void DynamicInvoke_InvalidArguments () + { + Delegate d = new Func (TestMethod); + + try { + d.DynamicInvoke (null); + Assert.Fail ("#1"); + } catch (TargetParameterCountException) { + } + + try { + d.DynamicInvoke (new object [0]); + Assert.Fail ("#2"); + } catch (TargetParameterCountException) { + } + } + + public static int TestMethod (int i) + { + throw new NotSupportedException (); + } + #endif public static void CreateDelegateOfStaticMethodBoundToNull_Helper (object[] args) {} @@ -1329,17 +1377,56 @@ public void DelegateWithValueTypeArguments () } catch (ArgumentException) {} } - private static Func Int32D = (x, y) => (x & y) == y; - [Test] public void EnumBaseTypeConversion () { + Func dm = Int32D2; var d = - Delegate.CreateDelegate(typeof (Func), Int32D.Method) as + Delegate.CreateDelegate(typeof (Func), dm.Method) as Func; Assert.IsTrue (d (0, 0)); } +#if !MONOTOUCH + public static void DynInvokeWithClosedFirstArg (object a, object b) + { + } + + [Test] + public void DynamicInvokeClosedOverNullDelegate () { + var dm = new DynamicMethod ("test", typeof (Delegate), null); + var il = dm.GetILGenerator (); + il.Emit (OpCodes.Ldnull); + il.Emit (OpCodes.Ldftn, GetType ().GetMethod ("DynInvokeWithClosedFirstArg")); + il.Emit (OpCodes.Newobj, typeof (Action).GetConstructors ()[0]); + il.Emit (OpCodes.Ret); + + var f = (Func ) dm.CreateDelegate (typeof (Func )); + Action ac = (Action)f(); + ac.DynamicInvoke (new object[] { "oi" }); + ac.DynamicInvoke (new object[] { null }); + } + + [Test] + public void DynamicInvokeFirstArgBoundDelegate () { + var dm = new DynamicMethod ("test", typeof (Delegate), null); + var il = dm.GetILGenerator (); + il.Emit (OpCodes.Ldstr, "test"); + il.Emit (OpCodes.Ldftn, GetType ().GetMethod ("DynInvokeWithClosedFirstArg")); + il.Emit (OpCodes.Newobj, typeof (Action).GetConstructors ()[0]); + il.Emit (OpCodes.Ret); + + var f = (Func ) dm.CreateDelegate (typeof (Func )); + Action ac = (Action)f(); + ac.DynamicInvoke (new object[] { "oi" }); + ac.DynamicInvoke (new object[] { null }); + } +#endif + + static bool Int32D2 (int x, int y) + { + return (x & y) == y; + } + public class B { public virtual string retarg3 (string s) { diff --git a/mcs/class/corlib/Test/System/EnumTest.cs b/mcs/class/corlib/Test/System/EnumTest.cs index 4425baaaf85..8b6823ac101 100644 --- a/mcs/class/corlib/Test/System/EnumTest.cs +++ b/mcs/class/corlib/Test/System/EnumTest.cs @@ -740,6 +740,10 @@ public void TryParse () success = Enum.TryParse ("is", true, out result); Assert.AreEqual (true, success, "#D1"); Assert.AreEqual (TestingEnum.Is, result, "#D2"); + + success = Enum.TryParse (" Is ", out result); + Assert.AreEqual (true, success, "#E1"); + Assert.AreEqual (TestingEnum.Is, result, "#E2"); } #endif diff --git a/mcs/class/corlib/Test/System/LazyTest.cs b/mcs/class/corlib/Test/System/LazyTest.cs index 01885f9767c..6fb77f4d0fe 100644 --- a/mcs/class/corlib/Test/System/LazyTest.cs +++ b/mcs/class/corlib/Test/System/LazyTest.cs @@ -273,6 +273,7 @@ public void Trivial_Lazy () { public void ConcurrentInitialization () { var init = new AutoResetEvent (false); + var e1_set = new AutoResetEvent (false); var lazy = new Lazy (() => { init.Set (); @@ -286,6 +287,7 @@ public void ConcurrentInitialization () string value = lazy.Value; } catch (Exception ex) { e1 = ex; + e1_set.Set (); } }); thread.Start (); @@ -306,8 +308,9 @@ public void ConcurrentInitialization () e3 = ex; } - Assert.AreSame (e1, e2, "#2"); - Assert.AreSame (e1, e3, "#3"); + Assert.IsTrue (e1_set.WaitOne (3000), "#2"); + Assert.AreSame (e1, e2, "#3"); + Assert.AreSame (e1, e3, "#4"); } } diff --git a/mcs/class/corlib/corlib.dll.sources b/mcs/class/corlib/corlib.dll.sources index 5cfb9aeb2ab..a5f1b7b0d48 100644 --- a/mcs/class/corlib/corlib.dll.sources +++ b/mcs/class/corlib/corlib.dll.sources @@ -809,7 +809,6 @@ System.Runtime.InteropServices/IDispatchImplAttribute.cs System.Runtime.InteropServices/IDispatchImplType.cs System.Runtime.InteropServices/IDLDESC.cs System.Runtime.InteropServices/IDLFLAG.cs -System.Runtime.InteropServices/IErrorInfo.cs System.Runtime.InteropServices/IMPLTYPEFLAGS.cs System.Runtime.InteropServices/INVOKEKIND.cs System.Runtime.InteropServices/IRegistrationServices.cs @@ -826,7 +825,6 @@ System.Runtime.InteropServices/InvalidOleVariantTypeException.cs System.Runtime.InteropServices/LCIDConversionAttribute.cs System.Runtime.InteropServices/LIBFLAGS.cs System.Runtime.InteropServices/LayoutKind.cs -System.Runtime.InteropServices/ManagedErrorInfo.cs System.Runtime.InteropServices/Marshal.cs System.Runtime.InteropServices/MarshalAsAttribute.cs System.Runtime.InteropServices/MarshalDirectiveException.cs diff --git a/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs b/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs index c15c6137786..04353c45469 100644 --- a/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs +++ b/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs @@ -63,14 +63,21 @@ public string Htmlize (XmlReader ecma_xml, Dictionary extraArgs) public string Htmlize (XmlReader ecma_xml, XsltArgumentList args) { - EnsureTransform (); - - var output = new StringBuilder (); - ecma_transform.Transform (ecma_xml, - args, - XmlWriter.Create (output, ecma_transform.OutputSettings), - CreateDocumentResolver ()); - return output.ToString (); + try{ + EnsureTransform (); + + var output = new StringBuilder (); + ecma_transform.Transform (ecma_xml, + args, + XmlWriter.Create (output, ecma_transform.OutputSettings), + CreateDocumentResolver ()); + return output.ToString (); + } + catch(Exception x) + { + var msg = x.ToString (); + return msg; + } } protected virtual XmlResolver CreateDocumentResolver () @@ -81,21 +88,14 @@ protected virtual XmlResolver CreateDocumentResolver () public string Export (Stream stream, Dictionary extraArgs) { - return Htmlize (XmlReader.Create (WrapStream (new StreamReader (stream), extraArgs)), extraArgs); + return Htmlize (XmlReader.Create (new StreamReader(stream)), extraArgs); } public string Export (string input, Dictionary extraArgs) { - return Htmlize (XmlReader.Create (WrapStream (new StringReader (input), extraArgs)), extraArgs); + return Htmlize (XmlReader.Create (new StringReader(input)), extraArgs); } - TextReader WrapStream (TextReader initialReader, Dictionary renderArgs) - { - string show; - if (renderArgs.TryGetValue ("show", out show) && show == "namespace") - return new AvoidCDataTextReader (initialReader); - return initialReader; - } static void EnsureTransform () { @@ -329,81 +329,5 @@ public bool IsToBeAdded(string text) } } } - - public class AvoidCDataTextReader : TextReader - { - static readonly char[] CDataPattern = new[] { - '<', '!', '[', 'C', 'D', 'A', 'T', 'A', '[' - }; - static readonly char[] CDataClosingPattern = new[] { - ']', ']', '>' - }; - TextReader wrappedReader; - char[] backingArray = new char[9]; // " 0; - } else if (currentIndex == eofIndex) { - return false; - } - if (!inCData && PatternDetect (CDataPattern)) { - inCData = true; - ReadLength (CDataPattern.Length); - return EnsureBuffer (); - } - if (inCData && PatternDetect (CDataClosingPattern)) { - inCData = false; - ReadLength (CDataClosingPattern.Length); - return EnsureBuffer (); - } - - return true; - } - - bool PatternDetect (char[] pattern) - { - return backingArray[currentIndex] == pattern[0] && Enumerable.Range (1, pattern.Length - 1).All (i => backingArray[(currentIndex + i) % backingArray.Length] == pattern[i]); - } - } + } diff --git a/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs b/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs index 23bf89778c8..7a866432d63 100644 --- a/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs +++ b/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs @@ -49,7 +49,7 @@ void ParseUl (Tree tree, Node parent, XElement ul) ObjectEntryToParams (inner, out caption, out element); // Don't add if the backing file doesn't exist if (!File.Exists (element)) { - Console.Error.WriteLine ("File `{0}' referenced in TOC but it doesn't exist.", element); + Console.Error.WriteLine ("Warning: File `{0}' referenced in TOC but it doesn't exist. It will be ignored.", element); continue; } using (var file = File.OpenRead (element)) diff --git a/mcs/class/monodoc/Test/Monodoc.Generators/AvoidCDataTextReaderTests.cs b/mcs/class/monodoc/Test/Monodoc.Generators/AvoidCDataTextReaderTests.cs deleted file mode 100644 index 5ab8e84b809..00000000000 --- a/mcs/class/monodoc/Test/Monodoc.Generators/AvoidCDataTextReaderTests.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Xml; -using System.Collections.Generic; - -using NUnit.Framework; - -using Monodoc; -using Monodoc.Generators; -using Monodoc.Generators.Html; - -namespace MonoTests.Monodoc.Generators -{ - [TestFixture] - public class AvoidCDataTextReaderTest - { - void AssertSameInputOutput (string expected, string input) - { - var processed = new AvoidCDataTextReader (new StringReader (input)).ReadToEnd (); - Assert.AreEqual (expected, processed); - } - - [Test] - public void NoCDataXmlTest () - { - var input = @"Addressbook APIs. - Provides access to the system Address Book. - "; - - AssertSameInputOutput (input, input); - } - - [Test] - public void WithCDataXmlTest () - { - var input = @"Addressbook APIs. - "; - - AssertSameInputOutput (input.Replace ("", string.Empty), input); - } - - [Test] - public void PartialCDataXmlTest () - { - var input = @"Addressbook APIs. - "; - - AssertSameInputOutput (input, input); - } - - [Test] - public void FinishWithPartialCDataXmlTest () - { - var input = @"Addressbook APIs. - Provides access to the system Address Book. - Addressbook APIs. - Provides access to the system Address Book. - [] ArrayMember +} diff --git a/mcs/errors/CS1607-3-lib.cs b/mcs/errors/CS8009-lib.cs similarity index 100% rename from mcs/errors/CS1607-3-lib.cs rename to mcs/errors/CS8009-lib.cs diff --git a/mcs/errors/Makefile b/mcs/errors/Makefile index dc76a1cd6f7..f994abac1ea 100644 --- a/mcs/errors/Makefile +++ b/mcs/errors/Makefile @@ -21,7 +21,7 @@ DISTFILES = \ $(wildcard dlls/second/*.cs) TEST_SUPPORT_FILES = \ - CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \ + CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0012-23-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \ CS0103-2-lib.dll CS0118-2-lib.dll CS0122-8-lib.dll CS0122-10-lib.dll CS0122-14-lib.dll CS0122-15-lib.dll CS0122-19-lib.dll CS0122-35-lib.dll CS0122-36-lib.dll CS0143-lib.dll CS0144-3-lib.dll CS0165-19-lib.dll \ CS0205-3-lib.dll CS0246-29-lib.dll CS0229-3-lib.dll CS0229-4-lib.dll CS0266-25-lib.dll \ CS0315-2-lib.dll \ @@ -32,9 +32,10 @@ TEST_SUPPORT_FILES = \ CS0730-lib.dll CS0731-1-lib.dll CS0731-2-lib.dll \ CS1070-lib.dll \ CS1540-15-lib.dll CS1540-17-lib.dll CS1542-lib.dll CS1577-lib.dll \ - CS1607-3-lib.dll CS1683-lib.dll CS1684-lib.dll CS1685-2-lib.dll \ + CS1683-lib.dll CS1684-lib.dll CS1685-2-lib.dll \ dlls/first/CS1701-lib.dll dlls/second/CS1701-lib.dll CS1701-lib.dll dlls/first/CS1702-lib.dll dlls/second/CS1702-lib.dll CS1702-lib.dll dlls/first/CS1705-lib.dll dlls/second/CS1705-lib.dll CS1705-lib.dll \ CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll \ + CS8009-lib.dll \ CSFriendAssembly-lib.dll \ dlls/first/CS1703-lib.dll dlls/first/CS1704-lib.dll \ dlls/second/CS1703-lib.dll dlls/second/CS1704-lib.dll diff --git a/mcs/errors/cs0012-23.cs b/mcs/errors/cs0012-23.cs new file mode 100644 index 00000000000..a8b454ac67f --- /dev/null +++ b/mcs/errors/cs0012-23.cs @@ -0,0 +1,11 @@ +// CS0012: The type `Struct`1' is defined in an assembly that is not referenced. Consider adding a reference to assembly `CS0012-lib-missing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' +// Line: 9 +// Compiler options: -r:CS0012-23-lib.dll + +public class C +{ + public static void Main () + { + var val = B.ArrayMember; + } +} \ No newline at end of file diff --git a/mcs/errors/cs0070-2.cs b/mcs/errors/cs0070-2.cs new file mode 100644 index 00000000000..95f9cdb61d8 --- /dev/null +++ b/mcs/errors/cs0070-2.cs @@ -0,0 +1,24 @@ +// CS0070: The event `A.evt' can only appear on the left hand side of += or -= when used outside of the type `A' +// Line: 22 + +using System; + +public static class EventExtensions +{ + public static void Raise (this EventHandler h) + { + } +} + +public class A +{ + public event EventHandler evt; +} + +public class B : A +{ + public void Run() + { + Action a = () => evt.Raise (); + } +} \ No newline at end of file diff --git a/mcs/errors/cs0100-8.cs b/mcs/errors/cs0100-8.cs new file mode 100644 index 00000000000..82485114483 --- /dev/null +++ b/mcs/errors/cs0100-8.cs @@ -0,0 +1,7 @@ +// CS100: The parameter name `obj' is a duplicate +// Line: 6 + +abstract class C +{ + public abstract int this [object obj, object obj] => 1; +} \ No newline at end of file diff --git a/mcs/errors/cs0102-99.cs b/mcs/errors/cs0102-99.cs deleted file mode 100644 index b07a24633a2..00000000000 --- a/mcs/errors/cs0102-99.cs +++ /dev/null @@ -1,11 +0,0 @@ -// CS0102: The type `Part' already contains a definition for `arg' -// Line: 6 - -partial class Part -{ - int arg; -} - -partial class Part(int arg) -{ -} \ No newline at end of file diff --git a/mcs/errors/cs9006.cs b/mcs/errors/cs0103-13.cs similarity index 52% rename from mcs/errors/cs9006.cs rename to mcs/errors/cs0103-13.cs index 4420f2fe331..891a1559d34 100644 --- a/mcs/errors/cs9006.cs +++ b/mcs/errors/cs0103-13.cs @@ -1,4 +1,4 @@ -// CS9006: An object reference is required to access primary constructor parameter `value' +// CS0103: The name `value' does not exist in the current context // Line: 8 class X (double value) diff --git a/mcs/errors/cs0103-14.cs b/mcs/errors/cs0103-14.cs new file mode 100644 index 00000000000..80f1e629f61 --- /dev/null +++ b/mcs/errors/cs0103-14.cs @@ -0,0 +1,10 @@ +// C0103: The name `s' does not exist in the current context +// Line: 7 + +class Test(string s) +{ + public Test () + : this (s) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs0121-25.cs b/mcs/errors/cs0121-25.cs new file mode 100644 index 00000000000..4461673c74b --- /dev/null +++ b/mcs/errors/cs0121-25.cs @@ -0,0 +1,33 @@ +// CS0121: The call is ambiguous between the following methods or properties: `A.B.X.Test(int)' and `A.C.X.Test(int)' +// Line: 31 + +using A.B.X; +using A.C.X; + +namespace A.B +{ + static class X + { + public static void Test (int o) + { + } + } +} + +namespace A.C +{ + static class X + { + public static int Test (int o) + { + } + } +} + +class M +{ + public static void Main () + { + Test (0); + } +} \ No newline at end of file diff --git a/mcs/errors/cs0133-6.cs b/mcs/errors/cs0133-6.cs new file mode 100644 index 00000000000..a523169cdbd --- /dev/null +++ b/mcs/errors/cs0133-6.cs @@ -0,0 +1,10 @@ +// CS0133: The expression being assigned to `o' must be constant +// Line: 8 + +class X +{ + void Foo () + { + const object o = "" ?? null; + } +} \ No newline at end of file diff --git a/mcs/errors/cs0133-7.cs b/mcs/errors/cs0133-7.cs new file mode 100644 index 00000000000..10d82d9fe5e --- /dev/null +++ b/mcs/errors/cs0133-7.cs @@ -0,0 +1,10 @@ +// CS0133: The expression being assigned to `o' must be constant +// Line: 8 + +class X +{ + void Foo () + { + const object o = null ?? ""; + } +} \ No newline at end of file diff --git a/mcs/errors/cs0136-18.cs b/mcs/errors/cs0136-18.cs new file mode 100644 index 00000000000..20630a4bcf3 --- /dev/null +++ b/mcs/errors/cs0136-18.cs @@ -0,0 +1,13 @@ +// CS0136: A local variable named `arg' cannot be declared in this scope because it would give a different meaning to `arg', which is already used in a `parent or current' scope to denote something else +// Line: 11 + +using System; + +class A (Func barg) +{ +} + +class B (int arg) + : A ((arg) => 1) +{ +} \ No newline at end of file diff --git a/mcs/errors/cs0136-19.cs b/mcs/errors/cs0136-19.cs new file mode 100644 index 00000000000..ae9e0f606e3 --- /dev/null +++ b/mcs/errors/cs0136-19.cs @@ -0,0 +1,13 @@ +// CS0136: A local variable named `arg' cannot be declared in this scope because it would give a different meaning to `arg', which is already used in a `parent or current' scope to denote something else +// Line: 11 + +using System; + +partial class PC +{ + Func f = (arg) => 1; +} + +partial class PC (int arg) +{ +} \ No newline at end of file diff --git a/mcs/errors/cs0138.cs b/mcs/errors/cs0138.cs index ea0010ea513..8264e8dbf29 100644 --- a/mcs/errors/cs0138.cs +++ b/mcs/errors/cs0138.cs @@ -1,5 +1,6 @@ // CS0138: `System.Console' is a type not a namespace. A using namespace directive can only be applied to namespaces // Line: 5 +// Compiler options: -langversion:5 using System; using System.Console; diff --git a/mcs/errors/cs0151-3.cs b/mcs/errors/cs0151-3.cs new file mode 100644 index 00000000000..76443735451 --- /dev/null +++ b/mcs/errors/cs0151-3.cs @@ -0,0 +1,19 @@ +// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type +// Line: 15 + +struct X +{ + public static implicit operator int (X x) + { + return 1; + } + + static void Main () + { + X? x = null; + switch (x) { + default: + break; + } + } +} diff --git a/mcs/errors/cs0151-4.cs b/mcs/errors/cs0151-4.cs new file mode 100644 index 00000000000..0e45b1a9049 --- /dev/null +++ b/mcs/errors/cs0151-4.cs @@ -0,0 +1,30 @@ +// CS0151: A switch expression of type `S1?' cannot be converted to an integral type, bool, char, string, enum or nullable type +// Line: 24 + +using System; + +struct S1 +{ + public static implicit operator int? (S1? s) + { + throw new ApplicationException (); + } + + public static implicit operator int (S1? s) + { + throw new ApplicationException (); + } +} + +class C +{ + public static int Main () + { + S1? s1 = new S1 (); + switch (s1) + { + default: + return 1; + } + } +} \ No newline at end of file diff --git a/mcs/errors/cs0151-5.cs b/mcs/errors/cs0151-5.cs new file mode 100644 index 00000000000..3995a286755 --- /dev/null +++ b/mcs/errors/cs0151-5.cs @@ -0,0 +1,19 @@ +// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type +// Line: 19 + +struct X +{ + public static implicit operator int? (X x) + { + return 1; + } + + static void Main () + { + X? x = null; + switch (x) { + default: + break; + } + } +} diff --git a/mcs/errors/cs0182-10.cs b/mcs/errors/cs0181-2.cs similarity index 68% rename from mcs/errors/cs0182-10.cs rename to mcs/errors/cs0181-2.cs index 1ce2d2f48df..6334606fae7 100644 --- a/mcs/errors/cs0182-10.cs +++ b/mcs/errors/cs0181-2.cs @@ -1,4 +1,4 @@ -// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression +// CS0181: Attribute constructor parameter has type `int[][]', which is not a valid attribute parameter type // Line: 13 using System; diff --git a/mcs/errors/cs0182-12.cs b/mcs/errors/cs0181-3.cs similarity index 56% rename from mcs/errors/cs0182-12.cs rename to mcs/errors/cs0181-3.cs index 2827f63c7bd..6e2f5b6ff00 100644 --- a/mcs/errors/cs0182-12.cs +++ b/mcs/errors/cs0181-3.cs @@ -1,4 +1,4 @@ -// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression +// CS0181: Attribute constructor parameter has type `System.Enum', which is not a valid attribute parameter type // Line: 18 using System; diff --git a/mcs/errors/cs0182-13.cs b/mcs/errors/cs0181-4.cs similarity index 57% rename from mcs/errors/cs0182-13.cs rename to mcs/errors/cs0181-4.cs index 8c764b28d09..80ed5629a9f 100644 --- a/mcs/errors/cs0182-13.cs +++ b/mcs/errors/cs0181-4.cs @@ -1,4 +1,4 @@ -// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression +// CS0181: Attribute constructor parameter has type `System.Attribute', which is not a valid attribute parameter type // Line: 6 using System; diff --git a/mcs/errors/cs0182-2.cs b/mcs/errors/cs0181.cs similarity index 60% rename from mcs/errors/cs0182-2.cs rename to mcs/errors/cs0181.cs index b988a04a1ec..f04342c4a8b 100644 --- a/mcs/errors/cs0182-2.cs +++ b/mcs/errors/cs0181.cs @@ -1,4 +1,4 @@ -// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression +// CS0181: Attribute constructor parameter has type `int[,]', which is not a valid attribute parameter type // Line: 13 using System; diff --git a/mcs/errors/cs0253-3.cs b/mcs/errors/cs0253-3.cs new file mode 100644 index 00000000000..0cf7968f7cb --- /dev/null +++ b/mcs/errors/cs0253-3.cs @@ -0,0 +1,15 @@ +// CS0253: Possible unintended reference comparison. Consider casting the right side expression to type `System.Action' to get value comparison +// Line: 13 +// Compiler options: -warnaserror + +using System; + +class MainClass +{ + public static void Main () + { + Action a = null; + object b = null; + var x = a == b; + } +} \ No newline at end of file diff --git a/mcs/errors/cs0457-4.cs b/mcs/errors/cs0457-4.cs new file mode 100644 index 00000000000..787db3ab47f --- /dev/null +++ b/mcs/errors/cs0457-4.cs @@ -0,0 +1,27 @@ +// CS0457: Ambiguous user defined operators `D.implicit operator D(System.Action)' and `D.explicit operator D(Foo)' when converting from `method group' to `D' +// Line: 25 + +using System; + +public delegate void Foo (); + +class D +{ + public static implicit operator D (Action d) + { + return new D (); + } + + public static explicit operator D (Foo d) + { + return new D (); + } +} + +class Program +{ + static void Main() + { + D d = (D) Main; + } +} diff --git a/mcs/errors/cs0573-2.cs b/mcs/errors/cs0573-2.cs deleted file mode 100644 index 50836def0ee..00000000000 --- a/mcs/errors/cs0573-2.cs +++ /dev/null @@ -1,6 +0,0 @@ -// CS0573: `A.a': Structs cannot have instance field initializers -// Line: 5 - -partial struct A { - int a = 1; -} diff --git a/mcs/errors/cs0573.cs b/mcs/errors/cs0573.cs deleted file mode 100644 index deec3ea6553..00000000000 --- a/mcs/errors/cs0573.cs +++ /dev/null @@ -1,13 +0,0 @@ -// CS0573: `A.a': Structs cannot have instance field initializers -// Line: 5 -struct A { - int a = 1; -} - -class D { - static void Main () - { - A [] a = new A [10]; - - } -} diff --git a/mcs/errors/cs0579-9.cs b/mcs/errors/cs0579-9.cs new file mode 100644 index 00000000000..43461affc4a --- /dev/null +++ b/mcs/errors/cs0579-9.cs @@ -0,0 +1,22 @@ +// CS0579: The attribute `TestAttributesCollecting.A' cannot be applied multiple times +// Line: 19 + +using System; + +namespace TestAttributesCollecting +{ + class A : Attribute + { + public A (int a) + { + } + } + + partial class G1<[A (1)]T> + { + } + + partial class G1<[A (2)]T> + { + } +} diff --git a/mcs/errors/cs0591-2.cs b/mcs/errors/cs0591-2.cs new file mode 100644 index 00000000000..31df0431f62 --- /dev/null +++ b/mcs/errors/cs0591-2.cs @@ -0,0 +1,9 @@ +// CS0591: Invalid value for argument to `System.Runtime.InteropServices.GuidAttribute' attribute +// Line: 6 + +using System.Runtime.InteropServices; + +[Guid ("aaa")] +class X { +static void Main () {} +} diff --git a/mcs/errors/cs0647-12.cs b/mcs/errors/cs0591-3.cs similarity index 55% rename from mcs/errors/cs0647-12.cs rename to mcs/errors/cs0591-3.cs index f1d83702356..8254a5b8198 100644 --- a/mcs/errors/cs0647-12.cs +++ b/mcs/errors/cs0591-3.cs @@ -1,4 +1,4 @@ -// CS0647: Error during emitting `System.Runtime.InteropServices.DllImportAttribute' attribute. The reason is `DllName cannot be empty or null' +// CS0591: Invalid value for argument to `System.Runtime.InteropServices.DllImportAttribute' attribute // Line: 8 using System.Runtime.InteropServices; diff --git a/mcs/errors/cs0647-13.cs b/mcs/errors/cs0591-4.cs similarity index 55% rename from mcs/errors/cs0647-13.cs rename to mcs/errors/cs0591-4.cs index 96751a139ae..adf1ff5aefd 100644 --- a/mcs/errors/cs0647-13.cs +++ b/mcs/errors/cs0591-4.cs @@ -1,4 +1,4 @@ -// CS0647: Error during emitting `System.Runtime.InteropServices.DllImportAttribute' attribute. The reason is `DllName cannot be empty or null' +// CS0591: Invalid value for argument to `System.Runtime.InteropServices.DllImportAttribute' attribute // Line: 8 using System.Runtime.InteropServices; diff --git a/mcs/errors/cs0591-5.cs b/mcs/errors/cs0591-5.cs new file mode 100644 index 00000000000..964dca945c4 --- /dev/null +++ b/mcs/errors/cs0591-5.cs @@ -0,0 +1,12 @@ +// CS0591: Invalid value for argument to `System.Runtime.CompilerServices.MethodImplAttribute' attribute +// Line: 8 + +using System.Runtime.CompilerServices; + +class Test +{ + [MethodImplAttribute(445)] + public void test () + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs0591-6.cs b/mcs/errors/cs0591-6.cs new file mode 100644 index 00000000000..b9a4b2eac6d --- /dev/null +++ b/mcs/errors/cs0591-6.cs @@ -0,0 +1,12 @@ +// CS0591: Invalid value for argument to `System.Runtime.CompilerServices.MethodImplAttribute' attribute +// Line: 8 + +using System.Runtime.CompilerServices; + +class Program +{ + [MethodImpl((MethodImplOptions)255)] + void Foo() + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs0591.cs b/mcs/errors/cs0591.cs index 8d5dc46a009..6ffbe846b0f 100644 --- a/mcs/errors/cs0591.cs +++ b/mcs/errors/cs0591.cs @@ -1,4 +1,4 @@ -// CS0591: Invalid value for argument to `System.AttributeUsage' attribute +// CS0591: Invalid value for argument to `System.AttributeUsageAttribute' attribute // Line: 4 [System.AttributeUsage(0)] diff --git a/mcs/errors/cs0647-15.cs b/mcs/errors/cs0647-15.cs deleted file mode 100644 index 104d2dbd0a6..00000000000 --- a/mcs/errors/cs0647-15.cs +++ /dev/null @@ -1,12 +0,0 @@ -// CS0647: Error during emitting `System.Runtime.CompilerServices.MethodImplAttribute' attribute. The reason is `Incorrect argument value' -// Line: 8 - -using System.Runtime.CompilerServices; - -class Test -{ - [MethodImplAttribute(445)] - public void test () - { - } -} \ No newline at end of file diff --git a/mcs/errors/cs0647-18.cs b/mcs/errors/cs0647-18.cs deleted file mode 100644 index ce57d73d60a..00000000000 --- a/mcs/errors/cs0647-18.cs +++ /dev/null @@ -1,6 +0,0 @@ -// CS0647: Error during emitting `System.Reflection.AssemblyVersionAttribute' attribute. The reason is `Specified version `2.0.*.*' is not valid' -// Line: 6 - -using System.Reflection; - -[assembly: AssemblyVersion("2.0.*.*")] diff --git a/mcs/errors/cs0647-19.cs b/mcs/errors/cs0647-19.cs deleted file mode 100644 index 25b040038e1..00000000000 --- a/mcs/errors/cs0647-19.cs +++ /dev/null @@ -1,6 +0,0 @@ -// CS0647: Error during emitting `System.Reflection.AssemblyVersionAttribute' attribute. The reason is `Specified version `2.*' is not valid' -// Line: 6 - -using System.Reflection; - -[assembly: AssemblyVersion("2.*")] diff --git a/mcs/errors/cs0647-20.cs b/mcs/errors/cs0647-20.cs deleted file mode 100644 index 2b03f1cbc11..00000000000 --- a/mcs/errors/cs0647-20.cs +++ /dev/null @@ -1,12 +0,0 @@ -// CS0647: Error during emitting `System.Runtime.CompilerServices.MethodImplAttribute' attribute. The reason is `Incorrect argument value' -// Line: 8 - -using System.Runtime.CompilerServices; - -class Program -{ - [MethodImpl((MethodImplOptions)255)] - void Foo() - { - } -} \ No newline at end of file diff --git a/mcs/errors/cs0647.cs b/mcs/errors/cs0647.cs deleted file mode 100644 index 154bfff54dd..00000000000 --- a/mcs/errors/cs0647.cs +++ /dev/null @@ -1,9 +0,0 @@ -// CS0647: Error during emitting `System.Runtime.InteropServices.GuidAttribute' attribute. The reason is `Invalid Guid format: aaa' -// Line: 6 - -using System.Runtime.InteropServices; - -[Guid ("aaa")] -class X { -static void Main () {} -} diff --git a/mcs/errors/cs0657-23.cs b/mcs/errors/cs0657-23.cs new file mode 100644 index 00000000000..2e6f6a61381 --- /dev/null +++ b/mcs/errors/cs0657-23.cs @@ -0,0 +1,14 @@ +// CS0657: `field' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `param'. All attributes in this section will be ignored +// Line: 9 +// Compiler options: -warnaserror + +using System; + +public class FieldAttribute : System.Attribute +{ +} + +class X ([field:FieldAttribute] int foo) +{ + int v = foo; +} diff --git a/mcs/errors/cs0837-2.cs b/mcs/errors/cs0837-2.cs index 94c1f8510b9..eea4c130ea1 100644 --- a/mcs/errors/cs0837-2.cs +++ b/mcs/errors/cs0837-2.cs @@ -1,6 +1,5 @@ -// CS0837: The `as' operator cannot be applied to a lambda expression or anonymous method -// Line: 15 - +// CS0837: The `as' operator cannot be applied to a lambda expression, anonymous method, or method group +// Line: 14 class X { diff --git a/mcs/errors/cs0837-3.cs b/mcs/errors/cs0837-3.cs new file mode 100644 index 00000000000..de7ffd2c0af --- /dev/null +++ b/mcs/errors/cs0837-3.cs @@ -0,0 +1,12 @@ +// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group +// Line: 10 + +using System; + +class Test +{ + static void Main () + { + var res = Main is object; + } +} \ No newline at end of file diff --git a/mcs/errors/cs1953.cs b/mcs/errors/cs0837-4.cs similarity index 60% rename from mcs/errors/cs1953.cs rename to mcs/errors/cs0837-4.cs index ba5dbad0437..bc11afa0c97 100644 --- a/mcs/errors/cs1953.cs +++ b/mcs/errors/cs0837-4.cs @@ -1,4 +1,4 @@ -// CS1953: An expression tree cannot contain an expression with method group +// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group // Line: 11 using System; diff --git a/mcs/errors/cs0837.cs b/mcs/errors/cs0837.cs index 7c56fd1addd..c2ca9b8732a 100644 --- a/mcs/errors/cs0837.cs +++ b/mcs/errors/cs0837.cs @@ -1,4 +1,4 @@ -// CS0837: The `is' operator cannot be applied to a lambda expression or anonymous method +// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group // Line: 8 class X diff --git a/mcs/errors/cs0840.cs b/mcs/errors/cs0840.cs deleted file mode 100644 index bc4ee416056..00000000000 --- a/mcs/errors/cs0840.cs +++ /dev/null @@ -1,8 +0,0 @@ -// CS0840: `Test.Property.get' must have a body because it is not marked abstract or extern. The property can be automatically implemented when you define both accessors -// Line: 7 - - -public abstract class Test -{ - public string Property { get; } -} diff --git a/mcs/errors/cs1501-17.cs b/mcs/errors/cs1501-17.cs new file mode 100644 index 00000000000..ac575643f4c --- /dev/null +++ b/mcs/errors/cs1501-17.cs @@ -0,0 +1,14 @@ +// CS1501: No overload for method `Foo' takes `0' arguments +// Line: 12 + +class C +{ + static void Foo (string foo, params object [] moreFoo) + { + } + + static void Main () + { + Foo (); + } +} \ No newline at end of file diff --git a/mcs/errors/cs1525-42.cs b/mcs/errors/cs1525-42.cs index 87f9e86f9a6..dc8b7ce4da0 100644 --- a/mcs/errors/cs1525-42.cs +++ b/mcs/errors/cs1525-42.cs @@ -1,4 +1,4 @@ -// CS1525: Unexpected symbol `}', expecting `(' or `{' +// CS1525: Unexpected symbol `}', expecting `(', `{', or `=>' // Line: 6 class MyClass diff --git a/mcs/errors/cs1607-2.cs b/mcs/errors/cs1607-2.cs deleted file mode 100644 index 2d0c3de135e..00000000000 --- a/mcs/errors/cs1607-2.cs +++ /dev/null @@ -1,7 +0,0 @@ -// CS1607: The version number `1.*' specified for `AssemblyFileVersion' is invalid -// Line: 7 -// Compiler options: -warnaserror - -using System.Reflection; - -[assembly: AssemblyFileVersion ("1.*")] diff --git a/mcs/errors/cs1607-3.cs b/mcs/errors/cs1607-3.cs deleted file mode 100644 index 9268dfd04c8..00000000000 --- a/mcs/errors/cs1607-3.cs +++ /dev/null @@ -1,13 +0,0 @@ -// CS1607: Referenced assembly `CS1607-3-lib' has different culture setting of `en-US' -// Line: 0 -// Compiler options: -r:CS1607-3-lib.dll -warnaserror - -using System; - -class Program -{ - static void Main () - { - Console.WriteLine (typeof (Lang)); - } -} diff --git a/mcs/errors/cs1644-19.cs b/mcs/errors/cs1644-19.cs index ce867d1e71c..fe4e494dd37 100644 --- a/mcs/errors/cs1644-19.cs +++ b/mcs/errors/cs1644-19.cs @@ -1,4 +1,4 @@ -// CS1644: Feature `automatically implemented properties' cannot be used because it is not part of the C# 2.0 language specification +// CS1644: Feature `auto-implemented properties' cannot be used because it is not part of the C# 2.0 language specification // Line: 7 // Compiler options: -langversion:ISO-2 diff --git a/mcs/errors/cs1644-36.cs b/mcs/errors/cs1644-36.cs new file mode 100644 index 00000000000..df2d30be8f2 --- /dev/null +++ b/mcs/errors/cs1644-36.cs @@ -0,0 +1,8 @@ +// CS1644: Feature `auto-implemented property initializer' cannot be used because it is not part of the C# 5.0 language specification +// Line: 7 +// Compiler options: -langversion:5 + +class C +{ + public static int P { get; } = 4; +} \ No newline at end of file diff --git a/mcs/errors/cs1644-37.cs b/mcs/errors/cs1644-37.cs new file mode 100644 index 00000000000..37c997ff631 --- /dev/null +++ b/mcs/errors/cs1644-37.cs @@ -0,0 +1,7 @@ +// CS1644: Feature `primary constructor' cannot be used because it is not part of the C# 5.0 language specification +// Line: 7 +// Compiler options: -langversion:5 + +class C (int arg) +{ +} \ No newline at end of file diff --git a/mcs/errors/cs1644-38.cs b/mcs/errors/cs1644-38.cs new file mode 100644 index 00000000000..0adbe60e74f --- /dev/null +++ b/mcs/errors/cs1644-38.cs @@ -0,0 +1,8 @@ +// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification +// Line: 7 +// Compiler options: -langversion:5 + +class C +{ + int Prop => 3; +} \ No newline at end of file diff --git a/mcs/errors/cs1644-39.cs b/mcs/errors/cs1644-39.cs new file mode 100644 index 00000000000..877c248e870 --- /dev/null +++ b/mcs/errors/cs1644-39.cs @@ -0,0 +1,8 @@ +// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification +// Line: 7 +// Compiler options: -langversion:5 + +class C +{ + int M () => 0; +} \ No newline at end of file diff --git a/mcs/errors/cs1644-40.cs b/mcs/errors/cs1644-40.cs new file mode 100644 index 00000000000..43ea9b022d6 --- /dev/null +++ b/mcs/errors/cs1644-40.cs @@ -0,0 +1,8 @@ +// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification +// Line: 7 +// Compiler options: -langversion:5 + +class C +{ + int this [long arg] => -9; +} \ No newline at end of file diff --git a/mcs/errors/cs1650-3.cs b/mcs/errors/cs1650-3.cs new file mode 100644 index 00000000000..e0cfa0c6ef0 --- /dev/null +++ b/mcs/errors/cs1650-3.cs @@ -0,0 +1,19 @@ +// CS1650: Fields of static readonly field `C.t' cannot be assigned to (except in a static constructor or a variable initializer) +// Line: 17 + +using System; + +interface I +{ + int X { get; set; } +} + +class C where T : struct, I +{ + static readonly T t; + + public static void Foo () + { + t.X = 42; + } +} diff --git a/mcs/errors/cs1700.cs b/mcs/errors/cs1700.cs index 4b2021994cd..975a2f2c7ac 100644 --- a/mcs/errors/cs1700.cs +++ b/mcs/errors/cs1700.cs @@ -1,4 +1,4 @@ -// CS1700: Assembly reference `MyAssemblyName, Version=' is invalid and cannot be resolved +// CS1700: Friend assembly reference `MyAssemblyName, Version=' is invalid and cannot be resolved // Line: 8 // Compiler options: -warnaserror -warn:3 diff --git a/mcs/errors/cs1984.cs b/mcs/errors/cs1984.cs deleted file mode 100644 index cf998413a14..00000000000 --- a/mcs/errors/cs1984.cs +++ /dev/null @@ -1,21 +0,0 @@ -// CS1984: The `await' operator cannot be used in the body of a finally clause -// Line: 13 - -using System; -using System.Threading.Tasks; - -class C -{ - public async Task Test () - { - try { - } finally { - await Call (); - } - } - - static Task Call () - { - return null; - } -} diff --git a/mcs/errors/cs1985-2.cs b/mcs/errors/cs1985-2.cs deleted file mode 100644 index 788d0e79ec5..00000000000 --- a/mcs/errors/cs1985-2.cs +++ /dev/null @@ -1,27 +0,0 @@ -// CS1985: The `await' operator cannot be used in a catch clause -// Line: 18 - -using System; -using System.Threading.Tasks; - -class X -{ - public static void Main () - { - } - - static async Task Test () - { - int x = 4; - try { - throw null; - } catch (NullReferenceException) if (await Foo ()) { - return; - } - } - - static Task Foo () - { - throw new NotImplementedException (); - } -} \ No newline at end of file diff --git a/mcs/errors/cs1985.cs b/mcs/errors/cs1985.cs deleted file mode 100644 index 62d3642f828..00000000000 --- a/mcs/errors/cs1985.cs +++ /dev/null @@ -1,21 +0,0 @@ -// CS1985: The `await' operator cannot be used in a catch clause -// Line: 13 - -using System; -using System.Threading.Tasks; - -class C -{ - public async Task Test () - { - try { - } catch { - await Call (); - } - } - - static Task Call () - { - return null; - } -} diff --git a/mcs/errors/cs1997-2.cs b/mcs/errors/cs1997-2.cs deleted file mode 100644 index 9f8c533f51a..00000000000 --- a/mcs/errors/cs1997-2.cs +++ /dev/null @@ -1,17 +0,0 @@ -// CS1997: `System.Func': A return keyword must not be followed by an expression when async delegate returns `Task'. Consider using `Task' return type -// Line: 12 - -using System; -using System.Threading.Tasks; - -class Test -{ - public static void Main() - { - Func t = async delegate { - return null; - }; - - return; - } -} diff --git a/mcs/errors/cs4017.cs b/mcs/errors/cs4017.cs index e0e7caa4fb8..f6ac27d07eb 100644 --- a/mcs/errors/cs4017.cs +++ b/mcs/errors/cs4017.cs @@ -1,4 +1,4 @@ -// CS4017: The CallerMemberName attribute cannot be applied because there is no standard conversion from `int' to `byte' +// CS4017: The CallerLineNumberAttribute attribute cannot be applied because there is no standard conversion from `int' to `byte' // Line: 8 using System.Runtime.CompilerServices; diff --git a/mcs/errors/cs4024.cs b/mcs/errors/cs4024.cs new file mode 100644 index 00000000000..d3360ed7cdf --- /dev/null +++ b/mcs/errors/cs4024.cs @@ -0,0 +1,17 @@ +// CS4024: The CallerLineNumberAttribute applied to parameter `x' will have no effect because it applies to a member that is used in context that do not allow optional arguments +// Line: 14 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +partial class D +{ + partial void Foo (int x = 2); +} + +partial class D +{ + partial void Foo ([CallerLineNumber] int x) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs4025.cs b/mcs/errors/cs4025.cs new file mode 100644 index 00000000000..6e9f2030433 --- /dev/null +++ b/mcs/errors/cs4025.cs @@ -0,0 +1,17 @@ +// CS4025: The CallerFilePath applied to parameter `x' will have no effect because it applies to a member that is used in context that do not allow optional arguments +// Line: 14 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +partial class D +{ + partial void Foo (string x = "x"); +} + +partial class D +{ + partial void Foo ([CallerFilePath] string x) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs4026.cs b/mcs/errors/cs4026.cs new file mode 100644 index 00000000000..94977002f3e --- /dev/null +++ b/mcs/errors/cs4026.cs @@ -0,0 +1,17 @@ +// CS4026: The CallerMemberName applied to parameter `x' will have no effect because it applies to a member that is used in context that do not allow optional arguments +// Line: 14 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +partial class D +{ + partial void Foo (string x = "x"); +} + +partial class D +{ + partial void Foo ([CallerMemberName] string x) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs4029.cs b/mcs/errors/cs4029.cs new file mode 100644 index 00000000000..14fce4f458b --- /dev/null +++ b/mcs/errors/cs4029.cs @@ -0,0 +1,19 @@ +// CS4029: Cannot return an expression of type `void' +// Line: 15 + +using System; +using System.Threading.Tasks; + +class C +{ + static void Foo (Func> f) + { + } + + static void Main () + { + Foo (async () => { + return await Task.Factory.StartNew (() => { }); + }); + } +} \ No newline at end of file diff --git a/mcs/errors/cs7007.cs b/mcs/errors/cs7007.cs new file mode 100644 index 00000000000..a343757db8f --- /dev/null +++ b/mcs/errors/cs7007.cs @@ -0,0 +1,9 @@ +// CS7007: `X' is not a static class. A using namespace directive can only be applied to static classes or namespace +// Line: 5 +// Compiler options: -langversion:6 + +using X; + +class X +{ +} \ No newline at end of file diff --git a/mcs/errors/cs7023-2.cs b/mcs/errors/cs7023-2.cs new file mode 100644 index 00000000000..ee14e24f96d --- /dev/null +++ b/mcs/errors/cs7023-2.cs @@ -0,0 +1,10 @@ +// CS7023: The second operand of `is' or `as' operator cannot be static type `X' +// Line: 8 + +static class X +{ + public static void Main () + { + var v = null is X; + } +} \ No newline at end of file diff --git a/mcs/errors/cs7023.cs b/mcs/errors/cs7023.cs new file mode 100644 index 00000000000..dae17caa411 --- /dev/null +++ b/mcs/errors/cs7023.cs @@ -0,0 +1,10 @@ +// CS7023: The second operand of `is' or `as' operator cannot be static type `X' +// Line: 8 + +static class X +{ + public static void Main () + { + var v = null as X; + } +} \ No newline at end of file diff --git a/mcs/errors/cs7025.cs b/mcs/errors/cs7025.cs new file mode 100644 index 00000000000..59eca472d26 --- /dev/null +++ b/mcs/errors/cs7025.cs @@ -0,0 +1,13 @@ +// CS7025: Inconsistent accessibility: event type `System.Action' is less accessible than event `C.E' +// Line: 8 + +using System; + +public class C +{ + public event Action E; +} + +interface I +{ +} \ No newline at end of file diff --git a/mcs/errors/cs7030.cs b/mcs/errors/cs7030.cs new file mode 100644 index 00000000000..01abf112887 --- /dev/null +++ b/mcs/errors/cs7030.cs @@ -0,0 +1,6 @@ +// CS7030: Friend assembly reference cannot have `null' value +// Line: 6 + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo (null)] diff --git a/mcs/errors/cs7034-2.cs b/mcs/errors/cs7034-2.cs new file mode 100644 index 00000000000..b7698694367 --- /dev/null +++ b/mcs/errors/cs7034-2.cs @@ -0,0 +1,6 @@ +// CS7034: The specified version string `2.0.*.*' does not conform to the required format - major[.minor[.build[.revision]]] +// Line: 6 + +using System.Reflection; + +[assembly: AssemblyVersion("2.0.*.*")] diff --git a/mcs/errors/cs7034-3.cs b/mcs/errors/cs7034-3.cs new file mode 100644 index 00000000000..a406b0f7d6b --- /dev/null +++ b/mcs/errors/cs7034-3.cs @@ -0,0 +1,6 @@ +// CS7034: The specified version string `2.*' does not conform to the required format - major[.minor[.build[.revision]]] +// Line: 6 + +using System.Reflection; + +[assembly: AssemblyVersion("2.*")] diff --git a/mcs/errors/cs0647-17.cs b/mcs/errors/cs7034.cs similarity index 52% rename from mcs/errors/cs0647-17.cs rename to mcs/errors/cs7034.cs index 88117de831c..071535be253 100644 --- a/mcs/errors/cs0647-17.cs +++ b/mcs/errors/cs7034.cs @@ -1,4 +1,4 @@ -// Cs0647: Error during emitting `System.Reflection.AssemblyVersionAttribute' attribute. The reason is `Specified version `0.0.0.80420' is not valid' +// CS7034: The specified version string `0.0.0.80420' does not conform to the required format - major[.minor[.build[.revision]]] // Line: 7 using System; diff --git a/mcs/errors/cs7035.cs b/mcs/errors/cs7035.cs new file mode 100644 index 00000000000..0d27cb00be1 --- /dev/null +++ b/mcs/errors/cs7035.cs @@ -0,0 +1,7 @@ +// CS7035: The specified version string `1.*' does not conform to the recommended format major.minor.build.revision +// Line: 7 +// Compiler options: -warnaserror + +using System.Reflection; + +[assembly: AssemblyFileVersion ("1.*")] diff --git a/mcs/errors/cs7042-2.cs b/mcs/errors/cs7042-2.cs new file mode 100644 index 00000000000..a70c129019d --- /dev/null +++ b/mcs/errors/cs7042-2.cs @@ -0,0 +1,10 @@ +// CS7042: The DllImport attribute cannot be applied to a method that is generic or contained in a generic type +// Line: 9 + +using System.Runtime.InteropServices; + +public class C +{ + [DllImport ("my.dll")] + static extern void Foo (); +} \ No newline at end of file diff --git a/mcs/errors/cs7042.cs b/mcs/errors/cs7042.cs new file mode 100644 index 00000000000..efebf84dc61 --- /dev/null +++ b/mcs/errors/cs7042.cs @@ -0,0 +1,10 @@ +// CS7042: The DllImport attribute cannot be applied to a method that is generic or contained in a generic type +// Line: 9 + +using System.Runtime.InteropServices; + +public class C +{ + [DllImport ("my.dll")] + static extern void Foo (); +} \ No newline at end of file diff --git a/mcs/errors/cs0647-9.cs b/mcs/errors/cs7049.cs similarity index 56% rename from mcs/errors/cs0647-9.cs rename to mcs/errors/cs7049.cs index a7a1b38729f..91114e8afc0 100644 --- a/mcs/errors/cs0647-9.cs +++ b/mcs/errors/cs7049.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `System.Security.Permissions.PrincipalPermissionAttribute' attribute. The reason is `SecurityAction is out of range' -// Line : 10 +// CS7049: Security attribute `System.Security.Permissions.PrincipalPermissionAttribute' has an invalid SecurityAction value `100' +// Line: 10 using System; using System.Security; diff --git a/mcs/errors/cs0647-2.cs b/mcs/errors/cs7050.cs similarity index 50% rename from mcs/errors/cs0647-2.cs rename to mcs/errors/cs7050.cs index 5e05cfb18a2..6909f185000 100644 --- a/mcs/errors/cs0647-2.cs +++ b/mcs/errors/cs7050.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `System.Security.Permissions.SecurityPermissionAttribute' attribute. The reason is `SecurityAction `Demand' is not valid for this declaration' -// Line : 10 +// CS7050: SecurityAction value `System.Security.Permissions.SecurityAction' is invalid for security attributes applied to an assembly +// Line: 10 using System; using System.Security; diff --git a/mcs/errors/cs0647-3.cs b/mcs/errors/cs7051.cs similarity index 57% rename from mcs/errors/cs0647-3.cs rename to mcs/errors/cs7051.cs index 272855dcfcb..2d18f11b4ae 100644 --- a/mcs/errors/cs0647-3.cs +++ b/mcs/errors/cs7051.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `System.Security.Permissions.SecurityPermissionAttribute' attribute. The reason is `SecurityAction `RequestMinimum' is not valid for this declaration' -// Line : 10 +// CS7051: SecurityAction value `System.Security.Permissions.SecurityAction' is invalid for security attributes applied to a type or a method +// Line: 10 using System; using System.Security; diff --git a/mcs/errors/cs0647-11.cs b/mcs/errors/cs7055-2.cs similarity index 59% rename from mcs/errors/cs0647-11.cs rename to mcs/errors/cs7055-2.cs index aa5c0e3f959..f2c15a8d225 100644 --- a/mcs/errors/cs0647-11.cs +++ b/mcs/errors/cs7055-2.cs @@ -1,4 +1,4 @@ -// CS0647: Error during emitting `System.Runtime.InteropServices.MarshalAsAttribute' attribute. The reason is `Specified unmanaged type is only valid on fields' +// CS7055: Unmanaged type `ByValArray' is only valid for fields // Line: 10 using System; diff --git a/mcs/errors/cs0647-10.cs b/mcs/errors/cs7055.cs similarity index 59% rename from mcs/errors/cs0647-10.cs rename to mcs/errors/cs7055.cs index aa5c0e3f959..f2c15a8d225 100644 --- a/mcs/errors/cs0647-10.cs +++ b/mcs/errors/cs7055.cs @@ -1,4 +1,4 @@ -// CS0647: Error during emitting `System.Runtime.InteropServices.MarshalAsAttribute' attribute. The reason is `Specified unmanaged type is only valid on fields' +// CS7055: Unmanaged type `ByValArray' is only valid for fields // Line: 10 using System; diff --git a/mcs/errors/cs0647-16.cs b/mcs/errors/cs7059.cs similarity index 57% rename from mcs/errors/cs0647-16.cs rename to mcs/errors/cs7059.cs index 41c3e0572c6..f19fd02f366 100644 --- a/mcs/errors/cs0647-16.cs +++ b/mcs/errors/cs7059.cs @@ -1,4 +1,4 @@ -// CS0647: Error during emitting `System.Reflection.AssemblyCultureAttribute' attribute. The reason is `The executables cannot be satelite assemblies, remove the attribute or keep it empty' +// CS7059: Executables cannot be satellite assemblies. Remove the attribute or keep it empty // Line: 7 using System; diff --git a/mcs/errors/cs0647-5.cs b/mcs/errors/cs7070-2.cs similarity index 76% rename from mcs/errors/cs0647-5.cs rename to mcs/errors/cs7070-2.cs index 20917f3925d..e618405b3c9 100644 --- a/mcs/errors/cs0647-5.cs +++ b/mcs/errors/cs7070-2.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent' -// Line : 11 +// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations +// Line: 11 using System; using System.Security; diff --git a/mcs/errors/cs0647-7.cs b/mcs/errors/cs7070-3.cs similarity index 76% rename from mcs/errors/cs0647-7.cs rename to mcs/errors/cs7070-3.cs index 314fafed73d..907993dd31e 100644 --- a/mcs/errors/cs0647-7.cs +++ b/mcs/errors/cs7070-3.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent' -// Line : 11 +// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations +// Line: 11 using System; using System.Security; diff --git a/mcs/errors/cs0647-6.cs b/mcs/errors/cs7070-4.cs similarity index 75% rename from mcs/errors/cs0647-6.cs rename to mcs/errors/cs7070-4.cs index 9e7c37e96b4..a2c43a5d294 100644 --- a/mcs/errors/cs0647-6.cs +++ b/mcs/errors/cs7070-4.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent' -// Line : 11 +// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations +// Line: 11 using System; using System.Security; diff --git a/mcs/errors/cs0647-4.cs b/mcs/errors/cs7070.cs similarity index 73% rename from mcs/errors/cs0647-4.cs rename to mcs/errors/cs7070.cs index d799ceee367..599a1808ffd 100644 --- a/mcs/errors/cs0647-4.cs +++ b/mcs/errors/cs7070.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent' -// Line : 10 +// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations +// Line: 10 using System; using System.Security; diff --git a/mcs/errors/cs7080.cs b/mcs/errors/cs7080.cs new file mode 100644 index 00000000000..4da50751b92 --- /dev/null +++ b/mcs/errors/cs7080.cs @@ -0,0 +1,12 @@ +// CS7080: The CallerMemberNameAttribute applied to parameter `o' will have no effect. It is overridden by the CallerFilePathAttribute +// Line: 9 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +class D +{ + void Foo ([CallerMemberName, CallerFilePath] object o = null) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs7081.cs b/mcs/errors/cs7081.cs new file mode 100644 index 00000000000..20597c1465c --- /dev/null +++ b/mcs/errors/cs7081.cs @@ -0,0 +1,12 @@ +// CS7081: The CallerMemberNameAttribute applied to parameter `o' will have no effect. It is overridden by the CallerLineNumberAttribute +// Line: 9 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +class D +{ + void Foo ([CallerMemberName, CallerLineNumber] object o = null) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs7082.cs b/mcs/errors/cs7082.cs new file mode 100644 index 00000000000..1b02bd5c8d3 --- /dev/null +++ b/mcs/errors/cs7082.cs @@ -0,0 +1,12 @@ +// CS7082: The CallerFilePathAttribute applied to parameter `o' will have no effect. It is overridden by the CallerLineNumberAttribute +// Line: 9 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +class D +{ + void Foo ([CallerFilePath, CallerLineNumber] object o = null) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs7083-2.cs b/mcs/errors/cs7083-2.cs new file mode 100644 index 00000000000..14d378fee81 --- /dev/null +++ b/mcs/errors/cs7083-2.cs @@ -0,0 +1,10 @@ +// CS7083: Expression must be implicitly convertible to Boolean or its type `C' must define operator `false' +// Line: 8 + +class C +{ + dynamic M (dynamic d) + { + return this && d; + } +} \ No newline at end of file diff --git a/mcs/errors/cs7083.cs b/mcs/errors/cs7083.cs new file mode 100644 index 00000000000..5f359c3df62 --- /dev/null +++ b/mcs/errors/cs7083.cs @@ -0,0 +1,10 @@ +// CS7083: Expression must be implicitly convertible to Boolean or its type `C' must define operator `true' +// Line: 8 + +class C +{ + dynamic M (dynamic d) + { + return this || d; + } +} \ No newline at end of file diff --git a/mcs/errors/cs7094.cs b/mcs/errors/cs7094.cs new file mode 100644 index 00000000000..93cd6372f8e --- /dev/null +++ b/mcs/errors/cs7094.cs @@ -0,0 +1,15 @@ +// CS7094: The `await' operator cannot be used in the filter expression of a catch clause +// Line: 12 + +using System.Threading.Tasks; + +class Test +{ + async static Task M1 () + { + try { + } + catch if (await Task.Factory.StartNew (() => false)) { + } + } +} \ No newline at end of file diff --git a/mcs/errors/cs8009.cs b/mcs/errors/cs8009.cs new file mode 100644 index 00000000000..851e06653eb --- /dev/null +++ b/mcs/errors/cs8009.cs @@ -0,0 +1,13 @@ +// CS8009: Referenced assembly `CS8009-lib' has different culture setting of `en-US' +// Line: 0 +// Compiler options: -r:CS8009-lib.dll -warnaserror + +using System; + +class Program +{ + static void Main () + { + Console.WriteLine (typeof (Lang)); + } +} diff --git a/mcs/errors/cs0127-4.cs b/mcs/errors/cs8030-2.cs similarity index 56% rename from mcs/errors/cs0127-4.cs rename to mcs/errors/cs8030-2.cs index 64e3f96ae04..231f2113a50 100644 --- a/mcs/errors/cs0127-4.cs +++ b/mcs/errors/cs8030-2.cs @@ -1,4 +1,4 @@ -// CS0127: `D': A return keyword must not be followed by any expression when delegate returns void +// CS8030: Anonymous function or lambda expression converted to a void returning delegate cannot return a value // Line: 9 delegate void D (int x); diff --git a/mcs/errors/cs0127-2.cs b/mcs/errors/cs8030-3.cs similarity index 56% rename from mcs/errors/cs0127-2.cs rename to mcs/errors/cs8030-3.cs index 1b36551e109..1ff2894089f 100644 --- a/mcs/errors/cs0127-2.cs +++ b/mcs/errors/cs8030-3.cs @@ -1,4 +1,4 @@ -// CS0127: `C.GetValue()': A return keyword must not be followed by any expression when method returns void +// CS8030: Anonymous function or lambda expression converted to a void returning delegate cannot return a value // Line: 11 using System; diff --git a/mcs/errors/cs0127-3.cs b/mcs/errors/cs8030.cs similarity index 53% rename from mcs/errors/cs0127-3.cs rename to mcs/errors/cs8030.cs index 5e39cb9da7a..4f2751c6ea1 100644 --- a/mcs/errors/cs0127-3.cs +++ b/mcs/errors/cs8030.cs @@ -1,4 +1,4 @@ -// CS0127: `System.Action': A return keyword must not be followed by any expression when delegate returns void +// CS8030: Anonymous function or lambda expression converted to a void returning delegate cannot return a value // Line: 10 using System; diff --git a/mcs/errors/cs8031.cs b/mcs/errors/cs8031.cs new file mode 100644 index 00000000000..dbb83bc1185 --- /dev/null +++ b/mcs/errors/cs8031.cs @@ -0,0 +1,17 @@ +// CS8031: Async lambda expression or anonymous method converted to a `Task' cannot return a value. Consider returning `Task' +// Line: 12 + +using System; +using System.Threading.Tasks; + +class Test +{ + public static void Main() + { + Func t = async delegate { + return null; + }; + + return; + } +} diff --git a/mcs/errors/cs9001.cs b/mcs/errors/cs8036.cs similarity index 100% rename from mcs/errors/cs9001.cs rename to mcs/errors/cs8036.cs diff --git a/mcs/errors/cs9002.cs b/mcs/errors/cs8037.cs similarity index 100% rename from mcs/errors/cs9002.cs rename to mcs/errors/cs8037.cs diff --git a/mcs/errors/cs9003.cs b/mcs/errors/cs8038.cs similarity index 52% rename from mcs/errors/cs9003.cs rename to mcs/errors/cs8038.cs index 00780bc101b..76dc74646d6 100644 --- a/mcs/errors/cs9003.cs +++ b/mcs/errors/cs8038.cs @@ -1,4 +1,4 @@ -// CS9003: Primary constructor of type `Test' has parameter of same name as type parameter `T' +// CS8038: Primary constructor of type `Test' has parameter of same name as type parameter `T' // Line: 4 class Test(T T) diff --git a/mcs/errors/cs9004.cs b/mcs/errors/cs8039.cs similarity index 51% rename from mcs/errors/cs9004.cs rename to mcs/errors/cs8039.cs index d3679285367..7793ffdd721 100644 --- a/mcs/errors/cs9004.cs +++ b/mcs/errors/cs8039.cs @@ -1,4 +1,4 @@ -// CS9004: Primary constructor of type `Test' has parameter of same name as containing type +// CS8039: Primary constructor of type `Test' has parameter of same name as containing type // Line: 4 class Test(object Test) diff --git a/mcs/errors/cs8041.cs b/mcs/errors/cs8041.cs new file mode 100644 index 00000000000..fa403dd25c5 --- /dev/null +++ b/mcs/errors/cs8041.cs @@ -0,0 +1,13 @@ +// CS8041: Primary constructor already has a body +// Line: 10 + +class C (int arg) +{ + { + arg = 1; + } + + { + arg = 2; + } +} diff --git a/mcs/errors/cs8043.cs b/mcs/errors/cs8043.cs new file mode 100644 index 00000000000..b7f9da825f6 --- /dev/null +++ b/mcs/errors/cs8043.cs @@ -0,0 +1,10 @@ +// CS8043: `S.S(long)': Structs with primary constructor cannot specify default constructor initializer +// Line: 6 + +struct S (int x) +{ + public S (long x) + : this () + { + } +} diff --git a/mcs/errors/cs8049.cs b/mcs/errors/cs8049.cs new file mode 100644 index 00000000000..0689057684c --- /dev/null +++ b/mcs/errors/cs8049.cs @@ -0,0 +1,11 @@ +// CS8049: Implemented interfaces cannot have arguments +// Line: 6 + +using System; + +class ID () : IDisposable () +{ + public void Dispose () + { + } +} diff --git a/mcs/errors/cs8050.cs b/mcs/errors/cs8050.cs new file mode 100644 index 00000000000..2f4b88bfc2a --- /dev/null +++ b/mcs/errors/cs8050.cs @@ -0,0 +1,7 @@ +// CS8050: `C.P': Only auto-implemented properties can have initializers +// Line: 6 + +abstract class C +{ + public abstract int P { get; } = 4; +} \ No newline at end of file diff --git a/mcs/errors/cs8051.cs b/mcs/errors/cs8051.cs new file mode 100644 index 00000000000..7935efbe608 --- /dev/null +++ b/mcs/errors/cs8051.cs @@ -0,0 +1,7 @@ +// CS8051: Auto-implemented property `Test.Property' must have set accessor or initializer +// Line: 6 + +public abstract class Test +{ + public string Property { get; } +} diff --git a/mcs/errors/cs8052.cs b/mcs/errors/cs8052.cs new file mode 100644 index 00000000000..bccf0157faf --- /dev/null +++ b/mcs/errors/cs8052.cs @@ -0,0 +1,7 @@ +// CS8052: Auto-implemented property `V.P' must have get accessor +// Line: 6 + +class V +{ + public object P { set; } = 1; +} \ No newline at end of file diff --git a/mcs/errors/cs8053.cs b/mcs/errors/cs8053.cs new file mode 100644 index 00000000000..319835ff09f --- /dev/null +++ b/mcs/errors/cs8053.cs @@ -0,0 +1,7 @@ +// CS8053: `I.P': Properties inside interfaces cannot have initializers +// Line: 6 + +interface I +{ + int P { get; } = 4; +} \ No newline at end of file diff --git a/mcs/errors/cs8054-2.cs b/mcs/errors/cs8054-2.cs new file mode 100644 index 00000000000..e633f176068 --- /dev/null +++ b/mcs/errors/cs8054-2.cs @@ -0,0 +1,6 @@ +// CS0573: `A.a': Structs without explicit constructors cannot contain members with initializers +// Line: 5 + +partial struct A { + int a = 1; +} diff --git a/mcs/errors/cs8054-3.cs b/mcs/errors/cs8054-3.cs new file mode 100644 index 00000000000..b06047fb6ee --- /dev/null +++ b/mcs/errors/cs8054-3.cs @@ -0,0 +1,6 @@ +// CS0573: `A.a': Structs without explicit constructors cannot contain members with initializers +// Line: 5 + +struct A { + int a = 1; +} diff --git a/mcs/errors/cs8054.cs b/mcs/errors/cs8054.cs new file mode 100644 index 00000000000..4b8fc2ed446 --- /dev/null +++ b/mcs/errors/cs8054.cs @@ -0,0 +1,7 @@ +// CS8054: `S.P': Structs without explicit constructors cannot contain members with initializers +// Line: 6 + +struct S +{ + public decimal P { get; } = -3; +} \ No newline at end of file diff --git a/mcs/errors/cs9005.cs b/mcs/errors/cs9005.cs deleted file mode 100644 index 85e4c017263..00000000000 --- a/mcs/errors/cs9005.cs +++ /dev/null @@ -1,10 +0,0 @@ -// CS9005: Constructor initializer cannot access primary constructor parameters -// Line: 7 - -class Test(string s) -{ - public Test () - : this (s) - { - } -} \ No newline at end of file diff --git a/mcs/errors/cs9007.cs b/mcs/errors/cs9007.cs deleted file mode 100644 index 05e9e3dfb1c..00000000000 --- a/mcs/errors/cs9007.cs +++ /dev/null @@ -1,12 +0,0 @@ -// CS9007: Primary constructor parameter `value' is not available in this context when using ref or out modifier -// Line: 12 - -class X (ref double value) -{ - public double Prop { - get { - return value; - } - } -} - diff --git a/mcs/jay/main.c b/mcs/jay/main.c index b47867d3e33..fcac218b1df 100644 --- a/mcs/jay/main.c +++ b/mcs/jay/main.c @@ -256,11 +256,17 @@ unsigned n; return (p); } +#ifdef __GNUC__ +#define GNUC_UNUSED __attribute__((__unused__)) +#else +#define GNUC_UNUSED +#endif create_file_names() { int i, len; char *tmpdir; + int mkstemp_res GNUC_UNUSED; #if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__) tmpdir = "."; @@ -303,9 +309,9 @@ create_file_names() prolog_file_name[len + 5] = 'p'; local_file_name[len + 5] = 'l'; - mkstemp(action_file_name); - mkstemp(prolog_file_name); - mkstemp(local_file_name); + mkstemp_res = mkstemp(action_file_name); + mkstemp_res = mkstemp(prolog_file_name); + mkstemp_res = mkstemp(local_file_name); len = strlen(file_prefix); diff --git a/mcs/mcs/anonymous.cs b/mcs/mcs/anonymous.cs index c97a5691987..82875ce62f8 100644 --- a/mcs/mcs/anonymous.cs +++ b/mcs/mcs/anonymous.cs @@ -1329,18 +1329,30 @@ protected virtual ParametersCompiled ResolveParameters (ResolveContext ec, TypeI return Parameters; } - protected override Expression DoResolve (ResolveContext ec) + protected override Expression DoResolve (ResolveContext rc) { - var isPlayScript = ec.FileType == SourceFileType.PlayScript; + var isPlayScript = rc.FileType == SourceFileType.PlayScript; - if (ec.HasSet (ResolveContext.Options.ConstantScope)) { - ec.Report.Error (1706, loc, "Anonymous methods and lambda expressions cannot be used in the current context"); + if (rc.HasSet (ResolveContext.Options.ConstantScope)) { + rc.Report.Error (1706, loc, "Anonymous methods and lambda expressions cannot be used in the current context"); return null; } // - // Set class type, set type + // Update top-level block generated duting parsing with actual top-level block // + if (rc.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.BaseInitializer) && rc.CurrentMemberDefinition.Parent.PartialContainer.PrimaryConstructorParameters != null) { + var tb = rc.ConstructorBlock.ParametersBlock.TopBlock; + if (Block.TopBlock != tb) { + Block b = Block; + while (b.Parent != Block.TopBlock && b != Block.TopBlock) + b = b.Parent; + + b.Parent = tb; + tb.IncludeBlock (Block, Block.TopBlock); + b.ParametersBlock.TopBlock = tb; + } + } eclass = ExprClass.Value; @@ -1351,25 +1363,14 @@ protected override Expression DoResolve (ResolveContext ec) // type = InternalType.AnonymousMethod; - if (!DoResolveParameters (ec)) + if (!DoResolveParameters (rc)) return null; -//<<<<<<< HEAD -//#if !STATIC -// // FIXME: The emitted code isn't very careful about reachability -// // so, ensure we have a 'ret' at the end -// BlockContext bc = ec as BlockContext; -// if (bc != null && bc.CurrentBranching != null && bc.CurrentBranching.CurrentUsageVector.IsUnreachable) -// bc.NeedReturnLabel (); -//#endif -// // Cast to Delgate for PlayScript (forces implicit conversion to Func<> or Action<> delegate types). if (isPlayScript) { - return new Cast(new TypeExpression(ec.BuiltinTypes.Delegate, this.Location), this, this.Location).Resolve (ec); + return new Cast(new TypeExpression(rc.BuiltinTypes.Delegate, this.Location), this, this.Location).Resolve (rc); } -//======= -//>>>>>>> d12330eda7746321b4611865d11e932e53ac55b8 return this; } @@ -1383,9 +1384,12 @@ public override void Emit (EmitContext ec) // nothing, as we only exist to not do anything. } - public static void Error_AddressOfCapturedVar (ResolveContext ec, IVariableReference var, Location loc) + public static void Error_AddressOfCapturedVar (ResolveContext rc, IVariableReference var, Location loc) { - ec.Report.Error (1686, loc, + if (rc.CurrentAnonymousMethod is AsyncInitializer) + return; + + rc.Report.Error (1686, loc, "Local variable or parameter `{0}' cannot have their address taken and be used inside an anonymous method, lambda expression or query expression", var.Name); } @@ -1756,6 +1760,7 @@ AnonymousMethodMethod DoCreateMethodHost (EmitContext ec) Modifiers modifiers; TypeDefinition parent = null; TypeParameters hoisted_tparams = null; + ParametersCompiled method_parameters = parameters; var src_block = Block.Original.Explicit; if (src_block.HasCapturedVariable || src_block.HasCapturedThis) { @@ -1803,6 +1808,14 @@ AnonymousMethodMethod DoCreateMethodHost (EmitContext ec) parent = storey = ec.CurrentAnonymousMethod.Storey; modifiers = Modifiers.STATIC | Modifiers.PRIVATE; + + // + // Convert generated method to closed delegate method where unused + // this argument is generated during compilation which speeds up dispatch + // by about 25% + // + method_parameters = ParametersCompiled.Prefix (method_parameters, + new Parameter (null, null, 0, null, loc), ec.Module.Compiler.BuiltinTypes.Object); } if (storey == null && hoisted_tparams == null) @@ -1828,7 +1841,7 @@ AnonymousMethodMethod DoCreateMethodHost (EmitContext ec) return new AnonymousMethodMethod (parent, this, storey, new TypeExpression (ReturnType, Location), modifiers, - member_name, parameters); + member_name, method_parameters); } protected override Expression DoResolve (ResolveContext ec) @@ -1857,7 +1870,7 @@ public override void Emit (EmitContext ec) } bool is_static = (method.ModFlags & Modifiers.STATIC) != 0; - if (is_static && am_cache == null) { + if (is_static && am_cache == null && !ec.IsStaticConstructor) { // // Creates a field cache to store delegate instance if it's not generic // diff --git a/mcs/mcs/argument.cs b/mcs/mcs/argument.cs index e5d46284e30..8e12cd8ea3c 100644 --- a/mcs/mcs/argument.cs +++ b/mcs/mcs/argument.cs @@ -294,6 +294,16 @@ public void AddOrdered (MovableArgument arg) ordered.Add (arg); } + public override void FlowAnalysis (FlowAnalysisContext fc, List movable = null) + { + foreach (var arg in ordered) { + if (arg.ArgType != Argument.AType.Out) + arg.FlowAnalysis (fc); + } + + base.FlowAnalysis (fc, ordered); + } + public override Arguments Emit (EmitContext ec, bool dup_args, bool prepareAwait) { foreach (var a in ordered) { @@ -543,7 +553,7 @@ public virtual Arguments Emit (EmitContext ec, bool dup_args, bool prepareAwait) return null; } - public void FlowAnalysis (FlowAnalysisContext fc) + public virtual void FlowAnalysis (FlowAnalysisContext fc, List movable = null) { bool has_out = false; foreach (var arg in args) { @@ -552,7 +562,14 @@ public void FlowAnalysis (FlowAnalysisContext fc) continue; } - arg.FlowAnalysis (fc); + if (movable == null) { + arg.FlowAnalysis (fc); + continue; + } + + var ma = arg as MovableArgument; + if (ma != null && !movable.Contains (ma)) + arg.FlowAnalysis (fc); } if (!has_out) diff --git a/mcs/mcs/assembly.cs b/mcs/mcs/assembly.cs index 80293e52b34..6188ee6ba4b 100644 --- a/mcs/mcs/assembly.cs +++ b/mcs/mcs/assembly.cs @@ -207,7 +207,7 @@ public void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, P return; if (Compiler.Settings.Target == Target.Exe) { - a.Error_AttributeEmitError ("The executables cannot be satelite assemblies, remove the attribute or keep it empty"); + Report.Error (7059, a.Location, "Executables cannot be satellite assemblies. Remove the attribute or keep it empty"); return; } @@ -231,7 +231,8 @@ public void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, P var vinfo = IsValidAssemblyVersion (value, true); if (vinfo == null) { - a.Error_AttributeEmitError (string.Format ("Specified version `{0}' is not valid", value)); + Report.Error (7034, a.Location, "The specified version string `{0}' does not conform to the required format - major[.minor[.build[.revision]]]", + value); return; } @@ -322,13 +323,18 @@ public void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, P if (a.Type == pa.InternalsVisibleTo) { string assembly_name = a.GetString (); + if (assembly_name == null) { + Report.Error (7030, a.Location, "Friend assembly reference cannot have `null' value"); + return; + } + if (assembly_name.Length == 0) return; #if STATIC ParsedAssemblyName aname; ParseAssemblyResult r = Fusion.ParseAssemblyName (assembly_name, out aname); if (r != ParseAssemblyResult.OK) { - Report.Warning (1700, 3, a.Location, "Assembly reference `{0}' is invalid and cannot be resolved", + Report.Warning (1700, 3, a.Location, "Friend assembly reference `{0}' is invalid and cannot be resolved", assembly_name); return; } @@ -353,7 +359,7 @@ public void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, P } else if (a.Type == pa.AssemblyFileVersion) { vi_product_version = a.GetString (); if (string.IsNullOrEmpty (vi_product_version) || IsValidAssemblyVersion (vi_product_version, false) == null) { - Report.Warning (1607, 1, a.Location, "The version number `{0}' specified for `{1}' is invalid", + Report.Warning (7035, 1, a.Location, "The specified version string `{0}' does not conform to the recommended format major.minor.build.revision", vi_product_version, a.Name); return; } @@ -399,8 +405,8 @@ void CheckReferencesPublicToken () } var ci = a.Assembly.GetName ().CultureInfo; - if (!ci.Equals (System.Globalization.CultureInfo.InvariantCulture)) { - Report.Warning (1607, 1, "Referenced assembly `{0}' has different culture setting of `{1}'", + if (!ci.Equals (CultureInfo.InvariantCulture)) { + Report.Warning (8009, 1, "Referenced assembly `{0}' has different culture setting of `{1}'", a.Name, ci.Name); } diff --git a/mcs/mcs/assign.cs b/mcs/mcs/assign.cs index af44b5f6e0a..bc384af4d2f 100644 --- a/mcs/mcs/assign.cs +++ b/mcs/mcs/assign.cs @@ -677,6 +677,7 @@ public override void EmitStatement (EmitContext ec) public override void FlowAnalysis (FlowAnalysisContext fc) { source.FlowAnalysis (fc); + ((FieldExpr) target).SetFieldAssigned (fc); } public bool IsDefaultInitializer { diff --git a/mcs/mcs/async.cs b/mcs/mcs/async.cs index 82a4096ceb0..ff4d2332600 100644 --- a/mcs/mcs/async.cs +++ b/mcs/mcs/async.cs @@ -74,10 +74,6 @@ public override void FlowAnalysis (FlowAnalysisContext fc) protected override Expression DoResolve (ResolveContext rc) { - if (rc.HasSet (ResolveContext.Options.FinallyScope)) { - rc.Report.Error (1984, loc, "The `await' operator cannot be used in the body of a finally clause"); - } - if (rc.HasSet (ResolveContext.Options.LockScope)) { rc.Report.Error (1996, loc, "The `await' operator cannot be used in the body of a lock statement"); @@ -257,7 +253,7 @@ public void EmitPrologue (EmitContext ec) var fe_awaiter = new FieldExpr (awaiter, loc); fe_awaiter.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc); - Label skip_continuation = ec.DefineLabel (); + Label skip_continuation = ec.DefineLabel (); using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) { // @@ -337,10 +333,6 @@ public override bool Resolve (BlockContext bc) return false; } - if (bc.HasSet (ResolveContext.Options.CatchScope)) { - bc.Report.Error (1985, loc, "The `await' operator cannot be used in a catch clause"); - } - if (!base.Resolve (bc)) return false; @@ -460,6 +452,10 @@ public TypeSpec DelegateType { get; set; } + public StackFieldExpr HoistedReturnState { + get; set; + } + public override bool IsIterator { get { return false; @@ -477,9 +473,9 @@ public TypeInferenceContext ReturnTypeInference { protected override BlockContext CreateBlockContext (BlockContext bc) { var ctx = base.CreateBlockContext (bc); - var lambda = bc.CurrentAnonymousMethod as LambdaMethod; - if (lambda != null) - return_inference = lambda.ReturnTypeInference; + var am = bc.CurrentAnonymousMethod as AnonymousMethodBody; + if (am != null) + return_inference = am.ReturnTypeInference; ctx.Set (ResolveContext.Options.TryScope); @@ -491,6 +487,24 @@ public override void Emit (EmitContext ec) throw new NotImplementedException (); } + public void EmitCatchBlock (EmitContext ec) + { + var catch_value = LocalVariable.CreateCompilerGenerated (ec.Module.Compiler.BuiltinTypes.Exception, block, Location); + + ec.BeginCatchBlock (catch_value.Type); + catch_value.EmitAssign (ec); + + ec.EmitThis (); + ec.EmitInt ((int) IteratorStorey.State.After); + ec.Emit (OpCodes.Stfld, storey.PC.Spec); + + ((AsyncTaskStorey) Storey).EmitSetException (ec, new LocalVariableReference (catch_value, Location)); + + ec.Emit (OpCodes.Leave, move_next_ok); + ec.EndExceptionBlock (); + + } + protected override void EmitMoveNextEpilogue (EmitContext ec) { var storey = (AsyncTaskStorey) Storey; @@ -522,7 +536,6 @@ class AsyncTaskStorey : StateMachine MethodSpec builder_factory; MethodSpec builder_start; PropertySpec task; - LocalVariable hoisted_return; int locals_captured; Dictionary> stack_fields; Dictionary> awaiter_fields; @@ -536,11 +549,7 @@ public AsyncTaskStorey (ParametersBlock block, IMemberContext context, AsyncInit #region Properties - public LocalVariable HoistedReturn { - get { - return hoisted_return; - } - } + public Expression HoistedReturnValue { get; set; } public TypeSpec ReturnType { get { @@ -589,7 +598,7 @@ public Field AddAwaiter (TypeSpec type) return field; } - public Field AddCapturedLocalVariable (TypeSpec type) + public Field AddCapturedLocalVariable (TypeSpec type, bool requiresUninitialized = false) { if (mutator != null) type = mutator.Mutate (type); @@ -597,7 +606,7 @@ public Field AddCapturedLocalVariable (TypeSpec type) List existing_fields = null; if (stack_fields == null) { stack_fields = new Dictionary> (); - } else if (stack_fields.TryGetValue (type, out existing_fields)) { + } else if (stack_fields.TryGetValue (type, out existing_fields) && !requiresUninitialized) { foreach (var f in existing_fields) { if (f.IsAvailableForReuse) { f.IsAvailableForReuse = false; @@ -730,7 +739,7 @@ protected override bool DoDefineMembers () set_state_machine.Block.AddStatement (new StatementExpression (new Invocation (mg, args))); if (has_task_return_type) { - hoisted_return = LocalVariable.CreateCompilerGenerated (bt.TypeArguments[0], StateMachineMethod.Block, Location); + HoistedReturnValue = TemporaryVariableReference.Create (bt.TypeArguments [0], StateMachineMethod.Block, Location); } return true; @@ -917,11 +926,11 @@ public void EmitSetResult (EmitContext ec) }; Arguments args; - if (hoisted_return == null) { + if (HoistedReturnValue == null) { args = new Arguments (0); } else { args = new Arguments (1); - args.Add (new Argument (new LocalVariableReference (hoisted_return, Location))); + args.Add (new Argument (HoistedReturnValue)); } using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) { diff --git a/mcs/mcs/attribute.cs b/mcs/mcs/attribute.cs index 74aa1cbe1f1..cf30b794412 100644 --- a/mcs/mcs/attribute.cs +++ b/mcs/mcs/attribute.cs @@ -258,19 +258,22 @@ public void Error_MisusedDynamicAttribute () Report.Error (1970, loc, "Do not use `{0}' directly. Use `dynamic' keyword instead", GetSignatureForError ()); } - /// - /// This is rather hack. We report many emit attribute error with same error to be compatible with - /// csc. But because csc has to report them this way because error came from ilasm we needn't. - /// - public void Error_AttributeEmitError (string inner) + void Error_AttributeEmitError (string inner) { Report.Error (647, Location, "Error during emitting `{0}' attribute. The reason is `{1}'", Type.GetSignatureForError (), inner); } + public void Error_InvalidArgumentValue (TypeSpec attributeType) + { + Report.Error (591, Location, "Invalid value for argument to `{0}' attribute", attributeType.GetSignatureForError ()); + } + public void Error_InvalidSecurityParent () { - Error_AttributeEmitError ("it is attached to invalid parent"); + Report.Error (7070, Location, + "Security attribute `{0}' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations", + Type.GetSignatureForError ()); } Attributable Owner { @@ -412,7 +415,7 @@ static bool IsValidMethodImplOption (int value) return ((MethodImplOptions) value | all) == all; } - static bool IsValidArgumentType (TypeSpec t) + public static bool IsValidArgumentType (TypeSpec t) { if (t.IsArray) { var ac = (ArrayContainer) t; @@ -831,6 +834,7 @@ bool IsSecurityActionValid () { SecurityAction action = GetSecurityActionValue (); bool for_assembly = Target == AttributeTargets.Assembly || Target == AttributeTargets.Module; + var c = (Constant)pos_args [0].Expr; switch (action) { #pragma warning disable 618 @@ -853,11 +857,22 @@ bool IsSecurityActionValid () #pragma warning restore 618 default: - Error_AttributeEmitError ("SecurityAction is out of range"); + Report.Error (7049, c.Location, "Security attribute `{0}' has an invalid SecurityAction value `{1}'", + Type.GetSignatureForError (), c.GetValueAsLiteral()); return false; } - Error_AttributeEmitError (String.Concat ("SecurityAction `", action, "' is not valid for this declaration")); + switch (Target) { + case AttributeTargets.Assembly: + Report.Error (7050, c.Location, "SecurityAction value `{0}' is invalid for security attributes applied to an assembly", + c.GetSignatureForError ()); + break; + default: + Report.Error (7051, c.Location, "SecurityAction value `{0}' is invalid for security attributes applied to a type or a method", + c.GetSignatureForError ()); + break; + } + return false; } @@ -1026,44 +1041,42 @@ public void Emit (Dictionary> allEmitted) return; } } else if (Type == predefined.Guid) { + string v = ((StringConstant) arg_expr).Value; try { - string v = ((StringConstant) arg_expr).Value; new Guid (v); - } catch (Exception e) { - Error_AttributeEmitError (e.Message); + } catch { + Error_InvalidArgumentValue (Type); return; } } else if (Type == predefined.AttributeUsage) { int v = ((IntConstant) ((EnumConstant) arg_expr).Child).Value; - if (v == 0) { - context.Module.Compiler.Report.Error (591, Location, "Invalid value for argument to `{0}' attribute", - "System.AttributeUsage"); - } + if (v == 0) + Error_InvalidArgumentValue (Type); } else if (Type == predefined.MarshalAs) { if (pos_args.Count == 1) { var u_type = (UnmanagedType) System.Enum.Parse (typeof (UnmanagedType), ((Constant) pos_args[0].Expr).GetValue ().ToString ()); if (u_type == UnmanagedType.ByValArray && !(Owner is FieldBase)) { - Error_AttributeEmitError ("Specified unmanaged type is only valid on fields"); + Report.Error (7055, pos_args [0].Expr.Location, "Unmanaged type `ByValArray' is only valid for fields"); } } } else if (Type == predefined.DllImport) { if (pos_args.Count == 1 && pos_args[0].Expr is Constant) { var value = ((Constant) pos_args[0].Expr).GetValue () as string; if (string.IsNullOrEmpty (value)) - Error_AttributeEmitError ("DllName cannot be empty or null"); + Error_InvalidArgumentValue (Type); } } else if (Type == predefined.MethodImpl) { if (pos_args.Count == 1) { var value = (int) ((Constant) arg_expr).GetValueAsLong (); if (!IsValidMethodImplOption (value)) { - Error_AttributeEmitError ("Incorrect argument value"); + Error_InvalidArgumentValue (Type); } } } } - arg_expr.EncodeAttributeValue (context, encoder, pt); + arg_expr.EncodeAttributeValue (context, encoder, pt, pt); } } @@ -1077,7 +1090,7 @@ public void Emit (Dictionary> allEmitted) encoder.Encode (na.Key.Type); encoder.Encode (na.Value.Name); - na.Value.Expr.EncodeAttributeValue (context, encoder, na.Key.Type); + na.Value.Expr.EncodeAttributeValue (context, encoder, na.Key.Type, na.Key.Type); } } else { encoder.EncodeEmptyNamedArguments (); @@ -1527,7 +1540,7 @@ public void EncodeNamedPropertyArgument (PropertySpec property, Constant value) Encode ((byte) 0x54); // property Encode (property.MemberType); Encode (property.Name); - value.EncodeAttributeValue (null, this, property.MemberType); + value.EncodeAttributeValue (null, this, property.MemberType, property.MemberType); } // @@ -1539,7 +1552,7 @@ public void EncodeNamedFieldArgument (FieldSpec field, Constant value) Encode ((byte) 0x53); // field Encode (field.MemberType); Encode (field.Name); - value.EncodeAttributeValue (null, this, field.MemberType); + value.EncodeAttributeValue (null, this, field.MemberType, field.MemberType); } public void EncodeNamedArguments (T[] members, Constant[] values) where T : MemberSpec, IInterfaceMemberSpec @@ -1559,7 +1572,7 @@ public void EncodeNamedArguments (T[] members, Constant[] values) where T : M Encode (member.MemberType); Encode (member.Name); - values [i].EncodeAttributeValue (null, this, member.MemberType); + values [i].EncodeAttributeValue (null, this, member.MemberType, member.MemberType); } } diff --git a/mcs/mcs/cfold.cs b/mcs/mcs/cfold.cs index 515f8637c7c..c514c69e5ac 100644 --- a/mcs/mcs/cfold.cs +++ b/mcs/mcs/cfold.cs @@ -93,6 +93,8 @@ internal static void Error_CompileTimeOverflow (ResolveContext rc, Location loc) static public Constant BinaryFold (ResolveContext ec, Binary.Operator oper, Constant left, Constant right, Location loc) { + var isPlayScript = ec.FileType == SourceFileType.PlayScript; + Constant result = null; if (left is EmptyConstantCast) @@ -315,7 +317,7 @@ static public Constant BinaryFold (ResolveContext ec, Binary.Operator oper, // In PlayScript, null has the string value "null". In C#, it is the empty string. // #if !DISABLE_AS3_NULL_STRINGS - var nullString = ec.FileType == SourceFileType.PlayScript ? "null" : ""; + var nullString = isPlayScript ? "null" : ""; #else var nullString = ""; #endif @@ -332,11 +334,19 @@ static public Constant BinaryFold (ResolveContext ec, Binary.Operator oper, return new StringConstant (ec.BuiltinTypes, (string)leftValue + (string)rightValue, left.Location); } - if (lt == InternalType.NullLiteral) - return new StringConstant (ec.BuiltinTypes, nullString + right.GetValue (), left.Location); + if (isPlayScript) { + if (lt == InternalType.NullLiteral) + return new StringConstant (ec.BuiltinTypes, nullString + right.GetValue (), left.Location); - if (rt == InternalType.NullLiteral) - return new StringConstant (ec.BuiltinTypes, left.GetValue () + nullString, left.Location); + if (rt == InternalType.NullLiteral) + return new StringConstant (ec.BuiltinTypes, left.GetValue () + nullString, left.Location); + } + + if (lt == InternalType.NullLiteral || left.IsNull) + return new StringConstant (ec.BuiltinTypes, "" + right.GetValue (), left.Location); + + if (rt == InternalType.NullLiteral || right.IsNull) + return new StringConstant (ec.BuiltinTypes, left.GetValue () + "", left.Location); return null; } @@ -390,8 +400,8 @@ static public Constant BinaryFold (ResolveContext ec, Binary.Operator oper, return null; result = result.Reduce (ec, lt); - if (result == null) - return null; + if (result == null || lt.IsEnum) + return result; return new EnumConstant (result, lt); } diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs index 9da9e2789cb..a2afb6ccb6a 100644 --- a/mcs/mcs/class.cs +++ b/mcs/mcs/class.cs @@ -629,7 +629,8 @@ enum CachedMethods public int AnonymousMethodsCounter; public int MethodGroupsCounter; - static readonly string[] attribute_targets = new string[] { "type" }; + static readonly string[] attribute_targets = new [] { "type" }; + static readonly string[] attribute_targets_primary = new [] { "type", "method" }; /// /// The pending methods that need to be implemented @@ -808,6 +809,10 @@ string ITypeDefinition.Namespace { public ParametersCompiled PrimaryConstructorParameters { get; set; } + public Arguments PrimaryConstructorBaseArguments { get; set; } + + public Location PrimaryConstructorBaseArgumentsStart { get; set; } + public TypeParameters TypeParametersAll { get { return all_type_parameters; @@ -816,7 +821,7 @@ public TypeParameters TypeParametersAll { public override string[] ValidAttributeTargets { get { - return attribute_targets; + return PrimaryConstructorParameters != null ? attribute_targets_primary : attribute_targets; } } @@ -925,9 +930,6 @@ public virtual void AddNameToContainer (MemberCore symbol, string name) if (symbol is TypeParameter) { Report.Error (692, symbol.Location, "Duplicate type parameter `{0}'", symbol.GetSignatureForError ()); - } else if (symbol is PrimaryConstructorField && mc is TypeParameter) { - Report.Error (9003, symbol.Location, "Primary constructor of type `{0}' has parameter of same name as type parameter `{1}'", - symbol.Parent.GetSignatureForError (), symbol.GetSignatureForError ()); } else { Report.Error (102, symbol.Location, "The type `{0}' already contains a definition for `{1}'", @@ -1043,6 +1045,21 @@ public void AddPartialPart (TypeDefinition part) public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa) { + if (a.Target == AttributeTargets.Method) { + foreach (var m in members) { + var c = m as Constructor; + if (c == null) + continue; + + if (c.IsPrimaryConstructor) { + c.ApplyAttributeBuilder (a, ctor, cdata, pa); + return; + } + } + + throw new InternalErrorException (); + } + if (has_normal_indexers && a.Type == pa.DefaultMember) { Report.Error (646, a.Location, "Cannot specify the `DefaultMember' attribute on type containing an indexer"); return; @@ -1741,7 +1758,7 @@ bool DoDefineBaseType () if (PrimaryConstructorParameters != null) { if (PartialContainer.PrimaryConstructorParameters != null) { - Report.Error (9001, Location, "Only one part of a partial type can declare primary constructor parameters"); + Report.Error (8036, Location, "Only one part of a partial type can declare primary constructor parameters"); } else { PartialContainer.PrimaryConstructorParameters = PrimaryConstructorParameters; } @@ -1774,6 +1791,10 @@ bool DoDefineBaseType () } if (iface_exprs != null) { + if (!PrimaryConstructorBaseArgumentsStart.IsNull) { + Report.Error (8049, PrimaryConstructorBaseArgumentsStart, "Implemented interfaces cannot have arguments"); + } + foreach (var iface_type in iface_exprs) { // Prevents a crash, the interface might not have been resolved: 442144 if (iface_type == null) @@ -1802,8 +1823,12 @@ bool DoDefineBaseType () // defined after current container // if (class_partial_parts != null) { - foreach (var pp in class_partial_parts) + foreach (var pp in class_partial_parts) { + if (pp.PrimaryConstructorBaseArguments != null) + PrimaryConstructorBaseArguments = pp.PrimaryConstructorBaseArguments; + pp.DoDefineBaseType (); + } } @@ -1992,7 +2017,7 @@ public override void RemoveContainer (TypeContainer cont) protected virtual bool DoResolveTypeParameters () { - var tparams = CurrentTypeParameters; + var tparams = MemberName.TypeParameters; if (tparams == null) return true; @@ -2004,6 +2029,20 @@ protected virtual bool DoResolveTypeParameters () error = true; return false; } + + if (IsPartialPart) { + var pc_tp = PartialContainer.CurrentTypeParameters [i]; + + tp.Create (spec, this); + tp.Define (pc_tp); + + if (tp.OptAttributes != null) { + if (pc_tp.OptAttributes == null) + pc_tp.OptAttributes = tp.OptAttributes; + else + pc_tp.OptAttributes.Attrs.AddRange (tp.OptAttributes.Attrs); + } + } } if (IsPartialPart) { @@ -2789,7 +2828,7 @@ protected ClassOrStruct (TypeContainer parent, MemberName name, Attributes attrs { } - public Arguments PrimaryConstructorBaseArguments { get; set; } + public ToplevelBlock PrimaryConstructorBlock { get; set; } protected override TypeAttributes TypeAttr { get { @@ -2819,12 +2858,6 @@ public override void AddNameToContainer (MemberCore symbol, string name) return; } - if (symbol is PrimaryConstructorField) { - Report.Error (9004, symbol.Location, "Primary constructor of type `{0}' has parameter of same name as containing type", - symbol.Parent.GetSignatureForError ()); - return; - } - InterfaceMemberBase imb = symbol as InterfaceMemberBase; if (imb == null || !imb.IsExplicitImpl) { Report.SymbolRelatedToPreviousError (this); @@ -2868,23 +2901,30 @@ protected virtual Constructor DefineDefaultConstructor (bool is_static) // The default static constructor is private Modifiers mods; + ParametersCompiled parameters = null; if (is_static) { mods = Modifiers.STATIC | Modifiers.PRIVATE; + parameters = ParametersCompiled.EmptyReadOnlyParameters; } else { mods = ((ModFlags & Modifiers.ABSTRACT) != 0) ? Modifiers.PROTECTED : Modifiers.PUBLIC; + parameters = PrimaryConstructorParameters ?? ParametersCompiled.EmptyReadOnlyParameters; } - var c = new Constructor (this, MemberName.Name, mods, null, PrimaryConstructorParameters ?? ParametersCompiled.EmptyReadOnlyParameters, Location); + var c = new Constructor (this, MemberName.Name, mods, null, parameters, Location); if (Kind == MemberKind.Class) c.Initializer = new GeneratedBaseInitializer (Location, PrimaryConstructorBaseArguments); - if (PrimaryConstructorParameters != null) + if (PrimaryConstructorParameters != null && !is_static) c.IsPrimaryConstructor = true; AddConstructor (c, true); - c.Block = new ToplevelBlock (Compiler, c.ParameterInfo, Location) { - IsCompilerGenerated = true - }; + if (PrimaryConstructorBlock == null) { + c.Block = new ToplevelBlock (Compiler, parameters, Location) { + IsCompilerGenerated = true + }; + } else { + c.Block = PrimaryConstructorBlock; + } return c; } @@ -2895,14 +2935,20 @@ protected override bool DoDefineMembers () if (PrimaryConstructorParameters != null) { foreach (Parameter p in PrimaryConstructorParameters.FixedParameters) { - if ((p.ModFlags & Parameter.Modifier.RefOutMask) != 0) - continue; - - var f = new PrimaryConstructorField (this, p); - AddField (f); + if (p.Name == MemberName.Name) { + Report.Error (8039, p.Location, "Primary constructor of type `{0}' has parameter of same name as containing type", + GetSignatureForError ()); + } - generated_primary_constructor.Block.AddStatement ( - new StatementExpression (new PrimaryConstructorAssign (f, p), p.Location)); + if (CurrentTypeParameters != null) { + for (int i = 0; i < CurrentTypeParameters.Count; ++i) { + var tp = CurrentTypeParameters [i]; + if (p.Name == tp.Name) { + Report.Error (8038, p.Location, "Primary constructor of type `{0}' has parameter of same name as type parameter `{1}'", + GetSignatureForError (), p.GetSignatureForError ()); + } + } + } } } @@ -3458,6 +3504,20 @@ public override void Emit () base.Emit (); } + bool HasExplicitConstructor () + { + foreach (var m in Members) { + var c = m as Constructor; + if (c == null) + continue; + + if (!c.ParameterInfo.IsEmpty) + return true; + } + + return false; + } + public override bool IsUnmanagedType () { if (has_unmanaged_check_done) @@ -3513,14 +3573,15 @@ protected override TypeSpec[] ResolveBaseTypes (out FullNamedExpression base_cla public override void RegisterFieldForInitialization (MemberCore field, FieldInitializer expression) { - if ((field.ModFlags & Modifiers.STATIC) == 0) { - Report.Error (573, field.Location, "`{0}': Structs cannot have instance field initializers", + if ((field.ModFlags & Modifiers.STATIC) == 0 && !HasExplicitConstructor ()) { + Report.Error (8054, field.Location, "`{0}': Structs without explicit constructors cannot contain members with initializers", field.GetSignatureForError ()); + return; } + base.RegisterFieldForInitialization (field, expression); } - } /// @@ -4197,25 +4258,29 @@ protected virtual void DoMemberTypeDependentChecks () Report.SymbolRelatedToPreviousError (MemberType); if (this is Property) Report.Error (53, Location, - "Inconsistent accessibility: property type `" + - MemberType.GetSignatureForError () + "' is less " + - "accessible than property `" + GetSignatureForError () + "'"); + "Inconsistent accessibility: property type `" + + MemberType.GetSignatureForError () + "' is less " + + "accessible than property `" + GetSignatureForError () + "'"); else if (this is Indexer) Report.Error (54, Location, - "Inconsistent accessibility: indexer return type `" + - MemberType.GetSignatureForError () + "' is less " + - "accessible than indexer `" + GetSignatureForError () + "'"); + "Inconsistent accessibility: indexer return type `" + + MemberType.GetSignatureForError () + "' is less " + + "accessible than indexer `" + GetSignatureForError () + "'"); else if (this is MethodCore) { if (this is Operator) Report.Error (56, Location, - "Inconsistent accessibility: return type `" + - MemberType.GetSignatureForError () + "' is less " + - "accessible than operator `" + GetSignatureForError () + "'"); + "Inconsistent accessibility: return type `" + + MemberType.GetSignatureForError () + "' is less " + + "accessible than operator `" + GetSignatureForError () + "'"); else Report.Error (50, Location, - "Inconsistent accessibility: return type `" + - MemberType.GetSignatureForError () + "' is less " + - "accessible than method `" + GetSignatureForError () + "'"); + "Inconsistent accessibility: return type `" + + MemberType.GetSignatureForError () + "' is less " + + "accessible than method `" + GetSignatureForError () + "'"); + } else if (this is Event) { + Report.Error (7025, Location, + "Inconsistent accessibility: event type `{0}' is less accessible than event `{1}'", + MemberType.GetSignatureForError (), GetSignatureForError ()); } else { Report.Error (52, Location, "Inconsistent accessibility: field type `" + diff --git a/mcs/mcs/codegen.cs b/mcs/mcs/codegen.cs index 951b4d10f74..3967cd5c380 100644 --- a/mcs/mcs/codegen.cs +++ b/mcs/mcs/codegen.cs @@ -161,6 +161,12 @@ public bool IsStatic { get { return member_context.IsStatic; } } + public bool IsStaticConstructor { + get { + return member_context.IsStatic && (flags & Options.ConstructorScope) != 0; + } + } + public bool IsAnonymousStoreyMutateRequired { get { return CurrentAnonymousMethod != null && @@ -181,6 +187,12 @@ public ModuleContainer Module { } } + public bool NotifyEvaluatorOnStore { + get { + return Module.Evaluator != null && Module.Evaluator.ModificationListener != null; + } + } + // Has to be used for specific emitter errors only any // possible resolver errors have to be reported during Resolve public Report Report { @@ -210,6 +222,10 @@ public List StatementEpilogue { } } + public LocalVariable AsyncThrowVariable { get; set; } + + public List TryFinallyUnwind { get; set; } + #endregion public void AddStatementEpilog (IExpressionCleanup cleanupExpression) @@ -386,9 +402,9 @@ public Label DefineLabel () // // Creates temporary field in current async storey // - public StackFieldExpr GetTemporaryField (TypeSpec type) + public StackFieldExpr GetTemporaryField (TypeSpec type, bool initializedFieldRequired = false) { - var f = AsyncTaskStorey.AddCapturedLocalVariable (type); + var f = AsyncTaskStorey.AddCapturedLocalVariable (type, initializedFieldRequired); var fexpr = new StackFieldExpr (f); fexpr.InstanceExpression = new CompilerGeneratedThis (CurrentType, Location.Null); return fexpr; @@ -524,8 +540,16 @@ public void EmitArrayLoad (ArrayContainer ac) type = EnumSpec.GetUnderlyingType (type); switch (type.BuiltinType) { - case BuiltinTypeSpec.Type.Byte: case BuiltinTypeSpec.Type.Bool: + // + // Workaround MSIL limitation. Load bool element as single bit, + // bool array can actually store any byte value + // + ig.Emit (OpCodes.Ldelem_U1); + ig.Emit (OpCodes.Ldc_I4_1); + ig.Emit (OpCodes.And); + break; + case BuiltinTypeSpec.Type.Byte: ig.Emit (OpCodes.Ldelem_U1); break; case BuiltinTypeSpec.Type.SByte: @@ -740,8 +764,12 @@ public void EmitLoadFromPtr (TypeSpec type) ig.Emit (OpCodes.Ldind_U1); break; case BuiltinTypeSpec.Type.SByte: + ig.Emit (OpCodes.Ldind_I1); + break; case BuiltinTypeSpec.Type.Bool: ig.Emit (OpCodes.Ldind_I1); + ig.Emit (OpCodes.Ldc_I4_1); + ig.Emit (OpCodes.And); break; case BuiltinTypeSpec.Type.ULong: case BuiltinTypeSpec.Type.Long: diff --git a/mcs/mcs/constant.cs b/mcs/mcs/constant.cs index 397f0739691..0333914f0b7 100644 --- a/mcs/mcs/constant.cs +++ b/mcs/mcs/constant.cs @@ -554,7 +554,7 @@ public override long GetValueAsLong () return Value ? 1 : 0; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -605,7 +605,7 @@ public ByteConstant (TypeSpec type, byte v, Location loc) Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -705,7 +705,7 @@ public CharConstant (TypeSpec type, char v, Location loc) Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode ((ushort) Value); } @@ -833,7 +833,7 @@ public SByteConstant (TypeSpec type, sbyte v, Location loc) Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -936,7 +936,7 @@ public ShortConstant (TypeSpec type, short v, Location loc) Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1049,7 +1049,7 @@ public UShortConstant (TypeSpec type, ushort v, Location loc) Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1158,7 +1158,7 @@ public IntConstant (TypeSpec type, int v, Location loc) Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1334,7 +1334,7 @@ public UIntConstant (TypeSpec type, uint v, Location loc) Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1451,7 +1451,7 @@ public LongConstant (TypeSpec type, long v, Location loc) Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1582,7 +1582,7 @@ public ULongConstant (TypeSpec type, ulong v, Location loc) Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1707,7 +1707,7 @@ public override Constant ConvertImplicitly (TypeSpec type, ResolveContext opt_ec return base.ConvertImplicitly (type, opt_ec, upconvert_only); } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1836,7 +1836,7 @@ public DoubleConstant (TypeSpec type, double v, Location loc) Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -2122,7 +2122,7 @@ public override void Emit (EmitContext ec) ec.Emit (OpCodes.Ldstr, Value); } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { // cast to object if (type != targetType) @@ -2187,7 +2187,7 @@ public override Expression CreateExpressionTree (ResolveContext ec) return base.CreateExpressionTree (ec); } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { switch (targetType.BuiltinType) { case BuiltinTypeSpec.Type.Object: @@ -2208,7 +2208,7 @@ public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder e break; } - base.EncodeAttributeValue (rc, enc, targetType); + base.EncodeAttributeValue (rc, enc, targetType, parameterType); } public override void Emit (EmitContext ec) @@ -2348,6 +2348,11 @@ public override bool IsSideEffectFree { } } + public override bool ContainsEmitWithAwait () + { + return side_effect.ContainsEmitWithAwait (); + } + public override object GetValue () { return value.GetValue (); @@ -2375,6 +2380,11 @@ public override void EmitSideEffect (EmitContext ec) value.EmitSideEffect (ec); } + public override void FlowAnalysis (FlowAnalysisContext fc) + { + side_effect.FlowAnalysis (fc); + } + public override bool IsDefaultValue { get { return value.IsDefaultValue; } } diff --git a/mcs/mcs/context.cs b/mcs/mcs/context.cs index 9fb37290596..2c90b8dd3aa 100644 --- a/mcs/mcs/context.cs +++ b/mcs/mcs/context.cs @@ -760,7 +760,7 @@ public enum Options ConstructorScope = 1 << 3, - AsyncBody = 1 << 4 + AsyncBody = 1 << 4, } // utility helper for CheckExpr, UnCheckExpr, Checked and Unchecked statements diff --git a/mcs/mcs/convert.cs b/mcs/mcs/convert.cs index d0c3952e313..f475b03df95 100644 --- a/mcs/mcs/convert.cs +++ b/mcs/mcs/convert.cs @@ -27,6 +27,15 @@ namespace Mono.CSharp { // static class Convert { + [Flags] + public enum UserConversionRestriction + { + None = 0, + ImplicitOnly = 1, + ProbingOnly = 1 << 1, + NullableSourceOnly = 1 << 2 + + } // // From a one-dimensional array-type S[] to System.Collections.IList and base // interfaces of this interface, provided there is an implicit reference conversion @@ -197,10 +206,12 @@ public static bool ImplicitReferenceConversionExists (TypeSpec expr_type, TypeSp public static bool ImplicitReferenceConversionExists (TypeSpec expr_type, TypeSpec target_type, bool refOnlyTypeParameter, ResolveContext opt_ec, bool upconvert_only) { + var isPlayScript = (opt_ec == null) ? false : (opt_ec.FileType == SourceFileType.PlayScript) ? true : false; + // It's here only to speed things up - if (target_type.IsStruct) { + if (target_type.IsStruct) return false; - } + switch (expr_type.Kind) { case MemberKind.TypeParameter: @@ -266,7 +277,7 @@ public static bool ImplicitReferenceConversionExists (TypeSpec expr_type, TypeSp // var args. We want the function to receive 1 parameter of // type array, rather than n parameters. // - if (opt_ec != null && opt_ec.FileType == SourceFileType.PlayScript) + if (isPlayScript) return false; // @@ -574,7 +585,7 @@ public static Expression ImplicitNulableConversion (ResolveContext ec, Expressio if (expr is Constant) return ((Constant) expr).ConvertImplicitly (t_el, ec); - return ImplicitNumericConversion (null, expr_type, t_el, ec); + return ImplicitNumericConversion (null, expr_type, t_el, ec, false); } Expression unwrap; @@ -588,7 +599,7 @@ public static Expression ImplicitNulableConversion (ResolveContext ec, Expressio if (conv is Constant) conv = ((Constant)conv).ConvertImplicitly (t_el, ec); else - conv = ImplicitNumericConversion (conv, expr_type, t_el, ec); + conv = ImplicitNumericConversion (conv, expr_type, t_el, ec, false); if (conv == null) return null; @@ -606,19 +617,20 @@ public static Expression ImplicitNulableConversion (ResolveContext ec, Expressio /// expr is the expression to convert, returns a new expression of type /// target_type or null if an implicit conversion is not possible. /// - public static Expression ImplicitNumericConversion (Expression expr, TypeSpec target_type, ResolveContext opt_ec, bool upconvert_only = false) + public static Expression ImplicitNumericConversion (Expression expr, TypeSpec target_type, ResolveContext opt_ec, bool upconvert_only) { return ImplicitNumericConversion (expr, expr.Type, target_type, opt_ec, upconvert_only); } - public static bool ImplicitNumericConversionExists (TypeSpec expr_type, TypeSpec target_type, ResolveContext opt_ec, bool upconvert_only = false) + public static bool ImplicitNumericConversionExists (TypeSpec expr_type, TypeSpec target_type, ResolveContext opt_ec, bool upconvert_only) { return ImplicitNumericConversion (null, expr_type, target_type, opt_ec, upconvert_only) != null; } - static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type, TypeSpec target_type, ResolveContext opt_ec, bool upconvert_only = false) + static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type, TypeSpec target_type, ResolveContext opt_ec, bool upconvert_only) { - SourceFileType ft = opt_ec == null ? SourceFileType.CSharp : opt_ec.FileType; + var isPlayScript = (opt_ec == null) ? false : (opt_ec.FileType == SourceFileType.PlayScript) ? true : false; + switch (expr_type.BuiltinType) { case BuiltinTypeSpec.Type.SByte: // @@ -638,7 +650,7 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type case BuiltinTypeSpec.Type.Decimal: return expr == null ? EmptyExpression.Null : new OperatorCast (expr, target_type); case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return expr == null ? EmptyExpression.Null : new Binary(Binary.Operator.Inequality, expr, new IntLiteral(opt_ec.BuiltinTypes, 0, expr.Location)).Resolve(opt_ec); break; } @@ -664,7 +676,7 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type case BuiltinTypeSpec.Type.Decimal: return expr == null ? EmptyExpression.Null : new OperatorCast (expr, target_type); case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return expr == null ? EmptyExpression.Null : new Binary(Binary.Operator.Inequality, expr, new UIntLiteral(opt_ec.BuiltinTypes, 0, expr.Location)).Resolve(opt_ec); break; } @@ -685,7 +697,7 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type case BuiltinTypeSpec.Type.Decimal: return expr == null ? EmptyExpression.Null : new OperatorCast (expr, target_type); case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return expr == null ? EmptyExpression.Null : new Binary(Binary.Operator.Inequality, expr, new IntLiteral(opt_ec.BuiltinTypes, 0, expr.Location)).Resolve(opt_ec); break; } @@ -709,8 +721,8 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type case BuiltinTypeSpec.Type.Decimal: return expr == null ? EmptyExpression.Null : new OperatorCast (expr, target_type); case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) - return expr == null ? EmptyExpression.Null : new Binary(Binary.Operator.Inequality, expr, new UIntLiteral(opt_ec.BuiltinTypes, 0, expr.Location)).Resolve(opt_ec); + if (isPlayScript) + return expr == null ? EmptyExpression.Null : new Binary (Binary.Operator.Inequality, expr, new UIntLiteral (opt_ec.BuiltinTypes, 0, expr.Location)).Resolve (opt_ec); break; } break; @@ -728,15 +740,15 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type case BuiltinTypeSpec.Type.Decimal: return expr == null ? EmptyExpression.Null : new OperatorCast (expr, target_type); case BuiltinTypeSpec.Type.UInt: - if (ft == SourceFileType.PlayScript && !upconvert_only) + if (isPlayScript && !upconvert_only) return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_U4); break; case BuiltinTypeSpec.Type.ULong: - if (ft == SourceFileType.PlayScript && !upconvert_only) + if (isPlayScript && !upconvert_only) return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_U8); break; case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return expr == null ? EmptyExpression.Null : new Binary(Binary.Operator.Inequality, expr, new IntLiteral(opt_ec.BuiltinTypes, 0, expr.Location)).Resolve(opt_ec); break; } @@ -757,11 +769,11 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type case BuiltinTypeSpec.Type.Decimal: return expr == null ? EmptyExpression.Null : new OperatorCast (expr, target_type); case BuiltinTypeSpec.Type.Int: - if (ft == SourceFileType.PlayScript && !upconvert_only) + if (isPlayScript && !upconvert_only) return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_I4); break; case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return expr == null ? EmptyExpression.Null : new Binary(Binary.Operator.Inequality, expr, new UIntLiteral(opt_ec.BuiltinTypes, 0, expr.Location)).Resolve(opt_ec); break; } @@ -778,19 +790,19 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type case BuiltinTypeSpec.Type.Decimal: return expr == null ? EmptyExpression.Null : new OperatorCast (expr, target_type); case BuiltinTypeSpec.Type.Int: - if (ft == SourceFileType.PlayScript && !upconvert_only) + if (isPlayScript && !upconvert_only) return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_I4); break; case BuiltinTypeSpec.Type.UInt: - if (ft == SourceFileType.PlayScript && !upconvert_only) + if (isPlayScript && !upconvert_only) return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_U4); break; case BuiltinTypeSpec.Type.ULong: - if (ft == SourceFileType.PlayScript && !upconvert_only) + if (isPlayScript && !upconvert_only) return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_U8); break; case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return expr == null ? EmptyExpression.Null : new Binary(Binary.Operator.Inequality, expr, new LongLiteral(opt_ec.BuiltinTypes, 0L, expr.Location)).Resolve (opt_ec); break; } @@ -807,19 +819,19 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type case BuiltinTypeSpec.Type.Decimal: return expr == null ? EmptyExpression.Null : new OperatorCast (expr, target_type); case BuiltinTypeSpec.Type.Int: - if (ft == SourceFileType.PlayScript && !upconvert_only) + if (isPlayScript && !upconvert_only) return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_I4); break; case BuiltinTypeSpec.Type.UInt: - if (ft == SourceFileType.PlayScript && !upconvert_only) + if (isPlayScript && !upconvert_only) return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_U4); break; case BuiltinTypeSpec.Type.Long: - if (ft == SourceFileType.PlayScript && !upconvert_only) + if (isPlayScript && !upconvert_only) return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_I8); break; case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return expr == null ? EmptyExpression.Null : new Binary(Binary.Operator.Inequality, expr, new ULongLiteral(opt_ec.BuiltinTypes, 0L, expr.Location)).Resolve(opt_ec); break; } @@ -854,7 +866,7 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type // // PlayScript only - from float to int, uint, bool // - if (ft == SourceFileType.PlayScript && !upconvert_only) { + if (isPlayScript && !upconvert_only) { switch (target_type.BuiltinType) { case BuiltinTypeSpec.Type.Int: return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_I4); @@ -869,7 +881,7 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type // // PlayScript only - from double to int, uint, float, bool // - if (ft == SourceFileType.PlayScript && !upconvert_only) { + if (isPlayScript && !upconvert_only) { switch (target_type.BuiltinType) { case BuiltinTypeSpec.Type.Int: return expr == null ? EmptyExpression.Null : new OpcodeCast (expr, target_type, OpCodes.Conv_I4); @@ -886,13 +898,10 @@ static Expression ImplicitNumericConversion (Expression expr, TypeSpec expr_type return null; } - - // - // Full version of implicit conversion - // + public static bool ImplicitConversionExists (ResolveContext ec, Expression expr, TypeSpec target_type, bool upconvert_only = false) { - if (ImplicitStandardConversionExists (expr, target_type, ec, upconvert_only)) + if (ImplicitStandardConversionExists (ec, expr, target_type, upconvert_only)) return true; if (expr.Type == InternalType.AnonymousMethod) { @@ -902,30 +911,38 @@ public static bool ImplicitConversionExists (ResolveContext ec, Expression expr, AnonymousMethodExpression ame = (AnonymousMethodExpression) expr; return ame.ImplicitStandardConversionExists (ec, target_type); } - + + // Conversion from __arglist to System.ArgIterator + if (expr.Type == InternalType.Arglist) + return target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec; + + return UserDefinedConversion (ec, expr, target_type, + UserConversionRestriction.ImplicitOnly | UserConversionRestriction.ProbingOnly, Location.Null) != null; + } + + public static bool ImplicitStandardConversionExists (ResolveContext rc, Expression expr, TypeSpec target_type, bool upconvert_only = false) + { + var isPlayScript = (rc == null) ? false : (rc.FileType == SourceFileType.PlayScript) ? true : false; + if (expr.eclass == ExprClass.MethodGroup) { // PlayScript can implicitly cast unique methods/lambdas to dynamic/delegate types. - if (!target_type.IsDelegate && ec.FileType == SourceFileType.PlayScript && - (target_type.IsDynamic || target_type == ec.BuiltinTypes.Delegate)) { + if (isPlayScript && !target_type.IsDelegate && + (target_type.IsDynamic || target_type == rc.BuiltinTypes.Delegate)) { MethodGroupExpr mg = expr as MethodGroupExpr; if (mg != null && mg.Candidates.Count == 1) { return true; } } - if (target_type.IsDelegate && ec.Module.Compiler.Settings.Version != LanguageVersion.ISO_1) { + if (target_type.IsDelegate && rc.Module.Compiler.Settings.Version != LanguageVersion.ISO_1) { MethodGroupExpr mg = expr as MethodGroupExpr; if (mg != null) - return DelegateCreation.ImplicitStandardConversionExists (ec, mg, target_type); + return DelegateCreation.ImplicitStandardConversionExists (rc, mg, target_type); } return false; } - // Conversion from __arglist to System.ArgIterator - if (expr.Type == InternalType.Arglist) - return target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec; - - return UserDefinedConversion (ec, expr, target_type, true, true, Location.Null) != null; + return ImplicitStandardConversionExists (expr, target_type, rc, upconvert_only); } // @@ -1139,7 +1156,7 @@ static TypeSpec FindMostEncompassingType (IList types, ResolveContext // by making use of FindMostEncomp* methods. Applies the correct rules separately // for explicit and implicit conversion operators. // - static TypeSpec FindMostSpecificSource (List list, TypeSpec sourceType, Expression source, bool apply_explicit_conv_rules, ResolveContext opt_ec) + static TypeSpec FindMostSpecificSource (ResolveContext rc, List list, TypeSpec sourceType, Expression source, bool apply_explicit_conv_rules) { TypeSpec[] src_types_set = null; @@ -1165,21 +1182,25 @@ static TypeSpec FindMostSpecificSource (List list, TypeSpec sourceTy var candidate_set = new List (); foreach (TypeSpec param_type in src_types_set){ - if (ImplicitStandardConversionExists (source, param_type, opt_ec)) + if (ImplicitStandardConversionExists (rc, source, param_type)) candidate_set.Add (param_type); } - if (candidate_set.Count != 0) - return FindMostEncompassedType (candidate_set, opt_ec); + if (candidate_set.Count != 0) { + if (source.eclass == ExprClass.MethodGroup) + return InternalType.FakeInternalType; + + return FindMostEncompassedType (candidate_set, rc); + } } // // Final case // if (apply_explicit_conv_rules) - return FindMostEncompassingType (src_types_set, opt_ec); + return FindMostEncompassingType (src_types_set, rc); else - return FindMostEncompassedType (src_types_set, opt_ec); + return FindMostEncompassedType (src_types_set, rc); } /// @@ -1238,7 +1259,7 @@ static public TypeSpec FindMostSpecificTarget (IList list, /// static public Expression ImplicitUserConversion (ResolveContext ec, Expression source, TypeSpec target, Location loc) { - return UserDefinedConversion (ec, source, target, true, false, loc); + return UserDefinedConversion (ec, source, target, UserConversionRestriction.ImplicitOnly, loc); } /// @@ -1246,10 +1267,10 @@ static public Expression ImplicitUserConversion (ResolveContext ec, Expression s /// static Expression ExplicitUserConversion (ResolveContext ec, Expression source, TypeSpec target, Location loc) { - return UserDefinedConversion (ec, source, target, false, false, loc); + return UserDefinedConversion (ec, source, target, 0, loc); } - static void FindApplicableUserDefinedConversionOperators (ResolveContext ec, IList operators, Expression source, TypeSpec target, bool implicitOnly, ref List candidates) + static void FindApplicableUserDefinedConversionOperators (ResolveContext rc, IList operators, Expression source, TypeSpec target, UserConversionRestriction restr, ref List candidates) { if (source.Type.IsInterface) { // Neither A nor B are interface-types @@ -1271,14 +1292,17 @@ static void FindApplicableUserDefinedConversionOperators (ResolveContext ec, ILi continue; var t = op.Parameters.Types[0]; - if (source.Type != t && !ImplicitStandardConversionExists (source, t, ec)) { - if (implicitOnly) + if (source.Type != t && !ImplicitStandardConversionExists (rc, source, t, false)) { + if ((restr & UserConversionRestriction.ImplicitOnly) != 0) continue; - if (!ImplicitStandardConversionExists (new EmptyExpression (t), source.Type, ec)) - continue; + if (!ImplicitStandardConversionExists (new EmptyExpression (t), source.Type, rc, false)) + continue; } + if ((restr & UserConversionRestriction.NullableSourceOnly) != 0 && !t.IsNullableType) + continue; + t = op.ReturnType; if (t.IsInterface) @@ -1288,14 +1312,14 @@ static void FindApplicableUserDefinedConversionOperators (ResolveContext ec, ILi if (t.IsNullableType) t = Nullable.NullableInfo.GetUnderlyingType (t); - if (!ImplicitStandardConversionExists (new EmptyExpression (t), target, ec)) { - if (implicitOnly) + if (!ImplicitStandardConversionExists (new EmptyExpression (t), target, rc)) { + if ((restr & UserConversionRestriction.ImplicitOnly) != 0) continue; if (texpr == null) texpr = new EmptyExpression (target); - if (!ImplicitStandardConversionExists (texpr, t, ec)) + if (!ImplicitStandardConversionExists (texpr, t, rc)) continue; } } @@ -1310,7 +1334,7 @@ static void FindApplicableUserDefinedConversionOperators (ResolveContext ec, ILi // // User-defined conversions // - static Expression UserDefinedConversion (ResolveContext ec, Expression source, TypeSpec target, bool implicitOnly, bool probingOnly, Location loc) + public static Expression UserDefinedConversion (ResolveContext rc, Expression source, TypeSpec target, UserConversionRestriction restr, Location loc) { List candidates = null; @@ -1322,6 +1346,7 @@ static Expression UserDefinedConversion (ResolveContext ec, Expression source, T TypeSpec target_type = target; Expression source_type_expr; bool nullable_source = false; + var implicitOnly = (restr & UserConversionRestriction.ImplicitOnly) != 0; if (source_type.IsNullableType) { // No unwrapping conversion S? -> T for non-reference types @@ -1347,13 +1372,13 @@ static Expression UserDefinedConversion (ResolveContext ec, Expression source, T var operators = MemberCache.GetUserOperator (source_type, Operator.OpType.Implicit, declared_only); if (operators != null) { - FindApplicableUserDefinedConversionOperators (ec, operators, source_type_expr, target_type, implicitOnly, ref candidates); + FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates); } if (!implicitOnly) { operators = MemberCache.GetUserOperator (source_type, Operator.OpType.Explicit, declared_only); if (operators != null) { - FindApplicableUserDefinedConversionOperators (ec, operators, source_type_expr, target_type, false, ref candidates); + FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates); } } } @@ -1363,13 +1388,13 @@ static Expression UserDefinedConversion (ResolveContext ec, Expression source, T var operators = MemberCache.GetUserOperator (target_type, Operator.OpType.Implicit, declared_only); if (operators != null) { - FindApplicableUserDefinedConversionOperators (ec, operators, source_type_expr, target_type, implicitOnly, ref candidates); + FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates); } if (!implicitOnly) { operators = MemberCache.GetUserOperator (target_type, Operator.OpType.Explicit, declared_only); if (operators != null) { - FindApplicableUserDefinedConversionOperators (ec, operators, source_type_expr, target_type, false, ref candidates); + FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates); } } } @@ -1391,11 +1416,11 @@ static Expression UserDefinedConversion (ResolveContext ec, Expression source, T // Pass original source type to find the best match against input type and // not the unwrapped expression // - s_x = FindMostSpecificSource (candidates, source.Type, source_type_expr, !implicitOnly, ec); + s_x = FindMostSpecificSource (rc, candidates, source.Type, source_type_expr, !implicitOnly); if (s_x == null) return null; - t_x = FindMostSpecificTarget (candidates, target, !implicitOnly, ec); + t_x = FindMostSpecificTarget (candidates, target, !implicitOnly, rc); if (t_x == null) return null; @@ -1411,16 +1436,19 @@ static Expression UserDefinedConversion (ResolveContext ec, Expression source, T // // Unless running in probing more // - if (!probingOnly) { - MethodSpec ambig_arg = null; + if ((restr & UserConversionRestriction.ProbingOnly) == 0) { + MethodSpec ambig_arg = candidates [0]; + most_specific_operator = candidates [1]; + /* foreach (var candidate in candidates) { if (candidate.ReturnType == t_x) most_specific_operator = candidate; else if (candidate.Parameters.Types[0] == s_x) ambig_arg = candidate; } - - ec.Report.Error (457, loc, + */ + + rc.Report.Error (457, loc, "Ambiguous user defined operators `{0}' and `{1}' when converting from `{2}' to `{3}'", ambig_arg.GetSignatureForError (), most_specific_operator.GetSignatureForError (), source.Type.GetSignatureForError (), target.GetSignatureForError ()); @@ -1436,21 +1464,21 @@ static Expression UserDefinedConversion (ResolveContext ec, Expression source, T if (s_x != source_type) { var c = source as Constant; if (c != null) { - source = c.Reduce (ec, s_x); + source = c.Reduce (rc, s_x); if (source == null) c = null; } if (c == null) { source = implicitOnly ? - ImplicitConversionStandard (ec, source_type_expr, s_x, loc) : - ExplicitConversionStandard (ec, source_type_expr, s_x, loc); + ImplicitConversionStandard (rc, source_type_expr, s_x, loc) : + ExplicitConversionStandard (rc, source_type_expr, s_x, loc); } } else { source = source_type_expr; } - source = new UserCast (most_specific_operator, source, loc).Resolve (ec); + source = new UserCast (most_specific_operator, source, loc).Resolve (rc); // // Convert result type when it's different to best operator return type @@ -1469,19 +1497,19 @@ static Expression UserDefinedConversion (ResolveContext ec, Expression source, T var unwrap = Nullable.Unwrap.CreateUnwrapped (source); source = implicitOnly ? - ImplicitConversionStandard (ec, unwrap, target_type, loc) : - ExplicitConversionStandard (ec, unwrap, target_type, loc); + ImplicitConversionStandard (rc, unwrap, target_type, loc) : + ExplicitConversionStandard (rc, unwrap, target_type, loc); if (source == null) return null; if (target.IsNullableType) - source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (ec); + source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (rc); } } else { source = implicitOnly ? - ImplicitConversionStandard (ec, source, target_type, loc) : - ExplicitConversionStandard (ec, source, target_type, loc); + ImplicitConversionStandard (rc, source, target_type, loc) : + ExplicitConversionStandard (rc, source, target_type, loc); if (source == null) return null; @@ -1494,7 +1522,7 @@ static Expression UserDefinedConversion (ResolveContext ec, Expression source, T // only non-nullable type we need to lift it manually // if (nullable_source && !s_x.IsNullableType) - return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (ec); + return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (rc); // // Target is of nullable type but source type is not, wrap the result expression @@ -1518,7 +1546,7 @@ static public Expression ImplicitConversion (ResolveContext ec, Expression expr, if (target_type == null) throw new Exception ("Target type is null"); - e = DoImplicitConversionStandard (ec, expr, target_type, loc, false, upconvert_only); + e = ImplicitConversionStandard (ec, expr, target_type, loc, false, upconvert_only); if (e != null) return e; @@ -1543,14 +1571,16 @@ static public Expression ImplicitConversion (ResolveContext ec, Expression expr, static public Expression ImplicitConversionStandard (ResolveContext ec, Expression expr, TypeSpec target_type, Location loc) { - return DoImplicitConversionStandard (ec, expr, target_type, loc, false, false); + return ImplicitConversionStandard (ec, expr, target_type, loc, false, false); } - static Expression DoImplicitConversionStandard (ResolveContext ec, Expression expr, TypeSpec target_type, Location loc, bool explicit_cast, bool upconvert_only) + static Expression ImplicitConversionStandard (ResolveContext ec, Expression expr, TypeSpec target_type, Location loc, bool explicit_cast, bool upconvert_only) { + var isPlayScript = (ec == null) ? false : (ec.FileType == SourceFileType.PlayScript) ? true : false; + if (expr.eclass == ExprClass.MethodGroup){ if (!target_type.IsDelegate){ - if (ec.FileType == SourceFileType.PlayScript && + if (isPlayScript && (target_type.IsDynamic || target_type == ec.BuiltinTypes.Delegate)) { MethodGroupExpr mg = expr as MethodGroupExpr; if (mg != null) { @@ -1611,7 +1641,7 @@ static Expression DoImplicitConversionStandard (ResolveContext ec, Expression ex } // Auto convert types to type objects.. - if (ec.FileType == SourceFileType.PlayScript && expr is FullNamedExpression && + if (isPlayScript && expr is FullNamedExpression && (target_type.BuiltinType == BuiltinTypeSpec.Type.Type || target_type.BuiltinType == BuiltinTypeSpec.Type.Object || target_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic)) { @@ -1731,7 +1761,7 @@ static Expression DoImplicitConversionStandard (ResolveContext ec, Expression ex if (expr_type == InternalType.AnonymousMethod){ AnonymousMethodExpression ame = (AnonymousMethodExpression) expr; - if (ec.FileType == SourceFileType.PlayScript && + if (isPlayScript && (target_type.IsDynamic || target_type == ec.BuiltinTypes.Delegate)) { var del_type = Delegate.CreateDelegateType (ec, ame.AsParameters, ame.AsReturnType.ResolveAsType(ec), loc); return new Cast(new TypeExpression(del_type, loc), expr, loc).Resolve(ec); @@ -1806,7 +1836,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // UIntPtr -> long uses ulong // - SourceFileType ft = rc.FileType; + var isPlayScript = rc.FileType == SourceFileType.PlayScript; switch (expr.Type.BuiltinType) { case BuiltinTypeSpec.Type.Bool: @@ -1815,7 +1845,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // ushort, int, uint, long, ulong, // char, float or decimal // - if (ft == SourceFileType.PlayScript) { + if (isPlayScript) { switch (target_type.BuiltinType) { case BuiltinTypeSpec.Type.SByte: return new ConvCast(new Conditional(expr, new IntLiteral(rc.BuiltinTypes, 1, expr.Location), new IntLiteral(rc.BuiltinTypes, 0, expr.Location), expr.Location).Resolve (rc), target_type, ConvCast.Mode.I4_I1); @@ -1866,7 +1896,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new IntLiteral(rc.BuiltinTypes, 0, expr.Location)).Resolve (rc); break; } @@ -1883,7 +1913,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new UIntLiteral(rc.BuiltinTypes, 0, expr.Location)).Resolve (rc); break; } @@ -1912,7 +1942,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new IntLiteral(rc.BuiltinTypes, 0, expr.Location)).Resolve (rc); break; } @@ -1933,7 +1963,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new UIntLiteral(rc.BuiltinTypes, 0, expr.Location)).Resolve (rc); break; } @@ -1964,7 +1994,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new IntLiteral(rc.BuiltinTypes, 0, expr.Location)).Resolve (rc); break; } @@ -1989,7 +2019,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new UIntLiteral(rc.BuiltinTypes, 0, expr.Location)).Resolve (rc); break; } @@ -2018,7 +2048,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new LongLiteral(rc.BuiltinTypes, 0, expr.Location)).Resolve (rc); break; } @@ -2051,7 +2081,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new ULongLiteral(rc.BuiltinTypes, 0, expr.Location)).Resolve (rc); break; } @@ -2070,7 +2100,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new CharLiteral(rc.BuiltinTypes, '\x0', expr.Location)).Resolve (rc); break; } @@ -2105,7 +2135,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new FloatLiteral(rc.BuiltinTypes, 0f, expr.Location)).Resolve (rc); break; } @@ -2142,7 +2172,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new DoubleLiteral(rc.BuiltinTypes, 0, expr.Location)).Resolve (rc); break; } @@ -2193,7 +2223,7 @@ public static Expression ExplicitNumericConversion (ResolveContext rc, Expressio // PlayScript explicit casts.. case BuiltinTypeSpec.Type.Bool: - if (ft == SourceFileType.PlayScript) + if (isPlayScript) return new Binary(Binary.Operator.Inequality, expr, new DecimalLiteral(rc.BuiltinTypes, 0, expr.Location)).Resolve (rc); break; } @@ -2424,7 +2454,7 @@ static public Expression ExplicitConversionCore (ResolveContext ec, Expression e TypeSpec expr_type = expr.Type; // Explicit conversion includes implicit conversion and it used for enum underlying types too - Expression ne = DoImplicitConversionStandard (ec, expr, target_type, loc, true, false); + Expression ne = ImplicitConversionStandard (ec, expr, target_type, loc, true, false); if (ne != null) return ne; @@ -2435,7 +2465,7 @@ static public Expression ExplicitConversionCore (ResolveContext ec, Expression e ne = underlying; if (ne == null) - ne = ImplicitNumericConversion (underlying, real_target, ec); + ne = ImplicitNumericConversion (underlying, real_target, ec, false); if (ne == null) ne = ExplicitNumericConversion (ec, underlying, real_target); @@ -2467,7 +2497,7 @@ static public Expression ExplicitConversionCore (ResolveContext ec, Expression e if (c != null) return c; } else { - ne = ImplicitNumericConversion (expr, real_target, ec); + ne = ImplicitNumericConversion (expr, real_target, ec, false); if (ne != null) return EmptyCast.Create (ne, target_type, ec); @@ -2645,6 +2675,7 @@ static public Expression ExplicitConversion (ResolveContext ec, Expression expr, } e = ExplicitUserConversion (ec, expr, target_type, loc); + if (e != null) return e; diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay index 69953cfeffb..da8ecdebd4e 100644 --- a/mcs/mcs/cs-parser.jay +++ b/mcs/mcs/cs-parser.jay @@ -923,6 +923,7 @@ class_member_declaration | indexer_declaration | operator_declaration | constructor_declaration + | primary_constructor_body | destructor_declaration | type_declaration | attributes_without_members @@ -936,6 +937,33 @@ class_member_declaration } ; +primary_constructor_body + : OPEN_BRACE + { + current_local_parameters = current_type.PrimaryConstructorParameters; + if (current_local_parameters == null) { + report.Error (9010, GetLocation ($1), "Primary constructor body is not allowed"); + current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; + } + + ++lexer.parsing_block; + start_block (GetLocation ($1)); + } + opt_statement_list block_end + { + current_local_parameters = null; + var t = current_type as ClassOrStruct; + if (t != null) { + var b = (ToplevelBlock) $4; + if (t.PrimaryConstructorBlock != null) { + report.Error (8041, b.StartLocation, "Primary constructor already has a body"); + } else { + t.PrimaryConstructorBlock = b; + } + } + } + ; + struct_declaration : opt_attributes opt_modifiers @@ -1258,7 +1286,7 @@ method_declaration // Was added earlier in the case of body being eof for full ast } - method_body + method_body_expression_block { Method method = (Method) $1; method.Block = (ToplevelBlock) $3; @@ -1413,11 +1441,36 @@ method_header } ; +method_body_expression_block + : method_body + | expression_block + ; + method_body : block | SEMICOLON { $$ = null; } ; +expression_block + : ARROW + { + if (lang_version < LanguageVersion.V_6) { + FeatureIsNotAvailable (GetLocation ($1), "expression bodied members"); + } + + ++lexer.parsing_block; + start_block (GetLocation ($1)); + } + expression SEMICOLON + { + lexer.parsing_block = 0; + current_block.AddStatement (new ContextualReturn ((Expression) $3)); + var b = end_block (GetLocation ($4)); + b.IsCompilerGenerated = true; + $$ = b; + } + ; + opt_formal_parameter_list : /* empty */ { $$ = ParametersCompiled.EmptyReadOnlyParameters; } | formal_parameter_list @@ -1708,13 +1761,14 @@ arglist_modifier report.Error (1669, GetLocation ($1), "__arglist is not valid in this context"); } ; - + property_declaration : opt_attributes opt_modifiers member_type member_declaration_name { + lexer.parsing_generic_declaration = false; if (doc_support) tmpComment = Lexer.consume_doc_comment (); } @@ -1742,10 +1796,57 @@ property_declaration CLOSE_BRACE { lbag.AppendToMember (current_property, GetLocation ($10)); + lexer.parsing_modifiers = true; + } + opt_property_initializer + { current_property = null; } + | opt_attributes + opt_modifiers + member_type + member_declaration_name + { + lexer.parsing_generic_declaration = false; + if (doc_support) + tmpComment = Lexer.consume_doc_comment (); + current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; + } + expression_block + { + var type = (FullNamedExpression) $3; + var property = new Property (current_type, type, (Modifiers) $2, + (MemberName) $4, (Attributes) $1); + + if (type.Type != null && type.Type.Kind == MemberKind.Void) + report.Error (547, GetLocation ($3), "`{0}': property or indexer cannot have void type", property.GetSignatureForError ()); + + property.Get = new Property.GetMethod (property, Modifiers.COMPILER_GENERATED, null, property.Location); + property.Get.Block = (ToplevelBlock) $6; + + current_type.AddMember (property); + + current_local_parameters = null; + } ; +opt_property_initializer + : /* empty */ + | ASSIGN + { + ++lexer.parsing_block; + current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters; + start_block (GetLocation ($1)); + } + expression SEMICOLON + { + --lexer.parsing_block; + ((Property)current_property).Initializer = (Expression) $3; + lbag.AppendToMember (current_property, GetLocation ($1), GetLocation ($4)); + end_block (GetLocation ($4)); + current_local_parameters = null; + } + ; indexer_declaration : opt_attributes opt_modifiers @@ -1777,24 +1878,34 @@ indexer_declaration } lexer.PropertyParsing = true; + current_local_parameters = (ParametersCompiled) $7; } - OPEN_BRACE accessor_declarations - { - lexer.PropertyParsing = false; - } - CLOSE_BRACE + indexer_body { + lexer.PropertyParsing = false; + current_local_parameters = null; + if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null) ((Indexer) current_property).ParameterInfo.CheckParameters (current_property); if (doc_support) current_property.DocComment = ConsumeStoredComment (); - lbag.AppendToMember (current_property, GetLocation ($10), GetLocation ($13)); current_property = null; } ; +indexer_body + : OPEN_BRACE accessor_declarations CLOSE_BRACE + { + lbag.AppendToMember (current_property, GetLocation ($1), GetLocation ($3)); + } + | expression_block + { + current_property.Get = new Indexer.GetIndexerMethod (current_property, Modifiers.COMPILER_GENERATED, current_local_parameters, null, current_property.Location); + current_property.Get.Block = (ToplevelBlock) $1; + } + ; accessor_declarations : get_accessor_declaration @@ -2017,7 +2128,7 @@ operator_declaration : opt_attributes opt_modifiers operator_declarator { } - operator_body + method_body_expression_block { OperatorDeclaration decl = (OperatorDeclaration) $3; if (decl != null) { @@ -2054,11 +2165,6 @@ operator_declaration } ; -operator_body - : block - | SEMICOLON { $$ = null; } - ; - operator_type : type_expression_or_array | VOID @@ -4176,6 +4282,16 @@ additive_expression $$ = new Is ((Expression) $1, null, GetLocation ($2)); } + | AWAIT IS type + { + var lt = (LocatedToken) $1; + $$ = new Is (new SimpleName (lt.Value, lt.Location), (Expression) $3, GetLocation ($2)); + } + | AWAIT AS type + { + var lt = (LocatedToken) $1; + $$ = new As (new SimpleName (lt.Value, lt.Location), (Expression) $3, GetLocation ($2)); + } ; shift_expression @@ -4676,6 +4792,9 @@ primary_parameters // Cannot use opt_formal_parameter_list because it can be shared instance for empty parameters lbag.AppendToMember (current_container, GetLocation ($1), GetLocation ($3)); + + if (lang_version < LanguageVersion.V_6) + FeatureIsNotAvailable (GetLocation ($1), "primary constructor"); } ; @@ -4692,14 +4811,19 @@ opt_primary_parameters_with_class_base { $$ = $1; } + | primary_parameters class_base + { + $$ = $1; + } | primary_parameters class_base OPEN_PARENS { ++lexer.parsing_block; + current_type.PrimaryConstructorBaseArgumentsStart = GetLocation ($3); } opt_argument_list CLOSE_PARENS { - lbag.AppendToMember (current_container, GetLocation ($3), GetLocation ($6)); - ((Class)current_type).PrimaryConstructorBaseArguments = (Arguments) $5; + lbag.AppendToMember (current_container, GetLocation ($6)); + current_type.PrimaryConstructorBaseArguments = (Arguments) $5; --lexer.parsing_block; $$ = $1; diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs index 68ddff9873c..23adf2073a2 100644 --- a/mcs/mcs/cs-tokenizer.cs +++ b/mcs/mcs/cs-tokenizer.cs @@ -1279,6 +1279,8 @@ int TokenizePossibleNullableType () PushPosition (); current_token = Token.NONE; int next_token; + int parens = 0; + switch (xtoken ()) { case Token.LITERAL: case Token.TRUE: @@ -1299,6 +1301,13 @@ int TokenizePossibleNullableType () case Token.COLON: next_token = Token.INTERR_NULLABLE; break; + + case Token.OPEN_PARENS: + case Token.OPEN_PARENS_CAST: + case Token.OPEN_PARENS_LAMBDA: + next_token = -1; + ++parens; + break; default: next_token = -1; @@ -1317,14 +1326,19 @@ int TokenizePossibleNullableType () case Token.COLON: next_token = Token.INTERR; - break; - + break; + + case Token.OPEN_PARENS: + case Token.OPEN_PARENS_CAST: + case Token.OPEN_PARENS_LAMBDA: + ++parens; + goto default; + default: int ntoken; int interrs = 1; int colons = 0; int braces = 0; - int parens = 0; // // All shorcuts failed, do it hard way // @@ -1342,9 +1356,13 @@ int TokenizePossibleNullableType () --braces; continue; case Token.CLOSE_PARENS: - if (parens > 0) + if (parens > 0) { --parens; - continue; + continue; + } + + PopPosition (); + return Token.INTERR_NULLABLE; } if (braces != 0) diff --git a/mcs/mcs/delegate.cs b/mcs/mcs/delegate.cs index a5b576ae0f4..047ad6ad2c9 100644 --- a/mcs/mcs/delegate.cs +++ b/mcs/mcs/delegate.cs @@ -561,7 +561,8 @@ public abstract class DelegateCreation : Expression, OverloadResolver.IErrorHand public override bool ContainsEmitWithAwait () { - return false; + var instance = method_group.InstanceExpression; + return instance != null && instance.ContainsEmitWithAwait (); } public static Arguments CreateDelegateMethodArguments (ResolveContext rc, AParametersCollection pd, TypeSpec[] types, Location loc) diff --git a/mcs/mcs/ecore.cs b/mcs/mcs/ecore.cs index 8f39991ff52..96aca107273 100644 --- a/mcs/mcs/ecore.cs +++ b/mcs/mcs/ecore.cs @@ -570,10 +570,16 @@ public Constant ResolveLabelConstant (ResolveContext rc) return c; } - public virtual void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public virtual void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { - rc.Module.Compiler.Report.Error (182, loc, - "An attribute argument must be a constant expression, typeof expression or array creation expression"); + if (Attribute.IsValidArgumentType (parameterType)) { + rc.Module.Compiler.Report.Error (182, loc, + "An attribute argument must be a constant expression, typeof expression or array creation expression"); + } else { + rc.Module.Compiler.Report.Error (181, loc, + "Attribute constructor parameter has type `{0}', which is not a valid attribute parameter type", + targetType.GetSignatureForError ()); + } } /// @@ -1643,9 +1649,9 @@ public override void Emit (EmitContext ec) Child.Emit (ec); } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { - Child.EncodeAttributeValue (rc, enc, Child.Type); + Child.EncodeAttributeValue (rc, enc, Child.Type, parameterType); } public override void EmitBranchable (EmitContext ec, Label label, bool on_true) @@ -1763,16 +1769,16 @@ protected override Expression DoResolve (ResolveContext ec) return this; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { // Only boxing to object type is supported if (targetType.BuiltinType != BuiltinTypeSpec.Type.Object) { - base.EncodeAttributeValue (rc, enc, targetType); + base.EncodeAttributeValue (rc, enc, targetType, parameterType); return; } enc.Encode (child.Type); - child.EncodeAttributeValue (rc, enc, child.Type); + child.EncodeAttributeValue (rc, enc, child.Type, parameterType); } public override void Emit (EmitContext ec) @@ -2173,15 +2179,15 @@ public override Constant ConvertExplicitly (bool in_checked_context, TypeSpec ta return c; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { // // LAMESPEC: Reduced conditional expression is allowed as an attribute argument // if (orig_expr is Conditional) - child.EncodeAttributeValue (rc, enc, targetType); + child.EncodeAttributeValue (rc, enc, targetType,parameterType); else - base.EncodeAttributeValue (rc, enc, targetType); + base.EncodeAttributeValue (rc, enc, targetType, parameterType); } } @@ -2944,6 +2950,15 @@ public override Expression LookupNameExpression (ResolveContext rc, MemberLookup } } + var mg = NamespaceContainer.LookupStaticUsings (rc, Name, Arity, loc); + if (mg != null) { + if (Arity > 0) { + targs.Resolve (rc); + mg.SetTypeArguments (rc, targs); + } + return mg; + } + if (errorMode) { if (variable_found) { rc.Report.Error (841, loc, "A local variable `{0}' cannot be used before it is declared", name); @@ -2970,17 +2985,6 @@ public override Expression LookupNameExpression (ResolveContext rc, MemberLookup ct = ct.DeclaringType; } while (ct != null); - } else { - var cos = rc.CurrentMemberDefinition.Parent as ClassOrStruct; - if (cos != null && cos.PrimaryConstructorParameters != null) { - foreach (var p in cos.PrimaryConstructorParameters.FixedParameters) { - if (p.Name == Name) { - rc.Report.Error (9007, loc, "Primary constructor parameter `{0}' is not available in this context when using ref or out modifier", - Name); - return null; - } - } - } } if ((restrictions & MemberLookupRestrictions.InvocableOnly) == 0) { @@ -3551,7 +3555,7 @@ public bool ResolveInstanceExpression (ResolveContext rc, Expression rhs) // // Check intermediate value modification which won't have any effect // - if (rhs != null && InstanceExpression.Type.IsStruct) { + if (rhs != null && TypeSpec.IsValueType (InstanceExpression.Type)) { var fexpr = InstanceExpression as FieldExpr; if (fexpr != null) { if (!fexpr.Spec.IsReadOnly || rc.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.ConstructorScope)) @@ -4106,8 +4110,15 @@ public virtual MethodGroupExpr OverloadResolve (ResolveContext ec, ref Arguments // TODO: When in probing mode do IsApplicable only and when called again do VerifyArguments for full error reporting best_candidate = r.ResolveMember (ec, ref args); - if (best_candidate == null) - return r.BestCandidateIsDynamic ? this : null; + if (best_candidate == null) { + if (!r.BestCandidateIsDynamic) + return null; + + if (simple_name != null && ec.IsStatic) + InstanceExpression = ProbeIdenticalTypeName (ec, InstanceExpression, simple_name); + + return this; + } // Overload resolver had to create a new method group, all checks bellow have already been executed if (r.BestCandidateNewMethodGroup != null) @@ -4118,7 +4129,7 @@ public virtual MethodGroupExpr OverloadResolve (ResolveContext ec, ref Arguments if (best_candidate.IsExtensionMethod && args[0].Expr == InstanceExpression) { InstanceExpression = null; } else { - if (best_candidate.IsStatic && simple_name != null) { + if (simple_name != null && best_candidate.IsStatic) { InstanceExpression = ProbeIdenticalTypeName (ec, InstanceExpression, simple_name); } @@ -4246,8 +4257,9 @@ public enum Restrictions CovariantDelegate = 1 << 2, NoBaseMembers = 1 << 3, BaseMembersIncluded = 1 << 4, - StaticOnly = 1 << 5, // PlayScript - we need to be able to filter by static or instance, as we can have both with the same name. - InstanceOnly = 1 << 6 + GetEnumeratorLookup = 1 << 5, + StaticOnly = 1 << 6, // PlayScript - we need to be able to filter by static or instance, as we can have both with the same name. + InstanceOnly = 1 << 7, } public interface IBaseMembersProvider @@ -4448,7 +4460,6 @@ static int BetterExpressionConversion (ResolveContext ec, Argument a, TypeSpec p if (!TypeSpecComparer.Equals (p_m.Parameters.Types, q_m.Parameters.Types)) return 0; - var orig_p = p; p = p_m.ReturnType; var orig_q = q; q = q_m.ReturnType; @@ -4478,33 +4489,34 @@ static int BetterExpressionConversion (ResolveContext ec, Argument a, TypeSpec p q = q.TypeArguments[0]; p = p.TypeArguments[0]; } - } else if (q != p) { + } + + if (q != p) { // - // LAMESPEC: Lambda expression returning dynamic type has identity (better) conversion to delegate returning object type + // An inferred return type X exists for E in the context of that parameter list, and + // the conversion from X to Y1 is better than the conversion from X to Y2 // - if (q.BuiltinType == BuiltinTypeSpec.Type.Object) { - var am_rt = am.InferReturnType (ec, null, orig_q); - if (am_rt != null && am_rt.BuiltinType == BuiltinTypeSpec.Type.Dynamic) - return 2; - } else if (p.BuiltinType == BuiltinTypeSpec.Type.Object) { - var am_rt = am.InferReturnType (ec, null, orig_p); - if (am_rt != null && am_rt.BuiltinType == BuiltinTypeSpec.Type.Dynamic) - return 1; + argument_type = am.InferReturnType (ec, null, orig_q); + if (argument_type == null) { + // TODO: Can this be hit? + return 1; } + + if (argument_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) + argument_type = ec.BuiltinTypes.Object; } + } - // - // The parameters are identicial and return type is not void, use better type conversion - // on return type to determine better one - // - } else { - if (argument_type == p) - return 1; + if (argument_type == p) + return 1; - if (argument_type == q) - return 2; - } + if (argument_type == q) + return 2; + // + // The parameters are identicial and return type is not void, use better type conversion + // on return type to determine better one + // return BetterTypeConversion (ec, p, q); } @@ -4819,7 +4831,7 @@ public static void Error_ConstructorMismatch (ResolveContext rc, TypeSpec type, // 0 = the best, int.MaxValue = the worst // -1 = fatal error // - int IsApplicable (ResolveContext ec, ref Arguments arguments, int arg_count, ref MemberSpec candidate, IParametersMember pm, ref bool params_expanded_form, ref bool dynamicArgument, ref TypeSpec returnType) + int IsApplicable (ResolveContext ec, ref Arguments arguments, int arg_count, ref MemberSpec candidate, IParametersMember pm, ref bool params_expanded_form, ref bool dynamicArgument, ref TypeSpec returnType, bool errorMode) { // Parameters of most-derived type used mainly for named and optional parameters var pd = pm.Parameters; @@ -5012,6 +5024,13 @@ int IsApplicable (ResolveContext ec, ref Arguments arguments, int arg_count, ref lambda_conv_msgs.ClearSession (); if (i_args.Length != 0) { + if (!errorMode) { + foreach (var ta in i_args) { + if (!ta.IsAccessible (ec)) + return ti.InferenceScore - 10000; + } + } + ms = ms.MakeGenericMethod (ec, i_args); } } @@ -5373,7 +5392,7 @@ public T ResolveMember (ResolveContext rc, ref Arguments args) where T : Memb bool params_expanded_form = false; bool dynamic_argument = false; TypeSpec rt = pm.MemberType; - int candidate_rate = IsApplicable (rc, ref candidate_args, args_count, ref member, pm, ref params_expanded_form, ref dynamic_argument, ref rt); + int candidate_rate = IsApplicable (rc, ref candidate_args, args_count, ref member, pm, ref params_expanded_form, ref dynamic_argument, ref rt, error_mode); if (lambda_conv_msgs != null) lambda_conv_msgs.EndSession (); @@ -5387,13 +5406,17 @@ public T ResolveMember (ResolveContext rc, ref Arguments args) where T : Memb if (candidate_rate < 0) return null; - best_candidate_rate = candidate_rate; - best_candidate = member; - best_candidate_args = candidate_args; - best_candidate_params = params_expanded_form; - best_candidate_dynamic = dynamic_argument; - best_parameter_member = pm; - best_candidate_return_type = rt; + if ((restrictions & Restrictions.GetEnumeratorLookup) != 0 && candidate_args.Count != 0) { + // Only parameterless methods are considered + } else { + best_candidate_rate = candidate_rate; + best_candidate = member; + best_candidate_args = candidate_args; + best_candidate_params = params_expanded_form; + best_candidate_dynamic = dynamic_argument; + best_parameter_member = pm; + best_candidate_return_type = rt; + } } else if (candidate_rate == 0) { // // The member look is done per type for most operations but sometimes @@ -5747,6 +5770,9 @@ static bool HasUnfilledParams (MemberSpec best_candidate, IParametersMember pm, break; } + if (args == null) + return false; + foreach (var arg in args) { var na = arg as NamedArgument; if (na == null) @@ -5767,7 +5793,8 @@ static bool HasUnfilledParams (MemberSpec best_candidate, IParametersMember pm, bool VerifyArguments (ResolveContext ec, ref Arguments args, MemberSpec member, IParametersMember pm, bool chose_params_expanded) { var pd = pm.Parameters; - TypeSpec[] ptypes = ((IParametersMember) member).Parameters.Types; + var cpd = ((IParametersMember) member).Parameters; + var ptypes = cpd.Types; Parameter.Modifier p_mod = 0; TypeSpec pt = null; @@ -5783,7 +5810,7 @@ bool VerifyArguments (ResolveContext ec, ref Arguments args, MemberSpec member, continue; if (p_mod != Parameter.Modifier.PARAMS) { - p_mod = pd.FixedParameters[a_idx].ModFlags; + p_mod = cpd.FixedParameters [a_idx].ModFlags; pt = ptypes[a_idx]; has_unsafe_arg |= pt.IsPointer; @@ -5884,7 +5911,7 @@ bool VerifyArguments (ResolveContext ec, ref Arguments args, MemberSpec member, // // Fill not provided arguments required by params modifier // - if (params_initializers == null && pd.HasParams && arg_count + 1 == pd.Count) { + if (params_initializers == null && arg_count + 1 == pd.Count) { if (args == null) args = new Arguments (1); @@ -6346,7 +6373,7 @@ public override void FlowAnalysis (FlowAnalysisContext fc) return; } - if (TypeSpec.IsValueType (InstanceExpression.Type)) + if (TypeSpec.IsValueType (InstanceExpression.Type) && InstanceExpression is VariableReference) return; } @@ -6429,13 +6456,8 @@ public void Emit (EmitContext ec, bool leave_copy) public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) { bool has_await_source = ec.HasSet (BuilderContext.Options.AsyncBody) && source.ContainsEmitWithAwait (); - if (isCompound && !(source is DynamicExpressionStatement)) { - if (has_await_source) { - if (IsInstance) - InstanceExpression = InstanceExpression.EmitToField (ec); - } else { - prepared = true; - } + if (isCompound && !(source is DynamicExpressionStatement) && !has_await_source) { + prepared = true; } if (IsInstance) { @@ -6447,7 +6469,7 @@ public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool source.Emit (ec); - if (leave_copy) { + if (leave_copy || ec.NotifyEvaluatorOnStore) { ec.Emit (OpCodes.Dup); if (!IsStatic) { temp = new LocalTemporary (this.Type); @@ -6464,6 +6486,16 @@ public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool ec.Emit (OpCodes.Stsfld, spec); else ec.Emit (OpCodes.Stfld, spec); + + if (ec.NotifyEvaluatorOnStore) { + if (!IsStatic) + throw new NotImplementedException ("instance field write"); + + if (leave_copy) + ec.Emit (OpCodes.Dup); + + ec.Module.Evaluator.EmitValueChangedCallback (ec, Name, type, loc); + } if (temp != null) { temp.Emit (ec); diff --git a/mcs/mcs/eval.cs b/mcs/mcs/eval.cs index cb63fa4874a..0afc75bd467 100644 --- a/mcs/mcs/eval.cs +++ b/mcs/mcs/eval.cs @@ -26,6 +26,11 @@ namespace Mono.CSharp { + /// + /// Experimental! + /// + public delegate void ValueModificationHandler (string variableName, int row, int column, object value); + /// /// Evaluator: provides an API to evaluate C# statements and /// expressions dynamically. @@ -73,6 +78,8 @@ enum ParseMode { readonly ModuleContainer module; readonly ReflectionImporter importer; readonly CompilationSourceFile source_file; + + int? listener_id; public Evaluator (CompilerContext ctx) { @@ -296,6 +303,30 @@ public CompiledMethod Compile (string input) return compiled; } + static MethodInfo listener_proxy_value; + internal void EmitValueChangedCallback (EmitContext ec, string name, TypeSpec type, Location loc) + { + if (listener_id == null) + listener_id = ListenerProxy.Register (ModificationListener); + + if (listener_proxy_value == null) + listener_proxy_value = typeof (ListenerProxy).GetMethod ("ValueChanged"); + +#if STATIC + throw new NotSupportedException (); +#else + // object value, int row, int col, string name, int listenerId + if (type.IsStructOrEnum) + ec.Emit (OpCodes.Box, type); + + ec.EmitInt (loc.Row); + ec.EmitInt (loc.Column); + ec.Emit (OpCodes.Ldstr, name); + ec.EmitInt (listener_id.Value); + ec.Emit (OpCodes.Call, listener_proxy_value); +#endif + } + /// /// Evaluates and expression or statement and returns any result values. /// @@ -346,6 +377,11 @@ public string Evaluate (string input, out object result, out bool result_set) Console.WriteLine ("Interrupted!\n{0}", e); } finally { invoking = false; + + if (listener_id != null) { + ListenerProxy.Unregister (listener_id.Value); + listener_id = null; + } } // @@ -458,6 +494,11 @@ public object Evaluate (string input) return result; } + /// + /// Experimental! + /// + public ValueModificationHandler ModificationListener { get; set; } + enum InputKind { EOF, StatementOrExpression, @@ -761,6 +802,7 @@ CompiledMethod CompileBlock (Class host, Undo undo, Report Report) } module.EmitContainer (); + if (Report.Errors != 0){ if (undo != null) undo.ExecuteUndo (); @@ -1281,5 +1323,38 @@ public void ExecuteUndo () undo_actions = null; } } - + + static class ListenerProxy + { + static readonly Dictionary listeners = new Dictionary (); + + static int counter; + + public static int Register (ValueModificationHandler listener) + { + lock (listeners) { + var id = counter++; + listeners.Add (id, listener); + return id; + } + } + + public static void Unregister (int listenerId) + { + lock (listeners) { + listeners.Remove (listenerId); + } + } + + public static void ValueChanged (object value, int row, int col, string name, int listenerId) + { + ValueModificationHandler action; + lock (listeners) { + if (!listeners.TryGetValue (listenerId, out action)) + return; + } + + action (name, row, col, value); + } + } } diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs index 2d71a49f376..6ba2e051108 100644 --- a/mcs/mcs/expression.cs +++ b/mcs/mcs/expression.cs @@ -158,7 +158,7 @@ public enum Operator : byte { public readonly Operator Oper; public Expression Expr; - Expression enum_conversion; + ConvCast.Mode enum_conversion; public Unary (Operator op, Expression expr, Location loc) { @@ -399,7 +399,7 @@ protected virtual Expression ResolveEnumOperator (ResolveContext ec, Expression return null; Expr = best_expr; - enum_conversion = Convert.ExplicitNumericConversion (ec, new EmptyExpression (best_expr.Type), underlying_type); + enum_conversion = Binary.GetEnumResultCast (underlying_type); type = expr.Type; return EmptyCast.Create (this, type, ec); } @@ -500,16 +500,16 @@ static Expression DoNumericPromotion (ResolveContext rc, Operator op, Expression case BuiltinTypeSpec.Type.Short: case BuiltinTypeSpec.Type.UShort: case BuiltinTypeSpec.Type.Char: - return Convert.ImplicitNumericConversion (expr, rc.BuiltinTypes.Int, rc); + return Convert.ImplicitNumericConversion (expr, rc.BuiltinTypes.Int, rc, false); } } if (op == Operator.UnaryNegation && expr_type.BuiltinType == BuiltinTypeSpec.Type.UInt) - return Convert.ImplicitNumericConversion (expr, rc.BuiltinTypes.Long, rc); + return Convert.ImplicitNumericConversion (expr, rc.BuiltinTypes.Long, rc, false); // PlayScript - implicit conversion of numeric types to bool if (rc.FileType == SourceFileType.PlayScript && op == Operator.LogicalNot && expr.Type != rc.BuiltinTypes.Bool) - return Convert.ImplicitNumericConversion (expr, rc.BuiltinTypes.Bool, rc); + return Convert.ImplicitNumericConversion (expr, rc.BuiltinTypes.Bool, rc, false); return expr; } @@ -630,8 +630,11 @@ protected void EmitOperator (EmitContext ec, TypeSpec type) // // Same trick as in Binary expression // - if (enum_conversion != null) - enum_conversion.Emit (ec); + if (enum_conversion != 0) { + using (ec.With (BuilderContext.Options.CheckedScope, false)) { + ConvCast.Emit (ec, enum_conversion); + } + } } public override void EmitBranchable (EmitContext ec, Label target, bool on_true) @@ -1212,7 +1215,7 @@ protected override Expression DoResolve (ResolveContext ec) { expr = expr.Resolve (ec); - if (expr == null) + if (expr == null || expr.Type == InternalType.ErrorType) return null; if (expr.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) { @@ -1534,10 +1537,12 @@ protected override Expression DoResolve (ResolveContext ec) if (expr == null) return null; + // TODO: PlayScript : Fix / probe_type_expr can be null if (probe_type_expr != null) { if (probe_type_expr.IsStatic) { - ec.Report.Error (-244, loc, "The `{0}' operator cannot be applied to an operand of a static type", - OperatorName); + ec.Report.Error (7023, loc, "The second operand of `is' or `as' operator cannot be static type `{0}'", + probe_type_expr.GetSignatureForError ()); + return null; } if (expr.Type.IsPointer || probe_type_expr.IsPointer) { @@ -1547,8 +1552,8 @@ protected override Expression DoResolve (ResolveContext ec) } } - if (expr.Type == InternalType.AnonymousMethod) { - ec.Report.Error (837, loc, "The `{0}' operator cannot be applied to a lambda expression or anonymous method", + if (expr.Type == InternalType.AnonymousMethod || expr.Type == InternalType.MethodGroup) { + ec.Report.Error (837, loc, "The `{0}' operator cannot be applied to a lambda expression, anonymous method, or method group", OperatorName); return null; } @@ -1556,6 +1561,11 @@ protected override Expression DoResolve (ResolveContext ec) return this; } + public override void EmitSideEffect (EmitContext ec) + { + expr.EmitSideEffect (ec); + } + public override void FlowAnalysis (FlowAnalysisContext fc) { expr.FlowAnalysis (fc); @@ -1626,17 +1636,20 @@ public override void EmitBranchable (EmitContext ec, Label target, bool on_true) } ec.Emit (on_true ? OpCodes.Brtrue : OpCodes.Brfalse, target); } - - Expression CreateConstantResult (ResolveContext ec, bool result) + + Expression CreateConstantResult (ResolveContext rc, bool result) { if (result) - ec.Report.Warning (183, 1, loc, "The given expression is always of the provided (`{0}') type", + rc.Report.Warning (183, 1, loc, "The given expression is always of the provided (`{0}') type", probe_type_expr.GetSignatureForError ()); else - ec.Report.Warning (184, 1, loc, "The given expression is never of the provided (`{0}') type", + rc.Report.Warning (184, 1, loc, "The given expression is never of the provided (`{0}') type", probe_type_expr.GetSignatureForError ()); - return ReducedExpression.Create (new BoolConstant (ec.BuiltinTypes, result, loc), this); + var c = new BoolConstant (rc.BuiltinTypes, result, loc); + return expr.IsSideEffectFree ? + ReducedExpression.Create (c, this) : + new SideEffectConstant (c, this, loc); } protected override Expression DoResolve (ResolveContext ec) @@ -1761,7 +1774,6 @@ protected override Expression DoResolve (ResolveContext ec) if (d.BuiltinType == BuiltinTypeSpec.Type.Dynamic) return this; - // // Turn is check into simple null check for implicitly convertible reference types // @@ -2887,14 +2899,10 @@ void Error_OperatorCannotBeApplied (ResolveContext ec, Expression left, Expressi public override void FlowAnalysis (FlowAnalysisContext fc) { if ((oper & Operator.LogicalMask) == 0) { - var fc_ontrue = fc.DefiniteAssignmentOnTrue; - var fc_onfalse = fc.DefiniteAssignmentOnFalse; fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment; left.FlowAnalysis (fc); fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment; right.FlowAnalysis (fc); - fc.DefiniteAssignmentOnTrue = fc_ontrue; - fc.DefiniteAssignmentOnFalse = fc_onfalse; return; } @@ -3250,8 +3258,9 @@ public Expression ResolveOperator (ResolveContext rc) return null; if ((oper & Operator.BitwiseMask) != 0) { + expr = EmptyCast.Create (expr, type, rc); - AddEnumResultCast (type); + enum_conversion = GetEnumResultCast (type); if (oper == Operator.BitwiseAnd && left.Type.IsEnum && right.Type.IsEnum) { expr = OptimizeAndOperation (expr); @@ -3499,11 +3508,21 @@ public static PredefinedOperator[] CreateAsStandardOperatorsTable (BuiltinTypes } public static PredefinedOperator[] CreateStandardLiftedOperatorsTable (ModuleContainer module) { + var types = module.Compiler.BuiltinTypes; + + // + // Not strictly lifted but need to be in second group otherwise expressions like + // int + null would resolve to +(object, string) instead of +(int?, int?) + // + var string_operators = new [] { + new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String), + new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String), + }; + var nullable = module.PredefinedTypes.Nullable.TypeSpec; if (nullable == null) - return new PredefinedOperator [0]; + return string_operators; - var types = module.Compiler.BuiltinTypes; var bool_type = types.Bool; var nullable_bool = nullable.MakeGenericType (module, new[] { bool_type }); @@ -3538,13 +3557,8 @@ public static PredefinedOperator[] CreateStandardLiftedOperatorsTable (ModuleCon new PredefinedOperator (nullable_long, nullable_int, Operator.NullableMask | Operator.ShiftMask), new PredefinedOperator (nullable_ulong, nullable_int, Operator.NullableMask | Operator.ShiftMask), - // - // Not strictly lifted but need to be in second group otherwise expressions like - // int + null would resolve to +(object, string) instead of +(int?, int?) - // - new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String), - new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String), - + string_operators [0], + string_operators [1] }; } @@ -3748,7 +3762,7 @@ static Expression PromoteExpression (ResolveContext rc, Expression expr, TypeSpe if (c != null) return c.ConvertImplicitly (type, rc); - return Convert.ImplicitNumericConversion (expr, type, rc); + return Convert.ImplicitNumericConversion (expr, type, rc, false); } static bool PsIsNullOrUndefined (ResolveContext ec, Expression expr) @@ -4000,13 +4014,13 @@ protected override Expression DoResolve (ResolveContext ec) return DoResolveCore (ec, left, right); } - Expression DoResolveDynamic (ResolveContext ec) + Expression DoResolveDynamic (ResolveContext rc) { var lt = left.Type; var rt = right.Type; if (lt.Kind == MemberKind.Void || lt == InternalType.MethodGroup || lt == InternalType.AnonymousMethod || rt.Kind == MemberKind.Void || rt == InternalType.MethodGroup || rt == InternalType.AnonymousMethod) { - Error_OperatorCannotBeApplied (ec, left, right); + Error_OperatorCannotBeApplied (rc, left, right); return null; } @@ -4019,35 +4033,35 @@ Expression DoResolveDynamic (ResolveContext ec) if ((oper & Operator.LogicalMask) != 0) { Expression cond_left, cond_right, expr; - if (ec.FileType == SourceFileType.PlayScript && ec.Module.Compiler.Settings.NewDynamicRuntime_LogicalOps && (typeHint == ec.BuiltinTypes.Bool)) { + if (rc.FileType == SourceFileType.PlayScript && rc.Module.Compiler.Settings.NewDynamicRuntime_LogicalOps && (typeHint == rc.BuiltinTypes.Bool)) { // in the new runtime we convert each side to boolean for logical operations if (lt.BuiltinType == BuiltinTypeSpec.Type.Dynamic) { - left = new Cast(new TypeExpression(ec.BuiltinTypes.Bool, loc), left, loc).Resolve(ec); + left = new Cast(new TypeExpression(rc.BuiltinTypes.Bool, loc), left, loc).Resolve(rc); } if (rt.BuiltinType == BuiltinTypeSpec.Type.Dynamic) { - right = new Cast(new TypeExpression(ec.BuiltinTypes.Bool, loc), right, loc).Resolve(ec); + right = new Cast(new TypeExpression(rc.BuiltinTypes.Bool, loc), right, loc).Resolve(rc); } - return DoResolveCore(ec, left, right); + return DoResolveCore(rc, left, right); } args = new Arguments (2); if (lt.BuiltinType == BuiltinTypeSpec.Type.Dynamic) { - LocalVariable temp = LocalVariable.CreateCompilerGenerated (lt, ec.CurrentBlock, loc); + LocalVariable temp = LocalVariable.CreateCompilerGenerated (lt, rc.CurrentBlock, loc); var cond_args = new Arguments (1); - cond_args.Add (new Argument (new SimpleAssign (temp.CreateReferenceExpression (ec, loc), left).Resolve (ec))); + cond_args.Add (new Argument (new SimpleAssign (temp.CreateReferenceExpression (rc, loc), left).Resolve (rc))); // // dynamic && bool => IsFalse (temp = left) ? temp : temp && right; // dynamic || bool => IsTrue (temp = left) ? temp : temp || right; // - left = temp.CreateReferenceExpression (ec, loc); + left = temp.CreateReferenceExpression (rc, loc); if (oper == Operator.LogicalAnd) { - expr = DynamicUnaryConversion.CreateIsFalse (ec, cond_args, loc); + expr = DynamicUnaryConversion.CreateIsFalse (rc, cond_args, loc); cond_left = left; } else { - expr = DynamicUnaryConversion.CreateIsTrue (ec, cond_args, loc); + expr = DynamicUnaryConversion.CreateIsTrue (rc, cond_args, loc); cond_left = left; } @@ -4056,9 +4070,17 @@ Expression DoResolveDynamic (ResolveContext ec) cond_right = new DynamicBinaryExpression (this.oper, this.GetOperatorExpressionTypeName(), args, loc); } else { - LocalVariable temp = LocalVariable.CreateCompilerGenerated (ec.BuiltinTypes.Bool, ec.CurrentBlock, loc); + LocalVariable temp = LocalVariable.CreateCompilerGenerated (rc.BuiltinTypes.Bool, rc.CurrentBlock, loc); + + if (!Convert.ImplicitConversionExists (rc, left, temp.Type) && (oper == Operator.LogicalAnd ? GetOperatorFalse (rc, left, loc) : GetOperatorTrue (rc, left, loc)) == null) { + rc.Report.Error (7083, left.Location, + "Expression must be implicitly convertible to Boolean or its type `{0}' must define operator `{1}'", + lt.GetSignatureForError (), oper == Operator.LogicalAnd ? "false" : "true"); + return null; + } + + args.Add (new Argument (temp.CreateReferenceExpression (rc, loc).Resolve (rc))); - args.Add (new Argument (temp.CreateReferenceExpression (ec, loc).Resolve (ec))); args.Add (new Argument (right)); right = new DynamicBinaryExpression (this.oper, this.GetOperatorExpressionTypeName(), args, loc); @@ -4068,22 +4090,22 @@ Expression DoResolveDynamic (ResolveContext ec) // if (oper == Operator.LogicalAnd) { cond_left = right; - cond_right = temp.CreateReferenceExpression (ec, loc); + cond_right = temp.CreateReferenceExpression (rc, loc); } else { - cond_left = temp.CreateReferenceExpression (ec, loc); + cond_left = temp.CreateReferenceExpression (rc, loc); cond_right = right; } - expr = new BooleanExpression (new SimpleAssign (temp.CreateReferenceExpression (ec, loc), left)); + expr = new BooleanExpression (new SimpleAssign (temp.CreateReferenceExpression (rc, loc), left)); } - return new Conditional (expr, cond_left, cond_right, loc).Resolve (ec); + return new Conditional (expr, cond_left, cond_right, loc).Resolve (rc); } args = new Arguments(2); args.Add(new Argument(left)); args.Add(new Argument(right)); - return new DynamicBinaryExpression (this.oper, this.GetOperatorExpressionTypeName(), args, loc).Resolve(ec); + return new DynamicBinaryExpression (this.oper, this.GetOperatorExpressionTypeName(), args, loc).Resolve(rc); } Expression DoResolveCore (ResolveContext ec, Expression left_orig, Expression right_orig) @@ -4437,7 +4459,7 @@ Expression ResolveEnumOperators (ResolveContext rc, bool lenum, bool renum, Type else expr = ConvertEnumAdditionalResult (expr, enum_type, rc); - AddEnumResultCast (expr.Type); + enum_conversion = GetEnumResultCast (expr.Type); return expr; } @@ -4452,7 +4474,7 @@ Expression ResolveEnumOperators (ResolveContext rc, bool lenum, bool renum, Type else expr = ConvertEnumAdditionalResult (expr, enum_type, rc); - AddEnumResultCast (expr.Type); + enum_conversion = GetEnumResultCast (expr.Type); } return expr; @@ -4497,7 +4519,7 @@ Expression ConvertEnumSubtractionResult (ResolveContext rc, Expression expr) return EmptyCast.Create (expr, result_type, rc); } - void AddEnumResultCast (TypeSpec type) + public static ConvCast.Mode GetEnumResultCast (TypeSpec type) { if (type.IsNullableType) type = Nullable.NullableInfo.GetUnderlyingType (type); @@ -4507,18 +4529,16 @@ void AddEnumResultCast (TypeSpec type) switch (type.BuiltinType) { case BuiltinTypeSpec.Type.SByte: - enum_conversion = ConvCast.Mode.I4_I1; - break; + return ConvCast.Mode.I4_I1; case BuiltinTypeSpec.Type.Byte: - enum_conversion = ConvCast.Mode.I4_U1; - break; + return ConvCast.Mode.I4_U1; case BuiltinTypeSpec.Type.Short: - enum_conversion = ConvCast.Mode.I4_I2; - break; + return ConvCast.Mode.I4_I2; case BuiltinTypeSpec.Type.UShort: - enum_conversion = ConvCast.Mode.I4_U2; - break; + return ConvCast.Mode.I4_U2; } + + return 0; } // @@ -4526,6 +4546,8 @@ void AddEnumResultCast (TypeSpec type) // Expression ResolveEquality (ResolveContext ec, TypeSpec l, TypeSpec r, bool primitives_only) { + var isPlayScript = ec.FileType == SourceFileType.PlayScript; + Expression result; type = ec.BuiltinTypes.Bool; bool no_arg_conv = false; @@ -4682,22 +4704,20 @@ Expression ResolveEquality (ResolveContext ec, TypeSpec l, TypeSpec r, bool prim if (!TypeSpec.IsReferenceType (l) || !TypeSpec.IsReferenceType (r)) ret = null; - if (ret != null) { - if (l.BuiltinType == BuiltinTypeSpec.Type.String || l.BuiltinType == BuiltinTypeSpec.Type.Delegate || MemberCache.GetUserOperator (l, CSharp.Operator.OpType.Equality, false) != null) - ec.Report.Warning (253, 2, loc, - "Possible unintended reference comparison. Consider casting the right side expression to type `{0}' to get value comparison", - l.GetSignatureForError ()); + if (l.BuiltinType == BuiltinTypeSpec.Type.String || l.BuiltinType == BuiltinTypeSpec.Type.Delegate || l.IsDelegate || MemberCache.GetUserOperator (l, CSharp.Operator.OpType.Equality, false) != null) + ec.Report.Warning (253, 2, loc, + "Possible unintended reference comparison. Consider casting the right side expression to type `{0}' to get value comparison", + l.GetSignatureForError ()); + + if (r.BuiltinType == BuiltinTypeSpec.Type.String || r.BuiltinType == BuiltinTypeSpec.Type.Delegate || r.IsDelegate || MemberCache.GetUserOperator (r, CSharp.Operator.OpType.Equality, false) != null) + ec.Report.Warning (252, 2, loc, + "Possible unintended reference comparison. Consider casting the left side expression to type `{0}' to get value comparison", + r.GetSignatureForError ()); - if (r.BuiltinType == BuiltinTypeSpec.Type.String || r.BuiltinType == BuiltinTypeSpec.Type.Delegate || MemberCache.GetUserOperator (r, CSharp.Operator.OpType.Equality, false) != null) - ec.Report.Warning (252, 2, loc, - "Possible unintended reference comparison. Consider casting the left side expression to type `{0}' to get value comparison", - r.GetSignatureForError ()); - } // // PlayScript - Try equality with any PlayScript/ActionScript implicit conversions // - if (ret == null && ec.FileType == SourceFileType.PlayScript && - (!TypeSpec.IsReferenceType (l) || !TypeSpec.IsReferenceType (r))) { + if (ret == null && isPlayScript && (!TypeSpec.IsReferenceType (l) || !TypeSpec.IsReferenceType (r))) { ret = ResolveOperatorPredefined (ec, ec.BuiltinTypes.AsOperatorsBinaryEquality, no_arg_conv); } @@ -6859,6 +6879,27 @@ public override void FlowAnalysis (FlowAnalysisContext fc) /// public partial class Invocation : ExpressionStatement { + public class Predefined : Invocation + { + public Predefined (MethodGroupExpr expr, Arguments arguments) + : base (expr, arguments) + { + this.mg = expr; + } + + protected override MethodGroupExpr DoResolveOverload (ResolveContext rc) + { + if (!rc.IsObsolete) { + var member = mg.BestCandidate; + ObsoleteAttribute oa = member.GetAttributeObsolete (); + if (oa != null) + AttributeTester.Report_ObsoleteMessage (oa, member.GetSignatureForError (), loc, rc.Report); + } + + return mg; + } + } + protected Arguments arguments; protected Expression expr; protected MethodGroupExpr mg; @@ -7220,17 +7261,18 @@ protected virtual Expression DoResolveDynamic (ResolveContext ec, Expression mem MemberAccess ma = expr as MemberAccess; if (ma != null) { - var left_type = ma.LeftExpression as TypeExpr; + var inst = mg.InstanceExpression; + var left_type = inst as TypeExpr; if (left_type != null) { args.Insert (0, new Argument (new TypeOf (left_type.Type, loc).Resolve (ec), Argument.AType.DynamicTypeName)); - } else { + } else if (inst != null) { // // Any value type has to be pass as by-ref to get back the same // instance on which the member was called // - var mod = ma.LeftExpression is IMemoryLocation && TypeSpec.IsValueType (ma.LeftExpression.Type) ? + var mod = inst is IMemoryLocation && TypeSpec.IsValueType (inst.Type) ? Argument.AType.Ref : Argument.AType.None; - args.Insert (0, new Argument (ma.LeftExpression.Resolve (ec), mod)); + args.Insert (0, new Argument (inst.Resolve (ec), mod)); } } else { // is SimpleName if (ec.IsStatic) { @@ -7741,7 +7783,7 @@ public override void Emit (EmitContext ec) if (!Emit (ec, v)) v.Emit (ec); } - + public override void EmitStatement (EmitContext ec) { LocalTemporary v = null; @@ -8576,7 +8618,9 @@ void EmitDynamicInitializers (EmitContext ec, bool emitConstants, StackFieldExpr public override void Emit (EmitContext ec) { - EmitToFieldSource (ec); + var await_field = EmitToFieldSource (ec); + if (await_field != null) + await_field.Emit (ec); } protected sealed override FieldExpr EmitToFieldSource (EmitContext ec) @@ -8630,18 +8674,18 @@ protected sealed override FieldExpr EmitToFieldSource (EmitContext ec) return await_stack_field; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { // no multi dimensional or jagged arrays if (arguments.Count != 1 || array_element_type.IsArray) { - base.EncodeAttributeValue (rc, enc, targetType); + base.EncodeAttributeValue (rc, enc, targetType, parameterType); return; } // No array covariance, except for array -> object if (type != targetType) { if (targetType.BuiltinType != BuiltinTypeSpec.Type.Object) { - base.EncodeAttributeValue (rc, enc, targetType); + base.EncodeAttributeValue (rc, enc, targetType, parameterType); return; } @@ -8655,7 +8699,7 @@ public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder e if (array_data == null) { IntConstant ic = arguments[0] as IntConstant; if (ic == null || !ic.IsDefaultValue) { - base.EncodeAttributeValue (rc, enc, targetType); + base.EncodeAttributeValue (rc, enc, targetType, parameterType); } else { enc.Encode (0); } @@ -8665,7 +8709,7 @@ public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder e enc.Encode (array_data.Count); foreach (var element in array_data) { - element.EncodeAttributeValue (rc, enc, array_element_type); + element.EncodeAttributeValue (rc, enc, array_element_type, parameterType); } } @@ -8792,14 +8836,28 @@ public CompilerGeneratedThis (TypeSpec type, Location loc) : base (loc) { this.type = type; - eclass = ExprClass.Variable; } - protected override Expression DoResolve (ResolveContext ec) + protected override Expression DoResolve (ResolveContext rc) { + eclass = ExprClass.Variable; + + var block = rc.CurrentBlock; + if (block != null) { + var top = block.ParametersBlock.TopBlock; + if (top.ThisVariable != null) + variable_info = top.ThisVariable.VariableInfo; + + } + return this; } + public override Expression DoResolveLValue (ResolveContext rc, Expression right_side) + { + return DoResolve (rc); + } + public override HoistedVariable GetHoistedVariable (AnonymousExpression ae) { return null; @@ -8832,7 +8890,7 @@ public void EmitAddressOf (EmitContext ec) } } - VariableInfo variable_info; + protected VariableInfo variable_info; public This (Location loc) { @@ -9442,7 +9500,7 @@ static bool ContainsDynamicType (TypeSpec type) return false; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { // Target type is not System.Type therefore must be object // and we need to use different encoding sequence @@ -9951,7 +10009,7 @@ public override Expression LookupNameExpression (ResolveContext rc, MemberLookup // with disable flow analysis as we don't know whether left side expression // is used as variable or type // - if (expr is VariableReference || expr is ConstantExpr || expr is Linq.TransparentMemberAccess) { + if (expr is VariableReference || expr is ConstantExpr || expr is Linq.TransparentMemberAccess || expr is EventExpr) { expr = expr.Resolve (rc); } else if (expr is TypeParameterExpr) { expr.Error_UnexpectedKind (rc, flags, sn.Location); @@ -10281,6 +10339,8 @@ public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext rc) } else { texpr = new GenericOpenTypeExpr (nested, loc); } + } else if (expr_resolved is GenericOpenTypeExpr) { + texpr = new GenericOpenTypeExpr (nested, loc); } else { texpr = new TypeExpression (nested, loc); } @@ -10762,6 +10822,10 @@ public void AddressOf (EmitContext ec, AddressOp mode) { var ac = (ArrayContainer) ea.Expr.Type; + if (!has_await_args.HasValue && ec.HasSet (BuilderContext.Options.AsyncBody) && ea.Arguments.ContainsEmitWithAwait ()) { + LoadInstanceAndArguments (ec, false, true); + } + LoadInstanceAndArguments (ec, false, false); if (ac.Element.IsGenericParameter && mode == AddressOp.Load) @@ -10958,6 +11022,7 @@ public override Expression EmitToField (EmitContext ec) // CallRef (ref a[await Task.Factory.StartNew (() => 1)]); // ea.Expr = ea.Expr.EmitToField (ec); + ea.Arguments = ea.Arguments.Emit (ec, false, true); return this; } @@ -11999,7 +12064,10 @@ protected override Expression DoResolve (ResolveContext ec) return null; } - if (!(member is PropertyExpr || member is FieldExpr)) { + var me = member as MemberExpr; + if (me is EventExpr) { + me = me.ResolveMemberAccess (ec, null, null); + } else if (!(member is PropertyExpr || member is FieldExpr)) { ec.Report.Error (1913, loc, "Member `{0}' cannot be initialized. An object initializer may only be used for fields, or properties", member.GetSignatureForError ()); @@ -12007,7 +12075,6 @@ protected override Expression DoResolve (ResolveContext ec) return null; } - var me = member as MemberExpr; if (me.IsStatic) { ec.Report.Error (1914, loc, "Static field or property `{0}' cannot be assigned in an object initializer", @@ -12305,8 +12372,10 @@ public override void EmitStatement (EmitContext ec) public override void FlowAnalysis (FlowAnalysisContext fc) { - foreach (var initializer in initializers) - initializer.FlowAnalysis (fc); + foreach (var initializer in initializers) { + if (initializer != null) + initializer.FlowAnalysis (fc); + } } } @@ -12438,6 +12507,20 @@ protected override Expression DoResolve (ResolveContext ec) return e; } + public override void Emit (EmitContext ec) + { + if (method == null && TypeSpec.IsValueType (type) && initializers.Initializers.Count > 1 && ec.HasSet (BuilderContext.Options.AsyncBody) && initializers.ContainsEmitWithAwait ()) { + var fe = ec.GetTemporaryField (type); + + if (!Emit (ec, fe)) + fe.Emit (ec); + + return; + } + + base.Emit (ec); + } + public override bool Emit (EmitContext ec, IMemoryLocation target) { bool left_on_stack; @@ -12454,6 +12537,8 @@ public override bool Emit (EmitContext ec, IMemoryLocation target) LocalTemporary temp = null; instance = target as LocalTemporary; + if (instance == null) + instance = target as StackFieldExpr; if (instance == null) { if (!left_on_stack) { diff --git a/mcs/mcs/flowanalysis.cs b/mcs/mcs/flowanalysis.cs index 4f54f268d29..dbb74a7515a 100644 --- a/mcs/mcs/flowanalysis.cs +++ b/mcs/mcs/flowanalysis.cs @@ -139,15 +139,22 @@ public bool IsFullyInitialized (FlowAnalysisContext fc, VariableInfo vi, Locatio var field = struct_info.Fields[i]; if (!fc.IsStructFieldDefinitelyAssigned (vi, field.Name)) { - if (field.MemberDefinition is Property.BackingField) { + var bf = field.MemberDefinition as Property.BackingField; + if (bf != null) { + if (bf.Initializer != null) + continue; + fc.Report.Error (843, loc, "An automatically implemented property `{0}' must be fully assigned before control leaves the constructor. Consider calling the default struct contructor from a constructor initializer", field.GetSignatureForError ()); - } else { - fc.Report.Error (171, loc, - "Field `{0}' must be fully assigned before control leaves the constructor", - field.GetSignatureForError ()); + + ok = false; + continue; } + + fc.Report.Error (171, loc, + "Field `{0}' must be fully assigned before control leaves the constructor", + field.GetSignatureForError ()); ok = false; } } diff --git a/mcs/mcs/generic.cs b/mcs/mcs/generic.cs index 2ad7afc0077..2bc97b07f1a 100644 --- a/mcs/mcs/generic.cs +++ b/mcs/mcs/generic.cs @@ -632,6 +632,11 @@ public void Define (GenericTypeParameterBuilder type) spec.SetMetaInfo (type); } + public void Define (TypeParameter tp) + { + builder = tp.builder; + } + public void EmitConstraints (GenericTypeParameterBuilder builder) { var attr = GenericParameterAttributes.None; @@ -1048,20 +1053,6 @@ public TypeSpec GetEffectiveBase () if (effective_base != null) return effective_base; -//<<<<<<< ours -// for (int i = 0; i < types.Length - 1; ++i) { -// types [i] = types [i].BaseType; -// } -// -// types [types.Length - 1] = BaseType; -// } else { -// types = types.Select (l => l.BaseType).ToArray (); -// } -// -// if (types != null) { -// return Convert.FindMostEncompassedType (types, null); -// } -//======= var types = new TypeSpec [HasTypeConstraint ? targs.Length + 1 : targs.Length]; for (int i = 0; i < targs.Length; ++i) { @@ -1073,13 +1064,12 @@ public TypeSpec GetEffectiveBase () continue; } - types [i] = ((TypeParameterSpec)t).GetEffectiveBase (); + var tps = t as TypeParameterSpec; + types [i] = tps != null ? tps.GetEffectiveBase () : t; } if (HasTypeConstraint) types [types.Length - 1] = BaseType; -//>>>>>>> theirs - return effective_base = Convert.FindMostEncompassedType (types, null); } @@ -1376,7 +1366,15 @@ public bool IsConvertibleToInterface (TypeSpec iface) if (TypeArguments != null) { foreach (var t in TypeArguments) { - if (((TypeParameterSpec) t).IsConvertibleToInterface (iface)) + var tps = t as TypeParameterSpec; + if (tps != null) { + if (tps.IsConvertibleToInterface (iface)) + return true; + + continue; + } + + if (t.ImplementsInterface (iface, false)) return true; } } @@ -1484,13 +1482,21 @@ public TypeSpec Inflate (TypeSpec type) if (tp != null) return Inflate (tp); - var ac = type as ArrayContainer; - if (ac != null) { - var et = Inflate (ac.Element); - if (et != ac.Element) - return ArrayContainer.MakeType (context.Module, et, ac.Rank); + var ec = type as ElementTypeSpec; + if (ec != null) { + var et = Inflate (ec.Element); + if (et != ec.Element) { + var ac = ec as ArrayContainer; + if (ac != null) + return ArrayContainer.MakeType (context.Module, et, ac.Rank); + + if (ec is PointerContainer) + return PointerContainer.MakeType (context.Module, et); + + throw new NotImplementedException (); + } - return ac; + return ec; } if (type.Kind == MemberKind.MissingType) diff --git a/mcs/mcs/import.cs b/mcs/mcs/import.cs index 6134ca1b9b1..302974502d8 100644 --- a/mcs/mcs/import.cs +++ b/mcs/mcs/import.cs @@ -478,6 +478,8 @@ public MethodSpec CreateMethod (MethodBase mb, TypeSpec declaringType) else mod |= Modifiers.VIRTUAL; } + } else if (parameters.HasExtensionMethodType) { + mod |= Modifiers.METHOD_EXTENSION; } } @@ -587,7 +589,7 @@ AParametersCollection CreateParameters (TypeSpec parent, ParameterInfo[] pi, Met if (dt.Namespace != CompilerServicesNamespace) continue; - if (dt.Name == "CallerLineNumberAttribute" && (ptype.BuiltinType == BuiltinTypeSpec.Type.Int || Convert.ImplicitNumericConversionExists (module.Compiler.BuiltinTypes.Int, ptype, null))) + if (dt.Name == "CallerLineNumberAttribute" && (ptype.BuiltinType == BuiltinTypeSpec.Type.Int || Convert.ImplicitNumericConversionExists (module.Compiler.BuiltinTypes.Int, ptype, null, false))) mod |= Parameter.Modifier.CallerLineNumber; else if (dt.Name == "CallerFilePathAttribute" && Convert.ImplicitReferenceConversionExists (module.Compiler.BuiltinTypes.String, ptype, null, false)) mod |= Parameter.Modifier.CallerFilePath; diff --git a/mcs/mcs/iterators.cs b/mcs/mcs/iterators.cs index efa0439e675..d7a7b532a1b 100644 --- a/mcs/mcs/iterators.cs +++ b/mcs/mcs/iterators.cs @@ -74,6 +74,9 @@ public override bool Resolve (BlockContext bc) public void RegisterResumePoint () { + if (resume_pc != 0) + return; + if (inside_try_block == null) { resume_pc = machine_initializer.AddResumePoint (this); } else { @@ -734,8 +737,7 @@ public override Reachability MarkReachable (Reachability rc) // // The state as we generate the machine // - Label move_next_ok; - Label iterator_body_end; + protected Label move_next_ok; protected Label move_next_error; LocalBuilder skip_finally; protected LocalBuilder current_pc; @@ -749,11 +751,7 @@ protected StateMachineInitializer (ParametersBlock block, TypeDefinition host, T #region Properties - public Label BodyEnd { - get { - return iterator_body_end; - } - } + public Label BodyEnd { get; set; } public LocalBuilder CurrentPC { @@ -841,11 +839,18 @@ void EmitMoveNext_NoResumePoints (EmitContext ec) // We only care if the PC is zero (start executing) or non-zero (don't do anything) ec.Emit (OpCodes.Brtrue, move_next_error); - iterator_body_end = ec.DefineLabel (); + BodyEnd = ec.DefineLabel (); + + var async_init = this as AsyncInitializer; + if (async_init != null) + ec.BeginExceptionBlock (); block.EmitEmbedded (ec); - ec.MarkLabel (iterator_body_end); + if (async_init != null) + async_init.EmitCatchBlock (ec); + + ec.MarkLabel (BodyEnd); EmitMoveNextEpilogue (ec); @@ -855,6 +860,8 @@ void EmitMoveNext_NoResumePoints (EmitContext ec) ec.EmitInt (0); ec.Emit (OpCodes.Ret); } + + ec.MarkLabel (move_next_ok); } void EmitMoveNext (EmitContext ec) @@ -904,26 +911,14 @@ void EmitMoveNext (EmitContext ec) ec.MarkLabel (labels[0]); - iterator_body_end = ec.DefineLabel (); + BodyEnd = ec.DefineLabel (); block.EmitEmbedded (ec); - ec.MarkLabel (iterator_body_end); + ec.MarkLabel (BodyEnd); if (async_init != null) { - var catch_value = LocalVariable.CreateCompilerGenerated (ec.Module.Compiler.BuiltinTypes.Exception, block, Location); - - ec.BeginCatchBlock (catch_value.Type); - catch_value.EmitAssign (ec); - - ec.EmitThis (); - ec.EmitInt ((int) IteratorStorey.State.After); - ec.Emit (OpCodes.Stfld, storey.PC.Spec); - - ((AsyncTaskStorey) async_init.Storey).EmitSetException (ec, new LocalVariableReference (catch_value, Location)); - - ec.Emit (OpCodes.Leave, move_next_ok); - ec.EndExceptionBlock (); + async_init.EmitCatchBlock (ec); } ec.Mark (Block.Original.EndLocation); diff --git a/mcs/mcs/mcs.csproj b/mcs/mcs/mcs.csproj index 88c75ceac1a..9d235123bff 100644 --- a/mcs/mcs/mcs.csproj +++ b/mcs/mcs/mcs.csproj @@ -27,6 +27,7 @@ @options-test.rsp /newdynamic- false + true True @@ -36,6 +37,7 @@ 4 bin\Debug true + true True @@ -55,6 +57,7 @@ false 4 False + true @@ -202,32 +205,41 @@ - + + + options-assert-test.rsp PreserveNewest - + + options-away3d-core-monomac.rsp PreserveNewest - - + + options-mcs.rsp PreserveNewest - + + options-pscorlib.rsp PreserveNewest - + + options-test.rsp PreserveNewest - + + options.rsp PreserveNewest + + ..\class\lib\net_4_5\System.dll + - ..\class\lib\build\System.Xml.dll + ..\class\lib\net_4_5\System.Xml.dll - - ..\class\lib\build\System.dll + + ..\class\lib\net_4_5\mscorlib.dll diff --git a/mcs/mcs/membercache.cs b/mcs/mcs/membercache.cs index 51179f48745..e0aac189226 100644 --- a/mcs/mcs/membercache.cs +++ b/mcs/mcs/membercache.cs @@ -721,6 +721,9 @@ public static List GetAllFieldsForDefiniteAssignment (TypeSpec contai if (!fs.IsPublic && container.MemberDefinition.IsImported && (!fs.MemberType.IsArray && TypeSpec.IsReferenceType (fs.MemberType))) continue; + //if ((fs.Modifiers & (Modifiers.BACKING_FIELD) != 0) + // continue; + if (fields == null) fields = new List (); diff --git a/mcs/mcs/method.cs b/mcs/mcs/method.cs index 575787cc6a9..f616ee0386e 100644 --- a/mcs/mcs/method.cs +++ b/mcs/mcs/method.cs @@ -587,6 +587,12 @@ public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] if ((ModFlags & extern_static) != extern_static) { Report.Error (601, a.Location, "The DllImport attribute must be specified on a method marked `static' and `extern'"); } + + if (MemberName.IsGeneric || Parent.IsGenericOrParentIsGeneric) { + Report.Error (7042, a.Location, + "The DllImport attribute cannot be applied to a method that is generic or contained in a generic type"); + } + is_external_implementation = true; } @@ -797,6 +803,11 @@ public override void Emit () if (MethodData != null) MethodData.Emit (Parent); + if (block != null && block.StateMachine is AsyncTaskStorey) { + var psm = Module.PredefinedAttributes.AsyncStateMachine; + psm.EmitAttribute (MethodBuilder, block.StateMachine); + } + if ((ModFlags & Modifiers.PARTIAL) == 0) Block = null; } @@ -1420,6 +1431,12 @@ public override void Emit () if (IsPartialDefinition) { if (partialMethodImplementation != null && CurrentTypeParameters != null) { CurrentTypeParameters.CheckPartialConstraints (partialMethodImplementation); + + var otp = partialMethodImplementation.CurrentTypeParameters; + for (int i = 0; i < CurrentTypeParameters.Count; ++i) { + var tp = CurrentTypeParameters [i]; + tp.Define (otp[i]); + } } return; @@ -1439,12 +1456,6 @@ public override void Emit () } } - if (block != null && block.StateMachine is AsyncTaskStorey) { - var psm = Module.PredefinedAttributes.AsyncStateMachine; - - psm.EmitAttribute (MethodBuilder, block.StateMachine); - } - if ((ModFlags & Modifiers.METHOD_EXTENSION) != 0) Module.PredefinedAttributes.Extension.EmitAttribute (MethodBuilder); @@ -1483,17 +1494,40 @@ public void SetPartialDefinition (Method methodDefinition) // Ensure we are always using method declaration parameters for (int i = 0; i < methodDefinition.parameters.Count; ++i ) { - parameters [i].Name = methodDefinition.parameters [i].Name; - parameters [i].DefaultValue = methodDefinition.parameters [i].DefaultValue; + var md_p = methodDefinition.parameters [i]; + var p = parameters [i]; + p.Name = md_p.Name; + p.DefaultValue = md_p.DefaultValue; + if (md_p.OptAttributes != null) { + if (p.OptAttributes == null) { + p.OptAttributes = md_p.OptAttributes; + } else { + p.OptAttributes.Attrs.AddRange (md_p.OptAttributes.Attrs); + } + } } - if (methodDefinition.attributes == null) - return; + if (methodDefinition.attributes != null) { + if (attributes == null) { + attributes = methodDefinition.attributes; + } else { + attributes.Attrs.AddRange (methodDefinition.attributes.Attrs); + } + } - if (attributes == null) { - attributes = methodDefinition.attributes; - } else { - attributes.Attrs.AddRange (methodDefinition.attributes.Attrs); + if (CurrentTypeParameters != null) { + for (int i = 0; i < CurrentTypeParameters.Count; ++i) { + var tp_other = methodDefinition.CurrentTypeParameters [i]; + if (tp_other.OptAttributes == null) + continue; + + var tp = CurrentTypeParameters [i]; + if (tp.OptAttributes == null) { + tp.OptAttributes = tp_other.OptAttributes; + } else { + tp.OptAttributes.Attrs.AddRange (tp.OptAttributes.Attrs); + } + } } } } @@ -1695,7 +1729,6 @@ bool IMethodData.IsAccessor { } public bool IsPrimaryConstructor { get; set; } - MethodBase IMethodDefinition.Metadata { get { @@ -1789,12 +1822,12 @@ public override bool Define () if (!CheckBase ()) return false; - if (Parent.PrimaryConstructorParameters != null && !IsPrimaryConstructor) { - if (Parent.Kind == MemberKind.Struct) { - Report.Error (9009, Location, "`{0}': Structs with primary constructor cannot have explicit constructor", + if (Parent.PrimaryConstructorParameters != null && !IsPrimaryConstructor && !IsStatic) { + if (Parent.Kind == MemberKind.Struct && Initializer is ConstructorThisInitializer && Initializer.Arguments == null) { + Report.Error (8043, Location, "`{0}': Structs with primary constructor cannot specify default constructor initializer", GetSignatureForError ()); } else if (Initializer == null || Initializer is ConstructorBaseInitializer) { - Report.Error (9002, Location, "`{0}': Instance constructor of type with primary constructor must specify `this' constructor initializer", + Report.Error (8037, Location, "`{0}': Instance constructor of type with primary constructor must specify `this' constructor initializer", GetSignatureForError ()); } } @@ -1859,6 +1892,14 @@ public override void Emit () bc.Set (ResolveContext.Options.ConstructorScope); if (block != null) { + if (!IsStatic && Initializer == null && Parent.PartialContainer.Kind == MemberKind.Struct) { + // + // If this is a non-static `struct' constructor and doesn't have any + // initializer, it must initialize all of the struct's fields. + // + block.AddThisVariable (bc); + } + // // If we use a "this (...)" constructor initializer, then // do not emit field initializers, they are initialized in the other constructor @@ -1867,16 +1908,8 @@ public override void Emit () Parent.PartialContainer.ResolveFieldInitializers (bc); if (!IsStatic) { - if (Initializer == null) { - if (Parent.PartialContainer.Kind == MemberKind.Struct) { - // - // If this is a non-static `struct' constructor and doesn't have any - // initializer, it must initialize all of the struct's fields. - // - block.AddThisVariable (bc); - } else if (Parent.PartialContainer.Kind == MemberKind.Class) { - Initializer = new GeneratedBaseInitializer (Location, null); - } + if (Initializer == null && Parent.PartialContainer.Kind == MemberKind.Class) { + Initializer = new GeneratedBaseInitializer (Location, null); } if (Initializer != null && diff --git a/mcs/mcs/namespace.cs b/mcs/mcs/namespace.cs index d2b7860f0a8..ec052e92e74 100644 --- a/mcs/mcs/namespace.cs +++ b/mcs/mcs/namespace.cs @@ -808,7 +808,10 @@ public partial class NamespaceContainer : TypeContainer, IMemberContext public bool DeclarationFound; Namespace[] namespace_using_table; + Tuple[] type_using_table; /* AS SUPPORT */ + + TypeSpec[] types_using_table; Dictionary aliases; CompilationSourceFile compSourceFile; @@ -1099,6 +1102,24 @@ ExtensionMethodCandidates LookupExtensionMethodCandidates (IMemberContext invoca return new ExtensionMethodCandidates (invocationContext, candidates, this, position); } + // LAMESPEC: TODO no spec about priority over normal extension methods yet + if (types_using_table != null) { + foreach (var t in types_using_table) { + + var res = t.MemberCache.FindExtensionMethods (invocationContext, name, arity); + if (res == null) + continue; + + if (candidates == null) + candidates = res; + else + candidates.AddRange (res); + } + + if (candidates != null) + return new ExtensionMethodCandidates (invocationContext, candidates, this, position); + } + return null; } @@ -1305,6 +1326,42 @@ FullNamedExpression Lookup (string name, int arity, LookupMode mode, bool absolu return match; } + public static MethodGroupExpr LookupStaticUsings (IMemberContext mc, string name, int arity, Location loc) + { + for (var m = mc.CurrentMemberDefinition; m != null; m = m.Parent) { + + var nc = m as NamespaceContainer; + if (nc == null) + continue; + + List candidates = null; + if (nc.types_using_table != null) { + foreach (var using_type in nc.types_using_table) { + var members = MemberCache.FindMembers (using_type, name, true); + if (members != null) { + foreach (var member in members) { + if ((member.Modifiers & Modifiers.METHOD_EXTENSION) != 0) + continue; + + if (arity > 0 && member.Arity != arity) + continue; + + if (candidates == null) + candidates = new List (); + + candidates.Add (member); + } + } + } + } + + if (candidates != null) + return new MethodGroupExpr (candidates, null, loc); + } + + return null; + } + protected override void DefineNamespace () { if (namespace_using_table == null) @@ -1322,6 +1379,10 @@ void DoDefineNamespace () var t_list = new List> (clauses.Count); /* AS SUPPORT */ var list = new List (clauses.Count); + + List namespaces = null; + List types = null; + bool post_process_using_aliases = false; @@ -1379,25 +1440,42 @@ void DoDefineNamespace () } continue; } - + var using_ns = entry.ResolvedExpression as NamespaceExpression; - if (using_ns == null) - continue; + if (using_ns == null) { - if (list.Contains (using_ns.Namespace)) { - // Ensure we don't report the warning multiple times in repl - clauses.RemoveAt (i--); + var type = ((TypeExpr)entry.ResolvedExpression).Type; + + if (types == null) + types = new List (); - Compiler.Report.Warning (105, 3, entry.Location, - "The using directive for `{0}' appeared previously in this namespace", using_ns.GetSignatureForError ()); + if (types.Contains (type)) { + Warning_DuplicateEntry (entry); + } else { + types.Add (type); + } } else { - list.Add (using_ns.Namespace); + if (namespaces == null) + namespaces = new List (); + + if (namespaces.Contains (using_ns.Namespace)) { + // Ensure we don't report the warning multiple times in repl + clauses.RemoveAt (i--); + + Warning_DuplicateEntry (entry); + } else { + namespaces.Add (using_ns.Namespace); + } } } namespace_using_table = list.ToArray (); type_using_table = t_list.ToArray (); /* AS SUPPORT */ + namespace_using_table = namespaces == null ? new Namespace [0] : namespaces.ToArray (); + if (types != null) + types_using_table = types.ToArray (); + if (post_process_using_aliases) { for (int i = 0; i < clauses.Count; ++i) { var entry = clauses[i]; @@ -1453,6 +1531,13 @@ protected override bool VerifyClsCompliance () return false; } + void Warning_DuplicateEntry (UsingNamespace entry) + { + Compiler.Report.Warning (105, 3, entry.Location, + "The using directive for `{0}' appeared previously in this namespace", + entry.ResolvedExpression.GetSignatureForError ()); + } + public override void Accept (StructuralVisitor visitor) { visitor.Visit (this); @@ -1508,13 +1593,27 @@ public virtual void Define (NamespaceContainer ctx) { resolved = expr.ResolveAsTypeOrNamespace (ctx); var ns = resolved as NamespaceExpression; - if (ns == null) { - if (resolved != null) { - ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (resolved.Type); - ctx.Module.Compiler.Report.Error (138, Location, - "`{0}' is a type not a namespace. A using namespace directive can only be applied to namespaces", - GetSignatureForError ()); + if (ns != null) + return; + + if (resolved != null) { + var compiler = ctx.Module.Compiler; + var type = resolved.Type; + if (compiler.Settings.Version >= LanguageVersion.V_6) { + if (!type.IsClass || !type.IsStatic) { + compiler.Report.SymbolRelatedToPreviousError (type); + compiler.Report.Error (7007, Location, + "`{0}' is not a static class. A using namespace directive can only be applied to static classes or namespace", + GetSignatureForError ()); + } + + return; } + + compiler.Report.SymbolRelatedToPreviousError (type); + compiler.Report.Error (138, Location, + "`{0}' is a type not a namespace. A using namespace directive can only be applied to namespaces", + GetSignatureForError ()); } } diff --git a/mcs/mcs/nullable.cs b/mcs/mcs/nullable.cs index aec424ce1d2..ab2d7ef9b68 100644 --- a/mcs/mcs/nullable.cs +++ b/mcs/mcs/nullable.cs @@ -187,6 +187,11 @@ public void EmitCheck (EmitContext ec) call.EmitPredefined (ec, NullableInfo.GetHasValue (expr.Type), null); } + public override void EmitSideEffect (EmitContext ec) + { + expr.EmitSideEffect (ec); + } + public override Expression EmitToField (EmitContext ec) { if (temp_field == null) @@ -1158,26 +1163,25 @@ Expression ConvertExpression (ResolveContext ec) // Constant lc = left as Constant; if (lc != null && !lc.IsDefaultValue) - return ReducedExpression.Create (lc, this); + return ReducedExpression.Create (lc, this, false); // // Reduce (left ?? null) to left OR (null-constant ?? right) to right // - if (right.IsNull || lc != null) - return ReducedExpression.Create (lc != null ? right : left, this); + if (right.IsNull || lc != null) { + // + // Special case null ?? null + // + if (right.IsNull && ltype == right.Type) + return null; + + return ReducedExpression.Create (lc != null ? right : left, this, false); + } right = Convert.ImplicitConversion (ec, right, ltype, loc); type = ltype; return this; } - - // - // Special case null ?? null - // - if (ltype == right.Type) { - type = ltype; - return this; - } } else { return null; } @@ -1190,7 +1194,7 @@ Expression ConvertExpression (ResolveContext ec) // Reduce (null ?? right) to right // if (left.IsNull) - return ReducedExpression.Create (right, this).Resolve (ec); + return ReducedExpression.Create (right, this, false).Resolve (ec); left = Convert.ImplicitConversion (ec, unwrap ?? left, rtype, loc); type = rtype; @@ -1238,7 +1242,7 @@ public override void Emit (EmitContext ec) // When both expressions are nullable the unwrap // is needed only for null check not for value uwrap // - if (type.IsNullableType) + if (type.IsNullableType && TypeSpecComparer.IsEqual (NullableInfo.GetUnderlyingType (type), unwrap.Type)) unwrap.Load (ec); else left.Emit (ec); diff --git a/mcs/mcs/options-mcs.rsp b/mcs/mcs/options-mcs.rsp deleted file mode 100644 index a91d86fee1c..00000000000 --- a/mcs/mcs/options-mcs.rsp +++ /dev/null @@ -1,88 +0,0 @@ --noconfig --nostdlib --unsafe+ --d:"TRACE;DEBUG;NET_4_0;STATIC;NO_SYMBOL_WRITER;NO_AUTHENTICODE" --target:exe --out:delete_me.exe --r:../class/lib/build/mscorlib.dll --r:../class/lib/build/System.dll --r:../class/lib/build/System.Core.dll --r:../class/lib/build/System.Xml.dll --r:../class/lib/build/Mono.Security.dll -AssemblyInfo.cs -anonymous.cs -argument.cs -ps-lang.cs -ps-tokenizer.cs -ps-codegen.cs -ps-parser.cs -cs-parser.cs -assign.cs -assembly.cs -async.cs -attribute.cs -cs-tokenizer.cs -cfold.cs -class.cs -codegen.cs -complete.cs -const.cs -constant.cs -convert.cs -context.cs -cxx-emit.cs -cxx-target.cs -decl.cs -delegate.cs -doc.cs -driver.cs -dynamic.cs -ecore.cs -enum.cs -eval.cs -expression.cs -field.cs -flowanalysis.cs -generic.cs -import.cs -inliner.cs -intrinsics.cs -iterators.cs -ikvm.cs -js-emit.cs -js-target.cs -lambda.cs -linq.cs -literal.cs -location.cs -membercache.cs -method.cs -modifiers.cs -namespace.cs -nullable.cs -parameter.cs -pending.cs -property.cs -reflection.cs -report.cs -settings.cs -module.cs -statement.cs -support.cs -typemanager.cs -typespec.cs -visit.cs -../class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs -../class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs -../class/Mono.CompilerServices.SymbolWriter/SourceMethodBuilder.cs -../class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs -../build/common/Consts.cs -../tools/monop/outline.cs - -../../external/ikvm/reflect/*.cs -../../external/ikvm/reflect/Emit/*.cs -../../external/ikvm/reflect/Metadata/*.cs -../../external/ikvm/reflect/Reader/*.cs -../../external/ikvm/reflect/Writer/*.cs -../../external/ikvm/reflect/Impl/ITypeOwner.cs -../../external/ikvm/reflect/Impl/SymbolSupport.cs diff --git a/mcs/mcs/parameter.cs b/mcs/mcs/parameter.cs index 4cf09d5edf3..8226acd64b7 100644 --- a/mcs/mcs/parameter.cs +++ b/mcs/mcs/parameter.cs @@ -222,8 +222,7 @@ public enum Modifier : byte { CallerMask = CallerMemberName | CallerLineNumber | CallerFilePath } - static readonly string[] attribute_targets = new string[] { "param" }; - static readonly string[] attribute_targets_primary = new string[] { "param", "field" }; + static readonly string[] attribute_targets = new [] { "param" }; FullNamedExpression texpr; Modifier modFlags; @@ -234,7 +233,6 @@ public enum Modifier : byte { protected int idx; public bool HasAddressTaken; - Constructor primary_constructor; TemporaryVariableReference expr_tree_variable; HoistedParameter hoisted_variant; @@ -309,7 +307,7 @@ public FullNamedExpression TypeExpression { public override string[] ValidAttributeTargets { get { - return primary_constructor != null ? attribute_targets_primary : attribute_targets; + return attribute_targets; } } @@ -317,12 +315,6 @@ public override string[] ValidAttributeTargets { public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa) { - if (a.Target == AttributeTargets.Field) { - var field = MemberCache.FindMember (primary_constructor.Spec.DeclaringType, MemberFilter.Field (name, parameter_type), BindingRestriction.DeclaredOnly); - ((Field)field.MemberDefinition).ApplyAttributeBuilder (a, ctor, cdata, pa); - return; - } - if (a.Type == pa.In && ModFlags == Modifier.OUT) { a.Report.Error (36, a.Location, "An out parameter cannot have the `In' attribute"); return; @@ -379,6 +371,15 @@ public virtual bool CheckAccessibility (InterfaceMemberBase member) return member.IsAccessibleAs (parameter_type); } + bool IsValidCallerContext (MemberCore memberContext) + { + var m = memberContext as Method; + if (m != null) + return !m.IsPartialImplementation; + + return true; + } + // // Resolve is used in method definitions // @@ -390,10 +391,6 @@ public virtual TypeSpec Resolve (IMemberContext rc, int index) if (attributes != null) attributes.AttachTo (this, rc); - var ctor = rc.CurrentMemberDefinition as Constructor; - if (ctor != null && ctor.IsPrimaryConstructor) - primary_constructor = ctor; - parameter_type = texpr.ResolveAsType (rc); if (parameter_type == null) return null; @@ -428,6 +425,7 @@ void ResolveCallerAttributes (ResolveContext rc) { var pa = rc.Module.PredefinedAttributes; TypeSpec caller_type; + Attribute callerMemberName = null, callerFilePath = null; foreach (var attr in attributes.Attrs) { var atype = attr.ResolveTypeForComparison (); @@ -442,18 +440,31 @@ void ResolveCallerAttributes (ResolveContext rc) caller_type.GetSignatureForError (), parameter_type.GetSignatureForError ()); } + if (!IsValidCallerContext (rc.CurrentMemberDefinition)) { + rc.Report.Warning (4026, 1, attr.Location, + "The CallerMemberName applied to parameter `{0}' will have no effect because it applies to a member that is used in context that do not allow optional arguments", + name); + } + modFlags |= Modifier.CallerMemberName; + callerMemberName = attr; continue; } if (atype == pa.CallerLineNumberAttribute) { caller_type = rc.BuiltinTypes.Int; - if (caller_type != parameter_type && !Convert.ImplicitNumericConversionExists (caller_type, parameter_type, rc)) { + if (caller_type != parameter_type && !Convert.ImplicitStandardConversionExists (new IntConstant (caller_type, int.MaxValue, Location.Null), parameter_type, rc, false)) { rc.Report.Error (4017, attr.Location, - "The CallerMemberName attribute cannot be applied because there is no standard conversion from `{0}' to `{1}'", + "The CallerLineNumberAttribute attribute cannot be applied because there is no standard conversion from `{0}' to `{1}'", caller_type.GetSignatureForError (), parameter_type.GetSignatureForError ()); } + if (!IsValidCallerContext (rc.CurrentMemberDefinition)) { + rc.Report.Warning (4024, 1, attr.Location, + "The CallerLineNumberAttribute applied to parameter `{0}' will have no effect because it applies to a member that is used in context that do not allow optional arguments", + name); + } + modFlags |= Modifier.CallerLineNumber; continue; } @@ -466,10 +477,40 @@ void ResolveCallerAttributes (ResolveContext rc) caller_type.GetSignatureForError (), parameter_type.GetSignatureForError ()); } + if (!IsValidCallerContext (rc.CurrentMemberDefinition)) { + rc.Report.Warning (4025, 1, attr.Location, + "The CallerFilePath applied to parameter `{0}' will have no effect because it applies to a member that is used in context that do not allow optional arguments", + name); + } + modFlags |= Modifier.CallerFilePath; + callerFilePath = attr; continue; } } + + if ((modFlags & Modifier.CallerLineNumber) != 0) { + if (callerMemberName != null) { + rc.Report.Warning (7081, 1, callerMemberName.Location, + "The CallerMemberNameAttribute applied to parameter `{0}' will have no effect. It is overridden by the CallerLineNumberAttribute", + Name); + } + + if (callerFilePath != null) { + rc.Report.Warning (7082, 1, callerFilePath.Location, + "The CallerFilePathAttribute applied to parameter `{0}' will have no effect. It is overridden by the CallerLineNumberAttribute", + name); + } + } + + if ((modFlags & Modifier.CallerMemberName) != 0) { + if (callerFilePath != null) { + rc.Report.Warning (7080, 1, callerFilePath.Location, + "The CallerMemberNameAttribute applied to parameter `{0}' will have no effect. It is overridden by the CallerFilePathAttribute", + name); + } + + } } public void ResolveDefaultValue (ResolveContext rc) @@ -739,6 +780,11 @@ public static TypeExpr ResolveParameterExpressionType (IMemberContext ec, Locati return new TypeExpression (p_type, location); } + public void SetIndex (int index) + { + idx = index; + } + public void Warning_UselessOptionalParameter (Report Report) { Report.Warning (1066, 1, Location, @@ -1101,6 +1147,23 @@ public static ParametersCompiled CreateFullyResolved (Parameter[] parameters, Ty return new ParametersCompiled (parameters, types); } + public static ParametersCompiled Prefix (ParametersCompiled parameters, Parameter p, TypeSpec type) + { + var ptypes = new TypeSpec [parameters.Count + 1]; + ptypes [0] = type; + Array.Copy (parameters.Types, 0, ptypes, 1, parameters.Count); + + var param = new Parameter [ptypes.Length]; + param [0] = p; + for (int i = 0; i < parameters.Count; ++i) { + var pi = parameters [i]; + param [i + 1] = pi; + pi.SetIndex (i + 1); + } + + return ParametersCompiled.CreateFullyResolved (param, ptypes); + } + // // TODO: This does not fit here, it should go to different version of AParametersCollection // as the underlying type is not Parameter and some methods will fail to cast diff --git a/mcs/mcs/property.cs b/mcs/mcs/property.cs index d9726410685..c80d28d7ce9 100644 --- a/mcs/mcs/property.cs +++ b/mcs/mcs/property.cs @@ -748,12 +748,14 @@ public sealed class BackingField : Field { readonly Property property; - public BackingField (Property p) + public BackingField (Property p, bool readOnly) : base (p.Parent, p.type_expr, Modifiers.BACKING_FIELD | Modifiers.COMPILER_GENERATED | Modifiers.PRIVATE | (p.ModFlags & (Modifiers.STATIC | Modifiers.UNSAFE)), new MemberName ("<" + p.GetFullName (p.MemberName) + ">k__BackingField", p.Location), null) { this.property = p; + if (readOnly) + ModFlags |= Modifiers.READONLY; } public Property OriginalProperty { @@ -782,6 +784,8 @@ public Property (TypeDefinition parent, FullNamedExpression type, Modifiers mod, { } + public Expression Initializer { get; set; } + public override void Accept (StructuralVisitor visitor) { visitor.Visit (this); @@ -807,10 +811,16 @@ public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] void CreateAutomaticProperty () { // Create backing field - backing_field = new BackingField (this); + backing_field = new BackingField (this, Initializer != null && Set == null); if (!backing_field.Define ()) return; + if (Initializer != null) { + backing_field.Initializer = Initializer; + Parent.RegisterFieldForInitialization (backing_field, new FieldInitializer (backing_field, Initializer, Location)); + backing_field.ModFlags |= Modifiers.READONLY; + } + Parent.PartialContainer.Members.Add (backing_field); FieldExpr fe = new FieldExpr (backing_field, Location); @@ -825,11 +835,15 @@ void CreateAutomaticProperty () Get.Block = new ToplevelBlock (Compiler, ParametersCompiled.EmptyReadOnlyParameters, Location.Null); Return r = new Return (fe, Get.Location); Get.Block.AddStatement (r); + Get.ModFlags |= Modifiers.COMPILER_GENERATED; // Create set block - Set.Block = new ToplevelBlock (Compiler, Set.ParameterInfo, Location.Null); - Assign a = new SimpleAssign (fe, new SimpleName ("value", Location.Null), Location.Null); - Set.Block.AddStatement (new StatementExpression (a, Set.Location)); + if (Set != null) { + Set.Block = new ToplevelBlock (Compiler, Set.ParameterInfo, Location.Null); + Assign a = new SimpleAssign (fe, new SimpleName ("value", Location.Null), Location.Null); + Set.Block.AddStatement (new StatementExpression (a, Set.Location)); + Set.ModFlags |= Modifiers.COMPILER_GENERATED; + } } public override bool Define () @@ -839,13 +853,37 @@ public override bool Define () flags |= MethodAttributes.HideBySig | MethodAttributes.SpecialName; - if (!IsInterface && (ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) == 0 && - AccessorSecond != null && Get.Block == null && Set.Block == null) { - if (Compiler.Settings.Version <= LanguageVersion.ISO_2) - Report.FeatureIsNotAvailable (Compiler, Location, "automatically implemented properties"); + bool auto = AccessorFirst.Block == null && (AccessorSecond == null || AccessorSecond.Block == null) && + (ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) == 0; + + if (Initializer != null) { + if (!auto) + Report.Error (8050, Location, "`{0}': Only auto-implemented properties can have initializers", + GetSignatureForError ()); + + if (IsInterface) + Report.Error (8053, Location, "`{0}': Properties inside interfaces cannot have initializers", + GetSignatureForError ()); + + if (Compiler.Settings.Version < LanguageVersion.V_6) + Report.FeatureIsNotAvailable (Compiler, Location, "auto-implemented property initializer"); + } + + if (auto) { + if (Get == null) { + Report.Error (8052, Location, "Auto-implemented property `{0}' must have get accessor", + GetSignatureForError ()); + return false; + } + + if (Initializer == null && AccessorSecond == null) { + Report.Error (8051, Location, "Auto-implemented property `{0}' must have set accessor or initializer", + GetSignatureForError ()); + } + + if (Compiler.Settings.Version < LanguageVersion.V_3 && Initializer == null) + Report.FeatureIsNotAvailable (Compiler, Location, "auto-implemented properties"); - Get.ModFlags |= Modifiers.COMPILER_GENERATED; - Set.ModFlags |= Modifiers.COMPILER_GENERATED; CreateAutomaticProperty (); } diff --git a/mcs/mcs/ps-lang.cs b/mcs/mcs/ps-lang.cs index a0c6c95105b..4bf97047e67 100644 --- a/mcs/mcs/ps-lang.cs +++ b/mcs/mcs/ps-lang.cs @@ -743,7 +743,7 @@ public override long GetValueAsLong () throw new NotSupportedException (); } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { throw new NotSupportedException (); } @@ -825,7 +825,7 @@ public override long GetValueAsLong () throw new NotSupportedException (); } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { throw new NotSupportedException (); } diff --git a/mcs/mcs/report.cs b/mcs/mcs/report.cs index 009007b0d52..5ae47d8a0d0 100644 --- a/mcs/mcs/report.cs +++ b/mcs/mcs/report.cs @@ -56,7 +56,9 @@ public class Report 3000, 3001, 3002, 3003, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3021, 3022, 3023, 3024, 3026, 3027, - 4014 + 4014, 4024, 4025, 4026, + 7035, 7080, 7081, 7082, 7095, + 8009, }; static HashSet AllWarningsHashSet; diff --git a/mcs/mcs/options-assert-test.rsp b/mcs/mcs/rsp/options-assert-test.rsp similarity index 100% rename from mcs/mcs/options-assert-test.rsp rename to mcs/mcs/rsp/options-assert-test.rsp diff --git a/mcs/mcs/options-away3d-core-monomac.rsp b/mcs/mcs/rsp/options-away3d-core-monomac.rsp similarity index 100% rename from mcs/mcs/options-away3d-core-monomac.rsp rename to mcs/mcs/rsp/options-away3d-core-monomac.rsp diff --git a/mcs/mcs/rsp/options-mcs.rsp b/mcs/mcs/rsp/options-mcs.rsp new file mode 100644 index 00000000000..da5341847e2 --- /dev/null +++ b/mcs/mcs/rsp/options-mcs.rsp @@ -0,0 +1,84 @@ +-noconfig +-nostdlib +-unsafe+ +-d:"TRACE;DEBUG;NET_4_0;STATIC;NO_SYMBOL_WRITER;NO_AUTHENTICODE" +-target:exe +-out:delete_me.exe +-r:../../../class/lib/build/mscorlib.dll +-r:../../../class/lib/build/System.dll +-r:../../../class/lib/build/System.Core.dll +-r:../../../class/lib/build/System.Xml.dll +-r:../../../class/lib/build/Mono.Security.dll +../../AssemblyInfo.cs +../../anonymous.cs +../../argument.cs +../../ps-lang.cs +../../ps-tokenizer.cs +../../ps-codegen.cs +../../ps-parser.cs +../../cs-parser.cs +../../assign.cs +../../assembly.cs +../../async.cs +../../attribute.cs +../../cs-tokenizer.cs +../../cfold.cs +../../class.cs +../../codegen.cs +../../complete.cs +../../const.cs +../../constant.cs +../../convert.cs +../../context.cs +../../decl.cs +../../delegate.cs +../../doc.cs +../../driver.cs +../../dynamic.cs +../../ecore.cs +../../enum.cs +../../eval.cs +../../expression.cs +../../field.cs +../../flowanalysis.cs +../../generic.cs +../../import.cs +../../inliner.cs +../../intrinsics.cs +../../iterators.cs +../../ikvm.cs +../../lambda.cs +../../linq.cs +../../literal.cs +../../location.cs +../../membercache.cs +../../method.cs +../../modifiers.cs +../../namespace.cs +../../nullable.cs +../../parameter.cs +../../pending.cs +../../property.cs +../../reflection.cs +../../report.cs +../../settings.cs +../../module.cs +../../statement.cs +../../support.cs +../../typemanager.cs +../../typespec.cs +../../visit.cs +../../../class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs +../../../class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs +../../../class/Mono.CompilerServices.SymbolWriter/SourceMethodBuilder.cs +../../../class/Mono.Security/Mono.Security.Cryptography/CryptoConvert.cs +../../../build/common/Consts.cs +../../../tools/monop/outline.cs + +../../../../external/ikvm/reflect/*.cs +../../../../external/ikvm/reflect/Emit/*.cs +../../../../external/ikvm/reflect/Metadata/*.cs +../../../../external/ikvm/reflect/Reader/*.cs +../../../../external/ikvm/reflect/Writer/*.cs +../../../../external/ikvm/reflect/Impl/ITypeOwner.cs +../../../../external/ikvm/reflect/Impl/SymbolSupport.cs diff --git a/mcs/mcs/options-pscorlib.rsp b/mcs/mcs/rsp/options-pscorlib.rsp similarity index 100% rename from mcs/mcs/options-pscorlib.rsp rename to mcs/mcs/rsp/options-pscorlib.rsp diff --git a/mcs/mcs/options-test.rsp b/mcs/mcs/rsp/options-test.rsp similarity index 99% rename from mcs/mcs/options-test.rsp rename to mcs/mcs/rsp/options-test.rsp index 2560695b604..5162dce8d80 100644 --- a/mcs/mcs/options-test.rsp +++ b/mcs/mcs/rsp/options-test.rsp @@ -24,4 +24,3 @@ -r:../../../class/lib/net_4_5/System.Net.Http.dll ../../../playc_tests/as/test-debug-as-I64.as - diff --git a/mcs/mcs/options.rsp b/mcs/mcs/rsp/options.rsp similarity index 100% rename from mcs/mcs/options.rsp rename to mcs/mcs/rsp/options.rsp diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs index d869aa61e0e..b2c4ee78133 100644 --- a/mcs/mcs/statement.cs +++ b/mcs/mcs/statement.cs @@ -285,6 +285,10 @@ protected override bool DoFlowAnalysis (FlowAnalysisContext fc) var res = TrueStatement.FlowAnalysis (fc); if (FalseStatement == null) { + var c = expr as Constant; + if (c != null && !c.IsDefaultValue) + return true_returns; + if (true_returns) fc.DefiniteAssignment = da_false; else @@ -1306,15 +1310,16 @@ protected override bool DoResolve (BlockContext ec) var async_type = storey.ReturnType; if (async_type == null && async_block.ReturnTypeInference != null) { - async_block.ReturnTypeInference.AddCommonTypeBoundAsync (expr.Type); + if (expr.Type.Kind == MemberKind.Void && !(this is ContextualReturn)) + ec.Report.Error (4029, loc, "Cannot return an expression of type `void'"); + else + async_block.ReturnTypeInference.AddCommonTypeBoundAsync (expr.Type); return true; } if (async_type.Kind == MemberKind.Void) { - ec.Report.Error (127, loc, - "`{0}': A return keyword must not be followed by any expression when method returns void", - ec.GetSignatureForError ()); - + ec.Report.Error (8030, loc, + "Anonymous function or lambda expression converted to a void returning delegate cannot return a value"); return false; } @@ -1322,18 +1327,14 @@ protected override bool DoResolve (BlockContext ec) if (this is ContextualReturn) return true; - // Same error code as .NET but better error message if (async_block.DelegateType != null) { - ec.Report.Error (1997, loc, - "`{0}': A return keyword must not be followed by an expression when async delegate returns `Task'. Consider using `Task' return type", - async_block.DelegateType.GetSignatureForError ()); + ec.Report.Error (8031, loc, + "Async lambda expression or anonymous method converted to a `Task' cannot return a value. Consider returning `Task'"); } else { ec.Report.Error (1997, loc, "`{0}': A return keyword must not be followed by an expression when async method returns `Task'. Consider using `Task' return type", ec.GetSignatureForError ()); - } - return false; } @@ -1349,12 +1350,9 @@ protected override bool DoResolve (BlockContext ec) } } } else { - // Same error code as .NET but better error message if (block_return_type.Kind == MemberKind.Void) { - ec.Report.Error (127, loc, - "`{0}': A return keyword must not be followed by any expression when delegate returns void", - am.GetSignatureForError ()); - + ec.Report.Error (8030, loc, + "Anonymous function or lambda expression converted to a void returning delegate cannot return a value"); return false; } @@ -1398,23 +1396,42 @@ protected override bool DoResolve (BlockContext ec) protected override void DoEmit (EmitContext ec) { if (expr != null) { - expr.Emit (ec); var async_body = ec.CurrentAnonymousMethod as AsyncInitializer; if (async_body != null) { - var async_return = ((AsyncTaskStorey) async_body.Storey).HoistedReturn; + var storey = (AsyncTaskStorey)async_body.Storey; + Label exit_label = async_body.BodyEnd; + // // It's null for await without async - if (async_return != null) { - async_return.EmitAssign (ec); + // + if (storey.HoistedReturnValue != null) { + // + // Special case hoisted return value (happens in try/finally scenario) + // + if (ec.TryFinallyUnwind != null) { + if (storey.HoistedReturnValue is VariableReference) { + storey.HoistedReturnValue = ec.GetTemporaryField (storey.HoistedReturnValue.Type); + } + + exit_label = TryFinally.EmitRedirectedReturn (ec, async_body); + } + var async_return = (IAssignMethod)storey.HoistedReturnValue; + async_return.EmitAssign (ec, expr, false, false); ec.EmitEpilogue (); + } else { + expr.Emit (ec); + + if (ec.TryFinallyUnwind != null) + exit_label = TryFinally.EmitRedirectedReturn (ec, async_body); } - ec.Emit (OpCodes.Leave, async_body.BodyEnd); + ec.Emit (OpCodes.Leave, exit_label); return; } + expr.Emit (ec); ec.EmitEpilogue (); if (unwind_protect || ec.EmitAccurateDebugInfo) @@ -1546,8 +1563,6 @@ public override Reachability MarkReachable (Reachability rc) } else { label.AddGotoReference (rc, true); } - - try_finally = null; } else { label.AddGotoReference (rc, false); } @@ -1566,8 +1581,27 @@ protected override void DoEmit (EmitContext ec) throw new InternalErrorException ("goto emitted before target resolved"); Label l = label.LabelTarget (ec); + + if (ec.TryFinallyUnwind != null && IsLeavingFinally (label.Block)) { + var async_body = (AsyncInitializer) ec.CurrentAnonymousMethod; + l = TryFinally.EmitRedirectedJump (ec, async_body, l, label.Block); + } + ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, l); } + + bool IsLeavingFinally (Block labelBlock) + { + var b = try_finally.Statement as Block; + while (b != null) { + if (b == labelBlock) + return true; + + b = b.Parent; + } + + return false; + } public override object Accept (StructuralVisitor visitor) { @@ -1930,9 +1964,20 @@ public override bool Resolve (BlockContext ec) protected override void DoEmit (EmitContext ec) { - if (expr == null) - ec.Emit (OpCodes.Rethrow); - else { + if (expr == null) { + var atv = ec.AsyncThrowVariable; + if (atv != null) { + if (atv.HoistedVariant != null) { + atv.HoistedVariant.Emit (ec); + } else { + atv.Emit (ec); + } + + ec.Emit (OpCodes.Throw); + } else { + ec.Emit (OpCodes.Rethrow); + } + } else { expr.Emit (ec); ec.Emit (OpCodes.Throw); @@ -1992,7 +2037,14 @@ public override object Accept (StructuralVisitor visitor) protected override void DoEmit (EmitContext ec) { - ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, ec.LoopEnd); + var l = ec.LoopEnd; + + if (ec.TryFinallyUnwind != null) { + var async_body = (AsyncInitializer) ec.CurrentAnonymousMethod; + l = TryFinally.EmitRedirectedJump (ec, async_body, l, enclosing_loop.Statement as Block); + } + + ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, l); } protected override bool DoFlowAnalysis (FlowAnalysisContext fc) @@ -2033,7 +2085,14 @@ public override object Accept (StructuralVisitor visitor) protected override void DoEmit (EmitContext ec) { - ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, ec.LoopBegin); + var l = ec.LoopBegin; + + if (ec.TryFinallyUnwind != null) { + var async_body = (AsyncInitializer) ec.CurrentAnonymousMethod; + l = TryFinally.EmitRedirectedJump (ec, async_body, l, enclosing_loop.Statement as Block); + } + + ec.Emit (unwind_protect ? OpCodes.Leave : OpCodes.Br, l); } protected override bool DoResolve (BlockContext bc) @@ -2393,13 +2452,13 @@ protected override void DoEmit (EmitContext ec) { li.CreateBuilder (ec); - if (Initializer != null) + if (Initializer != null && !IsUnreachable) ((ExpressionStatement) Initializer).EmitStatement (ec); if (declarators != null) { foreach (var d in declarators) { d.Variable.CreateBuilder (ec); - if (d.Initializer != null) { + if (d.Initializer != null && !IsUnreachable) { ec.Mark (d.Variable.Location); ((ExpressionStatement) d.Initializer).EmitStatement (ec); } @@ -2777,11 +2836,20 @@ public void EmitAssign (EmitContext ec) if ((flags & Flags.CreateBuilderMask) != 0) CreateBuilder (ec); + // FIX: Hack for PlayScript .play exception filters due to upstream merge 2ab02d + // not creating builder in the correct spot so hack it for now + if (builder == null) + CreateBuilder (ec); + ec.Emit (OpCodes.Stloc, builder); } public void EmitAddressOf (EmitContext ec) { + // TODO: Need something better for temporary variables + if ((flags & Flags.CompilerGenerated) != 0) + CreateBuilder (ec); + ec.Emit (OpCodes.Ldloca, builder); } @@ -2883,7 +2951,8 @@ public enum Flags FinallyBlock = 1 << 14, CatchBlock = 1 << 15, Iterator = 1 << 20, - NoFlowAnalysis = 1 << 21 + NoFlowAnalysis = 1 << 21, + InitializationEmitted = 1 << 22 } public Block Parent; @@ -3157,16 +3226,6 @@ public override bool Resolve (BlockContext bc) ErrorIllegalDynamic (bc, s.loc); Statement.DynamicOps = 0; - -// FIXME : merge refactor issue -// if (unreachable && !(s is LabeledStatement) && !(s is SwitchLabel) && !(s is Block)) -// statements [ix] = new EmptyStatement (s.loc); -// -// unreachable = bc.CurrentBranching.CurrentUsageVector.IsUnreachable; -// if (unreachable) { -// bc.IsUnreachable = true; -// } else if (bc.IsUnreachable) -// bc.IsUnreachable = false; } } @@ -3234,7 +3293,7 @@ bool DoFlowAnalysis (FlowAnalysisContext fc, int startIndex) end_unreachable = s.FlowAnalysis (fc); if (s.IsUnreachable) { - statements[startIndex] = new EmptyStatement (s.loc); + statements [startIndex] = RewriteUnreachableStatement (s); continue; } @@ -3261,7 +3320,7 @@ bool DoFlowAnalysis (FlowAnalysisContext fc, int startIndex) if (s.IsUnreachable) { s.FlowAnalysis (fc); - statements[startIndex] = new EmptyStatement (s.loc); + statements [startIndex] = RewriteUnreachableStatement (s); } } } @@ -3276,6 +3335,24 @@ bool DoFlowAnalysis (FlowAnalysisContext fc, int startIndex) return !Explicit.HasReachableClosingBrace; } + static Statement RewriteUnreachableStatement (Statement s) + { + // LAMESPEC: It's not clear whether declararion statement should be part of reachability + // analysis. Even csc report unreachable warning for it but it's actually used hence + // we try to emulate this behaviour + // + // Consider: + // goto L; + // int v; + // L: + // v = 1; + + if (s is BlockVariable) + return s; + + return new EmptyStatement (s.loc); + } + public void ScanGotoJump (Statement label) { int i; @@ -3458,8 +3535,11 @@ public AnonymousMethodStorey CreateAnonymousMethodStorey (ResolveContext ec) return am_storey; } - public override void Emit (EmitContext ec) + public void EmitScopeInitialization (EmitContext ec) { + if ((flags & Flags.InitializationEmitted) != 0) + return; + if (am_storey != null) { DefineStoreyContainer (ec, am_storey); am_storey.EmitStoreyInstantiation (ec, this); @@ -3468,6 +3548,13 @@ public override void Emit (EmitContext ec) if (scope_initializers != null) EmitScopeInitializers (ec); + flags |= Flags.InitializationEmitted; + } + + public override void Emit (EmitContext ec) + { + EmitScopeInitialization (ec); + if (ec.EmitAccurateDebugInfo && !IsCompilerGenerated && ec.Mark (StartLocation)) { ec.Emit (OpCodes.Nop); } @@ -3934,6 +4021,9 @@ public ToplevelBlock TopBlock { get { return top_block; } + set { + top_block = value; + } } public bool Resolved { @@ -4712,6 +4802,24 @@ public bool GetLocalName (string name, Block block, ref INamedBlockVariable vari return false; } + public void IncludeBlock (ParametersBlock pb, ToplevelBlock block) + { + if (block.names != null) { + foreach (var n in block.names) { + var variable = n.Value as INamedBlockVariable; + if (variable != null) { + if (variable.Block.ParametersBlock == pb) + AddLocalName (n.Key, variable, false); + continue; + } + + foreach (var v in (List) n.Value) + if (v.Block.ParametersBlock == pb) + AddLocalName (n.Key, v, false); + } + } + } + // // This is used by non-static `struct' constructors which do not have an // initializer - in this case, the constructor must initialize all of the @@ -5144,7 +5252,7 @@ public List RegisteredLabels { // expression might be the expression from the switch, or an // expression that includes any potential conversions to // - Expression SwitchGoverningType (ResolveContext ec, Expression expr) + static Expression SwitchGoverningType (ResolveContext rc, Expression expr, bool unwrapExpr) { switch (expr.Type.BuiltinType) { case BuiltinTypeSpec.Type.Byte: @@ -5171,10 +5279,18 @@ Expression SwitchGoverningType (ResolveContext ec, Expression expr) // conversions, we have to report an error // Expression converted = null; - foreach (TypeSpec tt in ec.BuiltinTypes.SwitchUserTypes) { - Expression e; - - e = Convert.ImplicitUserConversion (ec, expr, tt, loc); + foreach (TypeSpec tt in rc.Module.PredefinedTypes.SwitchUserTypes) { + + if (!unwrapExpr && tt.IsNullableType && expr.Type.IsNullableType) + break; + + var restr = Convert.UserConversionRestriction.ImplicitOnly | + Convert.UserConversionRestriction.ProbingOnly; + + if (unwrapExpr) + restr |= Convert.UserConversionRestriction.NullableSourceOnly; + + var e = Convert.UserDefinedConversion (rc, expr, tt, restr, Location.Null); if (e == null) continue; @@ -5182,11 +5298,12 @@ Expression SwitchGoverningType (ResolveContext ec, Expression expr) // Ignore over-worked ImplicitUserConversions that do // an implicit conversion in addition to the user conversion. // - if (!(e is UserCast)) + var uc = e as UserCast; + if (uc == null) continue; if (converted != null){ - ec.Report.ExtraInformation (loc, "(Ambiguous implicit user defined conversion in previous "); +// rc.Report.ExtraInformation (loc, "(Ambiguous implicit user defined conversion in previous "); return null; } @@ -5195,10 +5312,12 @@ Expression SwitchGoverningType (ResolveContext ec, Expression expr) return converted; } - public static TypeSpec[] CreateSwitchUserTypes (BuiltinTypes types) + public static TypeSpec[] CreateSwitchUserTypes (ModuleContainer module, TypeSpec nullable) { + var types = module.Compiler.BuiltinTypes; + // LAMESPEC: For some reason it does not contain bool which looks like csc bug - return new[] { + TypeSpec[] stypes = new[] { types.SByte, types.Byte, types.Short, @@ -5210,6 +5329,17 @@ public static TypeSpec[] CreateSwitchUserTypes (BuiltinTypes types) types.Char, types.String }; + + if (nullable != null) { + + Array.Resize (ref stypes, stypes.Length + 9); + + for (int i = 0; i < 9; ++i) { + stypes [10 + i] = nullable.MakeGenericType (module, new [] { stypes [i] }); + } + } + + return stypes; } public void RegisterLabel (BlockContext rc, SwitchLabel sl) @@ -5449,14 +5579,23 @@ public override bool Resolve (BlockContext ec) if (Expr == null) return false; - new_expr = SwitchGoverningType (ec, Expr); + // + // LAMESPEC: User conversion from non-nullable governing type has a priority + // + new_expr = SwitchGoverningType (ec, Expr, false); - if (new_expr == null && Expr.Type.IsNullableType) { - unwrap = Nullable.Unwrap.Create (Expr, false); - if (unwrap == null) - return false; + if (new_expr == null) { + if (Expr.Type.IsNullableType) { + unwrap = Nullable.Unwrap.Create (Expr, false); + if (unwrap == null) + return false; - new_expr = SwitchGoverningType (ec, unwrap); + // + // Unwrap + user conversion using non-nullable type is not allowed but user operator + // involving nullable Expr and nullable governing type is + // + new_expr = SwitchGoverningType (ec, unwrap, true); + } } if (new_expr == null && ec.FileType == SourceFileType.PlayScript) { @@ -5498,8 +5637,11 @@ public override bool Resolve (BlockContext ec) return false; } - // Validate switch. SwitchType = new_expr.Type; + if (SwitchType.IsNullableType) { + new_expr = unwrap = Nullable.Unwrap.Create (new_expr, true); + SwitchType = Nullable.NullableInfo.GetUnderlyingType (SwitchType); + } if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.Bool && ec.Module.Compiler.Settings.Version == LanguageVersion.ISO_1) { ec.Report.FeatureIsNotAvailable (ec.Module.Compiler, loc, "switch expression of boolean type"); @@ -5915,6 +6057,8 @@ protected override void DoEmit (EmitContext ec) // ec.Mark (block.StartLocation); block.IsCompilerGenerated = true; + } else { + new_expr.EmitSideEffect (ec); } block.Emit (ec); @@ -6037,10 +6181,10 @@ protected sealed override void DoEmit (EmitContext ec) EmitTryBodyPrepare (ec); EmitTryBody (ec); - ec.BeginFinallyBlock (); + bool beginFinally = EmitBeginFinallyBlock (ec); Label start_finally = ec.DefineLabel (); - if (resume_points != null) { + if (resume_points != null && beginFinally) { var state_machine = (StateMachineInitializer) ec.CurrentAnonymousMethod; ec.Emit (OpCodes.Ldloc, state_machine.SkipFinally); @@ -6065,7 +6209,8 @@ protected sealed override void DoEmit (EmitContext ec) EmitFinallyBody (ec); } - ec.EndExceptionBlock (); + if (beginFinally) + ec.EndExceptionBlock (); } public override void EmitForDispose (EmitContext ec, LocalBuilder pc, Label end, bool have_dispatcher) @@ -6139,6 +6284,12 @@ protected override bool DoFlowAnalysis (FlowAnalysisContext fc) return res; } + protected virtual bool EmitBeginFinallyBlock (EmitContext ec) + { + ec.BeginFinallyBlock (); + return true; + } + public override Reachability MarkReachable (Reachability rc) { base.MarkReachable (rc); @@ -6260,6 +6411,12 @@ public Expression Expr { } } + protected override bool DoFlowAnalysis (FlowAnalysisContext fc) + { + expr.FlowAnalysis (fc); + return base.DoFlowAnalysis (fc); + } + public override bool Resolve (BlockContext ec) { expr = expr.Resolve (ec); @@ -6918,6 +7075,9 @@ protected override void DoEmit (EmitContext ec) ctch.hoisted_temp.Emit (ec); else ctch.li.Emit (ec); + + if (!ctch.IsGeneral && ctch.type.Kind == MemberKind.TypeParameter) + ec.Emit (OpCodes.Box, ctch.type); } var expr_start = ec.DefineLabel (); @@ -6945,9 +7105,16 @@ protected override bool DoFlowAnalysis (FlowAnalysisContext fc) public override bool Resolve (BlockContext bc) { ctch.Filter = ctch.Filter.Resolve (bc); - var c = ctch.Filter as Constant; - if (c != null && !c.IsDefaultValue) { - bc.Report.Warning (7095, 1, ctch.Filter.Location, "Exception filter expression is a constant"); + + if (ctch.Filter != null) { + if (ctch.Filter.ContainsEmitWithAwait ()) { + bc.Report.Error (7094, ctch.Filter.Location, "The `await' operator cannot be used in the filter expression of a catch clause"); + } + + var c = ctch.Filter as Constant; + if (c != null && !c.IsDefaultValue) { + bc.Report.Warning (7095, 1, ctch.Filter.Location, "Exception filter expression is a constant"); + } } return true; @@ -7022,23 +7189,32 @@ protected override void DoEmit (EmitContext ec) if (li != null) EmitCatchVariableStore (ec); - } else { - if (IsGeneral) - ec.BeginCatchBlock (ec.BuiltinTypes.Object); - else - ec.BeginCatchBlock (CatchType); - if (li != null) { - EmitCatchVariableStore (ec); + if (Block.HasAwait) { + Block.EmitScopeInitialization (ec); } else { - ec.Emit (OpCodes.Pop); + Block.Emit (ec); } + + return; + } + + if (IsGeneral) + ec.BeginCatchBlock (ec.BuiltinTypes.Object); + else + ec.BeginCatchBlock (CatchType); + + if (li != null) { + EmitCatchVariableStore (ec); + } else { + ec.Emit (OpCodes.Pop); } if (psErrorLi != null) psErrorLi.CreateBuilder (ec); - - Block.Emit (ec); + + if (!Block.HasAwait) + Block.Emit (ec); } void EmitCatchVariableStore (EmitContext ec) @@ -7054,43 +7230,52 @@ void EmitCatchVariableStore (EmitContext ec) hoisted_temp = new LocalTemporary (li.Type); hoisted_temp.Store (ec); - // switch to assigning from the temporary variable and not from top of the stack + // switch to assignment from temporary variable and not from top of the stack assign.UpdateSource (hoisted_temp); } } - public override bool Resolve (BlockContext ec) + public override bool Resolve (BlockContext bc) { - var isPlayScript = ec.FileType == SourceFileType.PlayScript; + var isPlayScript = bc.FileType == SourceFileType.PlayScript; - using (ec.Set (ResolveContext.Options.CatchScope)) { - if (type_expr != null) { - type = type_expr.ResolveAsType (ec); + using (bc.Set (ResolveContext.Options.CatchScope)) { + if (type_expr == null) { + if (CreateExceptionVariable (bc.Module.Compiler.BuiltinTypes.Object)) { + Expression source = new EmptyExpression (li.Type); + assign = new CompilerAssign (new LocalVariableReference (li, Location.Null), source, Location.Null); + Block.AddScopeStatement (new StatementExpression (assign, Location.Null)); + } + } else { + type = type_expr.ResolveAsType (bc); if (type == null) return false; - if (type.BuiltinType != BuiltinTypeSpec.Type.Exception && !TypeSpec.IsBaseClass (type, ec.BuiltinTypes.Exception, false)) { - ec.Report.Error (155, loc, "The type caught or thrown must be derived from System.Exception"); + if (li == null) + CreateExceptionVariable (type); + + if (type.BuiltinType != BuiltinTypeSpec.Type.Exception && !TypeSpec.IsBaseClass (type, bc.BuiltinTypes.Exception, false)) { + bc.Report.Error (155, loc, "The type caught or thrown must be derived from System.Exception"); } else if (li != null) { // For PlayScript catch (e:Error) { convert to catch (Exception __e), then convert to Error in catch block.. - if (isPlayScript && type == ec.Module.PredefinedTypes.AsError.Resolve ()) { + if (isPlayScript && type == bc.Module.PredefinedTypes.AsError.Resolve ()) { // Save old error var so we can use it below psErrorLi = li; psErrorLi.Type = type; - psErrorLi.PrepareAssignmentAnalysis (ec); + psErrorLi.PrepareAssignmentAnalysis (bc); // Switch to "Exception" - type = ec.BuiltinTypes.Exception; + type = bc.BuiltinTypes.Exception; li = new LocalVariable (block, "__" + this.Variable.Name , Location.Null); - li.TypeExpr = new TypeExpression(ec.BuiltinTypes.Exception, Location.Null); - li.Type = ec.BuiltinTypes.Exception; + li.TypeExpr = new TypeExpression(bc.BuiltinTypes.Exception, Location.Null); + li.Type = bc.BuiltinTypes.Exception; block.AddLocalName (li); } li.Type = type; - li.PrepareAssignmentAnalysis (ec); + li.PrepareAssignmentAnalysis (bc); // source variable is at the top of the stack Expression source = new EmptyExpression (li.Type); @@ -7108,10 +7293,10 @@ public override bool Resolve (BlockContext ec) // PlayScript - Generate the code "err = __err as Error ?? new DotNetError(_err)" var newArgs = new Arguments (1); newArgs.Add (new Argument (new LocalVariableReference (li, Location.Null))); - var asExpr = new As (new LocalVariableReference (li, Location.Null), new TypeExpression (ec.Module.PredefinedTypes.AsError.Resolve (), Location.Null), Location.Null); - var newExpr = new New (new TypeExpression (ec.Module.PredefinedTypes.AsDotNetError.Resolve (), Location.Null), newArgs, Location.Null); + var asExpr = new As (new LocalVariableReference (li, Location.Null), new TypeExpression (bc.Module.PredefinedTypes.AsError.Resolve (), Location.Null), Location.Null); + var newExpr = new New (new TypeExpression (bc.Module.PredefinedTypes.AsDotNetError.Resolve (), Location.Null), newArgs, Location.Null); - var errAssign = new CompilerAssign (psErrorLi.CreateReferenceExpression (ec, Location.Null), + var errAssign = new CompilerAssign (psErrorLi.CreateReferenceExpression (bc, Location.Null), new Nullable.NullCoalescingOperator (asExpr, newExpr), Location.Null); block.AddScopeStatement (new StatementExpression(errAssign, Location.Null)); } @@ -7123,13 +7308,26 @@ public override bool Resolve (BlockContext ec) } Block.SetCatchBlock (); - return Block.Resolve (ec); + return Block.Resolve (bc); } } + bool CreateExceptionVariable (TypeSpec type) + { + if (!Block.HasAwait) + return false; + + // TODO: Scan the block for rethrow expression + //if (!Block.HasRethrow) + // return; + + li = LocalVariable.CreateCompilerGenerated (type, block, Location.Null); + return true; + } + protected override bool DoFlowAnalysis (FlowAnalysisContext fc) { - if (li != null) { + if (li != null && !li.IsCompilerGenerated) { fc.SetVariableAssigned (li.VariableInfo, true); } @@ -7165,6 +7363,8 @@ public class TryFinally : TryFinallyBlock { ExplicitBlock fini; List try_exit_dat; + List