[Pkg-mono-svn-commits] [SCM] mono branch, master, updated. debian/2.4+dfsg-6-26-g8b65c7c
Mirco Bauer
meebey at meebey.net
Wed Aug 5 23:03:40 UTC 2009
The following commit has been merged in the master branch:
commit b9af3bcea75b9518b9147583ca7760d673e95e0f
Author: Mirco Bauer <meebey at meebey.net>
Date: Wed Jul 29 20:29:33 2009 +0200
Imported Upstream version 2.4.2.3+dfsg
diff --git a/ChangeLog b/ChangeLog
index bd31dc5..eabfc63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,35 @@
+2009-06-18 Marek Habersack <mhabersack at novell.com>
+
+ * data/browscap.ini: applied Mono modifications to the upstream
+ version. Fixes three tests failing in System.Web. Fixes bug #513965
+ Added ecmascriptversion, msdomversion and w3cdomversion to the IE
+ 8.0 entry. Fixes bug #513965
+
+2009-06-15 Andreia Gaita <avidigal at novell.com>
+
+ * data/config.in: add libcups dllmap entry
+ [Fixes #511414, backported from r136039]
+
+2009-05-27 Zoltan Varga <vargaz at gmail.com>
+
+ * configure.in: Disable USE_MUNMAP on ppc to work around #504411.
+
+2009-04-28 Zoltan Varga <vargaz at gmail.com>
+
+ * configure.in: Define a TARGET_<ARCH> preprocessor symbol for some
+ architectures.
+
+2009-01-25 Zoltan Varga <vargaz at gmail.com>
+
+ * acinclude.m4 (dolt_supported): Handle ARM as well.
+
+2009-04-28 Zoltan Varga <vargaz at gmail.com>
+
+ * configure.in: Add an option to disable the solaris tar check.
+
+ * configure.in: Define a TARGET_<ARCH> preprocessor symbol for some
+ architectures.
+
2009-02-26 Marek Habersack <mhabersack at novell.com>
* data/mono.web.pc.in: added. Fixes bug #479760
diff --git a/Makefile.in b/Makefile.in
index 8903715..b65e459 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -84,8 +84,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/acinclude.m4 b/acinclude.m4
index 6488ce6..093a175 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -23,7 +23,7 @@ if test x$GCC != xyes; then
fi
case $host in
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \
-|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*)
+|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*)
pic_options='-fPIC'
;;
i?86-apple-darwin*)
diff --git a/aclocal.m4 b/aclocal.m4
index 7ea2d38..083dcc6 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -6655,162 +6655,6 @@ AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-#
-# Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=m4_default([$1], [0.9.0])
- AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- PKG_CONFIG=""
- fi
-
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists. Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
- AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
- m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
- $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
- pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
- PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
- [pkg_failed=yes])
- else
- pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
- _PKG_SHORT_ERRORS_SUPPORTED
- if test $_pkg_short_errors_supported = yes; then
- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
- else
- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
- ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
- [AC_MSG_RESULT([no])
- $4])
-elif test $pkg_failed = untried; then
- ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
- [$4])
-else
- $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
- $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
- AC_MSG_RESULT([yes])
- ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
-
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
diff --git a/config.h.in b/config.h.in
index 58249da..8ffa0ca 100644
--- a/config.h.in
+++ b/config.h.in
@@ -624,6 +624,15 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* ... */
+#undef TARGET_AMD64
+
+/* ... */
+#undef TARGET_ARM
+
+/* ... */
+#undef TARGET_X86
+
/* GC description */
#undef USED_GC_NAME
diff --git a/configure b/configure
index a960b15..230e6da 100755
--- a/configure
+++ b/configure
@@ -929,8 +929,6 @@ HAVE_MSGFMT
libgdiplus_loc
PKG_CONFIG
subdirs
-BASE_DEPENDENCIES_CFLAGS
-BASE_DEPENDENCIES_LIBS
EGLIB_BUILD_TRUE
EGLIB_BUILD_FALSE
GLIB_CFLAGS
@@ -1044,9 +1042,6 @@ CCC
CXXCPP
F77
FFLAGS
-PKG_CONFIG
-BASE_DEPENDENCIES_CFLAGS
-BASE_DEPENDENCIES_LIBS
XMKMF'
ac_subdirs_all='eglib
libgc'
@@ -1640,6 +1635,7 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-solaris-tar-check disable solaris tar check
--disable-nls do not use Native Language Support
--disable-mcs-build disable the build of the mcs directory
--enable-quiet-build Enable quiet runtime build
@@ -1694,11 +1690,6 @@ Some influential environment variables:
CXXCPP C++ preprocessor
F77 Fortran 77 compiler command
FFLAGS Fortran 77 compiler flags
- PKG_CONFIG path to pkg-config utility
- BASE_DEPENDENCIES_CFLAGS
- C compiler flags for BASE_DEPENDENCIES, overriding pkg-config
- BASE_DEPENDENCIES_LIBS
- linker flags for BASE_DEPENDENCIES, overriding pkg-config
XMKMF Path to xmkmf, Makefile generator for X Window System
Use these variables to override the choices made by `configure' or to help
@@ -2593,7 +2584,7 @@ fi
# Define the identity of the package.
PACKAGE=mono
- VERSION=2.4
+ VERSION=2.4.2.3
cat >>confdefs.h <<_ACEOF
@@ -2905,6 +2896,14 @@ need_link_unlink=no
echo $ECHO_N "checking host platform characteristics... $ECHO_C" >&6; }
libgc_threads=no
has_dtrace=no
+
+case "$host" in
+ powerpc*-*-linux*)
+ # https://bugzilla.novell.com/show_bug.cgi?id=504411
+ disable_munmap=yes
+ ;;
+esac
+
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
@@ -2991,7 +2990,10 @@ _ACEOF
;;
*-*-linux*)
platform_win32=no
- CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP"
+ CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
+ if test "x$disable_munmap" != "xyes"; then
+ CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
+ fi
libmono_cflags="-D_REENTRANT"
libmono_ldflags="-lpthread"
libdl="-ldl"
@@ -6501,7 +6503,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6504 "configure"' > conftest.$ac_ext
+ echo '#line 6506 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9438,11 +9440,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9441: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9443: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9445: \$? = $ac_status" >&5
+ echo "$as_me:9447: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9728,11 +9730,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9731: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9733: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:9735: \$? = $ac_status" >&5
+ echo "$as_me:9737: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -9832,11 +9834,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9835: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9837: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9839: \$? = $ac_status" >&5
+ echo "$as_me:9841: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12196,7 +12198,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12199 "configure"
+#line 12201 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12296,7 +12298,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12299 "configure"
+#line 12301 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14697,11 +14699,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14700: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14702: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14704: \$? = $ac_status" >&5
+ echo "$as_me:14706: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14801,11 +14803,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14804: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14806: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14808: \$? = $ac_status" >&5
+ echo "$as_me:14810: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16384,11 +16386,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16387: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16389: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16391: \$? = $ac_status" >&5
+ echo "$as_me:16393: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16488,11 +16490,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16491: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16493: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16495: \$? = $ac_status" >&5
+ echo "$as_me:16497: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -18695,11 +18697,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18698: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18700: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18702: \$? = $ac_status" >&5
+ echo "$as_me:18704: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18985,11 +18987,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18988: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18990: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18992: \$? = $ac_status" >&5
+ echo "$as_me:18994: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -19089,11 +19091,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19092: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19094: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:19096: \$? = $ac_status" >&5
+ echo "$as_me:19098: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -21822,7 +21824,7 @@ if test x$GCC != xyes; then
fi
case $host in
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \
-|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*)
+|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*)
pic_options='-fPIC'
;;
i?86-apple-darwin*)
@@ -24288,17 +24290,27 @@ fi
# A sanity check to catch cases where the package was unpacked
# with an ancient tar program (Solaris)
#
-{ echo "$as_me:$LINENO: checking integrity of package" >&5
+# Check whether --enable-solaris-tar-check was given.
+if test "${enable_solaris_tar_check+set}" = set; then
+ enableval=$enable_solaris_tar_check; do_solaris_tar_check=no
+else
+ do_solaris_tar_check=yes
+fi
+
+
+if test x"$do_solaris_tar_check" = xyes; then
+ { echo "$as_me:$LINENO: checking integrity of package" >&5
echo $ECHO_N "checking integrity of package... $ECHO_C" >&6; }
-if test -f $srcdir/$mcsdir/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
-then
- { echo "$as_me:$LINENO: result: ok" >&5
+ if test -f $srcdir/$mcsdir/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
+ then
+ { echo "$as_me:$LINENO: result: ok" >&5
echo "${ECHO_T}ok" >&6; }
-else
- errorm="Your mono distribution is incomplete; if unpacking from a tar file, make sure you use GNU tar; see http://www.mono-project.com/IncompletePackage for more details"
- { { echo "$as_me:$LINENO: error: $errorm" >&5
+ else
+ errorm="Your mono distribution is incomplete; if unpacking from a tar file, make sure you use GNU tar; see http://www.mono-project.com/IncompletePackage for more details"
+ { { echo "$as_me:$LINENO: error: $errorm" >&5
echo "$as_me: error: $errorm" >&2;}
{ (exit 1); exit 1; }; }
+ fi
fi
mcs_topdir='$(top_srcdir)/'$mcsdir
@@ -24797,238 +24809,16 @@ system)
## Versions of dependencies
GLIB_REQUIRED_VERSION=1.3.11
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
- ac_pt_PKG_CONFIG=$PKG_CONFIG
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $ac_pt_PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
- { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_pt_PKG_CONFIG" = x; then
- PKG_CONFIG=""
+ if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
+ GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
+ GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
+ GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
+ GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf at gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- PKG_CONFIG=$ac_pt_PKG_CONFIG
- fi
-else
- PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
- _pkg_min_version=0.9.0
- { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
-echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- PKG_CONFIG=""
- fi
-
-fi
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for BASE_DEPENDENCIES" >&5
-echo $ECHO_N "checking for BASE_DEPENDENCIES... $ECHO_C" >&6; }
-
-if test -n "$BASE_DEPENDENCIES_CFLAGS"; then
- pkg_cv_BASE_DEPENDENCIES_CFLAGS="$BASE_DEPENDENCIES_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED_VERSION\"") >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_BASE_DEPENDENCIES_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_REQUIRED_VERSION" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$BASE_DEPENDENCIES_LIBS"; then
- pkg_cv_BASE_DEPENDENCIES_LIBS="$BASE_DEPENDENCIES_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED_VERSION\"") >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_BASE_DEPENDENCIES_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_REQUIRED_VERSION" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION" 2>&1`
- else
- BASE_DEPENDENCIES_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= $GLIB_REQUIRED_VERSION" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$BASE_DEPENDENCIES_PKG_ERRORS" >&5
-
- { { echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= $GLIB_REQUIRED_VERSION) were not met:
-
-$BASE_DEPENDENCIES_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS
-and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-echo "$as_me: error: Package requirements (glib-2.0 >= $GLIB_REQUIRED_VERSION) were not met:
-
-$BASE_DEPENDENCIES_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS
-and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
- { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
- { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS
-and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables BASE_DEPENDENCIES_CFLAGS
-and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&2;}
+ { { echo "$as_me:$LINENO: error: You need at least glib-2.0 $GLIB_REQUIRED_VERSION" >&5
+echo "$as_me: error: You need at least glib-2.0 $GLIB_REQUIRED_VERSION" >&2;}
{ (exit 1); exit 1; }; }
-else
- BASE_DEPENDENCIES_CFLAGS=$pkg_cv_BASE_DEPENDENCIES_CFLAGS
- BASE_DEPENDENCIES_LIBS=$pkg_cv_BASE_DEPENDENCIES_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- :
-fi
-
- GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
- GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
- GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
- GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
+ fi
;;
*)
{ { echo "$as_me:$LINENO: error: Invalid argument to --with-glib." >&5
@@ -39947,6 +39737,31 @@ _ACEOF
;;
esac
+# FIXME: Define the others as well
+case "$TARGET" in
+X86)
+
+cat >>confdefs.h <<\_ACEOF
+#define TARGET_X86 1
+_ACEOF
+
+ ;;
+AMD64)
+
+cat >>confdefs.h <<\_ACEOF
+#define TARGET_AMD64 1
+_ACEOF
+
+ ;;
+ARM)
+
+cat >>confdefs.h <<\_ACEOF
+#define TARGET_ARM 1
+_ACEOF
+
+ ;;
+esac
+
if test "x$sizeof_register" = "x4"; then
cat >>confdefs.h <<\_ACEOF
@@ -42216,8 +42031,6 @@ HAVE_MSGFMT!$HAVE_MSGFMT$ac_delim
libgdiplus_loc!$libgdiplus_loc$ac_delim
PKG_CONFIG!$PKG_CONFIG$ac_delim
subdirs!$subdirs$ac_delim
-BASE_DEPENDENCIES_CFLAGS!$BASE_DEPENDENCIES_CFLAGS$ac_delim
-BASE_DEPENDENCIES_LIBS!$BASE_DEPENDENCIES_LIBS$ac_delim
EGLIB_BUILD_TRUE!$EGLIB_BUILD_TRUE$ac_delim
EGLIB_BUILD_FALSE!$EGLIB_BUILD_FALSE$ac_delim
GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim
@@ -42248,6 +42061,8 @@ ENABLE_NUNIT_TESTS_TRUE!$ENABLE_NUNIT_TESTS_TRUE$ac_delim
ENABLE_NUNIT_TESTS_FALSE!$ENABLE_NUNIT_TESTS_FALSE$ac_delim
DTRACE!$DTRACE$ac_delim
DTRACEFLAGS!$DTRACEFLAGS$ac_delim
+ENABLE_DTRACE_TRUE!$ENABLE_DTRACE_TRUE$ac_delim
+ENABLE_DTRACE_FALSE!$ENABLE_DTRACE_FALSE$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -42289,8 +42104,6 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
-ENABLE_DTRACE_TRUE!$ENABLE_DTRACE_TRUE$ac_delim
-ENABLE_DTRACE_FALSE!$ENABLE_DTRACE_FALSE$ac_delim
DTRACE_G_REQUIRED_TRUE!$DTRACE_G_REQUIRED_TRUE$ac_delim
DTRACE_G_REQUIRED_FALSE!$DTRACE_G_REQUIRED_FALSE$ac_delim
USE_JIT_TRUE!$USE_JIT_TRUE$ac_delim
@@ -42356,7 +42169,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -43322,6 +43135,10 @@ if test x$platform_win32 = xyes; then
sed -e "s,-mno-cygwin,,g" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
fi
+if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
+ DISABLE_MCS_DOCS=yes
+fi
+
(
case $prefix in
NONE) prefix=$ac_default_prefix ;;
diff --git a/configure.in b/configure.in
index 39dd4cf..32b3763 100644
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono,2.4)
+AM_INIT_AUTOMAKE(mono,2.4.2.3)
AM_MAINTAINER_MODE
API_VER=1.0
@@ -64,6 +64,14 @@ need_link_unlink=no
AC_MSG_CHECKING([host platform characteristics])
libgc_threads=no
has_dtrace=no
+
+case "$host" in
+ powerpc*-*-linux*)
+ # https://bugzilla.novell.com/show_bug.cgi?id=504411
+ disable_munmap=yes
+ ;;
+esac
+
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
@@ -139,7 +147,10 @@ case "$host" in
;;
*-*-linux*)
platform_win32=no
- CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP"
+ CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
+ if test "x$disable_munmap" != "xyes"; then
+ CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
+ fi
libmono_cflags="-D_REENTRANT"
libmono_ldflags="-lpthread"
libdl="-ldl"
@@ -360,13 +371,19 @@ fi
# A sanity check to catch cases where the package was unpacked
# with an ancient tar program (Solaris)
#
-AC_MSG_CHECKING(integrity of package)
-if test -f $srcdir/$mcsdir/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
-then
- AC_MSG_RESULT(ok)
-else
- errorm="Your mono distribution is incomplete; if unpacking from a tar file, make sure you use GNU tar; see http://www.mono-project.com/IncompletePackage for more details"
- AC_MSG_ERROR([$errorm])
+AC_ARG_ENABLE(solaris-tar-check,
+[ --disable-solaris-tar-check disable solaris tar check],
+ do_solaris_tar_check=no, do_solaris_tar_check=yes)
+
+if test x"$do_solaris_tar_check" = xyes; then
+ AC_MSG_CHECKING(integrity of package)
+ if test -f $srcdir/$mcsdir/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
+ then
+ AC_MSG_RESULT(ok)
+ else
+ errorm="Your mono distribution is incomplete; if unpacking from a tar file, make sure you use GNU tar; see http://www.mono-project.com/IncompletePackage for more details"
+ AC_MSG_ERROR([$errorm])
+ fi
fi
mcs_topdir='$(top_srcdir)/'$mcsdir
@@ -462,13 +479,18 @@ system)
## Versions of dependencies
GLIB_REQUIRED_VERSION=1.3.11
-
- PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
-
- GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
- GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
- GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
- GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
+
+ dnl
+ dnl No, you will not replace this check with a pkg.m4 check
+ dnl
+ if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
+ GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
+ GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
+ GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
+ GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
+ else
+ AC_MSG_ERROR([You need at least glib-2.0 $GLIB_REQUIRED_VERSION])
+ fi
;;
*)
AC_MSG_ERROR([Invalid argument to --with-glib.])
@@ -1946,6 +1968,19 @@ case "$host" in
;;
esac
+# FIXME: Define the others as well
+case "$TARGET" in
+X86)
+ AC_DEFINE(TARGET_X86, 1, [...])
+ ;;
+AMD64)
+ AC_DEFINE(TARGET_AMD64, 1, [...])
+ ;;
+ARM)
+ AC_DEFINE(TARGET_ARM, 1, [...])
+ ;;
+esac
+
if test "x$sizeof_register" = "x4"; then
AC_DEFINE(SIZEOF_REGISTER,4,[size of machine integer registers])
elif test "x$sizeof_register" = "x8"; then
@@ -2395,6 +2430,13 @@ if test x$platform_win32 = xyes; then
sed -e "s,-mno-cygwin,,g" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
fi
+dnl
+dnl Consistency settings
+dnl
+if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
+ DISABLE_MCS_DOCS=yes
+fi
+
(
case $prefix in
NONE) prefix=$ac_default_prefix ;;
diff --git a/data/Makefile.in b/data/Makefile.in
index 52c3efd..fb54996 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -91,8 +91,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/data/browscap.ini b/data/browscap.ini
index bc29809..1267e1d 100644
--- a/data/browscap.ini
+++ b/data/browscap.ini
@@ -1,10 +1,9 @@
;;; Provided courtesy of http://browsers.garykeith.com
-;;; Created on April 3, 2007 at 5:13:55 PM GMT
-;;; http://forums.garykeith.com/changes
+;;; Created on Wednesday, June 17, 2009 at 6:30 AM GMT
[GJK_Browscap_Version]
-Version=3942
-Released=Tue, 03 Apr 2007 17:13:55 -0000
+Version=4476
+Released=Wed, 17 Jun 2009 06:30:21 -0000
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DefaultProperties
@@ -24,25 +23,19 @@ IFrames=false
Tables=false
Cookies=false
BackgroundSounds=false
-AuthenticodeUpdate=
CDF=false
VBScript=false
JavaApplets=false
JavaScript=false
ActiveXControls=false
-Stripper=false
isBanned=false
-WAP=false
isMobileDevice=false
isSyndicationReader=false
Crawler=false
-CSS=0
CssVersion=0
supportsCSS=false
AOL=false
aolVersion=0
-netCLR=false
-ClrVersion=0
ECMAScriptVersion=0.0
W3CDOMVersion=0.0
@@ -63,72 +56,22 @@ Browser=Teoma
Parent=Ask
Browser=AskJeeves
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Fast/AllTheWeb
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Baidu
-[Fast/AllTheWeb]
+[Baidu]
Parent=DefaultProperties
-Browser=Fast/AllTheWeb
-Alpha=true
-Beta=true
-Win16=true
-Win32=true
-Win64=true
+Browser=Baidu
Frames=true
-IFrames=true
Tables=true
-Cookies=true
-BackgroundSounds=true
-CDF=true
-VBScript=true
-JavaApplets=true
-JavaScript=true
-ActiveXControls=true
-Stripper=true
-isBanned=true
-WAP=true
-isMobileDevice=true
-isSyndicationReader=true
Crawler=true
-[*FAST Enterprise Crawler*]
-Parent=Fast/AllTheWeb
-Browser=FAST Enterprise Crawler
-
-[FAST Data Search Document Retriever/4.0*]
-Parent=Fast/AllTheWeb
-Browser=FAST Data Search Document Retriever
-
-[FAST MetaWeb Crawler (helpdesk at fastsearch dot com)]
-Parent=Fast/AllTheWeb
-Browser=FAST MetaWeb Crawler
-
-[Fast PartnerSite Crawler*]
-Parent=Fast/AllTheWeb
-Browser=FAST PartnerSite
-
-[FAST-WebCrawler/*]
-Parent=Fast/AllTheWeb
-Browser=FAST-WebCrawler
-
-[FAST-WebCrawler/*/FirstPage*]
-Parent=Fast/AllTheWeb
-Browser=FAST-WebCrawler/FirstPage
-
-[FAST-WebCrawler/*/Fresh*]
-Parent=Fast/AllTheWeb
-Browser=FAST-WebCrawler/Fresh
-
-[FAST-WebCrawler/*/PartnerSite*]
-Parent=Fast/AllTheWeb
-Browser=FAST PartnerSite
-
-[FAST-WebCrawler/*?Multimedia*]
-Parent=Fast/AllTheWeb
-Browser=FAST-WebCrawler/Multimedia
+[BaiduImageSpider*]
+Parent=Baidu
+Browser=BaiduImageSpider
-[FastSearch Web Crawler for*]
-Parent=Fast/AllTheWeb
-Browser=FastSearch Web Crawler
+[Baiduspider*]
+Parent=Baidu
+Browser=BaiDu
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Google
@@ -141,15 +84,41 @@ Tables=true
JavaScript=true
Crawler=true
-[AdsBot-Google (*http://www.google.com/adsbot.html)]
+[* (compatible; Googlebot-Mobile/2.1; *http://www.google.com/bot.html)]
+Parent=Google
+Browser=Googlebot-Mobile
+Frames=false
+IFrames=false
+Tables=false
+
+[*Google Wireless Transcoder*]
+Parent=Google
+Browser=Google Wireless Transcoder
+
+[AdsBot-Google (?http://www.google.com/adsbot.html)]
Parent=Google
Browser=AdsBot-Google
+[Feedfetcher-Google-iGoogleGadgets;*]
+Parent=Google
+Browser=iGoogleGadgets
+isBanned=true
+isSyndicationReader=true
+
[Feedfetcher-Google;*]
Parent=Google
Browser=Feedfetcher-Google
+isBanned=true
isSyndicationReader=true
+[Google OpenSocial agent (http://www.google.com/feedfetcher.html)]
+Parent=Google
+Browser=Google OpenSocial
+
+[Google-Site-Verification/1.0]
+Parent=Google
+Browser=Google-Site-Verification
+
[Google-Sitemaps/*]
Parent=Google
Browser=Google-Sitemaps
@@ -163,11 +132,15 @@ CDF=true
Parent=Google
Browser=googlebot-urlconsole
-[Googlebot/2.1 (*http://www.google.com/bot.html)]
+[Googlebot-Video/1.0]
+Parent=Google
+Browser=Google-Video
+
+[Googlebot/2.1 (?http://www.google.com/bot.html)]
Parent=Google
Browser=Googlebot
-[Googlebot/2.1 (*http://www.googlebot.com/bot.html)]
+[Googlebot/2.1 (?http://www.googlebot.com/bot.html)]
Parent=Google
Browser=Googlebot
@@ -175,15 +148,12 @@ Browser=Googlebot
Parent=Google
Browser=Googlebot/Test
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Google Search Appliance
-
[gsa-crawler*]
Parent=Google
Browser=Google Search Appliance
-Stripper=true
isBanned=true
-[Mediapartners-Google/*]
+[Mediapartners-Google*]
Parent=Google
Browser=Mediapartners-Google
@@ -194,12 +164,15 @@ Browser=Google Desktop
[Mozilla/4.0 (compatible; GoogleToolbar*)]
Parent=Google
Browser=Google Toolbar
-Stripper=true
isBanned=true
-[Mozilla/5.0 (compatible; Googlebot/2.1; *http://www.google.com/bot.html)]
+[Mozilla/5.0 (compatible; Google Keyword Tool;*)]
Parent=Google
-Browser=Googlebot
+Browser=Google Keyword Tool
+
+[Mozilla/5.0 (compatible; Googlebot/2.1; ?http://www.google.com/bot.html)]
+Parent=Google
+Browser=Google Webmaster Tools
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Inktomi
@@ -210,9 +183,14 @@ Frames=true
Tables=true
Crawler=true
+[* (compatible;YahooSeeker/M1A1-R2D2; *)]
+Parent=Inktomi
+Browser=YahooSeeker-Mobile
+Frames=false
+Tables=false
+
[Mozilla/4.0]
Parent=Inktomi
-Browser=Mozilla/4.0
[Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)]
Parent=Inktomi
@@ -221,9 +199,20 @@ Win32=true
[Mozilla/4.0 (compatible; Yahoo Japan; for robot study; kasugiya)]
Parent=Inktomi
Browser=Yahoo! RobotStudy
-Stripper=true
isBanned=true
+[Mozilla/5.0 (compatible; BMC/1.0 (Y!J-AGENT))]
+Parent=Inktomi
+Browser=Y!J-AGENT/BMC
+
+[Mozilla/5.0 (compatible; BMF/1.0 (Y!J-AGENT))]
+Parent=Inktomi
+Browser=Y!J-AGENT/BMF
+
+[Mozilla/5.0 (compatible; BMI/1.0 (Y!J-AGENT; 1.0))]
+Parent=Inktomi
+Browser=Y!J-AGENT/BMI
+
[Mozilla/5.0 (compatible; Yahoo! DE Slurp; http://help.yahoo.com/help/us/ysearch/slurp)]
Parent=Inktomi
Browser=Yahoo! Directory Engine
@@ -232,10 +221,24 @@ Browser=Yahoo! Directory Engine
Parent=Inktomi
Browser=Yahoo! Slurp China
+[Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp)]
+Parent=Inktomi
+Browser=Yahoo! Slurp
+Version=3.0
+MajorVer=3
+MinorVer=0
+
[Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)]
Parent=Inktomi
Browser=Yahoo! Slurp
+[Mozilla/5.0 (compatible; Yahoo! Verifier/1.1)]
+Parent=Inktomi
+Browser=Yahoo! Verifier
+Version=1.1
+MajorVer=1
+MinorVer=1
+
[Mozilla/5.0 (Slurp/cat; slurp at inktomi.com; http://www.inktomi.com/slurp.html)]
Parent=Inktomi
Browser=Slurp/cat
@@ -243,6 +246,13 @@ Browser=Slurp/cat
[Mozilla/5.0 (Slurp/si; slurp at inktomi.com; http://www.inktomi.com/slurp.html)]
Parent=Inktomi
+[Mozilla/5.0 (Yahoo-MMCrawler/4.0; mailto:vertical-crawl-support at yahoo-inc.com)]
+Parent=Inktomi
+Browser=Yahoo-MMCrawler
+Version=4.0
+MajorVer=4
+MinorVer=0
+
[Scooter/*]
Parent=Inktomi
Browser=Scooter
@@ -250,6 +260,9 @@ Browser=Scooter
[Scooter/3.3Y!CrawlX]
Parent=Inktomi
Browser=Scooter/3.3Y!CrawlX
+Version=3.3
+MajorVer=3
+MinorVer=3
[slurp]
Parent=Inktomi
@@ -258,7 +271,9 @@ Browser=slurp
[Y!J-BSC/1.0*]
Parent=Inktomi
Browser=Y!J-BSC
-Stripper=true
+Version=1.0
+MajorVer=1
+MinorVer=0
isBanned=true
[Y!J-SRD/1.0]
@@ -280,6 +295,10 @@ Browser=Yahoo Pipes
Parent=Inktomi
Browser=Yahoo! Mindset
+[Yahoo! Slurp/Site Explorer]
+Parent=Inktomi
+Browser=Yahoo! Site Explorer
+
[Yahoo-Blogs/*]
Parent=Inktomi
Browser=Yahoo-Blogs
@@ -291,7 +310,6 @@ Browser=Yahoo-MMAudVid
[Yahoo-MMCrawler*]
Parent=Inktomi
Browser=Yahoo-MMCrawler
-Stripper=true
isBanned=true
[YahooFeedSeeker*]
@@ -303,7 +321,6 @@ Crawler=false
[YahooSeeker/*]
Parent=Inktomi
Browser=YahooSeeker
-WAP=true
isMobileDevice=true
[YahooSeeker/CafeKelsa (compatible; Konqueror/3.2; FreeBSD*) (KHTML, like Gecko)]
@@ -321,31 +338,6 @@ Browser=YahooVideoSearch
Parent=Inktomi
Browser=YahooYSMcm
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Lycos
-
-[Lycos]
-Parent=DefaultProperties
-Browser=Lycos
-Frames=true
-Tables=true
-Crawler=true
-
-[Lycos*]
-Parent=Lycos
-Browser=Lycos
-
-[Lycos-Proxy]
-Parent=Lycos
-Browser=Lycos-Proxy
-
-[Lycos-Spider_(modspider)]
-Parent=Lycos
-Browser=Lycos-Spider_(modspider)
-
-[Lycos-Spider_(T-Rex)]
-Parent=Lycos
-Browser=Lycos-Spider_(T-Rex)
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MSN
[MSN]
@@ -355,20 +347,34 @@ Frames=true
Tables=true
Crawler=true
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MSN lanshanbot
+[adidxbot/1.1 (?http://search.msn.com/msnbot.htm)]
+Parent=MSN
+Browser=adidxbot
+
+[librabot/1.0 (*)]
+Parent=MSN
+Browser=librabot
-[lanshanbot/1.0*]
+[llssbot/1.0]
Parent=MSN
-Browser=lanshanbot
+Browser=llssbot
Version=1.0
MajorVer=1
MinorVer=0
-[Mozilla/4.0 (compatible; MSIE 6.0; Windows NT; MS Search 4.0 Robot, crawler)]
+[MSMOBOT/1.1*]
Parent=MSN
-Browser=MS Search
+Browser=msnbot-mobile
+Version=1.1
+MajorVer=1
+MinorVer=1
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MSN Images & Other Media
+[MSNBot-Academic/1.0*]
+Parent=MSN
+Browser=MSNBot-Academic
+Version=1.0
+MajorVer=1
+MinorVer=0
[msnbot-media/1.0*]
Parent=MSN
@@ -377,31 +383,34 @@ Version=1.0
MajorVer=1
MinorVer=0
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MSN News
+[msnbot-media/1.1*]
+Parent=MSN
+Browser=msnbot-media
+Version=1.1
+MajorVer=1
+MinorVer=1
-[msnbot-news/1.0*]
+[MSNBot-News/1.0*]
Parent=MSN
-Browser=msnbot-news
+Browser=MSNBot-News
Version=1.0
MajorVer=1
MinorVer=0
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MSN News Blog Aggregator
-
-[msnbot-NewsBlogs/1.0*]
+[MSNBot-NewsBlogs/1.0*]
Parent=MSN
-Browser=msnbot-NewsBlogs
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MSN Shopping
-
-[msnbot-Products/1.0*]
-Parent=MSN
-Browser=msnbot-Products
-Version=1.0
+Browser=MSNBot-NewsBlogs
+Version=1
MajorVer=1
MinorVer=0
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MSN Search
+[msnbot-products]
+Parent=MSN
+Browser=msnbot-products
+
+[msnbot-webmaster/1.0 (*http://search.msn.com/msnbot.htm)]
+Parent=MSN
+Browser=msnbot-webmaster tools
[msnbot/1.0*]
Parent=MSN
@@ -410,12 +419,31 @@ Version=1.0
MajorVer=1
MinorVer=0
-[msnbot/1.0-MM*]
+[msnbot/1.1*]
Parent=MSN
-Browser=msnbot-MM
-Version=1.00
+Browser=msnbot
+Version=1.1
MajorVer=1
+MinorVer=1
+
+[msnbot/2.0b*]
+Parent=MSN
+Version=2.0
+MajorVer=2
MinorVer=0
+Beta=true
+
+[MSR-ISRCCrawler]
+Parent=MSN
+Browser=MSR-ISRCCrawler
+
+[renlifangbot/1.0 (?http://search.msn.com/msnbot.htm)]
+Parent=MSN
+Browser=renlifangbot
+
+[T-Mobile Dash Mozilla/4.0 (*) MSNBOT-MOBILE/1.1 (*)]
+Parent=MSN
+Browser=msnbot-mobile
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Yahoo
@@ -430,10 +458,16 @@ Crawler=true
Parent=Yahoo
Browser=Y!J
+[Mozilla/5.0 (Yahoo-Test/4.0*)]
+Parent=Yahoo
+Browser=Yahoo-Test
+Version=4.0
+MajorVer=4
+MinorVer=0
+
[mp3Spider cn-search-devel at yahoo-inc dot com]
Parent=Yahoo
Browser=Yahoo! Media
-Stripper=true
isBanned=true
[My Browser]
@@ -443,52 +477,21 @@ Browser=Yahoo! My Browser
[Y!OASIS/*]
Parent=Yahoo
Browser=Y!OASIS
-Stripper=true
isBanned=true
[YahooYSMcm/2.0.0]
Parent=Yahoo
Browser=YahooYSMcm
-Stripper=true
+Version=2.0
+MajorVer=2
+MinorVer=0
isBanned=true
[YRL_ODP_CRAWLER]
Parent=Yahoo
Browser=YRL_ODP_CRAWLER
-Stripper=true
isBanned=true
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Baidu
-
-[Baidu]
-Parent=DefaultProperties
-Browser=Baidu
-Frames=true
-Tables=true
-Crawler=true
-
-[Baiduspider*]
-Parent=Baidu
-Browser=BaiDu
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Onet.pl Szukaj
-
-[Onet.pl Szukaj]
-Parent=DefaultProperties
-Browser=Onet.pl Szukaj
-Frames=true
-IFrames=true
-Tables=true
-Crawler=true
-
-[Mozilla/5.0 (compatible; OnetSzukaj/5.0*]
-Parent=Onet.pl Szukaj
-Browser=OnetSzukaj
-
-[Onet.pl SA, http://szukaj.onet.pl]
-Parent=Onet.pl Szukaj
-Browser=Onet.pl
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Yandex
[Yandex]
@@ -503,6 +506,15 @@ Crawler=true
[Mozilla/4.0 (compatible; MSIE 5.0; YANDEX)]
Parent=Yandex
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9) Gecko VisualParser/3.0]
+Parent=Yandex
+Browser=VisualParser
+isBanned=true
+
+[YaDirectBot/*]
+Parent=Yandex
+Browser=YaDirectBot
+
[Yandex/*]
Parent=Yandex
@@ -516,53 +528,6 @@ Parent=Yandex
Browser=YandexSomething
isSyndicationReader=true
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Accoona
-
-[Accoona]
-Parent=DefaultProperties
-Browser=Accoona
-Frames=true
-IFrames=true
-Tables=true
-Crawler=true
-
-[accoona*]
-Parent=Accoona
-Browser=Accoona
-
-[Accoona-AI-Agent/* (crawler at accoona dot com)]
-Parent=Accoona
-Browser=Accoona-AI-Agent
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Become
-
-[Become]
-Parent=DefaultProperties
-Browser=Become
-Frames=true
-Tables=true
-Crawler=true
-
-[*BecomeBot/*]
-Parent=Become
-Browser=BecomeBot
-
-[*BecomeBot at exava.com*]
-Parent=Become
-Browser=BecomeBot
-
-[*Exabot at exava.com*]
-Parent=Become
-Browser=Exabot
-
-[MonkeyCrawl/*]
-Parent=Become
-Browser=MonkeyCrawl
-
-[Mozilla/5.0 (compatible; BecomeJPBot/2.3; *)]
-Parent=Become
-Browser=BecomeJPBot
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Best of the Web
[Best of the Web]
@@ -580,7 +545,6 @@ Crawler=false
[Mozilla/4.0 (compatible; BOTW Spider; *http://botw.org)]
Parent=Best of the Web
Browser=BOTW Spider
-Stripper=true
isBanned=true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Boitho
@@ -624,6 +588,22 @@ MinorVer=1
Parent=Convera
Browser=CrawlConvera
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DotBot
+
+[DotBot]
+Parent=DefaultProperties
+Browser=DotBot
+Frames=true
+Tables=true
+isBanned=true
+Crawler=true
+
+[DotBot/* (http://www.dotnetdotcom.org/*)]
+Parent=DotBot
+
+[Mozilla/5.0 (compatible; DotBot/*; http://www.dotnetdotcom.org/*)]
+Parent=DotBot
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Entireweb
[Entireweb]
@@ -632,20 +612,16 @@ Browser=Entireweb
Frames=true
IFrames=true
Tables=true
-Stripper=true
isBanned=true
Crawler=true
[Mozilla/4.0 (compatible; SpeedySpider; www.entireweb.com)]
Parent=Entireweb
-[Speedy Spider (Beta/*; www.entireweb.com)]
+[Speedy Spider (*Beta/*)]
Parent=Entireweb
-[Speedy Spider (Entireweb; Beta/*)]
-Parent=Entireweb
-
-[Speedy_Spider_(http://www.entireweb.com)]
+[Speedy?Spider?(http://www.entireweb.com*)]
Parent=Entireweb
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Envolk
@@ -656,7 +632,6 @@ Browser=Envolk
Frames=true
IFrames=true
Tables=true
-Stripper=true
isBanned=true
Crawler=true
@@ -673,7 +648,6 @@ Parent=DefaultProperties
Browser=Exalead
Frames=true
Tables=true
-Stripper=true
isBanned=true
Crawler=true
@@ -703,17 +677,19 @@ Platform=Liberate
[Exalead NG/*]
Parent=Exalead
Browser=Exalead NG
-Stripper=true
isBanned=true
[Mozilla/5.0 (compatible; Exabot-Images/3.0;*)]
Parent=Exalead
Browser=Exabot-Images
+[Mozilla/5.0 (compatible; Exabot/3.0 (BiggerBetter/tests);*)]
+Parent=Exalead
+Browser=Exabot/BiggerBetter/tests
+
[Mozilla/5.0 (compatible; Exabot/3.0;*)]
Parent=Exalead
Browser=Exabot
-Stripper=false
isBanned=false
[Mozilla/5.0 (compatible; NGBot/*)]
@@ -725,38 +701,89 @@ Browser=Exalead Previewer
Version=1.0
MajorVer=1
MinorVer=0
-Stripper=true
isBanned=true
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Excite
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Fast/AllTheWeb
-[Excite]
+[Fast/AllTheWeb]
Parent=DefaultProperties
-Browser=Excite
+Browser=Fast/AllTheWeb
+Alpha=true
+Beta=true
+Win16=true
+Win32=true
+Win64=true
Frames=true
+IFrames=true
Tables=true
+Cookies=true
+BackgroundSounds=true
+CDF=true
+VBScript=true
+JavaApplets=true
+JavaScript=true
+ActiveXControls=true
+isBanned=true
+isMobileDevice=true
+isSyndicationReader=true
Crawler=true
-[Mozilla/4.0 (compatible; * sureseeker.com*)]
-Parent=Excite
-Browser=Excite sureseeker.com
+[*FAST Enterprise Crawler*]
+Parent=Fast/AllTheWeb
+Browser=FAST Enterprise Crawler
+
+[FAST Data Search Document Retriever/4.0*]
+Parent=Fast/AllTheWeb
+Browser=FAST Data Search Document Retriever
+
+[FAST MetaWeb Crawler (helpdesk at fastsearch dot com)]
+Parent=Fast/AllTheWeb
+Browser=FAST MetaWeb Crawler
+
+[Fast PartnerSite Crawler*]
+Parent=Fast/AllTheWeb
+Browser=FAST PartnerSite
+
+[FAST-WebCrawler/*]
+Parent=Fast/AllTheWeb
+Browser=FAST-WebCrawler
+
+[FAST-WebCrawler/*/FirstPage*]
+Parent=Fast/AllTheWeb
+Browser=FAST-WebCrawler/FirstPage
+
+[FAST-WebCrawler/*/Fresh*]
+Parent=Fast/AllTheWeb
+Browser=FAST-WebCrawler/Fresh
+
+[FAST-WebCrawler/*/PartnerSite*]
+Parent=Fast/AllTheWeb
+Browser=FAST PartnerSite
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Galaxy
+[FAST-WebCrawler/*?Multimedia*]
+Parent=Fast/AllTheWeb
+Browser=FAST-WebCrawler/Multimedia
-[Galaxy]
+[FastSearch Web Crawler for*]
+Parent=Fast/AllTheWeb
+Browser=FastSearch Web Crawler
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Gigabot
+
+[Gigabot]
Parent=DefaultProperties
-Browser=Galaxy
+Browser=Gigabot
Frames=true
+IFrames=true
Tables=true
Crawler=true
-[GalaxyBot/*0 (http://www.galaxy.com/galaxybot.html)]
-Parent=Galaxy
-Browser=GalaxyBot
+[Gigabot*]
+Parent=Gigabot
-[Mozilla/* (compatible; MSIE *; www.galaxy.com;*)]
-Parent=Galaxy
-Browser=GalaxyBot
+[GigabotSiteSearch/*]
+Parent=Gigabot
+Browser=GigabotSiteSearch
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ilse
@@ -791,7 +818,6 @@ Crawler=true
[DataFountains/DMOZ Downloader*]
Parent=iVia Project
Browser=DataFountains/DMOZ Downloader
-Stripper=true
isBanned=true
[DataFountains/DMOZ Feature Vector Corpus Creator*]
@@ -814,7 +840,6 @@ Browser=ExactSeek Crawler
[exactseek-pagereaper-* (crawler at exactseek.com)]
Parent=Jayde Online
Browser=exactseek-pagereaper
-Stripper=true
isBanned=true
[exactseek.com]
@@ -825,13 +850,37 @@ Browser=exactseek.com
Parent=Jayde Online
Browser=Jayde Crawler
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Lycos
+
+[Lycos]
+Parent=DefaultProperties
+Browser=Lycos
+Frames=true
+Tables=true
+Crawler=true
+
+[Lycos*]
+Parent=Lycos
+Browser=Lycos
+
+[Lycos-Proxy]
+Parent=Lycos
+Browser=Lycos-Proxy
+
+[Lycos-Spider_(modspider)]
+Parent=Lycos
+Browser=Lycos-Spider_(modspider)
+
+[Lycos-Spider_(T-Rex)]
+Parent=Lycos
+Browser=Lycos-Spider_(T-Rex)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Naver
[Naver]
Parent=DefaultProperties
Browser=Naver
-Frames=true
-Tables=true
+isBanned=true
Crawler=true
[Cowbot-* (NHN Corp*naver.com)]
@@ -849,164 +898,21 @@ Browser=Naver NaverBot
Parent=Naver
Browser=Naver NHN Corp
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Openfind
-
-[Openfind]
-Parent=DefaultProperties
-Browser=Openfind
-Frames=true
-Tables=true
-Crawler=true
-
-[Gaisbot/*]
-Parent=Openfind
-
-[Openbot/*]
-Parent=Openfind
-
-[Openfind data gatherer*]
-Parent=Openfind
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Orbiter
-
-[Orbiter]
-Parent=DefaultProperties
-Browser=Orbiter
-Frames=true
-Tables=true
-Crawler=true
-
-[Orbiter (?http://www.dailyorbit.com/bot.htm)]
-Parent=Orbiter
-
-[Orbiter (?http://www.thatsearchengine.com/bot.htm)]
-Parent=Orbiter
-Browser=Orbiter
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PeerFactory
-
-[PeerFactory]
-Parent=DefaultProperties
-Browser=PeerFactory
-Frames=true
-Tables=true
-Stripper=true
-isBanned=true
-Crawler=true
-
-[PeerFactor 404 crawler]
-Parent=PeerFactory
-Browser=PeerFactor 404 crawler
-
-[PeerFactor Crawler]
-Parent=PeerFactory
-Browser=PeerFactor Crawler
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Pogodak!
-
-[Pogodak]
-Parent=DefaultProperties
-Browser=Pogodak!
-Frames=true
-Tables=true
-Stripper=true
-isBanned=true
-Crawler=true
-
-[Mozilla/5.0 (compatible; Pogodak.co.yu/*)]
-Parent=Pogodak
-
-[Mozilla/5.0 (compatible; TridentSpider/*)]
-Parent=Pogodak
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Relevare
-
-[Relevare]
-Parent=DefaultProperties
-Browser=Relevare
-Frames=true
-Tables=true
-Stripper=true
-isBanned=true
-Crawler=true
-
-[bumblebee/*]
-Parent=Relevare
-Browser=Relevare
-
-[Bumblebee at relevare.com]
-Parent=Relevare
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sensis
-
-[Sensis]
-Parent=DefaultProperties
-Browser=Sensis
-Frames=true
-IFrames=true
-Tables=true
-Crawler=true
-
-[Sensis Web Crawler (search_comments\at\sensis\dot\com\dot\au)]
-Parent=Sensis
-Browser=Sensis Web Crawler
-
-[Sensis.com.au Web Crawler (search_comments\at\sensis\dot\com\dot\au)]
-Parent=Sensis
-Browser=Sensis.com.au Web Crawler
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Shunix
-
-[Shunix]
-Parent=DefaultProperties
-Browser=Shunix
-Frames=true
-IFrames=true
-Tables=true
-Crawler=true
-
-[Mozilla/5.0 (compatible; ShunixBot/*)]
-Parent=Shunix
-Browser=ShunixBot
-
-[XunBot/*]
-Parent=Shunix
-Browser=Shunix XunBot
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Singing Fish
-
-[Singing Fish]
-Parent=DefaultProperties
-Browser=Singing Fish
-Frames=true
-Tables=true
-Crawler=true
-
-[asterias/*]
-Parent=Singing Fish
-
-[Mozilla/* (compatible; *Asterias Crawler v*)*]
-Parent=Singing Fish
+[Yeti/*]
+Parent=Naver
+Browser=Yeti
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Snap
[Snap]
Parent=DefaultProperties
Browser=Snap
-Stripper=true
isBanned=true
Crawler=true
-[Mozilla/5.0 (*) Gecko/* Firefox/* SnapPreviewBot]
-Parent=Snap
-
-[snap.com beta crawler v0]
+[Mozilla/5.0 (SnapPreviewBot) Gecko/* Firefox/*]
Parent=Snap
-[snap.com*]
-Parent=Snap
-Browser=Snap
-
[Snapbot/*]
Parent=Snap
@@ -1017,7 +923,6 @@ Parent=DefaultProperties
Browser=Sogou
Frames=true
Tables=true
-Stripper=true
isBanned=true
Crawler=true
@@ -1025,199 +930,68 @@ Crawler=true
Parent=Sogou
Browser=Sogou/Shaboyi Spider
-[Sogou Pic Agent]
+[Sogou develop spider/*]
Parent=Sogou
-Browser=Sogou/Image Crawler
+Browser=Sogou Develop Spider
-[sogou spider]
+[Sogou head spider*]
Parent=Sogou
-Browser=Sogou/Spider
+Browser=Sogou/HEAD Spider
-[sogou web spider]
+[sogou js robot(*)]
Parent=Sogou
-Browser=sogou web spider
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Thunderstone
-
-[Thunderstone]
-Parent=DefaultProperties
-Browser=Thunderstone
-Frames=true
-Tables=true
-Stripper=true
-isBanned=true
-Crawler=true
-
-[*Webinator*]
-Parent=Thunderstone
-Browser=Webinator
-[Mozilla/* (compatible; T-H-U-N-D-E-R-S-T-O-N-E)]
-Parent=Thunderstone
-Browser=Texis
-
-[T-H-U-N-D-E-R-S-T-O-N-E]
-Parent=Thunderstone
-Browser=Texis
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Vagabondo
-
-[Vagabondo]
-Parent=DefaultProperties
-Browser=Vagabondo
-Frames=true
-IFrames=true
-Tables=true
-Crawler=true
-
-[Mozilla/4.0 (compatible; Vagabondo/*)]
-Parent=Vagabondo
-Version=2.2
-MajorVer=2
-MinorVer=2
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WISEnut
-
-[WISEnut]
-Parent=DefaultProperties
-Browser=WISEnut
-Frames=true
-Tables=true
-Crawler=true
+[Sogou Orion spider/*]
+Parent=Sogou
+Browser=Sogou Orion spider
-[Mozilla/4.0 compatible ZyBorg/* (wn*.zyborg at looksmart.net; http://www.WISEnutbot.com)]
-Parent=WISEnut
+[Sogou Pic Agent]
+Parent=Sogou
+Browser=Sogou/Image Crawler
-[Mozilla/4.0 compatible ZyBorg/* Dead Link Checker (*@looksmart.net; http://www.WISEnutbot.com)]
-Parent=WISEnut
-Browser=Dead Link Checker
+[Sogou Pic Spider]
+Parent=Sogou
+Browser=Sogou Pic Spider
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Yoono
+[Sogou Push Spider/*]
+Parent=Sogou
+Browser=Sogou Push Spider
-[Yoono]
-Parent=DefaultProperties
-Browser=Yoono
-Frames=true
-Tables=true
-Stripper=true
-isBanned=true
-Crawler=true
+[sogou spider]
+Parent=Sogou
+Browser=Sogou/Spider
-[Mozilla/5.0 (compatible; Yoono; http://www.yoono.com/)]
-Parent=Yoono
+[sogou web spider*]
+Parent=Sogou
+Browser=sogou web spider
-[yoono/* web-crawler/*]
-Parent=Yoono
+[Sogou-Test-Spider/*]
+Parent=Sogou
+Browser=Sogou-Test-Spider
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ZoomInfo
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; YodaoBot
-[ZoomInfo]
+[YodaoBot]
Parent=DefaultProperties
-Browser=ZoomInfo
+Browser=YodaoBot
Frames=true
+IFrames=true
Tables=true
-Stripper=true
isBanned=true
Crawler=true
-[NextGenSearchBot 1 (for information visit http://about.zoominfo.com/PublicSite/NextGenSearchBot.asp)]
-Parent=ZoomInfo
-Browser=ZoomInfo
-
-[NextGenSearchBot 1 (for information visit http://www.eliyon.com/NextGenSearchBot)]
-Parent=ZoomInfo
-Browser=Eliyon
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Directories
-
-[Directories]
-Parent=DefaultProperties
-Browser=Directories
-Frames=true
-Tables=true
-Crawler=true
-
-[acontbot]
-Parent=Directories
-Browser=acontbot
-
-[aipbot/*]
-Parent=Directories
-Browser=aipbot
-
-[Findexa Crawler (http://www.findexa.no/gulesider/article26548.ece)]
-Parent=Directories
-Browser=Findexa Crawler
-
-[FirstGov.gov Search - POC:firstgov.webmasters at gsa.gov]
-Parent=Directories
-Browser=FirstGov.gov Search
+[Mozilla/5.0 (compatible; YodaoBot/1.*)]
+Parent=YodaoBot
-[http://www.istarthere.com (spider at istarthere.com)]
-Parent=Directories
-Browser=Istartere.com
-Stripper=true
-isBanned=true
-
-[Mackster (*)]
-Parent=Directories
-Browser=Mackster
-
-[Misterbot]
-Parent=Directories
-Browser=Misterbot
+[Mozilla/5.0 (compatible;YodaoBot-Image/1.*)]
+Parent=YodaoBot
+Browser=YodaoBot-Image
-[Mozilla/4.0 (compatible; MSIE 5.0; www.galaxy.com;*)]
-Parent=Directories
-Browser=Galaxy/LOGIKA Search Engine
-
-[Mozilla/5.0 (?http://www.toile.com/) ToileBot/*]
-Parent=Directories
-Browser=Toile
-
-[Mozilla/5.0 (Votay bot/*)]
-Parent=Directories
-Browser=Votay
-Stripper=true
-isBanned=true
+[WAP_Browser/5.0 (compatible; YodaoBot/1.*)]
+Parent=YodaoBot
-[Mozilla/6.0 (compatible; arameda.com Spider)]
-Parent=Directories
-Browser=Arameda
-
-[NationalDirectory-*Spider/*]
-Parent=Directories
-Browser=National Directory
-Stripper=true
-isBanned=true
-
-[Octopus/*]
-Parent=Directories
-Browser=Octopus
-
-[OpenIntelligenceData/1.* (?http://www.worldwideweb-x.com/openData.html)]
-Parent=Directories
-Browser=World Wide Web Directory Project
-Version=1.0
-MajorVer=1
-MinorVer=0
-Stripper=true
-isBanned=true
-
-[Poirot]
-Parent=Directories
-Browser=Poirot
-
-[silk/1.*]
-Parent=Directories
-Browser=Slider
-Version=1.0
-MajorVer=1
-MinorVer=0
-
-[WebFindBot(http://www.web-find.com)]
-Parent=Directories
-Browser=WebFindBot
+[YodaoBot/1.* (*)]
+Parent=YodaoBot
[Best Whois (http://www.bestwhois.net/)]
Parent=DNS Tools
@@ -1241,115 +1015,29 @@ isSyndicationReader=true
[General Crawlers]
Parent=DefaultProperties
Browser=General Crawlers
-Frames=true
-IFrames=true
-Tables=true
Crawler=true
-[*Networking4all*]
-Parent=General Crawlers
-Browser=Networking4all Bot
-
-[Aport]
-Parent=General Crawlers
-Browser=Aport
-
-[ArachnetAgent*]
-Parent=General Crawlers
-
-[Art-Online.com*]
+[A .NET Web Crawler]
Parent=General Crawlers
-Browser=Art-Online.com
+isBanned=true
[BabalooSpider/1.*]
Parent=General Crawlers
Browser=BabalooSpider
-[BeijingCrawler]
-Parent=General Crawlers
-Browser=BeijingCrawler
-Stripper=true
-isBanned=true
-
[BilgiBot/*]
Parent=General Crawlers
Browser=BilgiBot
-Stripper=true
isBanned=true
[bot/* (bot; *bot at bot.bot)]
Parent=General Crawlers
Browser=bot
-Stripper=true
-isBanned=true
-
-[botlist]
-Parent=General Crawlers
-Browser=botlist
-Stripper=true
-isBanned=true
-
-[Botswana*]
-Parent=General Crawlers
-Browser=Botswana
-
-[BravoBrian BStop*]
-Parent=General Crawlers
-Browser=BravoBrian BStop
-
-[BruinBot*]
-Parent=General Crawlers
-Browser=BruinBot
-
-[CacheabilityEngine/*]
-Parent=General Crawlers
-Browser=CacheabilityEngine
-
-[ccubee/*]
-Parent=General Crawlers
-Browser=ccubee
-
-[CFM-SearchBot(http://www.cfm-search.com)]
-Parent=General Crawlers
-Browser=CFM-SearchBot
-
-[CJNetworkQuality; http://www.cj.com/networkquality]
-Parent=General Crawlers
-Browser=CJNetworkQuality
-Frames=true
-Tables=true
-Cookies=true
-
-[Clushbot/*]
-Parent=General Crawlers
-Browser=Clushbot
-Stripper=true
isBanned=true
-[Comodo HTTP(S) Crawler*]
-Parent=General Crawlers
-Browser=Comodo HTTP Crawler
-
-[Crawler Mozilla/4.0]
-Parent=General Crawlers
-Stripper=true
-isBanned=true
-
-[CrawlWave/*]
-Parent=General Crawlers
-Browser=CrawlWave
-
-[CSHttpClient/*]
-Parent=General Crawlers
-Browser=CSHttpClient
-
-[CydralSpider/1.9*]
+[CyberPatrol*]
Parent=General Crawlers
-Browser=Cydral Web Image Search
-Version=1.9
-MajorVer=1
-MinorVer=9
-Stripper=true
+Browser=CyberPatrol
isBanned=true
[Cynthia 1.0]
@@ -1359,47 +1047,31 @@ Version=1.0
MajorVer=1
MinorVer=0
-[DiamondBot/*]
+[ddetailsbot (http://www.displaydetails.com)]
Parent=General Crawlers
-Browser=DiamondBot
-Stripper=true
-isBanned=true
+Browser=ddetailsbot
-[Diff-Engine*]
+[DomainCrawler/1.0 (info at domaincrawler.com; http://www.domaincrawler.com/domains/view/*)]
Parent=General Crawlers
+Browser=DomainCrawler
-[DomainsDB.net MetaCrawler*]
+[DomainsBotBot/1.*]
Parent=General Crawlers
-Browser=DomainsDB
+Browser=DomainsBotBot
+isBanned=true
-[dragonfly(ebingbong#playstarmusic.com)]
+[DomainsDB.net MetaCrawler*]
Parent=General Crawlers
-Browser=eBingBong
-Stripper=true
-isBanned=true
+Browser=DomainsDB
[Drupal (*)]
Parent=General Crawlers
Browser=Drupal
-[DTAAgent]
-Parent=General Crawlers
-Browser=DTAAgent
-
-[Dumbot (version *)]
+[Dumbot (version *)*]
Parent=General Crawlers
Browser=Dumbfind
-[EARTHCOM.info/*]
-Parent=General Crawlers
-Browser=EarthCom
-
-[EDI/* (Edacious & Intelligent*)]
-Parent=General Crawlers
-Browser=Edacious & Intelligent Web Crawler
-Stripper=true
-isBanned=true
-
[EuripBot/*]
Parent=General Crawlers
Browser=Europe Internet Portal
@@ -1410,65 +1082,40 @@ Browser=eventax
[FANGCrawl/*]
Parent=General Crawlers
-Browser=FANGCrawl
-Stripper=true
+Browser=Safe-t.net Web Filtering Service
isBanned=true
-[FRSEEKBOT]
+[favorstarbot/*]
Parent=General Crawlers
-Browser=FRSEEKBOT
+Browser=favorstarbot
+isBanned=true
-[Gaisbot*]
+[FollowSite.com (*)]
Parent=General Crawlers
-Browser=Gaisbot
+Browser=FollowSite
+isBanned=true
-[GeoBot/*]
+[Gaisbot*]
Parent=General Crawlers
-Browser=GeoBot
+Browser=Gaisbot
-[grub crawler]
+[Healthbot/Health_and_Longevity_Project_(HealthHaven.com) ]
Parent=General Crawlers
-Browser=grub crawler
+Browser=Healthbot
+isBanned=true
-[HiddenMarket-*]
+[hitcrawler_0.*]
Parent=General Crawlers
-Browser=HiddenMarket
-Stripper=true
+Browser=hitcrawler
isBanned=true
[htdig/*]
Parent=General Crawlers
Browser=ht://Dig
-[HTTP-Test-Program]
-Parent=General Crawlers
-Browser=WebBug
-MajorVer=5
-
-[HTTP/1.0]
+[http://hilfe.acont.de/bot.html ACONTBOT]
Parent=General Crawlers
-Browser=HTTP/1.0
-
-[http://www.almaden.ibm.com/cs/crawler*]
-Parent=General Crawlers
-Browser=IBM's WebFountain
-
-[ichiro/*]
-Parent=General Crawlers
-Browser=ichiro
-
-[InnerpriseBot/*]
-Parent=General Crawlers
-Browser=InnerpriseBot
-
-[InternetLinkAgent/*]
-Parent=General Crawlers
-Browser=InternetLinkAgent
-
-[iVia Page Fetcher*]
-Parent=General Crawlers
-Browser=iVia Software
-Stripper=true
+Browser=ACONTBOT
isBanned=true
[JetBrains*]
@@ -1482,7 +1129,6 @@ Browser=KakleBot
[KBeeBot/0.*]
Parent=General Crawlers
Browser=KBeeBot
-Stripper=true
isBanned=true
[Keyword Density/*]
@@ -1492,37 +1138,36 @@ Browser=Keyword Density
[LetsCrawl.com/1.0*]
Parent=General Crawlers
Browser=LetsCrawl.com
-Stripper=true
isBanned=true
[Lincoln State Web Browser]
Parent=General Crawlers
Browser=Lincoln State Web Browser
-Stripper=true
isBanned=true
[Links4US-Crawler,*]
Parent=General Crawlers
Browser=Links4US-Crawler
-Stripper=true
isBanned=true
[Lorkyll *.* -- lorkyll at 444.net]
Parent=General Crawlers
Browser=Lorkyll
-Stripper=true
isBanned=true
[Lsearch/sondeur]
Parent=General Crawlers
Browser=Lsearch/sondeur
-Stripper=true
+isBanned=true
+
+[LucidMedia ClickSense/4.?]
+Parent=General Crawlers
+Browser=LucidMedia-ClickSense
isBanned=true
[MapoftheInternet.com?(?http://MapoftheInternet.com)]
Parent=General Crawlers
Browser=MapoftheInternet
-Stripper=true
isBanned=true
[Marvin v0.3]
@@ -1543,6 +1188,16 @@ Version=0.01
MajorVer=0
MinorVer=01
+[metatagsdir/*]
+Parent=General Crawlers
+Browser=metatagsdir
+isBanned=true
+
+[Microsoft Windows Network Diagnostics]
+Parent=General Crawlers
+Browser=Microsoft Windows Network Diagnostics
+isBanned=true
+
[Miva (AlgoFeedback at miva.com)]
Parent=General Crawlers
Browser=Miva
@@ -1557,7 +1212,6 @@ Browser=Mozdex
[Mozilla Compatible (MS IE 3.01 WinNT)]
Parent=General Crawlers
-Stripper=true
isBanned=true
[Mozilla/* (compatible; WebCapture*)]
@@ -1568,10 +1222,13 @@ Browser=WebCapture
Parent=General Crawlers
Browser=DepSpid
+[Mozilla/4.0 (compatible; MSIE *; Windows NT *; SV1)]
+Parent=General Crawlers
+Browser=AVG
+
[Mozilla/4.0 (compatible; MSIE 4.01; Vonna.com b o t)]
Parent=General Crawlers
Browser=Vonna.com
-Stripper=true
isBanned=true
[Mozilla/4.0 (compatible; MSIE 4.01; Windows95)]
@@ -1592,42 +1249,85 @@ Browser=N-Stealth
[Mozilla/4.0 (compatible; Scumbot/*; Linux/*)]
Parent=General Crawlers
-Stripper=true
isBanned=true
[Mozilla/4.0 (compatible; Spider; Linux)]
Parent=General Crawlers
-Stripper=true
+isBanned=true
+
+[Mozilla/4.0 (compatible; Win32)]
+Parent=General Crawlers
+Browser=Unknown Crawler
isBanned=true
[Mozilla/4.1]
Parent=General Crawlers
-Stripper=true
isBanned=true
[Mozilla/4.5]
Parent=General Crawlers
-Stripper=true
+isBanned=true
+
+[Mozilla/5.0 (*http://gnomit.com/) Gecko/* Gnomit/1.0]
+Parent=General Crawlers
+Browser=Gnomit
isBanned=true
[Mozilla/5.0 (compatible; AboutUsBot/*)]
Parent=General Crawlers
Browser=AboutUsBot
+isBanned=true
[Mozilla/5.0 (compatible; BuzzRankingBot/*)]
Parent=General Crawlers
Browser=BuzzRankingBot
-Stripper=true
isBanned=true
+[Mozilla/5.0 (compatible; Diffbot/0.1; http://www.diffbot.com)]
+Parent=General Crawlers
+Browser=Diffbot
+
+[Mozilla/5.0 (compatible; FirstSearchBot/1.0; *)]
+Parent=General Crawlers
+Browser=FirstSearchBot
+
[mozilla/5.0 (compatible; genevabot http://www.healthdash.com)]
Parent=General Crawlers
Browser=Healthdash
+[Mozilla/5.0 (compatible; JadynAveBot; *http://www.jadynave.com/robot*]
+Parent=General Crawlers
+Browser=JadynAveBot
+isBanned=true
+
[Mozilla/5.0 (compatible; Kyluka crawl; http://www.kyluka.com/crawl.html; crawl at kyluka.com)]
Parent=General Crawlers
Browser=Kyluka
+[Mozilla/5.0 (compatible; MJ12bot/v1.2.*; http://www.majestic12.co.uk/bot.php*)]
+Parent=General Crawlers
+Browser=MJ12bot
+Version=1.2
+MajorVer=1
+MinorVer=2
+
+[Mozilla/5.0 (compatible; MSIE 7.0 ?http://www.europarchive.org)]
+Parent=General Crawlers
+Browser=Europe Web Archive
+
+[Mozilla/5.0 (compatible; Seznam screenshot-generator 2.0;*)]
+Parent=General Crawlers
+Browser=Seznam screenshot-generator
+isBanned=true
+
+[Mozilla/5.0 (compatible; Twingly Recon; http://www.twingly.com/)]
+Parent=General Crawlers
+Browser=Twingly Recon
+
+[Mozilla/5.0 (compatible; unwrapbot/2.*; http://www.unwrap.jp*)]
+Parent=General Crawlers
+Browser=UnWrap
+
[Mozilla/5.0 (compatible; Vermut*)]
Parent=General Crawlers
Browser=Vermut
@@ -1635,7 +1335,6 @@ Browser=Vermut
[Mozilla/5.0 (compatible; Webbot/*)]
Parent=General Crawlers
Browser=Webbot.ru
-Stripper=true
isBanned=true
[n4p_bot*]
@@ -1649,7 +1348,11 @@ Browser=Nabot
[NetCarta_WebMapper/*]
Parent=General Crawlers
Browser=NetCarta_WebMapper
-Stripper=true
+isBanned=true
+
+[NetID.com Bot*]
+Parent=General Crawlers
+Browser=NetID.com Bot
isBanned=true
[neTVision AG andreas.heidoetting at thomson-webcast.net]
@@ -1663,7 +1366,6 @@ Browser=NextopiaBOT
[nicebot]
Parent=General Crawlers
Browser=nicebot
-Stripper=true
isBanned=true
[niXXieBot?Foster*]
@@ -1673,13 +1375,16 @@ Browser=niXXiebot-Foster
[Nozilla/P.N (Just for IDS woring)]
Parent=General Crawlers
Browser=Nozilla/P.N
-Stripper=true
isBanned=true
[Nudelsalat/*]
Parent=General Crawlers
Browser=Nudelsalat
-Stripper=true
+isBanned=true
+
+[NV32ts]
+Parent=General Crawlers
+Browser=NV32ts
isBanned=true
[Ocelli/*]
@@ -1693,7 +1398,6 @@ Browser=OpenTaggerBot
[Oracle Enterprise Search]
Parent=General Crawlers
Browser=Oracle Enterprise Search
-Stripper=true
isBanned=true
[Oracle Ultra Search]
@@ -1703,19 +1407,26 @@ Browser=Oracle Ultra Search
[Pajaczek/*]
Parent=General Crawlers
Browser=Pajaczek
-Stripper=true
isBanned=true
[panscient.com]
Parent=General Crawlers
Browser=panscient.com
-Stripper=true
isBanned=true
[Patwebbot (http://www.herz-power.de/technik.html)]
Parent=General Crawlers
Browser=Patwebbot
+[PDFBot (crawler at pdfind.com)]
+Parent=General Crawlers
+Browser=PDFBot
+
+[Pete-Spider/1.*]
+Parent=General Crawlers
+Browser=Pete-Spider
+isBanned=true
+
[PhpDig/*]
Parent=General Crawlers
Browser=PhpDig
@@ -1723,13 +1434,17 @@ Browser=PhpDig
[PlantyNet_WebRobot*]
Parent=General Crawlers
Browser=PlantyNet
-Stripper=true
isBanned=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PluckIt
+
+[PluckItCrawler/1.0 (*)]
+Parent=General Crawlers
+isMobileDevice=true
+
[PMAFind]
Parent=General Crawlers
Browser=PMAFind
-Stripper=true
isBanned=true
[Poodle_predictor_1.0]
@@ -1739,25 +1454,26 @@ Browser=Poodle Predictor
[QuickFinder Crawler]
Parent=General Crawlers
Browser=QuickFinder
-Stripper=true
isBanned=true
[Radiation Retriever*]
Parent=General Crawlers
Browser=Radiation Retriever
-Stripper=true
isBanned=true
[RedCarpet/*]
Parent=General Crawlers
Browser=RedCarpet
-Stripper=true
isBanned=true
[RixBot (http://babelserver.org/rix)]
Parent=General Crawlers
Browser=RixBot
+[Rome Client (http://tinyurl.com/64t5n) Ver: 0.*]
+Parent=General Crawlers
+Browser=TinyURL
+
[SBIder/*]
Parent=General Crawlers
Browser=SiteSell
@@ -1765,7 +1481,6 @@ Browser=SiteSell
[ScollSpider/2.*]
Parent=General Crawlers
Browser=ScollSpider
-Stripper=true
isBanned=true
[Search Fst]
@@ -1775,13 +1490,11 @@ Browser=Search Fst
[searchbot admin at google.com]
Parent=General Crawlers
Browser=searchbot
-Stripper=true
isBanned=true
[Seeker.lookseek.com]
Parent=General Crawlers
Browser=LookSeek
-Stripper=true
isBanned=true
[semanticdiscovery/*]
@@ -1791,7 +1504,16 @@ Browser=Semantic Discovery
[SeznamBot/*]
Parent=General Crawlers
Browser=SeznamBot
-Stripper=true
+isBanned=true
+
+[Shelob (shelob at gmx.net)]
+Parent=General Crawlers
+Browser=Shelob
+isBanned=true
+
+[shelob v1.*]
+Parent=General Crawlers
+Browser=shelob
isBanned=true
[ShopWiki/1.0*]
@@ -1804,7 +1526,6 @@ MinorVer=0
[ShowXML/1.0 libwww/5.4.0]
Parent=General Crawlers
Browser=ShowXML
-Stripper=true
isBanned=true
[sitecheck.internetseer.com*]
@@ -1818,37 +1539,40 @@ Browser=SMBot
[sohu*]
Parent=General Crawlers
Browser=sohu-search
-Stripper=true
isBanned=true
[SpankBot*]
Parent=General Crawlers
Browser=SpankBot
-Stripper=true
isBanned=true
[spider (tspyyp at tom.com)]
Parent=General Crawlers
Browser=spider (tspyyp at tom.com)
-Stripper=true
isBanned=true
[Sunrise/0.*]
Parent=General Crawlers
Browser=Sunrise
-Stripper=true
+isBanned=true
+
+[Superpages URL Verification Engine]
+Parent=General Crawlers
+Browser=Superpages
+
+[Surf Knight]
+Parent=General Crawlers
+Browser=Surf Knight
isBanned=true
[SurveyBot/*]
Parent=General Crawlers
Browser=SurveyBot
-Stripper=true
isBanned=true
[SynapticSearch/AI Crawler 1.?]
Parent=General Crawlers
Browser=SynapticSearch
-Stripper=true
isBanned=true
[SyncMgr]
@@ -1862,7 +1586,6 @@ Browser=Tagyu
[Talkro Web-Shot/*]
Parent=General Crawlers
Browser=Talkro Web-Shot
-Stripper=true
isBanned=true
[Tecomi Bot (http://www.tecomi.com/bot.htm)]
@@ -1872,12 +1595,15 @@ Browser=Tecomi
[TheInformant*]
Parent=General Crawlers
Browser=TheInformant
-Stripper=true
+isBanned=true
+
+[Toata dragostea*]
+Parent=General Crawlers
+Browser=Toata dragostea
isBanned=true
[Tutorial Crawler*]
Parent=General Crawlers
-Stripper=true
isBanned=true
[UbiCrawler/*]
@@ -1890,13 +1616,20 @@ Browser=UCmore
[User*Agent:*]
Parent=General Crawlers
-Stripper=true
isBanned=true
+[USER_AGENT]
+Parent=General Crawlers
+Browser=USER_AGENT
+isBanned=true
+
+[VadixBot]
+Parent=General Crawlers
+Browser=VadixBot
+
[VengaBot/*]
Parent=General Crawlers
Browser=VengaBot
-Stripper=true
isBanned=true
[Visicom Toolbar]
@@ -1910,7 +1643,11 @@ Browser=W3C-WebCon
[Webclipping.com]
Parent=General Crawlers
Browser=Webclipping.com
-Stripper=true
+isBanned=true
+
+[webcollage/*]
+Parent=General Crawlers
+Browser=WebCollage
isBanned=true
[WebCrawler_1.*]
@@ -1932,7 +1669,6 @@ Browser=WebTrends
[West Wind Internet Protocols*]
Parent=General Crawlers
Browser=Versatel
-Stripper=true
isBanned=true
[WhizBang]
@@ -1946,7 +1682,6 @@ Browser=Willow Internet Crawler
[WIRE/* (Linux; i686; Bot,Robot,Spider,Crawler)]
Parent=General Crawlers
Browser=WIRE
-Stripper=true
isBanned=true
[www.fi crawler, contact crawler at www.fi]
@@ -1956,7 +1691,6 @@ Browser=www.fi crawler
[Xerka WebBot v1.*]
Parent=General Crawlers
Browser=Xerka
-Stripper=true
isBanned=true
[XML Sitemaps Generator*]
@@ -1966,19 +1700,21 @@ Browser=XML Sitemaps Generator
[XSpider*]
Parent=General Crawlers
Browser=XSpider
-Stripper=true
isBanned=true
[YooW!/* (?http://www.yoow.eu)]
Parent=General Crawlers
Browser=YooW!
-Stripper=true
+isBanned=true
+
+[HiddenMarket-*]
+Parent=General RSS
+Browser=HiddenMarket
isBanned=true
[FOTOCHECKER]
Parent=Image Crawlers
Browser=FOTOCHECKER
-Stripper=true
isBanned=true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Search Engines
@@ -1986,8 +1722,6 @@ isBanned=true
[Search Engines]
Parent=DefaultProperties
Browser=Search Engines
-Frames=true
-Tables=true
Crawler=true
[*FDSE robot*]
@@ -2045,10 +1779,30 @@ Browser=RawGrunt
Parent=Search Engines
Browser=Bit Torrent Search Engine
+[Busiversebot/v1.0 (http://www.busiverse.com/bot.php)]
+Parent=Search Engines
+Browser=Busiversebot
+isBanned=true
+
+[CatchBot/*; http://www.catchbot.com]
+Parent=Search Engines
+Browser=CatchBot
+Version=1.0
+MajorVer=1
+MinorVer=0
+
[CipinetBot (http://www.cipinet.com/bot.html)]
Parent=Search Engines
Browser=CipinetBot
+[Cogentbot/1.?*]
+Parent=Search Engines
+Browser=Cogentbot
+
+[compatible; Mozilla 4.0; MSIE 5.5; (SqwidgeBot v1.01 - http://www.sqwidge.com/bot/)]
+Parent=Search Engines
+Browser=SqwidgeBot
+
[cosmos*]
Parent=Search Engines
Browser=Xyleme
@@ -2061,6 +1815,14 @@ Browser=Deepindex
Parent=Search Engines
Browser=DiamondBot
+[Dumbot*]
+Parent=Search Engines
+Browser=Dumbot
+Version=0.2
+MajorVer=0
+MinorVer=2
+Beta=true
+
[Eule?Robot*]
Parent=Search Engines
Browser=Eule-Robot
@@ -2073,18 +1835,24 @@ Browser=Faxo
Parent=Search Engines
Browser=Filangy
+[flatlandbot/*]
+Parent=Search Engines
+Browser=Flatland
+
[Fooky.com/ScorpionBot/ScoutOut;*]
Parent=Search Engines
Browser=ScorpionBot
-Stripper=true
isBanned=true
[FyberSpider*]
Parent=Search Engines
Browser=FyberSpider
-Stripper=true
isBanned=true
+[Gaisbot/*]
+Parent=Search Engines
+Browser=Gaisbot
+
[gazz/*(gazz at nttr.co.jp)]
Parent=Search Engines
Browser=gazz
@@ -2108,13 +1876,16 @@ Browser=GroschoBot
[GurujiBot/1.*]
Parent=Search Engines
Browser=GurujiBot
-Stripper=true
isBanned=true
[HenryTheMiragoRobot*]
Parent=Search Engines
Browser=Mirago
+[HolmesBot (http://holmes.ge)]
+Parent=Search Engines
+Browser=HolmesBot
+
[Hotzonu/*]
Parent=Search Engines
Browser=Hotzonu
@@ -2122,13 +1893,16 @@ Browser=Hotzonu
[HyperEstraier/*]
Parent=Search Engines
Browser=HyperEstraier
-Stripper=true
isBanned=true
[i1searchbot/*]
Parent=Search Engines
Browser=i1searchbot
+[IIITBOT/1.*]
+Parent=Search Engines
+Browser=Indian Language Web Search Engine
+
[Iltrovatore-?etaccio/*]
Parent=Search Engines
Browser=Iltrovatore-Setaccio
@@ -2136,7 +1910,6 @@ Browser=Iltrovatore-Setaccio
[InfociousBot (?http://corp.infocious.com/tech_crawler.php)]
Parent=Search Engines
Browser=InfociousBot
-Stripper=true
isBanned=true
[Infoseek SideWinder/*]
@@ -2147,16 +1920,18 @@ Browser=Infoseek
Parent=Search Engines
Browser=iSEEKbot
+[Knight/0.? (Zook Knight; http://knight.zook.in/; knight at zook.in)]
+Parent=Search Engines
+Browser=Knight
+
[Kolinka Forum Search (www.kolinka.com)]
Parent=Search Engines
Browser=Kolinka Forum Search
-Stripper=true
isBanned=true
[KRetrieve/]
Parent=Search Engines
Browser=KRetrieve
-Stripper=true
isBanned=true
[LapozzBot/*]
@@ -2186,29 +1961,32 @@ MinorVer=0
Parent=Search Engines
Browser=miniRank
-[MJ12bot/*]
-Parent=Search Engines
-Browser=Majestic-12
-
[Mnogosearch*]
Parent=Search Engines
Browser=Mnogosearch
+[Mozilla/0.9* no dos :) (Linux)]
+Parent=Search Engines
+Browser=goliat
+isBanned=true
+
[Mozilla/4.0 (compatible; Arachmo)]
Parent=Search Engines
Browser=Arachmo
+[Mozilla/4.0 (compatible; http://search.thunderstone.com/texis/websearch/about.html)]
+Parent=Search Engines
+Browser=ThunderStone
+isBanned=true
+
[Mozilla/4.0 (compatible; MSIE *; Windows NT; Girafabot; girafabot at girafa dot com; http://www.girafa.com)]
Parent=Search Engines
Browser=Girafabot
Win32=true
-[Mozilla/4.0 (compatible; MSIE 5.00; Windows 98]
+[Mozilla/4.0 (compatible; Vagabondo/*; webcrawler at wise-guys dot nl; *)]
Parent=Search Engines
-Browser=directNIC
-Win32=true
-Stripper=true
-isBanned=true
+Browser=Vagabondo
[Mozilla/4.0(?compatible; MSIE 6.0; Qihoo *)]
Parent=Search Engines
@@ -2218,37 +1996,47 @@ Browser=Qihoo
Parent=Search Engines
Browser=Inxight Software
-[Mozilla/5.0 (*) VoilaBot BETA 1.*]
+[Mozilla/5.0 (*) VoilaBot*]
Parent=Search Engines
Browser=VoilaBot
-Stripper=true
isBanned=true
[Mozilla/5.0 (compatible; ActiveTouristBot*; http://www.activetourist.com)]
Parent=Search Engines
Browser=ActiveTouristBot
-[Mozilla/5.0 (compatible; Charlotte/1.0b; *)]
+[Mozilla/5.0 (compatible; Butterfly/1.0; *)*]
+Parent=Search Engines
+Browser=Butterfly
+
+[Mozilla/5.0 (compatible; Charlotte/*; *)]
Parent=Search Engines
Browser=Charlotte
Beta=true
-Stripper=true
isBanned=true
-[Mozilla/5.0 (compatible; CXL-FatAssANT (El Robeiro); http://www.conexcol.com/FatAssANT/; ANTid:alfa; v. 0.5.1)]
+[Mozilla/5.0 (compatible; CXL-FatAssANT*)]
Parent=Search Engines
-Browser=Conexcol.com
+Browser=FatAssANT
+
+[Mozilla/5.0 (compatible; DBLBot/1.0; ?http://www.dontbuylists.com/)]
+Parent=Search Engines
+Browser=DBLBot
+Version=1.0
+MajorVer=1
+MinorVer=0
[Mozilla/5.0 (compatible; EARTHCOM.info/*)]
Parent=Search Engines
Browser=EARTHCOM
-[Mozilla/5.0 (compatible; MojeekBot/2.0; http://www.mojeek.com/bot.html)]
+[Mozilla/5.0 (compatible; Lipperhey Spider; http://www.lipperhey.com/)]
+Parent=Search Engines
+Browser=Lipperhey Spider
+
+[Mozilla/5.0 (compatible; MojeekBot/*; http://www.mojeek.com/bot.html)]
Parent=Search Engines
Browser=MojeekBot
-Version=2.0
-MajorVer=2
-MinorVer=0
[Mozilla/5.0 (compatible; NLCrawler/*]
Parent=Search Engines
@@ -2257,23 +2045,54 @@ Browser=Northern Light Web Search
[Mozilla/5.0 (compatible; OsO;*]
Parent=Search Engines
Browser=Octopodus
-Stripper=true
isBanned=true
+[Mozilla/5.0 (compatible; Pogodak.*)]
+Parent=Search Engines
+Browser=Pogodak
+
+[Mozilla/5.0 (compatible; Quantcastbot/1.*)]
+Parent=Search Engines
+Browser=Quantcastbot
+
+[Mozilla/5.0 (compatible; ScoutJet; *http://www.scoutjet.com/)]
+Parent=Search Engines
+Browser=ScoutJet
+
[Mozilla/5.0 (compatible; Scrubby/*; http://www.scrubtheweb.com/abs/meta-check.html)]
Parent=Search Engines
Browser=Scrubby
-Stripper=true
+isBanned=true
+
+[Mozilla/5.0 (compatible; YoudaoBot/1.*; http://www.youdao.com/help/webmaster/spider/*)]
+Parent=Search Engines
+Browser=YoudaoBot
+Version=1.0
+MajorVer=1
+MinorVer=0
+
+[Mozilla/5.0 (Twiceler*)]
+Parent=Search Engines
+Browser=Twiceler
isBanned=true
[Mozilla/5.0 CostaCider Search*]
Parent=Search Engines
Browser=CostaCider Search
+[Mozilla/5.0 GurujiBot/1.0 (*)]
+Parent=Search Engines
+Browser=GurujiBot
+
[NavissoBot]
Parent=Search Engines
Browser=NavissoBot
+[NextGenSearchBot*(for information visit *)]
+Parent=Search Engines
+Browser=ZoomInfo
+isBanned=true
+
[Norbert the Spider(Burf.com)]
Parent=Search Engines
Browser=Norbert the Spider
@@ -2349,13 +2168,11 @@ Browser=Sproose
[Sqeobot/0.*]
Parent=Search Engines
Browser=Branzel
-Stripper=true
isBanned=true
[SquigglebotBot/*]
Parent=Search Engines
Browser=SquigglebotBot
-Stripper=true
isBanned=true
[StackRambler/*]
@@ -2377,13 +2194,11 @@ Browser=Szukacz
[Tarantula/*]
Parent=Search Engines
Browser=Tarantula
-Stripper=true
isBanned=true
[TerrawizBot/*]
Parent=Search Engines
Browser=TerrawizBot
-Stripper=true
isBanned=true
[Tkensaku/*]
@@ -2393,7 +2208,11 @@ Browser=Tkensaku
[TMCrawler]
Parent=Search Engines
Browser=TMCrawler
-Stripper=true
+isBanned=true
+
+[Twingly Recon]
+Parent=Search Engines
+Browser=Twingly Recon
isBanned=true
[updated/*]
@@ -2412,22 +2231,23 @@ Browser=Innerprise Enterprise Search
Parent=Search Engines
Browser=VMBot
+[voyager/2.0 (http://www.kosmix.com/html/crawler.html)]
+Parent=Search Engines
+Browser=Voyager
+
[wadaino.jp-crawler*]
Parent=Search Engines
Browser=wadaino.jp
-Stripper=true
isBanned=true
[WebAlta Crawler/*]
Parent=Search Engines
Browser=WebAlta Crawler
-Stripper=true
isBanned=true
[WebCorp/*]
Parent=Search Engines
Browser=WebCorp
-Stripper=true
isBanned=true
[webcrawl.net]
@@ -2437,7 +2257,6 @@ Browser=webcrawl.net
[WISEbot/*]
Parent=Search Engines
Browser=WISEbot
-Stripper=true
isBanned=true
[Wotbox/*]
@@ -2459,7 +2278,6 @@ Browser=YadowsCrawler
[YodaoBot/*]
Parent=Search Engines
Browser=YodaoBot
-Stripper=true
isBanned=true
[ZeBot_www.ze.bz*]
@@ -2482,35 +2300,17 @@ Browser=ATA-Translation-Service
Parent=Version Checkers
Browser=GJK_Browser_Check
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DYNAMIC
-
-[DYNAMIC]
-Parent=DefaultProperties
-Browser=DYNAMIC
-Stripper=true
-isBanned=true
-Crawler=true
-
-[DYNAMIC (*; http://www.dynamicplus.it; admin at dynamicplus.it)]
-Parent=DYNAMIC
-Browser=DYNAMIC+
-
-[Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; DYNAMIC*)]
-Parent=DYNAMIC
-Win32=true
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Hatena
[Hatena]
Parent=DefaultProperties
Browser=Hatena
-Stripper=true
isBanned=true
Crawler=true
-[Feed::Find/0.*]
+[Feed::Find/*]
Parent=Hatena
-Browser=Feed::Find
+Browser=Feed Find
isSyndicationReader=true
[Hatena Antenna/*]
@@ -2526,67 +2326,18 @@ Parent=Hatena
Browser=Hatena RSS
isSyndicationReader=true
-[HatenaScreenshot/* (checker)]
+[Hatena::Crawler/*]
+Parent=Hatena
+Browser=Hatena Crawler
+
+[HatenaScreenshot*]
Parent=Hatena
Browser=HatenaScreenshot
-[URI::Fetch/0.*]
+[URI::Fetch/*]
Parent=Hatena
Browser=URI::Fetch
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Hurricane Electric
-
-[Hurricane Electric]
-Parent=DefaultProperties
-Browser=Hurricane Electric
-Stripper=true
-isBanned=true
-Crawler=true
-
-[Gigabot*]
-Parent=Hurricane Electric
-
-[GigabotSiteSearch/*]
-Parent=Hurricane Electric
-Browser=GigabotSiteSearch
-
-[Jetbot/*]
-Parent=Hurricane Electric
-
-[Mozilla/4.04 (compatible; Dulance bot;*)]
-Parent=Hurricane Electric
-Browser=Dulance
-
-[OmniExplorer_Bot/*]
-Parent=Hurricane Electric
-Browser=OmniExplorer
-
-[plinki/0.1*]
-Parent=Hurricane Electric
-Browser=plinki
-
-[Twiceler www.cuill.com/robots.html]
-Parent=Hurricane Electric
-Browser=Twiceler
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; iaskspider
-
-[iaskspider]
-Parent=DefaultProperties
-Browser=iaskspider
-Stripper=true
-isBanned=true
-Crawler=true
-
-[iaskspider*]
-Parent=iaskspider
-Browser=iaskspider
-Stripper=true
-isBanned=true
-
-[Mozilla/5.0 (compatible; iaskspider/*; MSIE 6.0)]
-Parent=iaskspider
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Internet Archive
[Internet Archive]
@@ -2595,14 +2346,12 @@ Browser=Internet Archive
Frames=true
IFrames=true
Tables=true
-Stripper=true
isBanned=true
Crawler=true
[*heritrix*]
Parent=Internet Archive
-Browser=Wayback Machine
-Stripper=true
+Browser=Heritrix
isBanned=true
[ia_archiver*]
@@ -2613,57 +2362,19 @@ Browser=Internet Archive
Parent=Internet Archive
Browser=InternetArchive
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Marty Anstey
-
-[Marty Anstey]
-Parent=DefaultProperties
-Browser=Marty Anstey
-Stripper=true
-isBanned=true
-Crawler=true
-
-[Helix/1.2 (?http://www.sitesearch.ca/helix/)]
-Parent=Marty Anstey
-
-[Mozilla/2.0 (compatible; DC9FE0029G; FreeBSD 5.4-RELEASE; i386; en_US)]
-Parent=Marty Anstey
-
-[Reaper/* (?http://www.sitesearch.ca/reaper)]
-Parent=Marty Anstey
-Browser=Reaper
-
-[Vortex/2.2*]
-Parent=Marty Anstey
-Browser=Vortex
-Stripper=true
-isBanned=true
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Microsoft_Internet_Explorer
-
-[Microsoft_Internet_Explorer]
-Parent=DefaultProperties
-Browser=Microsoft_Internet_Explorer
-Stripper=true
-isBanned=true
-Crawler=true
-
-[Microsoft_Internet_Explorer_5.00.*]
-Parent=Microsoft_Internet_Explorer
-Stripper=true
-isBanned=true
+[Mozilla/5.0 (compatible; archive.org_bot/1.*)]
+Parent=Internet Archive
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Nutch
[Nutch]
Parent=DefaultProperties
Browser=Nutch
-Stripper=true
isBanned=true
Crawler=true
[*Nutch*]
Parent=Nutch
-Stripper=true
isBanned=true
[CazoodleBot/*]
@@ -2674,46 +2385,55 @@ Browser=CazoodleBot
Parent=Nutch
Browser=LOOQ
+[Nutch/0.? (OpenX Spider)]
+Parent=Nutch
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Webaroo
[Webaroo]
Parent=DefaultProperties
Browser=Webaroo
-Stripper=true
-isBanned=true
-Crawler=true
-
-[PiyushBot (Piyush Web Miner;*)]
-Parent=Webaroo
-Browser=PiyushBot
-[RufusBot (Rufus Web Miner;*)]
+[Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Webaroo/*)]
Parent=Webaroo
-Browser=RufusBot
-
-[SumeetBot (Sumeet Bot; *)]
-Parent=Webaroo
-Browser=SumeetBot
+Browser=Webaroo
-[WebarooBot (Webaroo Bot;*)]
+[Mozilla/5.0 (Windows; U; Windows *; *; rv:*) Gecko/* Firefox/* webaroo/*]
Parent=Webaroo
-Browser=WebarooBot
+Browser=Webaroo
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WebCollage
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Word Press
-[WebCollage]
+[Word Press]
Parent=DefaultProperties
-Browser=WebCollage
-Stripper=true
+Browser=Word Press
+Alpha=true
+Beta=true
+Win16=true
+Win32=true
+Win64=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+BackgroundSounds=true
+CDF=true
+VBScript=true
+JavaApplets=true
+JavaScript=true
+ActiveXControls=true
isBanned=true
+isMobileDevice=true
+isSyndicationReader=true
Crawler=true
-[mywebcollage/*]
-Parent=WebCollage
+[WordPress-B-/2.*]
+Parent=Word Press
+Browser=WordPress-B
-[webcollage*/*]
-Parent=WebCollage
-Browser=WebCollage
+[WordPress-Do-P-/2.*]
+Parent=Word Press
+Browser=WordPress-Do-P
[BlueCoat ProxySG]
Parent=Blue Coat Systems
@@ -2740,7 +2460,6 @@ Browser=Bluecoat
[Copyright/Plagiarism]
Parent=DefaultProperties
Browser=Copyright/Plagiarism
-Stripper=true
isBanned=true
Crawler=true
@@ -2748,6 +2467,10 @@ Crawler=true
Parent=Copyright/Plagiarism
Browser=BDFetch
+[copyright sheriff (*)]
+Parent=Copyright/Plagiarism
+Browser=copyright sheriff
+
[CopyRightCheck*]
Parent=Copyright/Plagiarism
Browser=CopyRightCheck
@@ -2756,10 +2479,22 @@ Browser=CopyRightCheck
Parent=Copyright/Plagiarism
Browser=FairAd Client
+[iCopyright Conductor*]
+Parent=Copyright/Plagiarism
+Browser=iCopyright Conductor
+
[IPiumBot laurion(dot)com]
Parent=Copyright/Plagiarism
Browser=IPiumBot
+[IWAgent/*]
+Parent=Copyright/Plagiarism
+Browser=Brand Protect
+
+[Mozilla/5.0 (compatible; DKIMRepBot/*)]
+Parent=Copyright/Plagiarism
+Browser=DKIMRepBot
+
[oBot]
Parent=Copyright/Plagiarism
Browser=oBot
@@ -2791,10 +2526,6 @@ Browser=Domain Dossier
Parent=DNS Tools
Browser=DNS-Digger
-[Mozilla/5.0 (compatible; DNS-Digger/*)]
-Parent=DNS Tools
-Browser=DNS-Digger
-
[OpenDNS Domain Crawler noc at opendns.com]
Parent=DNS Tools
Browser=OpenDNS Domain Crawler
@@ -2807,10 +2538,13 @@ Browser=Download Managers
Frames=true
IFrames=true
Tables=true
-Stripper=true
isBanned=true
Crawler=true
+[AndroidDownloadManager]
+Parent=Download Managers
+Browser=Android Download Manager
+
[AutoMate5]
Parent=Download Managers
Browser=AutoMate5
@@ -3031,7 +2765,6 @@ Browser=E-Mail Harvesters
Frames=true
IFrames=true
Tables=true
-Stripper=true
isBanned=true
Crawler=true
@@ -3143,6 +2876,10 @@ Browser=Bloglines Title Fetch
Parent=Feeds Blogs
Browser=BlogLines Web
+[BlogPulseLive (support at blogpulse.com)]
+Parent=Feeds Blogs
+Browser=BlogPulseLive
+
[blogsearchbot-pumpkin-2]
Parent=Feeds Blogs
Browser=blogsearchbot-pumpkin
@@ -3189,6 +2926,15 @@ Parent=Feeds Syndicators
Parent=Feeds Syndicators
Browser=NetVisualize
+[AideRSS 2.* (postrank.com)]
+Parent=Feeds Syndicators
+Browser=AideRSS
+
+[AideRSS/2.0 (aiderss.com)]
+Parent=Feeds Syndicators
+Browser=AideRSS
+isBanned=true
+
[Akregator/*]
Parent=Feeds Syndicators
Browser=Akregator
@@ -3201,13 +2947,16 @@ Platform=MacOSX
[Cocoal.icio.us/* (*)*]
Parent=Feeds Syndicators
Browser=Cocoal.icio.us
-Stripper=true
isBanned=true
[Feed43 Proxy/* (*)]
Parent=Feeds Syndicators
Browser=Feed For Free
+[FeedBurner/*]
+Parent=Feeds Syndicators
+Browser=FeedBurner
+
[FeedDemon/* (*)]
Parent=Feeds Syndicators
Browser=FeedDemon
@@ -3217,6 +2966,20 @@ Platform=Win32
Parent=Feeds Syndicators
Browser=FeedDigest
+[FeedGhost/1.*]
+Parent=Feeds Syndicators
+Browser=FeedGhost
+Version=1.0
+MajorVer=1
+MinorVer=0
+
+[FeedOnFeeds/0.1.* ( http://minutillo.com/steve/feedonfeeds/)]
+Parent=Feeds Syndicators
+Browser=FeedOnFeeds
+Version=0.1
+MajorVer=0
+MinorVer=1
+
[Feedreader * (Powered by Newsbrain)]
Parent=Feeds Syndicators
Browser=Newsbrain
@@ -3225,6 +2988,10 @@ Browser=Newsbrain
Parent=Feeds Syndicators
Browser=Feedshow
+[Feedster Crawler/?.0; Feedster, Inc.]
+Parent=Feeds Syndicators
+Browser=Feedster
+
[GreatNews/1.0]
Parent=Feeds Syndicators
Browser=GreatNews
@@ -3243,13 +3010,29 @@ Browser=intraVnews
[JetBrains Omea Reader*]
Parent=Feeds Syndicators
Browser=Omea Reader
-Stripper=true
isBanned=true
+[Liferea/1.5* (Linux; *; http://liferea.sf.net/)]
+Parent=Feeds Syndicators
+Browser=Liferea
+isBanned=true
+
+[livedoor FeedFetcher/0.0* (http://reader.livedoor.com/;*)]
+Parent=Feeds Syndicators
+Browser=FeedFetcher
+Version=0.0
+MajorVer=0
+MinorVer=0
+
[MagpieRSS/* (*)]
Parent=Feeds Syndicators
Browser=MagpieRSS
+[Mobitype * (compatible; Mozilla/*; MSIE *.*; Windows *)]
+Parent=Feeds Syndicators
+Browser=Mobitype
+Platform=Win32
+
[Mozilla/5.0 (*; Rojo *; http://www.rojo.com/corporate/help/agg; *)*]
Parent=Feeds Syndicators
Browser=Rojo
@@ -3262,14 +3045,18 @@ Browser=TailRank
Parent=Feeds Syndicators
Browser=Podtech Network
-[Mozilla/5.0 (compatible; newstin.com;*)]
-Parent=Feeds Syndicators
-Browser=NewsTin
-
[Mozilla/5.0 (compatible; Newz Crawler *; http://www.newzcrawler.com/?)]
Parent=Feeds Syndicators
Browser=Newz Crawler
+[Mozilla/5.0 (compatible; RSSMicro.com RSS/Atom Feed Robot)]
+Parent=Feeds Syndicators
+Browser=RSSMicro
+
+[Mozilla/5.0 (compatible;*newstin.com;*)]
+Parent=Feeds Syndicators
+Browser=NewsTin
+
[Mozilla/5.0 (RSS Reader Panel)]
Parent=Feeds Syndicators
Browser=RSS Reader Panel
@@ -3286,10 +3073,6 @@ Browser=NewsMonster
Parent=Feeds Syndicators
Browser=Rojo
-[Mozilla/6.0 (MSIE 6.0; *RSSMicro.com RSS/Atom Feed Robot)]
-Parent=Feeds Syndicators
-Browser=RSS Micro
-
[Netvibes (*)]
Parent=Feeds Syndicators
Browser=Netvibes
@@ -3302,6 +3085,10 @@ Browser=NewsAlloy
Parent=Feeds Syndicators
Browser=Omnipelagos
+[Particls]
+Parent=Feeds Syndicators
+Browser=Particls
+
[Protopage/* (*)]
Parent=Feeds Syndicators
Browser=Protopage
@@ -3310,6 +3097,10 @@ Browser=Protopage
Parent=Feeds Syndicators
Browser=PubSub-RSS-Reader
+[RSS Menu/*]
+Parent=Feeds Syndicators
+Browser=RSS Menu
+
[RssBandit/*]
Parent=Feeds Syndicators
Browser=RssBandit
@@ -3332,13 +3123,20 @@ Browser=SimplePie
[Strategic Board Bot (?http://www.strategicboard.com)]
Parent=Feeds Syndicators
Browser=Strategic Board Bot
-Stripper=true
isBanned=true
[TargetYourNews.com bot]
Parent=Feeds Syndicators
Browser=TargetYourNews
+[Technoratibot/*]
+Parent=Feeds Syndicators
+Browser=Technoratibot
+
+[Tumblr/* RSS syndication ( http://www.tumblr.com/) (support at tumblr.com)]
+Parent=Feeds Syndicators
+Browser=Tumblr RSS syndication
+
[Windows-RSS-Platform/1.0*]
Parent=Feeds Syndicators
Browser=Windows-RSS-Platform
@@ -3356,11 +3154,46 @@ Browser=Wizz
[General RSS]
Parent=DefaultProperties
Browser=General RSS
+isSyndicationReader=true
+
+[AideRSS/1.0 (aiderss.com); * subscribers]
+Parent=General RSS
+Browser=AideRSS
+Version=1.0
+MajorVer=1
+MinorVer=0
+
+[CC Metadata Scaper http://wiki.creativecommons.org/Metadata_Scraper]
+Parent=General RSS
+Browser=CC Metadata Scaper
[Mozilla/5.0 (compatible) GM RSS Panel]
Parent=General RSS
Browser=RSS Panel
+[Mozilla/5.0 http://www.inclue.com; graeme at inclue.com]
+Parent=General RSS
+Browser=Inclue
+
+[Runnk online rss reader : http://www.runnk.com/ : RSS favorites : RSS ranking : RSS aggregator*]
+Parent=General RSS
+Browser=Ruunk
+
+[Windows-RSS-Platform/2.0 (MSIE 8.0; Windows NT 6.0)]
+Parent=General RSS
+Browser=Windows-RSS-Platform
+Platform=WinVista
+
+[Mozilla/5.0 (X11; ?; Linux; *) AppleWebKit/* (KHTML, like Gecko, Safari/*) Arora/0.4]
+Parent=Google Code
+Browser=Arora
+Version=0.4
+MajorVer=0
+MinorVer=4
+Platform=Linux
+CssVersion=2
+supportsCSS=true
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Validation Checkers
[HTML Validators]
@@ -3398,7 +3231,7 @@ Browser=W3C Validator
Parent=HTML Validators
Browser=W3C Line Mode
-[Weblide/2.0 beta8*]
+[Weblide/2.? beta*]
Parent=HTML Validators
Browser=Weblide
Version=2.0
@@ -3421,10 +3254,13 @@ Browser=Image Crawlers
Frames=true
IFrames=true
Tables=true
-Stripper=true
isBanned=true
Crawler=true
+[*CFNetwork*]
+Parent=Image Crawlers
+Browser=CFNetwork
+
[*PhotoStickies/*]
Parent=Image Crawlers
Browser=PhotoStickies
@@ -3433,6 +3269,11 @@ Browser=PhotoStickies
Parent=Image Crawlers
Browser=Camcrawler
+[CydralSpider/*]
+Parent=Image Crawlers
+Browser=Cydral Web Image Search
+isBanned=true
+
[Der gro\xdfe BilderSauger*]
Parent=Image Crawlers
Browser=Gallery Grabber
@@ -3453,10 +3294,18 @@ Browser=HTML2JPG
Parent=Image Crawlers
Browser=IconSurf
+[kalooga/KaloogaBot*]
+Parent=Image Crawlers
+Browser=KaloogaBot
+
[Mister PIX*]
Parent=Image Crawlers
Browser=Mister PIX
+[Mozilla/5.0 (Macintosh; U; *Mac OS X; *) AppleWebKit/* (*) Pandora/2.*]
+Parent=Image Crawlers
+Browser=Pandora
+
[naoFavicon4IE*]
Parent=Image Crawlers
Browser=naoFavicon4IE
@@ -3465,10 +3314,6 @@ Browser=naoFavicon4IE
Parent=Image Crawlers
Browser=pixfinder
-[psbot/*]
-Parent=Image Crawlers
-Browser=PSBot
-
[rssImagesBot/0.1 (*http://herbert.groot.jebbink.nl/?app=rssImages)]
Parent=Image Crawlers
Browser=rssImagesBot
@@ -3477,6 +3322,10 @@ Browser=rssImagesBot
Parent=Image Crawlers
Browser=Web Image Collector
+[WebImages * (?http://herbert.groot.jebbink.nl/?app=WebImages?)]
+Parent=Image Crawlers
+Browser=WebImages
+
[WebPix*]
Parent=Image Crawlers
Browser=Custo
@@ -3522,7 +3371,6 @@ Browser=Web Link Validator
[*Zeus*]
Parent=Link Checkers
Browser=Zeus
-Stripper=true
isBanned=true
[ActiveBookmark *]
@@ -3604,7 +3452,6 @@ Browser=JRTwine
[Link Valet Online*]
Parent=Link Checkers
Browser=Link Valet
-Stripper=true
isBanned=true
[LinkAlarm/*]
@@ -3622,7 +3469,6 @@ Browser=LinkChecker
[LinkextractorPro*]
Parent=Link Checkers
Browser=LinkextractorPro
-Stripper=true
isBanned=true
[LinkLint-checkonly/*]
@@ -3648,7 +3494,6 @@ Browser=MetaGer-LinkChecker
[Mozilla/* (compatible; linktiger/*; *http://www.linktiger.com*)]
Parent=Link Checkers
Browser=LinkTiger
-Stripper=true
isBanned=true
[Mozilla/4.0 (Compatible); URLBase*]
@@ -3672,6 +3517,10 @@ MajorVer=3
MinorVer=0
Platform=Win32
+[Mozilla/4.0 (compatible; smartBot/1.*; checking links; *)]
+Parent=Link Checkers
+Browser=smartBot
+
[Mozilla/4.0 (compatible; SuperCleaner*;*)]
Parent=Link Checkers
Browser=SuperCleaner
@@ -3679,7 +3528,6 @@ Browser=SuperCleaner
[Mozilla/5.0 gURLChecker/*]
Parent=Link Checkers
Browser=gURLChecker
-Stripper=true
isBanned=true
[Newsgroupreporter LinkCheck]
@@ -3693,7 +3541,6 @@ Browser=onCHECK Linkchecker
[online link validator (http://www.dead-links.com/)]
Parent=Link Checkers
Browser=Dead-Links.com
-Stripper=true
isBanned=true
[REL Link Checker*]
@@ -3711,14 +3558,12 @@ Browser=Robozilla
[RPT-HTTPClient/*]
Parent=Link Checkers
Browser=RPT-HTTPClient
-Stripper=true
isBanned=true
[SafariBookmarkChecker*(?http://www.coriolis.ch/)]
Parent=Link Checkers
Browser=SafariBookmarkChecker
Platform=MacOSX
-CSS=2
CssVersion=2
supportsCSS=true
@@ -3752,7 +3597,6 @@ Browser=WorQmada
[Xenu* Link Sleuth*]
Parent=Link Checkers
Browser=Xenu's Link Sleuth
-Stripper=true
isBanned=true
[Z-Add Link Checker*]
@@ -3764,13 +3608,11 @@ Browser=Z-Add Link Checker
[Microsoft]
Parent=DefaultProperties
Browser=Microsoft
-Stripper=true
isBanned=true
[Live (http://www.live.com/)]
Parent=Microsoft
Browser=Microsoft Live
-Stripper=false
isBanned=false
isSyndicationReader=true
@@ -3826,10 +3668,17 @@ Browser=Microsoft Visio
Parent=Microsoft
Browser=Microsoft-WebDAV
+[Mozilla/5.0 (Macintosh; Intel Mac OS X) Excel/12.*]
+Parent=Microsoft
+Browser=Microsoft Excel
+Version=12.0
+MajorVer=12
+MinorVer=0
+Platform=MacOSX
+
[MSN Feed Manager]
Parent=Microsoft
Browser=MSN Feed Manager
-Stripper=false
isBanned=false
isSyndicationReader=true
@@ -3855,6 +3704,11 @@ Platform=Amiga
Parent=Miscellaneous Browsers
Browser=Avant Browser
+[12345]
+Parent=Miscellaneous Browsers
+Browser=12345
+isBanned=true
+
[Ace Explorer]
Parent=Miscellaneous Browsers
Browser=Ace Explorer
@@ -3863,6 +3717,19 @@ Browser=Ace Explorer
Parent=Miscellaneous Browsers
Browser=Enigma Browser
+[EVE-minibrowser/*]
+Parent=Miscellaneous Browsers
+Browser=EVE-minibrowser
+IFrames=false
+Tables=false
+BackgroundSounds=false
+VBScript=false
+JavaApplets=false
+JavaScript=false
+ActiveXControls=false
+isBanned=false
+Crawler=false
+
[Godzilla/* (Basic*; *; Commodore C=64; *; rv:1.*)*]
Parent=Miscellaneous Browsers
Browser=Godzilla
@@ -3879,7 +3746,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -3890,10 +3756,13 @@ Platform=WyderOS
IFrames=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
+[Mozilla/* (*) - BrowseX (*)]
+Parent=Miscellaneous Browsers
+Browser=BrowseX
+
[Mozilla/* (Win32;*Escape?*; ?)]
Parent=Miscellaneous Browsers
Browser=Escape
@@ -3926,10 +3795,6 @@ MinorVer=1
Parent=Miscellaneous Browsers
Browser=Wipeout Pure
-[Sleipnir*]
-Parent=Miscellaneous Browsers
-Browser=Sleipnir
-
[SlimBrowser]
Parent=Miscellaneous Browsers
Browser=SlimBrowser
@@ -3941,10 +3806,14 @@ Version=1.69
MajorVer=1
MinorVer=69
Platform=Win16
-CSS=3
CssVersion=3
supportsCSS=true
+[*Netcraft Webserver Survey*]
+Parent=Netcraft
+Browser=Netcraft Webserver Survey
+isBanned=true
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Offline Browsers
[Offline Browsers]
@@ -3953,7 +3822,6 @@ Browser=Offline Browsers
Frames=true
Tables=true
Cookies=true
-Stripper=true
isBanned=true
Crawler=true
@@ -3994,9 +3862,13 @@ Browser=Teleport
[Online Scanners]
Parent=DefaultProperties
Browser=Online Scanners
-Stripper=true
isBanned=true
+[JoeDog/* (X11; I; Siege *)]
+Parent=Online Scanners
+Browser=JoeDog
+isBanned=false
+
[Morfeus Fucking Scanner]
Parent=Online Scanners
Browser=Morfeus Fucking Scanner
@@ -4018,7 +3890,6 @@ Browser=Secure Computing Corporation
[Proxy Servers]
Parent=DefaultProperties
Browser=Proxy Servers
-Stripper=true
isBanned=true
[*squid*]
@@ -4068,7 +3939,6 @@ Browser=SaferSurf
[Mozilla/5.0 (compatible; del.icio.us-thumbnails/*; *) KHTML/* (like Gecko)]
Parent=Proxy Servers
Browser=Yahoo!
-Stripper=true
isBanned=true
Crawler=true
@@ -4087,7 +3957,6 @@ Browser=Privoxy
[ProxyTester*]
Parent=Proxy Servers
Browser=ProxyTester
-Stripper=true
isBanned=true
Crawler=true
@@ -4095,6 +3964,10 @@ Crawler=true
Parent=Proxy Servers
Browser=SilentSurf
+[SmallProxy*]
+Parent=Proxy Servers
+Browser=SmallProxy
+
[Space*Bison/*]
Parent=Proxy Servers
Browser=Proxomitron
@@ -4112,7 +3985,6 @@ Browser=SurfControl
[Research Projects]
Parent=DefaultProperties
Browser=Research Projects
-Stripper=true
isBanned=true
Crawler=true
@@ -4176,6 +4048,10 @@ MinorVer=0
Parent=Research Projects
Browser=Theophrastus
+[Mozilla/5.0 (compatible; Webscan v0.*; http://otc.dyndns.org/webscan/)]
+Parent=Research Projects
+Browser=Webscan
+
[MQbot*]
Parent=Research Projects
Browser=MQbot
@@ -4212,6 +4088,10 @@ Browser=UofTDB Experiment
Parent=Research Projects
Browser=USyd-NLP-Spider
+[woriobot*]
+Parent=Research Projects
+Browser=woriobot
+
[wwwster/* (Beta, mailto:gue at cis.uni-muenchen.de)]
Parent=Research Projects
Browser=wwwster
@@ -4233,13 +4113,12 @@ Browser=Rippers
Frames=true
IFrames=true
Tables=true
-Stripper=true
isBanned=true
Crawler=true
-[*grub-client*]
+[*grub*]
Parent=Rippers
-Browser=grub-client
+Browser=grub
[*ickHTTP*]
Parent=Rippers
@@ -4398,6 +4277,14 @@ Parent=Rippers
Parent=Rippers
Browser=httperf
+[HTTPFetch/*]
+Parent=Rippers
+Browser=HTTPFetch
+
+[HTTPGrab]
+Parent=Rippers
+Browser=HTTPGrab
+
[HttpSession]
Parent=Rippers
Browser=HttpSession
@@ -4529,6 +4416,10 @@ Browser=OSSProxy
Parent=Rippers
Browser=PageLoad
+[PageNest/*]
+Parent=Rippers
+Browser=PageNest
+
[pavuk/*]
Parent=Rippers
Browser=Pavuk
@@ -4725,13 +4616,16 @@ Browser=WinScripter iNet Tools
Parent=Rippers
Browser=WWW-Mechanize
+[Zend_Http_Client]
+Parent=Rippers
+Browser=Zend_Http_Client
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Site Monitors
[Site Monitors]
Parent=DefaultProperties
Browser=Site Monitors
Cookies=true
-Stripper=true
isBanned=true
Crawler=true
@@ -4742,19 +4636,6 @@ Browser=EasyRider
[*maxamine.com--robot*]
Parent=Site Monitors
Browser=maxamine.com--robot
-Stripper=true
-isBanned=true
-
-[*Netcraft Web Server Survey*]
-Parent=Site Monitors
-Browser=Netcraft
-Stripper=true
-isBanned=true
-
-[*Netcraft Webserver Survey*]
-Parent=Site Monitors
-Browser=Netcraft Webserver Survey
-Stripper=true
isBanned=true
[*WebMon ?.*]
@@ -4768,7 +4649,6 @@ Browser=Kenjin Spider
[Kevin http://*]
Parent=Site Monitors
Browser=Kevin
-Stripper=true
isBanned=true
[Mozilla/4.0 (compatible; ChangeDetection/*]
@@ -4798,7 +4678,6 @@ Browser=Pingdom
[Site Valet Online*]
Parent=Site Monitors
Browser=Site Valet
-Stripper=true
isBanned=true
[SITECHECKER]
@@ -4808,7 +4687,6 @@ Browser=SITECHECKER
[sitemonitor at dnsvr.com/*]
Parent=Site Monitors
Browser=ZoneEdit Failover Monitor
-Stripper=false
isBanned=false
[UpTime Checker*]
@@ -4855,10 +4733,22 @@ Tables=true
Cookies=true
JavaScript=true
+[BookmarkBase(2/;http://bookmarkbase.com)]
+Parent=Social Bookmarkers
+Browser=BookmarkBase
+
[Cocoal.icio.us/1.0 (v43) (Mac OS X; http://www.scifihifi.com/cocoalicious)]
Parent=Social Bookmarkers
Browser=Cocoalicious
+[Mozilla/5.0 (compatible; FriendFeedBot/0.*; Http://friendfeed.com/about/bot)]
+Parent=Social Bookmarkers
+Browser=FriendFeedBot
+
+[Twitturly*]
+Parent=Social Bookmarkers
+Browser=Twitturly
+
[WinkBot/*]
Parent=Social Bookmarkers
Browser=WinkBot
@@ -4931,12 +4821,24 @@ Parent=Version Checkers
Parent=Version Checkers
Browser=Code Sample Web Client
+[Desktop Sidebar*]
+Parent=Version Checkers
+Browser=Desktop Sidebar
+isBanned=true
+
[Mono Browser Capabilities Updater*]
Parent=Version Checkers
Browser=Mono Browser Capabilities Updater
-Stripper=true
isBanned=true
+[Rewmi/*]
+Parent=Version Checkers
+isBanned=true
+
+[Subtext Version 1.9* - http://subtextproject.com/ (Microsoft Windows NT 5.2.*)]
+Parent=Version Checkers
+Browser=Subtext
+
[TherapeuticResearch]
Parent=Version Checkers
Browser=TherapeuticResearch
@@ -4953,21 +4855,105 @@ Browser=clarkson.edu
Parent=Version Checkers
Browser=Substância
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Become
+
+[Become]
+Parent=DefaultProperties
+Browser=Become
+Frames=true
+Tables=true
+isSyndicationReader=true
+Crawler=true
+
+[*BecomeBot/*]
+Parent=Become
+Browser=BecomeBot
+
+[*BecomeBot at exava.com*]
+Parent=Become
+Browser=BecomeBot
+
+[*Exabot at exava.com*]
+Parent=Become
+Browser=Exabot
+
+[MonkeyCrawl/*]
+Parent=Become
+Browser=MonkeyCrawl
+
+[Mozilla/5.0 (compatible; BecomeJPBot/2.3; *)]
+Parent=Become
+Browser=BecomeJPBot
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Blue Coat Systems
[Blue Coat Systems]
Parent=DefaultProperties
Browser=Blue Coat Systems
-Stripper=true
isBanned=true
Crawler=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Browscap Abusers
+
+[Browscap Abusers]
+Parent=DefaultProperties
+Browser=Browscap Abusers
+isBanned=true
+
+[Apple-PubSub/*]
+Parent=Browscap Abusers
+Browser=Apple-PubSub
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; FeedHub
+
+[FeedHub]
+Parent=DefaultProperties
+Browser=FeedHub
+isSyndicationReader=true
+
+[FeedHub FeedDiscovery/1.0 (http://www.feedhub.com)]
+Parent=FeedHub
+Browser=FeedHub FeedDiscovery
+Version=1.0
+MajorVer=1
+MinorVer=0
+
+[FeedHub FeedFetcher/1.0 (http://www.feedhub.com)]
+Parent=FeedHub
+Browser=FeedHub FeedFetcher
+Version=1.0
+MajorVer=1
+MinorVer=0
+
+[FeedHub MetaDataFetcher/1.0 (http://www.feedhub.com)]
+Parent=FeedHub
+Browser=FeedHub MetaDataFetcher
+Version=1.0
+MajorVer=1
+MinorVer=0
+
+[Internet Content Rating Association]
+Parent=DefaultProperties
+Browser=
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+Crawler=true
+
+[ICRA_label_generator/1.?]
+Parent=Internet Content Rating Association
+Browser=ICRA_label_generator
+
+[ICRA_Semantic_spider/0.?]
+Parent=Internet Content Rating Association
+Browser=ICRA_Semantic_spider
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NameProtect
[NameProtect]
Parent=DefaultProperties
Browser=NameProtect
-Stripper=true
isBanned=true
Crawler=true
@@ -4983,6 +4969,23 @@ Browser=NameProtect
Parent=NameProtect
Browser=NameProtect
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Netcraft
+
+[Netcraft]
+Parent=DefaultProperties
+Browser=Netcraft
+isBanned=true
+Crawler=true
+
+[*Netcraft Web Server Survey*]
+Parent=Netcraft
+Browser=Netcraft Webserver Survey
+isBanned=true
+
+[Mozilla/5.0 (compatible; NetcraftSurveyAgent/1.0; info at netcraft.com)]
+Parent=Netcraft
+Browser=NetcraftSurveyAgent
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NewsGator
[NewsGator]
@@ -5010,956 +5013,441 @@ Browser=NewsGator FetchLinks
[NewsGator/*]
Parent=NewsGator
Browser=NewsGator
-Stripper=true
isBanned=true
[NewsGatorOnline/*]
Parent=NewsGator
Browser=NewsGatorOnline
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; The Planet's Vulnerability Scanning
-
-[The Planet]
-Parent=DefaultProperties
-Browser=The Planet's Vulnerability Scanning
-
-[*; system(id);*]
-Parent=The Planet
-
-[Fastream NETFile Server]
-Parent=The Planet
-
-[mercuryboard_user_agent_sql_injection.nasl*]
-Parent=The Planet
-
-[Mozilla/4.0 (compatible; gallery_203.nasl; Googlebot)]
-Parent=The Planet
-
-[Mozilla/4.75 * (X11, U]
-Parent=The Planet
-
-[Mozilla/7 * (X11; U; Linux 2.6.1 ia64)]
-Parent=The Planet
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Chrome 0.2
-[NESSUS::SOAP]
-Parent=The Planet
-Browser=NESSUS::SOAP
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Jakarta Project
-
-[Jakarta Project]
-Parent=DefaultProperties
-Browser=Jakarta Project
-Platform=JAVA
-Stripper=true
-isBanned=true
-Crawler=true
-
-[Jakarta Commons-HttpClient/*]
-Parent=Jakarta Project
-Browser=Jakarta Commons-HttpClient
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Media Players
-
-[Media Players]
+[Chrome 0.2]
Parent=DefaultProperties
-Browser=Media Players
-Cookies=true
-
-[iTunes/* (Windows; ?)]
-Parent=Media Players
-Browser=iTunes
-Platform=Win32
+Browser=Chrome
+Version=0.2
+MinorVer=2
+Beta=true
Win32=true
-
-[Microsoft NetShow(TM) Player with RealVideo(R)]
-Parent=Media Players
-Browser=Microsoft NetShow
-
-[Mozilla/5.0 (Macintosh; U; PPC Mac OS X; *) AppleWebKit/* RealPlayer]
-Parent=Media Players
-Browser=RealPlayer
-Platform=MacOSX
-
-[MPlayer 0.9*]
-Parent=Media Players
-Browser=MPlayer
-Version=0.9
-MajorVer=0
-MinorVer=9
-
-[MPlayer 1.*]
-Parent=Media Players
-Browser=MPlayer
-Version=1.0
-MajorVer=1
-MinorVer=0
-
-[MPlayer HEAD CVS]
-Parent=Media Players
-Browser=MPlayer
-
-[RealPlayer*]
-Parent=Media Players
-Browser=RealPlayer
-
-[RMA/*]
-Parent=Media Players
-Browser=RMA
-
-[vobsub]
-Parent=Media Players
-Browser=vobsub
-Stripper=true
-isBanned=true
-
-[WinampMPEG/*]
-Parent=Media Players
-Browser=WinAmp
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; QuickTime
-
-[QuickTime]
-Parent=DefaultProperties
-Browser=QuickTime
+Frames=true
+IFrames=true
+Tables=true
Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
-[QuickTime (qtver=6.0*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=6.0
-MajorVer=6
-MinorVer=0
-Platform=MacOSX
-
-[QuickTime (qtver=6.0*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=6.0
-MajorVer=6
-MinorVer=0
-Platform=MacPPC
-
-[QuickTime (qtver=6.0*;os=Windows 95*)]
-Parent=QuickTime
-Version=6.0
-MajorVer=6
-MinorVer=0
-Platform=Win95
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.2.* Safari/*]
+Parent=Chrome 0.2
+Platform=WinXP
-[QuickTime (qtver=6.0*;os=Windows 98*)]
-Parent=QuickTime
-Version=6.0
-MajorVer=6
-MinorVer=0
-Platform=Win98
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.2.* Safari/*]
+Parent=Chrome 0.2
+Platform=Win2003
-[QuickTime (qtver=6.0*;os=Windows Me*)]
-Parent=QuickTime
-Version=6.0
-MajorVer=6
-MinorVer=0
-Platform=WinME
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.2.* Safari/*]
+Parent=Chrome 0.2
+Platform=WinVista
-[QuickTime (qtver=6.0*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=6.0
-MajorVer=6
-MinorVer=0
-Platform=WinNT
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Chrome 0.3
-[QuickTime (qtver=6.0*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=6.0
-MajorVer=6
-MinorVer=0
-Platform=Win2000
+[Chrome 0.3]
+Parent=DefaultProperties
+Browser=Chrome
+Version=0.3
+MinorVer=3
+Beta=true
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
-[QuickTime (qtver=6.0*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=6.0
-MajorVer=6
-MinorVer=0
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.3.* Safari/*]
+Parent=Chrome 0.3
Platform=WinXP
-Win32=true
-[QuickTime (qtver=6.0*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=6.0
-MajorVer=6
-MinorVer=0
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.3.* Safari/*]
+Parent=Chrome 0.3
Platform=Win2003
-Win32=true
-[QuickTime (qtver=6.1*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=6.1
-MajorVer=6
-MinorVer=1
-Platform=MacOSX
-
-[QuickTime (qtver=6.1*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=6.1
-MajorVer=6
-MinorVer=1
-Platform=MacPPC
-
-[QuickTime (qtver=6.1*;os=Windows 95*)]
-Parent=QuickTime
-Version=6.1
-MajorVer=6
-MinorVer=1
-Platform=Win95
-Win32=true
-
-[QuickTime (qtver=6.1*;os=Windows 98*)]
-Parent=QuickTime
-Version=6.1
-MajorVer=6
-MinorVer=1
-Platform=Win98
-Win32=true
-
-[QuickTime (qtver=6.1*;os=Windows Me*)]
-Parent=QuickTime
-Version=6.1
-MajorVer=6
-MinorVer=1
-Platform=WinME
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.3.* Safari/*]
+Parent=Chrome 0.3
+Platform=WinVista
-[QuickTime (qtver=6.1*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=6.1
-MajorVer=6
-MinorVer=1
-Platform=WinNT
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Chrome 0.4
-[QuickTime (qtver=6.1*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=6.1
-MajorVer=6
-MinorVer=1
-Platform=Win2000
+[Chrome 0.4]
+Parent=DefaultProperties
+Browser=Chrome
+Version=0.4
+MinorVer=4
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
-[QuickTime (qtver=6.1*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=6.1
-MajorVer=6
-MinorVer=1
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.4.* Safari/*]
+Parent=Chrome 0.4
Platform=WinXP
-Win32=true
-[QuickTime (qtver=6.1*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=6.1
-MajorVer=6
-MinorVer=1
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.4.* Safari/*]
+Parent=Chrome 0.4
Platform=Win2003
-Win32=true
-[QuickTime (qtver=6.2*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=6.2
-MajorVer=6
-MinorVer=2
-Platform=MacOSX
-
-[QuickTime (qtver=6.2*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=6.2
-MajorVer=6
-MinorVer=2
-Platform=MacPPC
-
-[QuickTime (qtver=6.2*;os=Windows 95*)]
-Parent=QuickTime
-Version=6.2
-MajorVer=6
-MinorVer=2
-Platform=Win95
-Win32=true
-
-[QuickTime (qtver=6.2*;os=Windows 98*)]
-Parent=QuickTime
-Version=6.2
-MajorVer=6
-MinorVer=2
-Platform=Win98
-Win32=true
-
-[QuickTime (qtver=6.2*;os=Windows Me*)]
-Parent=QuickTime
-Version=6.2
-MajorVer=6
-MinorVer=2
-Platform=WinME
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.4.* Safari/*]
+Parent=Chrome 0.4
+Platform=WinVista
-[QuickTime (qtver=6.2*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=6.2
-MajorVer=6
-MinorVer=2
-Platform=WinNT
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Chrome 0.5
-[QuickTime (qtver=6.2*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=6.2
-MajorVer=6
-MinorVer=2
-Platform=Win2000
+[Chrome 0.5]
+Parent=DefaultProperties
+Browser=Chrome
+Version=0.5
+MinorVer=5
+Beta=true
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
-[QuickTime (qtver=6.2*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=6.2
-MajorVer=6
-MinorVer=2
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.5.* Safari/*]
+Parent=Chrome 0.5
Platform=WinXP
-Win32=true
-[QuickTime (qtver=6.2*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=6.2
-MajorVer=6
-MinorVer=2
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.5.* Safari/*]
+Parent=Chrome 0.5
Platform=Win2003
-Win32=true
-[QuickTime (qtver=6.3*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=6.3
-MajorVer=6
-MinorVer=3
-Platform=MacOSX
-
-[QuickTime (qtver=6.3*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=6.3
-MajorVer=6
-MinorVer=3
-Platform=MacPPC
-
-[QuickTime (qtver=6.3*;os=Windows 95*)]
-Parent=QuickTime
-Version=6.3
-MajorVer=6
-MinorVer=3
-Platform=Win95
-Win32=true
-
-[QuickTime (qtver=6.3*;os=Windows 98*)]
-Parent=QuickTime
-Version=6.3
-MajorVer=6
-MinorVer=3
-Platform=Win98
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *) AppleWebKit/* (KHTML, like Gecko) Chrome/0.5.* Safari/*]
+Parent=Chrome 0.5
+Platform=WinVista
-[QuickTime (qtver=6.3*;os=Windows Me*)]
-Parent=QuickTime
-Version=6.3
-MajorVer=6
-MinorVer=3
-Platform=WinME
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Chrome 1.0
-[QuickTime (qtver=6.3*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=6.3
-MajorVer=6
-MinorVer=3
-Platform=WinNT
-Win32=true
-
-[QuickTime (qtver=6.3*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=6.3
-MajorVer=6
-MinorVer=3
-Platform=Win2000
+[Chrome 1.0]
+Parent=DefaultProperties
+Browser=Chrome
+Version=1.0
+MajorVer=1
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
-[QuickTime (qtver=6.3*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=6.3
-MajorVer=6
-MinorVer=3
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/1.0.* Safari/*]
+Parent=Chrome 1.0
Platform=WinXP
-Win32=true
-[QuickTime (qtver=6.3*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=6.3
-MajorVer=6
-MinorVer=3
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) AppleWebKit/* (KHTML, like Gecko) Chrome/1.0.* Safari/*]
+Parent=Chrome 1.0
Platform=Win2003
-Win32=true
-
-[QuickTime (qtver=6.4*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=6.4
-MajorVer=6
-MinorVer=4
-Platform=MacOSX
-[QuickTime (qtver=6.4*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=6.4
-MajorVer=6
-MinorVer=4
-Platform=MacPPC
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *) AppleWebKit/* (KHTML, like Gecko) Chrome/1.0.* Safari/*]
+Parent=Chrome 1.0
+Platform=WinVista
-[QuickTime (qtver=6.4*;os=Windows 95*)]
-Parent=QuickTime
-Version=6.4
-MajorVer=6
-MinorVer=4
-Platform=Win95
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 6.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/1.0.* Safari/*]
+Parent=Chrome 1.0
+Platform=Win7
-[QuickTime (qtver=6.4*;os=Windows 98*)]
-Parent=QuickTime
-Version=6.4
-MajorVer=6
-MinorVer=4
-Platform=Win98
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 7.0; *) AppleWebKit/* (KHTML, like Gecko) Chrome/1.0.* Safari/*]
+Parent=Chrome 1.0
+Platform=Win7
-[QuickTime (qtver=6.4*;os=Windows Me*)]
-Parent=QuickTime
-Version=6.4
-MajorVer=6
-MinorVer=4
-Platform=WinME
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Chrome 2.0
-[QuickTime (qtver=6.4*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=6.4
-MajorVer=6
-MinorVer=4
-Platform=WinNT
-Win32=true
-
-[QuickTime (qtver=6.4*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=6.4
-MajorVer=6
-MinorVer=4
-Platform=Win2000
+[Chrome 2.0]
+Parent=DefaultProperties
+Browser=Chrome
+Version=2.0
+MajorVer=2
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
-[QuickTime (qtver=6.4*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=6.4
-MajorVer=6
-MinorVer=4
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/2.0.* Safari/*]
+Parent=Chrome 2.0
Platform=WinXP
-Win32=true
-[QuickTime (qtver=6.4*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=6.4
-MajorVer=6
-MinorVer=4
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) AppleWebKit/* (KHTML, like Gecko) Chrome/2.0.* Safari/*]
+Parent=Chrome 2.0
Platform=Win2003
-Win32=true
-
-[QuickTime (qtver=6.5*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=6.5
-MajorVer=6
-MinorVer=5
-Platform=MacOSX
-[QuickTime (qtver=6.5*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=6.5
-MajorVer=6
-MinorVer=5
-Platform=MacPPC
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *) AppleWebKit/* (KHTML, like Gecko) Chrome/2.0.* Safari/*]
+Parent=Chrome 2.0
+Platform=WinVista
-[QuickTime (qtver=6.5*;os=Windows 95*)]
-Parent=QuickTime
-Version=6.5
-MajorVer=6
-MinorVer=5
-Platform=Win95
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 6.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/2.0.* Safari/*]
+Parent=Chrome 2.0
+Platform=Win7
-[QuickTime (qtver=6.5*;os=Windows 98*)]
-Parent=QuickTime
-Version=6.5
-MajorVer=6
-MinorVer=5
-Platform=Win98
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 7.0; *) AppleWebKit/* (KHTML, like Gecko) Chrome/2.0.* Safari/*]
+Parent=Chrome 2.0
+Platform=Win7
-[QuickTime (qtver=6.5*;os=Windows Me*)]
-Parent=QuickTime
-Version=6.5
-MajorVer=6
-MinorVer=5
-Platform=WinME
-Win32=true
-
-[QuickTime (qtver=6.5*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=6.5
-MajorVer=6
-MinorVer=5
-Platform=WinNT
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Chrome 3.0
-[QuickTime (qtver=6.5*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=6.5
-MajorVer=6
-MinorVer=5
-Platform=Win2000
+[Chrome 3.0]
+Parent=DefaultProperties
+Browser=Chrome
+Version=3.0
+MajorVer=3
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
-[QuickTime (qtver=6.5*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=6.5
-MajorVer=6
-MinorVer=5
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/3.0.* Safari/*]
+Parent=Chrome 3.0
Platform=WinXP
-Win32=true
-[QuickTime (qtver=6.5*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=6.5
-MajorVer=6
-MinorVer=5
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) AppleWebKit/* (KHTML, like Gecko) Chrome/3.0.* Safari/*]
+Parent=Chrome 3.0
Platform=Win2003
-Win32=true
-[QuickTime (qtver=6.6*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=6.6
-MajorVer=6
-MinorVer=6
-Platform=MacOSX
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *) AppleWebKit/* (KHTML, like Gecko) Chrome/3.0.* Safari/*]
+Parent=Chrome 3.0
+Platform=WinVista
-[QuickTime (qtver=6.6*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=6.6
-MajorVer=6
-MinorVer=6
-Platform=MacPPC
+[Mozilla/5.0 (Windows; U; Windows NT 6.1; *) AppleWebKit/* (KHTML, like Gecko) Chrome/3.0.* Safari/*]
+Parent=Chrome 3.0
+Platform=Win7
-[QuickTime (qtver=6.6*;os=Windows 95*)]
-Parent=QuickTime
-Version=6.6
-MajorVer=6
-MinorVer=6
-Platform=Win95
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 7.0; *) AppleWebKit/* (KHTML, like Gecko) Chrome/3.0.* Safari/*]
+Parent=Chrome 3.0
+Platform=Win7
-[QuickTime (qtver=6.6*;os=Windows 98*)]
-Parent=QuickTime
-Version=6.6
-MajorVer=6
-MinorVer=6
-Platform=Win98
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Google Code
-[QuickTime (qtver=6.6*;os=Windows Me*)]
-Parent=QuickTime
-Version=6.6
-MajorVer=6
-MinorVer=6
-Platform=WinME
-Win32=true
+[Google Code]
+Parent=DefaultProperties
+Browser=Google Code
+Tables=true
+Cookies=true
+JavaApplets=true
-[QuickTime (qtver=6.6*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=6.6
-MajorVer=6
-MinorVer=6
-Platform=WinNT
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Iron 0.2
-[QuickTime (qtver=6.6*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=6.6
-MajorVer=6
-MinorVer=6
-Platform=Win2000
+[Iron 0.2]
+Parent=DefaultProperties
+Browser=Iron
+Version=0.2
+MinorVer=2
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
-[QuickTime (qtver=6.6*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=6.6
-MajorVer=6
-MinorVer=6
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Iron/0.2.* Safari/*]
+Parent=Iron 0.2
Platform=WinXP
-Win32=true
-
-[QuickTime (qtver=6.6*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=6.6
-MajorVer=6
-MinorVer=6
-Platform=Win2003
-Win32=true
-
-[QuickTime (qtver=6.7*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=6.7
-MajorVer=6
-MinorVer=7
-Platform=MacOSX
-[QuickTime (qtver=6.7*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=6.7
-MajorVer=6
-MinorVer=7
-Platform=MacPPC
-
-[QuickTime (qtver=6.7*;os=Windows 95*)]
-Parent=QuickTime
-Version=6.7
-MajorVer=6
-MinorVer=7
-Platform=Win95
-Win32=true
-
-[QuickTime (qtver=6.7*;os=Windows 98*)]
-Parent=QuickTime
-Version=6.7
-MajorVer=6
-MinorVer=7
-Platform=Win98
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) AppleWebKit/* (KHTML, like Gecko) Iron/0.2.* Safari/*]
+Parent=Iron 0.2
+Platform=WinVista
-[QuickTime (qtver=6.7*;os=Windows Me*)]
-Parent=QuickTime
-Version=6.7
-MajorVer=6
-MinorVer=7
-Platform=WinME
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *) AppleWebKit/* (KHTML, like Gecko) Iron/0.2.* Safari/*]
+Parent=Iron 0.2
+Platform=Win7
-[QuickTime (qtver=6.7*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=6.7
-MajorVer=6
-MinorVer=7
-Platform=WinNT
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Iron 0.3
-[QuickTime (qtver=6.7*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=6.7
-MajorVer=6
-MinorVer=7
-Platform=Win2000
+[Iron 0.3]
+Parent=DefaultProperties
+Browser=Iron
+Version=0.3
+MinorVer=3
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
-[QuickTime (qtver=6.7*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=6.7
-MajorVer=6
-MinorVer=7
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Iron/0.3.* Safari/*]
+Parent=Iron 0.3
Platform=WinXP
-Win32=true
-[QuickTime (qtver=6.7*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=6.7
-MajorVer=6
-MinorVer=7
-Platform=Win2003
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) AppleWebKit/* (KHTML, like Gecko) Iron/0.3.* Safari/*]
+Parent=Iron 0.3
+Platform=WinVista
-[QuickTime (qtver=6.8*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=6.8
-MajorVer=6
-MinorVer=8
-Platform=MacOSX
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *) AppleWebKit/* (KHTML, like Gecko) Iron/0.3.* Safari/*]
+Parent=Iron 0.3
+Platform=Win7
-[QuickTime (qtver=6.8*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=6.8
-MajorVer=6
-MinorVer=8
-Platform=MacPPC
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Iron 0.4
-[QuickTime (qtver=6.8*;os=Windows 95*)]
-Parent=QuickTime
-Version=6.8
-MajorVer=6
-MinorVer=8
-Platform=Win95
+[Iron 0.4]
+Parent=DefaultProperties
+Browser=Iron
+Version=0.4
+MinorVer=4
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
-[QuickTime (qtver=6.8*;os=Windows 98*)]
-Parent=QuickTime
-Version=6.8
-MajorVer=6
-MinorVer=8
-Platform=Win98
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) AppleWebKit/* (KHTML, like Gecko) Iron/0.4.* Safari/*]
+Parent=Iron 0.4
+Platform=WinXP
-[QuickTime (qtver=6.8*;os=Windows Me*)]
-Parent=QuickTime
-Version=6.8
-MajorVer=6
-MinorVer=8
-Platform=WinME
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) AppleWebKit/* (KHTML, like Gecko) Iron/0.4.* Safari/*]
+Parent=Iron 0.4
+Platform=WinVista
-[QuickTime (qtver=6.8*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=6.8
-MajorVer=6
-MinorVer=8
-Platform=WinNT
-Win32=true
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *) AppleWebKit/* (KHTML, like Gecko) Iron/0.4.* Safari/*]
+Parent=Iron 0.4
+Platform=Win7
-[QuickTime (qtver=6.8*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=6.8
-MajorVer=6
-MinorVer=8
-Platform=Win2000
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; iPod
-[QuickTime (qtver=6.8*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=6.8
-MajorVer=6
-MinorVer=8
-Platform=WinXP
-Win32=true
-
-[QuickTime (qtver=6.8*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=6.8
-MajorVer=6
-MinorVer=8
-Platform=Win2003
-Win32=true
+[iPod]
+Parent=DefaultProperties
+Browser=iPod
+Platform=iPhone OSX
+isMobileDevice=true
-[QuickTime (qtver=6.9*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=6.9
-MajorVer=6
-MinorVer=9
+[Mozilla/5.0 (iPod; U; *Mac OS X; *) AppleWebKit/* (*) Version/3.0 Mobile/* Safari/*]
+Parent=iPod
+Version=3.0
+MajorVer=3
+MinorVer=0
Platform=MacOSX
-[QuickTime (qtver=6.9*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=6.9
-MajorVer=6
-MinorVer=9
-Platform=MacPPC
+[Mozilla/5.0 (iPod; U; CPU iPhone OS 2_2 like Mac OS X; en-us) AppleWebKit/* (KHTML, like Gecko) Mobile/*]
+Parent=iPod
-[QuickTime (qtver=6.9*;os=Windows 95*)]
-Parent=QuickTime
-Version=6.9
-MajorVer=6
-MinorVer=9
-Platform=Win95
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; iTunes
-[QuickTime (qtver=6.9*;os=Windows 98*)]
-Parent=QuickTime
-Version=6.9
-MajorVer=6
-MinorVer=9
-Platform=Win98
-Win32=true
+[iTunes]
+Parent=DefaultProperties
+Browser=iTunes
+Platform=iPhone OSX
-[QuickTime (qtver=6.9*;os=Windows Me*)]
-Parent=QuickTime
-Version=6.9
-MajorVer=6
-MinorVer=9
-Platform=WinME
+[iTunes/* (Windows; ?)]
+Parent=iTunes
+Browser=iTunes
+Platform=Win32
Win32=true
-[QuickTime (qtver=6.9*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=6.9
-MajorVer=6
-MinorVer=9
-Platform=WinNT
-Win32=true
+[MOT-* iTunes/* MIB/* Profile/MIDP-* Configuration/CLDC-* UP.Link/*]
+Parent=iTunes
-[QuickTime (qtver=6.9*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=6.9
-MajorVer=6
-MinorVer=9
-Platform=Win2000
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Media Players
-[QuickTime (qtver=6.9*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=6.9
-MajorVer=6
-MinorVer=9
-Platform=WinXP
-Win32=true
+[Media Players]
+Parent=DefaultProperties
+Browser=Media Players
+Cookies=true
-[QuickTime (qtver=6.9*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=6.9
-MajorVer=6
-MinorVer=9
-Platform=Win2003
-Win32=true
+[Microsoft NetShow(TM) Player with RealVideo(R)]
+Parent=Media Players
+Browser=Microsoft NetShow
-[QuickTime (qtver=7.0*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=7.0
-MajorVer=7
-MinorVer=0
+[Mozilla/5.0 (Macintosh; U; PPC Mac OS X; *) AppleWebKit/* RealPlayer]
+Parent=Media Players
+Browser=RealPlayer
Platform=MacOSX
-[QuickTime (qtver=7.0*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=7.0
-MajorVer=7
-MinorVer=0
-Platform=MacPPC
-
-[QuickTime (qtver=7.0*;os=Windows 95*)]
-Parent=QuickTime
-Version=7.0
-MajorVer=7
-MinorVer=0
-Platform=Win95
-Win32=true
-
-[QuickTime (qtver=7.0*;os=Windows 98*)]
-Parent=QuickTime
-Version=7.0
-MajorVer=7
-MinorVer=0
-Platform=Win98
-Win32=true
-
-[QuickTime (qtver=7.0*;os=Windows Me*)]
-Parent=QuickTime
-Version=7.0
-MajorVer=7
-MinorVer=0
-Platform=WinME
-Win32=true
-
-[QuickTime (qtver=7.0*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=7.0
-MajorVer=7
-MinorVer=0
-Platform=WinNT
-Win32=true
-
-[QuickTime (qtver=7.0*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=7.0
-MajorVer=7
-MinorVer=0
-Platform=Win2000
-Win32=true
+[MPlayer 0.9*]
+Parent=Media Players
+Browser=MPlayer
+Version=0.9
+MajorVer=0
+MinorVer=9
-[QuickTime (qtver=7.0*;os=Windows NT 5.1*)]
-Parent=QuickTime
-Version=7.0
-MajorVer=7
+[MPlayer 1.*]
+Parent=Media Players
+Browser=MPlayer
+Version=1.0
+MajorVer=1
MinorVer=0
-Platform=WinXP
-Win32=true
-[QuickTime (qtver=7.0*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=7.0
-MajorVer=7
-MinorVer=0
-Platform=Win2003
-Win32=true
+[MPlayer HEAD CVS]
+Parent=Media Players
+Browser=MPlayer
-[QuickTime (qtver=7.1*;cpu=PPC;os=Mac 10.*)]
-Parent=QuickTime
-Version=7.1
-MajorVer=7
-MinorVer=1
-Platform=MacOSX
+[RealPlayer*]
+Parent=Media Players
+Browser=RealPlayer
-[QuickTime (qtver=7.1*;cpu=PPC;os=Mac 9.*)]
-Parent=QuickTime
-Version=7.1
-MajorVer=7
-MinorVer=1
-Platform=MacPPC
+[RMA/*]
+Parent=Media Players
+Browser=RMA
-[QuickTime (qtver=7.1*;os=Windows 98*)]
-Parent=QuickTime
-Version=7.1
-MajorVer=7
-MinorVer=1
-Platform=Win98
-Win32=true
+[VLC media player*]
+Parent=Media Players
+Browser=VLC
-[QuickTime (qtver=7.1*;os=Windows NT 4.0*)]
-Parent=QuickTime
-Version=7.1
-MajorVer=7
-MinorVer=1
-Platform=WinNT
-Win32=true
+[vobsub]
+Parent=Media Players
+Browser=vobsub
+isBanned=true
-[QuickTime (qtver=7.1*;os=Windows NT 5.0*)]
-Parent=QuickTime
-Version=7.1
-MajorVer=7
-MinorVer=1
-Platform=Win2000
-Win32=true
+[WinampMPEG/*]
+Parent=Media Players
+Browser=WinAmp
-[QuickTime (qtver=7.1*;os=Windows NT 5.1*)]
-Parent=QuickTime
-MajorVer=7.1
-MinorVer=7
-Platform=WinXP
-Win32=true
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Nintendo
-[QuickTime (qtver=7.1*;os=Windows NT 5.2*)]
-Parent=QuickTime
-Version=7.1
-MajorVer=7
-MinorVer=1
-Platform=Win2003
-Win32=true
+[Nintendo Wii]
+Parent=DefaultProperties
+Browser=
+isMobileDevice=true
-[QuickTime/7.0.* (qtver=7.0.*;*;os=Mac 10.*)*]
-Parent=QuickTime
-Version=7.0
-MajorVer=7
-MinorVer=0
-Platform=MacOSX
+[Opera/* (Nintendo DSi; Opera/*; *; *)]
+Parent=Nintendo Wii
+Browser=DSi
-[QuickTime/7.1.* (qtver=7.1.*;*;os=Mac 10.*)*]
-Parent=QuickTime
-Version=7.1
-MajorVer=7
-MinorVer=1
-Platform=MacOSX
+[Opera/* (Nintendo Wii; U; *)]
+Parent=Nintendo Wii
+Browser=Wii
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Windows Media Player
@@ -5974,7 +5462,7 @@ Version=10.0
MajorVer=10
MinorVer=0
-[NSPlayer/11.* WMFSDK/11.*]
+[NSPlayer/11.*]
Parent=Windows Media Player
Browser=Windows Media Player
Version=11.0
@@ -6047,313 +5535,317 @@ MajorVer=9
MinorVer=0
Win32=true
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AvantGo
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Zune
-[AvantGo]
+[Zune]
Parent=DefaultProperties
-Browser=AvantGo
-Frames=true
-Tables=true
+Browser=Zune
Cookies=true
-JavaScript=true
-WAP=true
-isMobileDevice=true
-[AvantGo*]
-Parent=AvantGo
+[Mozilla/4.0 (compatible; MSIE ?.0; *Zune 2.0*)*]
+Parent=Zune
+Version=2.0
+MajorVer=2
+MinorVer=0
-[Mozilla/?.0 (*; U; AvantGo 3.?)]
-Parent=AvantGo
+[Mozilla/4.0 (compatible; MSIE ?.0; *Zune 2.5*)*]
+Parent=Zune
+Version=2.5
+MajorVer=2
+MinorVer=5
+
+[Mozilla/4.0 (compatible; MSIE ?.0; *Zune 3.0*)*]
+Parent=Zune
Version=3.0
MajorVer=3
MinorVer=0
-[Mozilla/?.0 (*; U; AvantGo 4.?)]
-Parent=AvantGo
-Version=4.0
-MajorVer=4
-MinorVer=0
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; QuickTime 7.0
-[Mozilla/?.0 (*; U; AvantGo 5.?)]
-Parent=AvantGo
-Version=5.0
-MajorVer=5
-MinorVer=0
+[QuickTime 7.0]
+Parent=DefaultProperties
+Browser=QuickTime
+Version=7.0
+MajorVer=7
+Cookies=true
-[Mozilla/?.0 (*; U; AvantGo 6.?)]
-Parent=AvantGo
-Version=6.0
-MajorVer=6
-MinorVer=0
+[QuickTime (qtver=7.0*;cpu=PPC;os=Mac 10.*)]
+Parent=QuickTime 7.0
+Platform=MacOSX
-[Mozilla/?.0 (compatible; AvantGo 3.?)]
-Parent=AvantGo
-Version=3.0
-MajorVer=3
-MinorVer=0
+[QuickTime (qtver=7.0*;cpu=PPC;os=Mac 9.*)]
+Parent=QuickTime 7.0
+Platform=MacPPC
-[Mozilla/?.0 (compatible; AvantGo 3.?; *)]
-Parent=AvantGo
-Version=3.0
-MajorVer=3
-MinorVer=0
+[QuickTime (qtver=7.0*;os=Windows 95*)]
+Parent=QuickTime 7.0
+Platform=Win95
+Win32=true
-[Mozilla/?.0 (compatible; AvantGo 3.?; FreeBSD)]
-Parent=AvantGo
-Version=3.0
-MajorVer=3
-MinorVer=0
-Platform=FreeBSD
+[QuickTime (qtver=7.0*;os=Windows 98*)]
+Parent=QuickTime 7.0
+Platform=Win98
+Win32=true
-[Mozilla/?.0 (compatible; AvantGo 4.?)]
-Parent=AvantGo
-Version=4.0
-MajorVer=4
-MinorVer=0
+[QuickTime (qtver=7.0*;os=Windows Me*)]
+Parent=QuickTime 7.0
+Platform=WinME
+Win32=true
-[Mozilla/?.0 (compatible; AvantGo 4.?; *)]
-Parent=AvantGo
-Version=4.0
-MajorVer=4
-MinorVer=0
+[QuickTime (qtver=7.0*;os=Windows NT 4.0*)]
+Parent=QuickTime 7.0
+Platform=WinNT
+Win32=true
-[Mozilla/?.0 (compatible; AvantGo 4.?; FreeBSD)]
-Parent=AvantGo
-Version=4.0
-MajorVer=4
-MinorVer=0
-Platform=FreeBSD
+[QuickTime (qtver=7.0*;os=Windows NT 5.0*)]
+Parent=QuickTime 7.0
+Platform=Win2000
+Win32=true
-[Mozilla/?.0 (compatible; AvantGo 5.?)]
-Parent=AvantGo
-Version=5.0
-MajorVer=5
-MinorVer=0
+[QuickTime (qtver=7.0*;os=Windows NT 5.1*)]
+Parent=QuickTime 7.0
+Platform=WinXP
+Win32=true
-[Mozilla/?.0 (compatible; AvantGo 5.?; *)]
-Parent=AvantGo
-Version=5.0
-MajorVer=5
-MinorVer=0
+[QuickTime (qtver=7.0*;os=Windows NT 5.2*)]
+Parent=QuickTime 7.0
+Platform=Win2003
+Win32=true
-[Mozilla/?.0 (compatible; AvantGo 5.?; FreeBSD)]
-Parent=AvantGo
-Version=5.0
-MajorVer=5
-MinorVer=0
-Platform=FreeBSD
+[QuickTime/7.0.* (qtver=7.0.*;*;os=Mac 10.*)*]
+Parent=QuickTime 7.0
+Platform=MacOSX
-[Mozilla/?.0 (compatible; AvantGo 6.?)]
-Parent=AvantGo
-Version=6.0
-MajorVer=6
-MinorVer=0
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; QuickTime 7.1
-[Mozilla/?.0 (compatible; AvantGo 6.?; *)]
-Parent=AvantGo
-Version=6.0
-MajorVer=6
-MinorVer=0
+[QuickTime 7.1]
+Parent=DefaultProperties
+Browser=QuickTime
+Version=7.1
+MajorVer=7
+MinorVer=1
+Cookies=true
-[Mozilla/?.0 (compatible; AvantGo 6.?; FreeBSD)]
-Parent=AvantGo
-Version=6.0
-MajorVer=6
-MinorVer=0
-Platform=FreeBSD
+[QuickTime (qtver=7.1*;cpu=PPC;os=Mac 10.*)]
+Parent=QuickTime 7.1
+Platform=MacOSX
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BlackBerry
+[QuickTime (qtver=7.1*;cpu=PPC;os=Mac 9.*)]
+Parent=QuickTime 7.1
+Platform=MacPPC
-[BlackBerry]
+[QuickTime (qtver=7.1*;os=Windows 98*)]
+Parent=QuickTime 7.1
+Platform=Win98
+Win32=true
+
+[QuickTime (qtver=7.1*;os=Windows NT 4.0*)]
+Parent=QuickTime 7.1
+Platform=WinNT
+Win32=true
+
+[QuickTime (qtver=7.1*;os=Windows NT 5.0*)]
+Parent=QuickTime 7.1
+Platform=Win2000
+Win32=true
+
+[QuickTime (qtver=7.1*;os=Windows NT 5.1*)]
+Parent=QuickTime 7.1
+Platform=WinXP
+Win32=true
+
+[QuickTime (qtver=7.1*;os=Windows NT 5.2*)]
+Parent=QuickTime 7.1
+Platform=Win2003
+Win32=true
+
+[QuickTime/7.1.* (qtver=7.1.*;*;os=Mac 10.*)*]
+Parent=QuickTime 7.1
+Platform=MacOSX
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; QuickTime 7.2
+
+[QuickTime 7.2]
Parent=DefaultProperties
-Browser=BlackBerry
-Frames=true
-Tables=true
+Browser=QuickTime
+Version=7.2
+MajorVer=7
+MinorVer=2
+Platform=MacOSX
Cookies=true
-JavaScript=true
-WAP=true
-isMobileDevice=true
-[BlackBerry7*/3.5.*]
-Parent=BlackBerry
-Version=3.5
-MajorVer=3
-MinorVer=5
+[QuickTime (qtver=7.2*;cpu=PPC;os=Mac 10.*)]
+Parent=QuickTime 7.2
+Platform=MacOSX
-[BlackBerry7*/3.6.*]
-Parent=BlackBerry
-Version=3.6
-MajorVer=3
-MinorVer=6
+[QuickTime (qtver=7.2*;cpu=PPC;os=Mac 9.*)]
+Parent=QuickTime 7.2
+Platform=MacPPC
-[BlackBerry7*/3.7.*]
-Parent=BlackBerry
-Version=3.7
-MajorVer=3
-MinorVer=7
+[QuickTime (qtver=7.2*;os=Windows 98*)]
+Parent=QuickTime 7.2
+Platform=Win98
+Win32=true
-[BlackBerry7*/3.8.*]
-Parent=BlackBerry
-Version=3.8
-MajorVer=3
-MinorVer=8
+[QuickTime (qtver=7.2*;os=Windows NT 4.0*)]
+Parent=QuickTime 7.2
+Platform=WinNT
+Win32=true
-[BlackBerry7*/3.9.*]
-Parent=BlackBerry
-Version=3.9
-MajorVer=3
-MinorVer=9
+[QuickTime (qtver=7.2*;os=Windows NT 5.0*)]
+Parent=QuickTime 7.2
+Platform=Win2000
+Win32=true
-[BlackBerry7*/4.0.*]
-Parent=BlackBerry
-Version=4.0
-MajorVer=4
-MinorVer=0
+[QuickTime (qtver=7.2*;os=Windows NT 5.1*)]
+Parent=QuickTime 7.2
+Platform=WinXP
+Win32=true
-[BlackBerry7*/4.1.*]
-Parent=BlackBerry
-Version=4.1
-MajorVer=4
-MinorVer=1
+[QuickTime (qtver=7.2*;os=Windows NT 5.2*)]
+Parent=QuickTime 7.2
+Platform=Win2003
+Win32=true
-[BlackBerry8*/3.5.*]
-Parent=BlackBerry
-Version=3.5
-MajorVer=3
-MinorVer=5
+[QuickTime/7.2.* (qtver=7.2.*;*;os=Mac 10.*)*]
+Parent=QuickTime 7.2
+Platform=MacOSX
-[BlackBerry8*/3.6.*]
-Parent=BlackBerry
-Version=3.6
-MajorVer=3
-MinorVer=6
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; QuickTime 7.3
-[BlackBerry8*/3.7.*]
-Parent=BlackBerry
-Version=3.7
-MajorVer=3
-MinorVer=7
+[QuickTime 7.3]
+Parent=DefaultProperties
+Browser=QuickTime
+Version=7.3
+MajorVer=7
+MinorVer=3
+Platform=MacOSX
+Cookies=true
-[BlackBerry8*/3.8.*]
-Parent=BlackBerry
-Version=3.8
-MajorVer=3
-MinorVer=8
+[QuickTime (qtver=7.3*;cpu=PPC;os=Mac 10.*)]
+Parent=QuickTime 7.3
+Platform=MacOSX
-[BlackBerry8*/3.9.*]
-Parent=BlackBerry
-Version=3.9
-MajorVer=3
-MinorVer=9
+[QuickTime (qtver=7.3*;cpu=PPC;os=Mac 9.*)]
+Parent=QuickTime 7.3
+Platform=MacPPC
-[BlackBerry8*/4.0.*]
-Parent=BlackBerry
-Version=4.0
-MajorVer=4
-MinorVer=0
+[QuickTime (qtver=7.3*;os=Windows 98*)]
+Parent=QuickTime 7.3
+Platform=Win98
+Win32=true
-[BlackBerry8*/4.1.*]
-Parent=BlackBerry
-Version=4.1
-MajorVer=4
-MinorVer=1
+[QuickTime (qtver=7.3*;os=Windows NT 4.0*)]
+Parent=QuickTime 7.3
+Platform=WinNT
+Win32=true
-[BlackBerry8*/4.2.*]
-Parent=BlackBerry
-Version=4.2
-MajorVer=4
-MinorVer=2
+[QuickTime (qtver=7.3*;os=Windows NT 5.0*)]
+Parent=QuickTime 7.3
+Platform=Win2000
+Win32=true
-[BlackBerrySimulator/3.5.*]
-Parent=BlackBerry
-Version=3.5
-MajorVer=3
-MinorVer=5
+[QuickTime (qtver=7.3*;os=Windows NT 5.1*)]
+Parent=QuickTime 7.3
+Platform=WinXP
+Win32=true
-[BlackBerrySimulator/3.6.*]
-Parent=BlackBerry
-Version=3.6
-MajorVer=3
-MinorVer=6
+[QuickTime (qtver=7.3*;os=Windows NT 5.2*)]
+Parent=QuickTime 7.3
+Platform=Win2003
+Win32=true
-[BlackBerrySimulator/3.7.*]
-Parent=BlackBerry
-Version=3.7
-MajorVer=3
-MinorVer=7
+[QuickTime/7.3.* (qtver=7.3.*;*;os=Mac 10.*)*]
+Parent=QuickTime 7.3
+Platform=MacOSX
-[BlackBerrySimulator/3.8.*]
-Parent=BlackBerry
-Version=3.8
-MajorVer=3
-MinorVer=8
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; QuickTime 7.4
-[BlackBerrySimulator/3.9.*]
-Parent=BlackBerry
-Version=3.9
-MajorVer=3
-MinorVer=9
+[QuickTime 7.4]
+Parent=DefaultProperties
+Browser=QuickTime
+Version=7.4
+MajorVer=7
+MinorVer=4
+Platform=MacOSX
+Cookies=true
-[BlackBerrySimulator/4.0.*]
-Parent=BlackBerry
-Version=4.0
-MajorVer=4
-MinorVer=0
+[QuickTime (qtver=7.4*;cpu=PPC;os=Mac 10.*)]
+Parent=QuickTime 7.4
+Platform=MacOSX
-[BlackBerrySimulator/4.1.*]
-Parent=BlackBerry
-Version=4.1
-MajorVer=4
-MinorVer=1
+[QuickTime (qtver=7.4*;cpu=PPC;os=Mac 9.*)]
+Parent=QuickTime 7.4
+Platform=MacPPC
-[Mozilla/?.0 (compatible; MSIE ?.*; Windows*) BlackBerry7*/3.5.*]
-Parent=BlackBerry
-Version=3.5
-MajorVer=3
-MinorVer=5
+[QuickTime (qtver=7.4*;os=Windows 98*)]
+Parent=QuickTime 7.4
+Platform=Win98
Win32=true
-[Mozilla/?.0 (compatible; MSIE ?.*; Windows*) BlackBerry7*/3.6.*]
-Parent=BlackBerry
-Version=3.6
-MajorVer=3
-MinorVer=6
+[QuickTime (qtver=7.4*;os=Windows NT 4.0*)]
+Parent=QuickTime 7.4
+Platform=WinNT
Win32=true
-[Mozilla/?.0 (compatible; MSIE ?.*; Windows*) BlackBerry7*/3.7.*]
-Parent=BlackBerry
-Version=3.7
-MajorVer=3
-MinorVer=7
+[QuickTime (qtver=7.4*;os=Windows NT 5.0*)]
+Parent=QuickTime 7.4
+Platform=Win2000
Win32=true
-[Mozilla/?.0 (compatible; MSIE ?.*; Windows*) BlackBerry7*/3.8.*]
-Parent=BlackBerry
-Version=3.8
-MajorVer=3
-MinorVer=8
+[QuickTime (qtver=7.4*;os=Windows NT 5.1*)]
+Parent=QuickTime 7.4
+Platform=WinXP
Win32=true
-[Mozilla/?.0 (compatible; MSIE ?.*; Windows*) BlackBerry7*/3.9.*]
-Parent=BlackBerry
-Version=3.9
-MajorVer=3
-MinorVer=9
+[QuickTime (qtver=7.4*;os=Windows NT 5.2*)]
+Parent=QuickTime 7.4
+Platform=Win2003
Win32=true
-[Mozilla/?.0 (compatible; MSIE ?.*; Windows*) BlackBerry7*/4.0.*]
+[QuickTime/7.4.* (qtver=7.4.*;*;os=Mac 10.*)*]
+Parent=QuickTime 7.4
+Platform=MacOSX
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Google Android
+
+[Android]
+Parent=DefaultProperties
+Browser=Android
+Frames=true
+Tables=true
+Cookies=true
+JavaScript=true
+isMobileDevice=true
+
+[Mozilla/5.0 (Linux; U; Android *; *) AppleWebKit/* (KHTML, like Gecko) Safari/*]
+Parent=Android
+Browser=Android
+Platform=Linux
+isMobileDevice=true
+
+[Mozilla/5.0 (Linux; U; Android *; *) AppleWebKit/* (KHTML, like Gecko) Version/3.0.* Mobile Safari/*]
+Parent=Android
+Browser=Android
+Platform=Linux
+isMobileDevice=true
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BlackBerry
+
+[BlackBerry]
+Parent=DefaultProperties
+Browser=BlackBerry
+Frames=true
+Tables=true
+Cookies=true
+JavaScript=true
+isMobileDevice=true
+
+[*BlackBerry*]
Parent=BlackBerry
-Version=4.0
-MajorVer=4
-MinorVer=0
-Win32=true
-[Mozilla/?.0 (compatible; MSIE ?.*; Windows*) BlackBerry7*/4.1.*]
+[*BlackBerrySimulator/*]
Parent=BlackBerry
-Version=4.1
-MajorVer=4
-MinorVer=1
-Win32=true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Handspring Blazer
@@ -6364,96 +5856,43 @@ Platform=Palm
Frames=true
Tables=true
Cookies=true
-WAP=true
isMobileDevice=true
-[Mozilla/4.0 (compatible; MSIE 6.0; Windows 9?; PalmSource/*; Blazer/3.*) ??;???x???]
+[Mozilla/4.0 (compatible; MSIE 6.0; Windows 95; PalmSource; Blazer 3.0) 16;160x160]
Parent=Blazer
Version=3.0
MajorVer=3
MinorVer=0
-Win32=true
-[Mozilla/4.0 (compatible; MSIE 6.0; Windows 9?; PalmSource/*; Blazer/4.*) ??;???x???]
+[Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/*; Blazer/4.0) 16;320x448]
Parent=Blazer
Version=4.0
MajorVer=4
MinorVer=0
-Win32=true
-[Mozilla/4.0 (compatible; MSIE 6.0; Windows 9?; PalmSource/*; Blazer/5.*) ??;???x???]
+[Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/*; Blazer/4.1) 16;320x320]
Parent=Blazer
-Version=5.0
-MajorVer=5
-MinorVer=0
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 6.0; Windows 9?; PalmSource; Blazer 3.*) ??;???x???]
-Parent=Blazer
-Version=3.0
-MajorVer=3
-MinorVer=0
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 6.0; Windows 9?; PalmSource; Blazer 4.*) ??;???x???]
-Parent=Blazer
-Version=4.0
+Version=4.1
MajorVer=4
-MinorVer=0
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 6.0; Windows 9?; PalmSource; Blazer 5.*) ??;???x???]
-Parent=Blazer
-Version=5.0
-MajorVer=5
-MinorVer=0
-Win32=true
+MinorVer=1
-[UPG1 UP/?.0 (*compatible; Blazer 3.*)]
+[Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/*; Blazer/4.2) 16;320x320]
Parent=Blazer
-Version=3.0
-MajorVer=3
-MinorVer=0
+Version=4.2
+MajorVer=4
+MinorVer=2
-[UPG1 UP/?.0 (*compatible; Blazer 4.*)]
+[Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/*; Blazer/4.4) 16;320x320]
Parent=Blazer
-Version=4.0
+Version=4.4
MajorVer=4
-MinorVer=0
+MinorVer=4
-[UPG1 UP/?.0 (*compatible; Blazer 5.*)]
+[Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PalmSource/*; Blazer/4.5) 16;320x320]
Parent=Blazer
-Version=5.0
-MajorVer=5
-MinorVer=0
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Danger
-
-[Danger]
-Parent=DefaultProperties
-Browser=Danger
-Platform=JAVA
-Frames=true
-Tables=true
-Cookies=true
-JavaScript=true
-WAP=true
-isMobileDevice=true
-CSS=1
-CssVersion=1
-supportsCSS=true
-
-[Mozilla/5.0 (*Danger hiptop 1.0*)]
-Parent=Danger
-Version=1.0
-MajorVer=1
-MinorVer=0
-
-[Mozilla/5.0 (*Danger hiptop 2.0*)]
-Parent=Danger
-Version=2.0
-MajorVer=2
-MinorVer=0
+Version=4.5
+MajorVer=4
+MinorVer=5
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DoCoMo
@@ -6464,7 +5903,6 @@ Frames=true
Tables=true
Cookies=true
JavaScript=true
-WAP=true
isMobileDevice=true
[DoCoMo/1.0*]
@@ -6473,9 +5911,6 @@ Version=1.0
MajorVer=1
MinorVer=0
Platform=WAP
-CSS=1
-CssVersion=1
-supportsCSS=true
[DoCoMo/2.0*]
Parent=DoCoMo
@@ -6483,44 +5918,127 @@ Version=2.0
MajorVer=2
MinorVer=0
Platform=WAP
-CSS=1
-CssVersion=1
-supportsCSS=true
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Doris
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IEMobile
-[Doris]
+[IEMobile]
Parent=DefaultProperties
-Browser=Doris
-Platform=SymbianOS
+Browser=IEMobile
+Platform=WinCE
+Win32=true
Frames=true
+IFrames=true
Tables=true
Cookies=true
-WAP=true
+VBScript=true
+JavaScript=true
+ActiveXControls=true
isMobileDevice=true
+CssVersion=2
+supportsCSS=true
-[Doris/*]
-Parent=Doris
+[Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.*)*]
+Parent=IEMobile
+Version=6.0
+MajorVer=6
+MinorVer=0
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; jig
+[Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.*)*]
+Parent=IEMobile
+Version=7.0
+MajorVer=7
+MinorVer=0
-[jig]
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; iPhone
+
+[iPhone]
Parent=DefaultProperties
-Browser=jig
+Browser=iPhone
+Platform=iPhone OSX
Frames=true
+IFrames=true
Tables=true
Cookies=true
+BackgroundSounds=true
+JavaApplets=true
JavaScript=true
-WAP=true
isMobileDevice=true
+CssVersion=3
+supportsCSS=true
-[Mozilla/4.0 (jig browser web; *)]
-Parent=jig
-Browser=jig browser web
+[Mozilla/4.0 (iPhone; *)]
+Parent=iPhone
-[Mozilla/4.0 (jig browser; *)]
-Parent=jig
-Browser=jig browser
+[Mozilla/4.0 (iPhone; U; CPU like Mac OS X; *)]
+Parent=iPhone
+
+[Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 2_* like Mac OS X; *) AppleWebKit/* (KHTML, like Gecko) Version/3.1* Mobile/* Safari/*]
+Parent=iPhone
+Browser=iPhone Simulator
+Version=3.1
+MajorVer=3
+MinorVer=1
+
+[Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 2_0_1 like Mac OS X; *) AppleWebKit/* (KHTML, like Gecko) Version/3.1* Mobile/* Safari/*]
+Parent=iPhone
+Browser=iPhone Simulator
+Version=3.1
+MajorVer=3
+MinorVer=1
+
+[Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 2_1 like Mac OS X; *) AppleWebKit/* (KHTML, like Gecko) Version/3.1* Mobile/* Safari/*]
+Parent=iPhone
+Browser=iPhone Simulator
+Version=3.1
+MajorVer=3
+MinorVer=1
+
+[Mozilla/5.0 (iPhone)]
+Parent=iPhone
+
+[Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_* like Mac OS X; *) AppleWebKit/* (KHTML, like Gecko)]
+Parent=iPhone
+Version=3.1
+MajorVer=3
+MinorVer=1
+
+[Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_* like Mac OS X; *) AppleWebKit/* (KHTML, like Gecko) Version/3.1* Mobile/* Safari/*]
+Parent=iPhone
+Version=3.1
+MajorVer=3
+MinorVer=1
+
+[Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0* like Mac OS X; *) AppleWebKit/* (KHTML, like Gecko) Version/3.1* Mobile/* Safari/*]
+Parent=iPhone
+Version=3.1
+MajorVer=3
+MinorVer=1
+
+[Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; *) AppleWebKit/* (KHTML, like Gecko)]
+Parent=iPhone
+
+[Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_1 like Mac OS X; *)*]
+Parent=iPhone
+
+[Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; *)]
+Parent=iPhone
+
+[Mozilla/5.0 (iPhone; U; CPU like Mac OS X; *) AppleWebKit/* (KHTML, like Gecko) Version/3.0 Mobile/* Safari/*]
+Parent=iPhone
+Version=3.0
+MajorVer=3
+MinorVer=0
+
+[Mozilla/5.0 (iPod; U; *Mac OS X; *) AppleWebKit/* (*) Version/* Mobile/*]
+Parent=iPhone
+Browser=iTouch
+
+[Mozilla/5.0 (iPod; U; CPU iPhone OS 2_2* like Mac OS X; *)*]
+Parent=iPhone
+Browser=iTouch
+Version=2.2
+MajorVer=2
+MinorVer=2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; KDDI
@@ -6534,44 +6052,43 @@ BackgroundSounds=true
VBScript=true
JavaScript=true
ActiveXControls=true
-WAP=true
isMobileDevice=true
-CSS=1
CssVersion=1
supportsCSS=true
-[KDDI-CA?? UP.Browser/* (GUI) MMP/*]
-Parent=KDDI
-
-[KDDI-Googlebot-Mobile]
+[KDDI-* UP.Browser/* (GUI) MMP/*]
Parent=KDDI
-[KDDI-HI?? UP.Browser/* (GUI) MMP/*]
-Parent=KDDI
-
-[KDDI-KC?? UP.Browser/* (GUI) MMP/*]
-Parent=KDDI
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Miscellaneous Mobile
-[KDDI-PT?? UP.Browser/* (GUI) MMP/*]
-Parent=KDDI
-
-[KDDI-SA?? UP.Browser/* (GUI) MMP/*]
-Parent=KDDI
+[Miscellaneous Mobile]
+Parent=DefaultProperties
+Browser=
+IFrames=true
+Tables=true
+Cookies=true
+JavaScript=true
+isMobileDevice=true
+CssVersion=2
+supportsCSS=true
-[KDDI-SN?? UP.Browser/* (GUI) MMP/*]
-Parent=KDDI
+[Mozilla/5.0 (X11; *; CentOS; *) AppleWebKit/* (KHTML, like Gecko) Bolt/0.* Version/3.0 Safari/*]
+Parent=Miscellaneous Mobile
+Browser=Bolt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Motorola Internet Browser
-[Motorola Web Browser]
+[Motorola Internet Browser]
Parent=DefaultProperties
Browser=Motorola Internet Browser
Frames=true
Tables=true
Cookies=true
-WAP=true
isMobileDevice=true
+[MOT-*/*]
+Parent=Motorola Internet Browser
+
[MOT-1*/* UP.Browser/*]
Parent=Motorola Internet Browser
@@ -6602,6 +6119,10 @@ Parent=Motorola Internet Browser
[MOT-M*/* UP.Browser/*]
Parent=Motorola Internet Browser
+[MOT-MP*/* Mozilla/* (compatible; MSIE *; Windows CE; *)]
+Parent=Motorola Internet Browser
+Win32=true
+
[MOT-MP*/* Mozilla/4.0 (compatible; MSIE *; Windows CE; *)]
Parent=Motorola Internet Browser
Win32=true
@@ -6609,6 +6130,9 @@ Win32=true
[MOT-SAP4_/* UP.Browser/*]
Parent=Motorola Internet Browser
+[MOT-T*/*]
+Parent=Motorola Internet Browser
+
[MOT-T7*/* MIB/*]
Parent=Motorola Internet Browser
@@ -6618,6 +6142,9 @@ Parent=Motorola Internet Browser
[MOT-TA02/* MIB/*]
Parent=Motorola Internet Browser
+[MOT-V*/*]
+Parent=Motorola Internet Browser
+
[MOT-V*/* MIB/*]
Parent=Motorola Internet Browser
@@ -6630,75 +6157,6 @@ Parent=Motorola Internet Browser
[MOT-V4*/* MIB/*]
Parent=Motorola Internet Browser
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Motorola Internet Browser
-
-[Motorola Web Browser]
-Parent=DefaultProperties
-Browser=Motorola Internet Browser
-Frames=true
-Tables=true
-Cookies=true
-WAP=true
-isMobileDevice=true
-
-[MOT-1*/* UP.Browser/*]
-Parent=Motorola Web Browser
-
-[MOT-8700_/* UP.Browser/*]
-Parent=Motorola Web Browser
-
-[MOT-A-0A/* UP.Browser/*]
-Parent=Motorola Web Browser
-
-[MOT-A-2B/* UP.Browser/*]
-Parent=Motorola Web Browser
-
-[MOT-A-88/* UP.Browser/*]
-Parent=Motorola Web Browser
-
-[MOT-C???/* MIB/*]
-Parent=Motorola Web Browser
-
-[MOT-GATW_/* UP.Browser/*]
-Parent=Motorola Web Browser
-
-[MOT-L6/* MIB/*]
-Parent=Motorola Web Browser
-
-[MOT-L7/* MIB/*]
-Parent=Motorola Web Browser
-
-[MOT-M*/* UP.Browser/*]
-Parent=Motorola Web Browser
-
-[MOT-MP*/* Mozilla/4.0 (compatible; MSIE *; Windows CE; *)]
-Parent=Motorola Web Browser
-Win32=true
-
-[MOT-SAP4_/* UP.Browser/*]
-Parent=Motorola Web Browser
-
-[MOT-T7*/* MIB/*]
-Parent=Motorola Web Browser
-
-[MOT-T721*]
-Parent=Motorola Web Browser
-
-[MOT-TA02/* MIB/*]
-Parent=Motorola Web Browser
-
-[MOT-V*/* MIB/*]
-Parent=Motorola Web Browser
-
-[MOT-V*/* UP.Browser/*]
-Parent=Motorola Web Browser
-
-[MOT-V3/* MIB/*]
-Parent=Motorola Web Browser
-
-[MOT-V4*/* MIB/*]
-Parent=Motorola Web Browser
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; MSN Mobile Proxy
[MSN Mobile Proxy]
@@ -6710,10 +6168,9 @@ Tables=true
Cookies=true
JavaScript=true
ActiveXControls=true
-WAP=true
isMobileDevice=true
-[Mozilla/4.0 (compatible; MSIE 4.01; Windows NT; MSN Mobile Proxy)]
+[Mozilla/* (compatible; MSIE *; Windows*; MSN Mobile Proxy)]
Parent=MSN Mobile Proxy
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NetFront
@@ -6725,150 +6182,10 @@ Frames=true
Tables=true
Cookies=true
JavaScript=true
-WAP=true
isMobileDevice=true
-[*NetFront/3.2]
-Parent=NetFront
-Version=3.2
-MajorVer=3
-MinorVer=2
-WAP=true
-isMobileDevice=true
-
-[Mozilla/* (*)*NetFront/3.0*]
-Parent=NetFront
-Version=3.0
-MajorVer=3
-MinorVer=0
-
-[Mozilla/* (*)*NetFront/3.1*]
+[*NetFront/*]
Parent=NetFront
-Version=3.1
-MajorVer=3
-MinorVer=1
-
-[Mozilla/* (*)*NetFront/3.2*]
-Parent=NetFront
-Version=3.2
-MajorVer=3
-MinorVer=2
-
-[Mozilla/* (*)*NetFront/3.3*]
-Parent=NetFront
-Version=3.3
-MajorVer=3
-MinorVer=3
-
-[Mozilla/* (compatible; MSIE *; Windows *) NetFront/3.0*]
-Parent=NetFront
-Version=3.0
-MajorVer=3
-MinorVer=0
-Win32=true
-
-[Mozilla/* (compatible; MSIE *; Windows *) NetFront/3.1*]
-Parent=NetFront
-Version=3.1
-MajorVer=3
-MinorVer=1
-Win32=true
-
-[Mozilla/* (compatible; MSIE *; Windows *) NetFront/3.2*]
-Parent=NetFront
-Version=3.2
-MajorVer=3
-MinorVer=2
-Win32=true
-
-[Mozilla/* (compatible; MSIE *; Windows *) NetFront/3.3*]
-Parent=NetFront
-Version=3.3
-MajorVer=3
-MinorVer=3
-Win32=true
-
-[Mozilla/* (MobilePhone*) NetFront/3.0*]
-Parent=NetFront
-Version=3.0
-MajorVer=3
-MinorVer=0
-
-[Mozilla/* (MobilePhone*) NetFront/3.1*]
-Parent=NetFront
-Version=3.1
-MajorVer=3
-MinorVer=1
-
-[Mozilla/* (MobilePhone*) NetFront/3.2*]
-Parent=NetFront
-Version=3.2
-MajorVer=3
-MinorVer=2
-
-[Mozilla/* (MobilePhone*) NetFront/3.3*]
-Parent=NetFront
-Version=3.3
-MajorVer=3
-MinorVer=3
-
-[Mozilla/* (SmartPhone*) NetFront/3.0*]
-Parent=NetFront
-Version=3.0
-MajorVer=3
-MinorVer=0
-
-[Mozilla/* (SmartPhone*) NetFront/3.1*]
-Parent=NetFront
-Version=3.1
-MajorVer=3
-MinorVer=1
-
-[Mozilla/* (SmartPhone*) NetFront/3.2*]
-Parent=NetFront
-Version=3.2
-MajorVer=3
-MinorVer=2
-
-[Mozilla/* (SmartPhone*) NetFront/3.3*]
-Parent=NetFront
-Version=3.3
-MajorVer=3
-MinorVer=3
-
-[Mozilla/* (Windows; U; NT4.0; *) NetFront/3.0*]
-Parent=NetFront
-Version=3.0
-MajorVer=3
-MinorVer=0
-Win32=true
-
-[Mozilla/* (Windows; U; NT4.0; *) NetFront/3.1*]
-Parent=NetFront
-Version=3.1
-MajorVer=3
-MinorVer=1
-Win32=true
-
-[Mozilla/* (Windows; U; NT4.0; *) NetFront/3.2*]
-Parent=NetFront
-Version=3.2
-MajorVer=3
-MinorVer=2
-Win32=true
-
-[Mozilla/* (Windows; U; NT4.0; *) NetFront/3.3*]
-Parent=NetFront
-Version=3.3
-MajorVer=3
-MinorVer=3
-Win32=true
-
-[SAMSUNG-SGH-* Configuration/CLDC-?.? NetFront/3.2]
-Parent=NetFront
-Version=3.2
-MajorVer=3
-MinorVer=2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Nokia
@@ -6877,71 +6194,14 @@ Parent=DefaultProperties
Browser=Nokia
Tables=true
Cookies=true
-WAP=true
isMobileDevice=true
-[Mozilla/5.0 (SymbianOS/*; U; *) AppleWebKit/413 (KHTML, like Gecko) Safari/413]
+[*Nokia*/*]
Parent=Nokia
-[Nokia????/* SymbianOS/* Series60/*]
+[Mozilla/* (SymbianOS/*; ?; *) AppleWebKit/* (KHTML, like Gecko) Safari/*]
Parent=Nokia
Platform=SymbianOS
-Frames=true
-JavaScript=true
-
-[Nokia????/1.0 (*) Profile/MIDP-?.? Configuration/CLDC-?.?*]
-Parent=Nokia
-Frames=false
-JavaScript=false
-
-[Nokia????/1.0 (*)*]
-Parent=Nokia
-Frames=false
-JavaScript=false
-
-[Nokia????/2.0 (*) Profile/MIDP-?.? Configuration/CLDC-?.?*]
-Parent=Nokia
-
-[Nokia????/2.0 (*) SymbianOS/* Series60/* Profile/MIDP-?.? Configuration/CLDC-?.?*]
-Parent=Nokia
-
-[Nokia????/4.* Series60/* Profile/MIDP-?.? Configuration/CLDC-?.?*]
-Parent=Nokia
-
-[Nokia?????/* (*) Profile/MIDP-?.? Configuration/CLDC-?.?*]
-Parent=Nokia
-
-[Nokia7650/* SymbianOS/* Series60/*]
-Parent=Nokia
-Platform=SymbianOS
-Frames=true
-JavaScript=true
-
-[NokiaN70-1/*/SN* Series60/* Profile/MIDP-?.? Configuration/CLDC-?.?*]
-Parent=Nokia
-Frames=true
-JavaScript=true
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Obigo
-
-[Obigo]
-Parent=DefaultProperties
-Browser=Obigo
-Frames=true
-Tables=true
-Cookies=true
-JavaScript=true
-WAP=true
-isMobileDevice=true
-
-[AU-MIC/* MMP/*]
-Parent=Obigo
-
-[LG-LX??? AU-MIC-LX??0/* MMP/*]
-Parent=Obigo
-
-[Samsung-SPHA* AU-MIC* MMP/*]
-Parent=Obigo
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Openwave Mobile Browser
@@ -6954,9 +6214,7 @@ Win64=true
Frames=true
Tables=true
Cookies=true
-WAP=true
isMobileDevice=true
-isSyndicationReader=true
[*UP.Browser/*]
Parent=Openwave Mobile Browser
@@ -6964,62 +6222,100 @@ Parent=Openwave Mobile Browser
[*UP.Link/*]
Parent=Openwave Mobile Browser
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera Mini
-[Opera]
+[Opera Mini]
Parent=DefaultProperties
-Browser=Opera
-Platform=SymbianOS
+Browser=Opera Mini
Frames=true
+IFrames=true
Tables=true
Cookies=true
JavaScript=true
-WAP=true
isMobileDevice=true
-[Mozilla/4.* (compatible; MSIE 6.0; Symbian OS; *Opera*]
-Parent=Opera
-Platform=SymbianOS
-
-[Mozilla/4.* (compatible; MSIE 6.0; SymbianOS; *Opera*]
-Parent=Opera
-
-[Opera/* (*Opera Mini/1.0*)*]
-Parent=Opera
+[Opera/* (J2ME/MIDP; Opera Mini/1.0*)*]
+Parent=Opera Mini
Version=1.0
MajorVer=1
MinorVer=0
-[Opera/* (*Opera Mini/1.1*)*]
-Parent=Opera
+[Opera/* (J2ME/MIDP; Opera Mini/1.1*)*]
+Parent=Opera Mini
Version=1.1
MajorVer=1
MinorVer=1
-[Opera/* (*Opera Mini/1.2*)*]
-Parent=Opera
+[Opera/* (J2ME/MIDP; Opera Mini/1.2*)*]
+Parent=Opera Mini
Version=1.2
MajorVer=1
MinorVer=2
-[Opera/* (*Opera Mini/2.0*)*]
-Parent=Opera
+[Opera/* (J2ME/MIDP; Opera Mini/2.0*)*]
+Parent=Opera Mini
Version=2.0
MajorVer=2
MinorVer=0
-CSS=1
-CssVersion=1
-supportsCSS=true
-[Opera/* (*Opera Mini/3.0*)*]
-Parent=Opera
+[Opera/* (J2ME/MIDP; Opera Mini/3.0*)*]
+Parent=Opera Mini
Version=3.0
MajorVer=3
MinorVer=0
-[Opera/* (Nintendo Wii*)]
-Parent=Opera
-Browser=Wii Web Browser
+[Opera/* (J2ME/MIDP; Opera Mini/3.1*)*]
+Parent=Opera Mini
+Version=3.1
+MajorVer=3
+MinorVer=1
+
+[Opera/* (J2ME/MIDP; Opera Mini/4.0*)*]
+Parent=Opera Mini
+Version=4.0
+MajorVer=4
+MinorVer=0
+
+[Opera/* (J2ME/MIDP; Opera Mini/4.1*)*]
+Parent=Opera Mini
+Version=4.1
+MajorVer=4
+MinorVer=1
+
+[Opera/* (J2ME/MIDP; Opera Mini/4.2*)*]
+Parent=Opera Mini
+Version=4.2
+MajorVer=4
+MinorVer=2
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera Mobile
+
+[Opera Mobile]
+Parent=DefaultProperties
+Browser=Opera Mobi
+Frames=true
+Tables=true
+Cookies=true
+isMobileDevice=true
+
+[Opera/9.5 (Microsoft Windows; PPC; *Opera Mobile/*)]
+Parent=Opera Mobile
+Version=9.5
+MajorVer=9
+MinorVer=5
+
+[Opera/9.5 (Microsoft Windows; PPC; Opera Mobi/*)]
+Parent=Opera Mobile
+Version=9.5
+MajorVer=9
+MinorVer=5
+
+[Opera/9.51 Beta (Microsoft Windows; PPC; Opera Mobi/*)*]
+Parent=Opera Mobile
+Version=9.51
+MajorVer=9
+MinorVer=51
+Beta=true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Playstation
@@ -7030,23 +6326,16 @@ Platform=WAP
Frames=true
Tables=true
Cookies=true
-WAP=true
isMobileDevice=true
-[Mozilla/4.0 (PSP (PlayStation Portable); 2.00)]
-Parent=Playstation
-Version=2.0
-MajorVer=2
-MinorVer=0
-
-[Mozilla/5.0 (PLAYSTATION 3; 1.00)]
+[Mozilla/* (PLAYSTATION *; *)]
Parent=Playstation
Browser=PlayStation 3
-Version=1.0
-MajorVer=1
-MinorVer=1
Frames=false
+[Mozilla/* (PSP (PlayStation Portable); *)]
+Parent=Playstation
+
[Sony PS2 (Linux)]
Parent=Playstation
Browser=Sony PS2
@@ -7064,83 +6353,29 @@ Tables=true
Cookies=true
JavaScript=true
ActiveXControls=true
-WAP=true
isMobileDevice=true
-CSS=1
CssVersion=1
supportsCSS=true
-[HTC-*/* Mozilla/4.0 (compatible; MSIE 5.5; Windows CE*)*]
+[*(compatible; MSIE *.*; Windows CE; PPC; *)]
Parent=Pocket PC
-Version=5.5
-MajorVer=5
-MinorVer=5
-Win32=true
-
-[HTC-*/* Mozilla/4.0 (compatible; MSIE 6.0; Windows CE*)*]
-Parent=Pocket PC
-Version=6.0
-MajorVer=6
-MinorVer=0
-Win32=true
-
-[Mozilla/1.1 (compatible; MSPIE 2.0; *Windows CE*)*]
-Parent=Pocket PC
-Version=2.0
-MajorVer=2
-MinorVer=0
-Win32=true
-[Mozilla/2.0 (compatible; MSIE 3.0*; *Windows CE*)*]
+[HTC-*/* Mozilla/* (compatible; MSIE *.*; Windows CE*)*]
Parent=Pocket PC
-Version=3.0
-MajorVer=3
-MinorVer=0
Win32=true
-[Mozilla/4.0 (compatible; MSIE 4.0*; *Windows CE*)*]
+[Mozilla/* (compatible; MSPIE *.*; *Windows CE*)*]
Parent=Pocket PC
-Version=4.01
-MajorVer=4
-MinorVer=01
Win32=true
-[Mozilla/4.0 (compatible; MSIE 5.5*; Windows CE*)*]
+[T-Mobile* Mozilla/* (compatible; MSIE *.*; Windows CE; *)]
Parent=Pocket PC
-Version=5.5
-MajorVer=5
-MinorVer=5
-Win32=true
-[Mozilla/4.0 (compatible; MSIE 6.0*; Windows CE*)*]
+[Vodafone* Mozilla/* (compatible; MSIE *.*; Windows CE; *)*]
Parent=Pocket PC
-Version=6.0
-MajorVer=6
-MinorVer=0
-Win32=true
-[Mozilla/4.0 (compatible; MSIE 7.0; Windows CE*)*]
+[Windows CE (Pocket PC) - Version *.*]
Parent=Pocket PC
-Version=7.0
-MajorVer=7
-MinorVer=0
-Beta=true
-Win32=true
-
-[SIE-*/* (compatible; MSIE 4.01; Windows CE; PPC; 240x320)]
-Parent=Pocket PC
-
-[T-Mobile Dash Mozilla/4.0 (compatible; MSIE 4.*; Windows CE; Smartphone; 320x240)]
-Parent=Pocket PC
-
-[Vodafone/*/Mozilla/4.0 (compatible; MSIE*; Windows CE;*)*]
-Parent=Pocket PC
-
-[Windows CE (Pocket PC) - Version 4.2*]
-Parent=Pocket PC
-Version=4.01
-MajorVer=4
-MinorVer=01
Win32=true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SEMC Browser
@@ -7150,9 +6385,7 @@ Parent=DefaultProperties
Browser=SEMC Browser
Platform=JAVA
Tables=true
-WAP=true
isMobileDevice=true
-CSS=1
CssVersion=1
supportsCSS=true
@@ -7168,13 +6401,14 @@ Frames=true
Tables=true
Cookies=true
JavaScript=true
-WAP=true
isMobileDevice=true
+CssVersion=1
+supportsCSS=true
-[Ericsson*]
+[*Ericsson*]
Parent=SonyEricsson
-[SonyEricsson*]
+[*SonyEricsson*]
Parent=SonyEricsson
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Netbox
@@ -7186,7 +6420,6 @@ Frames=true
Tables=true
Cookies=true
JavaScript=true
-CSS=1
CssVersion=1
supportsCSS=true
@@ -7264,7 +6497,6 @@ Parent=WebTV
Version=2.5
MajorVer=2
MinorVer=5
-CSS=1
CssVersion=1
supportsCSS=true
@@ -7273,7 +6505,6 @@ Parent=WebTV
Version=2.6
MajorVer=2
MinorVer=6
-CSS=1
CssVersion=1
supportsCSS=true
@@ -7282,7 +6513,6 @@ Parent=WebTV
Version=2.7
MajorVer=2
MinorVer=7
-CSS=1
CssVersion=1
supportsCSS=true
@@ -7292,7 +6522,6 @@ Version=2.8
MajorVer=2
MinorVer=8
JavaApplets=true
-CSS=1
CssVersion=1
supportsCSS=true
@@ -7302,7 +6531,6 @@ Version=2.9
MajorVer=2
MinorVer=9
JavaApplets=true
-CSS=1
CssVersion=1
supportsCSS=true
@@ -7325,7 +6553,6 @@ Parent=Amaya
Version=8.0
MajorVer=8
MinorVer=0
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7334,7 +6561,6 @@ Parent=Amaya
Version=8.1
MajorVer=8
MinorVer=1
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7343,7 +6569,6 @@ Parent=Amaya
Version=8.2
MajorVer=8
MinorVer=2
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7352,7 +6577,6 @@ Parent=Amaya
Version=8.3
MajorVer=8
MinorVer=3
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7361,7 +6585,6 @@ Parent=Amaya
Version=8.4
MajorVer=8
MinorVer=4
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7370,7 +6593,6 @@ Parent=Amaya
Version=8.5
MajorVer=8
MinorVer=5
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7379,7 +6601,6 @@ Parent=Amaya
Version=8.6
MajorVer=8
MinorVer=6
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7388,7 +6609,6 @@ Parent=Amaya
Version=8.7
MajorVer=8
MinorVer=7
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7397,7 +6617,6 @@ Parent=Amaya
Version=8.8
MajorVer=8
MinorVer=8
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7406,7 +6625,6 @@ Parent=Amaya
Version=8.9
MajorVer=8
MinorVer=9
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7415,7 +6633,6 @@ Parent=Amaya
Version=9.0
MajorVer=8
MinorVer=0
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7424,7 +6641,6 @@ Parent=Amaya
Version=9.1
MajorVer=9
MinorVer=1
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7433,7 +6649,6 @@ Parent=Amaya
Version=9.2
MajorVer=9
MinorVer=2
-CSS=2
CssVersion=2
supportsCSS=true
@@ -7603,6 +6818,27 @@ MajorVer=2
MinorVer=1
Platform=OpenBSD
+[Links (2.2*; FreeBSD*)]
+Parent=Links
+Version=2.2
+MajorVer=2
+MinorVer=2
+Platform=FreeBSD
+
+[Links (2.2*; Linux *)]
+Parent=Links
+Version=2.2
+MajorVer=2
+MinorVer=2
+Platform=Linux
+
+[Links (2.2*; OpenBSD*)]
+Parent=Links
+Version=2.2
+MajorVer=2
+MinorVer=2
+Platform=OpenBSD
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Lynx
[Lynx]
@@ -7657,6 +6893,12 @@ Version=2.8
MajorVer=2
MinorVer=8
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NCSA Mosaic
+
+[Mosaic]
+Parent=DefaultProperties
+Browser=Mosaic
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; w3m
[w3m]
@@ -7706,7 +6948,7 @@ Cookies=true
[ELinks 0.10]
Parent=DefaultProperties
-Browser=ELinks 0.10
+Browser=ELinks
Version=0.10
MinorVer=10
Frames=true
@@ -7836,7 +7078,7 @@ Platform=Unix
[ELinks 0.11]
Parent=DefaultProperties
-Browser=ELinks 0.11
+Browser=ELinks
Version=0.11
MinorVer=11
Frames=true
@@ -8096,7 +7338,7 @@ Platform=Unix
[ELinks 0.9]
Parent=DefaultProperties
-Browser=ELinks 0.9
+Browser=ELinks
Version=0.9
MinorVer=9
Frames=true
@@ -8222,134 +7464,6 @@ Platform=Solaris
Parent=ELinks 0.9
Platform=Unix
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ELinks
-
-[ELinks ]
-Parent=DefaultProperties
-Browser=ELinks
-Frames=true
-Tables=true
-
-[ELinks (*; *AIX*)]
-Parent=ELinks
-Platform=AIX
-
-[ELinks (*; *BeOS*)]
-Parent=ELinks
-Platform=BeOS
-
-[ELinks (*; *CygWin*)]
-Parent=ELinks
-Platform=CygWin
-
-[ELinks (*; *Darwin*)]
-Parent=ELinks
-Platform=Darwin
-
-[ELinks (*; *Digital Unix*)]
-Parent=ELinks
-Platform=Digital Unix
-
-[ELinks (*; *FreeBSD*)]
-Parent=ELinks
-Platform=FreeBSD
-
-[ELinks (*; *HPUX*)]
-Parent=ELinks
-Platform=HP-UX
-
-[ELinks (*; *IRIX*)]
-Parent=ELinks
-Platform=IRIX
-
-[ELinks (*; *Linux*)]
-Parent=ELinks
-Platform=Linux
-
-[ELinks (*; *NetBSD*)]
-Parent=ELinks
-Platform=NetBSD
-
-[ELinks (*; *OpenBSD*)]
-Parent=ELinks
-Platform=OpenBSD
-
-[ELinks (*; *OS/2*)]
-Parent=ELinks
-Platform=OS/2
-
-[ELinks (*; *RISC*)]
-Parent=ELinks
-Platform=RISC OS
-
-[ELinks (*; *Solaris*)]
-Parent=ELinks
-Platform=Solaris
-
-[ELinks (*; *Unix*)]
-Parent=ELinks
-Platform=Unix
-
-[ELinks/* (*AIX*)]
-Parent=ELinks
-Platform=AIX
-
-[ELinks/* (*BeOS*)]
-Parent=ELinks
-Platform=BeOS
-
-[ELinks/* (*CygWin*)]
-Parent=ELinks
-Platform=CygWin
-
-[ELinks/* (*Darwin*)]
-Parent=ELinks
-Platform=Darwin
-
-[ELinks/* (*Digital Unix*)]
-Parent=ELinks
-Platform=Digital Unix
-
-[ELinks/* (*FreeBSD*)]
-Parent=ELinks
-Platform=FreeBSD
-
-[ELinks/* (*HPUX*)]
-Parent=ELinks
-Platform=HP-UX
-
-[ELinks/* (*IRIX*)]
-Parent=ELinks
-Platform=IRIX
-
-[ELinks/* (*Linux*)]
-Parent=ELinks
-Platform=Linux
-
-[ELinks/* (*NetBSD*)]
-Parent=ELinks
-Platform=NetBSD
-
-[ELinks/* (*OpenBSD*)]
-Parent=ELinks
-Platform=OpenBSD
-
-[ELinks/* (*OS/2*)]
-Parent=ELinks
-Platform=OS/2
-
-[ELinks/* (*RISC*)]
-Parent=ELinks
-Platform=RISC OS
-
-[ELinks/* (*Solaris*)]
-Parent=ELinks
-Platform=Solaris
-
-[ELinks/* (*Unix*)]
-Parent=ELinks
-Platform=Unix
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AppleWebKit
[AppleWebKit]
@@ -8362,7 +7476,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -8381,7 +7494,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -8418,6 +7530,34 @@ Version=1.2
MajorVer=1
MinorVer=2
+[Mozilla/5.0 (Macintosh; *Mac OS X*) Gecko/* Camino/1.3*]
+Parent=Camino
+Version=1.3
+MajorVer=1
+MinorVer=3
+Platform=MacOSX
+
+[Mozilla/5.0 (Macintosh; *Mac OS X*) Gecko/* Camino/1.4*]
+Parent=Camino
+Version=1.4
+MajorVer=1
+MinorVer=4
+Platform=MacOSX
+
+[Mozilla/5.0 (Macintosh; *Mac OS X*) Gecko/* Camino/1.5*]
+Parent=Camino
+Version=1.5
+MajorVer=1
+MinorVer=5
+Platform=MacOSX
+
+[Mozilla/5.0 (Macintosh; *Mac OS X*) Gecko/* Camino/1.6*]
+Parent=Camino
+Version=1.6
+MajorVer=1
+MinorVer=6
+Platform=MacOSX
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Chimera
[Chimera]
@@ -8447,7 +7587,6 @@ Frames=true
IFrames=true
Tables=true
Cookies=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -8469,6 +7608,12 @@ Version=0.8
MajorVer=0
MinorVer=8
+[Dillo/2.0]
+Parent=Dillo
+Version=2.0
+MajorVer=2
+MinorVer=0
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Emacs/W3
[Emacs/W3]
@@ -8577,99 +7722,39 @@ Parent=FrontPage
[Galeon]
Parent=DefaultProperties
Browser=Galeon
+Platform=Linux
Frames=true
IFrames=true
Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
-[Mozilla/5.0 (X11; U; Linux*) Gecko/* Galeon/1.0*]
+[Mozilla/5.0 (X11; U; Linux*) Gecko/* Galeon/1.*]
Parent=Galeon
Version=1.0
MajorVer=1
MinorVer=0
-Platform=Linux
-
-[Mozilla/5.0 (X11; U; Linux*) Gecko/* Galeon/1.1*]
-Parent=Galeon
-Version=1.1
-MajorVer=1
-MinorVer=1
-Platform=Linux
-
-[Mozilla/5.0 (X11; U; Linux*) Gecko/* Galeon/1.2*]
-Parent=Galeon
-Version=1.2
-MajorVer=1
-MinorVer=2
-Platform=Linux
-[Mozilla/5.0 (X11; U; Linux*) Gecko/* Galeon/1.3*]
+[Mozilla/5.0 (X11; U; Linux*) Gecko/* Galeon/2.*]
Parent=Galeon
-Version=1.3
-MajorVer=1
-MinorVer=3
-Platform=Linux
-
-[Mozilla/5.0 (X11; U; Linux*; Debian/*) Gecko/* Galeon/1.0*]
-Parent=Galeon
-Version=1.0
-MajorVer=1
+Version=2.0
+MajorVer=2
MinorVer=0
-Platform=Debian
-
-[Mozilla/5.0 (X11; U; Linux*; Debian/*) Gecko/* Galeon/1.1*]
-Parent=Galeon
-Version=1.1
-MajorVer=1
-MinorVer=1
-Platform=Debian
-
-[Mozilla/5.0 (X11; U; Linux*; Debian/*) Gecko/* Galeon/1.2*]
-Parent=Galeon
-Version=1.2
-MajorVer=1
-MinorVer=2
-Platform=Debian
-[Mozilla/5.0 (X11; U; Linux*; Debian/*) Gecko/* Galeon/1.3*]
-Parent=Galeon
-Version=1.3
-MajorVer=1
-MinorVer=3
-Platform=Debian
-
-[Mozilla/5.0 Galeon/1.0* (X11; Linux*)*]
+[Mozilla/5.0 Galeon/1.* (X11; Linux*)*]
Parent=Galeon
Version=1.0
MajorVer=1
MinorVer=0
-Platform=Linux
-
-[Mozilla/5.0 Galeon/1.1* (X11; Linux*)*]
-Parent=Galeon
-Version=1.1
-MajorVer=1
-MinorVer=1
-Platform=Linux
-[Mozilla/5.0 Galeon/1.2* (X11; Linux*)*]
+[Mozilla/5.0 Galeon/2.* (X11; Linux*)*]
Parent=Galeon
-Version=1.2
-MajorVer=1
-MinorVer=2
-Platform=Linux
-
-[Mozilla/5.0 Galeon/1.3* (X11; Linux*)*]
-Parent=Galeon
-Version=1.3
-MajorVer=1
-MinorVer=3
-Platform=Linux
+Version=2.0
+MajorVer=2
+MinorVer=0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HP Secure Web Browser
@@ -8683,7 +7768,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -8809,7 +7893,6 @@ Frames=true
Tables=true
Cookies=true
JavaScript=true
-CSS=1
CssVersion=1
supportsCSS=true
@@ -8875,7 +7958,6 @@ Version=3.0
MajorVer=3
MinorVer=0
Platform=MacOSX
-CSS=2
CssVersion=2
supportsCSS=true
@@ -8885,17 +7967,22 @@ Version=3.0
MajorVer=3
MinorVer=0
Platform=MacPPC
-CSS=2
CssVersion=2
supportsCSS=true
+[iCab/4.0 (Macintosh; U; *Mac OS X)]
+Parent=iCab
+Version=4.0
+MajorVer=4
+MinorVer=0
+Platform=MacOSX
+
[Mozilla/* (compatible; iCab 3.0*; Macintosh; *Mac OS X*)]
Parent=iCab
Version=3.0
MajorVer=3
MinorVer=0
Platform=MacOSX
-CSS=2
CssVersion=2
supportsCSS=true
@@ -8905,7 +7992,6 @@ Version=3.0
MajorVer=3
MinorVer=0
Platform=MacPPC
-CSS=2
CssVersion=2
supportsCSS=true
@@ -8951,6 +8037,13 @@ MajorVer=2
MinorVer=9
Platform=MacPPC
+[Mozilla/4.5 (compatible; iCab 4.2*; Macintosh; *Mac OS X*)]
+Parent=iCab
+Version=4.2
+MajorVer=4
+MinorVer=2
+Platform=MacOSX
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; iSiloX
[iSiloX]
@@ -8962,7 +8055,6 @@ Tables=true
Cookies=true
JavaScript=true
Crawler=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -9026,248 +8118,470 @@ MinorVer=3
Platform=Win32
Win32=true
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; K-Meleon
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Lycoris Desktop/LX
-[K-Meleon]
+[Lycoris Desktop/LX]
Parent=DefaultProperties
-Browser=K-Meleon
-Win32=true
+Browser=Lycoris Desktop/LX
Frames=true
IFrames=true
Tables=true
Cookies=true
+JavaApplets=true
JavaScript=true
-CSS=2
-CssVersion=2
-supportsCSS=true
+Crawler=true
-[Mozilla/5.0 (Windows; *; Win95; *; rv:1.*) Gecko/* K-Meleon/0.7*]
-Parent=K-Meleon
-Version=0.7
-MajorVer=0
+[Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.*: Desktop/LX Amethyst) Gecko/*]
+Parent=Lycoris Desktop/LX
+Version=1.1
+MajorVer=1
+MinorVer=1
+Platform=Linux
+
+[Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.*; Desktop/LX Amethyst) Gecko/*]
+Parent=Lycoris Desktop/LX
+Version=1.0
+MajorVer=1
+MinorVer=0
+Platform=Linux
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Mosaic
+
+[Mosaic]
+Parent=DefaultProperties
+Browser=Mosaic
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+
+[Mozilla/4.0 (VMS_Mosaic)]
+Parent=Mosaic
+Platform=OpenVMS
+
+[VMS_Mosaic/3.7*]
+Parent=Mosaic
+Version=3.7
+MajorVer=3
MinorVer=7
-Platform=Win95
-Win32=true
+Platform=OpenVMS
-[Mozilla/5.0 (Windows; *; Win95; *; rv:1.*) Gecko/* K-Meleon/0.8*]
-Parent=K-Meleon
-Version=0.8
-MajorVer=0
+[VMS_Mosaic/3.8*]
+Parent=Mosaic
+Version=3.8
+MajorVer=3
MinorVer=8
-Platform=Win95
-Win32=true
+Platform=OpenVMS
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NetPositive
+
+[NetPositive]
+Parent=DefaultProperties
+Browser=NetPositive
+Platform=BeOS
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+
+[*NetPositive/2.2*]
+Parent=NetPositive
+Version=2.2
+MajorVer=2
+MinorVer=2
-[Mozilla/5.0 (Windows; *; Win95; *; rv:1.*) Gecko/* K-Meleon/0.9*]
-Parent=K-Meleon
+[*NetPositive/2.2*BeOS*]
+Parent=NetPositive
+Version=2.2
+MajorVer=2
+MinorVer=2
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; OmniWeb
+
+[OmniWeb]
+Parent=DefaultProperties
+Browser=OmniWeb
+Platform=MacOSX
+Frames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+isMobileDevice=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/* (Macintosh; ?; *Mac OS X; *) AppleWebKit/* (*) OmniWeb/v4*]
+Parent=OmniWeb
+Version=4.5
+MajorVer=4
+MinorVer=5
+Platform=MacOSX
+
+[Mozilla/* (Macintosh; ?; *Mac OS X; *) AppleWebKit/* (*) OmniWeb/v5*]
+Parent=OmniWeb
+Version=5.
+MajorVer=5
+MinorVer=0
+Platform=MacOSX
+
+[Mozilla/* (Macintosh; ?; *Mac OS X; *) AppleWebKit/* (*) OmniWeb/v6*]
+Parent=OmniWeb
+Version=6.0
+MajorVer=6
+MinorVer=0
+Platform=MacOSX
+
+[Mozilla/* (Macintosh; ?; PPC) OmniWeb/4*]
+Parent=OmniWeb
+Version=4.0
+MajorVer=4
+MinorVer=0
+Platform=MacPPC
+
+[Mozilla/* (Macintosh; ?; PPC) OmniWeb/5*]
+Parent=OmniWeb
+Version=5.0
+MajorVer=5
+MinorVer=0
+Platform=MacOSX
+
+[Mozilla/* (Macintosh; ?; PPC) OmniWeb/6*]
+Parent=OmniWeb
+Version=6.0
+MajorVer=6
+MinorVer=0
+Platform=MacPPC
+
+[Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.34]
+Parent=OmniWeb
+Version=5.1
+MajorVer=5
+MinorVer=1
+
+[Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.34]
+Parent=OmniWeb
+Version=5.1
+MajorVer=5
+MinorVer=1
+
+[Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/420+ (KHTML, like Gecko, Safari/420) OmniWeb/v607]
+Parent=OmniWeb
+Version=5.5
+MajorVer=5
+MinorVer=5
+
+[Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/420+ (KHTML, like Gecko, Safari/420) OmniWeb/v607]
+Parent=OmniWeb
+Version=5.5
+MajorVer=5
+MinorVer=5
+
+[Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/522+ (KHTML, like Gecko, Safari/522) OmniWeb/v613]
+Parent=OmniWeb
+Version=5.6
+MajorVer=5
+MinorVer=6
+
+[Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/522+ (KHTML, like Gecko, Safari/522) OmniWeb/v613]
+Parent=OmniWeb
+Version=5.6
+MajorVer=5
+MinorVer=6
+
+[Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v496]
+Parent=OmniWeb
+Version=4.5
+MajorVer=4
+MinorVer=5
+
+[Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.36 ]
+Parent=OmniWeb
+Version=5.0
+MajorVer=5
+MinorVer=0
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Shiira
+
+[Shiira]
+Parent=DefaultProperties
+Browser=Shiira
+Platform=MacOSX
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+BackgroundSounds=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/5.0 (Macintosh; *Mac OS X*) AppleWebKit/* (*) Shiira/0.9*]
+Parent=Shiira
Version=0.9
MajorVer=0
MinorVer=9
-Platform=Win95
-Win32=true
-[Mozilla/5.0 (Windows; *; Win95; *; rv:1.*) Gecko/* K-Meleon/1.0*]
-Parent=K-Meleon
+[Mozilla/5.0 (Macintosh; *Mac OS X*) AppleWebKit/* (*) Shiira/1.0*]
+Parent=Shiira
Version=1.0
MajorVer=1
MinorVer=0
-Platform=Win95
-Win32=true
-[Mozilla/5.0 (Windows; *; Win98; *; rv:1.*) Gecko/* K-Meleon 0.7*]
-Parent=K-Meleon
-Version=0.7
-MajorVer=0
-MinorVer=7
-Platform=Win98
-Win32=true
+[Mozilla/5.0 (Macintosh; *Mac OS X*) AppleWebKit/* (*) Shiira/1.1*]
+Parent=Shiira
+Version=1.1
+MajorVer=1
+MinorVer=1
-[Mozilla/5.0 (Windows; *; Win98; *; rv:1.*) Gecko/* K-Meleon/0.8*]
-Parent=K-Meleon
-Version=0.8
-MajorVer=0
-MinorVer=8
-Platform=Win95
+[Mozilla/5.0 (Macintosh; *Mac OS X*) AppleWebKit/* (*) Shiira/1.2*]
+Parent=Shiira
+Version=1.2
+MajorVer=1
+MinorVer=2
+
+[Mozilla/5.0 (Macintosh; *Mac OS X*) AppleWebKit/* (*) Shiira/2.1*]
+Parent=Shiira
+Version=2.1
+MajorVer=2
+MinorVer=1
+
+[Mozilla/5.0 (Macintosh; *Mac OS X*) AppleWebKit/* (*) Shiira/2.2*]
+Parent=Shiira
+Version=2.2
+MajorVer=2
+MinorVer=2
+
+[Windows Maker]
+Parent=DefaultProperties
+Browser=WMaker
+Platform=Linux
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+VBScript=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[WMaker*]
+Parent=Windows Maker
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; K-Meleon 1.0
+
+[K-Meleon 1.0]
+Parent=DefaultProperties
+Browser=K-Meleon
+Version=1.0
+MajorVer=1
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
-[Mozilla/5.0 (Windows; *; Win98; *; rv:1.*) Gecko/* K-Meleon/0.9*]
-Parent=K-Meleon
-Version=0.9
-MajorVer=0
-MinorVer=9
+[Mozilla/5.0 (Windows; *; Win95; *; rv:1.*) Gecko/* K-Meleon/1.0*]
+Parent=K-Meleon 1.0
+Version=1.0
+MajorVer=1
+MinorVer=0
Platform=Win95
Win32=true
[Mozilla/5.0 (Windows; *; Win98; *; rv:1.*) Gecko/* K-Meleon/1.0*]
-Parent=K-Meleon
+Parent=K-Meleon 1.0
Version=1.0
MajorVer=1
MinorVer=0
Platform=Win98
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.0; *; rv:1.*) Gecko/* K-Meleon?0.7*]
-Parent=K-Meleon
-Version=0.7
-MajorVer=0
-MinorVer=7
+[Mozilla/5.0 (Windows; *; Windows NT 5.0; *; rv:1.*) Gecko/* K-Meleon?1.0*]
+Parent=K-Meleon 1.0
+Version=1.0
+MajorVer=1
+MinorVer=0
Platform=Win2000
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.0; *; rv:1.*) Gecko/* K-Meleon?0.8*]
-Parent=K-Meleon
-Version=0.8
-MajorVer=0
-MinorVer=8
-Platform=Win2000
+[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.*) Gecko/* K-Meleon/1.0*]
+Parent=K-Meleon 1.0
+Version=1.0
+MajorVer=1
+MinorVer=0
+Platform=WinXP
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.0; *; rv:1.*) Gecko/* K-Meleon?0.9*]
-Parent=K-Meleon
-Version=0.9
-MajorVer=0
-MinorVer=9
-Platform=Win2000
+[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.*) Gecko/* K-Meleon/1.0*]
+Parent=K-Meleon 1.0
+Version=1.0
+MajorVer=1
+MinorVer=0
+Platform=Win2003
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.0; *; rv:1.*) Gecko/* K-Meleon?1.0*]
-Parent=K-Meleon
+[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.*) Gecko/* K-Meleon/1.0*]
+Parent=K-Meleon 1.0
Version=1.0
MajorVer=1
MinorVer=0
-Platform=Win2000
+Platform=WinNT
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.*) Gecko/* K-Meleon/0.7*]
-Parent=K-Meleon
-Version=0.7
-MajorVer=0
-MinorVer=7
-Platform=WinXP
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; K-Meleon 1.1
+
+[K-Meleon 1.1]
+Parent=DefaultProperties
+Browser=K-Meleon
+Version=1.1
+MajorVer=1
+MinorVer=1
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.*) Gecko/* K-Meleon/0.8*]
-Parent=K-Meleon
-Version=0.8
-MajorVer=0
-MinorVer=8
-Platform=WinXP
+[Mozilla/5.0 (Windows; *; Win95; *; rv:1.*) Gecko/* K-Meleon/1.1*]
+Parent=K-Meleon 1.1
+Version=1.0
+MajorVer=1
+MinorVer=0
+Platform=Win95
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.*) Gecko/* K-Meleon/0.9*]
-Parent=K-Meleon
-Version=0.9
-MajorVer=0
-MinorVer=9
-Platform=WinXP
+[Mozilla/5.0 (Windows; *; Win98; *; rv:1.*) Gecko/* K-Meleon/1.1*]
+Parent=K-Meleon 1.1
+Version=1.0
+MajorVer=1
+MinorVer=0
+Platform=Win98
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.*) Gecko/* K-Meleon/1.0*]
-Parent=K-Meleon
+[Mozilla/5.0 (Windows; *; Windows NT 5.0; *; rv:1.*) Gecko/* K-Meleon?1.1*]
+Parent=K-Meleon 1.1
+Version=1.0
+MajorVer=1
+MinorVer=0
+Platform=Win2000
+Win32=true
+
+[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.*) Gecko/* K-Meleon/1.1*]
+Parent=K-Meleon 1.1
Version=1.0
MajorVer=1
MinorVer=0
Platform=WinXP
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.*) Gecko/* K-Meleon/0.7*]
-Parent=K-Meleon
-Version=0.7
-MajorVer=0
-MinorVer=7
+[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.*) Gecko/* K-Meleon/1.1*]
+Parent=K-Meleon 1.1
+Version=1.0
+MajorVer=1
+MinorVer=0
Platform=Win2003
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.*) Gecko/* K-Meleon/0.8*]
-Parent=K-Meleon
-Version=0.8
-MajorVer=0
-MinorVer=8
-Platform=Win2003
+[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.*) Gecko/* K-Meleon/1.1*]
+Parent=K-Meleon 1.1
+Version=1.0
+MajorVer=1
+MinorVer=0
+Platform=WinNT
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.*) Gecko/* K-Meleon/0.9*]
-Parent=K-Meleon
-Version=0.9
-MajorVer=0
-MinorVer=9
-Platform=Win2003
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; K-Meleon 1.5
+
+[K-Meleon 1.5]
+Parent=DefaultProperties
+Browser=K-Meleon
+Version=1.5
+MajorVer=1
+MinorVer=5
Win32=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.*) Gecko/* K-Meleon/1.0*]
-Parent=K-Meleon
+[Mozilla/5.0 (Windows; *; Win95; *; rv:1.*) Gecko/* K-Meleon/1.5*]
+Parent=K-Meleon 1.5
Version=1.0
MajorVer=1
MinorVer=0
-Platform=Win2003
+Platform=Win95
Win32=true
-[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.*) Gecko/* K-Meleon/0.7*]
-Parent=K-Meleon
-Version=0.7
-MajorVer=0
-MinorVer=7
-Platform=WinNT
+[Mozilla/5.0 (Windows; *; Win98; *; rv:1.*) Gecko/* K-Meleon/1.5*]
+Parent=K-Meleon 1.5
+Version=1.0
+MajorVer=1
+MinorVer=0
+Platform=Win98
Win32=true
-[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.*) Gecko/* K-Meleon/0.8*]
-Parent=K-Meleon
-Version=0.8
-MajorVer=0
-MinorVer=8
-Platform=WinNT
+[Mozilla/5.0 (Windows; *; Windows NT 5.0; *; rv:1.*) Gecko/* K-Meleon?1.5*]
+Parent=K-Meleon 1.5
+Version=1.0
+MajorVer=1
+MinorVer=0
+Platform=Win2000
Win32=true
-[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.*) Gecko/* K-Meleon/0.9*]
-Parent=K-Meleon
-Version=0.9
-MajorVer=0
-MinorVer=9
-Platform=WinNT
+[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.*) Gecko/* K-Meleon/1.5*]
+Parent=K-Meleon 1.5
+Version=1.0
+MajorVer=1
+MinorVer=0
+Platform=WinXP
Win32=true
-[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.*) Gecko/* K-Meleon/1.0*]
-Parent=K-Meleon
+[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.*) Gecko/* K-Meleon/1.5*]
+Parent=K-Meleon 1.5
Version=1.0
MajorVer=1
MinorVer=0
-Platform=WinNT
+Platform=Win2003
Win32=true
-[Mozilla/5.0 (X11; *; Linux*; *; rv:1.*) Gecko/* K-Meleon?0.7*]
-Parent=K-Meleon
-Version=0.7
-MajorVer=0
-MinorVer=7
-Platform=Linux
-Win32=false
+[Mozilla/5.0 (Windows; *; Windows NT 6.0; *; rv:1.*) Gecko/* K-Meleon/1.5*]
+Parent=K-Meleon 1.5
+Platform=WinVista
-[Mozilla/5.0 (X11; *; Linux*; *; rv:1.*) Gecko/* K-Meleon?0.8*]
-Parent=K-Meleon
-Version=0.8
-MajorVer=0
-MinorVer=8
-Platform=Linux
-Win32=false
+[Mozilla/5.0 (Windows; *; Windows NT 6.1; *; rv:1.*) Gecko/* K-Meleon/1.5*]
+Parent=K-Meleon 1.5
+Platform=Win7
-[Mozilla/5.0 (X11; *; Linux*; *; rv:1.*) Gecko/* K-Meleon?0.9*]
-Parent=K-Meleon
-Version=0.9
-MajorVer=0
-MinorVer=9
-Platform=Linux
-Win32=false
-
-[Mozilla/5.0 (X11; *; Linux*; *; rv:1.*) Gecko/* K-Meleon?1.0*]
-Parent=K-Meleon
+[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.*) Gecko/* K-Meleon/1.5*]
+Parent=K-Meleon 1.5
Version=1.0
MajorVer=1
MinorVer=0
-Platform=Linux
-Win32=false
+Platform=WinNT
+Win32=true
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Konqueror
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Konqueror 3.0
-[Konqueror]
+[Konqueror 3.0]
Parent=DefaultProperties
Browser=Konqueror
Platform=Linux
@@ -9276,23 +8590,18 @@ IFrames=true
Tables=true
Cookies=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
-[*Konqueror/2.*]
-Parent=Konqueror
-IFrames=false
-
[*Konqueror/3.0*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.0
MajorVer=3
MinorVer=0
IFrames=false
[*Konqueror/3.0*FreeBSD*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.0
MajorVer=3
MinorVer=0
@@ -9300,7 +8609,7 @@ Platform=FreeBSD
IFrames=false
[*Konqueror/3.0*Linux*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.0
MajorVer=3
MinorVer=0
@@ -9308,404 +8617,219 @@ Platform=Linux
IFrames=false
[*Konqueror/3.1*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.1
MajorVer=3
MinorVer=1
[*Konqueror/3.1*FreeBSD*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.1
MajorVer=3
MinorVer=1
Platform=FreeBSD
[*Konqueror/3.1*Linux*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.1
MajorVer=3
MinorVer=1
[*Konqueror/3.2*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.2
MajorVer=3
MinorVer=2
[*Konqueror/3.2*FreeBSD*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.2
MajorVer=3
MinorVer=2
Platform=FreeBSD
[*Konqueror/3.2*Linux*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.2
MajorVer=3
MinorVer=2
Platform=Linux
[*Konqueror/3.3*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.3
MajorVer=3
MinorVer=3
[*Konqueror/3.3*FreeBSD*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.3
MajorVer=3
MinorVer=3
Platform=FreeBSD
[*Konqueror/3.3*Linux*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.3
MajorVer=3
MinorVer=3
Platform=Linux
[*Konqueror/3.3*OpenBSD*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.3
MajorVer=3
MinorVer=3
Platform=OpenBSD
[*Konqueror/3.4*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.4
MajorVer=3
MinorVer=4
[*Konqueror/3.4*FreeBSD*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.4
MajorVer=3
MinorVer=4
Platform=FreeBSD
[*Konqueror/3.4*Linux*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.4
MajorVer=3
MinorVer=4
Platform=Linux
[*Konqueror/3.4*OpenBSD*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.4
MajorVer=3
MinorVer=4
Platform=OpenBSD
[*Konqueror/3.5*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.5
MajorVer=3
MinorVer=5
[*Konqueror/3.5*FreeBSD*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.5
MajorVer=3
MinorVer=5
Platform=FreeBSD
[*Konqueror/3.5*Linux*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.5
MajorVer=3
MinorVer=5
Platform=Linux
[*Konqueror/3.5*OpenBSD*]
-Parent=Konqueror
+Parent=Konqueror 3.0
Version=3.5
MajorVer=3
MinorVer=5
Platform=OpenBSD
-[Konqueror*]
-Parent=Konqueror
-IFrames=false
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Konqueror 4.0
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Lycoris Desktop/LX
-
-[Lycoris Desktop/LX]
+[Konqueror 4.0]
Parent=DefaultProperties
-Browser=Lycoris Desktop/LX
+Browser=Konqueror
+Version=4.0
+MajorVer=4
Frames=true
IFrames=true
Tables=true
Cookies=true
-JavaApplets=true
JavaScript=true
-Crawler=true
+CssVersion=2
+supportsCSS=true
-[Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.*: Desktop/LX Amethyst) Gecko/*]
-Parent=Lycoris Desktop/LX
-Version=1.1
-MajorVer=1
-MinorVer=1
-Platform=Linux
+[Mozilla/5.0 (compatible; Konqueror/4.0*; Debian) KHTML/4.* (like Gecko)]
+Parent=Konqueror 4.0
+Platform=Debian
-[Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.*; Desktop/LX Amethyst) Gecko/*]
-Parent=Lycoris Desktop/LX
-Version=1.0
-MajorVer=1
-MinorVer=0
+[Mozilla/5.0 (compatible; Konqueror/4.0.*; *Linux) KHTML/4.* (like Gecko)]
+Parent=Konqueror 4.0
Platform=Linux
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Mosaic
-
-[Mosaic]
-Parent=DefaultProperties
-Browser=Mosaic
-Frames=true
-IFrames=true
-Tables=true
-Cookies=true
-JavaApplets=true
-JavaScript=true
-
-[Mozilla/4.0 (VMS_Mosaic)]
-Parent=Mosaic
-Platform=OpenVMS
-
-[VMS_Mosaic/3.7*]
-Parent=Mosaic
-Version=3.7
-MajorVer=3
-MinorVer=7
-Platform=OpenVMS
+[Mozilla/5.0 (compatible; Konqueror/4.0.*; FreeBSD) KHTML/4.* (like Gecko)]
+Parent=Konqueror 4.0
+Platform=FreeBSD
-[VMS_Mosaic/3.8*]
-Parent=Mosaic
-Version=3.8
-MajorVer=3
-MinorVer=8
-Platform=OpenVMS
+[Mozilla/5.0 (compatible; Konqueror/4.0.*; NetBSD) KHTML/4.* (like Gecko)]
+Parent=Konqueror 4.0
+Platform=NetBSD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; NetPositive
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Konqueror 4.1
-[NetPositive]
+[Konqueror 4.1]
Parent=DefaultProperties
-Browser=NetPositive
-Platform=BeOS
+Browser=Konqueror
+Version=4.1
+MajorVer=4
+MinorVer=1
Frames=true
IFrames=true
Tables=true
Cookies=true
-JavaApplets=true
-JavaScript=true
-
-[*NetPositive/2.2*]
-Parent=NetPositive
-Version=2.2
-MajorVer=2
-MinorVer=2
-
-[*NetPositive/2.2*BeOS*]
-Parent=NetPositive
-Version=2.2
-MajorVer=2
-MinorVer=2
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; OmniWeb
-
-[OmniWeb]
-Parent=DefaultProperties
-Browser=OmniWeb
-Frames=true
-Tables=true
-Cookies=true
-JavaApplets=true
JavaScript=true
-WAP=true
-isMobileDevice=true
-CSS=2
CssVersion=2
supportsCSS=true
-[Mozilla/* (compatible; MSIE *; Mac_PowerPC) OmniWeb/4.0*]
-Parent=OmniWeb
-Version=4.0
-MajorVer=4
-MinorVer=0
-Platform=MacPPC
-
-[Mozilla/* (compatible; MSIE *; Mac_PowerPC) OmniWeb/4.1*]
-Parent=OmniWeb
-Version=4.1
-MajorVer=4
-MinorVer=1
-Platform=MacPPC
-
-[Mozilla/* (compatible; MSIE *; Mac_PowerPC) OmniWeb/4.2*]
-Parent=OmniWeb
-Version=4.2
-MajorVer=4
-MinorVer=2
-Platform=MacPPC
-
-[Mozilla/* (compatible; MSIE *; Mac_PowerPC) OmniWeb/4.3*]
-Parent=OmniWeb
-Version=4.3
-MajorVer=4
-MinorVer=3
-Platform=MacPPC
-
-[Mozilla/* (compatible; MSIE *; Mac_PowerPC) OmniWeb/4.4*]
-Parent=OmniWeb
-Version=4.4
-MajorVer=4
-MinorVer=4
-Platform=MacPPC
-
-[Mozilla/* (compatible; MSIE *; Windows *) OmniWeb/4.0*]
-Parent=OmniWeb
-Version=4.0
-MajorVer=4
-MinorVer=0
-Platform=Win32
-Win32=true
-
-[Mozilla/* (compatible; MSIE *; Windows *) OmniWeb/4.1*]
-Parent=OmniWeb
-Version=4.1
-MajorVer=4
-MinorVer=1
-Platform=Win32
-Win32=true
-
-[Mozilla/* (compatible; MSIE *; Windows *) OmniWeb/4.2*]
-Parent=OmniWeb
-Version=4.2
-MajorVer=4
-MinorVer=2
-Platform=Win32
-Win32=true
-
-[Mozilla/* (compatible; MSIE *; Windows *) OmniWeb/4.3*]
-Parent=OmniWeb
-Version=4.3
-MajorVer=4
-MinorVer=3
-Platform=Win32
-Win32=true
-
-[Mozilla/* (compatible; MSIE *; Windows *) OmniWeb/4.4*]
-Parent=OmniWeb
-Version=4.4
-MajorVer=4
-MinorVer=4
-Platform=Win32
-Win32=true
-
-[Mozilla/* (compatible; OmniWeb/4.0*; Mac_PowerPC)]
-Parent=OmniWeb
-Version=4.0
-MajorVer=4
-MinorVer=0
-Platform=MacPPC
-
-[Mozilla/* (compatible; OmniWeb/4.1*; Mac_PowerPC)]
-Parent=OmniWeb
-Version=4.1
-MajorVer=4
-MinorVer=1
-Platform=MacPPC
-
-[Mozilla/* (compatible; OmniWeb/4.2*; Mac_PowerPC)]
-Parent=OmniWeb
-Version=4.2
-MajorVer=4
-MinorVer=2
-Platform=MacPPC
+[Mozilla/5.0 (compatible; Konqueror/4.1*; *Linux*) KHTML/4.* (like Gecko)*]
+Parent=Konqueror 4.1
+Platform=Linux
-[Mozilla/* (compatible; OmniWeb/4.3*; Mac_PowerPC)]
-Parent=OmniWeb
-Version=4.3
-MajorVer=4
-MinorVer=3
-Platform=MacPPC
+[Mozilla/5.0 (compatible; Konqueror/4.1*; Debian) KHTML/4.* (like Gecko)*]
+Parent=Konqueror 4.1
+Platform=Debian
-[Mozilla/* (compatible; OmniWeb/4.4*; Mac_PowerPC)]
-Parent=OmniWeb
-Version=4.4
-MajorVer=4
-MinorVer=4
-Platform=MacPPC
+[Mozilla/5.0 (compatible; Konqueror/4.1*; FreeBSD) KHTML/4.* (like Gecko)*]
+Parent=Konqueror 4.1
+Platform=FreeBSD
-[Mozilla/* (Macintosh; I; PPC) OmniWeb/4.0*]
-Parent=OmniWeb
-Version=4.0
-Platform=MacPPC
+[Mozilla/5.0 (compatible; Konqueror/4.1*; NetBSD) KHTML/4.* (like Gecko)*]
+Parent=Konqueror 4.1
+Platform=NetBSD
-[Mozilla/* (Macintosh; I; PPC) OmniWeb/4.1*]
-Parent=OmniWeb
-Version=4.1
-MajorVer=4
-MinorVer=1
-Platform=MacPPC
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Konqueror 4.2
-[Mozilla/* (Macintosh; I; PPC) OmniWeb/4.2*]
-Parent=OmniWeb
+[Konqueror 4.2]
+Parent=DefaultProperties
+Browser=Konqueror
Version=4.2
MajorVer=4
MinorVer=2
-Platform=MacPPC
-
-[Mozilla/* (Macintosh; I; PPC) OmniWeb/4.3*]
-Parent=OmniWeb
-Version=4.3
-MajorVer=4
-MinorVer=3
-Platform=MacPPC
-
-[Mozilla/* (Macintosh; I; PPC) OmniWeb/4.4*]
-Parent=OmniWeb
-Version=4.4
-MajorVer=4
-MinorVer=4
-Platform=MacPPC
-
-[Mozilla/5.0 (Macintosh; U; *Mac OS X; *) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.*]
-Parent=OmniWeb
-Version=5.1
-MajorVer=5
-MinorVer=1
-Platform=MacOSX
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
-[Mozilla/5.0 (Macintosh; U; *Mac OS X; *) AppleWebKit/420* (KHTML, like Gecko, Safari*) OmniWeb/v5*]
-Parent=OmniWeb
-Version=5.5
-MajorVer=5
-MinorVer=5
-Platform=MacOSX
+[Mozilla/5.0 (compatible; Konqueror/4.2*; *Linux*) KHTML/4.* (like Gecko)*]
+Parent=Konqueror 4.2
+Platform=Linux
-[Mozilla/5.0 (Macintosh; U; *Mac OS X; *) AppleWebKit/420* (KHTML, like Gecko, Safari/420) OmniWeb/v6*]
-Parent=OmniWeb
-Version=5.5
-MajorVer=5
-MinorVer=5
-Platform=MacOSX
+[Mozilla/5.0 (compatible; Konqueror/4.2*; Debian) KHTML/4.* (like Gecko)*]
+Parent=Konqueror 4.2
+Platform=Debian
-[Mozilla/5.0 (Macintosh; U; *Mac OS X; *) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v496*]
-Parent=OmniWeb
-Version=4.5
-MajorVer=4
-MinorVer=5
-Platform=MacOSX
+[Mozilla/5.0 (compatible; Konqueror/4.2*; FreeBSD) KHTML/4.* (like Gecko)*]
+Parent=Konqueror 4.2
+Platform=FreeBSD
-[Mozilla/5.0 (Macintosh; U; *Mac OS X; *) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.*]
-Parent=OmniWeb
-Version=5.0
-MajorVer=5
-MinorVer=0
-Platform=MacOSX
+[Mozilla/5.0 (compatible; Konqueror/4.2*; NetBSD) KHTML/4.* (like Gecko)*]
+Parent=Konqueror 4.2
+Platform=NetBSD
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Safari
@@ -9720,7 +8844,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.3
@@ -9784,11 +8907,14 @@ Version=1.0
MajorVer=1
MinorVer=0
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SeaMonkey
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Safari 3.0
-[SeaMonkey]
+[Safari 3.0]
Parent=DefaultProperties
-Browser=SeaMonkey
+Browser=Safari
+Version=3.0
+MajorVer=3
+Platform=MacOSX
Frames=true
IFrames=true
Tables=true
@@ -9796,61 +8922,37 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
-[Mozilla/5.0 (Windows; U; Win98; *) Gecko/* SeaMonkey/1.0*]
-Parent=SeaMonkey
-Version=1.0
-MajorVer=1
-MinorVer=0
-Platform=Win98
-Win32=true
-
-[Mozilla/5.0 (Windows; U; Windows NT 5.0; *) Gecko/* SeaMonkey/1.0*]
-Parent=SeaMonkey
-Version=1.0
-MajorVer=1
-MinorVer=0
-Platform=Win2000
-Win32=true
+[Mozilla/5.0 (Macintosh; ?; *Mac OS X*) AppleWebKit/* (*) Version/3.0* Safari/*]
+Parent=Safari 3.0
+Platform=MacOSX
-[Mozilla/5.0 (Windows; U; Windows NT 5.1; *) Gecko/* SeaMonkey/1.0*]
-Parent=SeaMonkey
-Version=1.0
-MajorVer=1
-MinorVer=0
+[Mozilla/5.0 (Windows; ?; Windows NT 5.1; *) AppleWebKit/* (*) Version/3.0* Safari/*]
+Parent=Safari 3.0
Platform=WinXP
-Win32=true
-[Mozilla/5.0 (Windows; U; Windows NT 5.2; *) Gecko/* SeaMonkey/1.0*]
-Parent=SeaMonkey
-Version=1.0
-MajorVer=1
-MinorVer=0
+[Mozilla/5.0 (Windows; ?; Windows NT 5.2; *) AppleWebKit/* (*) Version/3.0* Safari/*]
+Parent=Safari 3.0
Platform=Win2003
-Win32=true
-[Mozilla/5.0 (X11; U; FreeBSD*) Gecko/* SeaMonkey/1.0*]
-Parent=SeaMonkey
-Version=1.0
-MajorVer=1
-MinorVer=0
-Platform=FreeBSD
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) AppleWebKit/* (*) Version/3.0* Safari/*]
+Parent=Safari 3.0
+Platform=WinVista
-[Mozilla/5.0 (X11; U; Linux*) Gecko/* SeaMonkey/1.0*]
-Parent=SeaMonkey
-Version=1.0
-MajorVer=1
-MinorVer=0
-Platform=Linux
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) AppleWebKit/* (*) Version/3.0* Safari/*]
+Parent=Safari 3.0
+Platform=Win7
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Shiira
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Safari 3.1
-[Shiira]
+[Safari 3.1]
Parent=DefaultProperties
-Browser=Shiira
+Browser=Safari
+Version=3.1
+MajorVer=3
+MinorVer=1
Platform=MacOSX
Frames=true
IFrames=true
@@ -9859,1086 +8961,362 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
-[Mozilla/5.0 (Macintosh; *Mac OS X*) AppleWebKit/* (*) Shiira/0.9*]
-Parent=Shiira
-Version=0.9
-MajorVer=0
-MinorVer=9
+[Mozilla/5.0 (Macintosh; ?; *Mac OS X*) AppleWebKit/* (*) Version/3.1* Safari/*]
+Parent=Safari 3.1
+Platform=MacOSX
-[Mozilla/5.0 (Macintosh; *Mac OS X*) AppleWebKit/* (*) Shiira/1.0*]
-Parent=Shiira
-Version=1.0
-MajorVer=1
-MinorVer=0
+[Mozilla/5.0 (Windows; ?; Windows NT 5.1; *) AppleWebKit/* (*) Version/3.1* Safari/*]
+Parent=Safari 3.1
+Platform=WinXP
-[Mozilla/5.0 (Macintosh; *Mac OS X*) AppleWebKit/* (*) Shiira/1.1*]
-Parent=Shiira
-Version=1.1
-MajorVer=1
-MinorVer=1
+[Mozilla/5.0 (Windows; ?; Windows NT 5.2; *) AppleWebKit/* (*) Version/3.1* Safari/*]
+Parent=Safari 3.1
+Platform=Win2003
-[Mozilla/5.0 (Macintosh; *Mac OS X*) AppleWebKit/* (*) Shiira/1.2*]
-Parent=Shiira
-Version=1.2
-MajorVer=1
-MinorVer=2
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) AppleWebKit/* (*) Version/3.1* Safari/*]
+Parent=Safari 3.1
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) AppleWebKit/* (*) Version/3.1* Safari/*]
+Parent=Safari 3.1
+Platform=Win7
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 4.0
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Safari 3.2
-[Opera 4.0]
+[Safari 3.2]
Parent=DefaultProperties
-Browser=Opera
-Version=4
-MajorVer=4
+Browser=Safari
+Version=3.2
+MajorVer=3
+MinorVer=2
Frames=true
+IFrames=true
Tables=true
+Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=1
-CssVersion=1
+CssVersion=3
supportsCSS=true
-[Mozilla/3.0 (Linux*; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Linux
-
-[Mozilla/3.0 (Mac_PowerPC; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=MacPPC
-
-[Mozilla/3.0 (Windows 2000; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win2000
-Win32=true
-
-[Mozilla/3.0 (Windows 95; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win95
-Win32=true
-
-[Mozilla/3.0 (Windows 98; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win98
-Win32=true
-
-[Mozilla/3.0 (Windows ME; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinME
-Win32=true
-
-[Mozilla/3.0 (Windows NT 4.0; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinNT
-Win32=true
-
-[Mozilla/3.0 (Windows XP; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinXP
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Linux*) Opera 4.*]
-Parent=Opera 4.0
-Platform=Linux
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) Opera 4.*]
-Parent=Opera 4.0
-Platform=MacPPC
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win2000
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win95
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win98
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinME
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinNT
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinXP
-Win32=true
-
-[Mozilla/4.73 (Windows 98; U) Opera 4.*]
-Parent=Opera 4.0
-MinorVer=02
-Win32=true
-
-[Mozilla/4.76 (Macintosh;US;PPC) Opera 4.*]
-Parent=Opera 4.0
-Platform=MacPPC
-
-[Mozilla/4.78 (Linux*; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Linux
-
-[Mozilla/4.78 (Mac_PowerPC; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=MacPPC
-
-[Mozilla/4.78 (Windows 2000; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win2000
-Win32=true
-
-[Mozilla/4.78 (Windows 95; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win95
-Win32=true
-
-[Mozilla/4.78 (Windows 98; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win98
-Win32=true
-
-[Mozilla/4.78 (Windows ME; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinME
-Win32=true
-
-[Mozilla/4.78 (Windows NT 4.0; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinNT
-Win32=true
-
-[Mozilla/4.78 (Windows XP; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinXP
-Win32=true
-
-[Mozilla/5.0 (Linux*; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Linux
-
-[Mozilla/5.0 (Mac_PowerPC; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=MacPPC
-
-[Mozilla/5.0 (Windows 2000; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win2000
-Win32=true
-
-[Mozilla/5.0 (Windows 95; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win95
-Win32=true
-
-[Mozilla/5.0 (Windows 98; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=Win98
-Win32=true
-
-[Mozilla/5.0 (Windows ME; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinME
-Win32=true
-
-[Mozilla/5.0 (Windows NT 4.0; U) Opera 4.*]
-Parent=Opera 4.0
-Platform=WinNT
-Win32=true
+[Mozilla/5.0 (Macintosh; ?; *Mac OS X*) AppleWebKit/* (*) Version/3.2* Safari/*]
+Parent=Safari 3.2
+Platform=MacOSX
-[Mozilla/5.0 (Windows XP; U) Opera 4.*]
-Parent=Opera 4.0
+[Mozilla/5.0 (Windows; ?; Windows NT 5.1; *) AppleWebKit/* (*) Version/3.2* Safari/*]
+Parent=Safari 3.2
Platform=WinXP
-Win32=true
-
-[Opera/4.* (Linux*; U)*]
-Parent=Opera 4.0
-Platform=Linux
-
-[Opera/4.* (Mac_PowerPC; U)*]
-Parent=Opera 4.0
-Platform=MacPPC
-
-[Opera/4.* (Windows 2000; U)*]
-Parent=Opera 4.0
-Platform=Win2000
-Win32=true
-
-[Opera/4.* (Windows 95; U)*]
-Parent=Opera 4.0
-Platform=Win95
-Win32=true
-
-[Opera/4.* (Windows 98; U)*]
-Parent=Opera 4.0
-Platform=Win98
-Win32=true
-[Opera/4.* (Windows ME; U)*]
-Parent=Opera 4.0
-Platform=WinME
-Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 5.2; *) AppleWebKit/* (*) Version/3.2* Safari/*]
+Parent=Safari 3.2
+Platform=Win2003
-[Opera/4.* (Windows NT 4.0; U)*]
-Parent=Opera 4.0
-Platform=WinNT
-Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) AppleWebKit/* (*) Version/3.2* Safari/*]
+Parent=Safari 3.2
+Platform=WinVista
-[Opera/4.* (Windows XP; U)*]
-Parent=Opera 4.0
-Platform=WinXP
-Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) AppleWebKit/* (*) Version/3.2* Safari/*]
+Parent=Safari 3.2
+Platform=Win7
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 5.0
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Safari 4.0
-[Opera 5.0]
+[Safari 4.0]
Parent=DefaultProperties
-Browser=Opera
-Version=5.0
-MajorVer=5
+Browser=Safari
+Version=4.0
+MajorVer=4
+Beta=true
Frames=true
+IFrames=true
Tables=true
Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=1
-CssVersion=1
+CssVersion=3
supportsCSS=true
-[Mozilla/3.0 (Linux*; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Linux
-
-[Mozilla/3.0 (Mac_PowerPC; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=MacPPC
-
-[Mozilla/3.0 (Windows 2000; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win2000
-Win32=true
-
-[Mozilla/3.0 (Windows 95; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win95
-Win32=true
-
-[Mozilla/3.0 (Windows 98; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win98
-Win32=true
-
-[Mozilla/3.0 (Windows ME; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=WinME
-Win32=true
-
-[Mozilla/3.0 (Windows NT 4.0; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=WinNT
-Win32=true
-
-[Mozilla/3.0 (Windows XP; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=WinXP
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Linux*) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Linux
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) Opera 5.0*]
-Parent=Opera 5.0
-Platform=MacPPC
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win2000
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win95
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win98
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.0*]
-Parent=Opera 5.0
-Platform=WinME
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) Opera 5.0*]
-Parent=Opera 5.0
-Platform=WinNT
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 5.0*]
-Parent=Opera 5.0
-Platform=WinXP
-Win32=true
-
-[Mozilla/4.76 (Macintosh;US;PPC) Opera 5.0*]
-Parent=Opera 5.0
-Platform=MacPPC
-
-[Mozilla/4.78 (Linux*; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Linux
-
-[Mozilla/4.78 (Mac_PowerPC; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=MacPPC
-
-[Mozilla/4.78 (Windows 2000; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win2000
-Win32=true
-
-[Mozilla/4.78 (Windows 95; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win95
-Win32=true
-
-[Mozilla/4.78 (Windows 98; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win98
-Win32=true
-
-[Mozilla/4.78 (Windows ME; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=WinME
-Win32=true
+[Mozilla/5.0 (Macintosh; ?; *Mac OS X*; *) AppleWebKit/* (KHTML, like Gecko) Version/4.0* Safari/*]
+Parent=Safari 4.0
+Platform=MacOSX
-[Mozilla/4.78 (Windows NT 4.0; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=WinNT
-Win32=true
+[Mozilla/5.0 (Macintosh; U; *Mac OS X*; *) AppleWebKit/* (KHTML, like Gecko) Version/4 Public Beta Safari/*]
+Parent=Safari 4.0
-[Mozilla/4.78 (Windows XP; ?) Opera 5.0*]
-Parent=Opera 5.0
+[Mozilla/5.0 (Windows; ?; Windows NT 5.1; *) AppleWebKit/* (*) Version/4 Public Beta Safari/*]
+Parent=Safari 4.0
Platform=WinXP
-Win32=true
-
-[Mozilla/5.0 (Linux*; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Linux
-
-[Mozilla/5.0 (Mac_PowerPC; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=MacPPC
-
-[Mozilla/5.0 (SunOS*; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=SunOS
-
-[Mozilla/5.0 (Windows 2000; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win2000
-Win32=true
-
-[Mozilla/5.0 (Windows 95; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win95
-Win32=true
-
-[Mozilla/5.0 (Windows 98; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=Win98
-Win32=true
-
-[Mozilla/5.0 (Windows ME; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=WinME
-Win32=true
-[Mozilla/5.0 (Windows NT 4.0; ?) Opera 5.0*]
-Parent=Opera 5.0
-Platform=WinNT
-Win32=true
-
-[Mozilla/5.0 (Windows XP; ?) Opera 5.0*]
-Parent=Opera 5.0
+[Mozilla/5.0 (Windows; ?; Windows NT 5.1; *) AppleWebKit/* (*) Version/4.0* Safari/*]
+Parent=Safari 4.0
Platform=WinXP
-Win32=true
-[Opera/5.0*(Linux*; ?)*]
-Parent=Opera 5.0
-Platform=Linux
+[Mozilla/5.0 (Windows; ?; Windows NT 5.2; *) AppleWebKit/* (*) Version/4 Public Beta Safari/*]
+Parent=Safari 4.0
+Platform=Win2003
-[Opera/5.0*(Mac_PowerPC; ?)*]
-Parent=Opera 5.0
-Platform=MacPPC
+[Mozilla/5.0 (Windows; ?; Windows NT 5.2; *) AppleWebKit/* (*) Version/4.0* Safari/*]
+Parent=Safari 4.0
+Platform=Win2003
-[Opera/5.0*(Windows 2000; ?)*]
-Parent=Opera 5.0
-Platform=Win2000
-Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) AppleWebKit/* (*) Version/4 Public Beta Safari/*]
+Parent=Safari 4.0
+Platform=WinVista
-[Opera/5.0*(Windows 95; ?)*]
-Parent=Opera 5.0
-Platform=Win95
-Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) AppleWebKit/* (*) Version/4.0* Safari/*]
+Parent=Safari 4.0
+Platform=WinVista
-[Opera/5.0*(Windows 98; ?)*]
-Parent=Opera 5.0
-Platform=Win98
-Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) AppleWebKit/* (*) Version/4 Public Beta Safari/*]
+Parent=Safari 4.0
+Platform=Win7
-[Opera/5.0*(Windows ME; ?)*]
-Parent=Opera 5.0
-Platform=WinME
-Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) AppleWebKit/* (*) Version/4.0* Safari/*]
+Parent=Safari 4.0
+Platform=Win7
-[Opera/5.0*(Windows NT 4.0; ?)*]
-Parent=Opera 5.0
-Platform=WinNT
-Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 7.0; *) AppleWebKit/* (*) Version/4 Public Beta Safari/*]
+Parent=Safari 4.0
+Platform=Win7
-[Opera/5.0*(Windows XP; ?)*]
-Parent=Opera 5.0
-Platform=WinXP
-Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 7.0; *) AppleWebKit/* (*) Version/4.0* Safari/*]
+Parent=Safari 4.0
+Platform=Win7
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 5.12
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 10.0
-[Opera 5.12]
+[Opera 10.0]
Parent=DefaultProperties
Browser=Opera
-Version=5.12
-MajorVer=5
-MinorVer=12
+Version=10.0
+MajorVer=10
+Alpha=true
Frames=true
+IFrames=true
Tables=true
Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=1
-CssVersion=1
+CssVersion=2
supportsCSS=true
-[Mozilla/3.0 (Linux*; ?) Opera 5.12*]
-Parent=Opera 5.12
+[Mozilla/* (compatible; MSIE*; Linux*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Linux
-[Mozilla/3.0 (OS/2*; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=OS/2
-
-[Mozilla/3.0 (Windows 2000; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Win2000
-Win32=true
-
-[Mozilla/3.0 (Windows 95; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Win95
-Win32=true
-
-[Mozilla/3.0 (Windows 98; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Win98
-Win32=true
-
-[Mozilla/3.0 (Windows ME; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinME
-Win32=true
-
-[Mozilla/3.0 (Windows NT 4.0; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinNT
-Win32=true
-
-[Mozilla/3.0 (Windows XP; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinXP
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Linux*) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Linux
-
-[Mozilla/4.0 (compatible; MSIE 5.0; OS/2*) Opera 5.12*]
-Parent=Opera 5.12
-Platform=OS/2
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Win2000
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Win95
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Win98
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinME
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinNT
-Win32=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinXP
-Win32=true
+[Mozilla/* (compatible; MSIE*; Mac_PowerPC Mac OS X;*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=MacOSX
-[Mozilla/4.76 (Macintosh;US;PPC) Opera 5.12*]
-Parent=Opera 5.12
+[Mozilla/* (compatible; MSIE*; Mac_PowerPC) Opera 10.0*]
+Parent=Opera 10.0
Platform=MacPPC
-[Mozilla/4.76 (Windows ME; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinME
-Win32=true
-
-[Mozilla/4.78 (Linux*; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Linux
-
-[Mozilla/4.78 (OS/2*; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=OS/2
-
-[Mozilla/4.78 (Windows 2000; ?) Opera 5.12*]
-Parent=Opera 5.12
+[Mozilla/* (compatible; MSIE*; Windows 2000*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Win2000
Win32=true
-[Mozilla/4.78 (Windows 95; ?) Opera 5.12*]
-Parent=Opera 5.12
+[Mozilla/* (compatible; MSIE*; Windows 95*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Win95
Win32=true
-[Mozilla/4.78 (Windows 98; ?) Opera 5.12*]
-Parent=Opera 5.12
+[Mozilla/* (compatible; MSIE*; Windows 98*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Win98
Win32=true
-[Mozilla/4.78 (Windows ME; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinME
-Win32=true
-
-[Mozilla/4.78 (Windows NT 4.0; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinNT
-Win32=true
-
-[Mozilla/4.78 (Windows XP; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinXP
-Win32=true
-
-[Mozilla/5.0 (Linux*; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Linux
-
-[Mozilla/5.0 (OS/2*; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=OS/2
-
-[Mozilla/5.0 (Windows 2000; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Win2000
-Win32=true
-
-[Mozilla/5.0 (Windows 95; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Win95
-Win32=true
-
-[Mozilla/5.0 (Windows 98; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=Win98
+[Mozilla/* (compatible; MSIE*; Windows CE*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=WinCE
Win32=true
-[Mozilla/5.0 (Windows ME; ?) Opera 5.12*]
-Parent=Opera 5.12
+[Mozilla/* (compatible; MSIE*; Windows ME*) Opera 10.0*]
+Parent=Opera 10.0
Platform=WinME
Win32=true
-[Mozilla/5.0 (Windows NT 4.0; ?) Opera 5.12*]
-Parent=Opera 5.12
+[Mozilla/* (compatible; MSIE*; Windows NT 4.0*) Opera 10.0*]
+Parent=Opera 10.0
Platform=WinNT
Win32=true
-[Mozilla/5.0 (Windows XP; ?) Opera 5.12*]
-Parent=Opera 5.12
-Platform=WinXP
-Win32=true
-
-[Opera/5.12 (Linux*; ?)*]
-Parent=Opera 5.12
-Platform=Linux
-
-[Opera/5.12 (OS/2*; ?)*]
-Parent=Opera 5.12
-Platform=OS/2
-
-[Opera/5.12 (Windows 2000; ?)*]
-Parent=Opera 5.12
+[Mozilla/* (compatible; MSIE*; Windows NT 5.0*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Win2000
Win32=true
-[Opera/5.12 (Windows 95; ?)*]
-Parent=Opera 5.12
-Platform=Win95
-Win32=true
-
-[Opera/5.12 (Windows 98; ?)*]
-Parent=Opera 5.12
-Platform=Win98
-Win32=true
-
-[Opera/5.12 (Windows ME; ?)*]
-Parent=Opera 5.12
-Platform=WinME
-Win32=true
-
-[Opera/5.12 (Windows NT 4.0; ?)*]
-Parent=Opera 5.12
-Platform=WinNT
-Win32=true
-
-[Opera/5.12 (Windows XP; ?)*]
-Parent=Opera 5.12
+[Mozilla/* (compatible; MSIE*; Windows NT 5.1*) Opera 10.0*]
+Parent=Opera 10.0
Platform=WinXP
Win32=true
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 6.0
-
-[Opera 6.0]
-Parent=DefaultProperties
-Browser=Opera
-Version=6.0
-MajorVer=6
-Frames=true
-IFrames=true
-Tables=true
-Cookies=true
-BackgroundSounds=true
-JavaApplets=true
-JavaScript=true
-CSS=1
-CssVersion=1
-supportsCSS=true
-
-[Mozilla/3.0 (Linux*; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=Linux
-
-[Mozilla/3.0 (Mac_PowerPC; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=MacPPC
-
-[Mozilla/3.0 (Windows 2000; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=Win2000
-Win32=true
-
-[Mozilla/3.0 (Windows 95; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=Win95
+[Mozilla/* (compatible; MSIE*; Windows NT 5.2*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=Win2003
Win32=true
-[Mozilla/3.0 (Windows 98; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=Win98
+[Mozilla/* (compatible; MSIE*; Windows NT 6.0*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=WinVista
Win32=true
-[Mozilla/3.0 (Windows ME; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=WinME
-Win32=true
+[Mozilla/* (compatible; MSIE*; Windows NT 6.1*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=Win7
-[Mozilla/3.0 (Windows NT 4.0; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=WinNT
-Win32=true
-
-[Mozilla/3.0 (Windows XP; ?) Opera 6.0*]
-Parent=Opera 6.0
+[Mozilla/* (compatible; MSIE*; Windows XP*) Opera 10.0*]
+Parent=Opera 10.0
Platform=WinXP
Win32=true
-[Mozilla/4.0 (compatible; MSIE 5.0; Linux*) Opera 6.0*]
-Parent=Opera 6.0
+[Mozilla/* (compatible; MSIE*; X11; FreeBSD*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=FreeBSD
+
+[Mozilla/* (compatible; MSIE*; X11; Linux*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Linux
-[Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) Opera 6.0*]
-Parent=Opera 6.0
-Platform=MacPPC
+[Mozilla/* (compatible; MSIE*; X11; SunOS*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=SunOS
-[Mozilla/4.0 (compatible; MSIE 5.0; Macintosh; PPC) Opera 6.0*]
-Parent=Opera 6.0
-Platform=MacPPC
+[Mozilla/* (Macintosh; *Mac OS X; ?) Opera 10.0*]
+Parent=Opera 10.0
+Platform=MacOSX
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.0*]
-Parent=Opera 6.0
+[Mozilla/* (Windows 2000;*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Win2000
Win32=true
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.0*]
-Parent=Opera 6.0
+[Mozilla/* (Windows 95;*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Win95
Win32=true
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.0*]
-Parent=Opera 6.0
+[Mozilla/* (Windows 98;*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Win98
Win32=true
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 6.0*]
-Parent=Opera 6.0
+[Mozilla/* (Windows ME;*) Opera 10.0*]
+Parent=Opera 10.0
Platform=WinME
Win32=true
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) Opera 6.0*]
-Parent=Opera 6.0
+[Mozilla/* (Windows NT 4.0;*) Opera 10.0*]
+Parent=Opera 10.0
Platform=WinNT
Win32=true
-[Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.0*]
-Parent=Opera 6.0
-Platform=WinXP
-Win32=true
-
-[Mozilla/4.76 (Macintosh;US;PPC) Opera 6.0*]
-Parent=Opera 6.0
-Platform=MacPPC
-
-[Mozilla/4.78 (Linux*; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=Linux
-
-[Mozilla/4.78 (Mac_PowerPC; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=MacPPC
-
-[Mozilla/4.78 (Windows 2000; ?) Opera 6.0*]
-Parent=Opera 6.0
+[Mozilla/* (Windows NT 5.0;*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Win2000
Win32=true
-[Mozilla/4.78 (Windows 95; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=Win95
-Win32=true
-
-[Mozilla/4.78 (Windows 98; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=Win98
+[Mozilla/* (Windows NT 5.1;*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=WinXP
Win32=true
-[Mozilla/4.78 (Windows ME; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=WinME
+[Mozilla/* (Windows NT 5.2;*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=Win2003
Win32=true
-[Mozilla/4.78 (Windows NT 4.0; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=WinNT
-Win32=true
+[Mozilla/* (Windows NT 6.0;*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=WinVista
-[Mozilla/4.78 (Windows XP; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=WinXP
-Win32=true
+[Mozilla/* (Windows NT 6.1;*) Opera 10.0*]
+Parent=Opera 10.0
+Platform=Win7
-[Mozilla/5.0 (Linux*; ?) Opera 6.0*]
-Parent=Opera 6.0
+[Mozilla/* (X11; Linux*) Opera 10.0*]
+Parent=Opera 10.0
Platform=Linux
-[Mozilla/5.0 (Mac_PowerPC; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=MacPPC
+[Opera/10.0* (Linux*)*]
+Parent=Opera 10.0
+Platform=Linux
-[Mozilla/5.0 (Windows 2000; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=Win2000
-Win32=true
+[Opera/10.0* (Macintosh; *Mac OS X;*)*]
+Parent=Opera 10.0
+Platform=MacOSX
-[Mozilla/5.0 (Windows 95; ?) Opera 6.0*]
-Parent=Opera 6.0
+[Opera/10.0* (Windows 95*)*]
+Parent=Opera 10.0
Platform=Win95
Win32=true
-[Mozilla/5.0 (Windows 98; ?) Opera 6.0*]
-Parent=Opera 6.0
+[Opera/10.0* (Windows 98*)*]
+Parent=Opera 10.0
Platform=Win98
Win32=true
-[Mozilla/5.0 (Windows ME; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=WinME
-Win32=true
-
-[Mozilla/5.0 (Windows NT 4.0; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=WinNT
-Win32=true
-
-[Mozilla/5.0 (Windows XP; ?) Opera 6.0*]
-Parent=Opera 6.0
-Platform=WinXP
-Win32=true
-
-[Opera/6.0* (Linux*; ?)*]
-Parent=Opera 6.0
-Platform=Linux
-
-[Opera/6.0* (Mac_PowerPC; ?)*]
-Parent=Opera 6.0
-Platform=MacPPC
-
-[Opera/6.0* (Windows 2000; ?)*]
-Parent=Opera 6.0
-Platform=Win2000
-Win32=true
-
-[Opera/6.0* (Windows 95; ?)*]
-Parent=Opera 6.0
-Platform=Win95
-Win32=true
-
-[Opera/6.0* (Windows 98; ?)*]
-Parent=Opera 6.0
-Platform=Win98
+[Opera/10.0* (Windows CE*)*]
+Parent=Opera 10.0
+Platform=WinCE
Win32=true
-[Opera/6.0* (Windows ME; ?)*]
-Parent=Opera 6.0
+[Opera/10.0* (Windows ME*)*]
+Parent=Opera 10.0
Platform=WinME
Win32=true
-[Opera/6.0* (Windows NT 4.0; ?)*]
-Parent=Opera 6.0
+[Opera/10.0* (Windows NT 4.0*)*]
+Parent=Opera 10.0
Platform=WinNT
Win32=true
-[Opera/6.0* (Windows NT 5.0; ?)*]
-Parent=Opera 6.0
+[Opera/10.0* (Windows NT 5.0*)*]
+Parent=Opera 10.0
Platform=Win2000
Win32=true
-[Opera/6.0* (Windows NT 5.1; ?)*]
-Parent=Opera 6.0
+[Opera/10.0* (Windows NT 5.1*)*]
+Parent=Opera 10.0
Platform=WinXP
Win32=true
-[Opera/6.0* (Windows NT 5.2; ?)*]
-Parent=Opera 6.0
+[Opera/10.0* (Windows NT 5.2*)*]
+Parent=Opera 10.0
Platform=Win2003
Win32=true
-[Opera/6.0* (Windows XP; ?)*]
-Parent=Opera 6.0
-Platform=WinXP
+[Opera/10.0* (Windows NT 6.0*)*]
+Parent=Opera 10.0
+Platform=WinVista
Win32=true
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 6.1
-
-[Opera 6.1]
-Parent=DefaultProperties
-Browser=Opera
-Version=6.1
-MajorVer=6
-MinorVer=1
-Frames=true
-IFrames=true
-Tables=true
-Cookies=true
-BackgroundSounds=true
-JavaApplets=true
-JavaScript=true
-CSS=1
-CssVersion=1
-supportsCSS=true
-
-[Mozilla/3.0 (FreeBSD*; ?) Opera 6.1 *]
-Parent=Opera 6.1
-Platform=FreeBSD
-
-[Mozilla/3.0 (Linux*; ?) Opera 6.1 *]
-Parent=Opera 6.1
-Platform=Linux
-
-[Mozilla/3.0 (Linux*; ?) Opera 6.11 *]
-Parent=Opera 6.1
-Version=6.11
-MinorVer=11
-Platform=Linux
-
-[Mozilla/4.0 (compatible; MSIE 5.0; FreeBSD*) Opera 6.1 *]
-Parent=Opera 6.1
-Platform=FreeBSD
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Linux*) Opera 6.1 *]
-Parent=Opera 6.1
-Platform=Linux
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Linux*) Opera 6.11 *]
-Parent=Opera 6.1
-MinorVer=11
-Platform=Linux
-CSS=1
-CssVersion=1
-supportsCSS=true
-
-[Mozilla/4.0 (compatible; MSIE 5.0; Linux*) Opera 6.12 *]
-Parent=Opera 6.1
-Version=6.12
-MinorVer=12
-Platform=Linux
+[Opera/10.0* (Windows NT 6.1*)*]
+Parent=Opera 10.0
+Platform=Win7
-[Mozilla/4.0 (compatible; MSIE 5.0; UNIX) Opera 6.1 *]
-Parent=Opera 6.1
-Platform=Unix
-
-[Mozilla/4.0 (compatible; MSIE 5.0; UNIX) Opera 6.11 *]
-Parent=Opera 6.1
-MinorVer=11
-
-[Mozilla/4.0 (compatible; MSIE 5.0; UNIX) Opera 6.12 *]
-Parent=Opera 6.1
-Version=6.12
-MinorVer=12
-Platform=Unix
-
-[Mozilla/4.78 (FreeBSD*; ?) Opera 6.1 *]
-Parent=Opera 6.1
-Platform=FreeBSD
-
-[Mozilla/4.78 (Linux*; ?) Opera 6.1 *]
-Parent=Opera 6.1
-Platform=Linux
-
-[Mozilla/4.78 (Linux*; ?) Opera 6.11 *]
-Parent=Opera 6.1
-Version=6.11
-MinorVer=11
-Platform=Linux
-
-[Mozilla/4.78 (Linux*; ?) Opera 6.12 *]
-Parent=Opera 6.1
-Version=6.12
-MinorVer=12
-Platform=Linux
-
-[Mozilla/4.78 (UNIX; ?) Opera 6.1 *]
-Parent=Opera 6.1
-Platform=Unix
-
-[Mozilla/5.0 (FreeBSD*; ?) Opera 6.1 *]
-Parent=Opera 6.1
-Platform=FreeBSD
-
-[Mozilla/5.0 (Linux*; ?) Opera 6.1 *]
-Parent=Opera 6.1
-Platform=Linux
-
-[Mozilla/5.0 (Linux*; ?) Opera 6.11 *]
-Parent=Opera 6.1
-MinorVer=11
-
-[Mozilla/5.0 (UNIX; ?) Opera 6.11 *]
-Parent=Opera 6.1
-Version=6.11
-MajorVer=6
-MinorVer=11
-Platform=Unix
-
-[Opera/6.1 (FreeBSD*; ?)*]
-Parent=Opera 6.1
-Platform=FreeBSD
-
-[Opera/6.1 (Linux*; ?)*]
-Parent=Opera 6.1
-Platform=Linux
-
-[Opera/6.1 (UNIX*; ?)*]
-Parent=Opera 6.1
-Platform=Unix
-
-[Opera/6.11 (FreeBSD*; ?)*]
-Parent=Opera 6.1
-Version=6.11
-MinorVer=11
-Platform=FreeBSD
-
-[Opera/6.11 (Linux*; ?)*]
-Parent=Opera 6.1
-Version=6.11
-MinorVer=11
-Platform=Linux
-CSS=1
-CssVersion=1
-supportsCSS=true
-
-[Opera/6.11 (UNIX*; ?)*]
-Parent=Opera 6.1
-Platform=Unix
+[Opera/10.0* (Windows XP*)*]
+Parent=Opera 10.0
+Platform=WinXP
+Win32=true
-[Opera/6.12 (FreeBSD*; ?)*]
-Parent=Opera 6.1
-Version=6.12
-MinorVer=12
+[Opera/10.0* (X11; FreeBSD*)*]
+Parent=Opera 10.0
Platform=FreeBSD
-[Opera/6.12 (Linux*; ?)*]
-Parent=Opera 6.1
-Version=6.12
-MinorVer=12
+[Opera/10.0* (X11; Linux*)*]
+Parent=Opera 10.0
Platform=Linux
-[Opera/6.12 (OpenBSD*; ?) *]
-Parent=Opera 6.1
-Version=6.12
-MinorVer=12
-Platform=OpenBSD
-
-[Opera/6.12 (SunOS*; ?)*]
-Parent=Opera 6.1
-Version=6.12
-MajorVer=6
-MinorVer=12
+[Opera/10.0* (X11; SunOS*)*]
+Parent=Opera 10.0
Platform=SunOS
-IFrames=false
-
-[Opera/6.12 (UNIX*; ?)*]
-Parent=Opera 6.1
-Version=6.12
-MinorVer=12
-Platform=Unix
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 7.0
@@ -10954,7 +9332,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -11158,7 +9535,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -11291,7 +9667,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -11455,7 +9830,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -11635,7 +10009,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -11814,7 +10187,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -12012,7 +10384,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -12206,7 +10577,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.3
@@ -12409,7 +10779,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.5
@@ -12623,7 +10992,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -12820,15 +11188,18 @@ Platform=FreeBSD
Parent=Opera 9.1
Platform=Linux
+[Opera/9.1* (X11; SunOS*)*]
+Parent=Opera 9.1
+Platform=SunOS
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 9.2
[Opera 9.2]
Parent=DefaultProperties
-Browser=Opera 9.2
+Browser=Opera
Version=9.2
MajorVer=9
MinorVer=2
-Beta=true
Frames=true
IFrames=true
Tables=true
@@ -12836,7 +11207,6 @@ Cookies=true
BackgroundSounds=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -12902,6 +11272,10 @@ Parent=Opera 9.2
Platform=WinVista
Win32=true
+[Mozilla/* (compatible; MSIE*; Windows NT 6.1*) Opera 9.2*]
+Parent=Opera 9.2
+Platform=Win7
+
[Mozilla/* (compatible; MSIE*; Windows XP*) Opera 9.2*]
Parent=Opera 9.2
Platform=WinXP
@@ -12963,6 +11337,14 @@ Parent=Opera 9.2
Platform=Win2003
Win32=true
+[Mozilla/* (Windows NT 6.0;*) Opera 9.2*]
+Parent=Opera 9.2
+Platform=WinVista
+
+[Mozilla/* (Windows NT 6.1;*) Opera 9.2*]
+Parent=Opera 9.2
+Platform=Win7
+
[Mozilla/* (X11; Linux*) Opera 9.2*]
Parent=Opera 9.2
Platform=Linux
@@ -13020,6 +11402,10 @@ Parent=Opera 9.2
Platform=WinVista
Win32=true
+[Opera/9.2* (Windows NT 6.1*)*]
+Parent=Opera 9.2
+Platform=Win7
+
[Opera/9.2* (Windows XP*)*]
Parent=Opera 9.2
Platform=WinXP
@@ -13033,6 +11419,934 @@ Platform=FreeBSD
Parent=Opera 9.2
Platform=Linux
+[Opera/9.2* (X11; SunOS*)*]
+Parent=Opera 9.2
+Platform=SunOS
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 9.3
+
+[Opera 9.3]
+Parent=DefaultProperties
+Browser=Opera
+Version=9.3
+MajorVer=9
+MinorVer=3
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+BackgroundSounds=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/* (compatible; MSIE*; Linux*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Linux
+
+[Mozilla/* (compatible; MSIE*; Mac_PowerPC Mac OS X;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=MacOSX
+
+[Mozilla/* (compatible; MSIE*; Mac_PowerPC) Opera 9.3*]
+Parent=Opera 9.3
+Platform=MacPPC
+
+[Mozilla/* (compatible; MSIE*; Windows 2000*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows 95*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win95
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows 98*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win98
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows CE*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=WinCE
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows ME*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=WinME
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 4.0*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=WinNT
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.0*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.1*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.2*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win2003
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 6.0*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=WinVista
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 6.1*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win7
+
+[Mozilla/* (compatible; MSIE*; Windows XP*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; X11; FreeBSD*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=FreeBSD
+
+[Mozilla/* (compatible; MSIE*; X11; Linux*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Linux
+
+[Mozilla/* (compatible; MSIE*; X11; SunOS*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=SunOS
+
+[Mozilla/* (Macintosh; *Mac OS X; ?) Opera 9.3*]
+Parent=Opera 9.3
+Platform=MacOSX
+
+[Mozilla/* (Windows 2000;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (Windows 95;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win95
+Win32=true
+
+[Mozilla/* (Windows 98;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win98
+Win32=true
+
+[Mozilla/* (Windows ME;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=WinME
+Win32=true
+
+[Mozilla/* (Windows NT 4.0;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=WinNT
+Win32=true
+
+[Mozilla/* (Windows NT 5.0;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (Windows NT 5.1;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (Windows NT 5.2;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win2003
+Win32=true
+
+[Mozilla/* (Windows NT 6.0;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=WinVista
+
+[Mozilla/* (Windows NT 6.1;*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Win7
+
+[Mozilla/* (X11; Linux*) Opera 9.3*]
+Parent=Opera 9.3
+Platform=Linux
+
+[Opera/9.3* (Linux*)*]
+Parent=Opera 9.3
+Platform=Linux
+
+[Opera/9.3* (Macintosh; *Mac OS X;*)*]
+Parent=Opera 9.3
+Platform=MacOSX
+
+[Opera/9.3* (Windows 95*)*]
+Parent=Opera 9.3
+Platform=Win95
+Win32=true
+
+[Opera/9.3* (Windows 98*)*]
+Parent=Opera 9.3
+Platform=Win98
+Win32=true
+
+[Opera/9.3* (Windows CE*)*]
+Parent=Opera 9.3
+Platform=WinCE
+Win32=true
+
+[Opera/9.3* (Windows ME*)*]
+Parent=Opera 9.3
+Platform=WinME
+Win32=true
+
+[Opera/9.3* (Windows NT 4.0*)*]
+Parent=Opera 9.3
+Platform=WinNT
+Win32=true
+
+[Opera/9.3* (Windows NT 5.0*)*]
+Parent=Opera 9.3
+Platform=Win2000
+Win32=true
+
+[Opera/9.3* (Windows NT 5.1*)*]
+Parent=Opera 9.3
+Platform=WinXP
+Win32=true
+
+[Opera/9.3* (Windows NT 5.2*)*]
+Parent=Opera 9.3
+Platform=Win2003
+Win32=true
+
+[Opera/9.3* (Windows NT 6.0*)*]
+Parent=Opera 9.3
+Platform=WinVista
+Win32=true
+
+[Opera/9.3* (Windows NT 6.1*)*]
+Parent=Opera 9.3
+Platform=Win7
+
+[Opera/9.3* (Windows XP*)*]
+Parent=Opera 9.3
+Platform=WinXP
+Win32=true
+
+[Opera/9.3* (X11; FreeBSD*)*]
+Parent=Opera 9.3
+Platform=FreeBSD
+
+[Opera/9.3* (X11; Linux*)*]
+Parent=Opera 9.3
+Platform=Linux
+
+[Opera/9.3* (X11; SunOS*)*]
+Parent=Opera 9.3
+Platform=SunOS
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 9.4
+
+[Opera 9.4]
+Parent=DefaultProperties
+Browser=Opera
+Version=9.4
+MajorVer=9
+MinorVer=4
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+BackgroundSounds=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/* (compatible; MSIE*; Linux*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Linux
+
+[Mozilla/* (compatible; MSIE*; Mac_PowerPC Mac OS X;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=MacOSX
+
+[Mozilla/* (compatible; MSIE*; Mac_PowerPC) Opera 9.4*]
+Parent=Opera 9.4
+Platform=MacPPC
+
+[Mozilla/* (compatible; MSIE*; Windows 2000*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows 95*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win95
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows 98*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win98
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows CE*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=WinCE
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows ME*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=WinME
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 4.0*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=WinNT
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.0*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.1*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.2*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win2003
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 6.0*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=WinVista
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 6.1*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win7
+
+[Mozilla/* (compatible; MSIE*; Windows XP*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; X11; FreeBSD*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=FreeBSD
+
+[Mozilla/* (compatible; MSIE*; X11; Linux*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Linux
+
+[Mozilla/* (compatible; MSIE*; X11; SunOS*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=SunOS
+
+[Mozilla/* (Macintosh; *Mac OS X; ?) Opera 9.4*]
+Parent=Opera 9.4
+Platform=MacOSX
+
+[Mozilla/* (Windows 2000;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (Windows 95;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win95
+Win32=true
+
+[Mozilla/* (Windows 98;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win98
+Win32=true
+
+[Mozilla/* (Windows ME;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=WinME
+Win32=true
+
+[Mozilla/* (Windows NT 4.0;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=WinNT
+Win32=true
+
+[Mozilla/* (Windows NT 5.0;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (Windows NT 5.1;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (Windows NT 5.2;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win2003
+Win32=true
+
+[Mozilla/* (Windows NT 6.0;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=WinVista
+
+[Mozilla/* (Windows NT 6.1;*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Win7
+
+[Mozilla/* (X11; Linux*) Opera 9.4*]
+Parent=Opera 9.4
+Platform=Linux
+
+[Opera/9.4* (Linux*)*]
+Parent=Opera 9.4
+Platform=Linux
+
+[Opera/9.4* (Macintosh; *Mac OS X;*)*]
+Parent=Opera 9.4
+Platform=MacOSX
+
+[Opera/9.4* (Windows 95*)*]
+Parent=Opera 9.4
+Platform=Win95
+Win32=true
+
+[Opera/9.4* (Windows 98*)*]
+Parent=Opera 9.4
+Platform=Win98
+Win32=true
+
+[Opera/9.4* (Windows CE*)*]
+Parent=Opera 9.4
+Platform=WinCE
+Win32=true
+
+[Opera/9.4* (Windows ME*)*]
+Parent=Opera 9.4
+Platform=WinME
+Win32=true
+
+[Opera/9.4* (Windows NT 4.0*)*]
+Parent=Opera 9.4
+Platform=WinNT
+Win32=true
+
+[Opera/9.4* (Windows NT 5.0*)*]
+Parent=Opera 9.4
+Platform=Win2000
+Win32=true
+
+[Opera/9.4* (Windows NT 5.1*)*]
+Parent=Opera 9.4
+Platform=WinXP
+Win32=true
+
+[Opera/9.4* (Windows NT 5.2*)*]
+Parent=Opera 9.4
+Platform=Win2003
+Win32=true
+
+[Opera/9.4* (Windows NT 6.0*)*]
+Parent=Opera 9.4
+Platform=WinVista
+Win32=true
+
+[Opera/9.4* (Windows NT 6.1*)*]
+Parent=Opera 9.4
+Platform=Win7
+
+[Opera/9.4* (Windows XP*)*]
+Parent=Opera 9.4
+Platform=WinXP
+Win32=true
+
+[Opera/9.4* (X11; FreeBSD*)*]
+Parent=Opera 9.4
+Platform=FreeBSD
+
+[Opera/9.4* (X11; Linux*)*]
+Parent=Opera 9.4
+Platform=Linux
+
+[Opera/9.4* (X11; SunOS*)*]
+Parent=Opera 9.4
+Platform=SunOS
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 9.5
+
+[Opera 9.5]
+Parent=DefaultProperties
+Browser=Opera
+Version=9.5
+MajorVer=9
+MinorVer=5
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+BackgroundSounds=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/* (compatible; MSIE*; Linux*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Linux
+
+[Mozilla/* (compatible; MSIE*; Mac_PowerPC Mac OS X;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=MacOSX
+
+[Mozilla/* (compatible; MSIE*; Mac_PowerPC) Opera 9.5*]
+Parent=Opera 9.5
+Platform=MacPPC
+
+[Mozilla/* (compatible; MSIE*; Windows 2000*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows 95*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win95
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows 98*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win98
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows CE*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=WinCE
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows ME*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=WinME
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 4.0*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=WinNT
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.0*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.1*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.2*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win2003
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 6.0*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=WinVista
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 6.1*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win7
+
+[Mozilla/* (compatible; MSIE*; Windows XP*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; X11; FreeBSD*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=FreeBSD
+
+[Mozilla/* (compatible; MSIE*; X11; Linux*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Linux
+
+[Mozilla/* (compatible; MSIE*; X11; SunOS*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=SunOS
+
+[Mozilla/* (Macintosh; *Mac OS X; ?) Opera 9.5*]
+Parent=Opera 9.5
+Platform=MacOSX
+
+[Mozilla/* (Windows 2000;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (Windows 95;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win95
+Win32=true
+
+[Mozilla/* (Windows 98;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win98
+Win32=true
+
+[Mozilla/* (Windows ME;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=WinME
+Win32=true
+
+[Mozilla/* (Windows NT 4.0;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=WinNT
+Win32=true
+
+[Mozilla/* (Windows NT 5.0;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (Windows NT 5.1;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (Windows NT 5.2;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win2003
+Win32=true
+
+[Mozilla/* (Windows NT 6.0;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=WinVista
+
+[Mozilla/* (Windows NT 6.1;*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Win7
+
+[Mozilla/* (X11; Linux*) Opera 9.5*]
+Parent=Opera 9.5
+Platform=Linux
+
+[Opera/9.5* (Linux*)*]
+Parent=Opera 9.5
+Platform=Linux
+
+[Opera/9.5* (Macintosh; *Mac OS X;*)*]
+Parent=Opera 9.5
+Platform=MacOSX
+
+[Opera/9.5* (Windows 95*)*]
+Parent=Opera 9.5
+Platform=Win95
+Win32=true
+
+[Opera/9.5* (Windows 98*)*]
+Parent=Opera 9.5
+Platform=Win98
+Win32=true
+
+[Opera/9.5* (Windows CE*)*]
+Parent=Opera 9.5
+Platform=WinCE
+Win32=true
+
+[Opera/9.5* (Windows ME*)*]
+Parent=Opera 9.5
+Platform=WinME
+Win32=true
+
+[Opera/9.5* (Windows NT 4.0*)*]
+Parent=Opera 9.5
+Platform=WinNT
+Win32=true
+
+[Opera/9.5* (Windows NT 5.0*)*]
+Parent=Opera 9.5
+Platform=Win2000
+Win32=true
+
+[Opera/9.5* (Windows NT 5.1*)*]
+Parent=Opera 9.5
+Platform=WinXP
+Win32=true
+
+[Opera/9.5* (Windows NT 5.2*)*]
+Parent=Opera 9.5
+Platform=Win2003
+Win32=true
+
+[Opera/9.5* (Windows NT 6.0*)*]
+Parent=Opera 9.5
+Platform=WinVista
+Win32=true
+
+[Opera/9.5* (Windows NT 6.1*)*]
+Parent=Opera 9.5
+Platform=Win7
+
+[Opera/9.5* (Windows XP*)*]
+Parent=Opera 9.5
+Platform=WinXP
+Win32=true
+
+[Opera/9.5* (X11; FreeBSD*)*]
+Parent=Opera 9.5
+Platform=FreeBSD
+
+[Opera/9.5* (X11; Linux*)*]
+Parent=Opera 9.5
+Platform=Linux
+
+[Opera/9.5* (X11; SunOS*)*]
+Parent=Opera 9.5
+Platform=SunOS
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Opera 9.6
+
+[Opera 9.6]
+Parent=DefaultProperties
+Browser=Opera
+Version=9.6
+MajorVer=9
+MinorVer=6
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+BackgroundSounds=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/* (compatible; MSIE*; Linux*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Linux
+
+[Mozilla/* (compatible; MSIE*; Mac_PowerPC Mac OS X;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=MacOSX
+
+[Mozilla/* (compatible; MSIE*; Mac_PowerPC) Opera 9.6*]
+Parent=Opera 9.6
+Platform=MacPPC
+
+[Mozilla/* (compatible; MSIE*; Windows 2000*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows 95*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win95
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows 98*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win98
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows CE*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=WinCE
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows ME*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=WinME
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 4.0*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=WinNT
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.0*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.1*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 5.2*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win2003
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 6.0*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=WinVista
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; Windows NT 6.1*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win7
+
+[Mozilla/* (compatible; MSIE*; Windows XP*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (compatible; MSIE*; X11; FreeBSD*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=FreeBSD
+
+[Mozilla/* (compatible; MSIE*; X11; Linux*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Linux
+
+[Mozilla/* (compatible; MSIE*; X11; SunOS*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=SunOS
+
+[Mozilla/* (Macintosh; *Mac OS X; ?) Opera 9.6*]
+Parent=Opera 9.6
+Platform=MacOSX
+
+[Mozilla/* (Windows 2000;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (Windows 95;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win95
+Win32=true
+
+[Mozilla/* (Windows 98;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win98
+Win32=true
+
+[Mozilla/* (Windows ME;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=WinME
+Win32=true
+
+[Mozilla/* (Windows NT 4.0;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=WinNT
+Win32=true
+
+[Mozilla/* (Windows NT 5.0;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win2000
+Win32=true
+
+[Mozilla/* (Windows NT 5.1;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=WinXP
+Win32=true
+
+[Mozilla/* (Windows NT 5.2;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win2003
+Win32=true
+
+[Mozilla/* (Windows NT 6.0;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=WinVista
+
+[Mozilla/* (Windows NT 6.1;*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Win7
+
+[Mozilla/* (X11; Linux*) Opera 9.6*]
+Parent=Opera 9.6
+Platform=Linux
+
+[Opera/9.6* (Linux*)*]
+Parent=Opera 9.6
+Platform=Linux
+
+[Opera/9.6* (Macintosh; *Mac OS X;*)*]
+Parent=Opera 9.6
+Platform=MacOSX
+
+[Opera/9.6* (Windows 95*)*]
+Parent=Opera 9.6
+Platform=Win95
+Win32=true
+
+[Opera/9.6* (Windows 98*)*]
+Parent=Opera 9.6
+Platform=Win98
+Win32=true
+
+[Opera/9.6* (Windows CE*)*]
+Parent=Opera 9.6
+Platform=WinCE
+Win32=true
+
+[Opera/9.6* (Windows ME*)*]
+Parent=Opera 9.6
+Platform=WinME
+Win32=true
+
+[Opera/9.6* (Windows NT 4.0*)*]
+Parent=Opera 9.6
+Platform=WinNT
+Win32=true
+
+[Opera/9.6* (Windows NT 5.0*)*]
+Parent=Opera 9.6
+Platform=Win2000
+Win32=true
+
+[Opera/9.6* (Windows NT 5.1*)*]
+Parent=Opera 9.6
+Platform=WinXP
+Win32=true
+
+[Opera/9.6* (Windows NT 5.2*)*]
+Parent=Opera 9.6
+Platform=Win2003
+Win32=true
+
+[Opera/9.6* (Windows NT 6.0*)*]
+Parent=Opera 9.6
+Platform=WinVista
+Win32=true
+
+[Opera/9.6* (Windows NT 6.1*)*]
+Parent=Opera 9.6
+Platform=Win7
+
+[Opera/9.6* (Windows XP*)*]
+Parent=Opera 9.6
+Platform=WinXP
+Win32=true
+
+[Opera/9.6* (X11; FreeBSD*)*]
+Parent=Opera 9.6
+Platform=FreeBSD
+
+[Opera/9.6* (X11; Linux*)*]
+Parent=Opera 9.6
+Platform=Linux
+
+[Opera/9.6* (X11; SunOS*)*]
+Parent=Opera 9.6
+Platform=SunOS
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Netscape 4.0
[Netscape 4.0]
@@ -13045,7 +12359,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=1
CssVersion=1
supportsCSS=true
@@ -13088,7 +12401,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=1
CssVersion=1
supportsCSS=true
@@ -13184,7 +12496,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=1
CssVersion=1
supportsCSS=true
@@ -13192,9 +12503,6 @@ supportsCSS=true
Parent=Netscape 4.6
Platform=OS/2
-[Mozilla/4.6*(CJPENNYCATE 3.2.11££tst 101000562$$)]
-Parent=Netscape 4.6
-
[Mozilla/4.6*(Macintosh; ?; PPC)]
Parent=Netscape 4.6
Platform=MacPPC
@@ -13257,7 +12565,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=1
CssVersion=1
supportsCSS=true
@@ -13773,7 +13080,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=1
CssVersion=1
supportsCSS=true
@@ -13836,7 +13142,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -13874,6 +13179,18 @@ Parent=Netscape 6.0
Platform=WinXP
Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 5.2; *) Gecko/* Netscape6/6.0*]
+Parent=Netscape 6.0
+Platform=WinXP
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) Gecko/* Netscape6/6.0*]
+Parent=Netscape 6.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) Gecko/* Netscape6/6.0*]
+Parent=Netscape 6.0
+Platform=Win7
+
[Mozilla/5.0 (Windows; ?; WinNT4.0; *) Gecko/* Netscape6/6.0*]
Parent=Netscape 6.0
Platform=WinNT
@@ -13889,6 +13206,18 @@ Parent=Netscape 6.0
Platform=WinXP
Win32=true
+[Mozilla/5.0 (Windows; ?; WinNT5.2; *) Gecko/* Netscape6/6.0*]
+Parent=Netscape 6.0
+Platform=WinXP
+
+[Mozilla/5.0 (Windows; ?; WinNT6.0; *) Gecko/* Netscape6/6.0*]
+Parent=Netscape 6.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; WinNT6.1; *) Gecko/* Netscape6/6.0*]
+Parent=Netscape 6.0
+Platform=Win7
+
[Mozilla/5.0 (X11; ?; *) Gecko/* Netscape6/6.0*]
Parent=Netscape 6.0
Platform=Linux
@@ -13907,7 +13236,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -13945,6 +13273,18 @@ Parent=Netscape 6.1
Platform=WinXP
Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 5.2; *) Gecko/* Netscape6/6.1*]
+Parent=Netscape 6.1
+Platform=WinXP
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) Gecko/* Netscape6/6.1*]
+Parent=Netscape 6.1
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) Gecko/* Netscape6/6.1*]
+Parent=Netscape 6.1
+Platform=Win7
+
[Mozilla/5.0 (Windows; ?; WinNT4.0; *) Gecko/* Netscape6/6.1*]
Parent=Netscape 6.1
Platform=WinNT
@@ -13960,6 +13300,18 @@ Parent=Netscape 6.1
Platform=WinXP
Win32=true
+[Mozilla/5.0 (Windows; ?; WinNT5.2; *) Gecko/* Netscape6/6.1*]
+Parent=Netscape 6.1
+Platform=WinXP
+
+[Mozilla/5.0 (Windows; ?; WinNT6.0; *) Gecko/* Netscape6/6.1*]
+Parent=Netscape 6.1
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; WinNT6.1; *) Gecko/* Netscape6/6.1*]
+Parent=Netscape 6.1
+Platform=Win7
+
[Mozilla/5.0 (X11; ?; *) Gecko/* Netscape6/6.1*]
Parent=Netscape 6.1
Platform=Linux
@@ -13978,7 +13330,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -14029,6 +13380,14 @@ Parent=Netscape 6.2
Platform=Win2003
Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) Gecko/* Netscape6/6.2*]
+Parent=Netscape 6.2
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) Gecko/* Netscape6/6.2*]
+Parent=Netscape 6.2
+Platform=Win7
+
[Mozilla/5.0 (Windows; ?; WinNT4.0; *) Gecko/* Netscape6/6.2*]
Parent=Netscape 6.2
Platform=WinNT
@@ -14049,6 +13408,14 @@ Parent=Netscape 6.2
Platform=Win2003
Win32=true
+[Mozilla/5.0 (Windows; ?; WinNT6.0; *) Gecko/* Netscape6/6.2*]
+Parent=Netscape 6.2
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; WinNT6.1; *) Gecko/* Netscape6/6.2*]
+Parent=Netscape 6.2
+Platform=Win7
+
[Mozilla/5.0 (X11; ?; *) Gecko/* Netscape6/6.2*]
Parent=Netscape 6.2
Platform=Linux
@@ -14066,7 +13433,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -14113,6 +13479,14 @@ Parent=Netscape 7.0
Platform=Win2003
Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) Gecko/* Netscape*/7.0*]
+Parent=Netscape 7.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) Gecko/* Netscape*/7.0*]
+Parent=Netscape 7.0
+Platform=Win7
+
[Mozilla/5.0 (Windows; ?; WinNT4.0; *) Gecko/* Netscape*/7.0*]
Parent=Netscape 7.0
Platform=WinNT
@@ -14133,6 +13507,14 @@ Parent=Netscape 7.0
Platform=Win2003
Win32=true
+[Mozilla/5.0 (Windows; ?; WinNT6.0; *) Gecko/* Netscape*/7.0*]
+Parent=Netscape 7.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; WinNT6.1; *) Gecko/* Netscape*/7.0*]
+Parent=Netscape 7.0
+Platform=Win7
+
[Mozilla/5.0 (X11; ?; *) Gecko/* Netscape*/7.0*]
Parent=Netscape 7.0
Platform=Linux
@@ -14155,7 +13537,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -14211,6 +13592,14 @@ Parent=Netscape 7.1
Platform=Win2003
Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) Gecko/* Netscape*/7.1*]
+Parent=Netscape 7.1
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) Gecko/* Netscape*/7.1*]
+Parent=Netscape 7.1
+Platform=Win7
+
[Mozilla/5.0 (Windows; ?; WinNT4.0; *) Gecko/* Netscape*/7.1*]
Parent=Netscape 7.1
Platform=WinNT
@@ -14231,6 +13620,14 @@ Parent=Netscape 7.1
Platform=Win2003
Win32=true
+[Mozilla/5.0 (Windows; ?; WinNT6.0; *) Gecko/* Netscape*/7.1*]
+Parent=Netscape 7.1
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; WinNT6.1; *) Gecko/* Netscape*/7.1*]
+Parent=Netscape 7.1
+Platform=Win7
+
[Mozilla/5.0 (X11; ?; *) Gecko/* Netscape*/7.1*]
Parent=Netscape 7.1
Platform=Linux
@@ -14253,7 +13650,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -14309,6 +13705,14 @@ Parent=Netscape 7.2
Platform=Win2003
Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) Gecko/* Netscape*/7.2*]
+Parent=Netscape 7.2
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) Gecko/* Netscape*/7.2*]
+Parent=Netscape 7.2
+Platform=Win7
+
[Mozilla/5.0 (Windows; ?; WinNT4.0; *) Gecko/* Netscape*/7.2*]
Parent=Netscape 7.2
Platform=WinNT
@@ -14329,6 +13733,14 @@ Parent=Netscape 7.2
Platform=Win2003
Win32=true
+[Mozilla/5.0 (Windows; ?; WinNT6.0; *) Gecko/* Netscape*/7.2*]
+Parent=Netscape 7.2
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; WinNT6.1; *) Gecko/* Netscape*/7.2*]
+Parent=Netscape 7.2
+Platform=Win7
+
[Mozilla/5.0 (X11; ?; *) Gecko/* Netscape*/7.2*]
Parent=Netscape 7.2
Platform=Linux
@@ -14350,7 +13762,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -14406,6 +13817,14 @@ Parent=Netscape 8.0
Platform=Win2003
Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *) Gecko/* Netscape*/8.0*]
+Parent=Netscape 8.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) Gecko/* Netscape*/8.0*]
+Parent=Netscape 8.0
+Platform=Win7
+
[Mozilla/5.0 (Windows; ?; WinNT4.0; *) Gecko/* Netscape*/8.0*]
Parent=Netscape 8.0
Platform=WinNT
@@ -14426,6 +13845,14 @@ Parent=Netscape 8.0
Platform=Win2003
Win32=true
+[Mozilla/5.0 (Windows; ?; WinNT6.0; *) Gecko/* Netscape*/8.0*]
+Parent=Netscape 8.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; WinNT6.1; *) Gecko/* Netscape*/8.0*]
+Parent=Netscape 8.0
+Platform=Win7
+
[Mozilla/5.0 (X11; ?; *) Gecko/* Netscape*/8.0*]
Parent=Netscape 8.0
Platform=Linux
@@ -14448,7 +13875,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -14505,6 +13931,10 @@ Parent=Netscape 8.1
Platform=WinVista
Win32=true
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *) Gecko/* Netscape*/8.1*]
+Parent=Netscape 8.1
+Platform=Win7
+
[Mozilla/5.0 (Windows; ?; WinNT4.0; *) Gecko/* Netscape*/8.1*]
Parent=Netscape 8.1
Platform=WinNT
@@ -14530,6 +13960,10 @@ Parent=Netscape 8.1
Platform=WinVista
Win32=true
+[Mozilla/5.0 (Windows; ?; WinNT6.1; *) Gecko/* Netscape*/8.1*]
+Parent=Netscape 8.1
+Platform=Win7
+
[Mozilla/5.0 (X11; ?; *) Gecko/* Netscape*/8.1*]
Parent=Netscape 8.1
Platform=Linux
@@ -14538,6 +13972,350 @@ Platform=Linux
Parent=Netscape 8.1
Platform=SunOS
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SeaMonkey 1.0
+
+[SeaMonkey 1.0]
+Parent=DefaultProperties
+Browser=SeaMonkey
+Version=1.0
+MajorVer=1
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+BackgroundSounds=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/5.0 (Macintosh; ?; *Mac OS X*; *; rv:1.8*) Gecko/* SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=MacOSX
+
+[Mozilla/5.0 (Windows; ?; Win 9x 4.90; *; rv:1.8*) Gecko/* SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=WinME
+
+[Mozilla/5.0 (Windows; ?; Win98; *; rv:1.8*) Gecko/* SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=Win98
+
+[Mozilla/5.0 (Windows; ?; Windows NT 5.0; *; rv:1.8*) Gecko/* SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=Win2000
+
+[Mozilla/5.0 (Windows; ?; Windows NT 5.1; *; rv:1.8*) Gecko/* SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=WinXP
+
+[Mozilla/5.0 (Windows; ?; Windows NT 5.2; *; rv:1.8*) Gecko/* SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=Win2003
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *; rv:1.8*) Gecko/* SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *; rv:1.8*) Gecko/* SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=Win7
+
+[Mozilla/5.0 (X11; ?; FreeBSD*; *; rv:1.8*) Gecko/* SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=FreeBSD
+
+[Mozilla/5.0 (X11; ?; Linux*; *; rv:1.8*) Gecko/20060221 SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=Linux
+
+[Mozilla/5.0 (X11; ?; SunOS*; *; rv:1.8*) Gecko/* SeaMonkey/1.0*]
+Parent=SeaMonkey 1.0
+Platform=SunOS
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SeaMonkey 1.1
+
+[SeaMonkey 1.1]
+Parent=DefaultProperties
+Browser=SeaMonkey
+Version=1.1
+MajorVer=1
+MinorVer=1
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+BackgroundSounds=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/5.0 (Macintosh; ?; *Mac OS X*; *; rv:1.8*) Gecko/* SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=MacOSX
+
+[Mozilla/5.0 (Windows; ?; Win 9x 4.90; *; rv:1.8*) Gecko/* SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=WinME
+
+[Mozilla/5.0 (Windows; ?; Win98; *; rv:1.8*) Gecko/* SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=Win98
+
+[Mozilla/5.0 (Windows; ?; Windows NT 5.0; *; rv:1.8*) Gecko/* SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=Win2000
+
+[Mozilla/5.0 (Windows; ?; Windows NT 5.1; *; rv:1.8*) Gecko/* SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=WinXP
+
+[Mozilla/5.0 (Windows; ?; Windows NT 5.2; *; rv:1.8*) Gecko/* SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=Win2003
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *; rv:1.8*) Gecko/* SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *; rv:1.8*) Gecko/* SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=Win7
+
+[Mozilla/5.0 (X11; ?; FreeBSD*; *; rv:1.8*) Gecko/* SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=FreeBSD
+
+[Mozilla/5.0 (X11; ?; Linux*; *; rv:1.8*) Gecko/20060221 SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=Linux
+
+[Mozilla/5.0 (X11; ?; SunOS*; *; rv:1.8*) Gecko/* SeaMonkey/1.1*]
+Parent=SeaMonkey 1.1
+Platform=SunOS
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SeaMonkey 2.0
+
+[SeaMonkey 2.0]
+Parent=DefaultProperties
+Browser=SeaMonkey
+Version=2.0
+MajorVer=2
+Alpha=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+BackgroundSounds=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/5.0 (Macintosh; ?; *Mac OS X*; *; rv:1.9*) Gecko/* SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=MacOSX
+
+[Mozilla/5.0 (Windows; ?; Win 9x 4.90; *; rv:1.9*) Gecko/* SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=WinME
+
+[Mozilla/5.0 (Windows; ?; Win98; *; rv:1.9*) Gecko/* SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=Win98
+
+[Mozilla/5.0 (Windows; ?; Windows NT 5.0; *; rv:1.9*) Gecko/* SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=Win2000
+
+[Mozilla/5.0 (Windows; ?; Windows NT 5.1; *; rv:1.9*) Gecko/* SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=WinXP
+
+[Mozilla/5.0 (Windows; ?; Windows NT 5.2; *; rv:1.9*) Gecko/* SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=Win2003
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.0; *; rv:1.9*) Gecko/* SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; ?; Windows NT 6.1; *; rv:1.9*) Gecko/* SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=Win7
+
+[Mozilla/5.0 (X11; ?; FreeBSD*; *; rv:1.9*) Gecko/* SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=FreeBSD
+
+[Mozilla/5.0 (X11; ?; Linux*; *; rv:1.9*) Gecko/20060221 SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=Linux
+
+[Mozilla/5.0 (X11; ?; SunOS*; *; rv:1.9*) Gecko/* SeaMonkey/2.0*]
+Parent=SeaMonkey 2.0
+Platform=SunOS
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Flock 1.0
+
+[Flock 1.0]
+Parent=DefaultProperties
+Browser=Flock
+Version=1.0
+MajorVer=1
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/5.0 (Macintosh; U; *Mac OS X*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*]
+Parent=Flock 1.0
+Platform=MacOSX
+
+[Mozilla/5.0 (Windows; U; Win 9x 4.90; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*]
+Parent=Flock 1.0
+Platform=WinME
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.0*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*]
+Parent=Flock 1.0
+Platform=Win2000
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.1*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*]
+Parent=Flock 1.0
+Platform=WinXP
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.2*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*]
+Parent=Flock 1.0
+Platform=Win2003
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.0*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*]
+Parent=Flock 1.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.1*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*]
+Parent=Flock 1.0
+Platform=Win7
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Flock 2.0
+
+[Flock 2.0]
+Parent=DefaultProperties
+Browser=Flock
+Version=2.0
+MajorVer=2
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/5.0 (Macintosh; U; *Mac OS X*; *; rv:1.*) Gecko/* Firefox/3.* Flock/2.*]
+Parent=Flock 2.0
+Platform=MacOSX
+
+[Mozilla/5.0 (Windows; U; Win 9x 4.90; *; rv:1.*) Gecko/* Firefox/3.* Flock/2.*]
+Parent=Flock 2.0
+Platform=WinME
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.0*; *; rv:1.*) Gecko/* Firefox/3.* Flock/2.*]
+Parent=Flock 2.0
+Platform=Win2000
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.1*; *; rv:1.*) Gecko/* Firefox/3.* Flock/2.*]
+Parent=Flock 2.0
+Platform=WinXP
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.2*; *; rv:1.*) Gecko/* Firefox/3.* Flock/2.*]
+Parent=Flock 2.0
+Platform=Win2003
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.0*; *; rv:1.*) Gecko/* Firefox/3.* Flock/2.*]
+Parent=Flock 2.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.1*; *; rv:1.*) Gecko/* Firefox/3.* Flock/2.*]
+Parent=Flock 2.0
+Platform=Win7
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleipnir 2.0
+
+[Sleipnir]
+Parent=DefaultProperties
+Browser=Sleipnir
+Version=2.0
+MajorVer=2
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/4.0 (compatible; MSIE ?.0; Windows NT 5.0*) Sleipnir/2.*]
+Parent=Sleipnir
+Platform=Win2000
+
+[Mozilla/4.0 (compatible; MSIE ?.0; Windows NT 5.1*) Sleipnir/2.*]
+Parent=Sleipnir
+Platform=WinXP
+
+[Mozilla/4.0 (compatible; MSIE ?.0; Windows NT 5.2*) Sleipnir/2.*]
+Parent=Sleipnir
+Platform=Win2003
+
+[Mozilla/4.0 (compatible; MSIE ?.0; Windows NT 6.0*) Sleipnir/2.*]
+Parent=Sleipnir
+Platform=WinVista
+
+[Mozilla/4.0 (compatible; MSIE ?.0; Windows NT 6.1*) Sleipnir/2.*]
+Parent=Sleipnir
+Platform=Win7
+
+[Sleipnir*]
+Parent=Sleipnir
+
+[Sleipnir/2.*]
+Parent=Sleipnir
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Fennec 1.0
+
+[Fennec 1.0]
+Parent=DefaultProperties
+Browser=Firefox Mobile
+Version=1.0
+MajorVer=1
+Alpha=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.1; *; rv:1.9*) Gecko/* Fennec/1.0*]
+Parent=Fennec 1.0
+Platform=WinXP
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.0; *; rv:1.9*) Gecko/* Fennec/1.0*]
+Parent=Fennec 1.0
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.1; *; rv:1.9*) Gecko/* Fennec/1.0*]
+Parent=Fennec 1.0
+Platform=Win7
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Firebird
[Firebird]
@@ -14549,7 +14327,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -14645,7 +14422,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.3
@@ -14789,7 +14565,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.3
@@ -14897,7 +14672,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.3
@@ -14993,7 +14767,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.5
@@ -15039,11 +14812,6 @@ Parent=Firefox 1.5
Platform=WinXP
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.*) Gecko/* Firefox/1.5*]
-Parent=Firefox 1.5
-Platform=WinXP
-Win32=true
-
[Mozilla/5.0 (Windows; *; Windows NT 5.2 x64; *; rv:1.*) Gecko/* Firefox/1.5*]
Parent=Firefox 1.5
Platform=WinXP
@@ -15101,7 +14869,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.5
@@ -15111,10 +14878,6 @@ w3cdomversion=1.0
Parent=Firefox 2.0
Platform=Linux
-[Mozilla/5.0 (Macintosh; *; *Mac OS X*; *; rv:1.8*) Gecko/* BonEcho/2.0*]
-Parent=Firefox 2.0
-Platform=MacOSX
-
[Mozilla/5.0 (Macintosh; *; *Mac OS X*; *; rv:1.8*) Gecko/* Firefox/2.0*]
Parent=Firefox 2.0
Platform=MacOSX
@@ -15143,40 +14906,24 @@ Parent=Firefox 2.0
Platform=Win2000
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.0; *; rv:1.8*) Gecko/* BonEcho/2.0*]
-Parent=Firefox 2.0
-Platform=Win2000
-Win32=true
-
-[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.8*) Gecko/* BonEcho/2.0*]
-Parent=Firefox 2.0
-Platform=WinXP
-Win32=true
-
[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.8*) Gecko/* Firefox/2.0*]
Parent=Firefox 2.0
Platform=WinXP
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.8*) Gecko/* BonEcho/2.0*]
-Parent=Firefox 2.0
-Platform=Win2003
-Win32=true
-
[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.8*) Gecko/* Firefox/2.0*]
Parent=Firefox 2.0
Platform=Win2003
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 6.0*; *; rv:1.8*) Gecko/* BonEcho/2.0*]
+[Mozilla/5.0 (Windows; *; Windows NT 6.0; *; rv:1.8*) Gecko/* Firefox/2.0*]
Parent=Firefox 2.0
Platform=WinVista
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 6.0; *; rv:1.8*) Gecko/* Firefox/2.0*]
+[Mozilla/5.0 (Windows; *; Windows NT 6.1; *; rv:1.8*) Gecko/* Firefox/2.0*]
Parent=Firefox 2.0
-Platform=WinVista
-Win32=true
+Platform=Win7
[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.8*) Gecko/* Firefox/2.0*]
Parent=Firefox 2.0
@@ -15199,10 +14946,6 @@ Platform=HP-UX
Parent=Firefox 2.0
Platform=IRIX64
-[Mozilla/5.0 (X11; *; Linux*; *; rv:1.8*) Gecko/* BonEcho/2.0*]
-Parent=Firefox 2.0
-Platform=Linux
-
[Mozilla/5.0 (X11; *; OpenBSD*; *; rv:1.8*) Gecko/* Firefox/2.0*]
Parent=Firefox 2.0
Platform=OpenBSD
@@ -15218,65 +14961,30 @@ Parent=DefaultProperties
Browser=Firefox
Version=3.0
MajorVer=3
-Alpha=true
Frames=true
IFrames=true
Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
-CssVersion=2
+CssVersion=3
supportsCSS=true
ecmascriptversion=1.5
w3cdomversion=1.0
-[Mozilla/5.0 (Linux; *; PPC*; *; rv:1.9*) Gecko/* Firefox/3.0*]
-Parent=Firefox 3.0
-Platform=Linux
-
[Mozilla/5.0 (Macintosh; *; *Mac OS X*; *; rv:1.9*) Gecko/* Firefox/3.0*]
Parent=Firefox 3.0
Platform=MacOSX
-[Mozilla/5.0 (Macintosh; *; *Mac OS X*; *; rv:1.9*) Gecko/* Minefield/3.0*]
-Parent=Firefox 3.0
-Platform=MacOSX
-
-[Mozilla/5.0 (OS/2; *; Warp*; *; rv:1.9*) Gecko/* Firefox/3.0*]
-Parent=Firefox 3.0
-Platform=OS/2
-
-[Mozilla/5.0 (Windows; *; Win 9x 4.90; *; rv:1.9*) Gecko/* Firefox/3.0*]
-Parent=Firefox 3.0
-Platform=WinME
-Win32=true
-
-[Mozilla/5.0 (Windows; *; Win95; *; rv:1.9*) Gecko/* Firefox/3.0*]
-Parent=Firefox 3.0
-Platform=Win95
-Win32=true
-
-[Mozilla/5.0 (Windows; *; Win98; *; rv:1.9*) Gecko/* Firefox/3.0*]
-Parent=Firefox 3.0
-Platform=Win98
-Win32=true
-
-[Mozilla/5.0 (Windows; *; Windows NT 5.0; *; rv:1.9*) Gecko/* Firefox/3.0*]
+[Mozilla/5.0 (Windows; *; Windows NT 5.0; *; rv:1.*) Gecko/* Firefox/3.0*]
Parent=Firefox 3.0
Platform=Win2000
-Win32=true
[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.9*) Gecko/* Firefox/3.0*]
Parent=Firefox 3.0
Platform=WinXP
Win32=true
-[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.9*) Gecko/* Minefield/3.0*]
-Parent=Firefox 3.0
-Platform=WinXP
-Win32=true
-
[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.9*) Gecko/* Firefox/3.0*]
Parent=Firefox 3.0
Platform=Win2003
@@ -15287,28 +14995,36 @@ Parent=Firefox 3.0
Platform=WinVista
Win32=true
+[Mozilla/5.0 (Windows; *; Windows NT 6.1; *; rv:1.*) Gecko/* Firefox/3.0*]
+Parent=Firefox 3.0
+Platform=Win7
+
[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.9*) Gecko/* Firefox/3.0*]
Parent=Firefox 3.0
Platform=WinNT
Win32=true
-[Mozilla/5.0 (Windows; U; Windows NT 5.1 x64; *; rv:1.9*) Gecko/* Minefield/3.0*]
+[Mozilla/5.0 (Windows; U; Windows NT 5.1 x64; *; rv:1.9*) Gecko/* Firefox/3.0*]
Parent=Firefox 3.0
Platform=WinXP
Win32=false
Win64=true
-[Mozilla/5.0 (Windows; U; Windows NT 5.2 x64; *; rv:1.9*) Gecko/* Minefield/3.0*]
+[Mozilla/5.0 (Windows; U; Windows NT 5.2 x64; *; rv:1.9*) Gecko/* Firefox/3.0*]
Parent=Firefox 3.0
Platform=Win2003
Win32=false
Win64=true
-[Mozilla/5.0 (X11; *; *Linux*; *; rv:1.9*) Gecko/* Firefox/3.0*]
+[Mozilla/5.0 (Windows; U; Windows NT 6.0 x64; *; rv:1.9*) Gecko/* Firefox/3.0*]
Parent=Firefox 3.0
-Platform=Linux
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.1 x64; *; rv:1.9*) Gecko/* Firefox/3.0*]
+Parent=Firefox 3.0
+Platform=Win7
-[Mozilla/5.0 (X11; *; *Linux*; *; rv:1.9*) Gecko/* Minefield/3.0*]
+[Mozilla/5.0 (X11; *; *Linux*; *; rv:1.9*) Gecko/* Firefox/3.0*]
Parent=Firefox 3.0
Platform=Linux
@@ -15332,68 +15048,253 @@ Platform=OpenBSD
Parent=Firefox 3.0
Platform=SunOS
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Firefox 3.1
+
+[Firefox 3.1]
+Parent=DefaultProperties
+Browser=Firefox
+Version=3.1
+MajorVer=3
+MinorVer=1
+Beta=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
+
+[Mozilla/5.0 (Macintosh; *; *Mac OS X*; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=MacOSX
+
+[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=WinXP
+Win32=true
+
+[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=Win2003
+Win32=true
+
+[Mozilla/5.0 (Windows; *; Windows NT 6.0; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=WinVista
+Win32=true
+
+[Mozilla/5.0 (Windows; *; Windows NT 6.1; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=Win7
+
+[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=WinNT
+Win32=true
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.1 x64; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=WinXP
+Win32=false
+Win64=true
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.2 x64; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=Win2003
+Win32=false
+Win64=true
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.0 x64; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.1 x64; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=Win7
+
+[Mozilla/5.0 (X11; *; *Linux*; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=Linux
+
+[Mozilla/5.0 (X11; *; FreeBSD*; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=FreeBSD
+
+[Mozilla/5.0 (X11; *; HP-UX*; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=HP-UX
+
+[Mozilla/5.0 (X11; *; IRIX64*; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=IRIX64
+
+[Mozilla/5.0 (X11; *; OpenBSD*; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=OpenBSD
+
+[Mozilla/5.0 (X11; *; SunOS*; *; rv:1.9*) Gecko/* Firefox/3.1*]
+Parent=Firefox 3.1
+Platform=SunOS
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Firefox 3.5
+
+[Firefox 3.5]
+Parent=DefaultProperties
+Browser=Firefox
+Version=3.5
+MajorVer=3
+MinorVer=5
+Beta=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=3
+supportsCSS=true
+
+[Mozilla/5.0 (Macintosh; *; *Mac OS X*; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=MacOSX
+
+[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=WinXP
+Win32=true
+
+[Mozilla/5.0 (Windows; *; Windows NT 5.2; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=Win2003
+Win32=true
+
+[Mozilla/5.0 (Windows; *; Windows NT 6.0; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=WinVista
+Win32=true
+
+[Mozilla/5.0 (Windows; *; Windows NT 6.1; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=Win7
+
+[Mozilla/5.0 (Windows; *; WinNT4.0; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=WinNT
+Win32=true
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.1 x64; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=WinXP
+Win32=false
+Win64=true
+
+[Mozilla/5.0 (Windows; U; Windows NT 5.2 x64; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=Win2003
+Win32=false
+Win64=true
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.0 x64; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=WinVista
+
+[Mozilla/5.0 (Windows; U; Windows NT 6.1 x64; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=Win7
+
+[Mozilla/5.0 (X11; *; *Linux*; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=Linux
+
+[Mozilla/5.0 (X11; *; FreeBSD*; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=FreeBSD
+
+[Mozilla/5.0 (X11; *; HP-UX*; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=HP-UX
+
+[Mozilla/5.0 (X11; *; IRIX64*; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=IRIX64
+
+[Mozilla/5.0 (X11; *; OpenBSD*; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=OpenBSD
+
+[Mozilla/5.0 (X11; *; SunOS*; *; rv:1.9.*) Gecko/* Firefox/3.5b*]
+Parent=Firefox 3.5
+Platform=SunOS
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Phoenix
[Phoenix]
Parent=DefaultProperties
Browser=Phoenix
+Version=0.5
+MinorVer=5
Frames=true
IFrames=true
Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
[Mozilla/5.0 (Windows; *; Win 9x 4.90; *; rv:1.4*) Gecko/* Phoenix/0.5*]
Parent=Phoenix
-Version=0.5
-MajorVer=0
-MinorVer=5
Platform=WinME
Win32=true
[Mozilla/5.0 (Windows; *; Win98; *; rv:1.4*) Gecko/* Phoenix/0.5*]
Parent=Phoenix
-Version=0.5
-MajorVer=0
-MinorVer=5
Platform=Win98
Win32=true
[Mozilla/5.0 (Windows; *; Windows NT 5.0*; *; rv:1.4*) Gecko/* Phoenix/0.5*]
Parent=Phoenix
-Version=0.5
-MajorVer=0
-MinorVer=5
Platform=Win2000
Win32=true
[Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.4*) Gecko/* Phoenix/0.5*]
Parent=Phoenix
-Version=0.5
-MajorVer=0
-MinorVer=5
Platform=WinXP
Win32=true
[Mozilla/5.0 (Windows; *; Windows NT 5.2*; *; rv:1.4*) Gecko/* Phoenix/0.5*]
Parent=Phoenix
-Version=0.5
-MajorVer=0
-MinorVer=5
Platform=Win2003
Win32=true
[Mozilla/5.0 (X11; *; Linux*; *; rv:1.4*) Gecko/* Phoenix/0.5*]
Parent=Phoenix
-Version=0.5
-MajorVer=0
-MinorVer=5
Platform=Linux
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Iceweasel
+
+[Iceweasel]
+Parent=DefaultProperties
+Browser=Iceweasel
+Platform=Linux
+Beta=true
+Frames=true
+IFrames=true
+Tables=true
+Cookies=true
+JavaApplets=true
+JavaScript=true
+CssVersion=2
+supportsCSS=true
+
+[Mozilla/5.0 (X11; U; Linux*; *; rv:1.8*) Gecko/* Iceweasel/2.0* (Debian-*)]
+Parent=Iceweasel
+Version=2.0
+MajorVer=2
+MinorVer=0
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Mozilla 1.0
[Mozilla 1.0]
@@ -15408,7 +15309,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -15430,7 +15330,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -15452,7 +15351,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -15474,7 +15372,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -15496,7 +15393,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -15579,7 +15475,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -15662,7 +15557,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -15745,7 +15639,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.5
@@ -15834,7 +15727,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.5
@@ -15912,7 +15804,7 @@ Platform=SunOS
[Mozilla 1.9]
Parent=DefaultProperties
-Browser=Mozilla 1.9
+Browser=Mozilla
Version=1.9
MajorVer=1
MinorVer=9
@@ -15923,7 +15815,6 @@ Tables=true
Cookies=true
JavaApplets=true
JavaScript=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -16009,10 +15900,39 @@ BackgroundSounds=true
CDF=true
JavaApplets=true
JavaScript=true
-CSS=1
CssVersion=1
supportsCSS=true
+[Mozilla/?.? (compatible; MSIE 4.0*; *Mac_PowerPC*]
+Parent=IE Mac
+Version=4.0
+MajorVer=4
+MinorVer=0
+
+[Mozilla/?.? (compatible; MSIE 4.5*; *Mac_PowerPC*]
+Parent=IE Mac
+Version=4.5
+MajorVer=4
+MinorVer=5
+
+[Mozilla/?.? (compatible; MSIE 5.0*; *Mac_PowerPC*]
+Parent=IE Mac
+Version=5.0
+MajorVer=5
+MinorVer=0
+
+[Mozilla/?.? (compatible; MSIE 5.1*; *Mac_PowerPC*]
+Parent=IE Mac
+Version=5.1
+MajorVer=5
+MinorVer=1
+
+[Mozilla/?.? (compatible; MSIE 5.2*; *Mac_PowerPC*]
+Parent=IE Mac
+Version=5.2
+MajorVer=5
+MinorVer=2
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AOL 9.0/IE 5.5
[AOL 9.0/IE 5.5]
@@ -16032,7 +15952,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
AOL=true
@@ -16057,24 +15976,17 @@ Platform=Win98
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows 98*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows 98*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows 98*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
-CSS=2
CssVersion=2
supportsCSS=true
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows 98*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows 98; Win 9x 4.90*)*]
Parent=AOL 9.0/IE 5.5
@@ -16083,26 +15995,18 @@ Platform=WinME
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinME
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinME
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinME
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinME
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 4.0*)*]
Parent=AOL 9.0/IE 5.5
@@ -16115,26 +16019,18 @@ Platform=Win2000
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.0*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2000
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.0*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.0*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.0*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.01*)*]
Parent=AOL 9.0/IE 5.5
@@ -16143,26 +16039,18 @@ Platform=Win2000
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.01*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2000
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.01*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.01*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.01*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.1*)*]
Parent=AOL 9.0/IE 5.5
@@ -16171,26 +16059,18 @@ Platform=WinXP
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.1*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinXP
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.1*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinXP
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinXP
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.1*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinXP
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.2*)*]
Parent=AOL 9.0/IE 5.5
@@ -16199,26 +16079,18 @@ Platform=Win2003
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2003
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.2*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2003
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.2*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2003
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 5.2*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=Win2003
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 6.0*)*]
Parent=AOL 9.0/IE 5.5
@@ -16227,26 +16099,18 @@ Platform=WinVista
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 6.0*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinVista
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 6.0*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinVista
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 6.0*.NET CLR 2*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinVista
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 5.5; *AOL 9.0; *Windows NT 6.0*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 5.5
Platform=WinVista
-netCLR=true
-ClrVersion=2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AOL 9.0/IE 6.0
@@ -16266,7 +16130,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
AOL=true
@@ -16291,24 +16154,17 @@ Platform=Win98
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows 98*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows 98*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows 98*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
-CSS=2
CssVersion=2
supportsCSS=true
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows 98*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows 98; Win 9x 4.90*)*]
Parent=AOL 9.0/IE 6.0
@@ -16317,26 +16173,18 @@ Platform=WinME
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinME
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinME
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinME
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinME
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 4.0*)*]
Parent=AOL 9.0/IE 6.0
@@ -16349,26 +16197,18 @@ Platform=Win2000
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.0*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2000
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.0*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.0*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.0*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.01*)*]
Parent=AOL 9.0/IE 6.0
@@ -16377,26 +16217,18 @@ Platform=Win2000
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.01*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2000
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.01*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.01*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.01*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.1*)*]
Parent=AOL 9.0/IE 6.0
@@ -16405,26 +16237,18 @@ Platform=WinXP
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.1*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinXP
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.1*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinXP
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinXP
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.1*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinXP
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.2*)*]
Parent=AOL 9.0/IE 6.0
@@ -16433,26 +16257,18 @@ Platform=Win2003
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2003
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.2*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2003
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.2*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2003
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 5.2*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=Win2003
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 6.0*)*]
Parent=AOL 9.0/IE 6.0
@@ -16461,26 +16277,18 @@ Platform=WinVista
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 6.0*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinVista
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 6.0*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinVista
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 6.0*.NET CLR 2*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinVista
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 6.0; *AOL 9.0; *Windows NT 6.0*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 6.0
Platform=WinVista
-netCLR=true
-ClrVersion=2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AOL 9.0/IE 7.0
@@ -16500,7 +16308,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
AOL=true
@@ -16523,24 +16330,17 @@ Platform=Win98
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows 98*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows 98*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows 98*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
-CSS=2
CssVersion=2
supportsCSS=true
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows 98*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows 98; Win 9x 4.90*)*]
Parent=AOL 9.0/IE 7.0
@@ -16549,26 +16349,18 @@ Platform=WinME
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinME
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinME
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinME
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows 98; Win 9x 4.90*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinME
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 4.0*)*]
Parent=AOL 9.0/IE 7.0
@@ -16581,26 +16373,18 @@ Platform=Win2000
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.0*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2000
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.0*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.0*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.0*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.01*)*]
Parent=AOL 9.0/IE 7.0
@@ -16609,26 +16393,18 @@ Platform=Win2000
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.01*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2000
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.01*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.01*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.01*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.1*)*]
Parent=AOL 9.0/IE 7.0
@@ -16637,26 +16413,18 @@ Platform=WinXP
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.1*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinXP
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.1*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinXP
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinXP
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.1*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinXP
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.2*)*]
Parent=AOL 9.0/IE 7.0
@@ -16665,26 +16433,18 @@ Platform=Win2003
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2003
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.2*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2003
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.2*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2003
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 5.2*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=Win2003
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 6.0*)*]
Parent=AOL 9.0/IE 7.0
@@ -16693,26 +16453,18 @@ Platform=WinVista
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 6.0*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinVista
-netCLR=true
-ClrVersion=1
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 6.0*.NET CLR 1*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinVista
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 6.0*.NET CLR 2*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinVista
-netCLR=true
-ClrVersion=2
[Mozilla/4.0 (compatible; MSIE 7.0; *AOL 9.0; *Windows NT 6.0*.NET CLR 2*.NET CLR 1*)*]
Parent=AOL 9.0/IE 7.0
Platform=WinVista
-netCLR=true
-ClrVersion=2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Avant Browser
@@ -16729,7 +16481,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -16761,7 +16512,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -16776,6 +16526,10 @@ Platform=Win95
Parent=IE 4.01
Platform=Win98
+[Mozilla/4.0 (compatible; MSIE 4.01; *Windows 98; Win 9x 4.90;*)*]
+Parent=IE 4.01
+Platform=WinME
+
[Mozilla/4.0 (compatible; MSIE 4.01; *Windows NT 4.0*)*]
Parent=IE 4.01
Platform=WinNT
@@ -16788,9 +16542,9 @@ Platform=Win2000
Parent=IE 4.01
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 5.0; *Windows 98; Win 9x 4.90;*)*]
+[Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)]
Parent=IE 4.01
-Platform=WinME
+Platform=WinNT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IE 5.0
@@ -16810,7 +16564,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -16829,48 +16582,18 @@ Platform=Win98
Parent=IE 5.0
Platform=WinME
-[Mozilla/4.0 (compatible; MSIE 5.0; *Windows 98; Win 9x 4.90;*.NET CLR 1*)*]
-Parent=IE 5.0
-Platform=WinME
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.0; *Windows 98;*.NET CLR 1*)*]
-Parent=IE 5.0
-Platform=Win98
-netCLR=true
-ClrVersion=1
-
[Mozilla/4.0 (compatible; MSIE 5.0; *Windows NT 4.0*)*]
Parent=IE 5.0
Platform=WinNT
-[Mozilla/4.0 (compatible; MSIE 5.0; *Windows NT 4.0;*.NET CLR 1*)*]
-Parent=IE 5.0
-Platform=WinNT
-netCLR=true
-ClrVersion=1
-
[Mozilla/4.0 (compatible; MSIE 5.0; *Windows NT 5.0*)*]
Parent=IE 5.0
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 5.0; *Windows NT 5.0;*.NET CLR 1*)*]
-Parent=IE 5.0
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
[Mozilla/4.0 (compatible; MSIE 5.0; *Windows NT 5.01*)*]
Parent=IE 5.0
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 5.0; *Windows NT 5.01;*.NET CLR 1*)*]
-Parent=IE 5.0
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IE 5.01
[IE 5.01]
@@ -16890,7 +16613,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
@@ -16909,128 +16631,18 @@ Platform=Win98
Parent=IE 5.01
Platform=WinME
-[Mozilla/4.0 (compatible; MSIE 5.01; *Windows 98; Win 9x 4.90;*.NET CLR 1*)*]
-Parent=IE 5.01
-Platform=WinME
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.01; *Windows 98;*.NET CLR 1*)*]
-Parent=IE 5.01
-Platform=Win98
-netCLR=true
-ClrVersion=1
-
[Mozilla/4.0 (compatible; MSIE 5.01; *Windows NT 4.0*)*]
Parent=IE 5.01
Platform=WinNT
-[Mozilla/4.0 (compatible; MSIE 5.01; *Windows NT 4.0;*.NET CLR 1*)*]
-Parent=IE 5.01
-Platform=WinNT
-netCLR=true
-ClrVersion=1
-
[Mozilla/4.0 (compatible; MSIE 5.01; *Windows NT 5.0*)*]
Parent=IE 5.01
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 5.01; *Windows NT 5.0;*.NET CLR 1*)*]
-Parent=IE 5.01
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
[Mozilla/4.0 (compatible; MSIE 5.01; *Windows NT 5.01*)*]
Parent=IE 5.01
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 5.01; *Windows NT 5.01;*.NET CLR 1*)*]
-Parent=IE 5.01
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IE 5.0b1
-
-[IE 5.0b1]
-Parent=DefaultProperties
-Browser=IE
-Version=5.0
-MajorVer=5
-Beta=true
-Win32=true
-Frames=true
-IFrames=true
-Tables=true
-Cookies=true
-BackgroundSounds=true
-CDF=true
-VBScript=true
-JavaApplets=true
-JavaScript=true
-ActiveXControls=true
-CSS=2
-CssVersion=2
-supportsCSS=true
-
-[Mozilla/?.* (?compatible; *MSIE 5.0b1*)*]
-Parent=IE 5.0b1
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows 95*)*]
-Parent=IE 5.0b1
-Platform=Win95
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows 98*)*]
-Parent=IE 5.0b1
-Platform=Win98
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows 98; Win 9x 4.90;*)*]
-Parent=IE 5.0b1
-Platform=WinME
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows 98; Win 9x 4.90;*.NET CLR 1*)*]
-Parent=IE 5.0b1
-Platform=WinME
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows 98;*.NET CLR 1*)*]
-Parent=IE 5.0b1
-Platform=Win98
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows NT 4.0*)*]
-Parent=IE 5.0b1
-Platform=WinNT
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows NT 4.0;*.NET CLR 1*)*]
-Parent=IE 5.0b1
-Platform=WinNT
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows NT 5.0*)*]
-Parent=IE 5.0b1
-Platform=Win2000
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows NT 5.0;*.NET CLR 1*)*]
-Parent=IE 5.0b1
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows NT 5.01*)*]
-Parent=IE 5.0b1
-Platform=Win2000
-
-[Mozilla/4.0 (compatible; MSIE 5.0b1; *Windows NT 5.01;*.NET CLR 1*)*]
-Parent=IE 5.0b1
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IE 5.5
[IE 5.5]
@@ -17050,7 +16662,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.2
@@ -17071,194 +16682,26 @@ Platform=Win98
Parent=IE 5.5
Platform=WinME
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows 98; Win 9x 4.90;*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=WinME
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows 98; Win 9x 4.90;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows 98; Win 9x 4.90;*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows 98; Win 9x 4.90;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows 98;*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=Win98
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows 98;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows 98;*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows 98;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 4.0*)*]
Parent=IE 5.5
Platform=WinNT
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 4.0;*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=WinNT
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 4.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 4.0;*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 4.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.0*)*]
Parent=IE 5.5
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.0;*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.0;*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.01*)*]
Parent=IE 5.5
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.01;*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.01;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.01;*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.01;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.1*)*]
Parent=IE 5.5
Platform=WinXP
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.1;*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=WinXP
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.1;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.1;*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.1;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.2*)*]
Parent=IE 5.5
Platform=Win2003
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.2;*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=Win2003
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.2;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.2;*.NET CLR 2*)*]
-Parent=IE 5.5
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 5.5; *Windows NT 5.2;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 5.5
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IE 6.0
[IE 6.0]
@@ -17277,7 +16720,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.2
@@ -17299,609 +16741,40 @@ Platform=Win98
Parent=IE 6.0
Platform=WinME
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows 98; Win 9x 4.90;*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinME
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows 98; Win 9x 4.90;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows 98; Win 9x 4.90;*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows 98; Win 9x 4.90;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows 98;*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=Win98
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows 98;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows 98;*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows 98;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 4.0*)*]
Parent=IE 6.0
Platform=WinNT
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 4.0;*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinNT
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 4.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 4.0;*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 4.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.0*)*]
Parent=IE 6.0
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.0;*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.0;*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.01*)*]
Parent=IE 6.0
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.01;*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.01;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.01;*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.01;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.1*)*]
Parent=IE 6.0
Platform=WinXP
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.1;*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinXP
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.1;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.1;*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.1;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2*)*]
Parent=IE 6.0
Platform=Win2003
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=Win2003
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*Win64;*)*]
Parent=IE 6.0
Platform=WinXP
Win32=false
Win64=true
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*Win64;*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*Win64;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*Win64;*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*Win64;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*WOW64;*)*]
Parent=IE 6.0
Platform=WinXP
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*WOW64;*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinXP
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*WOW64;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*WOW64;*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 5.2;*WOW64;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 6.0*)*]
Parent=IE 6.0
Platform=WinVista
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 6.0;*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinVista
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 6.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinVista
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 6.0;*.NET CLR 2*)*]
-Parent=IE 6.0
-Platform=WinVista
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0; *Windows NT 6.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0
-Platform=WinVista
-netCLR=true
-ClrVersion=2
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IE 6.0b
-
-[IE 6.0b]
-Parent=DefaultProperties
-Browser=IE
-Version=6.0b
-MajorVer=6
-MinorVer=0b
-Beta=true
-Win32=true
-Frames=true
-IFrames=true
-Tables=true
-Cookies=true
-BackgroundSounds=true
-CDF=true
-VBScript=true
-JavaApplets=true
-JavaScript=true
-ActiveXControls=true
-CSS=2
-CssVersion=2
-supportsCSS=true
-
-[Mozilla/?.* (?compatible; *MSIE 6.0b*)*]
-Parent=IE 6.0b
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 95*)*]
-Parent=IE 6.0b
-Platform=Win95
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 98*)*]
-Parent=IE 6.0b
-Platform=Win98
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 98; Win 9x 4.90*)*]
-Parent=IE 6.0b
-Platform=WinME
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 98; Win 9x 4.90;*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinME
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 98; Win 9x 4.90;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 98; Win 9x 4.90;*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 98; Win 9x 4.90;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 98;*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=Win98
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 98;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 98;*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows 98;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 4.0*)*]
-Parent=IE 6.0b
-Platform=WinNT
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 4.0;*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinNT
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 4.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 4.0;*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 4.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.0*)*]
-Parent=IE 6.0b
-Platform=Win2000
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.0;*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.0;*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.01*)*]
-Parent=IE 6.0b
-Platform=Win2000
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.01;*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.01;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.01;*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.01;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.1*)*]
-Parent=IE 6.0b
-Platform=WinXP
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.1;*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.1;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.1;*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.1;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2*)*]
-Parent=IE 6.0b
-Platform=Win2003
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=Win2003
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*Win64;*)*]
-Parent=IE 6.0b
-Platform=WinXP
-Win32=false
-Win64=true
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*Win64;*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*Win64;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*Win64;*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*Win64;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*WOW64;*)*]
-Parent=IE 6.0b
-Platform=WinXP
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*WOW64;*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*WOW64;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*WOW64;*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 5.2;*WOW64;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 6.0*)*]
-Parent=IE 6.0b
-Platform=WinVista
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 6.0;*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinVista
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 6.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinVista
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 6.0;*.NET CLR 2*)*]
-Parent=IE 6.0b
-Platform=WinVista
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 6.0b; *Windows NT 6.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 6.0b
-Platform=WinVista
-netCLR=true
-ClrVersion=2
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IE 7.0
[IE 7.0]
@@ -17920,7 +16793,6 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
CssVersion=2
supportsCSS=true
ecmascriptversion=1.2
@@ -17938,297 +16810,55 @@ Platform=Win98
Parent=IE 7.0
Platform=WinME
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows 98; Win 9x 4.90;*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinME
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows 98; Win 9x 4.90;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows 98; Win 9x 4.90;*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows 98; Win 9x 4.90;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows 98;*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=Win98
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows 98;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows 98;*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows 98;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 4.0*)*]
Parent=IE 7.0
Platform=WinNT
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 4.0;*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinNT
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 4.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 4.0;*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 4.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.0*)*]
Parent=IE 7.0
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.0;*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.0;*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.01*)*]
Parent=IE 7.0
Platform=Win2000
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.01;*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.01;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.01;*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.01;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.1*)*]
Parent=IE 7.0
Platform=WinXP
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.1;*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinXP
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.1;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.1;*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.1;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2*)*]
Parent=IE 7.0
Platform=Win2003
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=Win2003
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*Win64;*)*]
Parent=IE 7.0
Platform=WinXP
Win32=false
Win64=true
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*Win64;*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*Win64;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*Win64;*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*Win64;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*WOW64;*)*]
Parent=IE 7.0
Platform=WinXP
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*WOW64;*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinXP
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*WOW64;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*WOW64;*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 5.2;*WOW64;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 6.0*)*]
Parent=IE 7.0
Platform=WinVista
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 6.0;*.NET CLR 1*)*]
+[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 6.1*)*]
Parent=IE 7.0
-Platform=WinVista
-netCLR=true
-ClrVersion=1
+Platform=Win7
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 6.0;*.NET CLR 1*.NET CLR 2*)*]
+[Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; *)*]
Parent=IE 7.0
-Platform=WinVista
-netCLR=true
-ClrVersion=2
+Platform=Win7
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 6.0;*.NET CLR 2*)*]
-Parent=IE 7.0
-Platform=WinVista
-netCLR=true
-ClrVersion=2
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IE 8.0
-[Mozilla/4.0 (compatible; MSIE 7.0; *Windows NT 6.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0
-Platform=WinVista
-netCLR=true
-ClrVersion=2
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IE 7.0b
-
-[IE 7.0b]
+[IE 8.0]
Parent=DefaultProperties
Browser=IE
-Version=7.0b
-MajorVer=7
-MinorVer=0b
-Beta=true
+Version=8.0
+MajorVer=8
Win32=true
Frames=true
IFrames=true
@@ -18240,332 +16870,73 @@ VBScript=true
JavaApplets=true
JavaScript=true
ActiveXControls=true
-CSS=2
-CssVersion=2
+CssVersion=3
supportsCSS=true
+ecmascriptversion=1.2
+msdomversion=8.0
+w3cdomversion=1.0
-[Mozilla/?.* (?compatible; *MSIE 7.0b*)*]
-Parent=IE 7.0b
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows 98*)*]
-Parent=IE 7.0b
-Platform=Win98
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows 98; Win 9x 4.90;*)*]
-Parent=IE 7.0b
-Platform=WinME
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows 98; Win 9x 4.90;*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinME
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows 98; Win 9x 4.90;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows 98; Win 9x 4.90;*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows 98; Win 9x 4.90;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinME
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows 98;*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=Win98
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows 98;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows 98;*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows 98;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=Win98
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 4.0*)*]
-Parent=IE 7.0b
-Platform=WinNT
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 4.0;*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinNT
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 4.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 4.0;*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 4.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinNT
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.0*)*]
-Parent=IE 7.0b
-Platform=Win2000
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.0;*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.0;*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.01*)*]
-Parent=IE 7.0b
-Platform=Win2000
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.01;*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.01;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
+[Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0*)*]
+Parent=IE 8.0
+Platform=WinVista
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.01;*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=Win2000
-netCLR=true
-ClrVersion=2
+[Mozilla/4.0 (compatible; MSIE 8.0; Win32*)*]
+Parent=IE 8.0
+Platform=Win32
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.01;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0b
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.0*)*]
+Parent=IE 8.0
Platform=Win2000
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.1*)*]
-Parent=IE 7.0b
-Platform=WinXP
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.1;*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=1
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.1;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0b
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1*)*]
+Parent=IE 8.0
Platform=WinXP
-netCLR=true
-ClrVersion=2
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.1;*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.1;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2*)*]
-Parent=IE 7.0b
-Platform=Win2003
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*.NET CLR 1*)*]
-Parent=IE 7.0b
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2*)*]
+Parent=IE 8.0
Platform=Win2003
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=Win2003
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*Win64;*)*]
-Parent=IE 7.0b
-Platform=WinXP
-Win32=false
-Win64=true
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*Win64;*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=1
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*Win64;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*Win64;*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*Win64;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinXP
-Win32=false
-Win64=true
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*WOW64;*)*]
-Parent=IE 7.0b
-Platform=WinXP
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*WOW64;*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=1
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*WOW64;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*WOW64;*.NET CLR 2*)*]
-Parent=IE 7.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 5.2;*WOW64;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinXP
-netCLR=true
-ClrVersion=2
-
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 6.0*)*]
-Parent=IE 7.0b
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0*)*]
+Parent=IE 8.0
Platform=WinVista
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 6.0;*.NET CLR 1*)*]
-Parent=IE 7.0b
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0*)*]
+Parent=IE 8.0
Platform=WinVista
-netCLR=true
-ClrVersion=1
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 6.0;*.NET CLR 1*.NET CLR 2*)*]
-Parent=IE 7.0b
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Win64; x64; Trident/4.0*)*]
+Parent=IE 8.0
Platform=WinVista
-netCLR=true
-ClrVersion=2
+Win32=false
+Win64=true
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 6.0;*.NET CLR 2*)*]
-Parent=IE 7.0b
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0*)*]
+Parent=IE 8.0
Platform=WinVista
-netCLR=true
-ClrVersion=2
+Win64=false
-[Mozilla/4.0 (compatible; MSIE 7.0b; *Windows NT 6.0;*.NET CLR 2*.NET CLR 1*)*]
-Parent=IE 7.0b
-Platform=WinVista
-netCLR=true
-ClrVersion=2
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1*)*]
+Parent=IE 8.0
+Platform=Win7
-[Mozilla/?.? (compatible; MSIE 4.0*; *Mac_PowerPC*]
-Parent=IE Mac
-Version=4.0
-MajorVer=4
-MinorVer=0
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0*)*]
+Parent=IE 8.0
+Platform=Win7
-[Mozilla/?.? (compatible; MSIE 4.5*; *Mac_PowerPC*]
-Parent=IE Mac
-Version=4.5
-MajorVer=4
-MinorVer=5
-
-[Mozilla/?.? (compatible; MSIE 5.0*; *Mac_PowerPC*]
-Parent=IE Mac
-Version=5.0
-MajorVer=5
-MinorVer=0
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0*)*]
+Parent=IE 8.0
+Platform=Win7
+Win32=false
+Win64=true
-[Mozilla/?.? (compatible; MSIE 5.1*; *Mac_PowerPC*]
-Parent=IE Mac
-Version=5.1
-MajorVer=5
-MinorVer=1
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0*)*]
+Parent=IE 8.0
+Platform=Win7
+Win64=false
-[Mozilla/?.? (compatible; MSIE 5.2*; *Mac_PowerPC*]
-Parent=IE Mac
-Version=5.2
-MajorVer=5
-MinorVer=2
+[Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 7.0; Trident/4.0*)*]
+Parent=IE 8.0
+Platform=Win7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Default Browser
@@ -18585,7 +16956,6 @@ IFrames=false
Tables=true
Cookies=false
BackgroundSounds=false
-AuthenticodeUpdate=0
CDF=false
VBScript=false
JavaApplets=false
@@ -18593,15 +16963,16 @@ JavaScript=false
ActiveXControls=false
Stripper=false
isBanned=false
-WAP=false
isMobileDevice=false
isSyndicationReader=false
Crawler=false
-CSS=0
CssVersion=0
supportsCSS=false
AOL=false
aolVersion=0
+AuthenticodeUpdate=0
+CSS=0
+WAP=false
netCLR=false
ClrVersion=0
ECMAScriptVersion=0.0
diff --git a/data/config.in b/data/config.in
index d14e0a8..a56f7d1 100644
--- a/data/config.in
+++ b/data/config.in
@@ -17,6 +17,7 @@
<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
<dllmap dll="libX11" target="@X11@" os="!windows" />
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
+ <dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
<dllmap dll="i:kernel32.dll">
<dllentry dll="__Internal" name="CopyMemory" target="mono_win32_compat_CopyMemory"/>
<dllentry dll="__Internal" name="FillMemory" target="mono_win32_compat_FillMemory"/>
diff --git a/data/net_1_1/Makefile.in b/data/net_1_1/Makefile.in
index a3859ff..14f9980 100644
--- a/data/net_1_1/Makefile.in
+++ b/data/net_1_1/Makefile.in
@@ -65,8 +65,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/data/net_2_0/Browsers/Makefile.in b/data/net_2_0/Browsers/Makefile.in
index f3b0de1..3730791 100644
--- a/data/net_2_0/Browsers/Makefile.in
+++ b/data/net_2_0/Browsers/Makefile.in
@@ -65,8 +65,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/data/net_2_0/ChangeLog b/data/net_2_0/ChangeLog
index 3d84b97..e6310b9 100644
--- a/data/net_2_0/ChangeLog
+++ b/data/net_2_0/ChangeLog
@@ -1,3 +1,16 @@
+2009-03-31 Marek Habersack <mhabersack at novell.com>
+
+ * DefaultWsdlHelpGenerator.aspx: the link element in <head> must
+ be created using Response.Write, as the code expression in the
+ href attribute is otherwise treated verbatim. This is the same as
+ with .NET. Fixes bug #490497
+
+2009-03-27 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * DefaultWsdlHelpGenerator.aspx: disable the test form
+ when only Soap is supported.
+ Bug #342073 fixed.
+
2009-01-07 Kornél Pál <kornelpal at gmail.com>
* DefaultWsdlHelpGenerator.aspx: Move <script> at the end of <head> that
diff --git a/data/net_2_0/DefaultWsdlHelpGenerator.aspx b/data/net_2_0/DefaultWsdlHelpGenerator.aspx
index 888406d..6d02af3 100644
--- a/data/net_2_0/DefaultWsdlHelpGenerator.aspx
+++ b/data/net_2_0/DefaultWsdlHelpGenerator.aspx
@@ -122,15 +122,20 @@ void BuildOperationInfo ()
// Protocols supported by the operation
CurrentOperationProtocols = "";
+ WebServiceProtocols testProtocols = 0;
ArrayList prots = FindServiceProtocols (CurrentOperationName);
for (int n=0; n<prots.Count; n++) {
+ string prot = (string) prots [n];
if (n != 0) CurrentOperationProtocols += ", ";
- CurrentOperationProtocols += (string) prots[n];
+ CurrentOperationProtocols += prot;
+ if (prot == "HttpGet")
+ testProtocols |= WebServiceProtocols.HttpGet;
+ else if (prot == "HttpPost") {
+ testProtocols |= WebServiceProtocols.HttpPost;
+ if (Context.Request.IsLocal)
+ testProtocols |= WebServiceProtocols.HttpPostLocalhost;
+ }
}
-
- WebServiceProtocols testProtocols = WebServiceProtocols.HttpGet | WebServiceProtocols.HttpPost;
- if (Context.Request.IsLocal)
- testProtocols |= WebServiceProtocols.HttpPostLocalhost;
CurrentOperationSupportsTest = (WebServicesSection.Current.EnabledProtocols & testProtocols) != 0;
// Operation format
@@ -1516,8 +1521,9 @@ public class HtmlSampleGenerator: SampleGenerator
</script>
<head runat="server">
- <link rel="alternate" type="text/xml" href="<%=Request.FilePath%>?disco"/>
-
+ <%
+ Response.Write ("<link rel=\"alternate\" type=\"text/xml\" href=\"" + Request.FilePath + "?disco\"/>");
+ %>
<title><%=WebServiceName%> Web Service</title>
<style type="text/css">
BODY { font-family: Arial; margin-left: 20px; margin-top: 20px; font-size: x-small}
diff --git a/data/net_2_0/Makefile.in b/data/net_2_0/Makefile.in
index 28e8842..9e515ee 100644
--- a/data/net_2_0/Makefile.in
+++ b/data/net_2_0/Makefile.in
@@ -77,8 +77,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/debian/libmono-cecil0.6.8-cil.debhelper.log b/debian/libmono-cecil0.6.8-cil.debhelper.log
deleted file mode 100644
index 1d1d0b2..0000000
--- a/debian/libmono-cecil0.6.8-cil.debhelper.log
+++ /dev/null
@@ -1 +0,0 @@
-dh_installdirs
diff --git a/debian/libmono-system2.1-cil.debhelper.log b/debian/libmono-system2.1-cil.debhelper.log
deleted file mode 100644
index 4ec72ae..0000000
--- a/debian/libmono-system2.1-cil.debhelper.log
+++ /dev/null
@@ -1 +0,0 @@
-dh_makeclilibs
diff --git a/debian/libmono-web1.0-cil.debhelper.log b/debian/libmono-web1.0-cil.debhelper.log
deleted file mode 100644
index 791e292..0000000
--- a/debian/libmono-web1.0-cil.debhelper.log
+++ /dev/null
@@ -1,2 +0,0 @@
-dh_makeclilibs
-dh_makeclilibs
diff --git a/debian/libmono-web2.0-cil.debhelper.log b/debian/libmono-web2.0-cil.debhelper.log
deleted file mode 100644
index 791e292..0000000
--- a/debian/libmono-web2.0-cil.debhelper.log
+++ /dev/null
@@ -1,2 +0,0 @@
-dh_makeclilibs
-dh_makeclilibs
diff --git a/docs/Makefile.in b/docs/Makefile.in
index 6a1a03d..9f2e1a7 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -66,8 +66,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/ikvm-native/Makefile.in b/ikvm-native/Makefile.in
index 1e94cf9..04ba50d 100644
--- a/ikvm-native/Makefile.in
+++ b/ikvm-native/Makefile.in
@@ -83,8 +83,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/libgc/ChangeLog b/libgc/ChangeLog
index cbd82f2..bcfbdcd 100644
--- a/libgc/ChangeLog
+++ b/libgc/ChangeLog
@@ -1,3 +1,12 @@
+2009-04-28 Zoltan Varga <vargaz at gmail.com>
+
+ * misc.c (GC_init): Avoid casting an lvalue. Fixes part of #498692.
+
+2009-04-10 Zoltan Varga <vargaz at gmail.com>
+
+ * include/private/gc_locks.h (GC_test_and_set): Merge a change from libgc
+ 7.1's libatomic-ops to fix the ppc build with gcc 4.4.
+
2009-01-18 Zoltan Varga <vargaz at gmail.com>
* include/private/gcconfig.h: Applied patch from Koushik Dutta
diff --git a/libgc/include/private/gc_locks.h b/libgc/include/private/gc_locks.h
index 9228152..83fe57d 100644
--- a/libgc/include/private/gc_locks.h
+++ b/libgc/include/private/gc_locks.h
@@ -160,15 +160,15 @@
int temp = 1; /* locked value */
__asm__ __volatile__(
- "1:\tlwarx %0,0,%3\n" /* load and reserve */
+ "1:\tlwarx %0,0,%1\n" /* load and reserve */
"\tcmpwi %0, 0\n" /* if load is */
"\tbne 2f\n" /* non-zero, return already set */
"\tstwcx. %2,0,%1\n" /* else store conditional */
"\tbne- 1b\n" /* retry if lost reservation */
"\tsync\n" /* import barrier */
"2:\t\n" /* oldval is zero if we set */
- : "=&r"(oldval), "=p"(addr)
- : "r"(temp), "1"(addr)
+ : "=&r"(oldval)
+ : "r"(addr), "r"(temp)
: "cr0","memory");
return oldval;
}
diff --git a/libgc/misc.c b/libgc/misc.c
index be2555b..ee4348b 100644
--- a/libgc/misc.c
+++ b/libgc/misc.c
@@ -479,7 +479,7 @@ void GC_init()
BOOL (WINAPI *pfn) (LPCRITICAL_SECTION, DWORD) = NULL;
HMODULE hK32 = GetModuleHandle(_T("kernel32.dll"));
if (hK32)
- (FARPROC) pfn = GetProcAddress(hK32,
+ pfn = GetProcAddress(hK32,
"InitializeCriticalSectionAndSpinCount");
if (pfn)
pfn(&GC_allocate_ml, 4000);
diff --git a/man/ChangeLog b/man/ChangeLog
index 0baa82a..e7e4722 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-09 Jonathan Pryor <jpryor at novell.com>
+
+ * mdoc-update.1: Document -L, -r options.
+
2008-12-31 Massimiliano Mantione <massi at ximian.com>
* mono.1: Updated the profiler documentation, removing the "ts"
diff --git a/man/Makefile.in b/man/Makefile.in
index b123e2b..97cb4b2 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -60,8 +60,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/man/mdoc-update.1 b/man/mdoc-update.1
index 0ae9654..a7ebfe0 100644
--- a/man/mdoc-update.1
+++ b/man/mdoc-update.1
@@ -29,11 +29,9 @@ as added types and members, while preserving existing documentation.
.Sp
In some limited circumstances, renames will be tracked, minimizing the
documentation burden when e.g. a parameter is renamed.
-circumstances,
-creates stubs and updates documentation in the \fBmdoc\fR(5)
-documentation format from \fIASSEMBLIES\fR.
.PP
-\fBmdoc update\fR does not rely on documentation found within source code.
+\fBmdoc update\fR does not rely on documentation found within source code,
+though it can import XML Documentation Comments via the \fB\-i\fR option.
.PP
See \fBmdoc\fR(1) and \fBmdoc\fR(5) for more information.
.SH OPTIONS
@@ -171,11 +169,22 @@ Import documentation found within \fIFILE\fR.
.Sp
\fIFILE\fR may contain either \fIcsc /doc\fR XML or \fIECMA-335\fR XML.
.TP
-\fB\-o\fR, \fB\-\-out\fB=\fIDIRECTORY\fR
+\fB\-L\fR, \fB\-\-lib\fR=\fIDIRECTORY\fR
+Add \fIDIRECTORY\fR to the assembly search path, so that dependencies of
+\fIASSEMBLIES\fR can be found without documenting those assemblies.
+.TP
+\fB\-o\fR, \fB\-\-out\fR=\fIDIRECTORY\fR
Place the generated stubs into \fIDIRECTORY\fR.
.Sp
When updating documentation, \fIDIRECTORY\fR is also the source directory.
.TP
+\fB\-r\fR=\fIASSEMBLY\fR
+\fIASSEMBLY\fR is a dependency for one of \fIASSEMBLIES\fR which should
+\fInot\fR be documented but is required to process one of \fIASSEMBLIES\fR.
+Add the directory containing \fIASSEMBLY\fR to the assembly search path.
+.Sp
+This option is equivalent to specifying \fB\-L\fR `\fIdirname\fR ASSEMBLY`.
+.TP
\fB\-\-since\fR=\fIVERSION\fR
When \fIupdating\fR documentation for an assembly, if a type or member is
encountered which didn't exist in the previous version of the assembly a
diff --git a/man/mono.1 b/man/mono.1
index 3cefaa7..a9e0937 100644
--- a/man/mono.1
+++ b/man/mono.1
@@ -951,7 +951,7 @@ integrity of the runtime after sending this signal is not guaranteed
and the application might crash or terminate at any given point
afterwards.
.PP
-The \fB--debug=casts\FR option can be used to get more detailed
+The \fB--debug=casts\fR option can be used to get more detailed
information for Invalid Cast operations, it will provide information
about the types involved.
.PP
diff --git a/mcs/build/common/Consts.cs b/mcs/build/common/Consts.cs
index d113395..5de080a 100644
--- a/mcs/build/common/Consts.cs
+++ b/mcs/build/common/Consts.cs
@@ -46,7 +46,7 @@ internal
// Use these assembly version constants to make code more maintainable.
//
- public const string MonoVersion = "2.4.0.0";
+ public const string MonoVersion = "2.4.2.3";
public const string MonoCompany = "MONO development team";
public const string MonoProduct = "MONO Common language infrastructure";
public const string MonoCopyright = "(c) various MONO Authors";
diff --git a/mcs/class/Makefile b/mcs/class/Makefile
index fdd246e..62af4c6 100644
--- a/mcs/class/Makefile
+++ b/mcs/class/Makefile
@@ -119,6 +119,7 @@ net_2_0_dirs := \
System.IdentityModel.Selectors \
System.ServiceModel \
System.ServiceModel.Web \
+ System.Web.Mvc \
Mono.Management \
Mono.Options \
Mono.Simd
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
index d42fe76..e255cef 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
@@ -1,3 +1,96 @@
+2009-05-20 Dick Porter <dick at acm.org>
+
+ * XplatUICarbon.cs: Add more locking around MessageQueue
+ manipulations.
+
+2009-05-08 Andrés G. Aragoneses <aaragoneses at novell.com>
+
+ * ToolStripItem.cs: Prevent NRE when our holder is a
+ ToolStripDropDownButton and we get Select()ed.
+
+2009-05-08 Brad Taylor <brad at getcoded.net>
+
+ * DateTimePicker.cs: Add a UIA-specific property to ensure that if
+ is_checkbox_checked is changed, we won't break.
+
+2009-05-08 Brad Taylor <brad at getcoded.net>
+
+ * DateTimePicker.cs: Wrap UIA specific code in NET_2_0 wrappers. Send
+ OnUIASelectionChanged when ShowCheckbox is true and the checkbox
+ recieves focus. Part of fix for #502029.
+
+2009-05-06 Mike Gorse <mgorse at novell.com>
+
+ * FileDialog.cs: Add UIAFocusedItemChanged to PopupButtonPanel.
+ Add PerformClick and PerformDoubleClick to PopupButton.
+ Fixes #499851.
+
+2009-05-04 Carlos Alberto Cortez <calberto.cortez at gmail.com>
+
+ * ToolStripDropDown.cs: In OnVisibleChanged, if we have an OwnerItem,
+ fire OnDropDownOpened/OnDropDownClosed depending on the new
+ visibility. This also ensures that any direct access to this instance
+ will fire the mentioned events for the OwnerItem.
+ * ToolStripDropDownItem.cs: Remove the invocations to
+ OnDropDownOpened/OnDropDownClosed, since they are handled in
+ ToolStripDropDown, as well as updating the
+ OnDropDownHide/OnDropDownShow calls to be in the right order.
+ Fixes #496139.
+
+2009-05-04 Carlos Alberto Cortez <calberto.cortez at gmail.com>
+
+ * MaskedTextBox.cs: If Insert is pressed, change the internal
+ overwrite mode for our default value.
+ Fixes some bits of #477395.
+
+2009-05-04 Carlos Alberto Cortez <calberto.cortez at gmail.com>
+
+ * MaskedTextBox.cs: When setting Text use the very precise algorithm
+ that .net uses: iterate over every char of the new value, trying to
+ use every char, and use a normal call to MaskedTextProvider.Replace
+ call if RejectInputOnFirstFailure is true. Fire OnMaskInputRejected
+ in case of error in both cases, as well.
+ Fixes #477408.
+
+2009-05-04 Carlos Alberto Cortez <calberto.cortez at gmail.com>
+
+ * MaskedTextBox.cs: Handle OnKeyDown to properly process the Delete
+ key. Also create a new method to avoid code duplication between
+ OnKeyDown and OnKeyPress.
+ Fixes #477388.
+
+2009-05-04 Carlos Alberto Cortez <calberto.cortez at gmail.com>
+
+ * MaskedTextBox.cs: In OnKeyPress the IsOverwriteMode check is
+ actually inversed, so put it the right way. Also, don't automatically
+ look for the next editable item after adding a new one, but way for
+ the next insertion (this is what .net does) - this is not needed when
+ MaskedTextProvider.InsertAt is called however, since it already looks for the
+ next editable position.
+ Fixes the remaining bits of #477383.
+
+2009-05-04 Carlos Alberto Cortez <calberto.cortez at gmail.com>
+
+ * MaskedTextBox.cs: In OnKeyPress handle backspace by calling
+ MaskedTextProvider.RemoveAt method. Also for setting the SelectionStart
+ property after the text was modified, adjust the testPosition value
+ depending on what method was called.
+ Fixes part of #477383.
+
+2009-05-04 Andrés G. Aragoneses <aaragoneses at novell.com>
+
+ * TabControl.cs: call Focus() to emit GotFocus event at the
+ proper time when SelectionIndex changes. Fixes #499887.
+
+2009-04-27 Andrés G. Aragoneses <aaragoneses at novell.com>
+
+ * ListView.cs: Make OnColumnClick +internal to be used by a11y.
+
+2009-04-27 Brad Taylor <brad at getcoded.net>
+
+ * ToolStripButton.cs: Emit an internal event when CheckOnClick is
+ changed.
+
2009-02-24 Ivan N. Zlatev <contact at i-nz.net>
* DataGridViewCell.cs: Invalidate the datagrid when the cell is selected
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DateTimePicker.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DateTimePicker.cs
index 0f3c352..36886a4 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DateTimePicker.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DateTimePicker.cs
@@ -318,8 +318,10 @@ namespace System.Windows.Forms {
for (int i = 0; i < part_data.Length; i++)
part_data [i].Selected = false;
Invalidate (date_area_rect);
+#if NET_2_0
OnUIAChecked ();
OnUIASelectionChanged ();
+#endif
}
}
}
@@ -433,7 +435,9 @@ namespace System.Windows.Forms {
// invalidate the value inside this control
this.Invalidate (date_area_rect);
}
+#if NET_2_0
OnUIAMaximumChanged ();
+#endif
}
}
get {
@@ -489,7 +493,9 @@ namespace System.Windows.Forms {
// invalidate the value inside this control
this.Invalidate (date_area_rect);
}
+#if NET_2_0
OnUIAMinimumChanged ();
+#endif
}
}
get {
@@ -547,7 +553,9 @@ namespace System.Windows.Forms {
show_check_box = value;
// invalidate the value inside this control
this.Invalidate (date_area_rect);
+#if NET_2_0
OnUIAShowCheckBoxChanged ();
+#endif
}
}
get {
@@ -563,7 +571,9 @@ namespace System.Windows.Forms {
show_up_down = value;
// need to invalidate the whole control
this.Invalidate ();
+#if NET_2_0
OnUIAShowUpDownChanged ();
+#endif
}
}
get {
@@ -1338,7 +1348,9 @@ namespace System.Windows.Forms {
}
Invalidate ();
+#if NET_2_0
OnUIASelectionChanged ();
+#endif
}
internal void SelectNextPart()
@@ -1391,7 +1403,9 @@ namespace System.Windows.Forms {
}
}
+#if NET_2_0
OnUIASelectionChanged ();
+#endif
}
internal void SelectPreviousPart()
@@ -1447,7 +1461,9 @@ namespace System.Windows.Forms {
}
}
+#if NET_2_0
OnUIASelectionChanged ();
+#endif
}
// raised by key down events.
@@ -1668,6 +1684,9 @@ namespace System.Windows.Forms {
if (ShowCheckBox) {
is_checkbox_selected = true;
Invalidate (CheckBoxRect);
+#if NET_2_0
+ OnUIASelectionChanged ();
+#endif
}
}
@@ -1681,12 +1700,17 @@ namespace System.Windows.Forms {
Rectangle invalidate_rect = Rectangle.Ceiling (part_data [selected_index].drawing_rectangle);
invalidate_rect.Inflate (2, 2);
Invalidate (invalidate_rect);
+#if NET_2_0
OnUIASelectionChanged ();
+#endif
}
else if (is_checkbox_selected)
{
is_checkbox_selected = false;
Invalidate (CheckBoxRect);
+#if NET_2_0
+ OnUIASelectionChanged ();
+#endif
}
}
@@ -1741,13 +1765,20 @@ namespace System.Windows.Forms {
{
is_checkbox_selected = true;
Checked = !Checked;
+#if NET_2_0
+ OnUIASelectionChanged ();
+#endif
return;
}
// Deselect the checkbox only if the pointer is not on it
// *and* the other parts are enabled (Checked as true)
- if (Checked)
+ if (Checked) {
is_checkbox_selected = false;
+#if NET_2_0
+ OnUIASelectionChanged ();
+#endif
+ }
if (ShowUpDown && drop_down_arrow_rect.Contains (e.X, e.Y))
{
@@ -1794,7 +1825,9 @@ namespace System.Windows.Forms {
}
if (invalidate_afterwards) {
Invalidate ();
+#if NET_2_0
OnUIASelectionChanged ();
+#endif
}
}
@@ -1988,9 +2021,13 @@ namespace System.Windows.Forms {
#endregion
-
+#if NET_2_0
#region UIA Framework: Methods, Properties and Events
+ internal bool UIAIsCheckBoxSelected {
+ get { return is_checkbox_selected; }
+ }
+
static object UIAMinimumChangedEvent = new object ();
static object UIAMaximumChangedEvent = new object ();
static object UIASelectionChangedEvent = new object ();
@@ -2071,5 +2108,6 @@ namespace System.Windows.Forms {
}
#endregion
+#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs
index e3b76b5..eaf1761 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs
@@ -1546,7 +1546,7 @@ namespace System.Windows.Forms
if (panel.focusButton != null && panel.focusButton.ButtonState == PopupButtonState.Up) {
panel.focusButton.ButtonState = PopupButtonState.Normal;
- panel.focusButton = null;
+ panel.SetFocusButton (null);
}
Invalidate ();
base.OnMouseEnter (e);
@@ -1648,7 +1648,7 @@ namespace System.Windows.Forms
SetStyle (ControlStyles.StandardClick, false);
}
-
+
void OnClickButton (object sender, EventArgs e)
{
if (lastPopupButton != null && lastPopupButton != sender as PopupButton)
@@ -1676,6 +1676,28 @@ namespace System.Windows.Forms
eh (this, EventArgs.Empty);
}
+#if NET_2_0
+ static object UIAFocusedItemChangedEvent = new object ();
+
+ internal event EventHandler UIAFocusedItemChanged {
+ add { Events.AddHandler (UIAFocusedItemChangedEvent, value); }
+ remove { Events.RemoveHandler (UIAFocusedItemChangedEvent, value); }
+ }
+
+ internal void OnUIAFocusedItemChanged ()
+ {
+ EventHandler eh = (EventHandler) Events [UIAFocusedItemChangedEvent];
+ if (eh != null)
+ eh (this, EventArgs.Empty);
+ }
+
+ internal PopupButton UIAFocusButton {
+ get {
+ return focusButton;
+ }
+ }
+#endif
+
public string CurrentFolder {
set {
string currentPath = value;
@@ -1734,7 +1756,7 @@ namespace System.Windows.Forms
{
if (lastPopupButton != recentlyusedButton) {
recentlyusedButton.ButtonState = PopupButton.PopupButtonState.Up;
- focusButton = recentlyusedButton;
+ SetFocusButton (recentlyusedButton);
}
currentFocusIndex = 0;
@@ -1792,7 +1814,7 @@ namespace System.Windows.Forms
focusButton.ButtonState = PopupButton.PopupButtonState.Normal;
if (newfocusButton.ButtonState != PopupButton.PopupButtonState.Down)
newfocusButton.ButtonState = PopupButton.PopupButtonState.Up;
- focusButton = newfocusButton;
+ SetFocusButton (newfocusButton);
}
e.Handled = true;
@@ -1804,6 +1826,17 @@ namespace System.Windows.Forms
add { Events.AddHandler (PDirectoryChangedEvent, value); }
remove { Events.RemoveHandler (PDirectoryChangedEvent, value); }
}
+
+ internal void SetFocusButton (PopupButton button)
+ {
+ if (button == focusButton)
+ return;
+
+ focusButton = button;
+#if NET_2_0
+ OnUIAFocusedItemChanged ();
+#endif
+ }
}
#endregion
@@ -2758,6 +2791,19 @@ namespace System.Windows.Forms
}
}
+#if NET_2_0
+ #region UIA Framework Members
+ internal void PerformClick ()
+ {
+ OnClick (EventArgs.Empty);
+ }
+
+ internal void PerformDoubleClick ()
+ {
+ OnDoubleClick (EventArgs.Empty);
+ }
+ #endregion
+#endif
protected override void OnClick (EventArgs e)
{
if (!MultiSelect) {
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 04ddcd8..c46c174 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
@@ -3440,7 +3440,7 @@ namespace System.Windows.Forms
eh (this, e);
}
- protected virtual void OnColumnClick (ColumnClickEventArgs e)
+ protected internal virtual void OnColumnClick (ColumnClickEventArgs e)
{
ColumnClickEventHandler eh = (ColumnClickEventHandler)(Events [ColumnClickEvent]);
if (eh != null)
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
index d8cf068..6d32130 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
@@ -226,7 +226,32 @@ namespace System.Windows.Forms
protected override void OnKeyDown (KeyEventArgs e)
{
- base.OnKeyDown (e);
+ // Only handle Delete or Insert here
+
+ if (e.KeyCode == Keys.Insert && insert_key_mode == InsertKeyMode.Default) {
+ // switch the internal overwriting mode, not the public one
+ insert_key_overwriting = !insert_key_overwriting;
+ OnIsOverwriteModeChanged (EventArgs.Empty);
+ e.Handled = true;
+ return;
+ }
+
+ if (e.KeyCode != Keys.Delete || is_empty_mask) {
+ base.OnKeyDown (e);
+ return;
+ }
+
+ int testPosition, endSelection;
+ MaskedTextResultHint resultHint;
+ bool result;
+
+ // Use a slightly different approach than the one used for backspace
+ endSelection = SelectionLength == 0 ? SelectionStart : SelectionStart + SelectionLength - 1;
+ result = provider.RemoveAt (SelectionStart, endSelection, out testPosition, out resultHint);
+
+ PostprocessKeyboardInput (result, testPosition, testPosition, resultHint);
+
+ e.Handled = true;
}
protected override void OnKeyPress (KeyPressEventArgs e)
@@ -236,31 +261,43 @@ namespace System.Windows.Forms
return;
}
- int testPosition;
+ int testPosition, editPosition;
MaskedTextResultHint resultHint;
bool result;
- if (IsOverwriteMode) {
- result = provider.InsertAt (e.KeyChar, SelectionStart, out testPosition, out resultHint);
+ if (e.KeyChar == '\b') {
+ if (SelectionLength == 0)
+ result = provider.RemoveAt (SelectionStart - 1, SelectionStart - 1, out testPosition, out resultHint);
+ else
+ result = provider.RemoveAt (SelectionStart, SelectionStart + SelectionLength - 1, out testPosition, out resultHint);
+
+ editPosition = testPosition;
+ } else if (IsOverwriteMode) {
+ int start = provider.FindEditPositionFrom (SelectionStart, true);
+ result = provider.Replace (e.KeyChar, start, start, out testPosition, out resultHint);
+ editPosition = testPosition + 1;
} else {
- result = provider.Replace (e.KeyChar, SelectionStart, SelectionStart, out testPosition, out resultHint);
+ result = provider.InsertAt (e.KeyChar, SelectionStart, out testPosition, out resultHint);
+ editPosition = testPosition + 1;
}
+
+ PostprocessKeyboardInput (result, editPosition, testPosition, resultHint);
- if (!result) {
- OnMaskInputRejected (new MaskInputRejectedEventArgs (testPosition, resultHint));
- } else {
- int iIndex = provider.FindEditPositionFrom (SelectionStart+1, true);
+ e.Handled = true;
+ }
- if (iIndex != MaskedTextProvider.InvalidIndex) {
- SelectionStart = iIndex;
- } else {
+ void PostprocessKeyboardInput (bool result, int newPosition, int testPosition, MaskedTextResultHint resultHint)
+ {
+ if (!result)
+ OnMaskInputRejected (new MaskInputRejectedEventArgs (testPosition, resultHint));
+ else {
+ if (newPosition != MaskedTextProvider.InvalidIndex)
+ SelectionStart = newPosition;
+ else
SelectionStart = provider.Length;
- }
UpdateVisibleText ();
}
-
- e.Handled = true;
}
protected override void OnKeyUp (KeyEventArgs e)
@@ -695,7 +732,8 @@ namespace System.Windows.Forms
base.Text = value;
setting_text = false;
} else {
- InputText (value, true, true);
+ SelectionStart = 0;
+ InputText (value, true);
}
UpdateVisibleText ();
}
@@ -839,7 +877,7 @@ namespace System.Windows.Forms
setting_text = false;
}
- private void InputText (string text, bool overwrite, bool clear)
+ private void InputText (string text, bool clear)
{
string input = text;
@@ -849,27 +887,24 @@ namespace System.Windows.Forms
int testPosition;
MaskedTextResultHint resultHint;
- bool result = false;
+ bool result;
if (RejectInputOnFirstFailure) {
- if (overwrite) {
- provider.Replace (input, SelectionStart, SelectionStart + input.Length - 1, out testPosition, out resultHint);
- } else {
- provider.InsertAt (input, SelectionStart);
- }
+ result = provider.Replace (input, SelectionStart, SelectionStart + input.Length - 1, out testPosition, out resultHint);
+ if (!result)
+ OnMaskInputRejected (new MaskInputRejectedEventArgs (testPosition, resultHint));
} else {
- while (!result && input.Length > 0) {
- if (overwrite) {
- result = provider.Replace (input, SelectionStart, SelectionStart + input.Length - 1, out testPosition, out resultHint);
- } else {
- result = provider.InsertAt (input, SelectionStart, out testPosition, out resultHint);
- }
-
- if (result) {
- break;
- }
-
- input = input.Substring (0, Math.Min(testPosition - SelectionStart - 1, input.Length - 1));
+ // Unfortunately we can't break if we reach the end of the mask, since
+ // .net iterates over _all_ the chars in the input
+ testPosition = SelectionStart;
+ for (int i = 0; i < input.Length; i++) {
+ char c = input [i];
+
+ result = provider.InsertAt (c, testPosition, out testPosition, out resultHint);
+ if (result)
+ testPosition++; // Move to the next free position
+ else
+ OnMaskInputRejected (new MaskInputRejectedEventArgs (testPosition, resultHint));
}
}
}
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs
index 9f7240a..8549b48 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs
@@ -295,6 +295,7 @@ namespace System.Windows.Forms {
return;
#endif
+ Focus ();
int old_index = selected_index;
int new_index = value;
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripButton.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripButton.cs
index 3c42223..c55e29e 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripButton.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripButton.cs
@@ -110,7 +110,12 @@ namespace System.Windows.Forms
[DefaultValue (false)]
public bool CheckOnClick {
get { return this.check_on_click; }
- set { this.check_on_click = value; }
+ set {
+ if (this.check_on_click != value) {
+ this.check_on_click = value;
+ OnUIACheckOnClickChangedEvent (EventArgs.Empty);
+ }
+ }
}
[DefaultValue (CheckState.Unchecked)]
@@ -225,6 +230,23 @@ namespace System.Windows.Forms
remove { Events.RemoveHandler (CheckStateChangedEvent, value); }
}
#endregion
+
+ #region UIA Framework Events
+ static object UIACheckOnClickChangedEvent = new object ();
+
+ internal event EventHandler UIACheckOnClickChanged {
+ add { Events.AddHandler (UIACheckOnClickChangedEvent, value); }
+ remove { Events.RemoveHandler (UIACheckOnClickChangedEvent, value); }
+ }
+
+ internal void OnUIACheckOnClickChangedEvent (EventArgs args)
+ {
+ EventHandler eh
+ = (EventHandler) Events [UIACheckOnClickChangedEvent];
+ if (eh != null)
+ eh (this, args);
+ }
+ #endregion
}
}
#endif
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs
index 083385b..1603856 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs
@@ -647,6 +647,14 @@ namespace System.Windows.Forms
protected override void OnVisibleChanged (EventArgs e)
{
base.OnVisibleChanged (e);
+
+ if (owner_item != null && owner_item is ToolStripDropDownItem) {
+ ToolStripDropDownItem dropdown_owner = (ToolStripDropDownItem)owner_item;
+ if (Visible)
+ dropdown_owner.OnDropDownOpened (EventArgs.Empty);
+ else
+ dropdown_owner.OnDropDownClosed (EventArgs.Empty);
+ }
}
[EditorBrowsable (EditorBrowsableState.Advanced)]
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownItem.cs
index ac3976a..d880899 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownItem.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownItem.cs
@@ -129,11 +129,11 @@ namespace System.Windows.Forms
if (this.drop_down == null || !this.DropDown.Visible)
return;
+ // OnDropDownHide is called before actually closing DropDown
+ this.OnDropDownHide (EventArgs.Empty);
this.DropDown.Close (ToolStripDropDownCloseReason.CloseCalled);
this.is_pressed = false;
this.Invalidate ();
- this.OnDropDownHide (EventArgs.Empty);
- this.OnDropDownClosed (EventArgs.Empty);
}
public void ShowDropDown ()
@@ -152,7 +152,6 @@ namespace System.Windows.Forms
this.Invalidate ();
this.DropDown.Show (this.DropDownLocation);
- this.OnDropDownOpened (EventArgs.Empty);
}
#endregion
@@ -325,11 +324,11 @@ namespace System.Windows.Forms
if (this.drop_down == null || !this.DropDown.Visible)
return;
+ // OnDropDownHide is called before actually closing DropDown
+ this.OnDropDownHide (EventArgs.Empty);
this.DropDown.Close (reason);
this.is_pressed = false;
this.Invalidate ();
- this.OnDropDownHide (EventArgs.Empty);
- this.OnDropDownClosed (EventArgs.Empty);
}
private void DropDown_ItemAdded (object sender, ToolStripItemEventArgs e)
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs
index 80920b3..4bd5fcf 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs
@@ -924,12 +924,14 @@ namespace System.Windows.Forms
{
if (!this.is_selected && this.CanSelect) {
this.is_selected = true;
-
- if (this.Visible && this.Parent.Focused && this is ToolStripControlHost)
- (this as ToolStripControlHost).Focus ();
+
+ if (this.Parent != null) {
+ if (this.Visible && this.Parent.Focused && this is ToolStripControlHost)
+ (this as ToolStripControlHost).Focus ();
- this.Invalidate ();
- this.Parent.NotifySelectedChanged (this);
+ this.Invalidate ();
+ this.Parent.NotifySelectedChanged (this);
+ }
OnUIASelectionChanged ();
}
}
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs
index f157744..dd74978 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs
@@ -141,13 +141,15 @@ namespace System.Windows.Forms {
internal void FlushQueue () {
CheckTimers (DateTime.UtcNow);
- while (MessageQueue.Count > 0) {
- object queueobj = MessageQueue.Dequeue ();
- if (queueobj is GCHandle) {
- XplatUIDriverSupport.ExecuteClientMessage((GCHandle)queueobj);
- } else {
- MSG msg = (MSG)queueobj;
- NativeWindow.WndProc (msg.hwnd, msg.message, msg.wParam, msg.lParam);
+ lock (queuelock) {
+ while (MessageQueue.Count > 0) {
+ object queueobj = MessageQueue.Dequeue ();
+ if (queueobj is GCHandle) {
+ XplatUIDriverSupport.ExecuteClientMessage((GCHandle)queueobj);
+ } else {
+ MSG msg = (MSG)queueobj;
+ NativeWindow.WndProc (msg.hwnd, msg.message, msg.wParam, msg.lParam);
+ }
}
}
}
@@ -420,7 +422,7 @@ namespace System.Windows.Forms {
msg.message = Msg.WM_MOUSEHOVER;
msg.wParam = GetMousewParam (0);
msg.lParam = (IntPtr)((ushort)Hover.X << 16 | (ushort)Hover.X);
- MessageQueue.Enqueue (msg);
+ EnqueueMessage (msg);
}
}
#endregion
@@ -736,7 +738,7 @@ namespace System.Windows.Forms {
MSG msg = new MSG ();
msg.message = Msg.WM_PAINT;
msg.hwnd = hwnd.Handle;
- MessageQueue.Enqueue (msg);
+ EnqueueMessage (msg);
hwnd.expose_pending = true;
}
} else {
@@ -749,7 +751,7 @@ namespace System.Windows.Forms {
msg.wParam = hrgn == IntPtr.Zero ? (IntPtr)1 : hrgn;
msg.refobject = rgn;
msg.hwnd = hwnd.Handle;
- MessageQueue.Enqueue (msg);
+ EnqueueMessage (msg);
hwnd.nc_expose_pending = true;
}
@@ -1613,7 +1615,7 @@ namespace System.Windows.Forms {
msg.message = message;
msg.wParam = wParam;
msg.lParam = lParam;
- MessageQueue.Enqueue (msg);
+ EnqueueMessage (msg);
return true;
}
@@ -1681,7 +1683,9 @@ namespace System.Windows.Forms {
[MonoTODO]
internal override void SendAsyncMethod (AsyncMethodData method) {
// Fake async
- MessageQueue.Enqueue (GCHandle.Alloc (method));
+ lock (queuelock) {
+ MessageQueue.Enqueue (GCHandle.Alloc (method));
+ }
}
[MonoTODO]
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 22335bc..57fbc54 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
@@ -5636,13 +5636,15 @@ namespace System.Windows.Forms {
case FormWindowState.Maximized: SetWindowState(handle, FormWindowState.Maximized); break;
}
}
-
- SendMessage(handle, Msg.WM_WINDOWPOSCHANGED, IntPtr.Zero, IntPtr.Zero);
}
else {
UnmapWindow(hwnd, WindowType.Both);
}
}
+
+ if (visible)
+ SendMessage(handle, Msg.WM_WINDOWPOSCHANGED, IntPtr.Zero, IntPtr.Zero);
+
return true;
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
index 3d25ae7..2d01a46 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-08 Andrés G. Aragoneses <aaragoneses at novell.com>
+
+ * ToolStripMenuItemTest.cs: Add a test for a NRE bug.
+
+2009-05-04 Andrés G. Aragoneses <aaragoneses at novell.com>
+
+ * TabControlTest.cs: Added test for bug#499887.
+
2009-01-19 Carlos Alberto Cortez <calberto.cortez at gmail.com>
* ListBoxTest.cs: New test for RemoveAt and selection.
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
index a59c516..7f2f223 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
@@ -754,7 +754,40 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("tc_OnEnter;p1_OnEnter;p1_OnLeave;tc_OnLeave;", events, "A2");
}
-
+ [Test] // bug #499887
+ public void SelectedIndexChangeFiresFocus ()
+ {
+ Form f = new Form ();
+ TabControl tc = new TabControl ();
+ TabPage p1 = new TabPage ();
+ TabPage p2 = new TabPage ();
+ string events = string.Empty;
+
+ tc.TabPages.Add (p1);
+ tc.TabPages.Add (p2);
+ tc.SelectedIndex = 0;
+ Button b1 = new Button ();
+ Button b2 = new Button ();
+
+ f.Controls.Add (b1);
+ f.Controls.Add (b2);
+ f.Controls.Add (tc);
+
+ f.Show ();
+ b1.Focus ();
+ b2.GotFocus += new EventHandler (delegate (Object obj, EventArgs e) {
+ tc.SelectedIndex = 1;
+ });
+
+ tc.GotFocus += new EventHandler(delegate (Object obj, EventArgs e) { events += ("tc_OnGotFocus" + tc.SelectedIndex + ";"); });
+ tc.SelectedIndexChanged += new EventHandler(delegate (Object obj, EventArgs e) { events += ("tc_OnSelectedIndexChanged" + tc.SelectedIndex + ";"); });
+ p2.Enter += new EventHandler(delegate (Object obj, EventArgs e) { events += ("p2_OnEnter" + tc.SelectedIndex + ";"); });
+ p2.Leave += new EventHandler (delegate (Object obj, EventArgs e) { events += ("p2_OnLeave;"); });
+
+ b2.Focus ();
+ Assert.AreEqual ("tc_OnGotFocus0;p2_OnEnter1;tc_OnSelectedIndexChanged1;", events, "A1");
+ Assert.IsTrue (tc.Focused, "A2");
+ }
#endif
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs
index 4e0f6d0..e3f0850 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs
@@ -162,6 +162,54 @@ namespace MonoTests.System.Windows.Forms
tsmi.ShortcutKeyDisplayString = null;
Assert.AreEqual (null, tsmi.ShortcutKeyDisplayString, "A5");
}
+
+ [Test]
+ public void ToolStripDropDownButton_SelectChild ()
+ {
+ ToolStripDropDownButton tsddb = new ToolStripDropDownButton ();
+ tsddb.DropDownClosed += Helper.FireEvent1;
+ tsddb.DropDownItemClicked += Helper.FireEvent2;
+ tsddb.DropDownOpened += Helper.FireEvent1;
+ tsddb.DropDownOpening += Helper.FireEvent1;
+ tsddb.Click += Helper.FireEvent1;
+
+ Helper item1 = new Helper ();
+ Helper item2 = new Helper ();
+
+ tsddb.DropDownItems.Add (item1);
+ tsddb.DropDownItems.Add (item2);
+ ToolStripDropDownButton_SelectChildVerify (item1);
+ ToolStrip ts = new ToolStrip ();
+ ts.Items.Add (tsddb);
+ ToolStripDropDownButton_SelectChildVerify (item2);
+ }
+
+ private static void ToolStripDropDownButton_SelectChildVerify (Helper item)
+ {
+ Assert.IsNull (item.MyParent);
+ Assert.IsTrue (item.CanSelect);
+ Assert.IsFalse (item.Selected);
+ item.Select ();
+ Assert.IsTrue (item.Selected);
+ Assert.IsFalse (Helper.eventFired);
+ }
+
+ private class Helper : ToolStripMenuItem
+ {
+ internal Helper () {
+ this.DropDownClosed += Helper.FireEvent1;
+ this.DropDownItemClicked += Helper.FireEvent2;
+ this.DropDownOpened += Helper.FireEvent1;
+ this.DropDownOpening += Helper.FireEvent1;
+ this.Click += Helper.FireEvent1;
+ }
+
+ internal ToolStrip MyParent { get { return this.Parent; } }
+
+ internal static bool eventFired = false;
+ internal static void FireEvent1 (object o, EventArgs args) { eventFired = true; }
+ internal static void FireEvent2 (object o, ToolStripItemClickedEventArgs args) { FireEvent1 (null, null); }
+ }
private class ExposeProtectedMethods : ToolStripMenuItem
{
diff --git a/mcs/class/Microsoft.Build.Engine/ChangeLog b/mcs/class/Microsoft.Build.Engine/ChangeLog
index 26ffb21..3e8f199 100644
--- a/mcs/class/Microsoft.Build.Engine/ChangeLog
+++ b/mcs/class/Microsoft.Build.Engine/ChangeLog
@@ -1,3 +1,17 @@
+2009-02-21 Ankit Jain <jankit at novell.com>
+
+ * Import.cs (GetFullPath): Use Utilities.FromMSBuildPath .
+
+2009-02-19 Jonathan Chambers <joncham at gmail.com>
+
+ * Microsoft.Build.Engine.csproj: Add.
+ * Microsoft.Build.Engine.Test.csproj: Update.
+
+2009-01-31 Ankit Jain <jankit at novell.com>
+
+ * Microsoft.Build.Engine_test.dll.sources: Replace BatchingImpl.cs with
+ BatchingImplBase.cs, TargetBatchingImpl.cs and TaskBatchingImpl.cs
+
2009-01-06 Ankit Jain <jankit at novell.com>
* Microsoft.Build.Engine_test.dll.sources: Add TestMessageLogger from
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BatchingImpl.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BatchingImpl.cs
deleted file mode 100644
index b7d4921..0000000
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BatchingImpl.cs
+++ /dev/null
@@ -1,337 +0,0 @@
-//
-// BatchingImpl.cs: Class that implements BatchingAlgorithm from the wiki.
-//
-// Author:
-// Marek Sieradzki (marek.sieradzki at gmail.com)
-// Ankit Jain (jankit at novell.com)
-//
-// (C) 2005 Marek Sieradzki
-// Copyright 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-#if NET_2_0
-
-using System;
-using System.IO;
-using System.Collections.Generic;
-using System.Text;
-using System.Xml;
-
-using Microsoft.Build.Framework;
-
-namespace Microsoft.Build.BuildEngine {
- internal class BatchingImpl {
-
- string inputs;
- string outputs;
- Project project;
-
- List<BuildItemGroup> consumedItemNames;
- List<MetadataReference> consumedMetadataReferences;
- List<MetadataReference> consumedQMetadataReferences;
- List<MetadataReference> consumedUQMetadataReferences;
- Dictionary<string, BuildItemGroup> batchedItemsByName;
- Dictionary<string, BuildItemGroup> commonItemsByName;
-
- public BatchingImpl (Project project, XmlElement targetElement)
- {
- if (targetElement == null)
- throw new ArgumentNullException ("targetElement");
- if (project == null)
- throw new ArgumentNullException ("project");
-
- this.project = project;
-
- inputs = targetElement.GetAttribute ("Inputs");
- outputs = targetElement.GetAttribute ("Outputs");
- }
-
- public bool BuildNeeded ()
- {
- // FIXME: change this to ITaskItem instead of string
-
- Expression inputExpr, outputExpr;
- string[] inputFiles, outputFiles;
- DateTime oldestInput, youngestOutput;
-
- if (inputs == String.Empty)
- return true;
-
- if (outputs == String.Empty)
- return true;
-
-
- inputExpr = new Expression ();
- inputExpr.Parse (inputs, true);
- outputExpr = new Expression ();
- outputExpr.Parse (outputs, true);
-
- inputFiles = (string[]) inputExpr.ConvertTo (project, typeof (string[]));
- outputFiles = (string[]) outputExpr.ConvertTo (project, typeof (string[]));
-
- if (inputFiles == null)
- return true;
-
- if (outputFiles == null)
- return true;
-
- if (inputFiles.Length == 0)
- return true;
-
- if (outputFiles.Length == 0)
- return true;
-
-
- if (File.Exists (inputFiles [0]))
- oldestInput = File.GetLastWriteTime (inputFiles [0]);
- else
- return true;
-
- if (File.Exists (outputFiles [0]))
- youngestOutput = File.GetLastWriteTime (outputFiles [0]);
- else
- return true;
-
-
- foreach (string file in inputFiles) {
- if (file.Trim () == String.Empty)
- continue;
-
- if (File.Exists (file.Trim ())) {
- if (File.GetLastWriteTime (file.Trim ()) > oldestInput)
- oldestInput = File.GetLastWriteTime (file.Trim ());
- } else {
- return true;
- }
- }
- foreach (string file in outputFiles) {
- if (file.Trim () == String.Empty)
- continue;
-
- if (File.Exists (file.Trim ())) {
- if (File.GetLastWriteTime (file.Trim ()) < youngestOutput)
- youngestOutput = File.GetLastWriteTime (file.Trim ());
- } else
- return true;
- }
-
- if (oldestInput > youngestOutput)
- return true;
- else
- return false;
- }
-
- public bool BatchBuildTask (BuildTask buildTask)
- {
- try {
- return BatchBuildTaskInternal (buildTask);
- } finally {
- consumedItemNames = null;
- consumedMetadataReferences = null;
- consumedQMetadataReferences = null;
- consumedUQMetadataReferences = null;
- batchedItemsByName = null;
- commonItemsByName = null;
- }
- }
-
- //FIXME: Target batching
- bool BatchBuildTaskInternal (BuildTask buildTask)
- {
- // all referenced item lists
- consumedItemNames = new List<BuildItemGroup> ();
-
- // all referenced metadata
- consumedMetadataReferences = new List<MetadataReference> ();
- consumedQMetadataReferences = new List<MetadataReference> ();
- consumedUQMetadataReferences = new List<MetadataReference> ();
-
- // populate list of referenced items and metadata
- ParseAttributesForBatching (buildTask);
-
- if (consumedMetadataReferences.Count == 0) {
- // No batching required
- if (ConditionParser.ParseAndEvaluate (buildTask.Condition, project))
- return buildTask.Execute ();
- else // skipped, it should be logged
- return true;
- }
-
- batchedItemsByName = new Dictionary<string, BuildItemGroup> ();
-
- // These will passed as is for every batch
- commonItemsByName = new Dictionary<string, BuildItemGroup> ();
-
- ValidateUnqualifiedMetadataReferences ();
-
- if (consumedUQMetadataReferences.Count > 0) {
- // Atleast one unqualified metadata ref is found, so
- // batching will be done for all referenced item lists
- foreach (BuildItemGroup group in consumedItemNames)
- batchedItemsByName [group [0].Name] = group;
- }
-
- // All items referred via qualified metadata refs will be batched
- foreach (MetadataReference mr in consumedQMetadataReferences) {
- BuildItemGroup group;
- if (project.EvaluatedItemsByName.TryGetValue (mr.ItemName, out group))
- batchedItemsByName [mr.ItemName] = group;
- }
-
- // CommonItemNames = ConsumedItemNames - BatchedItemNames
- foreach (BuildItemGroup group in consumedItemNames) {
- if (!batchedItemsByName.ContainsKey (group [0].Name))
- commonItemsByName [group [0].Name] = group;
- }
-
- // Bucketizing
- IEnumerable<Dictionary<string, BuildItemGroup>> buckets = Bucketize ();
-
- // Run the task in batches
- bool retval = true;
- foreach (Dictionary<string, BuildItemGroup> bucket in buckets) {
- project.SetBatchedItems (bucket, commonItemsByName);
- if (ConditionParser.ParseAndEvaluate (buildTask.Condition, project)) {
- if (! (retval = buildTask.Execute ()))
- break;
- }
- }
- project.SetBatchedItems (null, null);
-
- return retval;
- }
-
- // Parse task attributes to get list of referenced metadata and items
- // to determine batching
- //
- void ParseAttributesForBatching (BuildTask buildTask)
- {
- foreach (XmlAttribute attrib in buildTask.TaskElement.Attributes) {
- Expression expr = new Expression ();
- expr.Parse (attrib.Value, true);
-
- foreach (object o in expr.Collection) {
- MetadataReference mr = o as MetadataReference;
- if (mr != null) {
- consumedMetadataReferences.Add (mr);
- if (mr.IsQualified)
- consumedQMetadataReferences.Add (mr);
- else
- consumedUQMetadataReferences.Add (mr);
- continue;
- }
-
- ItemReference ir = o as ItemReference;
- if (ir != null) {
- BuildItemGroup group;
- if (project.EvaluatedItemsByName.TryGetValue (ir.ItemName, out group))
- consumedItemNames.Add (group);
- }
- }
- }
- }
-
- //Ensure that for every metadataReference in consumedUQMetadataReferences,
- //every item in every itemlist in consumedItemNames has a non-null value
- //for that metadata
- void ValidateUnqualifiedMetadataReferences ()
- {
- if (consumedUQMetadataReferences.Count > 0 &&
- consumedItemNames.Count == 0 &&
- consumedQMetadataReferences.Count == 0) {
- throw new Exception (String.Format (
- "Item metadata should be referenced with the item name %(ItemName.{0})",
- consumedQMetadataReferences [0].MetadataName));
- }
-
- foreach (MetadataReference mr in consumedUQMetadataReferences) {
- foreach (BuildItemGroup group in consumedItemNames) {
- foreach (BuildItem item in group) {
- if (item.HasMetadata (mr.MetadataName))
- continue;
-
- throw new Exception (String.Format (
- "Metadata named '{0}' not found in item named {1} in item list named {2}",
- mr.MetadataName, item.FinalItemSpec, group [0].Name));
- }
- }
- }
- }
-
-
- IEnumerable<Dictionary<string, BuildItemGroup>> Bucketize ()
- {
- Dictionary<string, Dictionary<string, BuildItemGroup>> buckets = new Dictionary<string, Dictionary<string, BuildItemGroup>> ();
-
- // For each item list represented in "BatchedItemNames", and then for each item
- // within that list, get the values for that item for each of the metadata in
- // "ConsumedMetadataReferences". In the table of metadata values, "%(MyItem.MyMetadata)"
- // would get a separate entry than "%(MyMetadata)", even though the metadata name is the same.
-
- foreach (BuildItemGroup group in batchedItemsByName.Values) {
- string itemName = group [0].Name;
- foreach (BuildItem item in group) {
- StringBuilder key_sb = new StringBuilder ();
- string value = String.Empty;
-
- // build the bucket key, unique set of metadata values
- foreach (MetadataReference mr in consumedMetadataReferences) {
- value = String.Empty;
- if (mr.IsQualified) {
- if (String.Compare (mr.ItemName, itemName) == 0)
- value = item.GetEvaluatedMetadata (mr.MetadataName);
- } else {
- if (item.HasMetadata (mr.MetadataName))
- value = item.GetEvaluatedMetadata (mr.MetadataName);
- }
-
- key_sb.AppendFormat ("{0}.{1}:{2},",
- mr.IsQualified ? mr.ItemName : "",
- mr.MetadataName,
- value);
- }
-
- // Every bucket corresponds to a unique _set_ of metadata values
- // So, every bucket would have itemGroups with same set of metadata
- // values
-
- string bucket_key = key_sb.ToString ();
- Dictionary<string, BuildItemGroup> bucket;
- if (!buckets.TryGetValue (bucket_key, out bucket))
- // new bucket
- buckets [bucket_key] = bucket = new Dictionary<string, BuildItemGroup> ();
-
- string itemGroup_key = item.Name;
- BuildItemGroup itemGroup;
- if (!bucket.TryGetValue (itemGroup_key, out itemGroup))
- bucket [itemGroup_key] = itemGroup = new BuildItemGroup ();
-
- itemGroup.AddItem (item);
- }
- }
-
- return buckets.Values;
- }
-
- }
-}
-
-#endif
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BatchingImplBase.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BatchingImplBase.cs
new file mode 100644
index 0000000..293c524
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BatchingImplBase.cs
@@ -0,0 +1,238 @@
+//
+// BatchingImplBase.cs: Base class that implements BatchingAlgorithm from the wiki.
+//
+// Author:
+// Marek Sieradzki (marek.sieradzki at gmail.com)
+// Ankit Jain (jankit at novell.com)
+//
+// (C) 2005 Marek Sieradzki
+// Copyright 2008 Novell, Inc (http://www.novell.com)
+// Copyright 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Text;
+using System.Xml;
+
+using Microsoft.Build.Framework;
+
+namespace Microsoft.Build.BuildEngine {
+ internal class BatchingImplBase {
+
+ protected Dictionary<string, BuildItemGroup> consumedItemsByName;
+ protected List<MetadataReference> consumedMetadataReferences;
+ protected List<MetadataReference> consumedQMetadataReferences;
+ protected List<MetadataReference> consumedUQMetadataReferences;
+ protected Dictionary<string, BuildItemGroup> batchedItemsByName;
+ protected Dictionary<string, BuildItemGroup> commonItemsByName;
+
+ protected Project project;
+ protected ICollection<Dictionary<string, BuildItemGroup>> buckets;
+
+ protected BatchingImplBase (Project project)
+ {
+ if (project == null)
+ throw new ArgumentNullException ("project");
+
+ this.project = project;
+ }
+
+ protected void Init ()
+ {
+ // all referenced item lists
+ consumedItemsByName = new Dictionary<string, BuildItemGroup> ();
+
+ // all referenced metadata
+ consumedMetadataReferences = new List<MetadataReference> ();
+ consumedQMetadataReferences = new List<MetadataReference> ();
+ consumedUQMetadataReferences = new List<MetadataReference> ();
+ }
+
+ protected void BatchAndPrepareBuckets ()
+ {
+ batchedItemsByName = new Dictionary<string, BuildItemGroup> ();
+
+ // These will passed as is for every batch
+ commonItemsByName = new Dictionary<string, BuildItemGroup> ();
+
+ ValidateUnqualifiedMetadataReferences ();
+
+ if (consumedUQMetadataReferences.Count > 0) {
+ // Atleast one unqualified metadata ref is found, so
+ // batching will be done for all referenced item lists
+ foreach (KeyValuePair<string, BuildItemGroup> pair in consumedItemsByName)
+ batchedItemsByName [pair.Key] = pair.Value;
+ }
+
+ // All items referred via qualified metadata refs will be batched
+ foreach (MetadataReference mr in consumedQMetadataReferences) {
+ BuildItemGroup group;
+ if (project.TryGetEvaluatedItemByNameBatched (mr.ItemName, out group))
+ batchedItemsByName [mr.ItemName] = group;
+ }
+
+ // CommonItemNames = ConsumedItemNames - BatchedItemNames
+ foreach (KeyValuePair<string, BuildItemGroup> pair in consumedItemsByName) {
+ if (!batchedItemsByName.ContainsKey (pair.Key))
+ commonItemsByName [pair.Key] = pair.Value;
+ }
+
+ // Bucketizing
+ buckets = Bucketize ();
+ }
+
+ protected void ParseAttribute (string value)
+ {
+ Expression expr = new Expression ();
+ expr.Parse (value, true);
+
+ foreach (object o in expr.Collection) {
+ MetadataReference mr = o as MetadataReference;
+ if (mr != null) {
+ consumedMetadataReferences.Add (mr);
+ if (mr.IsQualified)
+ consumedQMetadataReferences.Add (mr);
+ else
+ consumedUQMetadataReferences.Add (mr);
+ continue;
+ }
+
+ ItemReference ir = o as ItemReference;
+ if (ir != null) {
+ BuildItemGroup group;
+ if (!project.TryGetEvaluatedItemByNameBatched (ir.ItemName, out group))
+ if (!project.EvaluatedItemsByName.TryGetValue (ir.ItemName, out group))
+ group = new BuildItemGroup ();
+
+ consumedItemsByName [ir.ItemName] = group;
+ }
+ }
+ }
+
+ //Ensure that for every metadataReference in consumedUQMetadataReferences,
+ //every item in every itemlist in consumedItemsByName has a non-null value
+ //for that metadata
+ void ValidateUnqualifiedMetadataReferences ()
+ {
+ if (consumedUQMetadataReferences.Count > 0 &&
+ consumedItemsByName.Count == 0 &&
+ consumedQMetadataReferences.Count == 0) {
+ throw new Exception ("Item metadata should be referenced with the item name %(ItemName.MetadataName)");
+ }
+
+ foreach (MetadataReference mr in consumedUQMetadataReferences) {
+ foreach (KeyValuePair<string, BuildItemGroup> pair in consumedItemsByName) {
+ foreach (BuildItem item in pair.Value) {
+ if (item.HasMetadata (mr.MetadataName))
+ continue;
+
+ throw new Exception (String.Format (
+ "Metadata named '{0}' not found in item named {1} in item list named {2}",
+ mr.MetadataName, item.FinalItemSpec, pair.Key));
+ }
+ }
+ }
+ }
+
+ ICollection<Dictionary<string, BuildItemGroup>> Bucketize ()
+ {
+ Dictionary<string, Dictionary<string, BuildItemGroup>> buckets =
+ new Dictionary<string, Dictionary<string, BuildItemGroup>> ();
+
+ // For each item list represented in "BatchedItemNames", and then for each item
+ // within that list, get the values for that item for each of the metadata in
+ // "ConsumedMetadataReferences". In the table of metadata values, "%(MyItem.MyMetadata)"
+ // would get a separate entry than "%(MyMetadata)", even though the metadata name is the same.
+
+ foreach (KeyValuePair<string, BuildItemGroup> pair in batchedItemsByName) {
+ string itemName = pair.Key;
+ BuildItemGroup group = pair.Value;
+ foreach (BuildItem item in group) {
+ StringBuilder key_sb = new StringBuilder ();
+ string value = String.Empty;
+
+ // build the bucket key, unique set of metadata values
+ foreach (MetadataReference mr in consumedMetadataReferences) {
+ value = String.Empty;
+ if (mr.IsQualified) {
+ if (String.Compare (mr.ItemName, itemName) == 0)
+ value = item.GetEvaluatedMetadata (mr.MetadataName);
+ } else {
+ if (item.HasMetadata (mr.MetadataName))
+ value = item.GetEvaluatedMetadata (mr.MetadataName);
+ }
+
+ key_sb.AppendFormat ("{0}.{1}:{2},",
+ mr.IsQualified ? mr.ItemName : "",
+ mr.MetadataName,
+ value);
+ }
+
+ // Every bucket corresponds to a unique _set_ of metadata values
+ // So, every bucket would have itemGroups with same set of metadata
+ // values
+
+ string bucket_key = key_sb.ToString ();
+ Dictionary<string, BuildItemGroup> bucket;
+ if (!buckets.TryGetValue (bucket_key, out bucket))
+ // new bucket
+ buckets [bucket_key] = bucket = new Dictionary<string, BuildItemGroup> ();
+
+ string itemGroup_key = item.Name;
+ BuildItemGroup itemGroup;
+ if (!bucket.TryGetValue (itemGroup_key, out itemGroup))
+ bucket [itemGroup_key] = itemGroup = new BuildItemGroup ();
+
+ itemGroup.AddItem (item);
+ }
+ }
+
+ if (buckets.Values.Count == 0) {
+ // no buckets
+ buckets.Add ("none", new Dictionary<string, BuildItemGroup> ());
+ AddEmptyGroups (buckets);
+ if (buckets ["none"].Values.Count == 0)
+ buckets.Remove ("none");
+ } else {
+ AddEmptyGroups (buckets);
+ }
+
+ return buckets.Values;
+ }
+
+ void AddEmptyGroups (Dictionary<string, Dictionary<string, BuildItemGroup>> buckets)
+ {
+ foreach (Dictionary<string, BuildItemGroup> bucket in buckets.Values) {
+ foreach (string name in batchedItemsByName.Keys) {
+ BuildItemGroup group;
+ if (!bucket.TryGetValue (name, out group))
+ bucket [name] = new BuildItemGroup ();
+ }
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildChoose.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildChoose.cs
index 2407184..7abb245 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildChoose.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildChoose.cs
@@ -35,15 +35,36 @@ namespace Microsoft.Build.BuildEngine {
internal class BuildChoose {
BuildWhen otherwise;
- //Project project;
- //XmlElement xmlElement;
+ Project project;
+ XmlElement xmlElement;
List <BuildWhen> whens;
public BuildChoose (XmlElement xmlElement, Project project)
{
- //this.xmlElement = xmlElement;
- //this.project = project;
+ this.xmlElement = xmlElement;
+ this.project = project;
this.whens = new List <BuildWhen> ();
+
+ foreach (XmlNode xn in xmlElement.ChildNodes) {
+ if (!(xn is XmlElement))
+ continue;
+
+ XmlElement xe = (XmlElement)xn;
+
+ if (xe.Name == "When") {
+ if (otherwise != null)
+ throw new InvalidProjectFileException ("The 'Otherwise' element must be last in a 'Choose' element.");
+ if (xe.Attributes.GetNamedItem ("Condition") == null)
+ throw new InvalidProjectFileException ("The 'When' element requires a 'Condition' attribute.");
+ BuildWhen bw = new BuildWhen (xe, project);
+ whens.Add (bw);
+ } else if (xe.Name == "Otherwise") {
+ if (this.whens.Count == 0)
+ throw new InvalidProjectFileException ("At least one 'When' element must occur in a 'Choose' element.");
+
+ otherwise = new BuildWhen (xe, project);
+ }
+ }
}
public void Evaluate ()
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildEngine.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildEngine.cs
index 29ce30d..7b31986 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildEngine.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildEngine.cs
@@ -59,7 +59,8 @@ namespace Microsoft.Build.BuildEngine {
IDictionary targetOutputs)
{
if (String.IsNullOrEmpty (projectFileName)) {
- return engine.BuildProject (project, targetNames, targetOutputs);
+ return engine.BuildProject (project, targetNames, targetOutputs,
+ BuildSettings.DoNotResetPreviouslyBuiltTargets);
} else {
BuildPropertyGroup bpg = new BuildPropertyGroup ();
if (globalProperties != null)
@@ -68,7 +69,7 @@ namespace Microsoft.Build.BuildEngine {
(string) de.Key, (string) de.Value,
PropertyType.Global));
return engine.BuildProjectFile (projectFileName,
- targetNames, bpg, targetOutputs);
+ targetNames, bpg, targetOutputs, BuildSettings.DoNotResetPreviouslyBuiltTargets);
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItem.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItem.cs
index c749f46..08b300c 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItem.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItem.cs
@@ -41,7 +41,7 @@ using Mono.XBuild.Utilities;
namespace Microsoft.Build.BuildEngine {
public class BuildItem {
- BuildItemGroup child_items;
+ List<BuildItem> child_items;
XmlElement itemElement;
string finalItemSpec;
bool isImported;
@@ -82,10 +82,10 @@ namespace Microsoft.Build.BuildEngine {
unevaluatedMetadata = CollectionsUtil.CreateCaseInsensitiveHashtable ();
evaluatedMetadata = CollectionsUtil.CreateCaseInsensitiveHashtable ();
}
-
+
internal BuildItem (XmlElement itemElement, BuildItemGroup parentItemGroup)
{
- child_items = new BuildItemGroup ();
+ child_items = new List<BuildItem> ();
isImported = parentItemGroup.IsImported;
unevaluatedMetadata = CollectionsUtil.CreateCaseInsensitiveHashtable ();
evaluatedMetadata = CollectionsUtil.CreateCaseInsensitiveHashtable ();
@@ -102,7 +102,7 @@ namespace Microsoft.Build.BuildEngine {
isImported = parent.isImported;
name = parent.Name;
parent_item = parent;
- parent_item.child_items.AddItem (this);
+ parent_item.child_items.Add (this);
parent_item_group = parent.parent_item_group;
unevaluatedMetadata = CollectionsUtil.CreateCaseInsensitiveHashtable (parent.unevaluatedMetadata);
evaluatedMetadata = CollectionsUtil.CreateCaseInsensitiveHashtable (parent.evaluatedMetadata);
@@ -169,7 +169,7 @@ namespace Microsoft.Build.BuildEngine {
XmlNode node = itemElement [metadataName];
itemElement.RemoveChild (node);
}
- } else if (HasParent) {
+ } else if (HasParentItem) {
if (parent_item.child_items.Count > 1)
SplitParentItem ();
parent_item.RemoveMetadata (metadataName);
@@ -198,7 +198,7 @@ namespace Microsoft.Build.BuildEngine {
throw new ArgumentException (String.Format ("\"{0}\" is a reserved item meta-data, and cannot be modified or deleted.",
metadataName));
- if (treatMetadataValueAsLiteral && !HasParent)
+ if (treatMetadataValueAsLiteral && !HasParentItem)
metadataValue = Utilities.Escape (metadataValue);
if (FromXml) {
@@ -209,12 +209,12 @@ namespace Microsoft.Build.BuildEngine {
itemElement.AppendChild (element);
} else
element.InnerText = metadataValue;
- } else if (HasParent) {
+ } else if (HasParentItem) {
if (parent_item.child_items.Count > 1)
SplitParentItem ();
parent_item.SetMetadata (metadataName, metadataValue, treatMetadataValueAsLiteral);
}
- if (FromXml || HasParent) {
+ if (FromXml || HasParentItem) {
parent_item_group.ParentProject.MarkProjectAsDirty ();
parent_item_group.ParentProject.NeedToReevaluate ();
}
@@ -228,11 +228,11 @@ namespace Microsoft.Build.BuildEngine {
if (parent_item_group != null) {
Expression e = new Expression ();
e.Parse (value, true);
- evaluatedMetadata.Add (name, (string) e.ConvertTo (parent_item_group.ParentProject, typeof (string)));
+ evaluatedMetadata [name] = (string) e.ConvertTo (parent_item_group.ParentProject, typeof (string));
} else
- evaluatedMetadata.Add (name, Utilities.Unescape (value));
+ evaluatedMetadata [name] = Utilities.Unescape (value);
- unevaluatedMetadata.Add (name, value);
+ unevaluatedMetadata [name] = value;
}
void DeleteMetadata (string name)
@@ -252,8 +252,11 @@ namespace Microsoft.Build.BuildEngine {
return;
}
- foreach (XmlElement xe in itemElement.ChildNodes)
- AddMetadata (xe.Name, xe.InnerText);
+ foreach (XmlNode xn in itemElement.ChildNodes) {
+ XmlElement xe = xn as XmlElement;
+ if (xe != null && ConditionParser.ParseAndEvaluate (xe.GetAttribute ("Condition"), project))
+ AddMetadata (xe.Name, xe.InnerText);
+ }
DirectoryScanner directoryScanner;
Expression includeExpr, excludeExpr;
@@ -291,6 +294,8 @@ namespace Microsoft.Build.BuildEngine {
BuildItem bi = new BuildItem (this);
bi.finalItemSpec = itemSpec;
+ project.EvaluatedItemsIgnoringCondition.AddItem (bi);
+
if (evaluatedTo) {
project.EvaluatedItems.AddItem (bi);
@@ -330,7 +335,7 @@ namespace Microsoft.Build.BuildEngine {
{
if (FromXml)
itemElement.ParentNode.RemoveChild (itemElement);
- else if (HasParent) {
+ else if (HasParentItem) {
if (parent_item.child_items.Count > 1)
SplitParentItem ();
parent_item.Detach ();
@@ -383,12 +388,12 @@ namespace Microsoft.Build.BuildEngine {
newElement.SetAttribute ("Include", child.FinalItemSpec);
if (parent.itemElement.HasAttribute ("Condition"))
newElement.SetAttribute ("Condition", parent.itemElement.GetAttribute ("Condition"));
- foreach (XmlElement xe in parent.itemElement)
- newElement.AppendChild (xe.Clone ());
+ foreach (XmlNode xn in parent.itemElement)
+ newElement.AppendChild (xn.Clone ());
parent.itemElement.ParentNode.InsertAfter (newElement, insertAfter);
newParent = new BuildItem (newElement, parent.parent_item_group);
- newParent.child_items.AddItem (child);
+ newParent.child_items.Add (child);
child.parent_item = newParent;
return newParent;
@@ -404,7 +409,7 @@ namespace Microsoft.Build.BuildEngine {
set {
if (FromXml)
itemElement.SetAttribute ("Condition", value);
- else if (!HasParent)
+ else if (!HasParentItem)
throw new InvalidOperationException ("Cannot set a condition on an object not represented by an XML element in the project file.");
}
}
@@ -432,7 +437,7 @@ namespace Microsoft.Build.BuildEngine {
get {
if (FromXml)
return itemElement.GetAttribute ("Include");
- else if (HasParent)
+ else if (HasParentItem)
return parent_item.Include;
else
return itemInclude;
@@ -440,7 +445,7 @@ namespace Microsoft.Build.BuildEngine {
set {
if (FromXml)
itemElement.SetAttribute ("Include", value);
- else if (HasParent) {
+ else if (HasParentItem) {
if (parent_item.child_items.Count > 1)
SplitParentItem ();
parent_item.Include = value;
@@ -457,7 +462,7 @@ namespace Microsoft.Build.BuildEngine {
get {
if (FromXml)
return itemElement.Name;
- else if (HasParent)
+ else if (HasParentItem)
return parent_item.Name;
else
return name;
@@ -467,11 +472,11 @@ namespace Microsoft.Build.BuildEngine {
XmlElement newElement = itemElement.OwnerDocument.CreateElement (value, Project.XmlNamespace);
newElement.SetAttribute ("Include", itemElement.GetAttribute ("Include"));
newElement.SetAttribute ("Condition", itemElement.GetAttribute ("Condition"));
- foreach (XmlElement xe in itemElement)
- newElement.AppendChild (xe.Clone ());
+ foreach (XmlNode xn in itemElement)
+ newElement.AppendChild (xn.Clone ());
itemElement.ParentNode.ReplaceChild (newElement, itemElement);
itemElement = newElement;
- } else if (HasParent) {
+ } else if (HasParentItem) {
if (parent_item.child_items.Count > 1)
SplitParentItem ();
parent_item.Name = value;
@@ -484,7 +489,7 @@ namespace Microsoft.Build.BuildEngine {
get { return itemElement != null; }
}
- internal bool HasParent {
+ internal bool HasParentItem {
get { return parent_item != null; }
}
@@ -494,6 +499,7 @@ namespace Microsoft.Build.BuildEngine {
internal BuildItemGroup ParentItemGroup {
get { return parent_item_group; }
+ set { parent_item_group = value; }
}
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItemGroup.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItemGroup.cs
index 2e39a9d..c3ce123 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItemGroup.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItemGroup.cs
@@ -49,7 +49,12 @@ namespace Microsoft.Build.BuildEngine {
: this (null, null, null, false)
{
}
-
+
+ internal BuildItemGroup (Project project)
+ : this (null, project, null, false)
+ {
+ }
+
internal BuildItemGroup (XmlElement xmlElement, Project project, ImportedProject importedProject, bool readOnly)
{
this.buildItems = new List <BuildItem> ();
@@ -95,6 +100,7 @@ namespace Microsoft.Build.BuildEngine {
item = new BuildItem (element, this);
} else {
item = new BuildItem (itemName, itemInclude);
+ item.ParentItemGroup = this;
}
item.Evaluate (null, true);
@@ -175,6 +181,7 @@ namespace Microsoft.Build.BuildEngine {
{
BuildItem buildItem;
buildItem = new BuildItem (name, taskItem);
+ buildItem.ParentItemGroup = this;
buildItems.Add (buildItem);
}
@@ -269,6 +276,11 @@ namespace Microsoft.Build.BuildEngine {
internal Project ParentProject {
get { return parentProject; }
+ set {
+ if (parentProject != null)
+ throw new InvalidOperationException ("parentProject is already set");
+ parentProject = value;
+ }
}
internal bool FromXml {
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildProperty.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildProperty.cs
index 8fa9369..f870118 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildProperty.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildProperty.cs
@@ -74,7 +74,7 @@ namespace Microsoft.Build.BuildEngine {
this.propertyType = PropertyType.Normal;
this.parentProject = parentProject;
this.name = propertyElement.Name;
- this.value = propertyElement.InnerText;
+ this.value = propertyElement.InnerXml;
this.isImported = false;
}
@@ -166,7 +166,7 @@ namespace Microsoft.Build.BuildEngine {
set {
this. at value = value;
if (FromXml) {
- propertyElement.InnerText = value;
+ propertyElement.InnerXml = value;
} else {
finalValue = value;
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildPropertyGroup.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildPropertyGroup.cs
index 56dc782..defc261 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildPropertyGroup.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildPropertyGroup.cs
@@ -129,7 +129,24 @@ namespace Microsoft.Build.BuildEngine {
[MonoTODO]
public BuildPropertyGroup Clone (bool deepClone)
{
- throw new NotImplementedException ();
+ BuildPropertyGroup bpg = new BuildPropertyGroup (propertyGroup, parentProject, importedProject, read_only);
+ if (FromXml) {
+ foreach (BuildProperty bp in properties) {
+ if (deepClone)
+ bpg.AddProperty (bp.Clone (true));
+ else
+ bpg.AddNewProperty (bp.Name, bp.FinalValue);
+ }
+ } else {
+ foreach (BuildProperty bp in propertiesByName.Values) {
+ if (deepClone)
+ bpg.AddProperty (bp.Clone (true));
+ else
+ bpg.AddNewProperty (bp.Name, bp.FinalValue);
+ }
+ }
+
+ return bpg;
}
public IEnumerator GetEnumerator ()
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildWhen.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildWhen.cs
index 4e1c562..9523b76 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildWhen.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildWhen.cs
@@ -33,23 +33,21 @@ using System.Xml;
namespace Microsoft.Build.BuildEngine {
internal class BuildWhen {
- //Project parentProject;
+ Project parentProject;
GroupingCollection groupingCollection;
XmlElement whenElement;
public BuildWhen (XmlElement whenElement, Project parentProject)
{
- /*
+
this.parentProject = parentProject;
this.groupingCollection = new GroupingCollection (null);
if (whenElement == null)
throw new ArgumentNullException ("whenElement");
this.whenElement = whenElement;
- if (whenElement.GetAttribute ("Condition") != String.Empty)
- condition = whenElement.GetAttributeNode ("Condition");
foreach (XmlElement xe in whenElement.ChildNodes) {
if (xe.Name == "ItemGroup") {
- BuildItemGroup big = new BuildItemGroup ();
+ BuildItemGroup big = new BuildItemGroup (xe, parentProject, null, true);
//big.BindToXml (xe);
groupingCollection.Add (big);
// FIXME: add nested chooses
@@ -60,7 +58,12 @@ namespace Microsoft.Build.BuildEngine {
} else
throw new InvalidProjectFileException ("Invalid element in When.");
}
- */
+
+ }
+
+ public void Evaluate()
+ {
+ groupingCollection.Evaluate ();
}
public string Condition {
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ChangeLog b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ChangeLog
index 11258ae..3d1e6dd 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ChangeLog
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ChangeLog
@@ -1,3 +1,192 @@
+2009-06-12 Ankit Jain <jankit at novell.com>
+
+ Fix bug #512535.
+ * ExpressionCollection.cs (ConvertToITaskItemArray): Whitespace around a
+ itemref is allowed if the prev/next element is ";".
+
+2009-06-12 Ankit Jain <jankit at novell.com>
+
+ * Utilities.cs (FromMSBuildPath): Return null if the path contains
+ "drive:" only on windows.
+
+2009-06-07 Ankit Jain <jankit at novell.com>
+
+ * Target.cs (Outputs): Use ITaskItem[] for conversion, to retain
+ the metadata.
+
+2009-05-29 Ankit Jain <jankit at novell.com>
+
+ Correctly handle global properties. Correctly log
+ project/build events.
+
+ * BuildPropertyGroup.cs (Clone): Implement.
+ * Engine.cs (globalProperties): Rename to ..
+ (global_properties): .. this.
+ (currentlyBuildingProjectsStack): New. Used to correctly
+ log and raise project/build start/finish events.
+ (BuildProjectFile): Override any project global properties
+ with explicitly specified ones, here in the param @globalProperties.
+ Mark project for reevaluation, which will update the engine's
+ global properties also.
+ Reset both engine and project's old global properties at the end.
+ (UnregisterAllLoggers): Log build finished only if we are currently
+ building.
+ (StartBuild): Rename to ..
+ (StartProjectBuild): .. this. Keeps track of the projects being built
+ in the new stack, and logs project and build events accordingly.
+ (EndProjectBuild): New. Uses the stack to keep track of projects
+ finishing builds, and raises project and build events accordingly.
+ (LogProjectStarted): Move here from Project.cs
+ (LogProjectFinished): Likewise.
+
+ * Project.cs (Build): Log start of project build.
+ Set current directory to the project file's dir, and reset at end.
+ (BuildInternal): Don't log here, its done in Build.
+ (BuildTarget): Already built targets are keyed by the set of global
+ properties that they were built with.
+ (GlobalPropertiesToString): New.
+ (ResetBuildStatus): 'building' must be true to allow built targets to be reset.
+ (RemoveBuiltTargets): Initialize builtTargetKeys in .ctor
+ (Evaluate): Remove built targets only if we are currently building and
+ build settings are None.
+ Merge project's global properties with those of the parent engine.
+ Add missing properties from engine's global properties.
+ (LogTargetSkipped): Fix format string, add the reqd argument.
+
+2009-05-29 Ankit Jain <jankit at novell.com>
+
+ * ConditionFunctionExpression.cs: Add 'HasTrailingSlash' function.
+ (HasTrailingSlash): New.
+
+2009-05-12 Ankit Jain <jankit at novell.com>
+
+ * Project.cs (.ctor): Init timeOfLastDirty.
+
+2009-05-05 Miguel de Icaza <miguel at novell.com>
+
+ * Contribution from Martin Brenn to fix #498154.
+
+2009-04-27 Ankit Jain <jankit at novell.com>
+
+ Fix bug #497839.
+ * Engine.cs (BuildProjectFile): Set project's GlobalProperties to the
+ one passed as argument.
+
+2009-04-27 Ankit Jain <jankit at novell.com>
+
+ * TaskEngine.cs (Prepare): Emit a useful error message property value
+ can't be converted to required type.
+
+2009-04-27 Ankit Jain <jankit at novell.com>
+
+ * ExpressionCollection.cs (ConvertToObject): Allow true/on/yes
+ as valid true values for bool, and corresponding for false.
+
+2009-03-27 Jonathan Chambers <joncham at gmail.com>
+
+ * BuildWhen.cs: Add basic implementation.
+ * BuildChoose.cs: Add basic implementation.
+ * BuildItem.cs (AddEvaluatedItem): Add BuiltItem to
+ EvaluatedItemsIgnoringCondition.
+ * GroupingCollection.cs: Add evaluation of BuildChoose items.
+
+2009-03-26 Jonathan Chambers <joncham at gmail.com>
+
+ * TaskDatabase.cs (RegisterTask): Search for class by name
+ if task was not found using GetType (which uses namespace).
+
+2009-02-26 Ankit Jain <jankit at novell.com>
+
+ * Target.cs: Handle target with no tasks. Log errors.
+
+2009-02-24 Ankit Jain <jankit at novell.com>
+
+ Lazily load UsingTask tasks.
+ * UsingTask.cs (Evaluate): Register 'this' with task database,
+ but don't load it yet. Register only if condition evaluates to true.
+ Move the load logic to ..
+ (Load): .. here. Register with the specified task database.
+ * TaskDatabase.cs (RegisterUsingTask): Store the UsingTask instance
+ in a table keyed by task name, but don't load it yet.
+ (GetTypeFromClassName): Try to load UsingTask if task is not already
+ loaded. Move loading logic to ..
+ (GetTypeFromClassNameInternal): .. here.
+ (CopyTasks): Copy the usingTasks table also.
+
+2009-02-23 Ankit Jain <jankit at novell.com>
+
+ * BuildItem.cs (AddMetadata): Allow overwriting older values.
+
+2009-02-22 Ankit Jain <jankit at novell.com>
+
+ * BuildItem.cs: Iterate over XmlElements childnodes with XmlNode
+ instead of XmlElement. Eg. XmlComment
+
+2009-02-21 Ankit Jain <jankit at novell.com>
+
+ * Utilities.cs (FromMSBuildPath): Copy from monodevelop.
+ * Project.cs (Load): Use FromMSBuildPath on the path.
+ (InitializeProperties): Set "MSBuildToolsPath" also.
+
+2009-02-20 Ankit Jain <jankit at novell.com>
+
+ Fix #449683.
+ * ConditionTokenizer.cs: Handle unquoted item references (with or w/o
+ transforms) in conditions.
+ * ConditionParser.cs: Parse unquoted item, property references.
+ eg. Condition = " @(Foo->'%(Extension)') == '.exe' "
+ * Token.cs (Token.ToString): Override.
+ (TokenType.Transform): Uncomment.
+
+2009-02-12 Jonathan Chambers <joncham at gmail.com>
+
+ * BuildProperty.cs: Value corresponds to XmlElement.InnerXml
+ no XmlElement.InnerText. This allows properties to be additional
+ xml elements.
+
+2009-02-01 Ankit Jain <jankit at novell.com>
+
+ * BuildEngine.cs (BuildProjectFile): Use
+ BuildSettings.DoNotResetPreviouslyBuiltTargets for building projects.
+ * Engine.cs (BuiltTargetsOutputByName): New. Table of targets already
+ built. Move logging of project start/finish to ..
+ * Project.cs: .. here. Build a target only if hasn't been built already.
+ Keep track of target outputs, and return those even if an already built
+ target has been invoked again.
+ Honor BuildSettings.None and DoNotResetPreviouslyBuiltTargets .
+
+2009-01-31 Ankit Jain <jankit at novell.com>
+
+ * BatchingImpl.cs: Split into ..
+ * BatchingImplBase.cs: .. this,
+ * TaskBatchingImpl.cs: .. this ..
+ * TargetBatchingImpl.cs: .. and this. Implement target batching here.
+
+ * Target.cs (DoBuild): Use TargetBatchingImpl for building.
+ (Log*): Move to TargetBatchingImpl .
+ (BuildTasks): New.
+ (Engine): New.
+
+2009-01-30 Ankit Jain <jankit at novell.com>
+
+ * TaskEngine.cs (GetObjectFromString): Empty value is allowed only for
+ arrays.
+
+2009-01-29 Ankit Jain <jankit at novell.com>
+
+ * BuildItem.cs (child_items): Change type from BuildItemGroup to
+ List<BuildItem>.
+ (HasParent): Rename to ..
+ (HasParentItem): .. this.
+ (ParentItemGroup): Add setter.
+
+ * BuildItemGroup.cs (.ctor): Add overload with @project param.
+ (AddNewItem):
+ (AddItem): Correctly set the ParentItemGroup for new build items.
+ (ParentProject): Add setter.
+ * Project.cs: Set the project for new BuildItemGroup instances.
+ * TaskEngine.cs (PublishItemGroup): Likewise.
+
2009-01-06 Ankit Jain <jankit at novell.com>
* Project.cs (Build): Honor InitialTargets list.
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionFunctionExpression.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionFunctionExpression.cs
index 43deba5..ae2bead 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionFunctionExpression.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionFunctionExpression.cs
@@ -44,7 +44,7 @@ namespace Microsoft.Build.BuildEngine {
static ConditionFunctionExpression ()
{
Type t = typeof (ConditionFunctionExpression);
- string [] names = new string [] { "Exists" };
+ string [] names = new string [] { "Exists", "HasTrailingSlash" };
functions = new Dictionary <string, MethodInfo> ();
foreach (string name in names)
@@ -115,6 +115,21 @@ namespace Microsoft.Build.BuildEngine {
return File.Exists (file);
}
+
+ static bool HasTrailingSlash (string file, Project context)
+ {
+ if (file == null)
+ return false;
+
+ file = file.Trim ();
+
+ int len = file.Length;
+ if (len == 0)
+ return false;
+
+ return file [len - 1] == '\\' || file [len - 1] == '/';
+ }
+
#endregion
#pragma warning restore 0169
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 fa4a4a9..ab5013f 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs
@@ -165,10 +165,9 @@ namespace Microsoft.Build.BuildEngine {
e = new ConditionFactorExpression (token);
} else if (token.Type == TokenType.Number) {
e = new ConditionFactorExpression (token);
- } else if (token.Type == TokenType.Item) {
- throw new NotImplementedException ();
- } else if (token.Type == TokenType.Property) {
- throw new NotImplementedException ();
+ } else if (token.Type == TokenType.Item || token.Type == TokenType.Property
+ || token.Type == TokenType.Metadata) {
+ e = ParseReferenceExpression (token.Value);
} else if (token.Type == TokenType.Not) {
e = ParseNotExpression ();
} else
@@ -208,6 +207,45 @@ namespace Microsoft.Build.BuildEngine {
return list;
}
+
+ //@prefix: @ or $
+ ConditionExpression ParseReferenceExpression (string prefix)
+ {
+ StringBuilder sb = new StringBuilder ();
+
+ ExpectToken (TokenType.LeftParen);
+ tokenizer.GetNextToken ();
+
+ sb.AppendFormat ("{0}({1}", prefix, tokenizer.Token.Value);
+
+ tokenizer.GetNextToken ();
+ if (prefix == "@" && tokenizer.Token.Type == TokenType.Transform) {
+ tokenizer.GetNextToken ();
+ sb.AppendFormat ("->'{0}'", tokenizer.Token.Value);
+
+ tokenizer.GetNextToken ();
+ if (tokenizer.Token.Type == TokenType.Comma) {
+ tokenizer.GetNextToken ();
+ sb.AppendFormat (", '{0}'", tokenizer.Token.Value);
+ tokenizer.GetNextToken ();
+ }
+ }
+
+ ExpectToken (TokenType.RightParen);
+ tokenizer.GetNextToken ();
+
+ sb.Append (")");
+
+ //FIXME: HACKY!
+ return new ConditionFactorExpression (new Token (sb.ToString (), TokenType.String));
+ }
+
+ void ExpectToken (TokenType type)
+ {
+ if (tokenizer.Token.Type != type)
+ throw new ExpressionParseException ("Expected token type of type: " + type + ", got " +
+ tokenizer.Token.Type + " (" + tokenizer.Token.Value + ") .");
+ }
}
}
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 c707c6d..3a33f85 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs
@@ -170,7 +170,10 @@ namespace Microsoft.Build.BuildEngine {
// FIXME: looks like a hack: if '-' is here '->' won't be tokenized
// maybe we should treat item reference as a token
- if (Char.IsDigit (ch) || ch == '-') {
+ if (ch == '-' && PeekChar () == '>') {
+ ReadChar ();
+ token = new Token ("->", TokenType.Transform);
+ } else if (Char.IsDigit (ch) || ch == '-') {
StringBuilder sb = new StringBuilder ();
sb.Append (ch);
@@ -190,14 +193,24 @@ namespace Microsoft.Build.BuildEngine {
string temp;
sb.Append (ch);
+ bool is_itemref = (PeekChar () == '@');
+ int num_open_braces = 0;
+ bool in_literal = false;
while ((i = PeekChar ()) != -1) {
ch = (char) i;
+ if (ch == '(' && !in_literal && is_itemref)
+ num_open_braces ++;
+ if (ch == ')' && !in_literal && is_itemref)
+ num_open_braces --;
sb.Append ((char) ReadChar ());
- if (ch == '\'')
- break;
+ if (ch == '\'') {
+ if (num_open_braces == 0)
+ break;
+ in_literal = !in_literal;
+ }
}
temp = sb.ToString ();
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/DirectoryScanner.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/DirectoryScanner.cs
index 5f93ca3..ccb0dfd 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/DirectoryScanner.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/DirectoryScanner.cs
@@ -140,6 +140,25 @@ namespace Microsoft.Build.BuildEngine {
} else if (input [ptr] == "..") {
di = new DirectoryInfo [1];
di [0] = directory.Parent;
+ } else if (input[ptr] == "**")
+ {
+ // Read this directory and all subdirectories recursive
+ Stack<DirectoryInfo> currentDirectories = new Stack<DirectoryInfo>();
+ currentDirectories.Push(directory);
+ List<DirectoryInfo> allDirectories = new List<DirectoryInfo>();
+
+ while (currentDirectories.Count > 0)
+ {
+ DirectoryInfo current = currentDirectories.Pop();
+ allDirectories.Add (current);
+ foreach (DirectoryInfo dir in current.GetDirectories())
+ {
+ currentDirectories.Push(dir);
+ }
+ }
+
+ // No further directories shall be read
+ di = allDirectories.ToArray();
} else
di = directory.GetDirectories (input [ptr]);
foreach (DirectoryInfo info in di) {
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
index c0b5d73..1363a73 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
@@ -44,12 +44,16 @@ namespace Microsoft.Build.BuildEngine {
const string defaultTasksProjectName = "Microsoft.Common.tasks";
EventSource eventSource;
bool buildStarted;
- BuildPropertyGroup globalProperties;
+ BuildPropertyGroup global_properties;
//IDictionary importedProjects;
List <ILogger> loggers;
//bool onlyLogCriticalEvents;
Dictionary <string, Project> projects;
+ // the key here represents the project+target+global_properties set
+ Dictionary <string, ITaskItem[]> builtTargetsOutputByName;
+ Stack<Project> currentlyBuildingProjectsStack;
+
static Engine globalEngine;
static Version version;
@@ -73,7 +77,9 @@ namespace Microsoft.Build.BuildEngine {
this.eventSource = new EventSource ();
this.loggers = new List <ILogger> ();
this.buildStarted = false;
- this.globalProperties = new BuildPropertyGroup ();
+ this.global_properties = new BuildPropertyGroup ();
+ this.builtTargetsOutputByName = new Dictionary<string, ITaskItem[]> ();
+ this.currentlyBuildingProjectsStack = new Stack<Project> ();
RegisterDefaultTasks ();
}
@@ -111,27 +117,17 @@ namespace Microsoft.Build.BuildEngine {
return BuildProject (project, targetNames, targetOutputs, BuildSettings.None);
}
- [MonoTODO ("use buildFlags")]
public bool BuildProject (Project project,
string[] targetNames,
IDictionary targetOutputs,
BuildSettings buildFlags)
{
- bool result;
if (project == null)
throw new ArgumentException ("project");
if (targetNames == null)
return false;
- StartBuild ();
-
- LogProjectStarted (project, targetNames);
-
- result = project.Build (targetNames, targetOutputs);
-
- LogProjectFinished (project, result);
-
- return result;
+ return project.Build (targetNames, targetOutputs, buildFlags);
}
[MonoTODO]
@@ -171,32 +167,42 @@ namespace Microsoft.Build.BuildEngine {
return BuildProjectFile (projectFile, targetNames, globalProperties, targetOutputs, BuildSettings.None);
}
- [MonoTODO ("use buildFlags")]
public bool BuildProjectFile (string projectFile,
string[] targetNames,
BuildPropertyGroup globalProperties,
IDictionary targetOutputs,
BuildSettings buildFlags)
{
- bool result;
Project project;
- StartBuild ();
-
if (projects.ContainsKey (projectFile)) {
project = (Project) projects [projectFile];
- LogProjectStarted (project, targetNames);
- result = project.Build (targetNames, targetOutputs);
} else {
project = CreateNewProject ();
project.Load (projectFile);
- LogProjectStarted (project, targetNames);
- result = project.Build (targetNames, targetOutputs);
}
-
- LogProjectFinished (project, result);
-
- return result;
+
+ BuildPropertyGroup engine_old_grp = null;
+ BuildPropertyGroup project_old_grp = null;
+ if (globalProperties != null) {
+ engine_old_grp = GlobalProperties.Clone (true);
+ project_old_grp = project.GlobalProperties.Clone (true);
+
+ // Override project's global properties with the
+ // ones explicitlcur_y specified here
+ foreach (BuildProperty bp in globalProperties)
+ project.GlobalProperties.AddProperty (bp);
+ project.NeedToReevaluate ();
+ }
+
+ try {
+ return project.Build (targetNames, targetOutputs, buildFlags);
+ } finally {
+ if (globalProperties != null) {
+ GlobalProperties = engine_old_grp;
+ project.GlobalProperties = project_old_grp;
+ }
+ }
}
void CheckBinPath ()
@@ -273,25 +279,56 @@ namespace Microsoft.Build.BuildEngine {
{
// FIXME: check if build succeeded
// FIXME: it shouldn't be here
- LogBuildFinished (true);
+ if (buildStarted)
+ LogBuildFinished (true);
foreach (ILogger i in loggers) {
i.Shutdown ();
}
loggers.Clear ();
}
- internal void StartBuild ()
+ internal void StartProjectBuild (Project project, string [] target_names)
{
if (!buildStarted) {
LogBuildStarted ();
buildStarted = true;
}
+
+ if (currentlyBuildingProjectsStack.Count == 0 ||
+ String.Compare (currentlyBuildingProjectsStack.Peek ().FullFileName, project.FullFileName) != 0)
+ LogProjectStarted (project, target_names);
+
+ currentlyBuildingProjectsStack.Push (project);
}
-
- void LogProjectStarted (Project project, string [] targetNames)
+
+ internal void EndProjectBuild (Project project, bool succeeded)
+ {
+ if (!buildStarted)
+ throw new Exception ("build isnt started currently");
+
+ Project top_project = currentlyBuildingProjectsStack.Pop ();
+
+ if (String.Compare (project.FullFileName, top_project.FullFileName) != 0)
+ throw new Exception (String.Format (
+ "INTERNAL ERROR: Project finishing is not the same as the one on top " +
+ "of the stack. Project: {0} Top of stack: {1}",
+ project.FullFileName, top_project.FullFileName));
+
+ if (currentlyBuildingProjectsStack.Count == 0 ||
+ String.Compare (top_project.FullFileName, currentlyBuildingProjectsStack.Peek ().FullFileName) != 0)
+ LogProjectFinished (top_project, succeeded);
+
+ if (currentlyBuildingProjectsStack.Count == 0) {
+ //FIXME: build result
+ LogBuildFinished (true);
+ buildStarted = false;
+ }
+ }
+
+ void LogProjectStarted (Project project, string [] target_names)
{
ProjectStartedEventArgs psea;
- if (targetNames == null || targetNames.Length == 0) {
+ if (target_names == null || target_names.Length == 0) {
if (project.DefaultTargets != String.Empty)
psea = new ProjectStartedEventArgs ("Project started.", null, project.FullFileName,
project.DefaultTargets, null, null);
@@ -299,17 +336,17 @@ namespace Microsoft.Build.BuildEngine {
psea = new ProjectStartedEventArgs ("Project started.", null, project.FullFileName, "default", null, null);
} else
psea = new ProjectStartedEventArgs ("Project started.", null, project.FullFileName, String.Join (";",
- targetNames), null, null);
+ target_names), null, null);
eventSource.FireProjectStarted (this, psea);
}
-
+
void LogProjectFinished (Project project, bool succeeded)
{
ProjectFinishedEventArgs pfea;
pfea = new ProjectFinishedEventArgs ("Project started.", null, project.FullFileName, succeeded);
eventSource.FireProjectFinished (this, pfea);
}
-
+
void LogBuildStarted ()
{
BuildStartedEventArgs bsea;
@@ -365,8 +402,8 @@ namespace Microsoft.Build.BuildEngine {
}
public BuildPropertyGroup GlobalProperties {
- get { return globalProperties; }
- set { globalProperties = value; }
+ get { return global_properties; }
+ set { global_properties = value; }
}
public bool OnlyLogCriticalEvents {
@@ -385,6 +422,10 @@ namespace Microsoft.Build.BuildEngine {
internal TaskDatabase DefaultTasks {
get { return defaultTasks; }
}
+
+ internal Dictionary<string, ITaskItem[]> BuiltTargetsOutputByName {
+ get { return builtTargetsOutputByName; }
+ }
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ExpressionCollection.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ExpressionCollection.cs
index 8e262c8..eb29295 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ExpressionCollection.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ExpressionCollection.cs
@@ -41,6 +41,19 @@ namespace Microsoft.Build.BuildEngine {
internal class ExpressionCollection {
IList objects;
+ static Dictionary<string, bool> boolValues;
+
+ static ExpressionCollection ()
+ {
+ string[] trueValuesArray = new string[] {"true", "on", "yes"};
+ string[] falseValuesArray = new string[] {"false", "off", "no"};
+
+ boolValues = new Dictionary<string, bool> (StringComparer.InvariantCultureIgnoreCase);
+ foreach (string s in trueValuesArray)
+ boolValues.Add (s, true);
+ foreach (string s in falseValuesArray)
+ boolValues.Add (s, false);
+ }
public ExpressionCollection ()
{
@@ -100,9 +113,15 @@ namespace Microsoft.Build.BuildEngine {
object ConvertToObject (string raw, Type type)
{
- if (type == typeof (bool))
- return Boolean.Parse (raw);
- else if (type == typeof (string))
+ if (type == typeof (bool)) {
+ bool value;
+ if (boolValues.TryGetValue (raw, out value))
+ return value;
+ else
+ return false;
+ }
+
+ if (type == typeof (string))
return raw;
else if (type == typeof (int))
return Int32.Parse (raw);
@@ -168,10 +187,18 @@ namespace Microsoft.Build.BuildEngine {
string str = o as string;
if (str != null) {
- if (str != ";" && prev != null && prev is ItemReference)
+ string trimmed_str = str.Trim ();
+ if (!IsSemicolon (str) && trimmed_str.Length > 0 && prev != null && prev is ItemReference)
+ // non-empty, non-semicolon string after item ref
ThrowCantConcatError (prev, str);
- prev_can_concat = !(str.Length > 0 && str [str.Length - 1] == ';') && str.Trim ().Length > 0;
+ if (trimmed_str.Length == 0 && prev is string && IsSemicolon ((string) prev)) {
+ // empty string after a ';', ignore it
+ continue;
+ }
+
+ // empty string _after_ a itemref, not an error
+ prev_can_concat = !(str.Length > 0 && str [str.Length - 1] == ';') && trimmed_str.Length > 0;
AddItemsToArray (finalItems,
ConvertToITaskItemArrayFromString (str),
can_concat);
@@ -250,6 +277,11 @@ namespace Microsoft.Build.BuildEngine {
return items.ToArray ();
}
+ bool IsSemicolon (string str)
+ {
+ return str != null && str.Length == 1 && str [0] == ';';
+ }
+
void ThrowCantConcatError (object first, object second)
{
throw new Exception (String.Format (
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/GroupingCollection.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/GroupingCollection.cs
index 96b86ea..c8c143e 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/GroupingCollection.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/GroupingCollection.cs
@@ -164,6 +164,7 @@ namespace Microsoft.Build.BuildEngine {
{
Evaluate (EvaluationType.Property);
Evaluate (EvaluationType.Item);
+ Evaluate (EvaluationType.Choose);
}
void Evaluate (EvaluationType type)
@@ -194,7 +195,7 @@ namespace Microsoft.Build.BuildEngine {
evaluate_iterator = evaluate_iterator.Next;
}
- } else {
+ } else if (type == EvaluationType.Item) {
evaluate_iterator = list.First;
add_iterator = list.First;
@@ -207,6 +208,29 @@ namespace Microsoft.Build.BuildEngine {
evaluate_iterator = evaluate_iterator.Next;
}
+ } else if (type == EvaluationType.Choose) {
+ evaluate_iterator = list.First;
+ add_iterator = list.First;
+
+ while (evaluate_iterator != null) {
+ if (evaluate_iterator.Value is BuildChoose) {
+ BuildChoose bc = (BuildChoose)evaluate_iterator.Value;
+ bool whenUsed = false;
+ foreach (BuildWhen bw in bc.Whens) {
+ if (ConditionParser.ParseAndEvaluate (bw.Condition, project)) {
+ bw.Evaluate ();
+ whenUsed = true;
+ break;
+ }
+ }
+ if (!whenUsed && bc.Otherwise != null &&
+ ConditionParser.ParseAndEvaluate (bc.Otherwise.Condition, project)) {
+ bc.Otherwise.Evaluate ();
+ }
+ }
+
+ evaluate_iterator = evaluate_iterator.Next;
+ }
}
add_iterator = null;
@@ -231,7 +255,8 @@ namespace Microsoft.Build.BuildEngine {
enum EvaluationType {
Property,
- Item
+ Item,
+ Choose
}
}
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 d01fbfc..afabae2 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
@@ -102,7 +102,7 @@ namespace Microsoft.Build.BuildEngine {
file = Path.Combine (dir, EvaluatedProjectPath);
}
- return file;
+ return Utilities.FromMSBuildPath (file);
}
public string Condition {
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
index 29e6522..339a2b4 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
@@ -71,6 +71,9 @@ namespace Microsoft.Build.BuildEngine {
XmlDocument xmlDocument;
bool unloaded;
bool initialTargetsBuilt;
+ List<string> builtTargetKeys;
+ bool building;
+ BuildSettings current_settings;
static XmlNamespaceManager manager;
static string ns = "http://schemas.microsoft.com/developer/msbuild/2003";
@@ -91,6 +94,10 @@ namespace Microsoft.Build.BuildEngine {
xmlDocument.DocumentElement.SetAttribute ("xmlns", ns);
fullFileName = String.Empty;
+ timeOfLastDirty = DateTime.Now;
+ current_settings = BuildSettings.None;
+
+ builtTargetKeys = new List<string> ();
globalProperties = new BuildPropertyGroup (null, this, null, false);
foreach (BuildProperty bp in parentEngine.GlobalProperties)
@@ -252,9 +259,32 @@ namespace Microsoft.Build.BuildEngine {
BuildSettings buildFlags)
{
+ bool result = false;
+ ParentEngine.StartProjectBuild (this, targetNames);
+ string current_directory = Environment.CurrentDirectory;
+ try {
+ current_settings = buildFlags;
+ if (!String.IsNullOrEmpty (fullFileName))
+ Directory.SetCurrentDirectory (Path.GetDirectoryName (fullFileName));
+ building = true;
+ result = BuildInternal (targetNames, targetOutputs, buildFlags);
+ } finally {
+ ParentEngine.EndProjectBuild (this, result);
+ current_settings = BuildSettings.None;
+ Directory.SetCurrentDirectory (current_directory);
+ building = false;
+ }
+
+ return result;
+ }
+
+ bool BuildInternal (string [] targetNames,
+ IDictionary targetOutputs,
+ BuildSettings buildFlags)
+ {
CheckUnloaded ();
- ParentEngine.StartBuild ();
- NeedToReevaluate ();
+ if (buildFlags == BuildSettings.None)
+ Reevaluate ();
if (targetNames == null || targetNames.Length == 0) {
if (defaultTargets != null && defaultTargets.Length != 0)
@@ -291,15 +321,37 @@ namespace Microsoft.Build.BuildEngine {
return false;
}
+ // built targets are keyed by the particular set of global
+ // properties. So, a different set could allow a target
+ // to run again
+ string key = fullFileName + ":" + target + ":" + GlobalPropertiesToString (GlobalProperties);
+ ITaskItem[] outputs;
+ if (ParentEngine.BuiltTargetsOutputByName.TryGetValue (key, out outputs)) {
+ if (targetOutputs != null)
+ targetOutputs.Add (target, outputs);
+ LogTargetSkipped (target);
+ return true;
+ }
+
if (!targets [target].Build ())
return false;
+ ParentEngine.BuiltTargetsOutputByName [key] = (ITaskItem[]) targets [target].Outputs.Clone ();
+ builtTargetKeys.Add (key);
if (targetOutputs != null)
targetOutputs.Add (target, targets [target].Outputs);
return true;
}
+ string GlobalPropertiesToString (BuildPropertyGroup bgp)
+ {
+ StringBuilder sb = new StringBuilder ();
+ foreach (BuildProperty bp in bgp)
+ sb.AppendFormat (" {0}:{1}", bp.Name, bp.FinalValue);
+ return sb.ToString ();
+ }
+
[MonoTODO]
public string [] GetConditionedPropertyValues (string propertyName)
{
@@ -319,7 +371,7 @@ namespace Microsoft.Build.BuildEngine {
if (evaluatedItemsByName.ContainsKey (itemName))
return evaluatedItemsByName [itemName];
else
- return new BuildItemGroup ();
+ return new BuildItemGroup (this);
}
public BuildItemGroup GetEvaluatedItemsByNameIgnoringCondition (string itemName)
@@ -332,7 +384,7 @@ namespace Microsoft.Build.BuildEngine {
if (evaluatedItemsByNameIgnoringCondition.ContainsKey (itemName))
return evaluatedItemsByNameIgnoringCondition [itemName];
else
- return new BuildItemGroup ();
+ return new BuildItemGroup (this);
}
public string GetEvaluatedProperty (string propertyName)
@@ -367,8 +419,8 @@ namespace Microsoft.Build.BuildEngine {
public void Load (string projectFileName)
{
- this.fullFileName = Path.GetFullPath (projectFileName);
- DoLoad (new StreamReader (projectFileName));
+ this.fullFileName = Utilities.FromMSBuildPath (Path.GetFullPath (projectFileName));
+ DoLoad (new StreamReader (fullFileName));
}
[MonoTODO ("Not tested")]
@@ -426,7 +478,7 @@ namespace Microsoft.Build.BuildEngine {
if (itemToRemove == null)
throw new ArgumentNullException ("itemToRemove");
- if (!itemToRemove.FromXml && !itemToRemove.HasParent)
+ if (!itemToRemove.FromXml && !itemToRemove.HasParentItem)
throw new InvalidOperationException ("The object passed in is not part of the project.");
BuildItemGroup big = itemToRemove.ParentItemGroup;
@@ -494,7 +546,10 @@ namespace Microsoft.Build.BuildEngine {
[MonoTODO]
public void ResetBuildStatus ()
{
- throw new NotImplementedException ();
+ // hack to allow built targets to be removed
+ building = true;
+ Reevaluate ();
+ building = false;
}
public void Save (string projectFileName)
@@ -761,7 +816,8 @@ namespace Microsoft.Build.BuildEngine {
evaluatedItemsIgnoringCondition = new BuildItemGroup (null, this, null, true);
evaluatedItemsByName = new Dictionary <string, BuildItemGroup> (StringComparer.InvariantCultureIgnoreCase);
evaluatedItemsByNameIgnoringCondition = new Dictionary <string, BuildItemGroup> (StringComparer.InvariantCultureIgnoreCase);
- evaluatedProperties = new BuildPropertyGroup (null, null, null, true);
+ if (building && current_settings == BuildSettings.None)
+ RemoveBuiltTargets ();
InitializeProperties ();
@@ -772,21 +828,43 @@ namespace Microsoft.Build.BuildEngine {
usingTask.Evaluate ();
}
+ // Removes entries of all earlier built targets for this project
+ void RemoveBuiltTargets ()
+ {
+ foreach (string key in builtTargetKeys)
+ ParentEngine.BuiltTargetsOutputByName.Remove (key);
+ }
+
void InitializeProperties ()
{
BuildProperty bp;
+ evaluatedProperties = new BuildPropertyGroup (null, null, null, true);
+
foreach (BuildProperty gp in GlobalProperties) {
bp = new BuildProperty (gp.Name, gp.Value, PropertyType.Global);
EvaluatedProperties.AddProperty (bp);
}
+ foreach (BuildProperty gp in GlobalProperties)
+ ParentEngine.GlobalProperties.AddProperty (gp);
+
+ // add properties that we dont have from parent engine's
+ // global properties
+ foreach (BuildProperty gp in ParentEngine.GlobalProperties) {
+ if (EvaluatedProperties [gp.Name] == null) {
+ bp = new BuildProperty (gp.Name, gp.Value, PropertyType.Global);
+ EvaluatedProperties.AddProperty (bp);
+ }
+ }
+
foreach (DictionaryEntry de in Environment.GetEnvironmentVariables ()) {
bp = new BuildProperty ((string) de.Key, (string) de.Value, PropertyType.Environment);
EvaluatedProperties.AddProperty (bp);
}
EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildBinPath", parentEngine.BinPath, PropertyType.Reserved));
+ EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildToolsPath", parentEngine.BinPath, PropertyType.Reserved));
// FIXME: make some internal method that will work like GetDirectoryName but output String.Empty on null/String.Empty
string projectDir;
@@ -995,6 +1073,16 @@ namespace Microsoft.Build.BuildEngine {
return default (T);
}
+ void LogTargetSkipped (string targetName)
+ {
+ BuildMessageEventArgs bmea;
+ bmea = new BuildMessageEventArgs (String.Format (
+ "Target {0} skipped, as it has already been built.", targetName),
+ null, null, MessageImportance.Low);
+
+ ParentEngine.EventSource.FireMessageRaised (this, bmea);
+ }
+
public BuildPropertyGroup EvaluatedProperties {
get {
if (needToReevaluate) {
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs
index 7f53ecf..b039112 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs
@@ -37,7 +37,7 @@ using Microsoft.Build.Utilities;
namespace Microsoft.Build.BuildEngine {
public class Target : IEnumerable {
- BatchingImpl batchingImpl;
+ TargetBatchingImpl batchingImpl;
BuildState buildState;
Engine engine;
ImportedProject importedProject;
@@ -64,7 +64,7 @@ namespace Microsoft.Build.BuildEngine {
this.onErrorElements = new List <XmlElement> ();
this.buildState = BuildState.NotStarted;
this.buildTasks = new List <BuildTask> ();
- this.batchingImpl = new BatchingImpl (project, this.targetElement);
+ this.batchingImpl = new TargetBatchingImpl (project, this.targetElement);
bool onErrorFound = false;
foreach (XmlNode xn in targetElement.ChildNodes) {
@@ -128,7 +128,8 @@ namespace Microsoft.Build.BuildEngine {
buildState = BuildState.Finished;
// FIXME: log it
- } catch (Exception) {
+ } catch (Exception e) {
+ LogError ("Error building target {0}: {1}", Name, e.ToString ());
return false;
}
@@ -171,26 +172,20 @@ namespace Microsoft.Build.BuildEngine {
bool DoBuild ()
{
- bool executeOnErrors = false;
+ bool executeOnErrors;
bool result = true;
+
+ if (BuildTasks.Count == 0)
+ // nothing to do
+ return true;
- LogTargetStarted ();
-
- if (batchingImpl.BuildNeeded ()) {
- foreach (BuildTask bt in buildTasks) {
- result = batchingImpl.BatchBuildTask (bt);
-
- if (!result && !bt.ContinueOnError) {
- executeOnErrors = true;
- break;
- }
- }
- } else {
- LogTargetSkipped ();
+ try {
+ result = batchingImpl.Build (this, out executeOnErrors);
+ } catch (Exception e) {
+ LogError ("Error building target {0}: {1}", Name, e.ToString ());
+ throw;
}
- LogTargetFinished (result);
-
if (executeOnErrors == true)
ExecuteOnErrors ();
@@ -209,28 +204,15 @@ namespace Microsoft.Build.BuildEngine {
}
}
- void LogTargetSkipped ()
- {
- BuildMessageEventArgs bmea;
- bmea = new BuildMessageEventArgs (String.Format ("Skipping target \"{0}\" because its outputs are up-to-date.",
- name), null, "MSBuild", MessageImportance.Normal);
- engine.EventSource.FireMessageRaised (this, bmea);
- }
-
- void LogTargetStarted ()
+ void LogError (string message, params object [] messageArgs)
{
- TargetStartedEventArgs tsea;
- string projectFile = project.FullFileName;
- tsea = new TargetStartedEventArgs (String.Format ("Target {0} started.", name), null, name, projectFile, null);
- engine.EventSource.FireTargetStarted (this, tsea);
- }
-
- void LogTargetFinished (bool succeeded)
- {
- TargetFinishedEventArgs tfea;
- string projectFile = project.FullFileName;
- tfea = new TargetFinishedEventArgs (String.Format ("Target {0} finished.", name), null, name, projectFile, null, succeeded);
- engine.EventSource.FireTargetFinished (this, tfea);
+ if (message == null)
+ throw new ArgumentException ("message");
+
+ BuildErrorEventArgs beea = new BuildErrorEventArgs (
+ null, null, null, 0, 0, 0, 0, String.Format (message, messageArgs),
+ null, null);
+ engine.EventSource.FireErrorRaised (this, beea);
}
public string Condition {
@@ -254,12 +236,19 @@ namespace Microsoft.Build.BuildEngine {
internal Project Project {
get { return project; }
}
+
+ internal List<BuildTask> BuildTasks {
+ get { return buildTasks; }
+ }
+
+ internal Engine Engine {
+ get { return engine; }
+ }
internal BuildState BuildState {
get { return buildState; }
}
- // FIXME: implement batching
internal ITaskItem [] Outputs {
get {
string outputs = targetElement.GetAttribute ("Outputs");
@@ -269,11 +258,7 @@ namespace Microsoft.Build.BuildEngine {
Expression e = new Expression ();
e.Parse (outputs, true);
- string [] outputFiles = (string []) e.ConvertTo (project, typeof (string []));
- ITaskItem [] outputItems = new ITaskItem [outputFiles.Length];
- for (int i = 0; i < outputFiles.Length; i++)
- outputItems [i] = new TaskItem (outputFiles [i]);
- return outputItems;
+ return (ITaskItem []) e.ConvertTo (project, typeof (ITaskItem []));
}
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TargetBatchingImpl.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TargetBatchingImpl.cs
new file mode 100644
index 0000000..fb394bf
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TargetBatchingImpl.cs
@@ -0,0 +1,262 @@
+//
+// TargetBatchingImpl.cs: Class that implements Target Batching Algorithm from the wiki.
+//
+// Author:
+// Marek Sieradzki (marek.sieradzki at gmail.com)
+// Ankit Jain (jankit at novell.com)
+//
+// (C) 2005 Marek Sieradzki
+// Copyright 2008 Novell, Inc (http://www.novell.com)
+// Copyright 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Xml;
+
+using Microsoft.Build.Framework;
+
+namespace Microsoft.Build.BuildEngine {
+
+ internal class TargetBatchingImpl : BatchingImplBase
+ {
+ string inputs;
+ string outputs;
+
+ public TargetBatchingImpl (Project project, XmlElement targetElement)
+ : base (project)
+ {
+ if (targetElement == null)
+ throw new ArgumentNullException ("targetElement");
+
+ inputs = targetElement.GetAttribute ("Inputs");
+ outputs = targetElement.GetAttribute ("Outputs");
+ }
+
+ public bool Build (Target target, out bool executeOnErrors)
+ {
+ executeOnErrors = false;
+ try {
+ if (!BuildTargetNeeded ()) {
+ LogTargetStarted (target);
+ LogTargetSkipped (target);
+ LogTargetFinished (target, true);
+ return true;
+ }
+
+ Init ();
+
+ ParseTargetAttributes (target);
+ BatchAndPrepareBuckets ();
+ return Run (target, out executeOnErrors);
+ } finally {
+ consumedItemsByName = null;
+ consumedMetadataReferences = null;
+ consumedQMetadataReferences = null;
+ consumedUQMetadataReferences = null;
+ batchedItemsByName = null;
+ commonItemsByName = null;
+ }
+ }
+
+ bool Run (Target target, out bool executeOnErrors)
+ {
+ executeOnErrors = false;
+ if (buckets.Count > 0)
+ return RunBatched (target, out executeOnErrors);
+ else
+ return RunUnbatched (target, out executeOnErrors);
+ }
+
+ bool RunBatched (Target target, out bool executeOnErrors)
+ {
+ bool result = true;
+ executeOnErrors = false;
+ foreach (Dictionary<string, BuildItemGroup> bucket in buckets) {
+ LogTargetStarted (target);
+ try {
+ project.SetBatchedItems (bucket, commonItemsByName);
+ if (!BuildTargetNeeded ()) {
+ LogTargetSkipped (target);
+ continue;
+ }
+
+ for (int i = 0; i < target.BuildTasks.Count; i ++) {
+ //required setting here, as batchtask.Run resets
+ //these to null before returning!
+ project.SetBatchedItems (bucket, commonItemsByName);
+
+ //FIXME: parsing attributes repeatedly
+ BuildTask task = target.BuildTasks [i];
+ result = new TaskBatchingImpl (project).Build (task, out executeOnErrors);
+ if (!result && !task.ContinueOnError) {
+ executeOnErrors = true;
+ break;
+ }
+ }
+ } finally {
+ LogTargetFinished (target, result);
+ }
+ }
+ project.SetBatchedItems (null, null);
+
+ return result;
+ }
+
+ bool RunUnbatched (Target target, out bool executeOnErrors)
+ {
+ bool result = true;
+ executeOnErrors = false;
+ LogTargetStarted (target);
+ try {
+ if (!BuildTargetNeeded ()) {
+ LogTargetSkipped (target);
+ LogTargetFinished (target, true);
+ return true;
+ }
+
+ foreach (BuildTask bt in target.BuildTasks) {
+ TaskBatchingImpl batchingImpl = new TaskBatchingImpl (project);
+ result = batchingImpl.Build (bt, out executeOnErrors);
+
+ if (!result && !bt.ContinueOnError) {
+ executeOnErrors = true;
+ break;
+ }
+ }
+ } finally {
+ LogTargetFinished (target, result);
+ }
+
+ return result;
+ }
+
+ // Parse target's Input and Output attributes to get list of referenced
+ // metadata and items to determine batching
+ void ParseTargetAttributes (Target target)
+ {
+ if (!String.IsNullOrEmpty (inputs))
+ ParseAttribute (inputs);
+
+ if (!String.IsNullOrEmpty (outputs))
+ ParseAttribute (outputs);
+ }
+
+ bool BuildTargetNeeded ()
+ {
+ ITaskItem [] inputFiles;
+ ITaskItem [] outputFiles;
+ DateTime oldestInput, youngestOutput;
+
+ if (String.IsNullOrEmpty (inputs.Trim ()))
+ return true;
+
+ if (String.IsNullOrEmpty (outputs.Trim ()))
+ return true;
+
+ Expression e = new Expression ();
+ e.Parse (inputs, true);
+ inputFiles = (ITaskItem[]) e.ConvertTo (project, typeof (ITaskItem[]));
+
+ e = new Expression ();
+ e.Parse (outputs, true);
+ outputFiles = (ITaskItem[]) e.ConvertTo (project, typeof (ITaskItem[]));
+
+ if (inputFiles == null || inputFiles.Length == 0)
+ return false;
+
+ //FIXME: if input specified, then output must also
+ // be there, add tests and confirm
+ if (outputFiles == null || outputFiles.Length == 0)
+ return false;
+
+ if (File.Exists (inputFiles [0].ItemSpec))
+ oldestInput = File.GetLastWriteTime (inputFiles [0].ItemSpec);
+ else
+ return true;
+
+ if (File.Exists (outputFiles [0].ItemSpec))
+ youngestOutput = File.GetLastWriteTime (outputFiles [0].ItemSpec);
+ else
+ return true;
+
+ foreach (ITaskItem item in inputFiles) {
+ string file = item.ItemSpec;
+ if (file.Trim () == String.Empty)
+ continue;
+
+ if (File.Exists (file.Trim ())) {
+ if (File.GetLastWriteTime (file.Trim ()) > oldestInput)
+ oldestInput = File.GetLastWriteTime (file.Trim ());
+ } else {
+ return true;
+ }
+ }
+
+ foreach (ITaskItem item in outputFiles) {
+ string file = item.ItemSpec;
+ if (file.Trim () == String.Empty)
+ continue;
+
+ if (File.Exists (file.Trim ())) {
+ if (File.GetLastWriteTime (file.Trim ()) < youngestOutput)
+ youngestOutput = File.GetLastWriteTime (file.Trim ());
+ } else
+ return true;
+ }
+
+ if (oldestInput > youngestOutput)
+ return true;
+ else
+ return false;
+ }
+
+ void LogTargetSkipped (Target target)
+ {
+ BuildMessageEventArgs bmea;
+ bmea = new BuildMessageEventArgs (String.Format ("Skipping target \"{0}\" because its outputs are up-to-date.",
+ target.Name), null, "MSBuild", MessageImportance.Normal);
+ target.Engine.EventSource.FireMessageRaised (this, bmea);
+ }
+
+ void LogTargetStarted (Target target)
+ {
+ TargetStartedEventArgs tsea;
+ string projectFile = project.FullFileName;
+ tsea = new TargetStartedEventArgs (String.Format ("Target {0} started.", target.Name), null, target.Name, projectFile, null);
+ target.Engine.EventSource.FireTargetStarted (this, tsea);
+ }
+
+ void LogTargetFinished (Target target, bool succeeded)
+ {
+ TargetFinishedEventArgs tfea;
+ string projectFile = project.FullFileName;
+ tfea = new TargetFinishedEventArgs (String.Format ("Target {0} finished.", target.Name), null, target.Name, projectFile, null, succeeded);
+ target.Engine.EventSource.FireTargetFinished (this, tfea);
+ }
+
+ }
+}
+
+#endif
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskBatchingImpl.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskBatchingImpl.cs
new file mode 100644
index 0000000..e359f63
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskBatchingImpl.cs
@@ -0,0 +1,104 @@
+//
+// TaskBatchingImpl.cs: Class that implements Task Batching Algorithm from the wiki.
+//
+// Author:
+// Marek Sieradzki (marek.sieradzki at gmail.com)
+// Ankit Jain (jankit at novell.com)
+//
+// (C) 2005 Marek Sieradzki
+// Copyright 2008 Novell, Inc (http://www.novell.com)
+// Copyright 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+
+using System;
+using System.Collections.Generic;
+using System.Xml;
+
+namespace Microsoft.Build.BuildEngine {
+ internal class TaskBatchingImpl : BatchingImplBase
+ {
+ public TaskBatchingImpl (Project project)
+ : base (project)
+ {
+ }
+
+ public bool Build (BuildTask buildTask, out bool executeOnErrors)
+ {
+ executeOnErrors = false;
+ try {
+ Init ();
+
+ // populate list of referenced items and metadata
+ ParseTaskAttributes (buildTask);
+ if (consumedMetadataReferences.Count == 0) {
+ // No batching required
+ if (ConditionParser.ParseAndEvaluate (buildTask.Condition, project))
+ return buildTask.Execute ();
+ else // skipped, it should be logged
+ return true;
+ }
+
+ BatchAndPrepareBuckets ();
+ return Run (buildTask, out executeOnErrors);
+ } finally {
+ consumedItemsByName = null;
+ consumedMetadataReferences = null;
+ consumedQMetadataReferences = null;
+ consumedUQMetadataReferences = null;
+ batchedItemsByName = null;
+ commonItemsByName = null;
+ }
+ }
+
+ bool Run (BuildTask buildTask, out bool executeOnErrors)
+ {
+ executeOnErrors = false;
+
+ // Run the task in batches
+ bool retval = true;
+ foreach (Dictionary<string, BuildItemGroup> bucket in buckets) {
+ project.SetBatchedItems (bucket, commonItemsByName);
+ if (ConditionParser.ParseAndEvaluate (buildTask.Condition, project)) {
+ if (! (retval = buildTask.Execute ()))
+ break;
+ }
+ }
+ project.SetBatchedItems (null, null);
+
+ return retval;
+ }
+
+
+ // Parse task attributes to get list of referenced metadata and items
+ // to determine batching
+ //
+ void ParseTaskAttributes (BuildTask buildTask)
+ {
+ foreach (XmlAttribute attrib in buildTask.TaskElement.Attributes)
+ ParseAttribute (attrib.Value);
+ }
+ }
+
+}
+
+#endif
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskDatabase.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskDatabase.cs
index 9b17c90..33c2add 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskDatabase.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskDatabase.cs
@@ -36,6 +36,7 @@ using Mono.XBuild.Framework;
namespace Microsoft.Build.BuildEngine {
internal class TaskDatabase {
+ Dictionary<string, UsingTaskInfo> usingTasksByFullName;
// full name -> AssemblyLoadInfo
Dictionary <string, AssemblyLoadInfo> assemblyInformation;
// full name -> Type
@@ -48,6 +49,7 @@ namespace Microsoft.Build.BuildEngine {
assemblyInformation = new Dictionary <string, AssemblyLoadInfo> ();
typesByFullName = new Dictionary <string, Type> ();
typesByShortName = new Dictionary <string, Type> ();
+ usingTasksByFullName = new Dictionary <string, UsingTaskInfo> ();
}
public void RegisterTask (string classname, AssemblyLoadInfo assemblyLoadInfo)
@@ -63,15 +65,64 @@ namespace Microsoft.Build.BuildEngine {
assembly = Assembly.Load (assemblyLoadInfo.AssemblyNameString);
Type type = assembly.GetType (classname);
+ if (type == null) {
+ // search for matching class in case namespace was not used
+ foreach (Type exportedType in assembly.GetExportedTypes()) {
+ if (exportedType.Name == classname) {
+ type = exportedType;
+ break;
+ }
+ }
+ }
typesByFullName.Add (classname, type);
- typesByShortName.Add (GetShortName (classname), type);
+ typesByShortName [GetShortName (classname)] = type;
+ }
+
+ public void RegisterUsingTask (UsingTask ut)
+ {
+ usingTasksByFullName [ut.TaskName] = new UsingTaskInfo (GetShortName (ut.TaskName), ut);
}
public Type GetTypeFromClassName (string classname)
{
+ Type ret = GetTypeFromClassNameInternal (classname);
+ if (ret == null) {
+ // Task not already loaded,
+ // Check list of pending UsingTasks
+ bool is_shortname = classname.IndexOf ('.') < 0;
+ UsingTaskInfo info = new UsingTaskInfo (String.Empty, null);
+ if (is_shortname) {
+ // Linear search UsingTaskInfo objects for short name match
+ foreach (UsingTaskInfo ut_info in usingTasksByFullName.Values) {
+ if (String.Compare (ut_info.ShortName, classname) == 0) {
+ info = ut_info;
+ break;
+ }
+ }
+
+ if (info.Task == null)
+ ThrowTaskNotRegistered (classname);
+ } else {
+ // Look for full name match
+ if (!usingTasksByFullName.TryGetValue (classname, out info))
+ ThrowTaskNotRegistered (classname);
+ }
+
+ usingTasksByFullName.Remove (info.Task.TaskName);
+ info.Task.Load (this);
+ ret = GetTypeFromClassNameInternal (classname);
+ }
+
+ if (ret == null)
+ ThrowTaskNotRegistered (classname);
+ return ret;
+ }
+
+ Type GetTypeFromClassNameInternal (string classname)
+ {
if (!typesByFullName.ContainsKey (classname)) {
if (!typesByShortName.ContainsKey (classname))
- throw new Exception (String.Format ("Not registered task {0}.", classname));
+ return null;
else
return typesByShortName [classname];
} else
@@ -86,6 +137,8 @@ namespace Microsoft.Build.BuildEngine {
typesByFullName.Add (kvp.Key, kvp.Value);
foreach (KeyValuePair <string, Type> kvp in taskDatabase.typesByShortName)
typesByShortName.Add (kvp.Key, kvp.Value);
+ foreach (KeyValuePair <string, UsingTaskInfo> kvp in taskDatabase.usingTasksByFullName)
+ usingTasksByFullName.Add (kvp.Key, kvp.Value);
}
private string GetShortName (string fullname)
@@ -93,6 +146,22 @@ namespace Microsoft.Build.BuildEngine {
string[] parts = fullname.Split ('.');
return parts [parts.Length - 1];
}
+
+ void ThrowTaskNotRegistered (string classname)
+ {
+ throw new Exception (String.Format ("Not registered task {0}.", classname));
+ }
+ }
+
+ struct UsingTaskInfo {
+ public string ShortName;
+ public UsingTask Task;
+
+ public UsingTaskInfo (string shortname, UsingTask task)
+ {
+ ShortName = shortname;
+ Task = task;
+ }
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs
index 9ca9479..5126eba 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs
@@ -76,7 +76,13 @@ namespace Microsoft.Build.BuildEngine {
throw new InvalidProjectFileException (String.Format ("Task does not have property \"{0}\" defined",
de.Key));
- value = GetObjectFromString (de.Value, currentProperty.PropertyType);
+ try {
+ value = GetObjectFromString (de.Value, currentProperty.PropertyType);
+ } catch (Exception e) {
+ throw new Exception (String.Format (
+ "Error converting Property named '{0}' with value '{1}' to type {2}: {3}",
+ de.Key, de.Value, currentProperty.PropertyType, e.Message), e);
+ }
if (value != null)
values.Add (de.Key, value);
@@ -162,6 +168,7 @@ namespace Microsoft.Build.BuildEngine {
string itemName)
{
BuildItemGroup newItems = ChangeType.ToBuildItemGroup (o, propertyInfo.PropertyType, itemName);
+ newItems.ParentProject = parentProject;
if (parentProject.EvaluatedItemsByName.ContainsKey (itemName)) {
BuildItemGroup big = parentProject.EvaluatedItemsByName [itemName];
@@ -181,8 +188,11 @@ namespace Microsoft.Build.BuildEngine {
e = new Expression ();
e.Parse (raw, true);
-
- if ((string) e.ConvertTo (parentProject, typeof (string)) == String.Empty)
+
+ // Empty contents allowed only for arrays
+ // See TestRequiredTask_*
+ if (!type.IsArray &&
+ (string) e.ConvertTo (parentProject, typeof (string)) == String.Empty)
return null;
result = e.ConvertTo (parentProject, type);
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Token.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Token.cs
index 1854aca..c794c2b 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Token.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Token.cs
@@ -29,6 +29,8 @@
#if NET_2_0
+using System;
+
namespace Microsoft.Build.BuildEngine {
internal class Token {
@@ -49,6 +51,11 @@ namespace Microsoft.Build.BuildEngine {
public TokenType Type {
get { return tokenType; }
}
+
+ public override string ToString ()
+ {
+ return String.Format ("Token (Type: {0} -> Value: {1})", tokenType, tokenValue);
+ }
}
internal enum TokenType {
@@ -63,7 +70,7 @@ namespace Microsoft.Build.BuildEngine {
Property,
Metadata,
FunctionName,
-// Transform,
+ Transform,
// LiteralSubExpression,
FirstPunct,
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/UsingTask.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/UsingTask.cs
index 5731f69..ffffd22 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/UsingTask.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/UsingTask.cs
@@ -57,7 +57,16 @@ namespace Microsoft.Build.BuildEngine {
internal void Evaluate ()
{
- AssemblyLoadInfo loadInfo;
+ if (AssemblyName == null && AssemblyFile == null)
+ throw new InvalidProjectFileException ("A <UsingTask> element must contain either the \"AssemblyName\" attribute or the \"AssemblyFile\" attribute (but not both). ");
+
+ if (ConditionParser.ParseAndEvaluate (Condition, project))
+ project.TaskDatabase.RegisterUsingTask (this);
+ }
+
+ internal void Load (TaskDatabase db)
+ {
+ AssemblyLoadInfo loadInfo = null;
if (AssemblyName != null) {
loadInfo = new AssemblyLoadInfo (AssemblyName, TaskName);
@@ -79,10 +88,9 @@ namespace Microsoft.Build.BuildEngine {
filename = Path.Combine (ffn, filename);
}
loadInfo = new AssemblyLoadInfo (LoadInfoType.AssemblyFilename, filename, null, null, null, null, TaskName);
- } else {
- throw new InvalidProjectFileException ("A <UsingTask> element must contain either the \"AssemblyName\" attribute or the \"AssemblyFile\" attribute (but not both). ");
}
- project.TaskDatabase.RegisterTask (TaskName, loadInfo);
+
+ db.RegisterTask (TaskName, loadInfo);
}
public bool IsImported {
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Utilities.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Utilities.cs
index e3bb588..579785d 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Utilities.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Utilities.cs
@@ -3,8 +3,10 @@
//
// Author:
// Marek Sieradzki (marek.sieradzki at gmail.com)
+// Lluis Sanchez Gual <lluis at novell.com>
//
// (C) 2005 Marek Sieradzki
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -29,6 +31,7 @@
using System;
using System.Collections;
+using System.IO;
using System.Text;
namespace Microsoft.Build.BuildEngine {
@@ -77,7 +80,69 @@ namespace Microsoft.Build.BuildEngine {
return sb.ToString ();
}
+
+ internal static string FromMSBuildPath (string relPath)
+ {
+ if (relPath == null || relPath.Length == 0)
+ return null;
+
+ bool is_windows = Path.DirectorySeparatorChar == '\\';
+ string path = relPath;
+ if (!is_windows)
+ path = path.Replace ("\\", "/");
+
+ // a path with drive letter is invalid/unusable on non-windows
+ if (!is_windows && char.IsLetter (path [0]) && path.Length > 1 && path[1] == ':')
+ return null;
+
+ if (System.IO.File.Exists (path)){
+ return Path.GetFullPath (path);
+ }
+
+ if (Path.IsPathRooted (path)) {
+
+ // Windows paths are case-insensitive. When mapping an absolute path
+ // we can try to find the correct case for the path.
+
+ string[] names = path.Substring (1).Split ('/');
+ string part = "/";
+
+ for (int n=0; n<names.Length; n++) {
+ string[] entries;
+
+ if (names [n] == ".."){
+ if (part == "/")
+ return ""; // Can go further back. It's not an existing file
+ part = Path.GetFullPath (part + "/..");
+ continue;
+ }
+
+ entries = Directory.GetFileSystemEntries (part);
+
+ string fpath = null;
+ foreach (string e in entries) {
+ if (string.Compare (Path.GetFileName (e), names[n], true) == 0) {
+ fpath = e;
+ break;
+ }
+ }
+ if (fpath == null) {
+ // Part of the path does not exist. Can't do any more checking.
+ part = Path.GetFullPath (part);
+ for (; n < names.Length; n++)
+ part += "/" + names[n];
+ return part;
+ }
+
+ part = fpath;
+ }
+ return Path.GetFullPath (part);
+ } else {
+ return Path.GetFullPath (path);
+ }
+ }
}
+
}
#endif
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources
index 2804ee6..5219997 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources
@@ -3,7 +3,9 @@
Assembly/AssemblyInfo.cs
../Microsoft.Build.Framework/Mono.XBuild.Framework/AssemblyLoadInfo.cs
../Microsoft.Build.Utilities/Mono.XBuild.Utilities/ReservedNameUtils.cs
-Microsoft.Build.BuildEngine/BatchingImpl.cs
+Microsoft.Build.BuildEngine/BatchingImplBase.cs
+Microsoft.Build.BuildEngine/TargetBatchingImpl.cs
+Microsoft.Build.BuildEngine/TaskBatchingImpl.cs
Microsoft.Build.BuildEngine/BuildChoose.cs
Microsoft.Build.BuildEngine/BuildEngine.cs
Microsoft.Build.BuildEngine/BuildItem.cs
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine_test.dll.sources b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine_test.dll.sources
index 25d6f32..1b2dcfb 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine_test.dll.sources
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine_test.dll.sources
@@ -1,3 +1,4 @@
+Microsoft.Build.BuildEngine/BuildChooseTest.cs
Microsoft.Build.BuildEngine/BuildItemGroupCollectionTest.cs
Microsoft.Build.BuildEngine/BuildItemGroupTest.cs
Microsoft.Build.BuildEngine/BuildItemTest.cs
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildChooseTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildChooseTest.cs
new file mode 100644
index 0000000..1a09b50
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildChooseTest.cs
@@ -0,0 +1,279 @@
+//
+// BuildChoose.cs
+//
+// Author:
+// Jonathan Chambers (joncham at gmail.com)
+//
+// (C) 2009 Jonathan Chambers
+//
+// 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;
+using Microsoft.Build.BuildEngine;
+using NUnit.Framework;
+
+namespace MonoTests.Microsoft.Build.BuildEngine {
+ [TestFixture]
+ public class BuildChooseTest {
+
+ [Test]
+ public void TestEmptyWhen () {
+ Engine engine;
+ Project project;
+ BuildItemGroup[] groups = new BuildItemGroup[1];
+
+ string documentString = @"
+ <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <Choose>
+ <When Condition=""'$(Configuration)' == ''"">
+ <ItemGroup>
+ <A Include='a' />
+ </ItemGroup>
+ </When>
+ </Choose>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ //Assert.AreEqual (1, project.ItemGroups.Count, "A1");
+ Assert.AreEqual (0, project.PropertyGroups.Count, "A2");
+ Assert.AreEqual (1, project.EvaluatedItems.Count, "A3");
+ Assert.AreEqual (1, project.EvaluatedItemsIgnoringCondition.Count, "A4");
+ }
+
+ [Test]
+ public void TestFalseWhen () {
+ Engine engine;
+ Project project;
+ BuildItemGroup[] groups = new BuildItemGroup[1];
+
+ string documentString = @"
+ <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <Choose>
+ <When Condition=""'$(Configuration)' == 'False'"">
+ <ItemGroup>
+ <A Include='a' />
+ </ItemGroup>
+ </When>
+ </Choose>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ //Assert.AreEqual (1, project.ItemGroups.Count, "A1");
+ Assert.AreEqual (0, project.PropertyGroups.Count, "A2");
+ Assert.AreEqual (0, project.EvaluatedItems.Count, "A3");
+ Assert.AreEqual (0, project.EvaluatedItemsIgnoringCondition.Count, "A4");
+ }
+
+ [Test]
+ public void TestMultipleTrueWhen () {
+ Engine engine;
+ Project project;
+ BuildItemGroup[] groups = new BuildItemGroup[1];
+
+ string documentString = @"
+ <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <Choose>
+ <When Condition=""'$(Configuration)' == ''"">
+ <ItemGroup>
+ <A Include='a' />
+ </ItemGroup>
+ </When>
+ <When Condition=""'$(Configuration)' == ''"">
+ <ItemGroup>
+ <B Include='a' />
+ </ItemGroup>
+ </When>
+ </Choose>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+
+ //Assert.AreEqual (2, project.ItemGroups.Count, "A1");
+ Assert.AreEqual (0, project.PropertyGroups.Count, "A2");
+ Assert.AreEqual (1, project.EvaluatedItems.Count, "A3");
+ Assert.AreEqual ("A", project.EvaluatedItems[0].Name, "A4");
+ Assert.AreEqual (1, project.EvaluatedItemsIgnoringCondition.Count, "A5");
+ }
+
+ [Test]
+ public void TestMultipleFalseWhen () {
+ Engine engine;
+ Project project;
+ BuildItemGroup[] groups = new BuildItemGroup[1];
+
+ string documentString = @"
+ <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <Choose>
+ <When Condition=""'$(Configuration)' == 'False'"">
+ <ItemGroup>
+ <A Include='a' />
+ </ItemGroup>
+ </When>
+ <When Condition=""'$(Configuration)' == 'False'"">
+ <ItemGroup>
+ <B Include='a' />
+ </ItemGroup>
+ </When>
+ </Choose>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ //Assert.AreEqual (2, project.ItemGroups.Count, "A1");
+ Assert.AreEqual (0, project.PropertyGroups.Count, "A2");
+ Assert.AreEqual (0, project.EvaluatedItems.Count, "A3");
+ Assert.AreEqual (0, project.EvaluatedItemsIgnoringCondition.Count, "A4");
+ }
+
+ [Test]
+ [ExpectedException (typeof (InvalidProjectFileException))]
+ public void TestMissingWhen () {
+ Engine engine;
+ Project project;
+ BuildItemGroup[] groups = new BuildItemGroup[1];
+
+ // a <Choose> requires at least one <When>
+ string documentString = @"
+ <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <Choose>
+ <Otherwise>
+ <ItemGroup>
+ <A Include='a' />
+ </ItemGroup>
+ </Otherwise>
+ </Choose>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+ }
+
+ [Test]
+ [ExpectedException (typeof (InvalidProjectFileException))]
+ public void TestMissingConditionWhen () {
+ Engine engine;
+ Project project;
+ BuildItemGroup[] groups = new BuildItemGroup[1];
+
+ // a <When> requires a Condition
+ string documentString = @"
+ <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <Choose>
+ <When>
+ <ItemGroup>
+ <A Include='a' />
+ </ItemGroup>
+ </When>
+ </Choose>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+ }
+
+ [Test]
+ public void TestWhenOtherwise1 () {
+ Engine engine;
+ Project project;
+ BuildItemGroup[] groups = new BuildItemGroup[1];
+
+ string documentString = @"
+ <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <Choose>
+ <When Condition=""'$(Configuration)' == ''"">
+ <ItemGroup>
+ <A Include='a' />
+ </ItemGroup>
+ </When>
+ <Otherwise>
+ <ItemGroup>
+ <B Include='a' />
+ </ItemGroup>
+ </Otherwise>
+ </Choose>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ //Assert.AreEqual (2, project.ItemGroups.Count, "A1");
+ Assert.AreEqual (0, project.PropertyGroups.Count, "A2");
+ Assert.AreEqual (1, project.EvaluatedItems.Count, "A3");
+ Assert.AreEqual ("A", project.EvaluatedItems[0].Name, "A4");
+ Assert.AreEqual (1, project.EvaluatedItemsIgnoringCondition.Count, "A5");
+ }
+
+ [Test]
+ public void TestWhenOtherwise2 () {
+ Engine engine;
+ Project project;
+ BuildItemGroup[] groups = new BuildItemGroup[1];
+
+ string documentString = @"
+ <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <Choose>
+ <When Condition=""'$(Configuration)' == 'False'"">
+ <ItemGroup>
+ <A Include='a' />
+ </ItemGroup>
+ </When>
+ <Otherwise>
+ <ItemGroup>
+ <B Include='a' />
+ </ItemGroup>
+ </Otherwise>
+ </Choose>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ //Assert.AreEqual (2, project.ItemGroups.Count, "A1");
+ Assert.AreEqual (0, project.PropertyGroups.Count, "A2");
+ Assert.AreEqual (1, project.EvaluatedItems.Count, "A3");
+ Assert.AreEqual ("B", project.EvaluatedItems[0].Name, "A4");
+ Assert.AreEqual (1, project.EvaluatedItemsIgnoringCondition.Count, "A5");
+ }
+ }
+}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildItemGroupTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildItemGroupTest.cs
index f3ae205..a3c601f 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildItemGroupTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildItemGroupTest.cs
@@ -388,9 +388,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.AreEqual ("Item", items [0].Name, "A7");
}
+ // A shallow clone of this object cannot be created
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "A shallow clone of this object cannot be created.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestClone5 ()
{
Engine engine;
@@ -474,9 +474,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.IsFalse (groups [0].IsImported, "A2");
}
+ // Cannot set a condition on an object not represented by an XML element in the project file.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "Cannot set a condition on an object not represented by an XML element in the project file.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestCondition2 ()
{
BuildItemGroup big = new BuildItemGroup ();
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildItemTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildItemTest.cs
index 0de71ee..696e7f4 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildItemTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildItemTest.cs
@@ -93,9 +93,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
new BuildItem (null, "something");
}
+ // Parameter "itemInclude" cannot have zero length.
[Test]
- [ExpectedException (typeof (ArgumentException),
- "Parameter \"itemInclude\" cannot have zero length.")]
+ [ExpectedException (typeof (ArgumentException))]
public void TestCtor6 ()
{
new BuildItem (null, String.Empty);
@@ -124,9 +124,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.AreEqual ("name", item2.Name, "A6");
}
+ // Cannot set a condition on an object not represented by an XML element in the project file.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "Cannot set a condition on an object not represented by an XML element in the project file.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestCondition1 ()
{
item = new BuildItem ("name", "1");
@@ -217,9 +217,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
item.CopyCustomMetadataTo (null);
}
+ // Assigning the "Exclude" attribute of a virtual item is not allowed.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "Assigning the \"Exclude\" attribute of a virtual item is not allowed.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestExclude1 ()
{
item = new BuildItem ("name", "1");
@@ -561,9 +561,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
item.RemoveMetadata ("undefined_metadata");
}
+ // "Filename" is a reserved item meta-data, and cannot be modified or deleted.
[Test]
- [ExpectedException (typeof (ArgumentException),
- "\"Filename\" is a reserved item meta-data, and cannot be modified or deleted.")]
+ [ExpectedException (typeof (ArgumentException))]
public void TestRemoveMetadata4 ()
{
item = new BuildItem ("name", "value");
@@ -671,9 +671,10 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.AreEqual (Utilities.Escape ("$(A)"), item.GetMetadata ("b"), "A5");
Assert.AreEqual ("$(A)", item.GetMetadata ("c"), "A6");
}
+
+ // "Filename" is a reserved item meta-data, and cannot be modified or deleted.
[Test]
- [ExpectedException (typeof (ArgumentException),
- "\"Filename\" is a reserved item meta-data, and cannot be modified or deleted.")]
+ [ExpectedException (typeof (ArgumentException))]
public void TestSetMetadata4 ()
{
item = new BuildItem ("name", "include");
@@ -802,5 +803,50 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project.ItemGroups.CopyTo (groups, 0);
Assert.AreEqual (1, groups [0].Count, "A3");
}
+
+ [Test]
+ public void TestBuildItemTransform ()
+ {
+ string projectText = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName='BatchingTestTask' AssemblyFile='Test\resources\TestTasks.dll' />
+
+ <ItemGroup>
+ <Foo Include='abc'/>
+ <Foo Include='def'/>
+ </ItemGroup>
+ <PropertyGroup>
+ <FooProp>PropValue/</FooProp>
+ </PropertyGroup>
+
+ <Target Name=""main"">
+ <CreateItem Include=""@(Foo)"">
+ <Output TaskParameter =""Include"" ItemName=""SyntheticFoo""/>
+ </CreateItem>
+
+ <BatchingTestTask
+ TaskItemsOutput=""@(SyntheticFoo->'$(FooProp)%(Identity).txt')"">
+ <Output TaskParameter='TaskItemsOutput' ItemName='I0' />
+ </BatchingTestTask>
+ </Target>
+ </Project>";
+
+ Engine engine = new Engine (Consts.BinPath);
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+ Project project = engine.CreateNewProject ();
+ project.LoadXml (projectText);
+
+ bool result = project.Build ("main");
+ if (!result) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ BuildItemGroup grp = project.GetEvaluatedItemsByName ("I0");
+ Assert.AreEqual (2, grp.Count, "A1");
+ Assert.AreEqual ("PropValue/abc.txt", grp [0].FinalItemSpec, "A2");
+ Assert.AreEqual ("PropValue/def.txt", grp [1].FinalItemSpec, "A3");
+ }
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyGroupCollectionTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyGroupCollectionTest.cs
index 90ee7f1..04ced79 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyGroupCollectionTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyGroupCollectionTest.cs
@@ -60,9 +60,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project.PropertyGroups.CopyTo (null, 0);
}
+ // Index was outside the bounds of the array.
[Test]
- [ExpectedException (typeof (IndexOutOfRangeException),
- "Index was outside the bounds of the array.")]
+ [ExpectedException (typeof (IndexOutOfRangeException))]
public void TestCopyTo2 ()
{
string documentString = @"
@@ -102,9 +102,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
new BuildPropertyGroup ()}}, 0);
}
+ // Index was outside the bounds of the array.
[Test]
- [ExpectedException (typeof (IndexOutOfRangeException),
- "Index was outside the bounds of the array.")]
+ [ExpectedException (typeof (IndexOutOfRangeException))]
public void TestCopyTo4 ()
{
string documentString = @"
@@ -123,9 +123,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project.PropertyGroups.CopyTo (new BuildPropertyGroup [1], 2);
}
+ // Index was outside the bounds of the array.
[Test]
- [ExpectedException (typeof (IndexOutOfRangeException),
- "Index was outside the bounds of the array.")]
+ [ExpectedException (typeof (IndexOutOfRangeException))]
public void TestCopyTo5 ()
{
string documentString = @"
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyGroupTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyGroupTest.cs
index f7dc9f8..528ea5f 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyGroupTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyGroupTest.cs
@@ -122,9 +122,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
}
// FIXME: what was that supposed to test?
+ // Properties in persisted property groups cannot be accessed by name.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "Properties in persisted property groups cannot be accessed by name.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestClone1 ()
{
string documentString = @"
@@ -179,9 +179,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.AreEqual (0, array [0].Count, "A1");
}
+ // Cannot set a condition on an object not represented by an XML element in the project file.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "Cannot set a condition on an object not represented by an XML element in the project file.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestCondition1 ()
{
string condition = "condition";
@@ -284,9 +284,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.AreEqual ("3", bpg ["a"].Value, "A4");
}
+ // Properties in persisted property groups cannot be accessed by name.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "Properties in persisted property groups cannot be accessed by name.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestIndexer2 ()
{
string documentString = @"
@@ -307,9 +307,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.AreEqual ("a", array [0] ["a"].Name, "A1");
}
+ // Properties in persisted property groups cannot be accessed by name.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "Properties in persisted property groups cannot be accessed by name.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestIndexer3 ()
{
string documentString = @"
@@ -430,9 +430,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.IsNull (node, "A3");
}
+ // The specified property does not belong to the current property group.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "The specified property does not belong to the current property group.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestRemoveProperty6 ()
{
Engine engine;
@@ -535,9 +535,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.AreEqual ("$(A)", b2.FinalValue, "A6");
}
+ // The name "1" contains an invalid character "1".
[Test]
- [ExpectedException (typeof (ArgumentException),
- "The name \"1\" contains an invalid character \"1\".")]
+ [ExpectedException (typeof (ArgumentException))]
public void TestSetProperty5 ()
{
BuildPropertyGroup bpg = new BuildPropertyGroup ();
@@ -615,9 +615,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.IsNull (project.EvaluatedProperties ["A"], "A1");
}
+ // This method is only valid for virtual property groups, not <PropertyGroup> elements.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "This method is only valid for virtual property groups, not <PropertyGroup> elements.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestSetProperty9 ()
{
Engine engine;
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyTest.cs
index 107a5c0..c298624 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildPropertyTest.cs
@@ -94,9 +94,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
}
+ // A shallow clone of this object cannot be created.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "A shallow clone of this object cannot be created.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestClone1 ()
{
bp = new BuildProperty ("name", "value");
@@ -256,9 +256,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.AreEqual ("true", a.Condition, "A1");
}
+ // Cannot set a condition on an object not represented by an XML element in the project file.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "Cannot set a condition on an object not represented by an XML element in the project file.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestCondition2 ()
{
BuildProperty a = new BuildProperty ("name", "value");
@@ -347,5 +347,37 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
node = xd.SelectSingleNode ("tns:Project/tns:PropertyGroup/tns:Name", TestNamespaceManager.NamespaceManager);
Assert.AreEqual ("AnotherValue", node.InnerText, "A1");
}
+
+ [Test]
+ public void TestValueXml ()
+ {
+ BuildPropertyGroup [] bpgs = new BuildPropertyGroup [1];
+ BuildProperty [] props;
+ XmlDocument xd;
+ XmlNode node;
+
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup>
+ <Name>Value</Name>
+ </PropertyGroup>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ project.PropertyGroups.CopyTo (bpgs, 0);
+ bpgs[0].AddNewProperty("XmlProp", "<XmlStuff></XmlStuff>");
+
+ xd = new XmlDocument ();
+ xd.LoadXml (project.Xml);
+ Console.WriteLine(project.Xml);
+ node = xd.SelectSingleNode ("tns:Project/tns:PropertyGroup/tns:XmlProp/tns:XmlStuff", TestNamespaceManager.NamespaceManager);
+ Assert.IsNotNull (node, "A1");
+ }
+
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildTaskTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildTaskTest.cs
index 5a28d67..f9880b0 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildTaskTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/BuildTaskTest.cs
@@ -344,7 +344,41 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
Assert.AreEqual ("ItemName", project.EvaluatedItems [0].Name, "A1");
Assert.AreEqual ("some_text", project.EvaluatedItems [0].FinalItemSpec, "A2");
- }
+ }
+
+ [Test]
+ public void TestTaskInNamespace()
+ {
+ Engine engine;
+ Project project;
+
+ string documentString = @"
+ <Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <UsingTask
+ AssemblyFile='Test\resources\TestTasks.dll'
+ TaskName='NamespacedOutputTestTask'
+ />
+ <Target Name='T'>
+ <NamespacedOutputTestTask />
+ </Target>
+ </Project>
+ ";
+
+ engine = new Engine(Consts.BinPath);
+ project = engine.CreateNewProject();
+ project.LoadXml(documentString);
+
+ Target[] t = new Target[1];
+ BuildTask[] bt;
+ project.Targets.CopyTo(t, 0);
+ bt = GetTasks(t[0]);
+
+ bt[0].AddOutputItem("Property", "ItemName");
+ project.Build("T");
+
+ Assert.AreEqual("ItemName", project.EvaluatedItems[0].Name, "A1");
+ Assert.AreEqual("some_text", project.EvaluatedItems[0].FinalItemSpec, "A2");
+ }
[Test]
public void TestAddOutputProperty1 ()
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ChangeLog b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ChangeLog
index 17a9102..3ab5da2 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ChangeLog
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ChangeLog
@@ -1,3 +1,85 @@
+2009-06-09 Ankit Jain <jankit at novell.com>
+
+ * EngineTest.cs (TestMSBuildOutputs): New.
+
+2009-06-08 Ankit Jain <jankit at novell.com>
+
+ * ProjectTest (TestBuildSolutionProject): New. Disabled for now.
+ * Consts.cs (RunningOnMono): Make public.
+
+2009-06-07 Ankit Jain <jankit at novell.com>
+
+ * TargetTest (TestTargetOutputsIncludingMetadata): New.
+
+2009-05-29 Ankit Jain <jankit at novell.com>
+
+ * EngineTest.cs (TestGlobalProperties*): New tests
+ and some helper methods.
+ * ProjectTest.cs (TestResetBuildStatus): Reset twice. Update
+ the event counts.
+
+2009-05-15 Marek Sieradzki <marek.sieradzki at gmail.com>
+
+ * BuildItemTest.cs:
+ * BuildPropertyGroupTest.cs:
+ * BuildPropertyGroupCollectionTest.cs:
+ * BuildPropertyTest.cs:
+ * BuildItemGroupTest.cs:
+ * EngineTest.cs:
+ * InternalLoggerExceptionTest.cs:
+ * ProjectTest.cs: Don't compare exception messages.
+
+2009-05-12 Ankit Jain <jankit at novell.com>
+
+ * ProjectTest.cs (TestAssignment1):
+ * UsingTaskTest.cs (TestTaskName):
+ (TestAssemblyNameOrAssemblyFile1):
+ (TestAssemblyNameOrAssemblyFile2): Don't compare exception messages.
+
+2009-03-27 Jonathan Chambers <joncham at gmail.com>
+
+ * BuildChooseTest.cs: Enable tests.
+ * Microsoft.Build.Engine.Test.csproj: Update post build step.
+
+2009-03-26 Jonathan Chambers <joncham at gmail.com>
+
+ * BuildTaskTest.cs (TestTaskInNamespace): Add test for Task in namespace.
+
+2009-02-24 Ankit Jain <jankit at novell.com>
+
+ * UsingTaskTest.cs (TestLazyLoad{1,2,3}): New.
+ (TestAssemblyNameOrAssemblyFileConditionFalse): New.
+ (TestDuplicate1): New.
+ * TargetTest (CheckLoggedMessageHead): Moved to TestMessageLogger,
+ use that.
+
+2009-02-15 Jonathan Chambers <joncham at gmail.com>
+
+ * BuildChooseTest.cs (TestValueXml): Add tests for Choose.
+ Currently not working.
+
+2009-02-12 Jonathan Chambers <joncham at gmail.com>
+
+ * BuildPropertyTest.cs (TestValueXml): New.
+
+2009-02-01 Ankit Jain <jankit at novell.com>
+
+ * ProjectTest.cs (TestBuild[23]): Check number of task started/finished
+ events.
+ (TestResetBuildStat): Remove "NotWorking".
+ (TestBuild4): Likewise. Check number of task started/finished events.
+
+ * TargetTest.cs (TestTargetOutputs1): New.
+
+2009-01-30 Ankit Jain <jankit at novell.com>
+
+ * ProjectTest.cs (TestRequiredTask_*): New.
+ (TestBatchedMetadataRef5): New.
+
+2009-01-29 Ankit Jain <jankit at novell.com>
+
+ * BuildItemTest.cs (TestBuildItemTransform): New.
+
2009-01-06 Ankit Jain <jankit at novell.com>
* ProjectTest.cs (TestInitialTargets): New.
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs
index 2f41a67..bae9a32 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs
@@ -30,7 +30,7 @@ using Microsoft.Build.Utilities;
public static class Consts {
- static bool RunningOnMono ()
+ public static bool RunningOnMono ()
{
return Type.GetType ("Mono.Runtime") != null;
}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/EngineTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/EngineTest.cs
index c007f58..deff748 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/EngineTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/EngineTest.cs
@@ -30,6 +30,7 @@ using Microsoft.Build.BuildEngine;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using NUnit.Framework;
+using System.IO;
namespace MonoTests.Microsoft.Build.BuildEngine {
@@ -61,6 +62,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
public class EngineTest {
Engine engine;
+ string secondProject;
static string GetPropValue (BuildPropertyGroup bpg, string name)
{
@@ -72,16 +74,34 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
return String.Empty;
}
+ [SetUp]
+ public void Setup ()
+ {
+ secondProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup Condition=""'$(foo)' == 'hello'"">
+ <A>FooWasHello</A>
+ </PropertyGroup>
+ <Target Name=""TargetA"">
+ <Message Text=""(TargetA) foo: $(foo) A: $(A) External: $(External)""/>
+ </Target>
+
+ <Target Name=""TargetB"">
+ <Message Text=""(TargetB) foo: $(foo) A: $(A) External: $(External)""/>
+ </Target>
+</Project>";
+
+ }
+
[Test]
public void TestCtor ()
{
engine = new Engine (Consts.BinPath);
}
+ // Before a project can be instantiated, Engine.BinPath must be set to the location on disk where MSBuild is installed.
+ // This is used to evaluate $(MSBuildBinPath).
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- @"Before a project can be instantiated, Engine.BinPath must be set to the location on disk where MSBuild is installed. " +
- "This is used to evaluate $(MSBuildBinPath).")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestNewProject ()
{
engine = new Engine ();
@@ -170,9 +190,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
engine.RegisterLogger (null);
}
+ // The "Project" object specified does not belong to the correct "Engine" object.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "The \"Project\" object specified does not belong to the correct \"Engine\" object.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestUnloadProject1 ()
{
Engine a = new Engine (Consts.BinPath);
@@ -193,9 +213,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
a.UnloadProject (null);
}
+ // This project object has been unloaded from the MSBuild engine and is no longer valid.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "This project object has been unloaded from the MSBuild engine and is no longer valid.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestUnloadProject3 ()
{
Engine a = new Engine (Consts.BinPath);
@@ -298,5 +318,575 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
engine.BuildProject (null, (string)null);
}
+ // Tests to check global properties behavior
+ [Test]
+ public void TestGlobalProperties1 ()
+ {
+ string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild"" AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name=""main"">
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ <Message Text=""second""/>
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ </Target>
+</Project>";
+
+ string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild""
+ AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name = ""1"">
+ <MSBuild Projects=""second.proj"" Properties=""foo=bar""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo""/>
+ </Target>
+ <Target Name=""2"">
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo1"" />
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo"" />
+ </Target>
+</Project>
+";
+
+ CreateAndCheckGlobalPropertiesTest (mainProject, firstProject, secondProject,
+ 9, 7, 13,
+ new string [] {
+ "(TargetA) foo: bar A: External: ",
+ "(TargetB) foo: foofoo A: External: ",
+ "(TargetA) foo: A: External: ",
+ "(TargetB) foo: foofoo1 A: External: ",
+ "second" });
+ }
+
+ [Test]
+ public void TestGlobalProperties1a ()
+ {
+ Directory.CreateDirectory ("Test/resources/foo");
+ string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild"" AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name=""main"">
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ <Message Text=""second""/>
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ </Target>
+</Project>";
+
+ string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild""
+ AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name = ""1"">
+ <MSBuild Projects=""second.proj"" Properties=""foo=bar""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo""/>
+ </Target>
+ <Target Name=""2"">
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA"" Properties=""foo=bar""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo"" />
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo1"" />
+ </Target>
+</Project>
+";
+ CreateAndCheckGlobalPropertiesTest (mainProject, firstProject, secondProject,
+ 10, 7, 14,
+ new string [] {
+ "(TargetA) foo: bar A: External: ",
+ "(TargetB) foo: foofoo A: External: ",
+ "(TargetA) foo: A: External: ",
+ "(TargetB) foo: foofoo1 A: External: ",
+ "second"});
+ }
+
+ [Test]
+ public void TestGlobalProperties1b ()
+ {
+ string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild"" AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name=""main"">
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ <Message Text=""second""/>
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ </Target>
+</Project>";
+
+ string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild""
+ AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name = ""1"">
+ <MSBuild Projects=""second.proj"" Properties=""foo=bar""/>
+ <MSBuild Projects=""second.proj""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo""/>
+ </Target>
+ <Target Name=""2"">
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo1"" />
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo"" />
+ </Target>
+</Project>
+";
+ CreateAndCheckGlobalPropertiesTest (mainProject, firstProject, secondProject,
+ 10, 7, 14,
+ new string [] {
+ "(TargetA) foo: bar A: External: ",
+ "(TargetA) foo: A: External: ",
+ "(TargetB) foo: foofoo A: External: ",
+ "(TargetB) foo: foofoo1 A: External: ",
+ "second"});
+ }
+
+ [Test]
+ public void TestGlobalProperties2 ()
+ {
+ string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild"" AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name=""main"">
+ <MSBuild Projects=""first.proj"" Targets = ""1""/>
+ <MSBuild Projects=""first.proj"" Targets = ""2""/>
+ <Message Text=""second""/>
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ </Target>
+</Project>";
+
+ string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild""
+ AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name = ""1"">
+ <MSBuild Projects=""second.proj"" Properties=""foo=bar""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo""/>
+ </Target>
+ <Target Name=""2"">
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo"" />
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo1"" />
+ </Target>
+</Project>
+";
+
+ CreateAndCheckGlobalPropertiesTest (mainProject, firstProject, secondProject,
+ 10, 7, 14,
+ new string [] {
+ "(TargetA) foo: bar A: External: ",
+ "(TargetB) foo: foofoo A: External: ",
+ "(TargetA) foo: A: External: ",
+ "(TargetB) foo: foofoo1 A: External: ",
+ "second"});
+ }
+
+ [Test]
+ public void TestGlobalProperties3 ()
+ {
+ string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild"" AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name=""main"">
+ <MSBuild Projects=""first.proj"" Targets = ""1""/>
+ <CallTarget Targets=""Call2""/>
+ <Message Text=""second""/>
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ </Target>
+ <Target Name=""Call2"">
+ <MSBuild Projects=""first.proj"" Targets = ""2""/>
+ </Target>
+</Project>";
+
+ string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild""
+ AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name = ""1"">
+ <MSBuild Projects=""second.proj"" Properties=""foo=bar""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo""/>
+ </Target>
+ <Target Name=""2"">
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo"" />
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo1"" />
+ </Target>
+</Project>
+";
+
+ CreateAndCheckGlobalPropertiesTest (mainProject, firstProject, secondProject,
+ 10, 8, 15,
+ new string [] {
+ "(TargetA) foo: bar A: External: ",
+ "(TargetB) foo: foofoo A: External: ",
+ "(TargetA) foo: A: External: ",
+ "(TargetB) foo: foofoo1 A: External: ",
+ "second"});
+ }
+
+ //externally set global properties
+ [Test]
+ public void TestGlobalProperties4 ()
+ {
+ string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild"" AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name=""main"">
+ <MSBuild Projects=""first.proj"" Targets = ""1""/>
+ <CallTarget Targets=""Call2""/>
+ <Message Text=""second""/>
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ </Target>
+ <Target Name=""Call2"">
+ <MSBuild Projects=""first.proj"" Targets = ""2""/>
+ </Target>
+</Project>";
+
+ string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild""
+ AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name = ""1"">
+ <MSBuild Projects=""second.proj"" Properties=""foo=bar""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo""/>
+ </Target>
+ <Target Name=""2"">
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo"" />
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo1"" />
+ </Target>
+</Project>
+";
+
+ BuildPropertyGroup globalprops = new BuildPropertyGroup ();
+ globalprops.SetProperty ("foo", "hello");
+ engine.GlobalProperties = globalprops;
+
+ CreateAndCheckGlobalPropertiesTest (mainProject, firstProject, secondProject,
+ globalprops, null, 10, 8, 15,
+ new string [] {
+ "(TargetA) foo: bar A: External: ",
+ "(TargetB) foo: foofoo A: External: ",
+ "(TargetA) foo: hello A: FooWasHello External: ",
+ "(TargetB) foo: foofoo1 A: External: ",
+ "second"});
+ }
+
+ //externally set global properties, merge with explicit
+ [Test]
+ public void TestGlobalProperties4a ()
+ {
+ string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild"" AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name=""main"">
+ <MSBuild Projects=""first.proj"" Targets = ""1""/>
+ <CallTarget Targets=""Call2""/>
+ <Message Text=""second""/>
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ </Target>
+ <Target Name=""Call2"">
+ <MSBuild Projects=""first.proj"" Targets = ""2""/>
+ </Target>
+</Project>";
+
+ string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild""
+ AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name = ""1"">
+ <MSBuild Projects=""second.proj"" Properties=""foo=bar""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo""/>
+ </Target>
+ <Target Name=""2"">
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo"" />
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo1"" />
+ </Target>
+</Project>
+";
+
+ BuildPropertyGroup globalprops = new BuildPropertyGroup ();
+ globalprops.SetProperty ("external", "ExternalValue");
+
+ CreateAndCheckGlobalPropertiesTest (mainProject, firstProject, secondProject,
+ globalprops, null,
+ 10, 8, 15,
+ new string [] {
+ "(TargetA) foo: bar A: External: ExternalValue",
+ "(TargetB) foo: foofoo A: External: ExternalValue",
+ "(TargetA) foo: A: External: ExternalValue",
+ "(TargetB) foo: foofoo1 A: External: ExternalValue",
+ "second"});
+ }
+
+ //set global properties on _project_, merge with explicit
+ [Test]
+ public void TestGlobalProperties4b ()
+ {
+ string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild"" AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name=""main"">
+ <MSBuild Projects=""first.proj"" Targets = ""1""/>
+ <CallTarget Targets=""Call2""/>
+ <Message Text=""second""/>
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ </Target>
+ <Target Name=""Call2"">
+ <MSBuild Projects=""first.proj"" Targets = ""2""/>
+ </Target>
+</Project>";
+
+ string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild""
+ AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name = ""1"">
+ <MSBuild Projects=""second.proj"" Properties=""foo=bar""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo""/>
+ </Target>
+ <Target Name=""2"">
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo"" />
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo1"" />
+ </Target>
+</Project>
+";
+
+ BuildPropertyGroup globalprops = new BuildPropertyGroup ();
+ globalprops.SetProperty ("external", "ExternalValue");
+
+ BuildPropertyGroup project_globalprops = new BuildPropertyGroup ();
+ project_globalprops.SetProperty ("external", "ProjExternalValue");
+ project_globalprops.SetProperty ("foo", "ProjFooValue");
+
+ CreateAndCheckGlobalPropertiesTest (mainProject, firstProject, secondProject,
+ globalprops, project_globalprops,
+ 10, 8, 15,
+ new string [] {
+ "(TargetA) foo: bar A: External: ProjExternalValue",
+ "(TargetB) foo: foofoo A: External: ProjExternalValue",
+ "(TargetA) foo: ProjFooValue A: External: ProjExternalValue",
+ "(TargetB) foo: foofoo1 A: External: ProjExternalValue",
+ "second"});
+ }
+
+ //set global properties on _project_, and engine and explicit via msbuild
+ [Test]
+ public void TestGlobalProperties4c ()
+ {
+ string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild"" AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name=""main"">
+ <MSBuild Projects=""first.proj"" Targets = ""1""/>
+ <CallTarget Targets=""Call2""/>
+ <Message Text=""second""/>
+ <MSBuild Projects=""first.proj"" Targets = ""1;2""/>
+ </Target>
+ <Target Name=""Call2"">
+ <MSBuild Projects=""first.proj"" Targets = ""2""/>
+ </Target>
+</Project>";
+
+ string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild""
+ AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+ <Target Name = ""1"">
+ <MSBuild Projects=""second.proj"" Properties=""foo=bar""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo""/>
+ </Target>
+ <Target Name=""2"">
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetA""/>
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo"" />
+ <MSBuild Projects=""second.proj"" Targets = ""TargetB"" Properties=""foo=foofoo1"" />
+ </Target>
+</Project>
+";
+
+ BuildPropertyGroup globalprops = new BuildPropertyGroup ();
+ globalprops.SetProperty ("foo", "EngineFooValue");
+
+ BuildPropertyGroup project_globalprops = new BuildPropertyGroup ();
+ project_globalprops.SetProperty ("foo", "ProjFooValue");
+
+ CreateAndCheckGlobalPropertiesTest (mainProject, firstProject, secondProject,
+ globalprops, project_globalprops,
+ 10, 8, 15,
+ new string [] {
+ "(TargetA) foo: bar A: External: ",
+ "(TargetB) foo: foofoo A: External: ",
+ "(TargetA) foo: ProjFooValue A: External: ",
+ "(TargetB) foo: foofoo1 A: External: ",
+ "second"});
+ }
+ [Test]
+ public void TestMSBuildOutputs ()
+ {
+ string mainProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""Microsoft.Build.Tasks.MSBuild""
+ AssemblyName=""Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"" />
+
+ <ItemGroup>
+ <ProjectRef Include=""first.proj"">
+ <Prop3>value</Prop3>
+ <Unique>true</Unique>
+ </ProjectRef>
+ <ProjectRef Include=""first.proj"">
+ <Prop3>value2</Prop3>
+ <Unique>false</Unique>
+ </ProjectRef>
+
+ <ProjectRef Include=""second.proj"">
+ <Prop3>value3</Prop3>
+ <Unique>unique</Unique>
+ </ProjectRef>
+
+ </ItemGroup>
+
+ <Target Name='Main'>
+ <MSBuild Projects=""@(ProjectRef)"" Targets=""GetData"">
+ <Output TaskParameter=""TargetOutputs"" ItemName=""F""/>
+ </MSBuild>
+ <Message Text=""@(F): F.Unique: %(F.Unique)""/>
+ <Message Text=""@(F): F.Prop1: %(F.Prop1)""/>
+ <Message Text=""@(F): F.Prop2: %(F.Prop2)""/>
+ <Message Text=""@(F): F.Prop3: %(F.Prop3)""/>
+ </Target>
+</Project>";
+
+ string firstProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <A Include=""foofoo"">
+ <Prop1>false</Prop1>
+ <Prop2>false</Prop2>
+ <Prop3>foo value</Prop3>
+ </A>
+
+ <A Include=""barbar"">
+ <Prop1>bar_false</Prop1>
+ <Prop2>bar_false</Prop2>
+ <Prop3>bar value</Prop3>
+ </A>
+
+ </ItemGroup>
+
+ <Target Name=""GetData"" Outputs=""@(AbcOutputs)"">
+ <CreateItem Include=""@(A)"">
+ <Output TaskParameter=""Include"" ItemName=""AbcOutputs""/>
+ </CreateItem>
+ </Target>
+</Project>
+";
+ string secondProject = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <A Include=""from_second"">
+ <Prop1>false</Prop1>
+ <Prop2>false</Prop2>
+ <Prop3>new value</Prop3>
+ </A>
+ </ItemGroup>
+
+ <Target Name=""GetData"" Outputs=""@(AbcOutputs)"">
+ <CreateItem Include=""@(A)"">
+ <Output TaskParameter=""Include"" ItemName=""AbcOutputs""/>
+ </CreateItem>
+ </Target>
+</Project>
+";
+
+ CreateAndCheckGlobalPropertiesTest (mainProject, firstProject, secondProject,
+ null, null,
+ 4, 3, 12,
+ new string [] {
+ "foofoo;barbar;foofoo;barbar: F.Unique: true",
+ "from_second: F.Unique: unique",
+ "foofoo;foofoo;from_second: F.Prop1: false",
+ "barbar;barbar: F.Prop1: bar_false",
+ "foofoo;foofoo;from_second: F.Prop2: false",
+ "barbar;barbar: F.Prop2: bar_false",
+ "foofoo;foofoo: F.Prop3: foo value",
+ "barbar;barbar: F.Prop3: bar value",
+ "from_second: F.Prop3: new value",
+ });
+ }
+
+ // Helper Methods for TestGlobalProperties*
+
+ void CreateAndCheckGlobalPropertiesTest (string main, string first, string second,
+ int project_count, int target_count, int task_count, string [] messages)
+ {
+ CreateAndCheckGlobalPropertiesTest (main, first, second, null, null,
+ project_count, target_count, task_count, messages);
+ }
+
+ void CreateAndCheckGlobalPropertiesTest (string main, string first, string second,
+ BuildPropertyGroup engine_globals, BuildPropertyGroup project_globals,
+ int project_count, int target_count, int task_count, string [] messages)
+ {
+ WriteGlobalPropertiesProjects (main, first, second);
+
+ Engine engine = new Engine (Consts.BinPath);
+ if (engine_globals != null)
+ engine.GlobalProperties = engine_globals;
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+
+ Project project = engine.CreateNewProject ();
+ project.Load (Path.Combine ("Test", Path.Combine ("resources", "main.proj")));
+ if (project_globals != null)
+ project.GlobalProperties = project_globals;
+
+ bool result = project.Build ();
+ if (!result) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ CheckEventCounts (logger, project_count, target_count, task_count);
+
+ CheckLoggedMessages (logger, messages, "A1");
+ }
+
+ void CheckEventCounts (MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger,
+ int project, int target, int task)
+ {
+ try {
+ Assert.AreEqual (project, logger.ProjectStarted, "#project started events");
+ Assert.AreEqual (project, logger.ProjectFinished, "#project finished events");
+ Assert.AreEqual (target, logger.TargetStarted, "#target started events");
+ Assert.AreEqual (target, logger.TargetFinished, "#target finished events");
+ Assert.AreEqual (task, logger.TaskStarted, "#task started events");
+ Assert.AreEqual (task, logger.TaskFinished, "#task finished events");
+ Assert.AreEqual (1, logger.BuildStarted, "#build started events");
+ Assert.AreEqual (1, logger.BuildFinished, "#build finished events");
+ } catch (AssertionException) {
+ logger.DumpMessages ();
+ throw;
+ }
+ }
+
+ void CheckLoggedMessages (MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger, string [] messages,
+ string prefix)
+ {
+ try {
+ for (int i = 0; i < messages.Length; i++) {
+ logger.CheckLoggedMessageHead (messages [i], String.Format ("{0} #{1}", prefix, i));
+ }
+ } catch {
+ logger.DumpMessages ();
+ throw;
+ }
+
+ Assert.AreEqual (0, logger.NormalMessageCount, "Number of remaining messages");
+ }
+
+ // helper methods for TestGlobalProperties*
+ void WriteGlobalPropertiesProjects (string mainProject, string firstProject, string secondProject)
+ {
+ using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "main.proj")))) {
+ sw.Write (mainProject);
+ }
+
+ using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "first.proj")))) {
+ sw.Write (firstProject);
+ }
+
+ using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "second.proj")))) {
+ sw.Write (secondProject);
+ }
+ }
+
+
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/InternalLoggerExceptionTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/InternalLoggerExceptionTest.cs
index 2fce213..9aca5a6 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/InternalLoggerExceptionTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/InternalLoggerExceptionTest.cs
@@ -32,10 +32,12 @@ using NUnit.Framework;
namespace MonoTests.Microsoft.Build.BuildEngine {
[TestFixture]
public class InternalLoggerExceptionTest {
+
+
+ // An InternalLoggerException can only be thrown by the MSBuild engine.
+ // The public constructors of this class cannot be used to create an instance of the exception.
[Test]
- [ExpectedException (typeof (System.InvalidOperationException),
- "An InternalLoggerException can only be thrown by the MSBuild engine." +
- " The public constructors of this class cannot be used to create an instance of the exception.")]
+ [ExpectedException (typeof (System.InvalidOperationException))]
public void TestCtorMessage ()
{
string message = "message";
@@ -43,10 +45,10 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
new InternalLoggerException (message);
}
+ // An InternalLoggerException can only be thrown by the MSBuild engine.
+ // The public constructors of this class cannot be used to create an instance of the exception.
[Test]
- [ExpectedException (typeof (System.InvalidOperationException),
- "An InternalLoggerException can only be thrown by the MSBuild engine." +
- " The public constructors of this class cannot be used to create an instance of the exception.")]
+ [ExpectedException (typeof (System.InvalidOperationException))]
public void TestCtorMessageException ()
{
string message = "message";
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ProjectTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ProjectTest.cs
index 28bd430..b84cff7 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ProjectTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ProjectTest.cs
@@ -36,6 +36,8 @@ using Microsoft.Build.Utilities;
using NUnit.Framework;
using System.Text;
+using MBT = MonoTests.Microsoft.Build.Tasks;
+
namespace MonoTests.Microsoft.Build.BuildEngine {
class TestLogger : Logger {
@@ -87,11 +89,6 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
*/
[Test]
- [ExpectedException (typeof (InvalidProjectFileException),
- @"The default XML namespace of the project must be the MSBuild XML namespace." +
- " If the project is authored in the MSBuild 2003 format, please add " +
- "xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" to the <Project> element. " +
- "If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. ")]
public void TestAssignment1 ()
{
Engine engine;
@@ -102,16 +99,22 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
engine = new Engine (Consts.BinPath);
DateTime time = DateTime.Now;
project = engine.CreateNewProject ();
- project.LoadXml (documentString);
+ try {
+ project.LoadXml (documentString);
+ } catch (InvalidProjectFileException) {
+ Assert.AreEqual (true, project.BuildEnabled, "A1");
+ Assert.AreEqual (String.Empty, project.DefaultTargets, "A2");
+ Assert.AreEqual (String.Empty, project.FullFileName, "A3");
+ Assert.AreEqual (false, project.IsDirty, "A4");
+ Assert.AreEqual (false, project.IsValidated, "A5");
+ Assert.AreEqual (engine, project.ParentEngine, "A6");
+ Console.WriteLine ("time: {0} p.t: {1}", time, project.TimeOfLastDirty);
+ Assert.IsTrue (time <= project.TimeOfLastDirty, "A7");
+ Assert.IsTrue (String.Empty != project.Xml, "A8");
+ return;
+ }
- Assert.AreEqual (true, project.BuildEnabled, "A1");
- Assert.AreEqual (String.Empty, project.DefaultTargets, "A2");
- Assert.AreEqual (String.Empty, project.FullFileName, "A3");
- Assert.AreEqual (false, project.IsDirty, "A4");
- Assert.AreEqual (false, project.IsValidated, "A5");
- Assert.AreEqual (engine, project.ParentEngine, "A6");
- Assert.IsTrue (time <= project.TimeOfLastDirty, "A7");
- Assert.IsTrue (String.Empty != project.Xml, "A8");
+ Assert.Fail ("Expected InvalidProjectFileException");
}
[Test]
@@ -371,14 +374,14 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
string documentString = @"
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
- <Target Name='T' Inputs='Test\resources\TestTasks.cs' Outputs='Test\resources\TestTasks.dll'>
+ <Target Name='T'>
<Message Text='text' />
</Target>
</Project>
";
engine = new Engine (Consts.BinPath);
- TestLogger tl = new TestLogger ();
+ MBT.TestMessageLogger tl = new MBT.TestMessageLogger();
engine.RegisterLogger (tl);
project = engine.CreateNewProject ();
project.LoadXml (documentString);
@@ -386,8 +389,10 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project.Build ("T");
project.Build ("T");
- Assert.AreEqual (2, tl.TargetStartedEvents, "A1");
- Assert.AreEqual (2, tl.TargetFinishedEvents, "A2");
+ Assert.AreEqual (2, tl.TargetStarted, "A1");
+ Assert.AreEqual (2, tl.TargetFinished, "A2");
+ Assert.AreEqual (2, tl.TaskStarted, "A3");
+ Assert.AreEqual (2, tl.TaskFinished, "A4");
}
[Test]
@@ -398,14 +403,14 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
string documentString = @"
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
- <Target Name='T' Inputs='Test\resources\TestTasks.cs' Outputs='Test\resources\TestTasks.dll'>
+ <Target Name='T'>
<Message Text='text' />
</Target>
</Project>
";
engine = new Engine (Consts.BinPath);
- TestLogger tl = new TestLogger ();
+ MBT.TestMessageLogger tl = new MBT.TestMessageLogger ();
engine.RegisterLogger (tl);
project = engine.CreateNewProject ();
project.LoadXml (documentString);
@@ -413,12 +418,13 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project.Build (new string [1] { "T" }, null, BuildSettings.None);
project.Build (new string [1] { "T" }, null, BuildSettings.None);
- Assert.AreEqual (2, tl.TargetStartedEvents, "A1");
- Assert.AreEqual (2, tl.TargetFinishedEvents, "A2");
+ Assert.AreEqual (2, tl.TargetStarted, "A1");
+ Assert.AreEqual (2, tl.TargetFinished, "A2");
+ Assert.AreEqual (2, tl.TaskStarted, "A3");
+ Assert.AreEqual (2, tl.TaskFinished, "A4");
}
[Test]
- [Category ("NotWorking")]
public void TestBuild4 ()
{
Engine engine;
@@ -426,14 +432,14 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
string documentString = @"
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
- <Target Name='T' Inputs='Test\resources\TestTasks.cs' Outputs='Test\resources\TestTasks.dll'>
+ <Target Name='T'>
<Message Text='text' />
</Target>
</Project>
";
engine = new Engine (Consts.BinPath);
- TestLogger tl = new TestLogger ();
+ MBT.TestMessageLogger tl = new MBT.TestMessageLogger ();
engine.RegisterLogger (tl);
project = engine.CreateNewProject ();
project.LoadXml (documentString);
@@ -441,8 +447,10 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project.Build (new string [1] { "T" }, null, BuildSettings.DoNotResetPreviouslyBuiltTargets);
project.Build (new string [1] { "T" }, null, BuildSettings.DoNotResetPreviouslyBuiltTargets);
- Assert.AreEqual (1, tl.TargetStartedEvents, "A1");
- Assert.AreEqual (1, tl.TargetFinishedEvents, "A2");
+ Assert.AreEqual (1, tl.TargetStarted, "A1");
+ Assert.AreEqual (1, tl.TargetFinished, "A2");
+ Assert.AreEqual (1, tl.TaskStarted, "A3");
+ Assert.AreEqual (1, tl.TaskFinished, "A4");
}
[Test]
@@ -924,9 +932,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
p1.RemoveItemGroup (null);
}
+ // The "BuildItemGroup" object specified does not belong to the correct "Project" object.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "The \"BuildItemGroup\" object specified does not belong to the correct \"Project\" object.")]
+ [ExpectedException (typeof (InvalidOperationException))]
[Category ("NotWorking")]
public void TestRemoveItemGroup2 ()
{
@@ -959,9 +967,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project.RemoveItem (null);
}
+ // The object passed in is not part of the project.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "The object passed in is not part of the project.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestRemoveItem2 ()
{
Engine engine;
@@ -973,9 +981,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project.RemoveItem (new BuildItem ("name", "include"));
}
+ // The "BuildItemGroup" object specified does not belong to the correct "Project" object.
[Test]
- [ExpectedException (typeof (InvalidOperationException),
- "The \"BuildItemGroup\" object specified does not belong to the correct \"Project\" object.")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void TestRemoveItem3 ()
{
Engine engine;
@@ -1037,7 +1045,6 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
}
[Test]
- [Category ("NotWorking")]
public void TestResetBuildStatus ()
{
Engine engine;
@@ -1060,9 +1067,11 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project.Build ("T");
project.ResetBuildStatus ();
project.Build (new string [1] { "T" }, null, BuildSettings.DoNotResetPreviouslyBuiltTargets);
+ project.ResetBuildStatus ();
+ project.Build (new string [1] { "T" }, null, BuildSettings.DoNotResetPreviouslyBuiltTargets);
- Assert.AreEqual (2, tl.TargetStartedEvents, "A1");
- Assert.AreEqual (2, tl.TargetFinishedEvents, "A1");
+ Assert.AreEqual (3, tl.TargetStartedEvents, "A1");
+ Assert.AreEqual (3, tl.TargetFinishedEvents, "A1");
}
[Test]
@@ -1445,6 +1454,42 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
}
[Test]
+ public void TestBatchedMetadataRef5 ()
+ {
+ string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""Test/resources/TestTasks.dll"" />
+ <ItemGroup>
+ <Coll1 Include=""A1""><Name>Abc</Name></Coll1>
+ <Coll1 Include=""A2""><Name>Def</Name></Coll1>
+ <Coll1 Include=""A3""><Name>Xyz</Name></Coll1>
+ <Coll2 Include=""B1""><Name>Bar</Name></Coll2>
+ </ItemGroup>
+ <Target Name=""ShowMessage"">
+ <Message Text=""Coll1: @(Coll1->'Foo%(Name)Bar')"" />
+ <BatchingTestTask Sources=""@(Coll1->'Foo%(Name)Bar')"" >
+ <Output TaskParameter=""Output"" ItemName=""FinalList"" />
+ </BatchingTestTask>
+ </Target>
+ </Project>";
+
+ Engine engine = new Engine (Consts.BinPath);
+ Project project = engine.CreateNewProject ();
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+
+ project.LoadXml (projectString);
+ bool result = project.Build ("ShowMessage");
+ if (!result) {
+ logger.DumpMessages ();
+ Assert.Fail ("A1: Build failed");
+ }
+ logger.DumpMessages ();
+ BuildItemGroup include = project.GetEvaluatedItemsByName ("FinalList");
+ Assert.AreEqual (3, include.Count, "A2");
+ }
+
+ [Test]
public void TestInitialTargets ()
{
Engine engine = new Engine (Consts.BinPath);
@@ -1475,6 +1520,211 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
}
}
+ [Test]
+ public void TestRequiredTask_String1 ()
+ {
+ CheckProjectForRequiredTests ("RequiredTestTask_String", "@(NonExistant)",
+ false, "Should've failed: No value specified for required field - 'Property' of RequiredTestTask_String");
+ }
+
+ [Test]
+ public void TestRequiredTask_String2 ()
+ {
+ CheckProjectForRequiredTests ("RequiredTestTask_String", "$(NonExistant)",
+ false, "Should've failed: No value specified for required field - 'Property' of RequiredTestTask_String");
+ }
+
+ [Test]
+ public void TestRequiredTask_TaskItem1 ()
+ {
+ Project p = CheckProjectForRequiredTests ("RequiredTestTask_TaskItem", "@(NonExistant)",
+ false, "Should've failed: No value specified for required field - 'Property' of RequiredTestTask_TaskItem");
+ }
+
+ [Test]
+ public void TestRequiredTask_TaskItem2 ()
+ {
+ Project p = CheckProjectForRequiredTests ("RequiredTestTask_TaskItem", "$(NonExistant)",
+ false, "Should've failed: No value specified for required field - 'Property' of RequiredTestTask_TaskItem");
+ }
+
+ [Test]
+ public void TestRequiredTask_TaskItemArray1 ()
+ {
+ Project p = CheckProjectForRequiredTests ("RequiredTestTask_TaskItems", "@(NonExistant)",
+ true, "Build failed");
+
+ BuildItemGroup group = p.GetEvaluatedItemsByName ("OutItem");
+ Assert.AreEqual (1, group.Count, "A2");
+ Assert.AreEqual ("count: 0", group [0].FinalItemSpec, "A3");
+ }
+
+ [Test]
+ public void TestRequiredTask_TaskItemArray2 ()
+ {
+ Project p = CheckProjectForRequiredTests ("RequiredTestTask_TaskItems", "$(NonExistant)",
+ true, "Build failed");
+
+ BuildItemGroup group = p.GetEvaluatedItemsByName ("OutItem");
+ Assert.AreEqual (1, group.Count, "A2");
+ Assert.AreEqual ("count: 0", group [0].FinalItemSpec, "A3");
+ }
+
+ [Test]
+ public void TestRequiredTask_TaskItemArray3 ()
+ {
+ Project p = CheckProjectForRequiredTests ("RequiredTestTask_IntArray", "$(NonExistant)",
+ true, "Build failed");
+
+ BuildItemGroup group = p.GetEvaluatedItemsByName ("OutItem");
+ Assert.AreEqual (1, group.Count, "A2");
+ Assert.AreEqual ("count: 0", group [0].FinalItemSpec, "A3");
+ }
+
+ // full solution test
+ //[Test]
+ public void TestBuildSolutionProject ()
+ {
+ string basepath = Path.Combine ("Test", Path.Combine ("resources", "Project01"));
+ string [] project_dirs = new string [] {
+ Path.Combine (basepath, "Lib4"),
+ Path.Combine (basepath, "Lib3"),
+ Path.Combine (basepath, "Lib2"),
+ Path.Combine (basepath, "Lib1"),
+ Path.Combine (basepath, "Project01")
+ };
+ string debug_extn = Consts.RunningOnMono () ? ".dll.mdb" : ".pdb";
+
+ // List of expected output files
+ // Lib3
+ string [] [] project_files = new string [5][] {
+ new string [] { "Lib4.dll", "Lib4" + debug_extn },
+ new string [] { "Lib3.dll" , "Lib3" + debug_extn },
+ // Lib2
+ new string [] {
+ "Lib2.dll", "Lib2" + debug_extn,
+ "lib2_folder/Lib2.deploy.txt",
+ Path.Combine ("fr-CA", "Lib2.resources.dll"),
+ Path.Combine ("fr-FR", "Lib2.resources.dll"),
+ "Lib4.dll", "Lib4" + debug_extn
+ },
+
+ // lib1
+ new string [] {
+ // lib1 files
+ "Lib1.dll", "Lib2" + debug_extn,
+ "Lib1.deploy.txt",
+ Path.Combine ("fr-CA", "Lib1.resources.dll"),
+ Path.Combine ("fr-FR", "Lib1.resources.dll"),
+ Path.Combine ("en-US", "Lib1.resources.dll"),
+ // lib2 files
+ "Lib2.dll", "Lib2" + debug_extn,
+ "lib2_folder/Lib2.deploy.txt",
+ Path.Combine ("fr-CA", "Lib2.resources.dll"),
+ Path.Combine ("fr-FR", "Lib2.resources.dll"),
+ // lib3 files
+ "Lib3.dll", "Lib3" + debug_extn,
+ "Lib4.dll", "Lib4" + debug_extn
+ },
+
+ new string [] {
+ "Project01.exe",
+ "Project01" + (Consts.RunningOnMono () ? ".exe.mdb" : ".pdb"),
+ // lib1 files
+ "Lib1.dll", "Lib1" + debug_extn,
+ "Lib1.deploy.txt",
+ Path.Combine ("fr-CA", "Lib1.resources.dll"),
+ Path.Combine ("fr-FR", "Lib1.resources.dll"),
+ Path.Combine ("en-US", "Lib1.resources.dll"),
+ // lib2 files
+ "Lib2.dll", "Lib2" + debug_extn,
+ "lib2_folder/Lib2.deploy.txt",
+ Path.Combine ("fr-CA", "Lib2.resources.dll"),
+ Path.Combine ("fr-FR", "Lib2.resources.dll"),
+ "Lib4.dll", "Lib4" + debug_extn,
+ }
+ };
+
+ // Cleanup
+ for (int i = 0; i < project_dirs.Length; i ++) {
+ string bin_path = Path.Combine (project_dirs [i], Path.Combine ("bin", "Debug"));
+ string obj_path = Path.Combine (project_dirs [i], Path.Combine ("obj", "Debug"));
+
+ DeleteAllInDir (bin_path);
+
+ DeleteAllInDir (obj_path);
+ }
+
+ Engine engine = new Engine (Consts.BinPath);
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+
+ engine.GlobalProperties = new BuildPropertyGroup ();
+ engine.GlobalProperties.SetProperty ("TreatWarningsAsErrors", "false");
+
+ Project project = engine.CreateNewProject ();
+ project.Load (Path.Combine (basepath, "Project01.sln.proj"));
+
+ bool result = project.Build ();
+ if (!result) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ // We check only the output dir, not the 'obj'
+ string debug = Path.Combine ("bin", "Debug");
+ for (int i = 0; i < project_dirs.Length; i++) {
+ CheckFilesExistInDir (Path.Combine (project_dirs [i], debug),
+ project_files [i]);
+ }
+ }
+
+ void DeleteAllInDir (string path)
+ {
+ if (!Directory.Exists (path))
+ return;
+
+ foreach (string file in Directory.GetFiles (path))
+ File.Delete (file);
+ Directory.Delete (path, true);
+ }
+
+ void CheckFilesExistInDir (string dir, params string [] files)
+ {
+ foreach (string file in files) {
+ string path = Path.Combine (dir, file);
+ Assert.IsTrue (File.Exists (path),
+ String.Format ("Expected to find file {0}", path));
+ }
+ }
+
+ Project CheckProjectForRequiredTests (string taskname, string property_arg, bool expected_result, string error_msg)
+ {
+ string projectString = String.Format (@"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask TaskName=""{0}"" AssemblyFile=""Test/resources/TestTasks.dll"" />
+ <Target Name=""foo"">
+ <{0} Property=""{1}"">
+ <Output TaskParameter=""Output"" ItemName=""OutItem""/>
+ </{0}>
+ </Target>
+ </Project>", taskname, property_arg);
+
+ Engine engine = new Engine (Consts.BinPath);
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+ Project project = engine.CreateNewProject ();
+ project.LoadXml (projectString);
+
+ try {
+ Assert.AreEqual (expected_result, project.Build (), error_msg);
+ } finally {
+ logger.DumpMessages ();
+ }
+ return project;
+ }
+
static void CheckBuildItem (BuildItem item, string name, string [,] metadata, string finalItemSpec, string prefix)
{
Assert.AreEqual (name, item.Name, prefix + "#1");
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs
index e7ad7d6..db6dd40 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs
@@ -234,5 +234,141 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project.Targets.CopyTo (t, 0);
t [0].RemoveTask (null);
}
+
+ [Test]
+ public void TestTargetOutputs1 ()
+ {
+ Engine engine;
+ Project project;
+
+ string documentString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <fruit Include=""apple""/>
+ <fruit Include=""rhubarb""/>
+ <fruit Include=""apricot""/>
+ </ItemGroup>
+
+ <Target Name=""Main"">
+ <CallTarget Targets=""foo"">
+ <Output TaskParameter=""TargetOutputs"" ItemName=""AllOut""/>
+ </CallTarget>
+
+ <CallTarget Targets=""foo"">
+ <Output TaskParameter=""TargetOutputs"" ItemName=""AllOut""/>
+ </CallTarget>
+ <Message Text=""AllOut: @(AllOut)""/>
+ </Target>
+
+ <Target Name=""foo"" Outputs=""@(FooItem)"">
+ <Message Text=""foo called""/>
+ <CreateItem Include=""%(fruit.Identity)"">
+ <Output TaskParameter=""Include"" ItemName=""FooItem""/>
+ </CreateItem>
+ <Message Text=""FooItem: @(FooItem)""/>
+ </Target>
+ </Project>";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+
+ bool result = project.Build ("Main");
+ if (!result) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ try {
+ Assert.AreEqual (3, logger.NormalMessageCount, "Expected number of messages");
+ logger.CheckLoggedMessageHead ("foo called", "A1");
+ logger.CheckLoggedMessageHead ("FooItem: apple;rhubarb;apricot", "A2");
+ logger.CheckLoggedMessageHead ("AllOut: apple;rhubarb;apricot;apple;rhubarb;apricot", "A3");
+ Assert.AreEqual (0, logger.NormalMessageCount, "Extra messages found");
+
+ Assert.AreEqual (2, logger.TargetStarted, "TargetStarted count");
+ Assert.AreEqual (2, logger.TargetFinished, "TargetFinished count");
+ Assert.AreEqual (8, logger.TaskStarted, "TaskStarted count");
+ Assert.AreEqual (8, logger.TaskFinished, "TaskFinished count");
+
+ } catch (AssertionException) {
+ logger.DumpMessages ();
+ throw;
+ }
+ }
+
+ [Test]
+ public void TestTargetOutputsIncludingMetadata ()
+ {
+ Engine engine;
+ Project project;
+
+ string documentString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <fruit Include=""apple""><md>a</md></fruit>
+ <fruit Include=""rhubarb""><md>b</md></fruit>
+ <fruit Include=""apricot""><md>c</md></fruit>
+ </ItemGroup>
+
+ <Target Name=""Main"">
+ <CallTarget Targets=""foo"">
+ <Output TaskParameter=""TargetOutputs"" ItemName=""AllOut""/>
+ </CallTarget>
+
+ <CallTarget Targets=""foo"">
+ <Output TaskParameter=""TargetOutputs"" ItemName=""AllOut""/>
+ </CallTarget>
+ <Message Text=""AllOut: @(AllOut) metadata: %(AllOut.md)""/>
+ </Target>
+
+ <Target Name=""foo"" Outputs=""@(FooItem)"">
+ <Message Text=""foo called""/>
+ <CreateItem Include=""@(fruit)"">
+ <Output TaskParameter=""Include"" ItemName=""FooItem""/>
+ </CreateItem>
+ <Message Text=""FooItem: @(FooItem) metadata: %(FooItem.md)""/>
+ </Target>
+ </Project>";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+
+ bool result = project.Build ("Main");
+ if (!result) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ try {
+ logger.CheckLoggedMessageHead ("foo called", "A1");
+ logger.CheckLoggedMessageHead ("FooItem: apple metadata: a", "A2");
+ logger.CheckLoggedMessageHead ("FooItem: rhubarb metadata: b", "A3");
+ logger.CheckLoggedMessageHead ("FooItem: apricot metadata: c", "A4");
+
+ logger.CheckLoggedMessageHead ("AllOut: apple;apple metadata: a", "A5");
+ logger.CheckLoggedMessageHead ("AllOut: rhubarb;rhubarb metadata: b", "A6");
+ logger.CheckLoggedMessageHead ("AllOut: apricot;apricot metadata: c", "A7");
+
+ Assert.AreEqual (0, logger.NormalMessageCount, "Extra messages found");
+
+ Assert.AreEqual (2, logger.TargetStarted, "TargetStarted count");
+ Assert.AreEqual (2, logger.TargetFinished, "TargetFinished count");
+ Assert.AreEqual (10, logger.TaskStarted, "TaskStarted count");
+ Assert.AreEqual (10, logger.TaskFinished, "TaskFinished count");
+
+ } catch (AssertionException) {
+ logger.DumpMessages ();
+ throw;
+ }
+ }
+
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/UsingTaskTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/UsingTaskTest.cs
index 85c845c..4c62d41 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/UsingTaskTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/UsingTaskTest.cs
@@ -127,8 +127,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
}
[Test]
- [ExpectedException (typeof (InvalidProjectFileException),
- "The required attribute \"TaskName\" is missing from element <UsingTask>. ")]
+ [ExpectedException (typeof (InvalidProjectFileException))]
public void TestTaskName ()
{
string documentString = @"
@@ -145,8 +144,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
}
[Test]
- [ExpectedException (typeof (InvalidProjectFileException),
- "A <UsingTask> element must contain either the \"AssemblyName\" attribute or the \"AssemblyFile\" attribute (but not both). ")]
+ [ExpectedException (typeof (InvalidProjectFileException))]
public void TestAssemblyNameOrAssemblyFile1 ()
{
string documentString = @"
@@ -163,8 +161,29 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
}
[Test]
- [ExpectedException (typeof (InvalidProjectFileException),
- "A <UsingTask> element must contain either the \"AssemblyName\" attribute or the \"AssemblyFile\" attribute (but not both). ")]
+ public void TestAssemblyNameOrAssemblyFileConditionFalse ()
+ {
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask
+ TaskName='SimpleTask'
+ Condition='false'
+ />
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ try {
+ project.LoadXml (documentString);
+ } catch (InvalidProjectFileException) {
+ return;
+ }
+ Assert.Fail ("Project load should've failed");
+ }
+
+ [Test]
+ [ExpectedException (typeof (InvalidProjectFileException))]
public void TestAssemblyNameOrAssemblyFile2 ()
{
string documentString = @"
@@ -181,5 +200,182 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
project = engine.CreateNewProject ();
project.LoadXml (documentString);
}
+
+ [Test]
+ public void TestDuplicate1 ()
+ {
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask
+ AssemblyFile='Test/resources/TestTasks.dll'
+ TaskName='TrueTestTask'
+ />
+ <UsingTask
+ AssemblyFile='Test/resources/TestTasks.dll'
+ TaskName='TrueTestTask'
+ />
+
+ <Target Name='1'>
+ <TrueTestTask/>
+ </Target>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+
+ project.LoadXml (documentString);
+
+ if (!project.Build ("1")) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ Assert.AreEqual (2, project.UsingTasks.Count, "A0");
+
+ foreach (UsingTask ut in project.UsingTasks) {
+ Assert.AreEqual ("Test/resources/TestTasks.dll", ut.AssemblyFile, "A1");
+ Assert.IsNull (ut.AssemblyName, "A2");
+ Assert.AreEqual (null, ut.Condition, "A3");
+ Assert.AreEqual (false, ut.IsImported, "A4");
+ Assert.AreEqual ("TrueTestTask", ut.TaskName, "A5");
+ }
+ }
+
+
+ [Test]
+ public void TestLazyLoad1 ()
+ {
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask
+ AssemblyFile='NonExistantAssembly.dll'
+ TaskName='SimpleTask'
+ />
+ <Target Name='1'>
+ <Message Text='hello'/>
+ </Target>
+ <Target Name='2'>
+ <SimpleTask Foo='bar'/>
+ </Target>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+
+ project.LoadXml (documentString);
+
+ if (!project.Build ("1")) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ if (project.Build ("2"))
+ Assert.Fail ("Build should've failed, as a task from a nonexistant assembly is referenced");
+
+
+ IEnumerator en = project.UsingTasks.GetEnumerator ();
+ en.MoveNext ();
+
+ UsingTask ut = (UsingTask) en.Current;
+
+ Assert.AreEqual ("NonExistantAssembly.dll", ut.AssemblyFile, "A1");
+ Assert.IsNull (ut.AssemblyName, "A2");
+ Assert.AreEqual (null, ut.Condition, "A3");
+ Assert.AreEqual (false, ut.IsImported, "A4");
+ Assert.AreEqual ("SimpleTask", ut.TaskName, "A5");
+ }
+
+ [Test]
+ public void TestLazyLoad2 ()
+ {
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask
+ AssemblyFile='Test/resources/TestTasks.dll'
+ TaskName='Another.SameTask'
+ />
+ <UsingTask
+ AssemblyFile='Test/resources/TestTasks.dll'
+ TaskName='Other.SameTask'
+ />
+
+ <Target Name='1'>
+ <Other.SameTask>
+ <Output TaskParameter='OutputString' ItemName='I0'/>
+ </Other.SameTask>
+ <Another.SameTask>
+ <Output TaskParameter='OutputString' ItemName='I1'/>
+ </Another.SameTask>
+ <Message Text='I0: @(I0) I1: @(I1)'/>
+ </Target>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+
+ project.LoadXml (documentString);
+
+ if (!project.Build ("1")) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ logger.CheckLoggedMessageHead ("I0: Other.SameTask I1: Another.SameTask", "A1");
+ }
+
+ [Test]
+ public void TestLazyLoad3 ()
+ {
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <UsingTask
+ AssemblyFile='Test/resources/TestTasks.dll'
+ TaskName='Another.SameTask'
+ Condition='false'
+ />
+
+ <Target Name='1'>
+ <Another.SameTask />
+ </Target>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ MonoTests.Microsoft.Build.Tasks.TestMessageLogger logger =
+ new MonoTests.Microsoft.Build.Tasks.TestMessageLogger ();
+ engine.RegisterLogger (logger);
+
+ project.LoadXml (documentString);
+
+ IEnumerator en = project.UsingTasks.GetEnumerator ();
+ en.MoveNext ();
+
+ UsingTask ut = (UsingTask) en.Current;
+
+ Assert.AreEqual ("Test/resources/TestTasks.dll", ut.AssemblyFile, "A1");
+ Assert.IsNull (ut.AssemblyName, "A2");
+ Assert.AreEqual ("false", ut.Condition, "A3");
+ Assert.AreEqual (false, ut.IsImported, "A4");
+ Assert.AreEqual ("Another.SameTask", ut.TaskName, "A5");
+
+ if (project.Build ("1")) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build should've failed");
+ }
+ }
+
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/resources/TestTasks.cs b/mcs/class/Microsoft.Build.Engine/Test/resources/TestTasks.cs
index 2c235aa..46b032f 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/resources/TestTasks.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/resources/TestTasks.cs
@@ -29,6 +29,23 @@ using System;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
+namespace Foo
+{
+ public class NamespacedOutputTestTask : Task
+ {
+ public override bool Execute()
+ {
+ return true;
+ }
+
+ [Output]
+ public string Property
+ {
+ get { return "some_text"; }
+ }
+ }
+}
+
public class OutputTestTask : Task {
public override bool Execute ()
{
@@ -41,18 +58,94 @@ public class OutputTestTask : Task {
}
}
-public class RequiredTestTask : Task {
+public class RequiredTestTask_TaskItems : Task {
+ string output;
public override bool Execute ()
{
+ output = items == null ? "null" : "count: " + items.Length.ToString ();
return true;
}
- string property;
+ ITaskItem [] items;
+ [Required]
+ public ITaskItem[] Property {
+ set { items = value; }
+ }
+
+ [Output]
+ public string Output
+ {
+ get { return output; }
+ }
+}
+
+public class RequiredTestTask_TaskItem : Task
+{
+ string output;
+ public override bool Execute ()
+ {
+ output = item == null ? "null" : "not null: " + item.ItemSpec;
+ return true;
+ }
+ ITaskItem item;
[Required]
- public string Property {
+ public ITaskItem Property
+ {
+ set { item = value; }
+ }
+
+ [Output]
+ public string Output
+ {
+ get { return output; }
+ }
+}
+
+public class RequiredTestTask_String : Task
+{
+ string output;
+ public override bool Execute ()
+ {
+ output = property == null ? "null" : property.Length.ToString ();
+ return true;
+ }
+
+ string property;
+ [Required]
+ public string Property
+ {
set { property = value; }
}
+
+ [Output]
+ public string Output
+ {
+ get { return output; }
+ }
+}
+
+public class RequiredTestTask_IntArray: Task
+{
+ string output;
+ public override bool Execute ()
+ {
+ output = items == null ? "null" : "count: " + items.Length.ToString ();
+ return true;
+ }
+
+ int[] items;
+ [Required]
+ public int[] Property
+ {
+ set { items = value; }
+ }
+
+ [Output]
+ public string Output
+ {
+ get { return output; }
+ }
}
@@ -193,5 +286,50 @@ public class BatchingTestTask : Task
{
get { return strings; }
}
+
+ [Output]
+ public ITaskItem [] TaskItemsOutput
+ {
+ get { return sources; }
+ set { sources = value; }
+ }
+}
+
+namespace Another
+{
+ public class SameTask : Task
+ {
+ string output;
+ public override bool Execute ()
+ {
+ output = "Another.SameTask";
+ return true;
+ }
+
+ [Output]
+ public string OutputString
+ {
+ get { return output; }
+ }
+ }
+}
+
+namespace Other
+{
+ public class SameTask : Task
+ {
+ string output;
+ public override bool Execute ()
+ {
+ output = "Other.SameTask";
+ return true;
+ }
+
+ [Output]
+ public string OutputString
+ {
+ get { return output; }
+ }
+ }
}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/ChangeLog b/mcs/class/Microsoft.Build.Engine/Test/various/ChangeLog
index a594b2b..0a2badb 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/various/ChangeLog
+++ b/mcs/class/Microsoft.Build.Engine/Test/various/ChangeLog
@@ -1,3 +1,28 @@
+2009-06-12 Ankit Jain <jankit at novell.com>
+
+ * Items.cs (TestItemsInTarget3a): Add another case for valid whitespace
+ around an item ref.
+
+2009-05-29 Ankit Jain <jankit at novell.com>
+
+ * Conditions.cs (TestHasTrailingSlash1): New.
+ (TestUnknownFunction): New.
+
+2009-05-15 Marek Sieradzki <marek.sieradzki at gmail.com>
+
+ * Items.cs
+ * Conditions.cs: Don't check exception messages.
+
+2009-02-23 Ankit Jain <jankit at novell.com>
+
+ * Items.cs (TestItemsInTarget8): New.
+ (TestItemsInTarget9): New.
+
+2009-02-20 Ankit Jain <jankit at novell.com>
+
+ * Conditions.cs (TestCondition11): New. Test unquoted item/property
+ references in conditions.
+
2009-01-01 Ankit Jain <jankit at novell.com>
* Items.cs: Add tests for expression parsing, mainly for concat'ing
diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs b/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs
index 4292ff5..47ef21d 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs
@@ -309,6 +309,82 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
Assert.IsNotNull (proj.EvaluatedProperties ["D"], "A4");
Assert.IsNotNull (proj.EvaluatedProperties ["E"], "A5");
}
+ [Test]
+ public void TestCondition11 ()
+ {
+ Engine engine = new Engine (Consts.BinPath);
+ Project proj = engine.CreateNewProject ();
+ string documentString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup>
+ <FooProp>true</FooProp>
+ </PropertyGroup>
+ <ItemGroup>
+ <FooList Include=""abc.exe""/>
+ <List1 Include=""fr_a.txt"" Condition="" $(FooProp) == 'true'"" />
+ <List1 Include=""fr_b.txt"" Condition="" '@(FooList->'%(Extension)a(foo', ',')' == '.exea(foo'"" />
+ <List1 Include=""fr_c.txt"" Condition="" @(FooList -> '%(Extension)', ',') == '.exe'"" />
+ </ItemGroup>
+</Project>";
+
+ proj.LoadXml (documentString);
+
+ BuildItemGroup bgp = proj.GetEvaluatedItemsByName ("List1");
+ Assert.IsNotNull (bgp, "Expected values in List1");
+ Assert.AreEqual (3, bgp.Count, "A1");
+ Assert.AreEqual ("fr_a.txt", bgp [0].FinalItemSpec, "A2");
+ Assert.AreEqual ("fr_b.txt", bgp [1].FinalItemSpec, "A3");
+ Assert.AreEqual ("fr_c.txt", bgp [2].FinalItemSpec, "A4");
+ }
+
+ [Test]
+ public void TestHasTrailingSlash1 ()
+ {
+ Engine engine = new Engine (Consts.BinPath);
+ Project proj = engine.CreateNewProject ();
+
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup>
+ <EmptyProp></EmptyProp>
+ <WithTrailingBackSlash>foo\ </WithTrailingBackSlash>
+ <WithTrailingFwdSlash>foo/ </WithTrailingFwdSlash>
+ <NoTrailing>Foo</NoTrailing>
+
+ <A Condition="" HasTrailingSlash('$(EmptyProp)') ""></A>
+ <B Condition="" HasTrailingSlash('$(WithTrailingBackSlash)') ""></B>
+ <C Condition="" HasTrailingSlash('$(WithTrailingFwdSlash)') ""></C>
+ <D Condition="" HasTrailingSlash('$(NoTrailing)') ""></D>
+ <E Condition="" HasTrailingSlash('$(NonExistant)') ""></E>
+ </PropertyGroup>
+ </Project>
+ ";
+
+ proj.LoadXml (documentString);
+
+ Assert.IsNull (proj.EvaluatedProperties ["A"], "A1");
+ Assert.IsNotNull (proj.EvaluatedProperties ["B"], "A2");
+ Assert.IsNotNull (proj.EvaluatedProperties ["C"], "A3");
+ Assert.IsNull (proj.EvaluatedProperties ["D"], "A4");
+ Assert.IsNull (proj.EvaluatedProperties ["E"], "A5");
+ }
+
+ [Test]
+ [ExpectedException (typeof (InvalidProjectFileException))]
+ public void TestUnknownFunction ()
+ {
+ Engine engine = new Engine (Consts.BinPath);
+ Project proj = engine.CreateNewProject ();
+
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup>
+ <A Condition="" NonExistantFunction('$(EmptyProp)') ""></A>
+ </PropertyGroup>
+ </Project>
+ ";
+
+ proj.LoadXml (documentString);
+ }
[Test]
[ExpectedException (typeof (InvalidProjectFileException))]
@@ -328,9 +404,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
proj.LoadXml (documentString);
}
+ // A reference to an item list at position 1 is not allowed in this condition "@(A)".
[Test]
- [ExpectedException (typeof (InvalidProjectFileException),
- "A reference to an item list at position 1 is not allowed in this condition \"@(A)\". ")]
+ [ExpectedException (typeof (InvalidProjectFileException))]
[Category ("NotWorking")]
public void TestIncorrectCondition2 ()
{
@@ -348,9 +424,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
proj.LoadXml (documentString);
}
+ // Found an unexpected character '%' at position 0 in condition \%(A)\.
[Test]
- [ExpectedException (typeof (InvalidProjectFileException),
- "Found an unexpected character '%' at position 0 in condition \"%(A)\". ")]
+ [ExpectedException (typeof (InvalidProjectFileException))]
[Category ("NotWorking")]
public void TestIncorrectCondition3 ()
{
@@ -368,9 +444,9 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
proj.LoadXml (documentString);
}
+ // Found an unexpected character '%' at position 0 in condition "%(A)\.
[Test]
- [ExpectedException (typeof (InvalidProjectFileException),
- "Found an unexpected character '%' at position 0 in condition \"%(A)\". ")]
+ [ExpectedException (typeof (InvalidProjectFileException))]
[Category ("NotWorking")]
public void TestIncorrectCondition4 ()
{
diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs b/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs
index 1877a8f..1531142 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs
@@ -237,11 +237,11 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
CheckItems (proj, "Item7", "A6", "A", "B", "C");
}
+ // The expression "@(Item1, '@(A,'')')" cannot be used in this context.
+ // Item lists cannot be concatenated with other strings where an item list is expected.
+ // Use a semicolon to separate multiple item lists.
[Test]
- [ExpectedException (typeof (InvalidProjectFileException),
- "The expression \"@(Item1, '@(A,'')')\" cannot be used in this context. " +
- "Item lists cannot be concatenated with other strings where an item list is expected. " +
- "Use a semicolon to separate multiple item lists. ")]
+ [ExpectedException (typeof (InvalidProjectFileException))]
[Category ("NotWorking")]
public void TestItems7 ()
{
@@ -260,11 +260,11 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
proj.LoadXml (documentString);
}
+ // The expression "@(Item1, '@(A->'')')" cannot be used in this context.
+ // Item lists cannot be concatenated with other strings where an item list is expected.
+ // Use a semicolon to separate multiple item lists.
[Test]
- [ExpectedException (typeof (InvalidProjectFileException),
- "The expression \"@(Item1, '@(A->'')')\" cannot be used in this context. " +
- "Item lists cannot be concatenated with other strings where an item list is expected. " +
- "Use a semicolon to separate multiple item lists. ")]
+ [ExpectedException (typeof (InvalidProjectFileException))]
[Category ("NotWorking")]
public void TestItems8 ()
{
@@ -283,11 +283,11 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
proj.LoadXml (documentString);
}
+ // The expression "@(Item1, '@(A->'','')')" cannot be used in this context.
+ // Item lists cannot be concatenated with other strings where an item list is expected.
+ // Use a semicolon to separate multiple item lists.
[Test]
- [ExpectedException (typeof (InvalidProjectFileException),
- "The expression \"@(Item1, '@(A->'','')')\" cannot be used in this context. " +
- "Item lists cannot be concatenated with other strings where an item list is expected. " +
- "Use a semicolon to separate multiple item lists. ")]
+ [ExpectedException (typeof (InvalidProjectFileException))]
[Category ("NotWorking")]
public void TestItems9 ()
{
@@ -459,6 +459,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
" $(C) Foo $(C) Bar ; $(B) ",
"@(A);$(C)",
"@(A);A;B;C",
+ " abc; @(A) ; $(C) ;foo",
}) + "</Project>";
@@ -473,6 +474,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
CheckItems (proj, "I5", "A5", "A", "Foo A", "Bar", "A", "B");
CheckItems (proj, "I6", "A6", "A", "B", "C", "A");
CheckItems (proj, "I7", "A7", "A", "B", "C", "A", "B", "C");
+ CheckItems (proj, "I8", "A8", "abc", "A", "B", "C", "A", "foo");
}
[Test]
@@ -804,5 +806,79 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
Assert.IsFalse (proj.Build ("1"));
}
+ [Test]
+ public void TestItemsInTarget8 ()
+ {
+ Engine engine = new Engine (Consts.BinPath);
+ Project proj = engine.CreateNewProject ();
+
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup>
+ <Foo>Five</Foo>
+ </PropertyGroup>
+ <ItemGroup>
+ <A Include='A'>
+ <M>True</M>
+ <M>False</M>
+ </A>
+ </ItemGroup>
+ </Project>
+ ";
+
+ proj.LoadXml (documentString);
+
+ Assert.AreEqual (1, proj.EvaluatedItems.Count, "A1");
+ BuildItem bi = proj.EvaluatedItems [0];
+ Assert.AreEqual ("False", bi.GetMetadata ("M"), "A2");
+ }
+
+
+ [Test]
+ public void TestItemsInTarget9 ()
+ {
+ Engine engine = new Engine (Consts.BinPath);
+ Project proj = engine.CreateNewProject ();
+
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup>
+ <Foo>Five</Foo>
+ </PropertyGroup>
+ <ItemGroup>
+ <A Include='A'>
+ <M Condition="" '$(Foo)' == 'Five' "">True</M>
+ <M Condition="" '$(Foo)' != 'Five' "">False</M>
+ </A>
+ </ItemGroup>
+ </Project>
+ ";
+
+ proj.LoadXml (documentString);
+
+ Assert.AreEqual (1, proj.EvaluatedItems.Count, "A1");
+ BuildItem bi = proj.EvaluatedItems [0];
+ Assert.AreEqual ("True", bi.GetMetadata ("M"), "A2");
+ Assert.AreEqual (0, bi.Condition.Length, "A3");
+
+ BuildItemGroup big = proj.GetEvaluatedItemsByNameIgnoringCondition ("A");
+ Assert.AreEqual (1, big.Count, "A4");
+ bi = big [0];
+ Assert.AreEqual ("True", bi.GetMetadata ("M"), "A5");
+ Assert.AreEqual ("True", bi.GetEvaluatedMetadata ("M"), "A6");
+
+ /*proj.SetProperty ("Foo", "Six");
+ proj.Build ();
+ bi = proj.GetEvaluatedItemsByName ("A") [0];
+ Assert.AreEqual ("False", bi.GetMetadata ("M"), "A7");
+ Assert.AreEqual ("False", bi.GetEvaluatedMetadata ("M"), "A7a");
+ Assert.AreEqual (0, bi.Condition.Length, "A8");
+
+ big = proj.GetEvaluatedItemsByNameIgnoringCondition ("A");
+ Assert.AreEqual (1, big.Count, "A9");
+ bi = big [0];
+ Assert.AreEqual ("True", bi.GetMetadata ("M"), "A10");
+ Assert.AreEqual ("True", bi.GetEvaluatedMetadata ("M"), "A11");*/
+ }
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/ChangeLog b/mcs/class/Microsoft.Build.Tasks/ChangeLog
index 72db0fb..7f4876d 100644
--- a/mcs/class/Microsoft.Build.Tasks/ChangeLog
+++ b/mcs/class/Microsoft.Build.Tasks/ChangeLog
@@ -1,3 +1,33 @@
+2009-06-08 Ankit Jain <jankit at novell.com>
+
+ * Microsoft.Build.Tasks_test.dll.sources: Added
+ ResolvedReference.cs
+
+2009-05-14 Ankit Jain <jankit at novell.com>
+
+ Fix tests on monobuild
+ * Makefile (EXTRA_DISTFILES): Add Test/resources/Sample.vb
+
+2009-04-28 Raja R Harinath <harinath at hurrynot.org>
+
+ * Makefile (NAME_SUFFIX): New.
+ (LIBRARY_NAME): Use it.
+ (TEST_MCS_FLAGS): Don't mention name of library. Use NAME_SUFFIX
+ as appropriate when referring to other msbuild dlls.
+
+2009-04-27 Ankit Jain <jankit at novell.com>
+
+ * Microsoft.Build.Tasks_test.dll.sources: Added
+ CreateVisualBasicManifestResourceNameTest.cs .
+
+2009-04-25 Jonathan Chambers <joncham at gmail.com>
+
+ * Makefile: Adjust assembly name for 3.5 profile.
+
+2009-02-21 Ankit Jain <jankit at novell.com>
+
+ * Microsoft.Build.Tasks_test.dll.sources: Added CopyTest.cs
+
2009-01-06 Ankit Jain <jankit at novell.com>
* Makefile (EXTRA_DISTFILES): Add Test/resources/Sample.cs
diff --git a/mcs/class/Microsoft.Build.Tasks/Makefile b/mcs/class/Microsoft.Build.Tasks/Makefile
index 868ee75..52daa81 100644
--- a/mcs/class/Microsoft.Build.Tasks/Makefile
+++ b/mcs/class/Microsoft.Build.Tasks/Makefile
@@ -4,16 +4,26 @@ include ../../build/rules.make
LIBRARY = Microsoft.Build.Tasks.dll
ifeq (1.0, $(FRAMEWORK_VERSION))
+
LIBRARY_NAME = dummy-Microsoft.Build.Tasks.dll
NO_INSTALL = yes
NO_TEST = yes
NO_SIGN_ASSEMBLY = yes
+
+else
+
+ifeq (3.5, $(FRAMEWORK_VERSION))
+NAME_SUFFIX = .v3.5
+endif
+
+LIBRARY_NAME = Microsoft.Build.Tasks$(NAME_SUFFIX).dll
+
endif
LIB_MCS_FLAGS = \
/r:$(corlib) \
/r:System.dll \
- /r:System.Xml.dll \
+ /r:System.Xml.dll \
/r:System.Windows.Forms.dll \
/r:Microsoft.Build.Utilities.dll \
/r:Microsoft.Build.Framework.dll
@@ -21,10 +31,12 @@ LIB_MCS_FLAGS = \
TEST_MCS_FLAGS = \
/r:Microsoft.Build.Engine.dll \
/r:Microsoft.Build.Framework.dll \
- /r:Microsoft.Build.Tasks.dll \
- /r:Microsoft.Build.Utilities.dll
+ /r:Microsoft.Build.Utilities$(NAME_SUFFIX).dll
-EXTRA_DISTFILES = Test/resources/test.cs Test/resources/Sample.cs
+EXTRA_DISTFILES = \
+ Test/resources/test.cs \
+ Test/resources/Sample.cs \
+ Test/resources/Sample.vb
test-local: Test/resources/test.dll
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.dll.sources b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.dll.sources
index b8c5bc7..904e29b 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.dll.sources
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.dll.sources
@@ -89,6 +89,7 @@ Microsoft.Build.Tasks/RegisterAssembly.cs
Microsoft.Build.Tasks/RemoveDir.cs
Microsoft.Build.Tasks/RemoveDuplicates.cs
Microsoft.Build.Tasks/ResolveAssemblyReference.cs
+Microsoft.Build.Tasks/ResolvedReference.cs
Microsoft.Build.Tasks/ResolveManifestFiles.cs
Microsoft.Build.Tasks/ResolveProjectBase.cs
Microsoft.Build.Tasks/SGen.cs
@@ -99,6 +100,7 @@ Microsoft.Build.Tasks/ToolTaskExtension.cs
Microsoft.Build.Tasks/Touch.cs
Microsoft.Build.Tasks/UnregisterAssembly.cs
Microsoft.Build.Tasks/UpdateManifest.cs
+Microsoft.Build.Tasks/Utilities.cs
Microsoft.Build.Tasks/Vbc.cs
Microsoft.Build.Tasks/VCBuild.cs
Microsoft.Build.Tasks/Warning.cs
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AL.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AL.cs
index 38e0594..56925f4 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AL.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AL.cs
@@ -95,15 +95,7 @@ namespace Microsoft.Build.Tasks {
public override bool Execute ()
{
- CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();
- AddResponseFileCommands (clbe);
-
- alProcess = new Process ();
- alProcess.StartInfo.Arguments = clbe.ToString ();
- alProcess.StartInfo.FileName = GenerateFullPathToTool ();
- alProcess.Start ();
- alProcess.WaitForExit ();
- return true;
+ return base.Execute ();
}
protected override string GenerateFullPathToTool ()
@@ -245,7 +237,7 @@ namespace Microsoft.Build.Tasks {
protected override string ToolName {
get {
- return "al";
+ return Utilities.RunningOnWindows ? "al.bat" : "al";
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AspNetCompiler.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AspNetCompiler.cs
index 9a1b36b..9f4da84 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AspNetCompiler.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AspNetCompiler.cs
@@ -142,9 +142,9 @@ namespace Microsoft.Build.Tasks {
}
protected override string ToolName {
- get { return "aspnet_compiler"; }
+ get { return Utilities.RunningOnWindows ? "aspnet_compiler.bat" : "aspnet_compiler"; }
}
}
}
-#endif
\ No newline at end of file
+#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs
index 01cdebd..5c52877 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs
@@ -3,8 +3,10 @@
//
// Author:
// Marek Sieradzki (marek.sieradzki at gmail.com)
+// Ankit Jain (jankit at novell.com)
//
// (C) 2006 Marek Sieradzki
+// Copyright 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -39,16 +41,28 @@ namespace Microsoft.Build.Tasks {
internal class AssemblyResolver {
// name -> (version -> assemblypath)
- Dictionary <string, Dictionary <Version, string>> gac;
+ Dictionary<string, TargetFrameworkAssemblies> target_framework_cache;
+ Dictionary<string, Dictionary<Version, string>> gac;
TaskLoggingHelper log;
+ StringWriter sw;
public AssemblyResolver ()
{
- gac = new Dictionary <string, Dictionary <Version, string>> ();
+ gac = new Dictionary<string, Dictionary<Version, string>> ();
+ target_framework_cache = new Dictionary <string, TargetFrameworkAssemblies> ();
GatherGacAssemblies ();
}
+ public StringWriter SearchLogger {
+ get { return sw; }
+ }
+
+ public void ResetSearchLogger ()
+ {
+ sw = new StringWriter ();
+ }
+
string GetGacPath ()
{
// NOTE: code from mcs/tools/gacutil/driver.cs
@@ -80,79 +94,167 @@ namespace Microsoft.Build.Tasks {
version = new Version (version_info.Name.Split (
new char [] {'_'}, StringSplitOptions.RemoveEmptyEntries) [0]);
- if (!gac.ContainsKey (assembly_info.Name))
- gac.Add (assembly_info.Name, new Dictionary <Version, string> ());
- gac [assembly_info.Name].Add (version, file);
+ Dictionary<Version, string> assembliesByVersion = new Dictionary <Version, string> ();
+ if (!gac.TryGetValue (assembly_info.Name, out assembliesByVersion)) {
+ assembliesByVersion = new Dictionary <Version, string> ();
+ gac.Add (assembly_info.Name, assembliesByVersion);
+ }
+
+ string found_file;
+ if (assembliesByVersion.TryGetValue (version, out found_file) &&
+ File.GetLastWriteTime (file) <= File.GetLastWriteTime (found_file))
+ // Duplicate found, take the newer file
+ continue;
+
+ assembliesByVersion [version] = file;
}
}
}
}
- public string ResolveAssemblyReference (ITaskItem reference)
+ public ResolvedReference FindInTargetFramework (ITaskItem reference, string framework_dir, bool specific_version)
{
- AssemblyName name = null;
- string resolved = null;
-
- name = new AssemblyName (reference.ItemSpec);
+ AssemblyName key_aname = new AssemblyName (reference.ItemSpec);
+ TargetFrameworkAssemblies gac_asm;
+ if (!target_framework_cache.TryGetValue (framework_dir, out gac_asm)) {
+ // fill gac_asm
+ gac_asm = target_framework_cache [framework_dir] = PopulateTargetFrameworkAssemblies (framework_dir);
+ }
- if (reference.GetMetadata ("HintPath") != String.Empty) {
+ KeyValuePair<AssemblyName, string> pair;
+ if (gac_asm.NameToAssemblyNameCache.TryGetValue (key_aname.Name, out pair)) {
+ if (AssemblyNamesCompatible (key_aname, pair.Key, specific_version)) {
+ // gac and tgt frmwk refs are not copied private
+ return GetResolvedReference (reference, pair.Value, false,
+ SearchPath.TargetFrameworkDirectory);
+ }
- bool specificVersion;
+ SearchLogger.WriteLine ("Considered target framework dir {0}, assembly name '{1}' did not " +
+ "match the expected '{2}' (SpecificVersion={3})",
+ framework_dir, pair.Key, key_aname, specific_version);
+ } else {
+ SearchLogger.WriteLine ("Considered target framework dir {0}, assembly named '{1}' not found.",
+ framework_dir, key_aname.Name);
+ }
+ return null;
+ }
- if (reference.GetMetadata ("SpecificVersion") != String.Empty) {
- specificVersion = Boolean.Parse (reference.GetMetadata ("SpecificVersion"));
- } else {
- specificVersion = IsStrongNamed (name);
+ public ResolvedReference FindInDirectory (ITaskItem reference, string directory, string [] file_extensions)
+ {
+ if (reference.ItemSpec.IndexOf (',') > 0) {
+ // Probably an assembly name
+ AssemblyName key_aname = new AssemblyName (reference.ItemSpec);
+ foreach (string extn in file_extensions) {
+ foreach (string file in Directory.GetFiles (directory, "*" + extn)) {
+ AssemblyName found = AssemblyName.GetAssemblyName (file);
+
+ //FIXME: Extract 'name' and look only for name.dll name.exe ?
+ if (AssemblyNamesCompatible (key_aname, found, false))
+ return GetResolvedReference (reference, file, true, SearchPath.Directory);
+
+ SearchLogger.WriteLine ("Considered {0}, but assembly name wasn't compatible.", file);
+ }
}
-
- resolved = ResolveHintPathReference (name, reference.GetMetadata ("HintPath"), specificVersion);
+ } else {
+ // Try as a filename
+ string path = Path.Combine (directory, reference.ItemSpec);
+ if (GetAssemblyNameFromFile (path) != null)
+ return GetResolvedReference (reference, path, true, SearchPath.Directory);
}
-
- if (resolved == null)
- resolved = ResolveGacReference (name, gac);
- return resolved;
+ return null;
}
- string ResolveGacReference (AssemblyName name, Dictionary <string, Dictionary <Version, string>> dic)
+ TargetFrameworkAssemblies PopulateTargetFrameworkAssemblies (string directory)
{
- // FIXME: deal with SpecificVersion=False
+ TargetFrameworkAssemblies gac_asm = new TargetFrameworkAssemblies (directory);
+ foreach (string file in Directory.GetFiles (directory, "*.dll")) {
+ AssemblyName aname = AssemblyName.GetAssemblyName (file);
+ gac_asm.NameToAssemblyNameCache [aname.Name] =
+ new KeyValuePair<AssemblyName, string> (aname, file);
+ }
- if (!dic.ContainsKey (name.Name))
+ return gac_asm;
+ }
+
+ public ResolvedReference ResolveGacReference (ITaskItem reference, bool specific_version)
+ {
+ AssemblyName name = new AssemblyName (reference.ItemSpec);
+ if (!gac.ContainsKey (name.Name)) {
+ SearchLogger.WriteLine ("Considered {0}, but could not find in the GAC.",
+ reference.ItemSpec);
return null;
+ }
if (name.Version != null) {
- if (!dic [name.Name].ContainsKey (name.Version))
+ string ret;
+ if (gac [name.Name].TryGetValue (name.Version, out ret))
+ return GetResolvedReference (reference, ret, false, SearchPath.Gac);
+
+ // not found
+ if (specific_version) {
+ SearchLogger.WriteLine ("Considered '{0}', but an assembly with the specific version not found.",
+ reference.ItemSpec);
return null;
- else
- return dic [name.Name] [name.Version];
+ }
}
- Version [] versions = new Version [dic [name.Name].Keys.Count];
- dic [name.Name].Keys.CopyTo (versions, 0);
+ Version [] versions = new Version [gac [name.Name].Keys.Count];
+ gac [name.Name].Keys.CopyTo (versions, 0);
Array.Sort (versions, (IComparer <Version>) null);
Version highest = versions [versions.Length - 1];
- return dic [name.Name] [highest];
+ return GetResolvedReference (reference, gac [name.Name] [highest], false, SearchPath.Gac);
}
- string ResolveHintPathReference (AssemblyName name, string hintpath, bool specificVersion)
+ public ResolvedReference ResolveHintPathReference (ITaskItem reference, bool specific_version)
{
- AssemblyName found;
- string ret = null;
+ AssemblyName name = new AssemblyName (reference.ItemSpec);
+ ResolvedReference resolved = null;
+
+ string hintpath = reference.GetMetadata ("HintPath");
+ if (String.IsNullOrEmpty (hintpath)) {
+ SearchLogger.WriteLine ("HintPath attribute not found");
+ return null;
+ }
- if (!File.Exists (hintpath))
+ if (!File.Exists (hintpath)) {
log.LogMessage (MessageImportance.Low, "HintPath {0} does not exist.", hintpath);
+ SearchLogger.WriteLine ("Considered {0}, but it does not exist.", hintpath);
+ return null;
+ }
+ AssemblyName found = GetAssemblyNameFromFile (hintpath);
+ if (found == null) {
+ log.LogMessage (MessageImportance.Low, "File at HintPath {0}, is either an invalid assembly or the file does not exist.", hintpath);
+ return null;
+ }
+
+ if (AssemblyNamesCompatible (name, found, specific_version)) {
+ resolved = GetResolvedReference (reference, hintpath, true, SearchPath.HintPath);
+ } else {
+ SearchLogger.WriteLine ("Considered {0}, but assembly name '{1}' did not match the " +
+ "expected '{2}' (SpecificVersion={3})", hintpath, found, name, specific_version);
+ log.LogMessage (MessageImportance.Low, "Assembly names are not compatible.");
+ }
+
+ return resolved;
+ }
+
+ public AssemblyName GetAssemblyNameFromFile (string filename)
+ {
+ AssemblyName aname = null;
try {
- found = AssemblyName.GetAssemblyName (hintpath);
- if (AssemblyNamesCompatible (name, found, specificVersion))
- ret = hintpath;
- else
- log.LogMessage (MessageImportance.Low, "Assembly names are not compatible.");
- } catch {
+ aname = AssemblyName.GetAssemblyName (filename);
+ } catch (FileNotFoundException) {
+ } catch (BadImageFormatException) {
}
- return ret;
+ if (aname != null)
+ return aname;
+
+ SearchLogger.WriteLine ("Considered '{0}' as a file, but it is either an invalid assembly " +
+ "or file does not exist.", Path.GetFullPath (filename));
+ return null;
}
static bool AssemblyNamesCompatible (AssemblyName a, AssemblyName b, bool specificVersion)
@@ -160,10 +262,10 @@ namespace Microsoft.Build.Tasks {
if (a.Name != b.Name)
return false;
- if (a.CultureInfo != null && a.CultureInfo != b.CultureInfo)
+ if (a.CultureInfo != null && !a.CultureInfo.Equals (b.CultureInfo))
return false;
- if (specificVersion && a.Version != null && a.Version > b.Version)
+ if (specificVersion && a.Version != null && a.Version != b.Version)
return false;
byte [] a_bytes = a.GetPublicKeyToken ();
@@ -183,15 +285,59 @@ namespace Microsoft.Build.Tasks {
return true;
}
- static bool IsStrongNamed (AssemblyName name)
+ public bool IsStrongNamed (AssemblyName name)
+ {
+ return (name.Version != null &&
+ name.GetPublicKeyToken () != null &&
+ name.GetPublicKeyToken ().Length != 0);
+ }
+
+ // FIXME: to get default values of CopyLocal, compare with TargetFrameworkDirectories
+
+ // If metadata 'Private' is present then use that or use @default_value
+ // as the value for CopyLocal
+ internal ResolvedReference GetResolvedReference (ITaskItem reference, string filename,
+ bool default_value, SearchPath search_path)
{
- return (name.Version != null && name.GetPublicKeyToken ().Length != 0);
+ string pvt = reference.GetMetadata ("Private");
+
+ bool copy_local = default_value;
+ if (!String.IsNullOrEmpty (pvt))
+ //FIXME: log a warning for invalid value
+ Boolean.TryParse (pvt, out copy_local);
+
+ return new ResolvedReference (filename, copy_local, search_path);
}
public TaskLoggingHelper Log {
set { log = value; }
}
}
+
+ class TargetFrameworkAssemblies {
+ public string Path;
+
+ // assembly (simple) name -> (AssemblyName, file path)
+ public Dictionary <string, KeyValuePair<AssemblyName, string>> NameToAssemblyNameCache;
+
+ public TargetFrameworkAssemblies (string path)
+ {
+ this.Path = path;
+ NameToAssemblyNameCache = new Dictionary<string, KeyValuePair<AssemblyName, string>> ();
+ }
+ }
+
+ enum SearchPath
+ {
+ Gac,
+ TargetFrameworkDirectory,
+ CandidateAssemblies,
+ HintPath,
+ Directory,
+ RawFileName
+ }
}
+
+
#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssignCulture.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssignCulture.cs
index c279f96..2291b3c 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssignCulture.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssignCulture.cs
@@ -148,8 +148,10 @@ namespace Microsoft.Build.Tasks {
return false;
culture = fname.Substring (culture_dot + 1, last_dot - culture_dot - 1);
- if (!CultureNamesTable.ContainsKey (culture))
+ if (!CultureNamesTable.ContainsKey (culture)) {
+ culture = null;
return false;
+ }
only_filename = fname.Substring (0, culture_dot);
extn = fname.Substring (last_dot + 1);
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssignTargetPath.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssignTargetPath.cs
index 71895fc..29b24e6 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssignTargetPath.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssignTargetPath.cs
@@ -54,9 +54,18 @@ namespace Microsoft.Build.Tasks {
//FIXME: Hack!
string normalized_root = Path.GetFullPath (rootFolder);
+ // cur dir should already be set to
+ // the project dir
+ file = Path.GetFullPath (file);
+
if (file.StartsWith (normalized_root)) {
afile = Path.GetFullPath (file).Substring (
normalized_root.Length);
+ // skip over "root/"
+ if (afile [0] == '\\' ||
+ afile [0] == '/')
+ afile = afile.Substring (1);
+
} else {
afile = Path.GetFileName (file);
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CallTarget.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CallTarget.cs
index 69cf322..874f1c0 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CallTarget.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CallTarget.cs
@@ -29,6 +29,7 @@
using System;
using System.Collections;
+using System.Collections.Generic;
using System.IO;
using Microsoft.Build.Framework;
@@ -36,27 +37,26 @@ namespace Microsoft.Build.Tasks {
public class CallTarget : TaskExtension {
bool runEachTargetSeparately;
- ITaskItem[] targetOutputs;
+ List<ITaskItem> targetOutputs_list;
+ ITaskItem[] targetOutputs_array;
string[] targets;
public CallTarget ()
{
+ targetOutputs_list = new List<ITaskItem> ();
}
[MonoTODO]
public override bool Execute ()
{
Hashtable targets_table = new Hashtable ();
- targetOutputs = new ITaskItem [targets.Length];
if (!RunEachTargetSeparately) {
bool ret = BuildEngine.BuildProjectFile (BuildEngine.ProjectFileOfTaskNode,
targets, null, targets_table);
- int i = 0;
foreach (ITaskItem[] items in targets_table.Values) {
- //FIXME: can a target return multiple taskitems?
- if (items != null && items.Length > 0)
- targetOutputs [i ++] = items [0];
+ if (items != null)
+ targetOutputs_list.AddRange (items);
}
return ret;
@@ -76,9 +76,8 @@ namespace Microsoft.Build.Tasks {
continue;
ITaskItem [] items = (ITaskItem[]) targets_table [target];
- if (items != null && items.Length > 0)
- //FIXME:
- targetOutputs [i] = items [0];
+ if (items != null)
+ targetOutputs_list.AddRange (items);
}
return allPassed;
@@ -91,7 +90,11 @@ namespace Microsoft.Build.Tasks {
[Output]
public ITaskItem[] TargetOutputs {
- get { return targetOutputs; }
+ get {
+ if (targetOutputs_array == null)
+ targetOutputs_array = targetOutputs_list.ToArray ();
+ return targetOutputs_array;
+ }
}
public string[] Targets {
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ChangeLog b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ChangeLog
index 31d5343..f21a4fe 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ChangeLog
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ChangeLog
@@ -1,3 +1,160 @@
+2009-06-12 Ankit Jain <jankit at novell.com>
+
+ * Utilities.cs: New.
+ * AL.cs, AspNetCompiler.cs, Csc.cs,
+ SGen.cs, Vbc.cs (ToolName): Append ".bat" when running
+ on windows.
+
+2009-06-09 Ankit Jain <jankit at novell.com>
+
+ * MSBuild.cs (Execute): Copy metadata from the @Projects items
+ to the target outputs.
+
+2009-06-08 Ankit Jain <jankit at novell.com>
+
+ * ResolvedReference.cs: Add missing file.
+
+2009-06-08 Ankit Jain <jankit at novell.com>
+
+ * AssignCulture.cs (TrySplitResourceName): Reset culture arg to null
+ if returning false.
+ * CreateCSharpManifestResourceName.cs: Set culture to null if the
+ culture was invalid.
+
+2009-06-08 Ankit Jain <jankit at novell.com>
+
+ * ResolvedReference.cs: New.
+ * AssemblyResolver.cs (GetResolvedReference): New. Honor's the
+ 'Private' metadata and sets CopyLocal.
+ (SearchPath): New. Used to track how the reference was resolved.
+ (IsStrongNamed): Fix potential null ref.
+ All the assembly resolution methods now return ResolvedReference
+ instead of strings, to aid in proper CopyLocal behavior and
+ dependency resolution.
+ * ResolveAssemblyReference.cs: Add support for finding related files,
+ satellite files, resolving dependencies, copy local files.
+ Resolve files specified in "AssemblyFiles" param also, used to resolve
+ project references and dependencies.
+
+2009-06-07 Ankit Jain <jankit at novell.com>
+
+ * Csc.cs (AddResponseFileCommands): Split DefineConstants on space also.
+
+2009-06-07 Ankit Jain <jankit at novell.com>
+
+ * AssignTargetPath.cs (Execute): Expand incoming path to absolute
+ path, and correctly extract relative path (skipping over the preceding
+ dir separator).
+
+2009-06-07 Ankit Jain <jankit at novell.com>
+
+ * Copy.cs (CopyFile): Don't copy if the source and dest are the same.
+
+2009-04-27 Ankit Jain <jankit at novell.com>
+
+ * CreateCSharpManifestResourceName.cs (GetResourceIdFromFileName): Move
+ to ..
+ * CreateManifestResourceName.cs: .. here.
+ * CreateVisualBasicManifestResourceName.cs: Implement.
+
+2009-04-27 Ankit Jain <jankit at novell.com>
+
+ * Vbc.cs (AddResponseFileCommands): Escape DefineConstants as it can
+ contain double quotes itself. Fix /doc switch.
+ (EscapeDoubleQuotes): New.
+
+2009-03-22 Daniel Nauck <dna at mono-project.de>
+
+ * GenerateResource.cs: Set BasePath property of
+ ResXResourceReader class.
+ See: http://lists.ximian.com/pipermail/mono-devel-list/2009-March/031459.html
+
+2009-03-19 Ankit Jain <jankit at novell.com>
+
+ Fix bugs #323833 and #484384.
+ * AssemblyResolver.cs (GatherGacAssemblies): Handle duplicate entries.
+ These seem to be old copies of the assemblies with old keys. Pick
+ the one with the latest timestamp.
+
+2009-03-03 Ankit Jain <jankit at novell.com>
+
+ Fix bug #480856.
+ * Csc.cs (AddResponseFileCommands): Split DefineConstants on ';'.
+
+2009-02-26 Ankit Jain <jankit at novell.com>
+
+ * MakeDir.cs (Execute): Don't create+log if dir already exists.
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * AL.cs (Execute): Use ToolTask.Execute instead of doing our own.
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * AssemblyResolver.cs:
+ * ResolveAssemblyReference.cs: Honor SpecificVersion. Emit detailed error
+ messages incase assembly resolution fails. Make specific version
+ strict.
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * ManagedCompiler.cs (AddResponseFileCommands): Use LogicalName for
+ embedded resources, wherever available.
+ * CreateCSharpManifestResourceName.cs (GetResourceIdFromFileName): Use
+ Path.Combine instead of hardcoding "\".
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * MSBuild.cs (Execute): Reset current directory back after every
+ project's execution.
+
+2009-02-21 Ankit Jain <jankit at novell.com>
+
+ Fix bug #458916.
+ * Copy.cs: CopiedFiles and DestinationFiles should have target paths
+ instead of source. Also, the metadata should get retained from source
+ items. Based on a patch by Jeffrey Richardson <themann at indyfantasysports.net>
+ Refactor a bit to remove code duplication.
+
+2009-02-21 Ankit Jain <jankit at novell.com>
+
+ * MSBuild.cs (SplitPropertiesToDictionary): Split into exactly 2 parts.
+
+2009-02-11 Leszek Ciesielski <skolima at gmail.com>
+
+ * ResolveAssemblyReference.cs : AllowedRelatedFileExtensions stub
+
+2009-02-02 Ankit Jain <jankit at novell.com>
+
+ * MSBuild.cs (Execute): Disable incorrect 'rebaseOutputs' behavior.
+
+2009-02-02 Ankit Jain <jankit at novell.com>
+
+ * ResolveAssemblyReference.cs: Honor SearchPaths and the special
+ items like '{HintPathFromItem}', '{TargetFrameworkDirectory}' etc.
+ * AssemblyResolver.cs: Add api for more specific search, like search
+ in a directory, target frameworks, gac etc.
+
+2009-02-01 Ankit Jain <jankit at novell.com>
+
+ * CallTarget.cs: Copy all items from target to TargetOutputs.
+
+2009-02-01 Ankit Jain <jankit at novell.com>
+
+ * Csc.cs (AddResponseFileCommands):
+ * ManagedCompiler.cs (AddResponseFileCommands): 'AddModules' and
+ 'AdditionalLibPaths' can be empty.
+
+2009-01-30 Ankit Jain <jankit at novell.com>
+
+ * Copy.cs (Execute): Use for loop instead of enumerators.
+ sourceFiles and destinationFiles can be null, handle that.
+ Create new directory if required.
+
+2009-01-27 Ankit Jain <jankit at novell.com>
+
+ * Delete.cs (Execute): Skip non-existant files.
+
2009-01-06 Ankit Jain <jankit at novell.com>
* CreateManifestResourceName.cs (Execute): Use full path, also helps
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Copy.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Copy.cs
index 352db5a..81f6737 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Copy.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Copy.cs
@@ -52,60 +52,48 @@ namespace Microsoft.Build.Tasks {
try {
List <ITaskItem> temporaryCopiedFiles = new List <ITaskItem> ();
- if (sourceFiles.Length != destinationFiles.Length)
+ if (sourceFiles != null && destinationFiles != null &&
+ sourceFiles.Length != destinationFiles.Length)
throw new Exception ("Number of source files is different than number of destination files.");
if (destinationFiles != null && destinationFolder != null)
throw new Exception ("You must specify only one attribute from DestinationFiles and DestinationFolder");
if (destinationFiles != null) {
- IEnumerator <ITaskItem> source, destination;
- source = ((IEnumerable <ITaskItem>) sourceFiles).GetEnumerator ();
- destination = ((IEnumerable <ITaskItem>) destinationFiles).GetEnumerator ();
- while (source.MoveNext ()) {
- destination.MoveNext ();
- ITaskItem sourceItem = source.Current;
- ITaskItem destinationItem = destination.Current;
+ for (int i = 0; i < sourceFiles.Length; i ++) {
+ ITaskItem sourceItem = sourceFiles [i];
+ ITaskItem destinationItem = destinationFiles [i];
string sourceFile = sourceItem.GetMetadata ("FullPath");
string destinationFile = destinationItem.GetMetadata ("FullPath");
- if (skipUnchangedFiles == true) {
- FileInfo sourceInfo = new FileInfo (sourceFile);
- FileInfo destinationInfo = new FileInfo (destinationFile);
- if (sourceInfo.Length == destinationInfo.Length && File.GetLastWriteTime(sourceFile) <=
- File.GetLastWriteTime (destinationFile))
- continue;
- }
- Log.LogMessage ("Copying file from '{0}' to '{1}'", sourceFile, destinationFile);
- File.Copy (sourceFile, destinationFile, true);
- temporaryCopiedFiles.Add (source.Current);
+ if (!skipUnchangedFiles || HasFileChanged (sourceFile, destinationFile))
+ CopyFile (sourceFile, destinationFile, true);
+
+ sourceItem.CopyMetadataTo (destinationItem);
+ temporaryCopiedFiles.Add (destinationItem);
}
} else if (destinationFolder != null) {
- bool directoryCreated = false;
+ List<ITaskItem> temporaryDestinationFiles = new List<ITaskItem> ();
string destinationDirectory = destinationFolder.GetMetadata ("FullPath");
- if (Directory.Exists (destinationDirectory) == false) {
- Directory.CreateDirectory (destinationDirectory);
- directoryCreated = true;
- }
+ bool directoryCreated = CreateDirectoryIfRequired (destinationDirectory);
- IEnumerator <ITaskItem> source;
- source = (IEnumerator <ITaskItem>) sourceFiles.GetEnumerator ();
- while (source.MoveNext ()) {
- ITaskItem sourceItem = source.Current;
+ foreach (ITaskItem sourceItem in sourceFiles) {
string sourceFile = sourceItem.GetMetadata ("FullPath");
string filename = sourceItem.GetMetadata ("Filename") + sourceItem.GetMetadata ("Extension");
string destinationFile = Path.Combine (destinationDirectory,filename);
- if (skipUnchangedFiles == true && directoryCreated == false) {
- FileInfo sourceInfo = new FileInfo (sourceFile);
- FileInfo destinationInfo = new FileInfo (destinationFile);
- if (sourceInfo.Length == destinationInfo.Length && File.GetLastWriteTime(sourceFile) <=
- File.GetLastWriteTime (destinationFile))
- continue;
- }
- Log.LogMessage ("Copying file from '{0}' to '{1}'", sourceFile, destinationFile);
- File.Copy (sourceFile, destinationFile, true);
- temporaryCopiedFiles.Add (source.Current);
+ if (!skipUnchangedFiles || directoryCreated ||
+ HasFileChanged (sourceFile, destinationFile))
+ CopyFile (sourceFile, destinationFile, false);
+
+ temporaryCopiedFiles.Add (new TaskItem (
+ Path.Combine (destinationFolder.GetMetadata ("Identity"), filename),
+ sourceItem.CloneCustomMetadata ()));
+
+ temporaryDestinationFiles.Add (new TaskItem (
+ Path.Combine (destinationFolder.GetMetadata ("Identity"), filename),
+ sourceItem.CloneCustomMetadata ()));
}
+ destinationFiles = temporaryDestinationFiles.ToArray ();
} else {
throw new Exception ("You must specify DestinationFolder or DestinationFiles attribute.");
}
@@ -165,6 +153,38 @@ namespace Microsoft.Build.Tasks {
}
}
+ // returns whether directory was created or not
+ bool CreateDirectoryIfRequired (string name)
+ {
+ if (Directory.Exists (name))
+ return false;
+
+ Log.LogMessage ("Creating directory '{0}'", name);
+ Directory.CreateDirectory (name);
+ return true;
+ }
+
+ void CopyFile (string source, string dest, bool create_dir)
+ {
+ if (create_dir)
+ CreateDirectoryIfRequired (Path.GetDirectoryName (dest));
+ Log.LogMessage ("Copying file from '{0}' to '{1}'", source, dest);
+ if (String.Compare (source, dest) != 0)
+ File.Copy (source, dest, true);
+ }
+
+ bool HasFileChanged (string source, string dest)
+ {
+ if (!File.Exists (dest))
+ return true;
+
+ FileInfo sourceInfo = new FileInfo (source);
+ FileInfo destinationInfo = new FileInfo (dest);
+
+ return !(sourceInfo.Length == destinationInfo.Length &&
+ File.GetLastWriteTime(source) <= File.GetLastWriteTime (dest));
+ }
+
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateCSharpManifestResourceName.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateCSharpManifestResourceName.cs
index 89c2b7d..7d9d595 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateCSharpManifestResourceName.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateCSharpManifestResourceName.cs
@@ -103,33 +103,6 @@ namespace Microsoft.Build.Tasks {
}
}
- // No dependent file
- static string GetResourceIdFromFileName (string fileName, string rootNamespace)
- {
- string culture = null;
- if (String.Compare (Path.GetExtension (fileName), ".resx", true) == 0) {
- fileName = Path.ChangeExtension (fileName, null);
- } else {
- string only_filename, extn;
- if (AssignCulture.TrySplitResourceName (fileName, out only_filename, out culture, out extn)) {
- //remove the culture from fileName
- //foo.it.bmp -> foo.bmp
- fileName = only_filename + "." + extn;
- }
- }
-
- //FIXME: path char!
- string rname = fileName.Replace ('/', '.').Replace ('\\', '.');
-
- if (!String.IsNullOrEmpty (rootNamespace))
- rname = rootNamespace + "." + rname;
- if (culture == null)
- return rname;
- else
- //FIXME: Why??!! Tests show that this is required!
- return culture + "\\" + rname;
- }
-
/* Special parser for C# files
* Assumes that the file is compilable
* skips comments,
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateManifestResourceName.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateManifestResourceName.cs
index 0425da0..59cb075 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateManifestResourceName.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateManifestResourceName.cs
@@ -86,6 +86,34 @@ namespace Microsoft.Build.Tasks {
throw new NotImplementedException ();
}
+ // No dependent file
+ internal static string GetResourceIdFromFileName (string fileName, string rootNamespace)
+ {
+ string culture = null;
+ if (String.Compare (Path.GetExtension (fileName), ".resx", true) == 0) {
+ fileName = Path.ChangeExtension (fileName, null);
+ } else {
+ string only_filename, extn;
+ if (AssignCulture.TrySplitResourceName (fileName, out only_filename, out culture, out extn)) {
+ //remove the culture from fileName
+ //foo.it.bmp -> foo.bmp
+ fileName = only_filename + "." + extn;
+ } else {
+ culture = null;
+ }
+ }
+
+ //FIXME: path char!
+ string rname = fileName.Replace ('/', '.').Replace ('\\', '.');
+
+ if (!String.IsNullOrEmpty (rootNamespace))
+ rname = rootNamespace + "." + rname;
+ if (culture == null)
+ return rname;
+ else
+ return Path.Combine (culture, rname);
+ }
+
protected abstract string CreateManifestName (string fileName,
string linkFileName,
string rootNamespace,
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateVisualBasicManifestResourceName.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateVisualBasicManifestResourceName.cs
index e6e7d7b..6b7fb55 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateVisualBasicManifestResourceName.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateVisualBasicManifestResourceName.cs
@@ -29,30 +29,149 @@
using System;
using System.IO;
+using System.Text;
using Microsoft.Build.Framework;
namespace Microsoft.Build.Tasks {
public class CreateVisualBasicManifestResourceName : CreateManifestResourceName {
-
+
public CreateVisualBasicManifestResourceName ()
{
}
-
- [MonoTODO]
+
protected override string CreateManifestName (string fileName,
string linkFileName,
string rootNamespace,
string dependentUponFileName,
Stream binaryStream)
{
- throw new NotImplementedException ();
+ if (String.IsNullOrEmpty (dependentUponFileName) || binaryStream == null)
+ return GetResourceIdFromFileName
+ (Path.GetFileName (fileName), rootNamespace);
+
+ string ns = null;
+ string classname = null;
+
+ using (StreamReader rdr = new StreamReader (binaryStream)) {
+ while (true) {
+ string tok = GetNextToken (rdr);
+ if (tok == null)
+ break;
+
+ if (String.Compare (tok, "namespace", true) == 0) {
+ string t = GetNextToken (rdr);
+ /* 'namespace' can be a attribute param also, */
+ if (t == ":" && GetNextToken (rdr) == "=")
+ continue;
+ ns = t;
+ }
+
+ if (String.Compare (tok, "class", true) == 0) {
+ string t = GetNextToken (rdr);
+ /* 'class' can be a attribute param also, */
+ if (t == ":" && GetNextToken (rdr) == "=")
+ continue;
+ classname = t;
+ break;
+ }
+ }
+
+ if (classname == null)
+ return GetResourceIdFromFileName (fileName, rootNamespace);
+
+ string culture, extn, only_filename;
+ if (AssignCulture.TrySplitResourceName (fileName, out only_filename, out culture, out extn))
+ extn = "." + culture;
+ else
+ extn = String.Empty;
+
+ string rname;
+ if (ns == null)
+ rname = classname + extn;
+ else
+ rname = ns + '.' + classname + extn;
+
+ if (String.IsNullOrEmpty (rootNamespace))
+ return rname;
+ else
+ return rootNamespace + "." + rname;
+ }
}
-
- [MonoTODO]
+
protected override bool IsSourceFile (string fileName)
{
- throw new NotImplementedException ();
+ return Path.GetExtension (fileName).ToLower () == ".vb";
+ }
+
+ /* Special parser for VB.NET files
+ * Assumes that the file is compilable
+ * skips comments,
+ * skips strings "foo"
+ */
+ string GetNextToken (StreamReader sr)
+ {
+ StringBuilder sb = new StringBuilder ();
+
+ while (true) {
+ int c = sr.Peek ();
+ if (c == -1)
+ return null;
+
+ if (c == '\r' || c == '\n') {
+ sr.ReadLine ();
+ if (sb.Length > 0)
+ break;
+
+ continue;
+ }
+
+ if (c == '\'') {
+ /* comment */
+ sr.ReadLine ();
+ if (sb.Length > 0)
+ return sb.ToString ();
+
+ continue;
+ }
+
+ if (c == '"') {
+ /* String */
+ sr.Read ();
+ while (true) {
+ int n = sr.Peek ();
+ if (n == '\r' || n == '\n' || n == -1)
+ throw new Exception ("String literal not closed");
+
+ if (n == '"') {
+ if (sb.Length > 0) {
+ sr.Read ();
+ return sb.ToString ();
+ }
+
+ break;
+ }
+ sr.Read ();
+ }
+ } else {
+ if (Char.IsLetterOrDigit ((char) c) || c == '_' || c == '.') {
+ sb.Append ((char) c);
+ } else {
+ if (sb.Length > 0)
+ break;
+
+ if (c != ' ' && c != '\t') {
+ sr.Read ();
+ return ((char) c).ToString ();
+ }
+ }
+ }
+
+ sr.Read ();
+ }
+
+ return sb.ToString ();
}
+
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
index b0a1301..4afdea5 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
@@ -44,7 +44,8 @@ namespace Microsoft.Build.Tasks {
{
base.AddResponseFileCommands (commandLine);
- commandLine.AppendSwitchIfNotNull ("/lib:", AdditionalLibPaths, ",");
+ if (AdditionalLibPaths != null && AdditionalLibPaths.Length > 0)
+ commandLine.AppendSwitchIfNotNull ("/lib:", AdditionalLibPaths, ",");
if (Bag ["AllowUnsafeBlocks"] != null)
if (AllowUnsafeBlocks)
@@ -60,7 +61,13 @@ namespace Microsoft.Build.Tasks {
else
commandLine.AppendSwitch ("/checked-");
- commandLine.AppendSwitchUnquotedIfNotNull ("/define:", DefineConstants);
+ if (!String.IsNullOrEmpty (DefineConstants)) {
+ string [] defines = DefineConstants.Split (new char [] {';', ' '},
+ StringSplitOptions.RemoveEmptyEntries);
+ if (defines.Length > 0)
+ commandLine.AppendSwitchUnquotedIfNotNull ("/define:",
+ String.Join (";", defines));
+ }
commandLine.AppendSwitchIfNotNull ("/nowarn:", DisabledWarnings);
@@ -179,7 +186,9 @@ namespace Microsoft.Build.Tasks {
}
protected override string ToolName {
- get { return "gmcs"; }
+ get {
+ return Utilities.RunningOnWindows ? "gmcs.bat" : "gmcs";
+ }
}
public bool UseHostCompilerIfAvailable {
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Delete.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Delete.cs
index c53360f..4b6ad28 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Delete.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Delete.cs
@@ -50,13 +50,15 @@ namespace Microsoft.Build.Tasks {
List <ITaskItem> temporaryDeletedFiles = new List <ITaskItem> ();
foreach (ITaskItem file in files) {
+ string path = file.GetMetadata ("FullPath");
+ if (path == null || !File.Exists (path))
+ //skip
+ continue;
+
try {
- File.Delete (file.GetMetadata ("FullPath"));
+ File.Delete (path);
temporaryDeletedFiles.Add (file);
}
- catch (ArgumentNullException ex) {
- LogException (ex);
- }
catch (ArgumentException ex) {
LogException (ex);
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
index 362c6de..9122b3e 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
@@ -123,7 +123,7 @@ namespace Microsoft.Build.Tasks {
[MonoTODO]
protected override string GetWorkingDirectory ()
{
- return Environment.CurrentDirectory;
+ return workingDirectory;
}
[MonoTODO]
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
index 9c6c9c0..1a70b1d 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
@@ -108,7 +108,13 @@ namespace Microsoft.Build.Tasks {
case ".resources":
return new ResourceReader (stream);
case ".resx":
- return new System.Resources.ResXResourceReader (stream);
+ ResXResourceReader reader = new ResXResourceReader (stream);
+
+ // set correct basepath to resolve relative paths in file refs
+ if (useSourcePath)
+ reader.BasePath = Path.GetDirectoryName (Path.GetFullPath (name));
+
+ return reader;
default:
throw new Exception ("Unknown format in file " + name);
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/MSBuild.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/MSBuild.cs
index 113ffff..3f8ed19 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/MSBuild.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/MSBuild.cs
@@ -60,22 +60,36 @@ namespace Microsoft.Build.Tasks {
string currentDirectory = Environment.CurrentDirectory;
Hashtable outputs;
+ Dictionary<string, string> global_properties = SplitPropertiesToDictionary ();
+ Dictionary<string, ITaskItem> projectsByFileName = new Dictionary<string, ITaskItem> ();
+
foreach (ITaskItem project in projects) {
filename = project.GetMetadata ("FullPath");
Directory.SetCurrentDirectory (Path.GetDirectoryName (filename));
outputs = new Hashtable ();
- Dictionary<string, string> global_properties = SplitPropertiesToDictionary ();
result = BuildEngine.BuildProjectFile (filename, targets, global_properties, outputs);
if (result) {
+ // Metadata from the first item for the project file is copied
+ ITaskItem first_item;
+ if (!projectsByFileName.TryGetValue (filename, out first_item))
+ projectsByFileName [filename] = first_item = project;
+
foreach (DictionaryEntry de in outputs) {
ITaskItem [] array = (ITaskItem []) de.Value;
foreach (ITaskItem item in array) {
+ // copy the metadata from original @project to here
+ // CopyMetadataTo does _not_ overwrite
+ first_item.CopyMetadataTo (item);
+
outputItems.Add (item);
- if (rebaseOutputs)
- File.Copy (item.ItemSpec, Path.Combine (currentDirectory, item.ItemSpec), true);
+
+ //FIXME: Correctly rebase output paths to be relative to the
+ // calling project
+ //if (rebaseOutputs)
+ // File.Copy (item.ItemSpec, Path.Combine (currentDirectory, item.ItemSpec), true);
}
}
} else {
@@ -83,6 +97,8 @@ namespace Microsoft.Build.Tasks {
if (stopOnFirstFailure)
break;
}
+
+ Directory.SetCurrentDirectory (currentDirectory);
}
if (result)
@@ -140,10 +156,9 @@ namespace Microsoft.Build.Tasks {
if (String.IsNullOrEmpty (kvpair))
continue;
- string [] parts = kvpair.Trim ().Split ('=');
+ string [] parts = kvpair.Trim ().Split (new char [] {'='}, 2);
if (parts.Length != 2) {
- //FIXME: Log the error and .. ?
- Console.WriteLine ("Invalid key/value pairs in Properties, ignoring.");
+ Log.LogWarning ("Invalid key/value pairs ({0}) in Properties, ignoring.", kvpair);
continue;
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/MakeDir.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/MakeDir.cs
index ac4726c..5252882 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/MakeDir.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/MakeDir.cs
@@ -49,8 +49,12 @@ namespace Microsoft.Build.Tasks {
List <ITaskItem> temporaryDirectoriesCreated = new List <ITaskItem> ();
foreach (ITaskItem directory in directories) {
+ string path = directory.GetMetadata ("FullPath");
+ if (Directory.Exists (path))
+ continue;
+
try {
- Directory.CreateDirectory (directory.GetMetadata ("FullPath"));
+ Directory.CreateDirectory (path);
temporaryDirectoriesCreated.Add (directory);
Log.LogMessage (MessageImportance.High, "Created directory \"{0}\"", directory.ItemSpec);
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs
index 1bea857..4770191 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs
@@ -54,7 +54,8 @@ namespace Microsoft.Build.Tasks {
protected internal override void AddResponseFileCommands (
CommandLineBuilderExtension commandLine)
{
- commandLine.AppendSwitchIfNotNull ("/addmodule:", AddModules, ",");
+ if (AddModules != null && AddModules.Length > 0)
+ commandLine.AppendSwitchIfNotNull ("/addmodule:", AddModules, ",");
if (Bag ["CodePage"] != null)
commandLine.AppendSwitchIfNotNull ("/codepage:", CodePage.ToString ());
@@ -91,8 +92,14 @@ namespace Microsoft.Build.Tasks {
commandLine.AppendSwitchIfNotNull ("/out:", OutputAssembly.ItemSpec);
if (Resources != null)
- foreach (ITaskItem item in Resources)
+ foreach (ITaskItem item in Resources) {
+ string logical_name = item.GetMetadata ("LogicalName");
+ if (logical_name.Length > 0)
+ commandLine.AppendSwitchIfNotNull ("/resource:",
+ String.Format ("{0},{1}", item.ItemSpec, logical_name));
+ else
commandLine.AppendSwitchIfNotNull ("/resource:", item.ItemSpec);
+ }
if (Sources != null)
foreach (ITaskItem item in Sources)
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
index 2af876b..4e6ff11 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
@@ -3,8 +3,10 @@
//
// Author:
// Marek Sieradzki (marek.sieradzki at gmail.com)
+// Ankit Jain (jankit at novell.com)
//
// (C) 2006 Marek Sieradzki
+// Copyright 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -29,7 +31,9 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
+using System.Reflection;
using System.Security;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
@@ -42,6 +46,7 @@ namespace Microsoft.Build.Tasks {
ITaskItem[] assemblies;
string appConfigFile;
string[] allowedAssemblyExtensions;
+ string[] allowedRelatedFileExtensions;
string[] candidateAssemblyFiles;
ITaskItem[] copyLocalFiles;
ITaskItem[] filesWritten;
@@ -62,35 +67,333 @@ namespace Microsoft.Build.Tasks {
ITaskItem[] suggestedRedirects;
string[] targetFrameworkDirectories;
string targetProcessorArchitecture;
+ static string [] assembly_file_search_paths;
+ static string [] default_assembly_extensions;
AssemblyResolver assembly_resolver;
+ List<ITaskItem> tempSatelliteFiles, tempRelatedFiles, tempResolvedDepFiles;
+ List<ITaskItem> tempResolvedFiles, tempCopyLocalFiles;
+
+ static ResolveAssemblyReference ()
+ {
+ assembly_file_search_paths = new string [] {
+ "{TargetFrameworkDirectory}", "{GAC}", String.Empty };
+ default_assembly_extensions = new string [] { ".dll", ".exe" };
+ }
public ResolveAssemblyReference ()
{
assembly_resolver = new AssemblyResolver ();
}
+ //FIXME: make this reusable
+ //FIXME: make sure finals refs are not repeated
public override bool Execute ()
{
assembly_resolver.Log = Log;
- List <ITaskItem> tempResolvedFiles = new List <ITaskItem> ();
-
+ tempResolvedFiles = new List <ITaskItem> ();
+ tempCopyLocalFiles = new List <ITaskItem> ();
+ tempSatelliteFiles = new List<ITaskItem> ();
+ tempRelatedFiles = new List<ITaskItem> ();
+ tempResolvedDepFiles = new List<ITaskItem> ();
+
foreach (ITaskItem item in assemblies) {
- string resolved = assembly_resolver.ResolveAssemblyReference (item);
+ if (!String.IsNullOrEmpty (item.GetMetadata ("SubType"))) {
+ Log.LogWarning ("Reference '{0}' has non-empty SubType. Ignoring.", item.ItemSpec);
+ continue;
+ }
- if (resolved == null) {
- Log.LogWarning ("Reference {0} not resolved", item.ItemSpec);
+ Log.LogMessage (MessageImportance.Low, "Primary Reference {0}", item.ItemSpec);
+ ResolvedReference resolved_ref = ResolveReference (item, searchPaths);
+ if (resolved_ref == null) {
+ Log.LogWarning ("\tReference '{0}' not resolved", item.ItemSpec);
+ Log.LogMessage ("{0}", assembly_resolver.SearchLogger.ToString ());
} else {
- Log.LogMessage (MessageImportance.Low, "Reference {0} resolved to {1}", item.ItemSpec, resolved);
- tempResolvedFiles.Add (new TaskItem (resolved));
+ Log.LogMessage (MessageImportance.Low,
+ "\tReference {0} resolved to {1}. CopyLocal = {2}",
+ item.ItemSpec, resolved_ref.TaskItem,
+ resolved_ref.TaskItem.GetMetadata ("CopyLocal"));
+
+ tempResolvedFiles.Add (resolved_ref.TaskItem);
+
+ if (!IsFromGacOrTargetFramework (resolved_ref))
+ ResolveAssemblyFileDependencies (resolved_ref.TaskItem,
+ resolved_ref.TaskItem.GetMetadata ("CopyLocal"));
}
}
+
+ ResolveAssemblyFiles ();
resolvedFiles = tempResolvedFiles.ToArray ();
+ copyLocalFiles = tempCopyLocalFiles.ToArray ();
+ satelliteFiles = tempSatelliteFiles.ToArray ();
+ relatedFiles = tempRelatedFiles.ToArray ();
+ resolvedDependencyFiles = tempResolvedDepFiles.ToArray ();
+
+ tempResolvedFiles.Clear ();
+ tempCopyLocalFiles.Clear ();
+ tempSatelliteFiles.Clear ();
+ tempRelatedFiles.Clear ();
+ tempResolvedDepFiles.Clear ();
return true;
}
-
+
+ // Use @search_paths to resolve the reference
+ ResolvedReference ResolveReference (ITaskItem item, string [] search_paths)
+ {
+ assembly_resolver.ResetSearchLogger ();
+
+ ResolvedReference resolved = null;
+ foreach (string spath in search_paths) {
+ bool specific_version;
+ if (!TryGetSpecificVersionValue (item, out specific_version))
+ return null;
+
+ assembly_resolver.SearchLogger.WriteLine ("For searchpath {0}", spath);
+
+ if (String.Compare (spath, "{HintPathFromItem}") == 0) {
+ resolved = assembly_resolver.ResolveHintPathReference (item, specific_version);
+ } else if (String.Compare (spath, "{TargetFrameworkDirectory}") == 0) {
+ foreach (string fpath in targetFrameworkDirectories) {
+ resolved = assembly_resolver.FindInTargetFramework (item,
+ fpath, specific_version);
+ if (resolved != null)
+ break;
+ }
+ } else if (String.Compare (spath, "{GAC}") == 0) {
+ resolved = assembly_resolver.ResolveGacReference (item, specific_version);
+ } else if (String.Compare (spath, "{RawFileName}") == 0) {
+ //FIXME: identify assembly names, as extract the name, and try with that?
+ if (assembly_resolver.GetAssemblyNameFromFile (item.ItemSpec) != null)
+ resolved = assembly_resolver.GetResolvedReference (item, item.ItemSpec, true,
+ SearchPath.RawFileName);
+ } else if (String.Compare (spath, "{CandidateAssemblyFiles}") == 0) {
+ assembly_resolver.SearchLogger.WriteLine (
+ "Warning: {CandidateAssemblyFiles} not supported currently");
+ } else {
+ resolved = assembly_resolver.FindInDirectory (
+ item, spath,
+ allowedAssemblyExtensions ?? default_assembly_extensions);
+ }
+
+ if (resolved != null)
+ break;
+ }
+
+ if (resolved != null)
+ SetCopyLocal (resolved.TaskItem, resolved.CopyLocal.ToString ());
+
+ return resolved;
+ }
+
+ bool TryGetSpecificVersionValue (ITaskItem item, out bool specific_version)
+ {
+ specific_version = true;
+ string value = item.GetMetadata ("SpecificVersion");
+ if (String.IsNullOrEmpty (value)) {
+ AssemblyName name = new AssemblyName (item.ItemSpec);
+ // If SpecificVersion is not specified, then
+ // it is true if the Include is a strong name else false
+ specific_version = assembly_resolver.IsStrongNamed (name);
+ return true;
+ }
+
+ if (Boolean.TryParse (value, out specific_version))
+ return true;
+
+ Log.LogError ("Item '{0}' has attribute SpecificVersion with invalid value '{1}' " +
+ "which could not be converted to a boolean.", item.ItemSpec, value);
+ return false;
+ }
+
+ //FIXME: Consider CandidateAssemblyFiles also here
+ void ResolveAssemblyFiles ()
+ {
+ foreach (ITaskItem item in assemblyFiles) {
+ if (!File.Exists (item.ItemSpec)) {
+ Log.LogMessage (MessageImportance.Low,
+ "Primary Reference from AssemblyFiles {0}, file not found. Ignoring",
+ item.ItemSpec);
+ continue;
+ }
+
+ Log.LogMessage (MessageImportance.Low, "Primary Reference from AssemblyFiles {0}", item.ItemSpec);
+ string copy_local;
+
+ ResolvedReference rr = assembly_resolver.GetResolvedReference (item, item.ItemSpec, true,
+ SearchPath.RawFileName);
+ copy_local = rr.CopyLocal.ToString ();
+
+ tempResolvedFiles.Add (rr.TaskItem);
+ SetCopyLocal (rr.TaskItem, copy_local);
+
+ FindAndAddRelatedFiles (item.ItemSpec, copy_local);
+ FindAndAddSatellites (item.ItemSpec, copy_local);
+
+ if (FindDependencies && !IsFromGacOrTargetFramework (rr))
+ ResolveAssemblyFileDependencies (item, copy_local);
+ }
+ }
+
+ //FIXME: caching
+
+ // Tries to resolve assemblies referenced by @item
+ // Skips gac references
+ // @item : filename
+ void ResolveAssemblyFileDependencies (ITaskItem item, string parent_copy_local)
+ {
+ string basepath = Path.GetDirectoryName (item.ItemSpec);
+
+ // set the 3rd search path to this ref's base path
+ // Will be used for resolving the dependencies
+ assembly_file_search_paths [2] = basepath;
+
+ Dictionary<string, string> alreadyResolvedAssemblies = new Dictionary<string, string> ();
+
+ Queue<string> dependencies = new Queue<string> ();
+ dependencies.Enqueue (item.ItemSpec);
+
+ while (dependencies.Count > 0) {
+ Assembly asm = Assembly.ReflectionOnlyLoadFrom (dependencies.Dequeue ());
+ if (alreadyResolvedAssemblies.ContainsKey (asm.FullName))
+ continue;
+
+ foreach (AssemblyName aname in asm.GetReferencedAssemblies ()) {
+ if (alreadyResolvedAssemblies.ContainsKey (aname.FullName))
+ continue;
+
+ Log.LogMessage (MessageImportance.Low, "Dependency {0}", aname);
+ Log.LogMessage (MessageImportance.Low, "\tRequired by {0}", asm.FullName);
+
+ ResolvedReference resolved_ref = ResolveDependencyByAssemblyName (
+ aname, parent_copy_local);
+
+ if (resolved_ref != null && !IsFromGacOrTargetFramework (resolved_ref)) {
+ dependencies.Enqueue (resolved_ref.TaskItem.ItemSpec);
+ FindAndAddSatellites (resolved_ref.TaskItem.ItemSpec, parent_copy_local);
+ }
+ }
+ alreadyResolvedAssemblies.Add (asm.FullName, String.Empty);
+ }
+ }
+
+ // Resolves by looking assembly_file_search_paths
+ // which has - gac, tgtfmwk, and base dir of the parent
+ // reference
+ ResolvedReference ResolveDependencyByAssemblyName (AssemblyName aname, string parent_copy_local)
+ {
+ // Look in TargetFrameworkDirectory, Gac
+ ITaskItem item = new TaskItem (aname.FullName);
+ item.SetMetadata ("SpecificVersion", "false");
+ ResolvedReference resolved_ref = ResolveReference (
+ item,
+ assembly_file_search_paths);
+
+ string copy_local = "false";
+ if (resolved_ref != null) {
+ Log.LogMessage (MessageImportance.Low, "\tReference {0} resolved to {1}.",
+ aname, resolved_ref.TaskItem.ItemSpec);
+
+ if (resolved_ref.FoundInSearchPath == SearchPath.Directory) {
+ // override CopyLocal with parent's val
+ resolved_ref.TaskItem.SetMetadata ("CopyLocal", parent_copy_local);
+
+ Log.LogMessage (MessageImportance.Low,
+ "\tThis is CopyLocal {0} as parent item has this value",
+ copy_local);
+
+ FindAndAddRelatedFiles (resolved_ref.TaskItem.ItemSpec, parent_copy_local);
+ } else {
+ //gac or tgtfmwk
+ Log.LogMessage (MessageImportance.Low,
+ "\tThis is CopyLocal {0} as it is in the gac or one " +
+ "of the target framework directories",
+ copy_local);
+
+ }
+
+ tempResolvedFiles.Add (resolved_ref.TaskItem);
+ } else {
+ Log.LogWarning ("\tReference '{0}' not resolved", aname);
+ Log.LogMessage ("{0}", assembly_resolver.SearchLogger.ToString ());
+ }
+
+ return resolved_ref;
+ }
+
+ void FindAndAddRelatedFiles (string filename, string parent_copy_local)
+ {
+ if (!findRelatedFiles || allowedRelatedFileExtensions == null)
+ return;
+
+ foreach (string ext in allowedRelatedFileExtensions) {
+ string rfile = filename + ext;
+ if (File.Exists (rfile)) {
+ ITaskItem item = new TaskItem (rfile);
+ SetCopyLocal (item, parent_copy_local);
+
+ tempRelatedFiles.Add (item);
+ }
+ }
+ }
+
+ void FindAndAddSatellites (string filename, string parent_copy_local)
+ {
+ if (!FindSatellites)
+ return;
+
+ string basepath = Path.GetDirectoryName (filename);
+ string resource = String.Format ("{0}{1}{2}",
+ Path.GetFileNameWithoutExtension (filename),
+ ".resources",
+ Path.GetExtension (filename));
+
+ string dir_sep = Path.DirectorySeparatorChar.ToString ();
+ foreach (string dir in Directory.GetDirectories (basepath)) {
+ string culture = Path.GetFileName (dir);
+ if (!CultureNamesTable.ContainsKey (culture))
+ continue;
+
+ string res_path = Path.Combine (dir, resource);
+ if (File.Exists (res_path)) {
+ ITaskItem item = new TaskItem (res_path);
+ SetCopyLocal (item, parent_copy_local);
+ item.SetMetadata ("DestinationSubdirectory", culture + dir_sep);
+ tempSatelliteFiles.Add (item);
+ }
+ }
+ }
+
+ void SetCopyLocal (ITaskItem item, string copy_local)
+ {
+ item.SetMetadata ("CopyLocal", copy_local);
+
+ // Assumed to be valid value
+ if (Boolean.Parse (copy_local))
+ tempCopyLocalFiles.Add (item);
+ }
+
+ bool IsCopyLocal (ITaskItem item)
+ {
+ return Boolean.Parse (item.GetMetadata ("CopyLocal"));
+ }
+
+ bool IsFromTargetFramework (string filename)
+ {
+ foreach (string fpath in targetFrameworkDirectories)
+ if (filename.StartsWith (fpath))
+ return true;
+
+ return false;
+ }
+
+ bool IsFromGacOrTargetFramework (ResolvedReference rr)
+ {
+ return rr.FoundInSearchPath == SearchPath.Gac ||
+ rr.FoundInSearchPath == SearchPath.TargetFrameworkDirectory;
+ }
+
public bool AutoUnify {
get { return autoUnify; }
set { autoUnify = value; }
@@ -115,6 +418,11 @@ namespace Microsoft.Build.Tasks {
get { return allowedAssemblyExtensions; }
set { allowedAssemblyExtensions = value; }
}
+
+ public string[] AllowedRelatedFileExtensions {
+ get { return allowedRelatedFileExtensions; }
+ set { allowedRelatedFileExtensions = value; }
+ }
public string[] CandidateAssemblyFiles {
get { return candidateAssemblyFiles; }
@@ -217,6 +525,19 @@ namespace Microsoft.Build.Tasks {
get { return targetProcessorArchitecture; }
set { targetProcessorArchitecture = value; }
}
+
+ static Dictionary<string, string> cultureNamesTable;
+ static Dictionary<string, string> CultureNamesTable {
+ get {
+ if (cultureNamesTable == null) {
+ cultureNamesTable = new Dictionary<string, string> ();
+ foreach (CultureInfo ci in CultureInfo.GetCultures (CultureTypes.AllCultures))
+ cultureNamesTable [ci.Name] = ci.Name;
+ }
+
+ return cultureNamesTable;
+ }
+ }
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolvedReference.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolvedReference.cs
new file mode 100644
index 0000000..67ff1e2
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolvedReference.cs
@@ -0,0 +1,51 @@
+//
+// ResolvedReference.cs
+//
+// Author:
+// Ankit Jain (jankit at novell.com)
+//
+// Copyright 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+namespace Microsoft.Build.Tasks {
+
+ class ResolvedReference {
+ public ITaskItem TaskItem;
+ public SearchPath FoundInSearchPath;
+ public bool CopyLocal;
+
+ public ResolvedReference (string filename, bool copy_local, SearchPath search_path)
+ {
+ this.TaskItem = new TaskItem (filename);
+ CopyLocal = copy_local;
+ this.FoundInSearchPath = search_path;
+ }
+ }
+
+
+}
+
+#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/SGen.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/SGen.cs
index a147cf6..394e897 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/SGen.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/SGen.cs
@@ -115,7 +115,7 @@ namespace Microsoft.Build.Tasks {
[MonoTODO]
protected override string ToolName {
- get { return "sgen"; }
+ get { return Utilities.RunningOnWindows ? "sgen.bat" : "sgen"; }
}
[MonoTODO]
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Utilities.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Utilities.cs
new file mode 100644
index 0000000..e9a5ac5
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Utilities.cs
@@ -0,0 +1,49 @@
+//
+// Utilities.cs:
+//
+// Author:
+// Ankit Jain (jankit at novell.com)
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+
+using System;
+
+namespace Microsoft.Build.Tasks {
+ internal static class Utilities {
+
+ public static bool RunningOnWindows {
+ get {
+ // Code from Mono.GetOptions/Options.cs
+ // check for non-Unix platforms - see FAQ for more details
+ // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
+ int platform = (int) Environment.OSVersion.Platform;
+ return ((platform != 4) && (platform != 128));
+ }
+
+ }
+ }
+
+}
+
+#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs
index 07a081e..d658461 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs
@@ -30,6 +30,8 @@
using System;
using System.IO;
+using System.Text;
+
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
@@ -51,11 +53,13 @@ namespace Microsoft.Build.Tasks {
commandLine.AppendSwitchIfNotNull ("/baseaddress:", BaseAddress);
- commandLine.AppendSwitchIfNotNull ("/define:", DefineConstants);
+ if (DefineConstants != null)
+ commandLine.AppendSwitchUnquotedIfNotNull ("/define:",
+ String.Format ("\"{0}\"", EscapeDoubleQuotes (DefineConstants)));
// DisabledWarnings
- commandLine.AppendSwitchIfNotNull ("/doc", DocumentationFile);
+ commandLine.AppendSwitchIfNotNull ("/doc:", DocumentationFile);
// ErrorReport
@@ -117,6 +121,14 @@ namespace Microsoft.Build.Tasks {
// WarningsNotAsErrors
}
+
+ string EscapeDoubleQuotes (string text)
+ {
+ if (text == null)
+ return null;
+
+ return text.Replace ("\"", "\\\"");
+ }
[MonoTODO]
protected override bool CallHostObjectToExecute ()
@@ -246,7 +258,7 @@ namespace Microsoft.Build.Tasks {
[MonoTODO]
protected override string ToolName {
- get { return "vbnc"; }
+ get { return Utilities.RunningOnWindows ? "vbnc.bat" : "vbnc"; }
}
[MonoTODO]
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks_test.dll.sources b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks_test.dll.sources
index f9db07b..4f5e22b 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks_test.dll.sources
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks_test.dll.sources
@@ -2,8 +2,10 @@ Microsoft.Build.Tasks/ALTest.cs
Microsoft.Build.Tasks/AssignCultureTest.cs
Microsoft.Build.Tasks/AssignTargetPathTest.cs
Microsoft.Build.Tasks/CombinePathTest.cs
+Microsoft.Build.Tasks/CopyTest.cs
Microsoft.Build.Tasks/Consts.cs
Microsoft.Build.Tasks/CreateCSharpManifestResourceNameTest.cs
+Microsoft.Build.Tasks/CreateVisualBasicManifestResourceNameTest.cs
Microsoft.Build.Tasks/CreateItemTest.cs
Microsoft.Build.Tasks/CreatePropertyTest.cs
Microsoft.Build.Tasks/CscTest.cs
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/AssignTargetPathTest.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/AssignTargetPathTest.cs
index 6cac0b6..0d7b99e 100755
--- a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/AssignTargetPathTest.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/AssignTargetPathTest.cs
@@ -64,7 +64,7 @@ namespace MonoTests.Microsoft.Build.Tasks
{
if (OS == OsType.Unix) {
CheckTargetPath(
- new string[] { "/a/b/./abc.cs", "/a/c/def.cs", "xyz.cs", "/different/xyz/foo.cs", "rel/bar.resx"},
+ new string[] { "/a/b/./abc.cs", "/a/c/def.cs", "a/xyz.cs", "/different/xyz/foo.cs", "rel/bar.resx"},
new string[] { "b/abc.cs", "c/def.cs", "xyz.cs", "foo.cs", "bar.resx" },
"/a/./", "A");
} else if (OS == OsType.Windows) {
@@ -78,32 +78,40 @@ namespace MonoTests.Microsoft.Build.Tasks
[Test]
public void TestExecute2()
{
+ string root = Path.GetPathRoot (Environment.CurrentDirectory);
+ string cur_dir_minus_root = Environment.CurrentDirectory.Substring (root.Length);
+
if (OS == OsType.Unix) {
CheckTargetPath(
new string[] { "//a/b/abc.cs", "k/../k/def.cs", "/xyz.cs", "/different/xyz/foo.cs"},
- new string[] { "a/b/abc.cs", "def.cs", "xyz.cs", "different/xyz/foo.cs"},
+ new string[] { "a/b/abc.cs", Path.Combine (cur_dir_minus_root, "k/def.cs"), "xyz.cs", "different/xyz/foo.cs"},
"/", "A");
} else if (OS == OsType.Windows) {
CheckTargetPath(
- new string[] { @"C:\\a\b\abc.cs", @"k\..\def.cs", @"C:\xyz.cs", @"C:\different\xyz\foo.cs"},
- new string[] { "a\\b\\abc.cs", "def.cs", "xyz.cs", "different\\xyz\\foo.cs"},
- "C:\\", "A");
+ new string[] { root + @"a\b\abc.cs", @"k\..\k\def.cs", root + @"xyz.cs", root + @"different\xyz\foo.cs"},
+ new string[] { "a\\b\\abc.cs", cur_dir_minus_root + "\\k\\def.cs", "xyz.cs", "different\\xyz\\foo.cs"},
+ root, "A");
}
}
[Test]
public void TestExecute3()
{
+ string root = Path.GetPathRoot (Environment.CurrentDirectory);
+ string cur_dir_minus_root = Environment.CurrentDirectory.Substring (root.Length);
+
if (OS == OsType.Unix) {
CheckTargetPath(
new string[] { "xyz.cs", "rel/bar.resx" },
- new string[] { "xyz.cs", "bar.resx" },
+ new string[] { Path.Combine (cur_dir_minus_root, "xyz.cs"),
+ Path.Combine (cur_dir_minus_root, "rel/bar.resx") },
"/", "A");
} else if (OS == OsType.Windows) {
CheckTargetPath(
new string[] { "xyz.cs", "rel\\bar.resx" },
- new string[] { "xyz.cs", "bar.resx" },
- "C:\\", "A");
+ new string[] { Path.Combine (cur_dir_minus_root, "xyz.cs"),
+ Path.Combine (cur_dir_minus_root, "rel\\bar.resx") },
+ root, "A");
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/ChangeLog b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/ChangeLog
index 91c4c62..7519432 100644
--- a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/ChangeLog
+++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/ChangeLog
@@ -1,3 +1,55 @@
+2009-06-08 Ankit Jain <jankit at novell.com>
+
+ * CreateCSharpManifestResourceNameTest.cs (TestInvalidCulture): New.
+
+2009-06-07 Ankit Jain <jankit at novell.com>
+
+ * CscTest.cs (TestDefineConstants): Update DefineConstants to include
+ spaces also.
+
+2009-06-07 Ankit Jain <jankit at novell.com>
+
+ * AssignTargetPathTest.cs: Update tests to not depend on a fixed
+ root (C:\) or cur dir.
+
+2009-05-29 Ankit Jain <jankit at novell.com>
+
+ * TestMessageLogger.cs: Add counts for project/build start/finish
+ events.
+
+2009-04-27 Ankit Jain <jankit at novell.com>
+
+ * CreateVisualBasicManifestResourceNameTest.cs: New.
+
+2009-03-03 Ankit Jain <jankit at novell.com>
+
+ * CscTest.cs (DefineConstants): Add some extra semi-colons,
+ that should get removed on output.
+ (DefineConstants2): New. Test effectively empty define constants.
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * CreateCSharpManifestResourceNameTest.cs (CheckResourceNames):
+ Refactor a bit to improve error reporting.
+ Update to use Path.Combine instead of hardcoding "\".
+
+2009-02-24 Ankit Jain <jankit at novell.com>
+
+ * TestMessageLogger.cs (CheckLoggedMessageHead): Move here from
+ * TaskBatchingTest.cs: .. here. Track api change.
+
+2009-02-21 Ankit Jain <jankit at novell.com>
+
+ * CopyTest.cs: New.
+
+2009-01-31 Ankit Jain <jankit at novell.com>
+
+ * TaskBatchingTest.cs (*): Add tests for target/task events.
+ (TestTargetBatching*): New tests for target batching.
+ * TestMessageLogger.cs: Add counts for target/task started/finished
+ events.
+ (NormalMessageCount): New.
+
2008-12-22 Ankit Jain <jankit at novell.com>
* TestMessageLogger.cs: Emit debug messages to stderr.
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CopyTest.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CopyTest.cs
new file mode 100644
index 0000000..c871503
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CopyTest.cs
@@ -0,0 +1,214 @@
+//
+// CopyTest.cs
+//
+// Author:
+// Ankit Jain (jankit at novell.com)
+//
+// Copyright 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.IO;
+using Microsoft.Build.BuildEngine;
+using NUnit.Framework;
+
+namespace MonoTests.Microsoft.Build.Tasks {
+
+ [TestFixture]
+ public class CopyTest {
+ string source_path, target_path;
+
+ [SetUp]
+ public void CreateDir ()
+ {
+ source_path = Path.Combine (Path.Combine ("Test", "resources"), "Copy");
+ Directory.CreateDirectory (source_path);
+ target_path = Path.Combine (Path.Combine ("Test", "resources"), "Target");
+ Directory.CreateDirectory (target_path);
+ }
+
+ [TearDown]
+ public void RemoveDirectories ()
+ {
+ Directory.Delete (source_path, true);
+ Directory.Delete (target_path, true);
+ }
+
+ [Test]
+ public void TestCopy1 ()
+ {
+ Engine engine;
+ Project project;
+ string file_path = Path.Combine(source_path, "copy.txt");
+ string target_file = Path.Combine (target_path, "copy.txt");
+
+ using (File.CreateText (file_path)) { }
+
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup><DestFile>" + target_file + @"</DestFile></PropertyGroup>
+ <ItemGroup>
+ <SFiles Include='" + file_path + @"'><Md>1</Md></SFiles>
+ <DFiles Include='$(DestFile)'><Mde>2</Mde></DFiles>
+ </ItemGroup>
+ <Target Name='1'>
+ <Copy SourceFiles='@(SFiles)' DestinationFiles='@(DFiles)' SkipUnchangedFiles='true' >
+ <Output TaskParameter='CopiedFiles' ItemName='I0'/>
+ <Output TaskParameter='DestinationFiles' ItemName='I1'/>
+ </Copy>
+ <Message Text=""I0 : @(I0), I1: @(I1)""/>
+ </Target>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+
+ TestMessageLogger testLogger = new TestMessageLogger ();
+ engine.RegisterLogger (testLogger);
+
+ project.LoadXml (documentString);
+
+ if (!project.Build ("1")) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+ Assert.IsTrue (File.Exists (target_file), "A2");
+
+ BuildItemGroup big = project.GetEvaluatedItemsByName ("I0");
+ Assert.AreEqual (1, big.Count, "A3");
+ BuildItem bi = big [0];
+ Assert.AreEqual (target_file, bi.FinalItemSpec, "A4");
+ Assert.AreEqual ("1", bi.GetMetadata ("Md"), "A4");
+ Assert.AreEqual ("2", bi.GetMetadata ("Mde"), "A5");
+
+ big = project.GetEvaluatedItemsByName ("I1");
+ Assert.AreEqual (1, big.Count, "A10");
+ bi = big [0];
+ Assert.AreEqual (target_file, bi.FinalItemSpec, "A11");
+ Assert.AreEqual ("1", bi.GetMetadata ("Md"), "A12");
+ Assert.AreEqual ("2", bi.GetMetadata ("Mde"), "A13");
+
+ // build again, this time files won't get copied because
+ // of SkipUnchangedFiles=true
+ if (!project.Build ("1")) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("Build failed #2");
+ }
+ Assert.IsTrue (File.Exists (target_file), "A20");
+
+ big = project.GetEvaluatedItemsByName ("I0");
+ Assert.AreEqual (1, big.Count, "A21");
+ bi = big [0];
+ Assert.AreEqual (target_file, bi.FinalItemSpec, "A22");
+ Assert.AreEqual ("1", bi.GetMetadata ("Md"), "A23");
+ Assert.AreEqual ("2", bi.GetMetadata ("Mde"), "A24");
+
+ big = project.GetEvaluatedItemsByName ("I1");
+ Assert.AreEqual (1, big.Count, "A25");
+ bi = big [0];
+ Assert.AreEqual (target_file, bi.FinalItemSpec, "A26");
+ Assert.AreEqual ("1", bi.GetMetadata ("Md"), "A27");
+ Assert.AreEqual ("2", bi.GetMetadata ("Mde"), "A28");
+ }
+
+ [Test]
+ public void TestCopy2 ()
+ {
+ Engine engine;
+ Project project;
+ string [] file_paths = new string [] {
+ Path.Combine (source_path, "copy1.txt"),
+ Path.Combine (source_path, "copy2.txt")
+ };
+
+ using (File.CreateText (file_paths[0])) { }
+ using (File.CreateText (file_paths[1])) { }
+
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup><TargetPath>" + target_path + @"</TargetPath></PropertyGroup>
+ <ItemGroup>
+ <SFiles Include='" + file_paths [0] + @"'><Md>1</Md></SFiles>
+ <SFiles Include='" + file_paths [1] + @"'><Md>2</Md></SFiles>
+ </ItemGroup>
+ <Target Name='1'>
+ <Copy SourceFiles='@(SFiles)' DestinationFolder='$(TargetPath)' SkipUnchangedFiles='true' >
+ <Output TaskParameter='CopiedFiles' ItemName='I0'/>
+ <Output TaskParameter='DestinationFiles' ItemName='I1'/>
+ </Copy>
+ </Target>
+ </Project>
+ ";
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+
+ TestMessageLogger testLogger = new TestMessageLogger ();
+ engine.RegisterLogger (testLogger);
+
+ project.LoadXml (documentString);
+
+ if (!project.Build ("1")) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ CheckCopyBuildItems (project, file_paths, target_path, "A1");
+
+ // build again, this time files won't get copied because
+ // of SkipUnchangedFiles=true
+ if (!project.Build ("1")) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("Build failed #2");
+ }
+ CheckCopyBuildItems (project, file_paths, target_path, "A2");
+ }
+
+ void CheckCopyBuildItems (Project project, string [] source_files, string destination_folder, string prefix)
+ {
+ int num = source_files.Length;
+ for (int i = 0; i < num; i ++)
+ Assert.IsTrue (File.Exists (source_files [i]), prefix + " C1");
+
+ BuildItemGroup big = project.GetEvaluatedItemsByName ("I0");
+
+ Assert.AreEqual (num, big.Count, prefix + " C2");
+ for (int i = 0; i < num; i++) {
+ string suffix = (i + 1).ToString ();
+ BuildItem bi = big [i];
+ Assert.AreEqual (Path.Combine (destination_folder, Path.GetFileName (source_files [i])),
+ bi.FinalItemSpec, prefix + " C3 #" + suffix);
+
+ Assert.AreEqual (suffix, bi.GetMetadata ("Md"), prefix + " C4 #" + suffix);
+ }
+
+ big = project.GetEvaluatedItemsByName ("I1");
+ Assert.AreEqual (num, big.Count, prefix + " C6");
+ for (int i = 0; i < num; i++) {
+ string suffix = (i + 1).ToString ();
+ BuildItem bi = big [i];
+ Assert.AreEqual (Path.Combine (destination_folder, Path.GetFileName (source_files [i])),
+ bi.FinalItemSpec, prefix + " C7 #" + suffix);
+ Assert.AreEqual (suffix, bi.GetMetadata ("Md"), prefix + " C8 #" + suffix);
+ }
+ }
+ }
+}
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CreateCSharpManifestResourceNameTest.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CreateCSharpManifestResourceNameTest.cs
index 3466871..8d968f6 100755
--- a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CreateCSharpManifestResourceNameTest.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CreateCSharpManifestResourceNameTest.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.IO;
using System.Text;
using NUnit.Framework;
@@ -16,10 +17,11 @@ namespace MonoTests.Microsoft.Build.Tasks
public CreateCSharpManifestResourceNameTest ()
{
+ string sample_cs_path = Path.Combine ("Test", Path.Combine ("resources", "Sample.cs"));
resx_no_culture_files = new string [,] {
// With dependent file
- { "foo.resx", null, "Test\\resources\\Sample.cs" },
- { "foo.resx", "RandomName", "Test\\resources\\Sample.cs" },
+ { "foo.resx", null, sample_cs_path },
+ { "foo.resx", "RandomName", sample_cs_path },
{ "Test/resources/foo.resx", null, "Sample.cs" },
{ "Test/resources/foo.resx", "RandomName", "Sample.cs" },
@@ -34,8 +36,8 @@ namespace MonoTests.Microsoft.Build.Tasks
resx_with_culture_files = new string [,] {
// With dependent file
- { "foo.de.resx", null, "Test\\resources\\Sample.cs" },
- { "foo.de.resx", "RandomName", "Test\\resources\\Sample.cs" },
+ { "foo.de.resx", null, sample_cs_path },
+ { "foo.de.resx", "RandomName", sample_cs_path },
{ "Test/resources/foo.de.resx", null, "Sample.cs" },
{ "Test/resources/foo.de.resx", "RandomName", "Sample.cs" },
@@ -122,16 +124,16 @@ namespace MonoTests.Microsoft.Build.Tasks
public void TestNonResxNoRootNamespaceWithCulture ()
{
CheckResourceNames (non_resx_with_culture_files, new string [] {
- "de\\foo.txt", "de\\foo.txt",
- "de\\Test.resources.foo.txt", "de\\Test.resources.foo.txt"}, null);
+ Path.Combine ("de", "foo.txt"), Path.Combine ("de", "foo.txt"),
+ Path.Combine ("de", "Test.resources.foo.txt"), Path.Combine ("de", "Test.resources.foo.txt")}, null);
}
[Test]
public void TestNonResxWithRootNamespaceWithCulture ()
{
CheckResourceNames (non_resx_with_culture_files, new string [] {
- "de\\RN1.RN2.foo.txt", "de\\RN1.RN2.foo.txt",
- "de\\RN1.RN2.Test.resources.foo.txt", "de\\RN1.RN2.Test.resources.foo.txt"},
+ Path.Combine ("de", "RN1.RN2.foo.txt"), Path.Combine ("de", "RN1.RN2.foo.txt"),
+ Path.Combine ("de", "RN1.RN2.Test.resources.foo.txt"), Path.Combine ("de", "RN1.RN2.Test.resources.foo.txt")},
"RN1.RN2");
}
@@ -153,6 +155,17 @@ namespace MonoTests.Microsoft.Build.Tasks
"RN1.RN2");
}
+ [Test]
+ public void TestInvalidCulture ()
+ {
+ string [,] files = new string [,] {
+ { "Foo.invalid.txt", null, null },
+ { "Foo.invalid.resx", null, null }
+ };
+ CheckResourceNames (files, new string [] {"RN1.RN2.Foo.invalid.txt", "RN1.RN2.Foo.invalid"},
+ "RN1.RN2");
+ }
+
void CheckResourceNames (string [,] files, string [] names, string rootNamespace)
{
Assert.AreEqual (files.GetUpperBound (0) + 1, names.Length, "Number of files and names must match");
@@ -160,26 +173,25 @@ namespace MonoTests.Microsoft.Build.Tasks
Engine engine = new Engine (Consts.BinPath);
Project project = engine.CreateNewProject ();
- TestMessageLogger testLogger = new TestMessageLogger ();
- engine.RegisterLogger (testLogger);
-
+ TestMessageLogger logger = new TestMessageLogger ();
+ engine.RegisterLogger (logger);
+ Console.WriteLine (projectText);
project.LoadXml (projectText);
- try {
- Assert.IsTrue (project.Build ("1"), "A1, Error building");
-
- BuildItemGroup group = project.GetEvaluatedItemsByName ("ResourceNames");
- Assert.AreEqual (names.Length, group.Count, "A2");
- for (int i = 0; i <= files.GetUpperBound (0); i++) {
- Assert.AreEqual (names [i], group [i].FinalItemSpec, "A3 #" + (i + 1));
- if (files [i, 1] != null)
- Assert.IsTrue (group [i].HasMetadata ("LogicalName"), "A4 #" + (i + 1));
- if (files [i, 2] != null)
- Assert.IsTrue (group [i].HasMetadata ("DependentUpon"), "A5 #" + (i + 1));
- }
- } catch (Exception) {
- Console.WriteLine (projectText);
- testLogger.DumpMessages ();
- throw;
+ if (!project.Build ("1")) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ BuildItemGroup group = project.GetEvaluatedItemsByName ("ResourceNames");
+ Assert.AreEqual (names.Length, group.Count, "A2");
+ for (int i = 0; i <= files.GetUpperBound (0); i++) {
+ Assert.AreEqual (names [i], group [i].FinalItemSpec, "A3 #" + (i + 1));
+ Assert.AreEqual (files [i, 1] != null, group [i].HasMetadata ("LogicalName"), "A4 #" + (i + 1));
+ if (files [i, 1] != null)
+ Assert.AreEqual (files [i, 1], group [i].GetMetadata ("LogicalName"), "A5 #" + (i + 1));
+ Assert.AreEqual (files [i, 2] != null, group [i].HasMetadata ("DependentUpon"), "A6 #" + (i + 1));
+ if (files [i, 2] != null)
+ Assert.AreEqual (files [i, 2], group [i].GetMetadata ("DependentUpon"), "A7 #" + (i + 1));
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CreateVisualBasicManifestResourceNameTest.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CreateVisualBasicManifestResourceNameTest.cs
new file mode 100644
index 0000000..d980e56
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CreateVisualBasicManifestResourceNameTest.cs
@@ -0,0 +1,216 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+using NUnit.Framework;
+using Microsoft.Build.BuildEngine;
+
+namespace MonoTests.Microsoft.Build.Tasks
+{
+ [TestFixture]
+ public class CreateVisualBasicManifestResourceNameTest
+ {
+
+ string [,] resx_no_culture_files, resx_with_culture_files;
+ string [,] non_resx_no_culture_files, non_resx_with_culture_files;
+
+ public CreateVisualBasicManifestResourceNameTest ()
+ {
+ string sample_vb_path = Path.Combine ("Test", Path.Combine ("resources", "Sample.vb"));
+ resx_no_culture_files = new string [,] {
+ // With dependent file
+ { "foo.resx", null, sample_vb_path },
+ { "foo.resx", "RandomName", sample_vb_path },
+
+ { "Test/resources/foo.resx", null, "Sample.vb" },
+ { "Test/resources/foo.resx", "RandomName", "Sample.vb" },
+
+ // W/o dependent file
+ { "foo.resx", null, null },
+ { "foo.resx", "RandomName", null },
+
+ { "Test/resources/foo.resx", null, null },
+ { "Test/resources/foo.resx", "RandomName", null },
+ };
+
+ resx_with_culture_files = new string [,] {
+ // With dependent file
+ { "foo.de.resx", null, sample_vb_path },
+ { "foo.de.resx", "RandomName", sample_vb_path },
+
+ { "Test/resources/foo.de.resx", null, "Sample.vb" },
+ { "Test/resources/foo.de.resx", "RandomName", "Sample.vb" },
+
+ // W/o dependent file
+ { "foo.de.resx", null, null },
+ { "foo.de.resx", "RandomName", null },
+
+ { "Test/resources/foo.de.resx", null, null },
+ { "Test/resources/foo.de.resx", "RandomName", null }
+ };
+
+ non_resx_no_culture_files = new string [,] {
+ { "foo.txt", null, null },
+ { "foo.txt", "RandomName", null },
+
+ { "Test/resources/foo.txt", null, null },
+ { "Test/resources/foo.txt", "RandomName", null }
+ };
+
+ non_resx_with_culture_files = new string [,] {
+ { "foo.de.txt", null, null },
+ { "foo.de.txt", "RandomName", null },
+
+ { "Test/resources/foo.de.txt", null, null },
+ { "Test/resources/foo.de.txt", "RandomName", null }
+ };
+
+ }
+
+ [Test]
+ public void TestNoRootNamespaceNoCulture ()
+ {
+ CheckResourceNames (resx_no_culture_files, new string [] {
+ // w/ dependent file
+ "Mono.Tests.Sample", "Mono.Tests.Sample",
+ "Mono.Tests.Sample", "Mono.Tests.Sample",
+
+ // W/o dependent file
+ "foo", "foo" ,
+ "foo", "foo"}, null);
+ }
+
+ [Test]
+ public void TestWithRootNamespaceNoCulture ()
+ {
+ //FIXME: How does LogicalName affect things??
+ CheckResourceNames (resx_no_culture_files, new string [] {
+ // With dependent file
+ "RN1.RN2.Mono.Tests.Sample", "RN1.RN2.Mono.Tests.Sample",
+ "RN1.RN2.Mono.Tests.Sample", "RN1.RN2.Mono.Tests.Sample",
+ // W/o dependent file
+ "RN1.RN2.foo", "RN1.RN2.foo",
+ "RN1.RN2.foo", "RN1.RN2.foo"},
+ "RN1.RN2");
+ }
+
+ [Test]
+ public void TestNoRootNamespaceWithCulture ()
+ {
+ CheckResourceNames (resx_with_culture_files, new string [] {
+ // With dependent file
+ "Mono.Tests.Sample.de", "Mono.Tests.Sample.de",
+ "Mono.Tests.Sample.de", "Mono.Tests.Sample.de",
+ // W/o dependent file
+ "foo.de", "foo.de",
+ "foo.de", "foo.de" }, null);
+ }
+
+ [Test]
+ public void TestWithRootNamespaceWithCulture ()
+ {
+ CheckResourceNames (resx_with_culture_files, new string [] {
+ // With dependent file
+ "RN1.RN2.Mono.Tests.Sample.de", "RN1.RN2.Mono.Tests.Sample.de",
+ "RN1.RN2.Mono.Tests.Sample.de", "RN1.RN2.Mono.Tests.Sample.de",
+ // W/o dependent file
+ "RN1.RN2.foo.de", "RN1.RN2.foo.de",
+ "RN1.RN2.foo.de", "RN1.RN2.foo.de"},
+ "RN1.RN2");
+ }
+
+ [Test]
+ public void TestNonResxNoRootNamespaceWithCulture ()
+ {
+ CheckResourceNames (non_resx_with_culture_files, new string [] {
+ Path.Combine ("de", "foo.txt"), Path.Combine ("de", "foo.txt"),
+ Path.Combine ("de", "foo.txt"), Path.Combine ("de", "foo.txt")}, null);
+ }
+
+ [Test]
+ public void TestNonResxWithRootNamespaceWithCulture ()
+ {
+ CheckResourceNames (non_resx_with_culture_files, new string [] {
+ Path.Combine ("de", "RN1.RN2.foo.txt"), Path.Combine ("de", "RN1.RN2.foo.txt"),
+ Path.Combine ("de", "RN1.RN2.foo.txt"), Path.Combine ("de", "RN1.RN2.foo.txt")},
+ "RN1.RN2");
+ }
+
+ [Test]
+ public void TestNonResxNoRootNamespaceNoCulture ()
+ {
+ CheckResourceNames (non_resx_no_culture_files, new string [] {
+ "foo.txt", "foo.txt",
+ "foo.txt", "foo.txt"}, null);
+ }
+
+ [Test]
+ public void TestNonResxWithRootNamespaceNoCulture ()
+ {
+ CheckResourceNames (non_resx_no_culture_files, new string [] {
+ // With dependent file
+ "RN1.RN2.foo.txt", "RN1.RN2.foo.txt",
+ "RN1.RN2.foo.txt", "RN1.RN2.foo.txt"},
+ "RN1.RN2");
+ }
+
+ void CheckResourceNames (string [,] files, string [] names, string rootNamespace)
+ {
+ Assert.AreEqual (files.GetUpperBound (0) + 1, names.Length, "Number of files and names must match");
+ string projectText = CreateProject (files, rootNamespace);
+
+ Engine engine = new Engine (Consts.BinPath);
+ Project project = engine.CreateNewProject ();
+ TestMessageLogger logger = new TestMessageLogger ();
+ engine.RegisterLogger (logger);
+ Console.WriteLine (projectText);
+ project.LoadXml (projectText);
+ if (!project.Build ("1")) {
+ logger.DumpMessages ();
+ Assert.Fail ("Build failed");
+ }
+
+ BuildItemGroup group = project.GetEvaluatedItemsByName ("ResourceNames");
+ Assert.AreEqual (names.Length, group.Count, "A2");
+ for (int i = 0; i <= files.GetUpperBound (0); i++) {
+ Assert.AreEqual (names [i], group [i].FinalItemSpec, "A3 #" + (i + 1));
+ Assert.AreEqual (files [i, 1] != null, group [i].HasMetadata ("LogicalName"), "A4 #" + (i + 1));
+ if (files [i, 1] != null)
+ Assert.AreEqual (files [i, 1], group [i].GetMetadata ("LogicalName"), "A5 #" + (i + 1));
+ Assert.AreEqual (files [i, 2] != null, group [i].HasMetadata ("DependentUpon"), "A6 #" + (i + 1));
+ if (files [i, 2] != null)
+ Assert.AreEqual (files [i, 2], group [i].GetMetadata ("DependentUpon"), "A7 #" + (i + 1));
+ }
+ }
+
+ string CreateProject (string [,] files, string rootNamespace)
+ {
+ StringBuilder sb = new StringBuilder ();
+ sb.Append ("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n");
+
+ sb.Append ("\t<ItemGroup>\n");
+ for (int i = 0; i <= files.GetUpperBound (0); i ++) {
+ sb.AppendFormat ("\t\t<ResourceFiles Include = \"{0}\">\n", files [i, 0]);
+ if (files [i, 1] != null)
+ sb.AppendFormat ("\t\t\t<LogicalName>{0}</LogicalName>\n", files [i, 1]);
+ if (files [i, 2] != null)
+ sb.AppendFormat ("\t\t\t<DependentUpon>{0}</DependentUpon>\n", files [i, 2]);
+ sb.AppendFormat ("\t\t</ResourceFiles>\n");
+ }
+ sb.Append ("\t</ItemGroup>\n");
+
+ sb.Append ("\t<Target Name=\"1\">\n");
+ sb.Append ("\t\t<CreateVisualBasicManifestResourceName ResourceFiles=\"@(ResourceFiles)\" ");
+ if (rootNamespace != null)
+ sb.AppendFormat (" RootNamespace = \"{0}\"", rootNamespace);
+ sb.Append (">\n \t\t\t<Output TaskParameter=\"ManifestResourceNames\" ItemName=\"ResourceNames\" />\n");
+ sb.Append ("\t\t</CreateVisualBasicManifestResourceName>\n\t</Target>\n");
+ sb.Append ("\t<UsingTask TaskName=\"Microsoft.Build.Tasks.CreateVisualBasicManifestResourceName\" " +
+ "AssemblyName=\"Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\"/>\n");
+ sb.Append ("</Project>");
+
+ return sb.ToString ();
+ }
+ }
+}
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CscTest.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CscTest.cs
index ba1dc3e..46019d7 100644
--- a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CscTest.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CscTest.cs
@@ -348,11 +348,26 @@ namespace MonoTests.Microsoft.Build.Tasks {
CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();
- csc.DefineConstants = "A;B";
+ csc.DefineConstants = "A;B;;CD;;;Foo Bar";
csc.ARFC (c1);
csc.ACLC (c2);
- Assert.AreEqual ("/define:A;B", c1.ToString (), "A1");
+ Assert.AreEqual ("/define:A;B;CD;Foo;Bar", c1.ToString (), "A1");
+ Assert.AreEqual (String.Empty, c2.ToString (), "A2");
+ }
+
+ [Test]
+ public void TestDefineConstants2 ()
+ {
+ CscExtended csc = new CscExtended ();
+ CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
+ CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();
+
+ csc.DefineConstants = ";;;";
+ csc.ARFC (c1);
+ csc.ACLC (c2);
+
+ Assert.AreEqual (String.Empty, c1.ToString (), "A1");
Assert.AreEqual (String.Empty, c2.ToString (), "A2");
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/TaskBatchingTest.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/TaskBatchingTest.cs
index 337957d..fa1b481 100644
--- a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/TaskBatchingTest.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/TaskBatchingTest.cs
@@ -83,6 +83,8 @@ namespace MonoTests.Microsoft.Build.Tasks
CheckMessage (testLogger, "en", "Item3", "A3");
CheckMessage (testLogger, "gb", "Item4", "A4");
CheckMessage (testLogger, "it", "Item6", "A5");
+
+ CheckEngineEventCounts (testLogger, 1, 1, 4, 4);
}
// Test1 with unqualified %(Culture)
@@ -130,6 +132,8 @@ namespace MonoTests.Microsoft.Build.Tasks
CheckMessage (testLogger, "en", "Item3", "A3");
CheckMessage (testLogger, "gb", "Item4", "A4");
CheckMessage (testLogger, "it", "Item6", "A5");
+
+ CheckEngineEventCounts (testLogger, 1, 1, 4, 4);
}
[Test]
@@ -162,7 +166,11 @@ namespace MonoTests.Microsoft.Build.Tasks
//Fails as Culture is being referenced unqualified, and no Culture is
//specified for "Item5"
- Assert.IsFalse (project.Build ("ShowMessage"), "A1: Build should have failed");
+ bool result = project.Build ("ShowMessage");
+ if (result)
+ Assert.Fail ("A1: Build should have failed");
+
+ CheckEngineEventCounts (testLogger, 1, 1, 0, 0);
}
[Test]
@@ -200,6 +208,7 @@ namespace MonoTests.Microsoft.Build.Tasks
CheckMessage (testLogger, "fr", "Item1", "A2");
CheckMessage (testLogger, "", "Item5", "A3");
CheckMessage (testLogger, "it", "Item6", "A3");
+ CheckEngineEventCounts (testLogger, 1, 1, 3, 3);
}
[Test]
@@ -253,6 +262,7 @@ namespace MonoTests.Microsoft.Build.Tasks
CheckMessage2 (testLogger, "en", "Item3", "Item8;Item9", "A3");
CheckMessage2 (testLogger, "gb", "Item4", string.Empty, "A4");
CheckMessage2 (testLogger, "it", "Item6", "Item7", "A6");
+ CheckEngineEventCounts (testLogger, 1, 1, 4, 4);
}
[Test]
@@ -303,7 +313,8 @@ namespace MonoTests.Microsoft.Build.Tasks
project.LoadXml (projectString);
Assert.IsTrue (project.Build ("ShowMessage"), "A1: Build failed");
- CheckLoggedMessageHead (testLogger, "ResXFiles: Item1;Item2 NonResXFiles: ", "A2");
+ testLogger.CheckLoggedMessageHead ("ResXFiles: Item1;Item2 NonResXFiles: ", "A2");
+ CheckEngineEventCounts (testLogger, 1, 1, 1, 1);
}
[Test]
@@ -352,6 +363,7 @@ namespace MonoTests.Microsoft.Build.Tasks
CheckLoggedMessageAny (testLogger, "Number: 3 Color: Green-- Items in ExampColl: ExampColl2: Item6", "A4");
CheckLoggedMessageAny (testLogger, "Number: 2 Color: -- Items in ExampColl: Item2 ExampColl2: ", "A5");
Assert.AreEqual (0, testLogger.Count, "A6");
+ CheckEngineEventCounts (testLogger, 1, 1, 4, 4);
}
[Test]
@@ -386,6 +398,7 @@ namespace MonoTests.Microsoft.Build.Tasks
Project project = engine.CreateNewProject ();
TestMessageLogger testLogger = new TestMessageLogger ();
+ engine.RegisterLogger (testLogger);
project.LoadXml (projectString);
Assert.IsTrue (project.Build ("Build"), "A1: Build failed");
@@ -402,6 +415,8 @@ namespace MonoTests.Microsoft.Build.Tasks
additional_metadata = new string [,] { { "Identity", "file3.txt" } };
CreateItemTest.CheckBuildItem (include [2], "GroupC", additional_metadata, "file3.txt", "A5");
CreateItemTest.CheckBuildItem (include [3], "GroupC", additional_metadata, "file3.txt", "A6");
+
+ CheckEngineEventCounts (testLogger, 1, 1, 5, 5);
}
[Test]
@@ -438,6 +453,7 @@ namespace MonoTests.Microsoft.Build.Tasks
CheckLoggedMessageAny (testLogger, "Identity: Item5 -- Items in ExampColl: Item5", "A6");
CheckLoggedMessageAny (testLogger, "Identity: Item6 -- Items in ExampColl: Item6", "A7");
Assert.AreEqual (0, testLogger.Count, "A8");
+ CheckEngineEventCounts (testLogger, 1, 1, 6, 6);
}
[Test]
@@ -488,27 +504,370 @@ namespace MonoTests.Microsoft.Build.Tasks
additional_metadata = new string [,] { { "Identity", "apricot" } };
CreateItemTest.CheckBuildItem (include [2], "Final", additional_metadata, "apricot", "A5");
+ CheckEngineEventCounts (testLogger, 1, 1, 2, 2);
}
+ //Target batching
- void CheckMessage (TestMessageLogger logger, string culture, string items, string id)
+ [Test]
+ public void TestTargetBatching1 ()
{
- CheckLoggedMessageHead (logger, String.Format ("Culture: {0} -- ResXFile: {1}", culture, items), id);
+ string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <List1 Include=""fr_a.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""en_b.txt""><Culture>en</Culture></List1>
+ <List1 Include=""fr_c.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""gb_d.txt""><Culture>gb</Culture></List1>
+
+ <List2 Include=""fr_x.txt""><Culture>fr</Culture></List2>
+ <List2 Include=""gb_z.txt""><Culture>gb</Culture></List2>
+
+ <Foo Include=""1_a1""><Md>1</Md></Foo>
+ <Foo Include=""2_b1""><Md>2</Md></Foo>
+ <Foo Include=""1_c1""><Md>1</Md></Foo>
+ </ItemGroup>
+
+ <Target Name=""foo"" >
+ <Message Text=""TargetStarted""/>
+ <Message Text=""List1: @(List1): %(Culture)""/>
+ <Message Text=""Foo: @(Foo): %(Md)""/>
+ </Target>
+ </Project>";
+
+ Engine engine = new Engine (Consts.BinPath);
+ Project project = engine.CreateNewProject ();
+
+ TestMessageLogger testLogger = new TestMessageLogger ();
+ engine.RegisterLogger (testLogger);
+
+ project.LoadXml (projectString);
+ bool res = project.Build ("foo");
+ if (!res) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("A1: Build failed");
+ }
+
+ CheckLoggedMessagesInOrder (testLogger, new string [] {
+ "TargetStarted", "List1: fr_a.txt;fr_c.txt: fr",
+ "List1: en_b.txt: en", "List1: gb_d.txt: gb",
+ "Foo: 1_a1;1_c1: 1", "Foo: 2_b1: 2"
+ }, "A2");
+ CheckEngineEventCounts (testLogger, 1, 1, 6, 6);
}
- void CheckMessage2 (TestMessageLogger logger, string culture, string resx_files, string nonresx_files, string id)
+ [Test]
+ public void TestTargetBatching2 ()
{
- CheckLoggedMessageHead (logger, String.Format ("Culture: {0} -- ResXFiles: {1} NonResXFiles: {2}", culture, resx_files, nonresx_files), id);
+ string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <List1 Include=""fr_a.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""en_b.txt""><Culture>en</Culture></List1>
+ <List1 Include=""fr_c.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""gb_d.txt""><Culture>gb</Culture></List1>
+
+ <List2 Include=""fr_x.txt""><Culture>fr</Culture></List2>
+ <List2 Include=""gb_z.txt""><Culture>gb</Culture></List2>
+
+ <Foo Include=""1_a1""><Md>1</Md></Foo>
+ <Foo Include=""2_b1""><Md>2</Md></Foo>
+ <Foo Include=""1_c1""><Md>1</Md></Foo>
+ </ItemGroup>
+
+ <Target Name=""foo"" Inputs=""@(List1)"" Outputs=""%(Culture).foo"">
+ <Message Text=""TargetStarted""/>
+ <Message Text=""List1: @(List1): %(Culture)""/>
+ <Message Text=""Foo: @(Foo): %(Md)""/>
+ </Target>
+ </Project>";
+
+ Engine engine = new Engine (Consts.BinPath);
+ Project project = engine.CreateNewProject ();
+
+ TestMessageLogger testLogger = new TestMessageLogger ();
+ engine.RegisterLogger (testLogger);
+
+ project.LoadXml (projectString);
+ bool res = project.Build ("foo");
+ if (!res) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("A1: Build failed");
+ }
+
+ CheckLoggedMessagesInOrder (testLogger, new string [] {
+ "TargetStarted", "List1: fr_a.txt;fr_c.txt: fr",
+ "Foo: 1_a1;1_c1: 1", "Foo: 2_b1: 2",
+
+ "TargetStarted", "List1: en_b.txt: en",
+ "Foo: 1_a1;1_c1: 1", "Foo: 2_b1: 2",
+
+ "TargetStarted", "List1: gb_d.txt: gb",
+ "Foo: 1_a1;1_c1: 1", "Foo: 2_b1: 2"
+ }, "A2");
+ CheckEngineEventCounts (testLogger, 3, 3, 12, 12);
}
- void CheckLoggedMessageHead (TestMessageLogger logger, string expected, string id)
+ [Test]
+ public void TestTargetBatching3 ()
{
- string actual;
- int result = logger.CheckHead (expected, MessageImportance.Normal, out actual);
- if (result == 1)
- Assert.Fail ("{0}: Expected message '{1}' was not emitted.", id, expected);
- if (result == 2)
- Assert.AreEqual (expected, actual, id);
+ string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <List1 Include=""fr_a.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""en_b.txt""><Culture>en</Culture></List1>
+ <List1 Include=""fr_c.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""gb_d.txt""><Culture>gb</Culture></List1>
+
+ <List2 Include=""fr_x.txt""><Culture>fr</Culture></List2>
+ <List2 Include=""gb_z.txt""><Culture>gb</Culture></List2>
+
+ <Foo Include=""1_a1""><Md>1</Md></Foo>
+ <Foo Include=""2_b1""><Md>2</Md></Foo>
+ <Foo Include=""1_c1""><Md>1</Md></Foo>
+ </ItemGroup>
+ <Target Name=""foo"" Inputs=""@(Foo)"" Outputs=""%(Md).foo"">
+ <Message Text=""TargetStarted""/>
+ <Message Text=""List1: @(List1): %(Culture)""/>
+ <Message Text=""Foo: @(Foo): %(Md)""/>
+ </Target>
+ </Project>";
+
+ Engine engine = new Engine (Consts.BinPath);
+ Project project = engine.CreateNewProject ();
+
+ TestMessageLogger testLogger = new TestMessageLogger ();
+ engine.RegisterLogger (testLogger);
+
+ project.LoadXml (projectString);
+ bool res = project.Build ("foo");
+ if (!res) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("A1: Build failed");
+ }
+
+ CheckLoggedMessagesInOrder (testLogger, new string [] {
+ "TargetStarted", "List1: fr_a.txt;fr_c.txt: fr",
+ "List1: en_b.txt: en", "List1: gb_d.txt: gb",
+ "Foo: 1_a1;1_c1: 1",
+ "TargetStarted", "List1: fr_a.txt;fr_c.txt: fr",
+ "List1: en_b.txt: en", "List1: gb_d.txt: gb",
+ "Foo: 2_b1: 2"
+ }, "A2");
+ CheckEngineEventCounts (testLogger, 2, 2, 10, 10);
+ }
+
+ [Test]
+ public void TestTargetBatching4 ()
+ {
+ string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <List1 Include=""fr_a.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""en_b.txt""><Culture>en</Culture></List1>
+ <List1 Include=""fr_c.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""gb_d.txt""><Culture>gb</Culture></List1>
+
+ <List2 Include=""fr_x.txt""><Culture>fr</Culture></List2>
+ <List2 Include=""gb_z.txt""><Culture>gb</Culture></List2>
+
+ <Foo Include=""1_a1""><Md>1</Md></Foo>
+ <Foo Include=""2_b1""><Md>2</Md></Foo>
+ <Foo Include=""1_c1""><Md>1</Md></Foo>
+ </ItemGroup>
+ <Target Name=""foo"" Inputs=""@(List1)"" Outputs=""%(Culture).foo"">
+ <Message Text=""TargetStarted""/>
+ <Message Text=""List1: @(List1): %(Culture)""/>
+ <Message Text=""List2: @(List2): %(Culture)""/>
+ <Message Text=""Foo: @(Foo): %(Md)""/>
+ </Target>
+ </Project>";
+
+ Engine engine = new Engine (Consts.BinPath);
+ Project project = engine.CreateNewProject ();
+
+ TestMessageLogger testLogger = new TestMessageLogger ();
+ engine.RegisterLogger (testLogger);
+
+ project.LoadXml (projectString);
+ bool res = project.Build ("foo");
+ if (!res) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("A1: Build failed");
+ }
+
+ CheckLoggedMessagesInOrder (testLogger, new string [] {
+ "TargetStarted", "List1: fr_a.txt;fr_c.txt: fr",
+ "List2: fr_x.txt: fr", "List2: gb_z.txt: gb",
+ "Foo: 1_a1;1_c1: 1", "Foo: 2_b1: 2",
+
+ "TargetStarted", "List1: en_b.txt: en",
+ "List2: fr_x.txt: fr", "List2: gb_z.txt: gb",
+ "Foo: 1_a1;1_c1: 1", "Foo: 2_b1: 2",
+
+ "TargetStarted", "List1: gb_d.txt: gb",
+ "List2: fr_x.txt: fr", "List2: gb_z.txt: gb",
+ "Foo: 1_a1;1_c1: 1", "Foo: 2_b1: 2"
+ }, "A2");
+ CheckEngineEventCounts (testLogger, 3, 3, 18, 18);
+ }
+
+ [Test]
+ public void TestTargetBatching5 ()
+ {
+ string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <Target Name=""foo"" Inputs=""@(List1)"" Outputs=""%(Culture).foo"">
+ <Message Text=""TargetStarted""/>
+ </Target>
+ </Project>";
+
+ Engine engine = new Engine (Consts.BinPath);
+ Project project = engine.CreateNewProject ();
+
+ TestMessageLogger testLogger = new TestMessageLogger ();
+ engine.RegisterLogger (testLogger);
+
+ project.LoadXml (projectString);
+ bool res = project.Build ("foo");
+ if (!res) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("A1: Build failed");
+ }
+ Assert.AreEqual (1, testLogger.CheckAny ("TargetStarted", MessageImportance.Normal),
+ "A2: Target should've been skipped because of no inputs");
+ CheckEngineEventCounts (testLogger, 1, 1, 0, 0);
+ }
+
+ [Test]
+ public void TestTargetBatching6 ()
+ {
+ string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <List1 Include=""fr_a.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""en_b.txt""><Culture>en</Culture></List1>
+ <List1 Include=""fr_c.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""gb_d.txt""><Culture>gb</Culture></List1>
+
+ <List3 Include=""fr_x.txt""><Culture>fr</Culture></List3>
+ <List3 Include=""gb_z.txt""><Culture>gb</Culture></List3>
+
+ <Foo Include=""1_a1""><Md>1</Md></Foo>
+ <Foo Include=""2_b1""><Md>2</Md></Foo>
+ <Foo Include=""1_c1""><Md>1</Md></Foo>
+ </ItemGroup>
+
+ <Target Name=""foo"" Inputs=""@(List1);@(List2)"" Outputs=""%(Culture).foo"">
+ <Message Text=""TargetStarted"" />
+ <Message Text=""List1: %(List1.Culture), List2: %(List2.Culture)"" />
+ <Message Text=""List2: @(List2), Culture: %(Culture)"" />
+ <Message Text=""List3: @(List3), Culture: %(Culture)"" />
+ </Target>
+ </Project>";
+
+ Engine engine = new Engine (Consts.BinPath);
+ Project project = engine.CreateNewProject ();
+
+ TestMessageLogger testLogger = new TestMessageLogger ();
+ engine.RegisterLogger (testLogger);
+
+ project.LoadXml (projectString);
+ bool res = project.Build ("foo");
+ if (!res) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("A1: Build failed");
+ }
+
+ CheckLoggedMessagesInOrder (testLogger, new string [] {
+ "TargetStarted",
+ "List1: fr, List2: ",
+ "List2: , Culture: ",
+ "List3: fr_x.txt, Culture: fr",
+ "List3: gb_z.txt, Culture: gb",
+
+ "TargetStarted",
+ "List1: en, List2: ",
+ "List2: , Culture: ",
+ "List3: fr_x.txt, Culture: fr",
+ "List3: gb_z.txt, Culture: gb",
+
+ "TargetStarted",
+ "List1: gb, List2: ",
+ "List2: , Culture: ",
+ "List3: fr_x.txt, Culture: fr",
+ "List3: gb_z.txt, Culture: gb"
+ }, "A2");
+ CheckEngineEventCounts (testLogger, 3, 3, 15, 15);
+ }
+
+ [Test]
+ public void TestTargetBatching7 ()
+ {
+ string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <List1 Include=""fr_a.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""en_b.txt""><Culture>en</Culture></List1>
+ <List1 Include=""fr_c.txt""><Culture>fr</Culture></List1>
+ <List1 Include=""gb_d.txt""><Culture>gb</Culture></List1>
+
+ <List2 Include=""fr_x.txt""><Culture>fr</Culture></List2>
+ <List2 Include=""gb_z.txt""><Culture>gb</Culture></List2>
+
+ <Foo Include=""1_a1""><Md>1</Md></Foo>
+ <Foo Include=""2_b1""><Md>2</Md></Foo>
+ <Foo Include=""1_c1""><Md>1</Md></Foo>
+ </ItemGroup>
+
+ <Target Name=""foo"" Inputs=""@(List1);@(List2)"" Outputs=""%(Culture).foo"">
+ <Message Text=""TargetStarted"" />
+ <Message Text=""List1: @(List1), List2: @(List2)""/>
+ </Target>
+ </Project>";
+
+ Engine engine = new Engine (Consts.BinPath);
+ Project project = engine.CreateNewProject ();
+
+ TestMessageLogger testLogger = new TestMessageLogger ();
+ engine.RegisterLogger (testLogger);
+
+ project.LoadXml (projectString);
+ bool res = project.Build ("foo");
+ if (!res) {
+ testLogger.DumpMessages ();
+ Assert.Fail ("A1: Build failed");
+ }
+
+ CheckLoggedMessagesInOrder (testLogger, new string [] {
+ "TargetStarted",
+ "List1: fr_a.txt;fr_c.txt, List2: fr_x.txt",
+
+ "TargetStarted",
+ "List1: en_b.txt, List2: ",
+
+ "TargetStarted",
+ "List1: gb_d.txt, List2: gb_z.txt"
+ }, "A2");
+ CheckEngineEventCounts (testLogger, 3, 3, 6, 6);
+ }
+
+ void CheckLoggedMessagesInOrder (TestMessageLogger logger, string [] values, string prefix)
+ {
+ try {
+ for (int i = 0; i < values.Length; i++) {
+ logger.CheckLoggedMessageHead (values [i], prefix + "#" + i);
+ }
+ if (logger.NormalMessageCount > 0)
+ Assert.Fail ("{0}: Expected {1} messages, but found {2}",
+ prefix, values.Length, values.Length + logger.NormalMessageCount);
+ } catch (NUnit.Framework.AssertionException) {
+ logger.DumpMessages ();
+ throw;
+ }
+ }
+
+ void CheckMessage (TestMessageLogger logger, string culture, string items, string id)
+ {
+ logger.CheckLoggedMessageHead (String.Format ("Culture: {0} -- ResXFile: {1}", culture, items), id);
+ }
+
+ void CheckMessage2 (TestMessageLogger logger, string culture, string resx_files, string nonresx_files, string id)
+ {
+ logger.CheckLoggedMessageHead (String.Format ("Culture: {0} -- ResXFiles: {1} NonResXFiles: {2}", culture, resx_files, nonresx_files), id);
}
void CheckLoggedMessageAny (TestMessageLogger logger, string expected, string id)
@@ -516,5 +875,13 @@ namespace MonoTests.Microsoft.Build.Tasks
if (logger.CheckAny (expected, MessageImportance.Normal) == 1)
Assert.Fail ("{0}: Expected message '{1}' was not emitted.", id, expected);
}
+
+ void CheckEngineEventCounts (TestMessageLogger logger, int target_start, int target_finish, int task_start, int task_finish)
+ {
+ Assert.AreEqual (target_start, logger.TargetStarted, "TargetStarted event count doesn't match");
+ Assert.AreEqual (target_finish, logger.TargetFinished, "TargetFinished event count doesn't match");
+ Assert.AreEqual (task_start, logger.TaskStarted, "TaskStarted event count doesn't match");
+ Assert.AreEqual (task_finish, logger.TaskFinished, "TaskFinished event count doesn't match");
+ }
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/TestMessageLogger.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/TestMessageLogger.cs
index f78a15e..29390e2 100644
--- a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/TestMessageLogger.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/TestMessageLogger.cs
@@ -2,18 +2,71 @@ using Microsoft.Build.Framework;
using System.Collections;
using System;
using System.Collections.Generic;
+using NUnit.Framework;
namespace MonoTests.Microsoft.Build.Tasks
{
internal class TestMessageLogger : ILogger
{
List<BuildMessageEventArgs> messages;
- List<BuildEventArgs> errorsAndWarnings;
+ List<BuildEventArgs> all_messages;
+ int target_started, target_finished;
+ int task_started, task_finished;
+ int project_started, project_finished;
+ int build_started, build_finished;
+
+ public int BuildStarted
+ {
+ get { return build_started; }
+ set { build_started = value; }
+ }
+
+ public int BuildFinished
+ {
+ get { return build_finished; }
+ set { build_finished = value; }
+ }
public TestMessageLogger ()
{
messages = new List<BuildMessageEventArgs> ();
- errorsAndWarnings = new List<BuildEventArgs> ();
+ all_messages = new List<BuildEventArgs> ();
+ }
+
+ public int ProjectStarted
+ {
+ get { return project_started; }
+ set { project_started = value; }
+ }
+
+ public int ProjectFinished
+ {
+ get { return project_finished; }
+ set { project_finished = value; }
+ }
+
+ public int TargetFinished
+ {
+ get { return target_finished; }
+ set { target_finished = value; }
+ }
+
+ public int TargetStarted
+ {
+ get { return target_started; }
+ set { target_started = value; }
+ }
+
+ public int TaskStarted
+ {
+ get { return task_started; }
+ set { task_started = value; }
+ }
+
+ public int TaskFinished
+ {
+ get { return task_finished; }
+ set { task_finished = value; }
}
public int Count
@@ -28,8 +81,16 @@ namespace MonoTests.Microsoft.Build.Tasks
public void Initialize (IEventSource eventSource)
{
eventSource.MessageRaised += new BuildMessageEventHandler (MessageHandler);
- eventSource.ErrorRaised += new BuildErrorEventHandler (ErrorHandler);
- eventSource.WarningRaised += new BuildWarningEventHandler (WarningHandler);
+ eventSource.ErrorRaised += new BuildErrorEventHandler (AllMessagesHandler);
+ eventSource.WarningRaised += new BuildWarningEventHandler(AllMessagesHandler);
+ eventSource.TargetStarted += delegate { target_started++; };
+ eventSource.TargetFinished += delegate { target_finished++; };
+ eventSource.TaskStarted += delegate { task_started++; };
+ eventSource.TaskFinished += delegate { task_finished++; };
+ eventSource.ProjectStarted += delegate(object sender, ProjectStartedEventArgs args) { project_started++; Console.WriteLine ("Project started: {0}", args.ProjectFile); };
+ eventSource.ProjectFinished += delegate (object sender, ProjectFinishedEventArgs args) { project_finished++; Console.WriteLine ("Project finished: {0}", args.ProjectFile); };
+ eventSource.BuildStarted += delegate { build_started ++; };
+ eventSource.BuildFinished += delegate { build_finished++; };
}
public void Shutdown ()
@@ -40,16 +101,23 @@ namespace MonoTests.Microsoft.Build.Tasks
{
if (args.Message.StartsWith ("Using") == false)
messages.Add (args);
+ all_messages.Add (args);
}
- private void ErrorHandler (object sender, BuildEventArgs args)
+ private void AllMessagesHandler (object sender, BuildEventArgs args)
{
- errorsAndWarnings.Add (args);
+ all_messages.Add (args);
}
- private void WarningHandler (object sender, BuildEventArgs args)
- {
- errorsAndWarnings.Add (args);
+ public int NormalMessageCount {
+ get
+ {
+ int count = 0, i = 0;
+ while (i ++ < messages.Count)
+ if (messages [i - 1].Importance == MessageImportance.Normal)
+ count++;
+ return count;
+ }
}
public int CheckHead (string text, MessageImportance importance)
@@ -60,17 +128,25 @@ namespace MonoTests.Microsoft.Build.Tasks
public int CheckHead (string text, MessageImportance importance, out string actual_msg)
{
- BuildMessageEventArgs actual;
+ BuildMessageEventArgs actual = null;
actual_msg = String.Empty;
if (messages.Count > 0) {
- actual = messages [0];
- messages.RemoveAt (0);
+ //find first @importance level message
+ int i = -1;
+ while (++i < messages.Count && messages [i].Importance != importance)
+ ;
+
+ if (i < messages.Count) {
+ actual = messages [i];
+ messages.RemoveAt (i);
+ }
} else
return 1;
- actual_msg = actual.Message;
- if (text == actual.Message && importance == actual.Importance)
+ if (actual != null)
+ actual_msg = actual.Message;
+ if (actual != null && text == actual_msg && importance == actual.Importance)
return 0;
else
return 2;
@@ -102,12 +178,21 @@ namespace MonoTests.Microsoft.Build.Tasks
public void DumpMessages ()
{
- foreach (BuildEventArgs arg in errorsAndWarnings)
- Console.WriteLine ("{0} {1}", (arg is BuildErrorEventArgs) ? "Err:" : "Warn:", arg.Message);
-
- foreach (BuildMessageEventArgs arg in messages)
+ foreach (BuildEventArgs arg in all_messages)
Console.WriteLine ("Msg: {0}", arg.Message);
}
+
+ public void CheckLoggedMessageHead (string expected, string id)
+ {
+ string actual;
+ int result = CheckHead (expected, MessageImportance.Normal, out actual);
+ if (result == 1)
+ Assert.Fail ("{0}: Expected message '{1}' was not emitted.", id, expected);
+ if (result == 2)
+ Assert.AreEqual (expected, actual, id);
+ }
+
+
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/resources/Sample.vb b/mcs/class/Microsoft.Build.Tasks/Test/resources/Sample.vb
new file mode 100644
index 0000000..a1d6c7d
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Tasks/Test/resources/Sample.vb
@@ -0,0 +1,10 @@
+Imports System
+
+Namespace Mono.Tests
+ Public Class Sample
+ End Class
+
+ Class Another
+ End Class
+
+End Namespace
diff --git a/mcs/class/Microsoft.Build.Utilities/ChangeLog b/mcs/class/Microsoft.Build.Utilities/ChangeLog
index bfb51ea..69f6616 100644
--- a/mcs/class/Microsoft.Build.Utilities/ChangeLog
+++ b/mcs/class/Microsoft.Build.Utilities/ChangeLog
@@ -1,3 +1,12 @@
+2009-04-25 Jonathan Chambers <joncham at gmail.com>
+
+ * Makefile: Adjust assembly name for 3.5 profile.
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * Microsoft.Build.Utilities.dll.sources: Add ProcessService.cs,
+ ProcessWrapper.cs, IAsyncOperation.cs and IProcessAsyncOperation.cs
+
2006-04-19 Marek Sieradzki <marek.sieradzki at gmail.com>
* Microsoft.Build.Utilities.targets: Removed.
diff --git a/mcs/class/Microsoft.Build.Utilities/Makefile b/mcs/class/Microsoft.Build.Utilities/Makefile
index 5cee6a1..bbfc0a9 100644
--- a/mcs/class/Microsoft.Build.Utilities/Makefile
+++ b/mcs/class/Microsoft.Build.Utilities/Makefile
@@ -10,6 +10,10 @@ NO_TEST = yes
NO_SIGN_ASSEMBLY = yes
endif
+ifeq (3.5, $(FRAMEWORK_VERSION))
+LIBRARY_NAME = Microsoft.Build.Utilities.v3.5.dll
+endif
+
LIB_MCS_FLAGS = \
/r:$(corlib) \
/r:System.dll \
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.dll.sources b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.dll.sources
index c59ceb1..2c9a69c 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.dll.sources
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.dll.sources
@@ -5,6 +5,10 @@ Microsoft.Build.Utilities/AppDomainIsolatedTask.cs
Microsoft.Build.Utilities/CommandLineBuilder.cs
Microsoft.Build.Utilities/HostObjectInitializationStatus.cs
Microsoft.Build.Utilities/Logger.cs
+Microsoft.Build.Utilities/IAsyncOperation.cs
+Microsoft.Build.Utilities/IProcessAsyncOperation.cs
+Microsoft.Build.Utilities/ProcessWrapper.cs
+Microsoft.Build.Utilities/ProcessService.cs
Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
Microsoft.Build.Utilities/Task.cs
Microsoft.Build.Utilities/TaskItem.cs
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ChangeLog b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ChangeLog
index b937ac5..aa83579 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ChangeLog
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ChangeLog
@@ -1,3 +1,32 @@
+2009-04-24 Ankit Jain <jankit at novell.com>
+
+ * ToolTask.cs (RealExecute): Handle TypeLoadExceptions, compiler
+ crashes and report them. Borrow some tricks from md.
+ (LogEventsFromTextOutput): Ignore known non-error messages. Don't
+ log unknown lines, crashes get handled elsewhere.
+
+2009-04-08 Ankit Jain <jankit at novell.com>
+
+ Fix bug #491828.
+ * ToolTask.cs (LogEventsFromTextOutput): Log even in case of
+ unrecognized errors.
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * ProcessService.cs, IAsyncOperation.cs, IProcessAsyncOperation.cs,
+ ProcessWrapper.cs: Brought in from monodevelop.
+ * ToolTask.cs: Use the new ProcessService to execute the tool. Honor
+ SkipTaskExecution (). Use response files, but log the contents of the
+ response file instead of "@foo.rsp". Support environmentOverrides.
+ (LogEventsFromTextOutput): Add null check.
+ * Exec.cs (GetWorkingDirectory): Use the workingDirectory property.
+
+2009-02-20 Ankit Jain <jankit at novell.com>
+
+ Fix bug #475438.
+ * ToolTask.cs (RealExecute): Check whether the target executable exists.
+ Log any execution errors.
+
2008-08-06 Ankit Jain <jankit at novell.com>
* CommandLineBuilder.cs (AppendSwitchIfNotNull): Quote individual items
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/IAsyncOperation.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/IAsyncOperation.cs
new file mode 100644
index 0000000..da66f1a
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/IAsyncOperation.cs
@@ -0,0 +1,46 @@
+//
+// IAsyncOperation.cs
+//
+// Author:
+// Lluis Sanchez Gual
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.IO;
+
+namespace Microsoft.Build.Utilities
+{
+ internal delegate void OperationHandler (IAsyncOperation op);
+
+ internal interface IAsyncOperation
+ {
+ void Cancel ();
+ void WaitForCompleted ();
+ bool IsCompleted { get; }
+ bool Success { get; }
+ bool SuccessWithWarnings { get; }
+
+ event OperationHandler Completed;
+ }
+}
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/IProcessAsyncOperation.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/IProcessAsyncOperation.cs
new file mode 100644
index 0000000..872d19a
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/IProcessAsyncOperation.cs
@@ -0,0 +1,39 @@
+//
+// IProcessAsyncOperation.cs
+//
+// Author:
+// Lluis Sanchez Gual
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Microsoft.Build.Utilities
+{
+ internal interface IProcessAsyncOperation: IAsyncOperation
+ {
+ int ExitCode { get; }
+
+ int ProcessId { get; }
+ }
+}
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ProcessService.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ProcessService.cs
new file mode 100644
index 0000000..d276931
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ProcessService.cs
@@ -0,0 +1,164 @@
+#if NET_2_0
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Diagnostics;
+
+namespace Microsoft.Build.Utilities
+{
+ internal static class ProcessService {
+ static StringDictionary globalEnvironmentVariablesOverride;
+
+ public static StringDictionary GlobalEnvironmentVariblesOverride {
+ get {
+ if (globalEnvironmentVariablesOverride == null)
+ globalEnvironmentVariablesOverride = new StringDictionary ();
+ return globalEnvironmentVariablesOverride;
+ }
+ }
+
+ public static ProcessWrapper StartProcess (string command, string arguments, string workingDirectory, EventHandler exited)
+ {
+ return StartProcess (command, arguments, workingDirectory, (ProcessEventHandler)null, (ProcessEventHandler)null, exited);
+ }
+
+ public static ProcessWrapper StartProcess (string command, string arguments, string workingDirectory, ProcessEventHandler outputStreamChanged, ProcessEventHandler errorStreamChanged)
+ {
+ return StartProcess (command, arguments, workingDirectory, outputStreamChanged, errorStreamChanged, null);
+ }
+
+ public static ProcessWrapper StartProcess (string command, string arguments, string workingDirectory, TextWriter outWriter, TextWriter errorWriter, EventHandler exited)
+ {
+ return StartProcess (command, arguments, workingDirectory, outWriter, errorWriter, exited, false);
+ }
+
+ public static ProcessWrapper StartProcess (string command, string arguments, string workingDirectory, TextWriter outWriter, TextWriter errorWriter, EventHandler exited, bool redirectStandardInput)
+ {
+ ProcessEventHandler wout = OutWriter.GetWriteHandler (outWriter);
+ ProcessEventHandler werr = OutWriter.GetWriteHandler (errorWriter);
+ return StartProcess (command, arguments, workingDirectory, wout, werr, exited, redirectStandardInput);
+ }
+
+ public static ProcessWrapper StartProcess (string command, string arguments, string workingDirectory, ProcessEventHandler outputStreamChanged, ProcessEventHandler errorStreamChanged, EventHandler exited)
+ {
+ return StartProcess (command, arguments, workingDirectory, outputStreamChanged, errorStreamChanged, exited, false);
+ }
+
+ public static ProcessWrapper StartProcess (string command, string arguments, string workingDirectory, ProcessEventHandler outputStreamChanged, ProcessEventHandler errorStreamChanged, EventHandler exited, bool redirectStandardInput)
+ {
+ return StartProcess (CreateProcessStartInfo (command, arguments, workingDirectory, redirectStandardInput),
+ outputStreamChanged, errorStreamChanged, exited, null);
+ }
+
+ public static ProcessWrapper StartProcess (ProcessStartInfo startInfo, TextWriter outWriter, TextWriter errorWriter, EventHandler exited)
+ {
+ return StartProcess (startInfo, outWriter, errorWriter, exited, null);
+ }
+
+ public static ProcessWrapper StartProcess (ProcessStartInfo startInfo, TextWriter outWriter, TextWriter errorWriter, EventHandler exited, StringDictionary environmentOverride)
+ {
+ ProcessEventHandler wout = OutWriter.GetWriteHandler (outWriter);
+ ProcessEventHandler werr = OutWriter.GetWriteHandler (errorWriter);
+ return StartProcess (startInfo, wout, werr, exited, environmentOverride);
+ }
+
+ // @environmentOverride overrides even the global override values
+ public static ProcessWrapper StartProcess (ProcessStartInfo startInfo, ProcessEventHandler outputStreamChanged, ProcessEventHandler errorStreamChanged, EventHandler exited, StringDictionary environmentOverride)
+ {
+ if (startInfo == null)
+ throw new ArgumentException ("startInfo");
+
+ ProcessWrapper p = new ProcessWrapper();
+
+ if (outputStreamChanged != null) {
+ p.OutputStreamChanged += outputStreamChanged;
+ }
+
+ if (errorStreamChanged != null)
+ p.ErrorStreamChanged += errorStreamChanged;
+
+ if (exited != null)
+ p.Exited += exited;
+
+ p.StartInfo = startInfo;
+ ProcessEnvironmentVariableOverrides (p.StartInfo, environmentOverride);
+
+ // WORKAROUND for "Bug 410743 - wapi leak in System.Diagnostic.Process"
+ // Process leaks when an exit event is registered
+ // instead we use another thread to monitor I/O and wait for exit
+ // p.EnableRaisingEvents = true;
+
+ p.Start ();
+ return p;
+ }
+
+ public static ProcessStartInfo CreateProcessStartInfo (string command, string arguments, string workingDirectory, bool redirectStandardInput)
+ {
+ if (command == null)
+ throw new ArgumentNullException("command");
+
+ if (command.Length == 0)
+ throw new ArgumentException("command");
+
+ ProcessStartInfo startInfo = null;
+ if(String.IsNullOrEmpty (arguments))
+ startInfo = new ProcessStartInfo (command);
+ else
+ startInfo = new ProcessStartInfo (command, arguments);
+
+ if(workingDirectory != null && workingDirectory.Length > 0)
+ startInfo.WorkingDirectory = workingDirectory;
+
+ startInfo.RedirectStandardOutput = true;
+ startInfo.RedirectStandardError = true;
+ startInfo.RedirectStandardInput = redirectStandardInput;
+ startInfo.UseShellExecute = false;
+
+ return startInfo;
+ }
+
+ public static void ProcessEnvironmentVariableOverrides (ProcessStartInfo info, StringDictionary environmentOverride)
+ {
+ if (globalEnvironmentVariablesOverride != null)
+ foreach (DictionaryEntry entry in globalEnvironmentVariablesOverride)
+ ProcessEnvironmentVariable (info, (string)entry.Key, (string)entry.Value);
+
+ if (environmentOverride != null)
+ foreach (DictionaryEntry entry in environmentOverride)
+ ProcessEnvironmentVariable (info, (string)entry.Key, (string)entry.Value);
+ }
+
+ static void ProcessEnvironmentVariable (ProcessStartInfo info, string name, string value)
+ {
+ if (value == null && info.EnvironmentVariables.ContainsKey (name))
+ info.EnvironmentVariables.Remove (name);
+ else
+ info.EnvironmentVariables[name] = value;
+ }
+
+ }
+
+ class OutWriter
+ {
+ TextWriter writer;
+
+ public OutWriter (TextWriter writer)
+ {
+ this.writer = writer;
+ }
+
+ public void WriteOut (object sender, string s)
+ {
+ writer.Write (s);
+ }
+
+ public static ProcessEventHandler GetWriteHandler (TextWriter tw)
+ {
+ return tw != null ? new ProcessEventHandler(new OutWriter (tw).WriteOut) : null;
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ProcessWrapper.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ProcessWrapper.cs
new file mode 100644
index 0000000..43d515c
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ProcessWrapper.cs
@@ -0,0 +1,208 @@
+// created on 12/18/2004 at 16:28
+using System;
+using System.Threading;
+using System.Diagnostics;
+
+namespace Microsoft.Build.Utilities
+{
+ internal delegate void ProcessEventHandler(object sender, string message);
+
+ internal class ProcessWrapper : Process, IProcessAsyncOperation
+ {
+ private Thread captureOutputThread;
+ private Thread captureErrorThread;
+ ManualResetEvent endEventOut = new ManualResetEvent (false);
+ ManualResetEvent endEventErr = new ManualResetEvent (false);
+ bool done;
+ object lockObj = new object ();
+
+ public ProcessWrapper ()
+ {
+ }
+
+ public new void Start ()
+ {
+ CheckDisposed ();
+ base.Start ();
+
+ captureOutputThread = new Thread (new ThreadStart(CaptureOutput));
+ captureOutputThread.IsBackground = true;
+ captureOutputThread.Start ();
+
+ if (ErrorStreamChanged != null) {
+ captureErrorThread = new Thread (new ThreadStart(CaptureError));
+ captureErrorThread.IsBackground = true;
+ captureErrorThread.Start ();
+ } else {
+ endEventErr.Set ();
+ }
+ }
+
+ public void WaitForOutput (int milliseconds)
+ {
+ CheckDisposed ();
+ WaitForExit (milliseconds);
+ WaitHandle.WaitAll (new WaitHandle[] {endEventOut});
+ }
+
+ public void WaitForOutput ()
+ {
+ WaitForOutput (-1);
+ }
+
+ private void CaptureOutput ()
+ {
+ try {
+ if (OutputStreamChanged != null) {
+ char[] buffer = new char [1024];
+ int nr;
+ while ((nr = StandardOutput.Read (buffer, 0, buffer.Length)) > 0) {
+ if (OutputStreamChanged != null)
+ OutputStreamChanged (this, new string (buffer, 0, nr));
+ }
+ }
+ } catch (ThreadAbortException) {
+ // There is no need to keep propagating the abort exception
+ Thread.ResetAbort ();
+ } finally {
+ // WORKAROUND for "Bug 410743 - wapi leak in System.Diagnostic.Process"
+ // Process leaks when an exit event is registered
+ WaitHandle.WaitAll (new WaitHandle[] {endEventErr});
+
+ OnExited (this, EventArgs.Empty);
+
+ //call this AFTER the exit event, or the ProcessWrapper may get disposed and abort this thread
+ if (endEventOut != null)
+ endEventOut.Set ();
+ }
+ }
+
+ private void CaptureError ()
+ {
+ try {
+ char[] buffer = new char [1024];
+ int nr;
+ while ((nr = StandardError.Read (buffer, 0, buffer.Length)) > 0) {
+ if (ErrorStreamChanged != null)
+ ErrorStreamChanged (this, new string (buffer, 0, nr));
+ }
+ } finally {
+ endEventErr.Set ();
+ }
+ }
+
+ protected override void Dispose (bool disposing)
+ {
+ lock (lockObj) {
+ if (endEventOut == null)
+ return;
+ }
+
+ if (!done)
+ ((IAsyncOperation)this).Cancel ();
+
+ captureOutputThread = captureErrorThread = null;
+ endEventOut.Close ();
+ endEventErr.Close ();
+ endEventOut = endEventErr = null;
+
+ base.Dispose (disposing);
+ }
+
+ void CheckDisposed ()
+ {
+ if (endEventOut == null)
+ throw new ObjectDisposedException ("ProcessWrapper");
+ }
+
+ int IProcessAsyncOperation.ExitCode {
+ get { return ExitCode; }
+ }
+
+ int IProcessAsyncOperation.ProcessId {
+ get { return Id; }
+ }
+
+ void IAsyncOperation.Cancel ()
+ {
+ try {
+ if (!done) {
+ try {
+ Kill ();
+ } catch {
+ // Ignore
+ }
+ if (captureOutputThread != null)
+ captureOutputThread.Abort ();
+ if (captureErrorThread != null)
+ captureErrorThread.Abort ();
+ }
+ } catch (Exception ex) {
+ //FIXME: Log
+ Console.WriteLine (ex.ToString ());
+ //LoggingService.LogError (ex.ToString ());
+ }
+ }
+
+ void IAsyncOperation.WaitForCompleted ()
+ {
+ WaitForOutput ();
+ }
+
+ void OnExited (object sender, EventArgs args)
+ {
+ try {
+ if (!HasExited)
+ WaitForExit ();
+ } catch {
+ // Ignore
+ } finally {
+ lock (lockObj) {
+ done = true;
+ try {
+ if (completedEvent != null)
+ completedEvent (this);
+ } catch {
+ // Ignore
+ }
+ }
+ }
+ }
+
+ event OperationHandler IAsyncOperation.Completed {
+ add {
+ bool raiseNow = false;
+ lock (lockObj) {
+ if (done)
+ raiseNow = true;
+ else
+ completedEvent += value;
+ }
+ if (raiseNow)
+ value (this);
+ }
+ remove {
+ lock (lockObj) {
+ completedEvent -= value;
+ }
+ }
+ }
+
+ bool IAsyncOperation.Success {
+ get { return done ? ExitCode == 0 : false; }
+ }
+
+ bool IAsyncOperation.SuccessWithWarnings {
+ get { return false; }
+ }
+
+ bool IAsyncOperation.IsCompleted {
+ get { return done; }
+ }
+
+ event OperationHandler completedEvent;
+
+ public event ProcessEventHandler OutputStreamChanged;
+ public event ProcessEventHandler ErrorStreamChanged;
+ }
+}
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
index 04d3a1f..032b76b 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
@@ -29,6 +29,7 @@
using System;
using System.Diagnostics;
+using System.Collections;
using System.Collections.Specialized;
using System.IO;
using System.Resources;
@@ -98,30 +99,18 @@ namespace Microsoft.Build.Utilities
string responseFileCommands,
string commandLineCommands)
{
- string arguments;
- bool success;
-
- arguments = String.Concat (commandLineCommands, " ", responseFileCommands);
-
- success = RealExecute (pathToTool, arguments);
-
- if (success)
- return 0;
- else
- return -1;
+ return RealExecute (pathToTool, responseFileCommands, commandLineCommands) ? 0 : -1;
}
public override bool Execute ()
{
- int result;
-
- result = ExecuteTool (GenerateFullPathToTool (), GenerateResponseFileCommands (),
+ if (SkipTaskExecution ())
+ return true;
+
+ int result = ExecuteTool (GenerateFullPathToTool (), GenerateResponseFileCommands (),
GenerateCommandLineCommands ());
- if (result == 0)
- return true;
- else
- return false;
+ return result == 0;
}
[MonoTODO]
@@ -130,36 +119,90 @@ namespace Microsoft.Build.Utilities
return null;
}
- private bool RealExecute (string filename, string arguments)
+ private bool RealExecute (string pathToTool,
+ string responseFileCommands,
+ string commandLineCommands)
+
{
- string line;
-
- if (filename == null)
- throw new ArgumentNullException ("filename");
- if (arguments == null)
- throw new ArgumentNullException ("arguments");
-
- process = new Process ();
- process.StartInfo.Arguments = arguments;
- process.StartInfo.CreateNoWindow = true;
- process.StartInfo.FileName = filename;
- process.StartInfo.RedirectStandardError = true;
- process.StartInfo.RedirectStandardOutput = true;
- process.StartInfo.UseShellExecute = false;
-
- Log.LogMessage (MessageImportance.Normal, String.Format ("Tool {0} execution started with arguments: {1}",
- filename, arguments));
-
- process.Start ();
- process.WaitForExit ();
-
- exitCode = process.ExitCode;
-
- while ((line = process.StandardError.ReadLine ()) != null) {
- LogEventsFromTextOutput (line, MessageImportance.Low);
+ if (pathToTool == null)
+ throw new ArgumentNullException ("pathToTool");
+
+ if (!File.Exists (pathToTool)) {
+ Log.LogError ("Unable to find tool {0} at '{1}'", ToolName, pathToTool);
+ return false;
}
+
+ string responseFileName = Path.GetTempFileName ();
+ File.WriteAllText (responseFileName, responseFileCommands);
+
+ string arguments = String.Concat (commandLineCommands, " ", GetResponseFileSwitch (responseFileName));
+
+ Log.LogMessage (MessageImportance.Normal, String.Format ("Tool {0} execution started with arguments: {1} {2}",
+ pathToTool, commandLineCommands, responseFileCommands));
+
+ string output = Path.GetTempFileName ();
+ string error = Path.GetTempFileName ();
+ StreamWriter outwr = new StreamWriter (output);
+ StreamWriter errwr = new StreamWriter (error);
+
+ ProcessStartInfo pinfo = new ProcessStartInfo (pathToTool, arguments);
+ pinfo.WorkingDirectory = GetWorkingDirectory () ?? Environment.CurrentDirectory;
+
+ pinfo.UseShellExecute = false;
+ pinfo.RedirectStandardOutput = true;
+ pinfo.RedirectStandardError = true;
+
+ try {
+ ProcessWrapper pw = ProcessService.StartProcess (pinfo, outwr, errwr, null, environmentOverride);
+ pw.WaitForOutput();
+ exitCode = pw.ExitCode;
+ outwr.Close();
+ errwr.Close();
+ pw.Dispose ();
+ } catch (System.ComponentModel.Win32Exception e) {
+ Log.LogError ("Error executing tool '{0}': {1}", pathToTool, e.Message);
+ return false;
+ }
+
+ bool typeLoadException = false;
+ StringBuilder compilerOutput = new StringBuilder ();
+ foreach (string s in new string[] { output, error }) {
+ using (StreamReader sr = File.OpenText (s)) {
+ string line;
+ while ((line = sr.ReadLine ()) != null) {
+ if (typeLoadException) {
+ compilerOutput.Append (sr.ReadToEnd ());
+ break;
+ }
+
+ compilerOutput.AppendLine (line);
+
+ line = line.Trim ();
+ if (line.Length == 0)
+ continue;
+
+ if (line.StartsWith ("Unhandled Exception: System.TypeLoadException") ||
+ line.StartsWith ("Unhandled Exception: System.IO.FileNotFoundException")) {
+ typeLoadException = true;
+ }
+ LogEventsFromTextOutput (line, MessageImportance.Low);
+ }
+ }
+ if (typeLoadException) {
+ string output_str = compilerOutput.ToString ();
+ Regex reg = new Regex (@".*WARNING.*used in (mscorlib|System),.*", RegexOptions.Multiline);
+ if (reg.Match (output_str).Success)
+ Log.LogError ("Error: A referenced assembly may be built with an incompatible CLR version. See the compilation output for more details.");
+ else
+ Log.LogError ("Error: A dependency of a referenced assembly may be missing, or you may be referencing an assembly created with a newer CLR version. See the compilation output for more details.");
+ Log.LogError (output_str);
+ }
+ }
+
+ if (!Log.HasLoggedErrors && exitCode != 0)
+ Log.LogError ("Compiler crashed: " + compilerOutput.ToString ());
- Log.LogMessage (MessageImportance.Low, String.Format ("Tool {0} execution finished.", filename));
+ Log.LogMessage (MessageImportance.Low, String.Format ("Tool {0} execution finished.", pathToTool));
return !Log.HasLoggedErrors;
}
@@ -168,6 +211,13 @@ namespace Microsoft.Build.Utilities
[MonoTODO]
protected virtual void LogEventsFromTextOutput (string singleLine, MessageImportance importance)
{
+ // When IncludeDebugInformation is true, prevents the debug symbols stats from braeking this.
+ if (singleLine.StartsWith ("WROTE SYMFILE") ||
+ singleLine.StartsWith ("OffsetTable") ||
+ singleLine.StartsWith ("Compilation succeeded") ||
+ singleLine.StartsWith ("Compilation failed"))
+ return;
+
string filename, origin, category, code, subcategory, text;
int lineNumber, columnNumber, endLineNumber, endColumnNumber;
@@ -179,7 +229,7 @@ namespace Microsoft.Build.Utilities
text = m.Groups [regex.GroupNumberFromName ("TEXT")].Value;
ParseOrigin (origin, out filename, out lineNumber, out columnNumber, out endLineNumber, out endColumnNumber);
-
+
if (category == "warning") {
Log.LogWarning (subcategory, code, null, filename, lineNumber, columnNumber, endLineNumber,
endColumnNumber, text, null);
diff --git a/mcs/class/Mono.CompilerServices.SymbolWriter/ChangeLog b/mcs/class/Mono.CompilerServices.SymbolWriter/ChangeLog
index 75c20bd..cdfefdd 100644
--- a/mcs/class/Mono.CompilerServices.SymbolWriter/ChangeLog
+++ b/mcs/class/Mono.CompilerServices.SymbolWriter/ChangeLog
@@ -1,3 +1,17 @@
+2009-04-15 Martin Baulig <martin at ximian.com>
+
+ * MonoSymbolWriter.cs: Move `ISourceFile', `ICompileUnit' and
+ `IMethodDef' into MonoSymbolFile.cs. This allows us to use the
+ symbol reader part without MonoSymbolWriter.cs.
+
+2009-04-15 Martin Baulig <martin at ximian.com>
+
+ * MonoSymbolTable.cs
+ (LineNumberTable.DW_LNE_MONO__extensions_start): New const.
+ (LineNumberTable.DW_LNE_MONO__extensions_end): New const.
+ (LineNumberTable.DoRead): Ignore unknown extended opcodes if
+ they're within the Mono extension range.
+
2008-11-19 Marek Safar <marek.safar at gmail.com>
* MonoSymbolWriter.cs, MonoSymbolTable.cs: Change always boxed
diff --git a/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs b/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
index 6eeb776..3f11a0f 100644
--- a/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
+++ b/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
@@ -84,6 +84,31 @@ namespace Mono.CompilerServices.SymbolWriter
}
}
+ public interface ISourceFile
+ {
+ SourceFileEntry Entry {
+ get;
+ }
+ }
+
+ public interface ICompileUnit
+ {
+ CompileUnitEntry Entry {
+ get;
+ }
+ }
+
+ public interface IMethodDef
+ {
+ string Name {
+ get;
+ }
+
+ int Token {
+ get;
+ }
+ }
+
#if !CECIL
internal class MonoDebuggerSupport
{
diff --git a/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs b/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
index 65b5998..86fe064 100644
--- a/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
+++ b/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
@@ -812,6 +812,9 @@ namespace Mono.CompilerServices.SymbolWriter
// MONO extensions.
public const byte DW_LNE_MONO_negate_is_hidden = 0x40;
+ internal const byte DW_LNE_MONO__extensions_start = 0x40;
+ internal const byte DW_LNE_MONO__extensions_end = 0x7f;
+
protected LineNumberTable (MonoSymbolFile file)
{
this.LineBase = file.OffsetTable.LineNumberTable_LineBase;
@@ -920,10 +923,14 @@ namespace Mono.CompilerServices.SymbolWriter
} else if (opcode == DW_LNE_MONO_negate_is_hidden) {
is_hidden = !is_hidden;
modified = true;
- } else
+ } else if ((opcode >= DW_LNE_MONO__extensions_start) &&
+ (opcode <= DW_LNE_MONO__extensions_end)) {
+ ; // reserved for future extensions
+ } else {
throw new MonoSymbolFileException (
"Unknown extended opcode {0:x} in LNT ({1})",
opcode, file.FileName);
+ }
br.BaseStream.Position = end_pos;
continue;
diff --git a/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs b/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs
index 3f15bc6..ae36bc6 100644
--- a/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs
+++ b/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs
@@ -38,31 +38,6 @@ using System.IO;
namespace Mono.CompilerServices.SymbolWriter
{
- public interface ISourceFile
- {
- SourceFileEntry Entry {
- get;
- }
- }
-
- public interface ICompileUnit
- {
- CompileUnitEntry Entry {
- get;
- }
- }
-
- public interface IMethodDef
- {
- string Name {
- get;
- }
-
- int Token {
- get;
- }
- }
-
public class MonoSymbolWriter
{
ArrayList methods = null;
diff --git a/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/ChangeLog b/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/ChangeLog
index a775356..1159904 100644
--- a/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/ChangeLog
+++ b/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-01 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * SqliteConnection.cs: implement Dispose for 2.0. It was leaking an fd
+ in using().
+ Bug #499864 fixed.
+
2008-07-06 Sebastien Pouliot <sebastien at ximian.com>
* SqliteDataSourceEnumerator.cs: Replace a few Type.GetType by typeof
diff --git a/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteConnection.cs b/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteConnection.cs
index ea796b9..a4e7b02 100644
--- a/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteConnection.cs
+++ b/mcs/class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteConnection.cs
@@ -56,6 +56,9 @@ namespace Mono.Data.SqliteClient
private ConnectionState state;
private Encoding encoding;
private int busy_timeout;
+#if NET_2_0
+ bool disposed;
+#endif
#endregion
@@ -83,6 +86,19 @@ namespace Mono.Data.SqliteClient
{
Close ();
}
+#else
+ protected override void Dispose (bool disposing)
+ {
+ try {
+ if (disposing && !disposed) {
+ Close ();
+ conn_str = null;
+ }
+ } finally {
+ disposed = true;
+ base.Dispose (disposing);
+ }
+ }
#endif
#endregion
diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog
index 1e1c8a0..bfcf653 100644
--- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog
+++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog
@@ -1,3 +1,67 @@
+2009-05-16 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * Tds70.cs (WriteParameterInfo): fix r134256 backport errors.
+
+2009-05-16 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * Tds70.cs (WriteParameterInfo): Default precision is 29 and not 28.
+
+2009-05-16 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * Tds70.cs (WriteParameterInfo): Do not change the original
+ param.TypeName value.
+
+2009-05-16 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ ** Fixes #382589
+ * Tds.cs (ServerTdsVersion): New property to access ServerVersion.
+
+ * Tds70.cs (WriteParameterInfo): Treat Decimal types as Numeric
+ types from SQL Server 2000.
+
+ * TdsVersion.cs: Add SQL Server 2008 version.
+
+2009-05-02 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ ** Fixes #462947 - Patch by Gert Driesen
+ * Tds.cs (InitExec): More intialization of variables.
+
+2009-04-28 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * Tds.cs (InitExec): Move initialization of SequentialAccess related
+ variables here.
+
+2009-04-28 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * Tds.cs (ExecuteQuery): Reset all the variables related to LoadData
+ when performing queries with SequentialAccess set to true. Fixes
+ incorrect handling of data retrieval when multiple queries are run
+ with SequentialAccess set to true for the same instance of Tds.
+
+2009-04-28 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * Tds.cs (ExecuteQuery): Reset SequentialAccess read state variables
+ in order to avoid blocking forever when two queries are executed with
+ SequentialAccess set to true for the same instance of Tds.
+
+2009-04-28 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ ** Fixes#463011
+ * Tds70.cs (Reset): Call base.Reset to update Database being used.
+
+2009-04-28 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * TdsConnectionPool.cs: if GetConnection() fails to create a
+ connection, try again several times and then throw. Improved
+ ResetConnectionPool() so that it does not immediately close
+ connections in use. Don't re-add connections that have been closed.
+
+ * Tds.cs: Connected tests the socket connection too. Made Disconnect()
+ not throw.
+
+ * TdsComm.cs: set more socket options (timeout and NoDelay) and have a
+ single entry point for reading from the stream.
+
2009-01-29 Gonzalo Paniagua Javier <gonzalo at novell.com>
* Tds70.cs: fix for output parameters and '@'.
diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs
index a625e11..163b19d 100644
--- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs
+++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs
@@ -146,7 +146,7 @@ namespace Mono.Data.Tds.Protocol
}
public bool IsConnected {
- get { return connected; }
+ get { return connected && comm != null && comm.IsConnected (); }
set { connected = value; }
}
@@ -196,6 +196,20 @@ namespace Mono.Data.Tds.Protocol
set { sequentialAccess = value; }
}
+ public TdsVersion ServerTdsVersion {
+ get {
+ switch (databaseMajorVersion) {
+ case 4: return TdsVersion.tds42;
+ case 5: return TdsVersion.tds50;
+ case 7: return TdsVersion.tds70;
+ case 8: return TdsVersion.tds80;
+ case 9: return TdsVersion.tds90;
+ case 10: return TdsVersion.tds100;
+ default: return tdsVersion; // return client's version
+ }
+ }
+ }
+
private void SkipRow ()
{
SkipToColumnIndex (Columns.Count);
@@ -413,6 +427,21 @@ namespace Mono.Data.Tds.Protocol
// clean up
moreResults = true;
doneProc = false;
+
+ // Reset "read" status variables - used in case of SequentialAccess
+ isResultRead = false;
+ isRowRead = false;
+ StreamLength = 0;
+ StreamIndex = 0;
+ StreamColumnIndex = 0;
+ LoadInProgress = false;
+
+ // Reset more variables
+ queryInProgress = false;
+ cancelsRequested = 0;
+ cancelsProcessed = 0;
+ recordsAffected = -1;
+
messages.Clear ();
outputParameters.Clear ();
}
@@ -443,11 +472,15 @@ namespace Mono.Data.Tds.Protocol
public void Disconnect ()
{
- comm.StartPacket (TdsPacketType.Logoff);
- comm.Append ((byte) 0);
- comm.SendPacket ();
- comm.Close ();
+ try {
+ comm.StartPacket (TdsPacketType.Logoff);
+ comm.Append ((byte) 0);
+ comm.SendPacket ();
+ } catch {
+ // We're closing the socket anyway
+ }
connected = false;
+ comm.Close ();
}
public virtual bool Reset ()
diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs
index ba209fc..7f378fe 100644
--- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs
+++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs
@@ -372,6 +372,7 @@ namespace Mono.Data.Tds.Protocol
// Set "reset-connection" bit for the next message packet
Comm.ResetConnection = true;
+ base.Reset ();
return true;
}
@@ -432,7 +433,12 @@ namespace Mono.Data.Tds.Protocol
TdsColumnType colType = param.GetMetaType ();
param.IsNullable = false;
- Comm.Append ((byte)colType); // type
+ if (ServerTdsVersion > TdsVersion.tds70
+ && colType == TdsColumnType.Decimal) {
+ Comm.Append ((byte)TdsColumnType.Numeric);
+ } else {
+ Comm.Append ((byte)colType);
+ }
int size = param.Size;
if (size == 0)
@@ -453,7 +459,7 @@ namespace Mono.Data.Tds.Protocol
// Precision and Scale are non-zero for only decimal/numeric
if ( param.TypeName == "decimal" || param.TypeName == "numeric") {
- Comm.Append ((param.Precision !=0 ) ? param.Precision : (byte) 28);
+ Comm.Append ((param.Precision !=0 ) ? param.Precision : (byte) 29);
Comm.Append (param.Scale);
}
diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs
index 81b7e34..b6b8d09 100644
--- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs
+++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs
@@ -3,8 +3,10 @@
//
// Author:
// Tim Coleman (tim at timcoleman.com)
+// Gonzalo Paniagua Javier (gonzalo at novell.com)
//
// Copyright (C) 2002 Tim Coleman
+// Copyright (c) 2009 Novell, Inc.
//
//
@@ -29,6 +31,7 @@
//
using System;
+using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
@@ -84,6 +87,7 @@ namespace Mono.Data.Tds.Protocol {
inBufferLength = packetSize;
IPEndPoint endPoint;
+ bool have_exception = false;
try {
#if NET_2_0
@@ -105,7 +109,8 @@ namespace Mono.Data.Tds.Protocol {
try {
socket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IAsyncResult ares = socket.BeginConnect (endPoint, null, null);
- if (timeout > 0 && !ares.IsCompleted && !ares.AsyncWaitHandle.WaitOne (timeout * 1000, false))
+ int timeout_ms = timeout * 1000;
+ if (timeout > 0 && !ares.IsCompleted && !ares.AsyncWaitHandle.WaitOne (timeout_ms, false))
throw Tds.CreateTimeoutException (dataSource, "Open()");
socket.EndConnect (ares);
try {
@@ -115,18 +120,32 @@ namespace Mono.Data.Tds.Protocol {
// Some platform may throw an exception, so
// eat all socket exception, yeaowww!
}
-
+
+ try {
+#if NET_2_0
+ socket.NoDelay = true;
+#endif
+ socket.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.SendTimeout, timeout_ms);
+ socket.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, timeout_ms);
+ } catch {
+ // Ignore exceptions here for systems that do not support these options.
+ }
// Let the stream own the socket and take the pleasure of closing it
stream = new NetworkStream (socket, true);
} catch (SocketException e) {
- if (socket != null) {
+ have_exception = true;
+ throw new TdsInternalException ("Server does not exist or connection refused.", e);
+ } catch (Exception) {
+ have_exception = true;
+ throw;
+ } finally {
+ if (have_exception && socket != null) {
try {
Socket s = socket;
socket = null;
s.Close ();
} catch {}
}
- throw new TdsInternalException ("Server does not exist or connection refused.", e);
}
if (!socket.Connected)
throw new TdsInternalException ("Server does not exist or connection refused.", null);
@@ -377,9 +396,16 @@ namespace Mono.Data.Tds.Protocol {
public void Close ()
{
+ if (stream == null)
+ return;
+
connReset = false;
socket = null;
- stream.Close ();
+ try {
+ stream.Close ();
+ } catch {
+ }
+ stream = null;
}
public bool IsConnected ()
@@ -423,7 +449,7 @@ namespace Mono.Data.Tds.Protocol {
int avail = inBufferLength - inBufferIndex;
avail = avail>len-i ? len-i : avail;
- System.Array.Copy (inBuffer, inBufferIndex, result, i, avail);
+ Buffer.BlockCopy (inBuffer, inBufferIndex, result, i, avail);
i += avail;
inBufferIndex += avail;
}
@@ -507,13 +533,32 @@ namespace Mono.Data.Tds.Protocol {
GetPhysicalPacketData (dataLength);
}
+ int Read (byte [] buffer, int offset, int count)
+ {
+ try {
+ return stream.Read (buffer, offset, count);
+ } catch {
+ socket = null;
+ stream.Close ();
+ throw;
+ }
+ }
+
private int GetPhysicalPacketHeader ()
{
int nread = 0;
+ int n;
// read the header
- while (nread < 8)
- nread += stream.Read (tmpBuf, nread, 8 - nread);
+ while (nread < 8) {
+ n = Read (tmpBuf, nread, 8 - nread);
+ if (n <= 0) {
+ socket = null;
+ stream.Close ();
+ throw new IOException (n == 0 ? "Connection lost" : "Connection error");
+ }
+ nread += n;
+ }
TdsPacketType packetType = (TdsPacketType) tmpBuf[0];
if (packetType != TdsPacketType.Logon && packetType != TdsPacketType.Query && packetType != TdsPacketType.Reply)
@@ -538,9 +583,16 @@ namespace Mono.Data.Tds.Protocol {
{
// now get the data
int nread = 0;
+ int n;
while (nread < length) {
- nread += stream.Read (inBuffer, nread, length - nread);
+ n = Read (inBuffer, nread, length - nread);
+ if (n <= 0) {
+ socket = null;
+ stream.Close ();
+ throw new IOException (n == 0 ? "Connection lost" : "Connection error");
+ }
+ nread += n;
}
packetsReceived++;
@@ -592,7 +644,7 @@ namespace Mono.Data.Tds.Protocol {
{
if (newSize != outBufferLength) {
byte[] newBuf = new byte [newSize];
- Array.Copy (outBuffer, 0, newBuf, 0, newSize);
+ Buffer.BlockCopy (outBuffer, 0, newBuf, 0, newSize);
outBufferLength = newSize;
outBuffer = newBuf;
}
@@ -687,9 +739,17 @@ namespace Mono.Data.Tds.Protocol {
{
TdsAsyncResult ar = (TdsAsyncResult) socketAsyncResult.AsyncState;
int nread = stream.EndRead (socketAsyncResult);
+ int n;
- while (nread < 8)
- nread += stream.Read (tmpBuf, nread, 8 - nread);
+ while (nread < 8) {
+ n = Read (tmpBuf, nread, 8 - nread);
+ if (n <= 0) {
+ socket = null;
+ stream.Close ();
+ throw new IOException (n == 0 ? "Connection lost" : "Connection error");
+ }
+ nread += n;
+ }
TdsPacketType packetType = (TdsPacketType) tmpBuf[0];
if (packetType != TdsPacketType.Logon && packetType != TdsPacketType.Query && packetType != TdsPacketType.Reply)
diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsConnectionPool.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsConnectionPool.cs
index 838aa72..51a00df 100644
--- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsConnectionPool.cs
+++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsConnectionPool.cs
@@ -32,6 +32,7 @@
using System;
using System.Collections;
+using System.Text;
using System.Threading;
namespace Mono.Data.Tds.Protocol
@@ -101,6 +102,18 @@ namespace Mono.Data.Tds.Protocol
public int Timeout;
public int PoolMinSize;
public int PoolMaxSize;
+
+ public override string ToString ()
+ {
+ StringBuilder sb = new StringBuilder ();
+ sb.AppendFormat ("DataSouce: {0}\n", DataSource);
+ sb.AppendFormat ("Port: {0}\n", Port);
+ sb.AppendFormat ("PacketSize: {0}\n", PacketSize);
+ sb.AppendFormat ("Timeout: {0}\n", Timeout);
+ sb.AppendFormat ("PoolMinSize: {0}\n", PoolMinSize);
+ sb.AppendFormat ("PoolMaxSize: {0}", PoolMaxSize);
+ return sb.ToString ();
+ }
}
public class TdsConnectionPool
@@ -110,7 +123,6 @@ namespace Mono.Data.Tds.Protocol
TdsConnectionPoolManager manager;
Queue available;
ArrayList conns;
- object next_free;
public TdsConnectionPool (TdsConnectionPoolManager manager, TdsConnectionInfo info)
{
@@ -123,14 +135,14 @@ namespace Mono.Data.Tds.Protocol
void InitializePool ()
{
- for (int i = 0; i < info.PoolMinSize; i++) {
- if (i == 0) {
- next_free = manager.CreateConnection (info);
- conns.Add (next_free);
- } else {
+ /* conns.Count might not be 0 when we are resetting the connection pool */
+ for (int i = conns.Count; i < info.PoolMinSize; i++) {
+ try {
Tds t = manager.CreateConnection (info);
conns.Add (t);
available.Enqueue (t);
+ } catch {
+ // Ignore. GetConnection will throw again.
}
}
}
@@ -142,32 +154,27 @@ namespace Mono.Data.Tds.Protocol
#region Methods
+ int in_progress;
public Tds GetConnection ()
{
if (no_pooling)
return manager.CreateConnection (info);
+ Tds result = null;
+ bool create_new;
+ int retries = info.PoolMaxSize * 2;
retry:
- Tds result = (Tds) Interlocked.Exchange (ref next_free, null);
- if (result != null && !result.IsConnected)
- result = null;
-
while (result == null) {
+ create_new = false;
lock (available) {
if (available.Count > 0) {
result = (Tds) available.Dequeue ();
break; // .. and do the reset out of the loop
- } else {
- result = (Tds) Interlocked.Exchange (ref next_free, null);
- if (result != null && result.IsConnected)
- break;
- result = null;
}
Monitor.Enter (conns);
try {
- if (conns.Count >= info.PoolMaxSize) {
+ if (conns.Count >= info.PoolMaxSize - in_progress) {
Monitor.Exit (conns);
- //Console.WriteLine ("GONZ: ENTERING LOCK");
bool got_lock = Monitor.Wait (available, info.Timeout * 1000);
if (!got_lock) {
throw new InvalidOperationException (
@@ -175,48 +182,73 @@ retry:
"connection could be obtained. A possible explanation " +
"is that all the connections in the pool are in use, " +
"and the maximum pool size is reached.");
+ } else if (available.Count > 0) {
+ result = (Tds) available.Dequeue ();
+ break; // .. and do the reset out of the loop
}
continue;
+ } else {
+ create_new = true;
+ in_progress++;
}
} finally {
- Monitor.Exit (conns); // Exiting if not owned is ok
+ Monitor.Exit (conns); // Exiting if not owned is ok < 2.x
}
}
- lock (conns) {
- if (conns.Count < info.PoolMaxSize) {
- try {
- //Console.WriteLine ("GONZ: NEW");
- result = manager.CreateConnection (info);
+ if (create_new) {
+ try {
+ result = manager.CreateConnection (info);
+ lock (conns)
conns.Add (result);
- return result; // no reset needed
- } catch {
- }
- continue;
+ return result;
+ } finally {
+ lock (available)
+ in_progress--;
}
}
}
- if (!result.IsConnected || !result.Reset ()) {
- //Console.WriteLine ("GONZ: RESET FAILED");
+ bool remove_cnc = true;
+ Exception exc = null;
+ try {
+ remove_cnc = (!result.IsConnected || !result.Reset ());
+ } catch (Exception e) {
+ remove_cnc = true;
+ exc = e;
+ }
+ if (remove_cnc) {
lock (conns)
conns.Remove (result);
- ThreadPool.QueueUserWorkItem (new WaitCallback (DestroyConnection), result);
+ result.Disconnect ();
+ retries--;
+ if (retries == 0)
+ throw exc;
goto retry;
}
- //Console.WriteLine ("GONZ: REUSED");
return result;
}
public void ReleaseConnection (Tds connection)
{
+ if (connection == null)
+ return;
if (no_pooling) {
- ThreadPool.QueueUserWorkItem (new WaitCallback (DestroyConnection), connection);
+ connection.Disconnect ();
return;
}
+
+ if (connection.poolStatus == 2) {
+ lock (conns)
+ conns.Remove (connection);
+ connection.Disconnect ();
+ connection = null;
+ }
lock (available) {
- if (Interlocked.CompareExchange (ref next_free, connection, null) != null)
- available.Enqueue (connection);
- Monitor.Pulse (available);
+ if (connection != null) // connection is still open
+ available.Enqueue (connection);
+ // We pulse even if we don't queue, because null means that there's a slot
+ // available in 'conns'
+ Monitor.Pulse (available);
}
}
@@ -224,27 +256,25 @@ retry:
public void ResetConnectionPool ()
{
lock (available) {
- available.Clear ();
lock (conns) {
- for (int i = 0; i < conns.Count; i++) {
- Tds tds = (Tds) conns [i];
- ThreadPool.QueueUserWorkItem (new WaitCallback (DestroyConnection), tds);
+ Tds tds;
+ int i;
+ for (i = conns.Count - 1; i >= 0; i++) {
+ tds = (Tds) conns [i];
+ tds.poolStatus = 2; // 2 -> disconnect me upon release
+ }
+ for (i = available.Count - 1; i >= 0; i--) {
+ tds = (Tds) available.Dequeue ();
+ tds.Disconnect ();
+ conns.Remove (tds);
}
- conns.Clear ();
+ available.Clear ();
InitializePool ();
- Monitor.PulseAll (available);
}
+ Monitor.PulseAll (available);
}
}
#endif
-
- static void DestroyConnection (object state)
- {
- Tds connection = state as Tds;
- if (connection != null) {
- connection.Disconnect ();
- }
- }
#endregion // Methods
}
}
diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsVersion.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsVersion.cs
index a085b84..e6e6463 100644
--- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsVersion.cs
+++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsVersion.cs
@@ -31,9 +31,12 @@
namespace Mono.Data.Tds.Protocol {
public enum TdsVersion
{
- tds42 = 42, // used by older Sybase and Microsoft SQL (< 7.0) servers
- tds50 = 50, // used by Sybase
- tds70 = 70, // used by Microsoft SQL server 7.0/2000
- tds80 = 80 // used by Microsoft SQL server 2000
+ tds42 = 42, // used by older Sybase and Microsoft SQL (< 7.0) servers
+ tds50 = 50, // used by Sybase
+ tds70 = 70, // used by Microsoft SQL server 7.0/2000
+ tds80 = 80, // used by Microsoft SQL server 2000
+ tds81 = 81, // used by Microsoft SQL server 2000 SP1
+ tds90 = 90, // used by Microsoft SQL server 2005
+ tds100 = 100 // used by Microsoft SQL server 2008
}
}
diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds/ChangeLog b/mcs/class/Mono.Data.Tds/Mono.Data.Tds/ChangeLog
index e007980..53fdf86 100644
--- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds/ChangeLog
+++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds/ChangeLog
@@ -1,3 +1,13 @@
+2009-05-16 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * TdsMetaParameter.cs (Prepare): Default precision is 29 and not 28.
+
+2009-05-12 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ ** Fixes rest of #497715 - Patch by Jonas Larsson <Jonas.Larsson at manodo.se>
+ * TdsMetaParameter.cs: Add support for XML type. For now, handle
+ XML type as just NVarchar.
+
2009-01-17 Gert Driesen <drieseng at users.sourceforge.net>
* TdsMetaParameter.cs: Modified signature of delegate to also allow
diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds/TdsMetaParameter.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds/TdsMetaParameter.cs
index e17adbf..e1d31de 100644
--- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds/TdsMetaParameter.cs
+++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds/TdsMetaParameter.cs
@@ -190,7 +190,9 @@ namespace Mono.Data.Tds {
// if size is set, truncate the value to specified size
string text = newValue as string;
if (text != null) {
- if (TypeName == "nvarchar" || TypeName == "nchar") {
+ if (TypeName == "nvarchar" ||
+ TypeName == "nchar" ||
+ TypeName == "xml") {
if (text.Length > size)
return text.Substring (0, size);
}
@@ -227,9 +229,9 @@ namespace Mono.Data.Tds {
switch (typeName) {
case "decimal":
case "numeric":
- // msdotnet sends a default precision of 28
+ // msdotnet sends a default precision of 29
result.Append (String.Format ("({0},{1})",
- (Precision == (byte)0 ? (byte)28 : Precision), Scale));
+ (Precision == (byte)0 ? (byte)29 : Precision), Scale));
break;
case "varchar":
case "varbinary":
@@ -243,6 +245,7 @@ namespace Mono.Data.Tds {
result.Append (size > 8000 ? "(max)" : String.Format ("({0})", size));
break;
case "nvarchar":
+ case "xml":
result.Append (Size > 0 ? (Size > 8000 ? "(max)" : String.Format ("({0})", Size)) : "(4000)");
break;
case "char":
@@ -263,7 +266,9 @@ namespace Mono.Data.Tds {
switch (Value.GetType ().ToString ()) {
case "System.String":
int len = ((string)value).Length;
- if (TypeName == "nvarchar" || TypeName == "nchar" || TypeName == "ntext")
+ if (TypeName == "nvarchar" || TypeName == "nchar"
+ || TypeName == "ntext"
+ || TypeName == "xml")
len *= 2;
return len ;
case "System.Byte[]":
@@ -315,6 +320,7 @@ namespace Mono.Data.Tds {
case "nvarchar" :
case "nchar" :
case "ntext" :
+ case "xml" :
return Encoding.Unicode.GetBytes ((string)Value);
case "varchar" :
case "char" :
@@ -372,6 +378,7 @@ namespace Mono.Data.Tds {
return TdsColumnType.NChar;
case "ntext":
return TdsColumnType.NText;
+ case "xml":
case "nvarchar":
return TdsColumnType.BigNVarChar;
case "real":
diff --git a/mcs/class/Mono.Posix/Mono.Unix/ChangeLog b/mcs/class/Mono.Posix/Mono.Unix/ChangeLog
index 4633739..a90fcc4 100644
--- a/mcs/class/Mono.Posix/Mono.Unix/ChangeLog
+++ b/mcs/class/Mono.Posix/Mono.Unix/ChangeLog
@@ -1,3 +1,11 @@
+2009-03-23 Jonathan Pryor <jpryor at novell.com>
+
+ * UnixDriveInfo.cs: UnixDriveInfo.AvailableFreeSpace needs to return
+ stat.f_bavail * stat.f_frsize, NOT f_bavail*f_bsize, as on some
+ platforms (Solaris) bsize is the preferred block I/O size, while
+ f_frsize is the *actual* filesystem block size. Thus, to get proper
+ disk under Solaris, we need to s/f_bsize/f_frsize/g.
+
2009-01-08 Rodrigo Kumpera <rkumpera at novell.com>
* UnixSignal.cs: Check if realtime signal install failed with
diff --git a/mcs/class/Mono.Posix/Mono.Unix/UnixDriveInfo.cs b/mcs/class/Mono.Posix/Mono.Unix/UnixDriveInfo.cs
index 61197ba..23f82b1 100644
--- a/mcs/class/Mono.Posix/Mono.Unix/UnixDriveInfo.cs
+++ b/mcs/class/Mono.Posix/Mono.Unix/UnixDriveInfo.cs
@@ -87,7 +87,7 @@ namespace Mono.Unix {
}
public long AvailableFreeSpace {
- get {Refresh (); return Convert.ToInt64 (stat.f_bavail * stat.f_bsize);}
+ get {Refresh (); return Convert.ToInt64 (stat.f_bavail * stat.f_frsize);}
}
public string DriveFormat {
@@ -122,7 +122,7 @@ namespace Mono.Unix {
}
public long TotalFreeSpace {
- get {Refresh (); return (long) (stat.f_bfree * stat.f_bsize);}
+ get {Refresh (); return (long) (stat.f_bfree * stat.f_frsize);}
}
public long TotalSize {
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog
index d210f5a..a71ac71 100644
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog
+++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-07 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Connection.cs: if the socket is already disconnected, Shutdown will
+ fail with a SocketException... Also, catch *all* the possible
+ exceptions since the socket.Close method could also throw
+ ObjectDisposedException.
+ Fixes bug #449092.
+
2008-12-20 Jeroen Asselman <jeroen-novel at asselman.com>
* Connection.cs: Apply patch from #436775, there is no need to
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs
index e6c38b4..1dc6815 100644
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs
+++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs
@@ -1150,7 +1150,9 @@ namespace Novell.Directory.Ldap
{
if(Ssl)
{
- sock.Shutdown(SocketShutdown.Both);
+ try {
+ sock.Shutdown(SocketShutdown.Both);
+ } catch {}
sock.Close();
}
else
@@ -1160,7 +1162,7 @@ namespace Novell.Directory.Ldap
socket.Close();
}
}
- catch (System.IO.IOException ie)
+ catch (Exception)
{
// ignore problem closing socket
}
diff --git a/mcs/class/PEAPI/ChangeLog b/mcs/class/PEAPI/ChangeLog
index a24b883..bcc5824 100644
--- a/mcs/class/PEAPI/ChangeLog
+++ b/mcs/class/PEAPI/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-31 Rodrigo Kumpera <rkumpera at novell.com>
+
+ * Code.cs (CILLabel): Add new constructor to signal that
+ a label is an absolute il offset. This is required by exception
+ handling declarations that use offsets and not labels.
+
2008-06-02 Ankit Jain <jankit at novell.com>
Fix bug #367114.
diff --git a/mcs/class/PEAPI/Code.cs b/mcs/class/PEAPI/Code.cs
index 9d68b9c..60f09b4 100644
--- a/mcs/class/PEAPI/Code.cs
+++ b/mcs/class/PEAPI/Code.cs
@@ -1296,10 +1296,17 @@ namespace PEAPI {
int tide = 0;
CILInstruction labInstr;
uint offset = 0;
+ bool absolute;
- public CILLabel (uint offset)
+
+ public CILLabel (uint offset, bool absolute)
{
this.offset = offset;
+ this.absolute = absolute;
+ }
+
+ public CILLabel (uint offset) : this (offset, false)
+ {
}
@@ -1332,6 +1339,7 @@ namespace PEAPI {
internal uint GetLabelOffset()
{
+ if (absolute) return offset;
if (labInstr == null) return 0;
return labInstr.offset + offset;
}
diff --git a/mcs/class/RabbitMQ.Client/ChangeLog b/mcs/class/RabbitMQ.Client/ChangeLog
index e6b29c1..cc93efa 100644
--- a/mcs/class/RabbitMQ.Client/ChangeLog
+++ b/mcs/class/RabbitMQ.Client/ChangeLog
@@ -1,3 +1,12 @@
+2009-05-27 Andrew Jorgensen <ajorgensen at novell.com>
+
+ * Makefile: Fixed dist
+
+2009-05-25 Michael Barker <mike at middlesoft.co.uk>
+
+ * Removed amqp spec files and modified generated code to fix licensing
+ issues.
+
2008-12-09 Atsushi Enomoto <atsushi at ximian.com>
* Makefile: those paths are all wrong!
diff --git a/mcs/class/RabbitMQ.Client/Makefile b/mcs/class/RabbitMQ.Client/Makefile
index 276f08c..590100a 100644
--- a/mcs/class/RabbitMQ.Client/Makefile
+++ b/mcs/class/RabbitMQ.Client/Makefile
@@ -4,9 +4,6 @@ SUBDIRS = src/client
include ../../build/rules.make
DISTFILES = \
- docs/specs/amqp0-8.xml \
- docs/specs/amqp0-9.xml \
- docs/specs/qpid-amqp.0-8.xml \
docs/specs/autogenerated-api-0-8.cs \
docs/specs/autogenerated-api-0-9.cs \
docs/specs/autogenerated-api-qpid-0-8.cs \
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-8.cs b/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-8.cs
new file mode 100644
index 0000000..6ee9678
--- /dev/null
+++ b/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-8.cs
@@ -0,0 +1,6245 @@
+// Autogenerated code. Do not edit.
+
+using RabbitMQ.Client;
+using RabbitMQ.Client.Exceptions;
+
+namespace RabbitMQ.Client.Framing.v0_8 {
+ public class Protocol: RabbitMQ.Client.Framing.Impl.v0_8.ProtocolBase {
+ ///<summary>Protocol major version (= 8)</summary>
+ public override int MajorVersion { get { return 8; } }
+ ///<summary>Protocol minor version (= 0)</summary>
+ public override int MinorVersion { get { return 0; } }
+ ///<summary>Protocol API name (= AMQP_0_8)</summary>
+ public override string ApiName { get { return "AMQP_0_8"; } }
+ ///<summary>Default TCP port (= 5672)</summary>
+ public override int DefaultPort { get { return 5672; } }
+
+ public override RabbitMQ.Client.Impl.MethodBase DecodeMethodFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
+ ushort classId = reader.ReadUInt16();
+ ushort methodId = reader.ReadUInt16();
+
+ switch (classId) {
+ case 10: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionStart result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionStart();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionStartOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionStartOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionSecure result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionSecure();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionSecureOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionSecureOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionTune result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionTune();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionTuneOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionTuneOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionOpen result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionOpen();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionOpenOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionRedirect result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionRedirect();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionClose result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionClose();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 61: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ConnectionCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionCloseOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 20: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ChannelOpen result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelOpen();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ChannelOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelOpenOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ChannelFlow result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelFlow();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ChannelFlowOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelFlowOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ChannelAlert result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelAlert();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ChannelClose result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelClose();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ChannelCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelCloseOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 30: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.AccessRequest result = new RabbitMQ.Client.Framing.Impl.v0_8.AccessRequest();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.AccessRequestOk result = new RabbitMQ.Client.Framing.Impl.v0_8.AccessRequestOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 40: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeclare result = new RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeclare();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeclareOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDelete result = new RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDelete();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeleteOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 50: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.QueueDeclare result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueDeclare();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.QueueDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueDeclareOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8.QueueBind result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueBind();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8.QueueBindOk result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueBindOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8.QueuePurge result = new RabbitMQ.Client.Framing.Impl.v0_8.QueuePurge();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8.QueuePurgeOk result = new RabbitMQ.Client.Framing.Impl.v0_8.QueuePurgeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8.QueueDelete result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueDelete();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_8.QueueDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueDeleteOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 60: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicQos result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicQos();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicQosOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicConsume result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicConsume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicConsumeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicCancel result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicCancel();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicCancelOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicPublish result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicPublish();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicReturn result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicReturn();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicDeliver();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 70: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicGet result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicGet();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 71: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicGetOk result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicGetOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 72: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicGetEmpty result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicGetEmpty();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 80: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicAck result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicAck();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 90: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicReject result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicReject();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 100: {
+ RabbitMQ.Client.Framing.Impl.v0_8.BasicRecover result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicRecover();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 70: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileQos result = new RabbitMQ.Client.Framing.Impl.v0_8.FileQos();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8.FileQosOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileConsume result = new RabbitMQ.Client.Framing.Impl.v0_8.FileConsume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8.FileConsumeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileCancel result = new RabbitMQ.Client.Framing.Impl.v0_8.FileCancel();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8.FileCancelOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileOpen result = new RabbitMQ.Client.Framing.Impl.v0_8.FileOpen();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8.FileOpenOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileStage result = new RabbitMQ.Client.Framing.Impl.v0_8.FileStage();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FilePublish result = new RabbitMQ.Client.Framing.Impl.v0_8.FilePublish();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 70: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileReturn result = new RabbitMQ.Client.Framing.Impl.v0_8.FileReturn();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 80: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8.FileDeliver();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 90: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileAck result = new RabbitMQ.Client.Framing.Impl.v0_8.FileAck();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 100: {
+ RabbitMQ.Client.Framing.Impl.v0_8.FileReject result = new RabbitMQ.Client.Framing.Impl.v0_8.FileReject();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 80: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.StreamQos result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamQos();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.StreamQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamQosOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8.StreamConsume result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamConsume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8.StreamConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamConsumeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8.StreamCancel result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamCancel();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8.StreamCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamCancelOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8.StreamPublish result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamPublish();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_8.StreamReturn result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamReturn();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_8.StreamDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamDeliver();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 90: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TxSelect result = new RabbitMQ.Client.Framing.Impl.v0_8.TxSelect();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TxSelectOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TxCommit result = new RabbitMQ.Client.Framing.Impl.v0_8.TxCommit();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TxCommitOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TxCommitOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TxRollback result = new RabbitMQ.Client.Framing.Impl.v0_8.TxRollback();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TxRollbackOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TxRollbackOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 100: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.DtxSelect result = new RabbitMQ.Client.Framing.Impl.v0_8.DtxSelect();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.DtxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_8.DtxSelectOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8.DtxStart result = new RabbitMQ.Client.Framing.Impl.v0_8.DtxStart();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8.DtxStartOk result = new RabbitMQ.Client.Framing.Impl.v0_8.DtxStartOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 110: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TunnelRequest result = new RabbitMQ.Client.Framing.Impl.v0_8.TunnelRequest();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 120: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TestInteger result = new RabbitMQ.Client.Framing.Impl.v0_8.TestInteger();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TestIntegerOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TestIntegerOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TestString result = new RabbitMQ.Client.Framing.Impl.v0_8.TestString();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TestStringOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TestStringOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TestTable result = new RabbitMQ.Client.Framing.Impl.v0_8.TestTable();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TestTableOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TestTableOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TestContent result = new RabbitMQ.Client.Framing.Impl.v0_8.TestContent();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_8.TestContentOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TestContentOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ default: break;
+ }
+ throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, methodId);
+ }
+
+ public override RabbitMQ.Client.Impl.ContentHeaderBase DecodeContentHeaderFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
+ ushort classId = reader.ReadUInt16();
+
+ switch (classId) {
+ case 60: return new BasicProperties();
+ case 70: return new FileProperties();
+ case 80: return new StreamProperties();
+ case 110: return new TunnelProperties();
+ case 120: return new TestProperties();
+ default: break;
+ }
+ throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, 0);
+ }
+ }
+ public class Constants {
+ ///<summary>(= 1)</summary>
+ public const int FrameMethod = 1;
+ ///<summary>(= 2)</summary>
+ public const int FrameHeader = 2;
+ ///<summary>(= 3)</summary>
+ public const int FrameBody = 3;
+ ///<summary>(= 4)</summary>
+ public const int FrameOobMethod = 4;
+ ///<summary>(= 5)</summary>
+ public const int FrameOobHeader = 5;
+ ///<summary>(= 6)</summary>
+ public const int FrameOobBody = 6;
+ ///<summary>(= 7)</summary>
+ public const int FrameTrace = 7;
+ ///<summary>(= 8)</summary>
+ public const int FrameHeartbeat = 8;
+ ///<summary>(= 4096)</summary>
+ public const int FrameMinSize = 4096;
+ ///<summary>(= 206)</summary>
+ public const int FrameEnd = 206;
+ ///<summary>(= 200)</summary>
+ public const int ReplySuccess = 200;
+ ///<summary>(= 310)</summary>
+ public const int NotDelivered = 310;
+ ///<summary>(= 311)</summary>
+ public const int ContentTooLarge = 311;
+ ///<summary>(= 320)</summary>
+ public const int ConnectionForced = 320;
+ ///<summary>(= 402)</summary>
+ public const int InvalidPath = 402;
+ ///<summary>(= 403)</summary>
+ public const int AccessRefused = 403;
+ ///<summary>(= 404)</summary>
+ public const int NotFound = 404;
+ ///<summary>(= 405)</summary>
+ public const int ResourceLocked = 405;
+ ///<summary>(= 501)</summary>
+ public const int FrameError = 501;
+ ///<summary>(= 502)</summary>
+ public const int SyntaxError = 502;
+ ///<summary>(= 503)</summary>
+ public const int CommandInvalid = 503;
+ ///<summary>(= 504)</summary>
+ public const int ChannelError = 504;
+ ///<summary>(= 506)</summary>
+ public const int ResourceError = 506;
+ ///<summary>(= 530)</summary>
+ public const int NotAllowed = 530;
+ ///<summary>(= 540)</summary>
+ public const int NotImplemented = 540;
+ ///<summary>(= 541)</summary>
+ public const int InternalError = 541;
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.start".</summary>
+ public interface IConnectionStart: IMethod {
+ byte VersionMajor { get; }
+ byte VersionMinor { get; }
+ System.Collections.IDictionary ServerProperties { get; }
+ byte[] Mechanisms { get; }
+ byte[] Locales { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.start-ok".</summary>
+ public interface IConnectionStartOk: IMethod {
+ System.Collections.IDictionary ClientProperties { get; }
+ string Mechanism { get; }
+ byte[] Response { get; }
+ string Locale { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.secure".</summary>
+ public interface IConnectionSecure: IMethod {
+ byte[] Challenge { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.secure-ok".</summary>
+ public interface IConnectionSecureOk: IMethod {
+ byte[] Response { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.tune".</summary>
+ public interface IConnectionTune: IMethod {
+ ushort ChannelMax { get; }
+ uint FrameMax { get; }
+ ushort Heartbeat { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.tune-ok".</summary>
+ public interface IConnectionTuneOk: IMethod {
+ ushort ChannelMax { get; }
+ uint FrameMax { get; }
+ ushort Heartbeat { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.open".</summary>
+ public interface IConnectionOpen: IMethod {
+ string VirtualHost { get; }
+ string Capabilities { get; }
+ bool Insist { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.open-ok".</summary>
+ public interface IConnectionOpenOk: IMethod {
+ string KnownHosts { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.redirect".</summary>
+ public interface IConnectionRedirect: IMethod {
+ string Host { get; }
+ string KnownHosts { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.close".</summary>
+ public interface IConnectionClose: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ ushort ClassId { get; }
+ ushort MethodId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.close-ok".</summary>
+ public interface IConnectionCloseOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.open".</summary>
+ public interface IChannelOpen: IMethod {
+ string OutOfBand { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.open-ok".</summary>
+ public interface IChannelOpenOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.flow".</summary>
+ public interface IChannelFlow: IMethod {
+ bool Active { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.flow-ok".</summary>
+ public interface IChannelFlowOk: IMethod {
+ bool Active { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.alert".</summary>
+ public interface IChannelAlert: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ System.Collections.IDictionary Details { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.close".</summary>
+ public interface IChannelClose: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ ushort ClassId { get; }
+ ushort MethodId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.close-ok".</summary>
+ public interface IChannelCloseOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "access.request".</summary>
+ public interface IAccessRequest: IMethod {
+ string Realm { get; }
+ bool Exclusive { get; }
+ bool Passive { get; }
+ bool Active { get; }
+ bool Write { get; }
+ bool Read { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "access.request-ok".</summary>
+ public interface IAccessRequestOk: IMethod {
+ ushort Ticket { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.declare".</summary>
+ public interface IExchangeDeclare: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string Type { get; }
+ bool Passive { get; }
+ bool Durable { get; }
+ bool AutoDelete { get; }
+ bool Internal { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.declare-ok".</summary>
+ public interface IExchangeDeclareOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.delete".</summary>
+ public interface IExchangeDelete: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ bool IfUnused { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.delete-ok".</summary>
+ public interface IExchangeDeleteOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.declare".</summary>
+ public interface IQueueDeclare: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool Passive { get; }
+ bool Durable { get; }
+ bool Exclusive { get; }
+ bool AutoDelete { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.declare-ok".</summary>
+ public interface IQueueDeclareOk: IMethod {
+ string Queue { get; }
+ uint MessageCount { get; }
+ uint ConsumerCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.bind".</summary>
+ public interface IQueueBind: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.bind-ok".</summary>
+ public interface IQueueBindOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.purge".</summary>
+ public interface IQueuePurge: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.purge-ok".</summary>
+ public interface IQueuePurgeOk: IMethod {
+ uint MessageCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.delete".</summary>
+ public interface IQueueDelete: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool IfUnused { get; }
+ bool IfEmpty { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.delete-ok".</summary>
+ public interface IQueueDeleteOk: IMethod {
+ uint MessageCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.qos".</summary>
+ public interface IBasicQos: IMethod {
+ uint PrefetchSize { get; }
+ ushort PrefetchCount { get; }
+ bool Global { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.qos-ok".</summary>
+ public interface IBasicQosOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.consume".</summary>
+ public interface IBasicConsume: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string ConsumerTag { get; }
+ bool NoLocal { get; }
+ bool NoAck { get; }
+ bool Exclusive { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.consume-ok".</summary>
+ public interface IBasicConsumeOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.cancel".</summary>
+ public interface IBasicCancel: IMethod {
+ string ConsumerTag { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.cancel-ok".</summary>
+ public interface IBasicCancelOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.publish".</summary>
+ public interface IBasicPublish: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Mandatory { get; }
+ bool Immediate { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.return".</summary>
+ public interface IBasicReturn: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.deliver".</summary>
+ public interface IBasicDeliver: IMethod {
+ string ConsumerTag { get; }
+ ulong DeliveryTag { get; }
+ bool Redelivered { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.get".</summary>
+ public interface IBasicGet: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool NoAck { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.get-ok".</summary>
+ public interface IBasicGetOk: IMethod {
+ ulong DeliveryTag { get; }
+ bool Redelivered { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ uint MessageCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.get-empty".</summary>
+ public interface IBasicGetEmpty: IMethod {
+ string ClusterId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.ack".</summary>
+ public interface IBasicAck: IMethod {
+ ulong DeliveryTag { get; }
+ bool Multiple { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.reject".</summary>
+ public interface IBasicReject: IMethod {
+ ulong DeliveryTag { get; }
+ bool Requeue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.recover".</summary>
+ public interface IBasicRecover: IMethod {
+ bool Requeue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.qos".</summary>
+ public interface IFileQos: IMethod {
+ uint PrefetchSize { get; }
+ ushort PrefetchCount { get; }
+ bool Global { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.qos-ok".</summary>
+ public interface IFileQosOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.consume".</summary>
+ public interface IFileConsume: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string ConsumerTag { get; }
+ bool NoLocal { get; }
+ bool NoAck { get; }
+ bool Exclusive { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.consume-ok".</summary>
+ public interface IFileConsumeOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.cancel".</summary>
+ public interface IFileCancel: IMethod {
+ string ConsumerTag { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.cancel-ok".</summary>
+ public interface IFileCancelOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.open".</summary>
+ public interface IFileOpen: IMethod {
+ string Identifier { get; }
+ ulong ContentSize { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.open-ok".</summary>
+ public interface IFileOpenOk: IMethod {
+ ulong StagedSize { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.stage".</summary>
+ public interface IFileStage: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.publish".</summary>
+ public interface IFilePublish: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Mandatory { get; }
+ bool Immediate { get; }
+ string Identifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.return".</summary>
+ public interface IFileReturn: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.deliver".</summary>
+ public interface IFileDeliver: IMethod {
+ string ConsumerTag { get; }
+ ulong DeliveryTag { get; }
+ bool Redelivered { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ string Identifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.ack".</summary>
+ public interface IFileAck: IMethod {
+ ulong DeliveryTag { get; }
+ bool Multiple { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.reject".</summary>
+ public interface IFileReject: IMethod {
+ ulong DeliveryTag { get; }
+ bool Requeue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.qos".</summary>
+ public interface IStreamQos: IMethod {
+ uint PrefetchSize { get; }
+ ushort PrefetchCount { get; }
+ uint ConsumeRate { get; }
+ bool Global { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.qos-ok".</summary>
+ public interface IStreamQosOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.consume".</summary>
+ public interface IStreamConsume: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string ConsumerTag { get; }
+ bool NoLocal { get; }
+ bool Exclusive { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.consume-ok".</summary>
+ public interface IStreamConsumeOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.cancel".</summary>
+ public interface IStreamCancel: IMethod {
+ string ConsumerTag { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.cancel-ok".</summary>
+ public interface IStreamCancelOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.publish".</summary>
+ public interface IStreamPublish: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Mandatory { get; }
+ bool Immediate { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.return".</summary>
+ public interface IStreamReturn: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.deliver".</summary>
+ public interface IStreamDeliver: IMethod {
+ string ConsumerTag { get; }
+ ulong DeliveryTag { get; }
+ string Exchange { get; }
+ string Queue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.select".</summary>
+ public interface ITxSelect: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.select-ok".</summary>
+ public interface ITxSelectOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.commit".</summary>
+ public interface ITxCommit: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.commit-ok".</summary>
+ public interface ITxCommitOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.rollback".</summary>
+ public interface ITxRollback: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.rollback-ok".</summary>
+ public interface ITxRollbackOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.select".</summary>
+ public interface IDtxSelect: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.select-ok".</summary>
+ public interface IDtxSelectOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.start".</summary>
+ public interface IDtxStart: IMethod {
+ string DtxIdentifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.start-ok".</summary>
+ public interface IDtxStartOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tunnel.request".</summary>
+ public interface ITunnelRequest: IMethod {
+ System.Collections.IDictionary MetaData { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.integer".</summary>
+ public interface ITestInteger: IMethod {
+ byte Integer1 { get; }
+ ushort Integer2 { get; }
+ uint Integer3 { get; }
+ ulong Integer4 { get; }
+ byte Operation { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.integer-ok".</summary>
+ public interface ITestIntegerOk: IMethod {
+ ulong Result { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.string".</summary>
+ public interface ITestString: IMethod {
+ string String1 { get; }
+ byte[] String2 { get; }
+ byte Operation { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.string-ok".</summary>
+ public interface ITestStringOk: IMethod {
+ byte[] Result { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.table".</summary>
+ public interface ITestTable: IMethod {
+ System.Collections.IDictionary Table { get; }
+ byte IntegerOp { get; }
+ byte StringOp { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.table-ok".</summary>
+ public interface ITestTableOk: IMethod {
+ ulong IntegerResult { get; }
+ byte[] StringResult { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.content".</summary>
+ public interface ITestContent: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.content-ok".</summary>
+ public interface ITestContentOk: IMethod {
+ uint ContentChecksum { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "basic"</summary>
+ public class BasicProperties: RabbitMQ.Client.Impl.BasicProperties {
+ private string m_contentType;
+ private string m_contentEncoding;
+ private System.Collections.IDictionary m_headers;
+ private byte m_deliveryMode;
+ private byte m_priority;
+ private string m_correlationId;
+ private string m_replyTo;
+ private string m_expiration;
+ private string m_messageId;
+ private AmqpTimestamp m_timestamp;
+ private string m_type;
+ private string m_userId;
+ private string m_appId;
+ private string m_clusterId;
+
+ private bool contentType_present = false;
+ private bool contentEncoding_present = false;
+ private bool headers_present = false;
+ private bool deliveryMode_present = false;
+ private bool priority_present = false;
+ private bool correlationId_present = false;
+ private bool replyTo_present = false;
+ private bool expiration_present = false;
+ private bool messageId_present = false;
+ private bool timestamp_present = false;
+ private bool type_present = false;
+ private bool userId_present = false;
+ private bool appId_present = false;
+ private bool clusterId_present = false;
+
+ public override string ContentType {
+ get {
+ return m_contentType;
+ }
+ set {
+ contentType_present = true;
+ m_contentType = value;
+ }
+ }
+ public override string ContentEncoding {
+ get {
+ return m_contentEncoding;
+ }
+ set {
+ contentEncoding_present = true;
+ m_contentEncoding = value;
+ }
+ }
+ public override System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public override byte DeliveryMode {
+ get {
+ return m_deliveryMode;
+ }
+ set {
+ deliveryMode_present = true;
+ m_deliveryMode = value;
+ }
+ }
+ public override byte Priority {
+ get {
+ return m_priority;
+ }
+ set {
+ priority_present = true;
+ m_priority = value;
+ }
+ }
+ public override string CorrelationId {
+ get {
+ return m_correlationId;
+ }
+ set {
+ correlationId_present = true;
+ m_correlationId = value;
+ }
+ }
+ public override string ReplyTo {
+ get {
+ return m_replyTo;
+ }
+ set {
+ replyTo_present = true;
+ m_replyTo = value;
+ }
+ }
+ public override string Expiration {
+ get {
+ return m_expiration;
+ }
+ set {
+ expiration_present = true;
+ m_expiration = value;
+ }
+ }
+ public override string MessageId {
+ get {
+ return m_messageId;
+ }
+ set {
+ messageId_present = true;
+ m_messageId = value;
+ }
+ }
+ public override AmqpTimestamp Timestamp {
+ get {
+ return m_timestamp;
+ }
+ set {
+ timestamp_present = true;
+ m_timestamp = value;
+ }
+ }
+ public override string Type {
+ get {
+ return m_type;
+ }
+ set {
+ type_present = true;
+ m_type = value;
+ }
+ }
+ public override string UserId {
+ get {
+ return m_userId;
+ }
+ set {
+ userId_present = true;
+ m_userId = value;
+ }
+ }
+ public override string AppId {
+ get {
+ return m_appId;
+ }
+ set {
+ appId_present = true;
+ m_appId = value;
+ }
+ }
+ public override string ClusterId {
+ get {
+ return m_clusterId;
+ }
+ set {
+ clusterId_present = true;
+ m_clusterId = value;
+ }
+ }
+
+ public override void ClearContentType() { contentType_present = false; }
+ public override void ClearContentEncoding() { contentEncoding_present = false; }
+ public override void ClearHeaders() { headers_present = false; }
+ public override void ClearDeliveryMode() { deliveryMode_present = false; }
+ public override void ClearPriority() { priority_present = false; }
+ public override void ClearCorrelationId() { correlationId_present = false; }
+ public override void ClearReplyTo() { replyTo_present = false; }
+ public override void ClearExpiration() { expiration_present = false; }
+ public override void ClearMessageId() { messageId_present = false; }
+ public override void ClearTimestamp() { timestamp_present = false; }
+ public override void ClearType() { type_present = false; }
+ public override void ClearUserId() { userId_present = false; }
+ public override void ClearAppId() { appId_present = false; }
+ public override void ClearClusterId() { clusterId_present = false; }
+
+ public BasicProperties() {}
+ public override int ProtocolClassId { get { return 60; } }
+ public override string ProtocolClassName { get { return "basic"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ contentType_present = reader.ReadPresence();
+ contentEncoding_present = reader.ReadPresence();
+ headers_present = reader.ReadPresence();
+ deliveryMode_present = reader.ReadPresence();
+ priority_present = reader.ReadPresence();
+ correlationId_present = reader.ReadPresence();
+ replyTo_present = reader.ReadPresence();
+ expiration_present = reader.ReadPresence();
+ messageId_present = reader.ReadPresence();
+ timestamp_present = reader.ReadPresence();
+ type_present = reader.ReadPresence();
+ userId_present = reader.ReadPresence();
+ appId_present = reader.ReadPresence();
+ clusterId_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (contentType_present) { m_contentType = reader.ReadShortstr(); }
+ if (contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (deliveryMode_present) { m_deliveryMode = reader.ReadOctet(); }
+ if (priority_present) { m_priority = reader.ReadOctet(); }
+ if (correlationId_present) { m_correlationId = reader.ReadShortstr(); }
+ if (replyTo_present) { m_replyTo = reader.ReadShortstr(); }
+ if (expiration_present) { m_expiration = reader.ReadShortstr(); }
+ if (messageId_present) { m_messageId = reader.ReadShortstr(); }
+ if (timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
+ if (type_present) { m_type = reader.ReadShortstr(); }
+ if (userId_present) { m_userId = reader.ReadShortstr(); }
+ if (appId_present) { m_appId = reader.ReadShortstr(); }
+ if (clusterId_present) { m_clusterId = reader.ReadShortstr(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(contentType_present);
+ writer.WritePresence(contentEncoding_present);
+ writer.WritePresence(headers_present);
+ writer.WritePresence(deliveryMode_present);
+ writer.WritePresence(priority_present);
+ writer.WritePresence(correlationId_present);
+ writer.WritePresence(replyTo_present);
+ writer.WritePresence(expiration_present);
+ writer.WritePresence(messageId_present);
+ writer.WritePresence(timestamp_present);
+ writer.WritePresence(type_present);
+ writer.WritePresence(userId_present);
+ writer.WritePresence(appId_present);
+ writer.WritePresence(clusterId_present);
+ writer.FinishPresence();
+ if (contentType_present) { writer.WriteShortstr(m_contentType); }
+ if (contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (deliveryMode_present) { writer.WriteOctet(m_deliveryMode); }
+ if (priority_present) { writer.WriteOctet(m_priority); }
+ if (correlationId_present) { writer.WriteShortstr(m_correlationId); }
+ if (replyTo_present) { writer.WriteShortstr(m_replyTo); }
+ if (expiration_present) { writer.WriteShortstr(m_expiration); }
+ if (messageId_present) { writer.WriteShortstr(m_messageId); }
+ if (timestamp_present) { writer.WriteTimestamp(m_timestamp); }
+ if (type_present) { writer.WriteShortstr(m_type); }
+ if (userId_present) { writer.WriteShortstr(m_userId); }
+ if (appId_present) { writer.WriteShortstr(m_appId); }
+ if (clusterId_present) { writer.WriteShortstr(m_clusterId); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("content type="); sb.Append(contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
+ sb.Append("content encoding="); sb.Append(contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("delivery mode="); sb.Append(deliveryMode_present ? m_deliveryMode.ToString() : "_"); sb.Append(", ");
+ sb.Append("priority="); sb.Append(priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
+ sb.Append("correlation id="); sb.Append(correlationId_present ? (m_correlationId == null ? "(null)" : m_correlationId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("reply to="); sb.Append(replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
+ sb.Append("expiration="); sb.Append(expiration_present ? (m_expiration == null ? "(null)" : m_expiration.ToString()) : "_"); sb.Append(", ");
+ sb.Append("message id="); sb.Append(messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("timestamp="); sb.Append(timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
+ sb.Append("type="); sb.Append(type_present ? (m_type == null ? "(null)" : m_type.ToString()) : "_"); sb.Append(", ");
+ sb.Append("user id="); sb.Append(userId_present ? (m_userId == null ? "(null)" : m_userId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("app id="); sb.Append(appId_present ? (m_appId == null ? "(null)" : m_appId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("cluster id="); sb.Append(clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "file"</summary>
+ public class FileProperties: RabbitMQ.Client.Impl.FileProperties {
+ private string m_contentType;
+ private string m_contentEncoding;
+ private System.Collections.IDictionary m_headers;
+ private byte m_priority;
+ private string m_replyTo;
+ private string m_messageId;
+ private string m_filename;
+ private AmqpTimestamp m_timestamp;
+ private string m_clusterId;
+
+ private bool contentType_present = false;
+ private bool contentEncoding_present = false;
+ private bool headers_present = false;
+ private bool priority_present = false;
+ private bool replyTo_present = false;
+ private bool messageId_present = false;
+ private bool filename_present = false;
+ private bool timestamp_present = false;
+ private bool clusterId_present = false;
+
+ public override string ContentType {
+ get {
+ return m_contentType;
+ }
+ set {
+ contentType_present = true;
+ m_contentType = value;
+ }
+ }
+ public override string ContentEncoding {
+ get {
+ return m_contentEncoding;
+ }
+ set {
+ contentEncoding_present = true;
+ m_contentEncoding = value;
+ }
+ }
+ public override System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public override byte Priority {
+ get {
+ return m_priority;
+ }
+ set {
+ priority_present = true;
+ m_priority = value;
+ }
+ }
+ public override string ReplyTo {
+ get {
+ return m_replyTo;
+ }
+ set {
+ replyTo_present = true;
+ m_replyTo = value;
+ }
+ }
+ public override string MessageId {
+ get {
+ return m_messageId;
+ }
+ set {
+ messageId_present = true;
+ m_messageId = value;
+ }
+ }
+ public override string Filename {
+ get {
+ return m_filename;
+ }
+ set {
+ filename_present = true;
+ m_filename = value;
+ }
+ }
+ public override AmqpTimestamp Timestamp {
+ get {
+ return m_timestamp;
+ }
+ set {
+ timestamp_present = true;
+ m_timestamp = value;
+ }
+ }
+ public override string ClusterId {
+ get {
+ return m_clusterId;
+ }
+ set {
+ clusterId_present = true;
+ m_clusterId = value;
+ }
+ }
+
+ public override void ClearContentType() { contentType_present = false; }
+ public override void ClearContentEncoding() { contentEncoding_present = false; }
+ public override void ClearHeaders() { headers_present = false; }
+ public override void ClearPriority() { priority_present = false; }
+ public override void ClearReplyTo() { replyTo_present = false; }
+ public override void ClearMessageId() { messageId_present = false; }
+ public override void ClearFilename() { filename_present = false; }
+ public override void ClearTimestamp() { timestamp_present = false; }
+ public override void ClearClusterId() { clusterId_present = false; }
+
+ public FileProperties() {}
+ public override int ProtocolClassId { get { return 70; } }
+ public override string ProtocolClassName { get { return "file"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ contentType_present = reader.ReadPresence();
+ contentEncoding_present = reader.ReadPresence();
+ headers_present = reader.ReadPresence();
+ priority_present = reader.ReadPresence();
+ replyTo_present = reader.ReadPresence();
+ messageId_present = reader.ReadPresence();
+ filename_present = reader.ReadPresence();
+ timestamp_present = reader.ReadPresence();
+ clusterId_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (contentType_present) { m_contentType = reader.ReadShortstr(); }
+ if (contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (priority_present) { m_priority = reader.ReadOctet(); }
+ if (replyTo_present) { m_replyTo = reader.ReadShortstr(); }
+ if (messageId_present) { m_messageId = reader.ReadShortstr(); }
+ if (filename_present) { m_filename = reader.ReadShortstr(); }
+ if (timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
+ if (clusterId_present) { m_clusterId = reader.ReadShortstr(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(contentType_present);
+ writer.WritePresence(contentEncoding_present);
+ writer.WritePresence(headers_present);
+ writer.WritePresence(priority_present);
+ writer.WritePresence(replyTo_present);
+ writer.WritePresence(messageId_present);
+ writer.WritePresence(filename_present);
+ writer.WritePresence(timestamp_present);
+ writer.WritePresence(clusterId_present);
+ writer.FinishPresence();
+ if (contentType_present) { writer.WriteShortstr(m_contentType); }
+ if (contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (priority_present) { writer.WriteOctet(m_priority); }
+ if (replyTo_present) { writer.WriteShortstr(m_replyTo); }
+ if (messageId_present) { writer.WriteShortstr(m_messageId); }
+ if (filename_present) { writer.WriteShortstr(m_filename); }
+ if (timestamp_present) { writer.WriteTimestamp(m_timestamp); }
+ if (clusterId_present) { writer.WriteShortstr(m_clusterId); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("content type="); sb.Append(contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
+ sb.Append("content encoding="); sb.Append(contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("priority="); sb.Append(priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
+ sb.Append("reply to="); sb.Append(replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
+ sb.Append("message id="); sb.Append(messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("filename="); sb.Append(filename_present ? (m_filename == null ? "(null)" : m_filename.ToString()) : "_"); sb.Append(", ");
+ sb.Append("timestamp="); sb.Append(timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
+ sb.Append("cluster id="); sb.Append(clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "stream"</summary>
+ public class StreamProperties: RabbitMQ.Client.Impl.StreamProperties {
+ private string m_contentType;
+ private string m_contentEncoding;
+ private System.Collections.IDictionary m_headers;
+ private byte m_priority;
+ private AmqpTimestamp m_timestamp;
+
+ private bool contentType_present = false;
+ private bool contentEncoding_present = false;
+ private bool headers_present = false;
+ private bool priority_present = false;
+ private bool timestamp_present = false;
+
+ public override string ContentType {
+ get {
+ return m_contentType;
+ }
+ set {
+ contentType_present = true;
+ m_contentType = value;
+ }
+ }
+ public override string ContentEncoding {
+ get {
+ return m_contentEncoding;
+ }
+ set {
+ contentEncoding_present = true;
+ m_contentEncoding = value;
+ }
+ }
+ public override System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public override byte Priority {
+ get {
+ return m_priority;
+ }
+ set {
+ priority_present = true;
+ m_priority = value;
+ }
+ }
+ public override AmqpTimestamp Timestamp {
+ get {
+ return m_timestamp;
+ }
+ set {
+ timestamp_present = true;
+ m_timestamp = value;
+ }
+ }
+
+ public override void ClearContentType() { contentType_present = false; }
+ public override void ClearContentEncoding() { contentEncoding_present = false; }
+ public override void ClearHeaders() { headers_present = false; }
+ public override void ClearPriority() { priority_present = false; }
+ public override void ClearTimestamp() { timestamp_present = false; }
+
+ public StreamProperties() {}
+ public override int ProtocolClassId { get { return 80; } }
+ public override string ProtocolClassName { get { return "stream"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ contentType_present = reader.ReadPresence();
+ contentEncoding_present = reader.ReadPresence();
+ headers_present = reader.ReadPresence();
+ priority_present = reader.ReadPresence();
+ timestamp_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (contentType_present) { m_contentType = reader.ReadShortstr(); }
+ if (contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (priority_present) { m_priority = reader.ReadOctet(); }
+ if (timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(contentType_present);
+ writer.WritePresence(contentEncoding_present);
+ writer.WritePresence(headers_present);
+ writer.WritePresence(priority_present);
+ writer.WritePresence(timestamp_present);
+ writer.FinishPresence();
+ if (contentType_present) { writer.WriteShortstr(m_contentType); }
+ if (contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (priority_present) { writer.WriteOctet(m_priority); }
+ if (timestamp_present) { writer.WriteTimestamp(m_timestamp); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("content type="); sb.Append(contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
+ sb.Append("content encoding="); sb.Append(contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("priority="); sb.Append(priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
+ sb.Append("timestamp="); sb.Append(timestamp_present ? m_timestamp.ToString() : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "tunnel"</summary>
+ public class TunnelProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
+ private System.Collections.IDictionary m_headers;
+ private string m_proxyName;
+ private string m_dataName;
+ private byte m_durable;
+ private byte m_broadcast;
+
+ private bool headers_present = false;
+ private bool proxyName_present = false;
+ private bool dataName_present = false;
+ private bool durable_present = false;
+ private bool broadcast_present = false;
+
+ public System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public string ProxyName {
+ get {
+ return m_proxyName;
+ }
+ set {
+ proxyName_present = true;
+ m_proxyName = value;
+ }
+ }
+ public string DataName {
+ get {
+ return m_dataName;
+ }
+ set {
+ dataName_present = true;
+ m_dataName = value;
+ }
+ }
+ public byte Durable {
+ get {
+ return m_durable;
+ }
+ set {
+ durable_present = true;
+ m_durable = value;
+ }
+ }
+ public byte Broadcast {
+ get {
+ return m_broadcast;
+ }
+ set {
+ broadcast_present = true;
+ m_broadcast = value;
+ }
+ }
+
+ public void ClearHeaders() { headers_present = false; }
+ public void ClearProxyName() { proxyName_present = false; }
+ public void ClearDataName() { dataName_present = false; }
+ public void ClearDurable() { durable_present = false; }
+ public void ClearBroadcast() { broadcast_present = false; }
+
+ public TunnelProperties() {}
+ public override int ProtocolClassId { get { return 110; } }
+ public override string ProtocolClassName { get { return "tunnel"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ headers_present = reader.ReadPresence();
+ proxyName_present = reader.ReadPresence();
+ dataName_present = reader.ReadPresence();
+ durable_present = reader.ReadPresence();
+ broadcast_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (proxyName_present) { m_proxyName = reader.ReadShortstr(); }
+ if (dataName_present) { m_dataName = reader.ReadShortstr(); }
+ if (durable_present) { m_durable = reader.ReadOctet(); }
+ if (broadcast_present) { m_broadcast = reader.ReadOctet(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(headers_present);
+ writer.WritePresence(proxyName_present);
+ writer.WritePresence(dataName_present);
+ writer.WritePresence(durable_present);
+ writer.WritePresence(broadcast_present);
+ writer.FinishPresence();
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (proxyName_present) { writer.WriteShortstr(m_proxyName); }
+ if (dataName_present) { writer.WriteShortstr(m_dataName); }
+ if (durable_present) { writer.WriteOctet(m_durable); }
+ if (broadcast_present) { writer.WriteOctet(m_broadcast); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("proxy name="); sb.Append(proxyName_present ? (m_proxyName == null ? "(null)" : m_proxyName.ToString()) : "_"); sb.Append(", ");
+ sb.Append("data name="); sb.Append(dataName_present ? (m_dataName == null ? "(null)" : m_dataName.ToString()) : "_"); sb.Append(", ");
+ sb.Append("durable="); sb.Append(durable_present ? m_durable.ToString() : "_"); sb.Append(", ");
+ sb.Append("broadcast="); sb.Append(broadcast_present ? m_broadcast.ToString() : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "test"</summary>
+ public class TestProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
+
+
+
+
+ public TestProperties() {}
+ public override int ProtocolClassId { get { return 120; } }
+ public override string ProtocolClassName { get { return "test"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ reader.FinishPresence();
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.FinishPresence();
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+}
+namespace RabbitMQ.Client.Framing.Impl.v0_8 {
+ using RabbitMQ.Client.Framing.v0_8;
+ public enum ClassId {
+ Connection = 10,
+ Channel = 20,
+ Access = 30,
+ Exchange = 40,
+ Queue = 50,
+ Basic = 60,
+ File = 70,
+ Stream = 80,
+ Tx = 90,
+ Dtx = 100,
+ Tunnel = 110,
+ Test = 120,
+ Invalid = -1
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionStart: RabbitMQ.Client.Impl.MethodBase, IConnectionStart {
+ public const int ClassId = 10;
+ public const int MethodId = 10;
+
+ public byte m_versionMajor;
+ public byte m_versionMinor;
+ public System.Collections.IDictionary m_serverProperties;
+ public byte[] m_mechanisms;
+ public byte[] m_locales;
+
+ byte IConnectionStart.VersionMajor { get { return m_versionMajor; } }
+ byte IConnectionStart.VersionMinor { get { return m_versionMinor; } }
+ System.Collections.IDictionary IConnectionStart.ServerProperties { get { return m_serverProperties; } }
+ byte[] IConnectionStart.Mechanisms { get { return m_mechanisms; } }
+ byte[] IConnectionStart.Locales { get { return m_locales; } }
+
+ public ConnectionStart() {}
+ public ConnectionStart(
+ byte initVersionMajor,
+ byte initVersionMinor,
+ System.Collections.IDictionary initServerProperties,
+ byte[] initMechanisms,
+ byte[] initLocales)
+ {
+ m_versionMajor = initVersionMajor;
+ m_versionMinor = initVersionMinor;
+ m_serverProperties = initServerProperties;
+ m_mechanisms = initMechanisms;
+ m_locales = initLocales;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "connection.start"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_versionMajor = reader.ReadOctet();
+ m_versionMinor = reader.ReadOctet();
+ m_serverProperties = reader.ReadTable();
+ m_mechanisms = reader.ReadLongstr();
+ m_locales = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteOctet(m_versionMajor);
+ writer.WriteOctet(m_versionMinor);
+ writer.WriteTable(m_serverProperties);
+ writer.WriteLongstr(m_mechanisms);
+ writer.WriteLongstr(m_locales);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_versionMajor); sb.Append(",");
+ sb.Append(m_versionMinor); sb.Append(",");
+ sb.Append(m_serverProperties); sb.Append(",");
+ sb.Append(m_mechanisms); sb.Append(",");
+ sb.Append(m_locales);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionStartOk: RabbitMQ.Client.Impl.MethodBase, IConnectionStartOk {
+ public const int ClassId = 10;
+ public const int MethodId = 11;
+
+ public System.Collections.IDictionary m_clientProperties;
+ public string m_mechanism;
+ public byte[] m_response;
+ public string m_locale;
+
+ System.Collections.IDictionary IConnectionStartOk.ClientProperties { get { return m_clientProperties; } }
+ string IConnectionStartOk.Mechanism { get { return m_mechanism; } }
+ byte[] IConnectionStartOk.Response { get { return m_response; } }
+ string IConnectionStartOk.Locale { get { return m_locale; } }
+
+ public ConnectionStartOk() {}
+ public ConnectionStartOk(
+ System.Collections.IDictionary initClientProperties,
+ string initMechanism,
+ byte[] initResponse,
+ string initLocale)
+ {
+ m_clientProperties = initClientProperties;
+ m_mechanism = initMechanism;
+ m_response = initResponse;
+ m_locale = initLocale;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "connection.start-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_clientProperties = reader.ReadTable();
+ m_mechanism = reader.ReadShortstr();
+ m_response = reader.ReadLongstr();
+ m_locale = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteTable(m_clientProperties);
+ writer.WriteShortstr(m_mechanism);
+ writer.WriteLongstr(m_response);
+ writer.WriteShortstr(m_locale);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_clientProperties); sb.Append(",");
+ sb.Append(m_mechanism); sb.Append(",");
+ sb.Append(m_response); sb.Append(",");
+ sb.Append(m_locale);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionSecure: RabbitMQ.Client.Impl.MethodBase, IConnectionSecure {
+ public const int ClassId = 10;
+ public const int MethodId = 20;
+
+ public byte[] m_challenge;
+
+ byte[] IConnectionSecure.Challenge { get { return m_challenge; } }
+
+ public ConnectionSecure() {}
+ public ConnectionSecure(
+ byte[] initChallenge)
+ {
+ m_challenge = initChallenge;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "connection.secure"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_challenge = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_challenge);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_challenge);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionSecureOk: RabbitMQ.Client.Impl.MethodBase, IConnectionSecureOk {
+ public const int ClassId = 10;
+ public const int MethodId = 21;
+
+ public byte[] m_response;
+
+ byte[] IConnectionSecureOk.Response { get { return m_response; } }
+
+ public ConnectionSecureOk() {}
+ public ConnectionSecureOk(
+ byte[] initResponse)
+ {
+ m_response = initResponse;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "connection.secure-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_response = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_response);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_response);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionTune: RabbitMQ.Client.Impl.MethodBase, IConnectionTune {
+ public const int ClassId = 10;
+ public const int MethodId = 30;
+
+ public ushort m_channelMax;
+ public uint m_frameMax;
+ public ushort m_heartbeat;
+
+ ushort IConnectionTune.ChannelMax { get { return m_channelMax; } }
+ uint IConnectionTune.FrameMax { get { return m_frameMax; } }
+ ushort IConnectionTune.Heartbeat { get { return m_heartbeat; } }
+
+ public ConnectionTune() {}
+ public ConnectionTune(
+ ushort initChannelMax,
+ uint initFrameMax,
+ ushort initHeartbeat)
+ {
+ m_channelMax = initChannelMax;
+ m_frameMax = initFrameMax;
+ m_heartbeat = initHeartbeat;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "connection.tune"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_channelMax = reader.ReadShort();
+ m_frameMax = reader.ReadLong();
+ m_heartbeat = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_channelMax);
+ writer.WriteLong(m_frameMax);
+ writer.WriteShort(m_heartbeat);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_channelMax); sb.Append(",");
+ sb.Append(m_frameMax); sb.Append(",");
+ sb.Append(m_heartbeat);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionTuneOk: RabbitMQ.Client.Impl.MethodBase, IConnectionTuneOk {
+ public const int ClassId = 10;
+ public const int MethodId = 31;
+
+ public ushort m_channelMax;
+ public uint m_frameMax;
+ public ushort m_heartbeat;
+
+ ushort IConnectionTuneOk.ChannelMax { get { return m_channelMax; } }
+ uint IConnectionTuneOk.FrameMax { get { return m_frameMax; } }
+ ushort IConnectionTuneOk.Heartbeat { get { return m_heartbeat; } }
+
+ public ConnectionTuneOk() {}
+ public ConnectionTuneOk(
+ ushort initChannelMax,
+ uint initFrameMax,
+ ushort initHeartbeat)
+ {
+ m_channelMax = initChannelMax;
+ m_frameMax = initFrameMax;
+ m_heartbeat = initHeartbeat;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "connection.tune-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_channelMax = reader.ReadShort();
+ m_frameMax = reader.ReadLong();
+ m_heartbeat = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_channelMax);
+ writer.WriteLong(m_frameMax);
+ writer.WriteShort(m_heartbeat);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_channelMax); sb.Append(",");
+ sb.Append(m_frameMax); sb.Append(",");
+ sb.Append(m_heartbeat);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionOpen: RabbitMQ.Client.Impl.MethodBase, IConnectionOpen {
+ public const int ClassId = 10;
+ public const int MethodId = 40;
+
+ public string m_virtualHost;
+ public string m_capabilities;
+ public bool m_insist;
+
+ string IConnectionOpen.VirtualHost { get { return m_virtualHost; } }
+ string IConnectionOpen.Capabilities { get { return m_capabilities; } }
+ bool IConnectionOpen.Insist { get { return m_insist; } }
+
+ public ConnectionOpen() {}
+ public ConnectionOpen(
+ string initVirtualHost,
+ string initCapabilities,
+ bool initInsist)
+ {
+ m_virtualHost = initVirtualHost;
+ m_capabilities = initCapabilities;
+ m_insist = initInsist;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "connection.open"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_virtualHost = reader.ReadShortstr();
+ m_capabilities = reader.ReadShortstr();
+ m_insist = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_virtualHost);
+ writer.WriteShortstr(m_capabilities);
+ writer.WriteBit(m_insist);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_virtualHost); sb.Append(",");
+ sb.Append(m_capabilities); sb.Append(",");
+ sb.Append(m_insist);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionOpenOk: RabbitMQ.Client.Impl.MethodBase, IConnectionOpenOk {
+ public const int ClassId = 10;
+ public const int MethodId = 41;
+
+ public string m_knownHosts;
+
+ string IConnectionOpenOk.KnownHosts { get { return m_knownHosts; } }
+
+ public ConnectionOpenOk() {}
+ public ConnectionOpenOk(
+ string initKnownHosts)
+ {
+ m_knownHosts = initKnownHosts;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "connection.open-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_knownHosts = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_knownHosts);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_knownHosts);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionRedirect: RabbitMQ.Client.Impl.MethodBase, IConnectionRedirect {
+ public const int ClassId = 10;
+ public const int MethodId = 50;
+
+ public string m_host;
+ public string m_knownHosts;
+
+ string IConnectionRedirect.Host { get { return m_host; } }
+ string IConnectionRedirect.KnownHosts { get { return m_knownHosts; } }
+
+ public ConnectionRedirect() {}
+ public ConnectionRedirect(
+ string initHost,
+ string initKnownHosts)
+ {
+ m_host = initHost;
+ m_knownHosts = initKnownHosts;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "connection.redirect"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_host = reader.ReadShortstr();
+ m_knownHosts = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_host);
+ writer.WriteShortstr(m_knownHosts);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_host); sb.Append(",");
+ sb.Append(m_knownHosts);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionClose: RabbitMQ.Client.Impl.MethodBase, IConnectionClose {
+ public const int ClassId = 10;
+ public const int MethodId = 60;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public ushort m_classId;
+ public ushort m_methodId;
+
+ ushort IConnectionClose.ReplyCode { get { return m_replyCode; } }
+ string IConnectionClose.ReplyText { get { return m_replyText; } }
+ ushort IConnectionClose.ClassId { get { return m_classId; } }
+ ushort IConnectionClose.MethodId { get { return m_methodId; } }
+
+ public ConnectionClose() {}
+ public ConnectionClose(
+ ushort initReplyCode,
+ string initReplyText,
+ ushort initClassId,
+ ushort initMethodId)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_classId = initClassId;
+ m_methodId = initMethodId;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "connection.close"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_classId = reader.ReadShort();
+ m_methodId = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShort(m_classId);
+ writer.WriteShort(m_methodId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_classId); sb.Append(",");
+ sb.Append(m_methodId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionCloseOk: RabbitMQ.Client.Impl.MethodBase, IConnectionCloseOk {
+ public const int ClassId = 10;
+ public const int MethodId = 61;
+
+
+
+ public ConnectionCloseOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 61; } }
+ public override string ProtocolMethodName { get { return "connection.close-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelOpen: RabbitMQ.Client.Impl.MethodBase, IChannelOpen {
+ public const int ClassId = 20;
+ public const int MethodId = 10;
+
+ public string m_outOfBand;
+
+ string IChannelOpen.OutOfBand { get { return m_outOfBand; } }
+
+ public ChannelOpen() {}
+ public ChannelOpen(
+ string initOutOfBand)
+ {
+ m_outOfBand = initOutOfBand;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "channel.open"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_outOfBand = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_outOfBand);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_outOfBand);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelOpenOk: RabbitMQ.Client.Impl.MethodBase, IChannelOpenOk {
+ public const int ClassId = 20;
+ public const int MethodId = 11;
+
+
+
+ public ChannelOpenOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "channel.open-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelFlow: RabbitMQ.Client.Impl.MethodBase, IChannelFlow {
+ public const int ClassId = 20;
+ public const int MethodId = 20;
+
+ public bool m_active;
+
+ bool IChannelFlow.Active { get { return m_active; } }
+
+ public ChannelFlow() {}
+ public ChannelFlow(
+ bool initActive)
+ {
+ m_active = initActive;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "channel.flow"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_active = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteBit(m_active);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_active);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelFlowOk: RabbitMQ.Client.Impl.MethodBase, IChannelFlowOk {
+ public const int ClassId = 20;
+ public const int MethodId = 21;
+
+ public bool m_active;
+
+ bool IChannelFlowOk.Active { get { return m_active; } }
+
+ public ChannelFlowOk() {}
+ public ChannelFlowOk(
+ bool initActive)
+ {
+ m_active = initActive;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "channel.flow-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_active = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteBit(m_active);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_active);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelAlert: RabbitMQ.Client.Impl.MethodBase, IChannelAlert {
+ public const int ClassId = 20;
+ public const int MethodId = 30;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public System.Collections.IDictionary m_details;
+
+ ushort IChannelAlert.ReplyCode { get { return m_replyCode; } }
+ string IChannelAlert.ReplyText { get { return m_replyText; } }
+ System.Collections.IDictionary IChannelAlert.Details { get { return m_details; } }
+
+ public ChannelAlert() {}
+ public ChannelAlert(
+ ushort initReplyCode,
+ string initReplyText,
+ System.Collections.IDictionary initDetails)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_details = initDetails;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "channel.alert"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_details = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteTable(m_details);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_details);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelClose: RabbitMQ.Client.Impl.MethodBase, IChannelClose {
+ public const int ClassId = 20;
+ public const int MethodId = 40;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public ushort m_classId;
+ public ushort m_methodId;
+
+ ushort IChannelClose.ReplyCode { get { return m_replyCode; } }
+ string IChannelClose.ReplyText { get { return m_replyText; } }
+ ushort IChannelClose.ClassId { get { return m_classId; } }
+ ushort IChannelClose.MethodId { get { return m_methodId; } }
+
+ public ChannelClose() {}
+ public ChannelClose(
+ ushort initReplyCode,
+ string initReplyText,
+ ushort initClassId,
+ ushort initMethodId)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_classId = initClassId;
+ m_methodId = initMethodId;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "channel.close"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_classId = reader.ReadShort();
+ m_methodId = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShort(m_classId);
+ writer.WriteShort(m_methodId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_classId); sb.Append(",");
+ sb.Append(m_methodId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelCloseOk: RabbitMQ.Client.Impl.MethodBase, IChannelCloseOk {
+ public const int ClassId = 20;
+ public const int MethodId = 41;
+
+
+
+ public ChannelCloseOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "channel.close-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class AccessRequest: RabbitMQ.Client.Impl.MethodBase, IAccessRequest {
+ public const int ClassId = 30;
+ public const int MethodId = 10;
+
+ public string m_realm;
+ public bool m_exclusive;
+ public bool m_passive;
+ public bool m_active;
+ public bool m_write;
+ public bool m_read;
+
+ string IAccessRequest.Realm { get { return m_realm; } }
+ bool IAccessRequest.Exclusive { get { return m_exclusive; } }
+ bool IAccessRequest.Passive { get { return m_passive; } }
+ bool IAccessRequest.Active { get { return m_active; } }
+ bool IAccessRequest.Write { get { return m_write; } }
+ bool IAccessRequest.Read { get { return m_read; } }
+
+ public AccessRequest() {}
+ public AccessRequest(
+ string initRealm,
+ bool initExclusive,
+ bool initPassive,
+ bool initActive,
+ bool initWrite,
+ bool initRead)
+ {
+ m_realm = initRealm;
+ m_exclusive = initExclusive;
+ m_passive = initPassive;
+ m_active = initActive;
+ m_write = initWrite;
+ m_read = initRead;
+ }
+
+ public override int ProtocolClassId { get { return 30; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "access.request"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_realm = reader.ReadShortstr();
+ m_exclusive = reader.ReadBit();
+ m_passive = reader.ReadBit();
+ m_active = reader.ReadBit();
+ m_write = reader.ReadBit();
+ m_read = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_realm);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_passive);
+ writer.WriteBit(m_active);
+ writer.WriteBit(m_write);
+ writer.WriteBit(m_read);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_realm); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_passive); sb.Append(",");
+ sb.Append(m_active); sb.Append(",");
+ sb.Append(m_write); sb.Append(",");
+ sb.Append(m_read);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class AccessRequestOk: RabbitMQ.Client.Impl.MethodBase, IAccessRequestOk {
+ public const int ClassId = 30;
+ public const int MethodId = 11;
+
+ public ushort m_ticket;
+
+ ushort IAccessRequestOk.Ticket { get { return m_ticket; } }
+
+ public AccessRequestOk() {}
+ public AccessRequestOk(
+ ushort initTicket)
+ {
+ m_ticket = initTicket;
+ }
+
+ public override int ProtocolClassId { get { return 30; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "access.request-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDeclare: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclare {
+ public const int ClassId = 40;
+ public const int MethodId = 10;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_type;
+ public bool m_passive;
+ public bool m_durable;
+ public bool m_autoDelete;
+ public bool m_internal;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IExchangeDeclare.Ticket { get { return m_ticket; } }
+ string IExchangeDeclare.Exchange { get { return m_exchange; } }
+ string IExchangeDeclare.Type { get { return m_type; } }
+ bool IExchangeDeclare.Passive { get { return m_passive; } }
+ bool IExchangeDeclare.Durable { get { return m_durable; } }
+ bool IExchangeDeclare.AutoDelete { get { return m_autoDelete; } }
+ bool IExchangeDeclare.Internal { get { return m_internal; } }
+ bool IExchangeDeclare.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IExchangeDeclare.Arguments { get { return m_arguments; } }
+
+ public ExchangeDeclare() {}
+ public ExchangeDeclare(
+ ushort initTicket,
+ string initExchange,
+ string initType,
+ bool initPassive,
+ bool initDurable,
+ bool initAutoDelete,
+ bool initInternal,
+ bool initNowait,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_type = initType;
+ m_passive = initPassive;
+ m_durable = initDurable;
+ m_autoDelete = initAutoDelete;
+ m_internal = initInternal;
+ m_nowait = initNowait;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "exchange.declare"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_type = reader.ReadShortstr();
+ m_passive = reader.ReadBit();
+ m_durable = reader.ReadBit();
+ m_autoDelete = reader.ReadBit();
+ m_internal = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_type);
+ writer.WriteBit(m_passive);
+ writer.WriteBit(m_durable);
+ writer.WriteBit(m_autoDelete);
+ writer.WriteBit(m_internal);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_type); sb.Append(",");
+ sb.Append(m_passive); sb.Append(",");
+ sb.Append(m_durable); sb.Append(",");
+ sb.Append(m_autoDelete); sb.Append(",");
+ sb.Append(m_internal); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDeclareOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclareOk {
+ public const int ClassId = 40;
+ public const int MethodId = 11;
+
+
+
+ public ExchangeDeclareOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "exchange.declare-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDelete: RabbitMQ.Client.Impl.MethodBase, IExchangeDelete {
+ public const int ClassId = 40;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public bool m_ifUnused;
+ public bool m_nowait;
+
+ ushort IExchangeDelete.Ticket { get { return m_ticket; } }
+ string IExchangeDelete.Exchange { get { return m_exchange; } }
+ bool IExchangeDelete.IfUnused { get { return m_ifUnused; } }
+ bool IExchangeDelete.Nowait { get { return m_nowait; } }
+
+ public ExchangeDelete() {}
+ public ExchangeDelete(
+ ushort initTicket,
+ string initExchange,
+ bool initIfUnused,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_ifUnused = initIfUnused;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "exchange.delete"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_ifUnused = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteBit(m_ifUnused);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_ifUnused); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDeleteOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeleteOk {
+ public const int ClassId = 40;
+ public const int MethodId = 21;
+
+
+
+ public ExchangeDeleteOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "exchange.delete-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDeclare: RabbitMQ.Client.Impl.MethodBase, IQueueDeclare {
+ public const int ClassId = 50;
+ public const int MethodId = 10;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_passive;
+ public bool m_durable;
+ public bool m_exclusive;
+ public bool m_autoDelete;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IQueueDeclare.Ticket { get { return m_ticket; } }
+ string IQueueDeclare.Queue { get { return m_queue; } }
+ bool IQueueDeclare.Passive { get { return m_passive; } }
+ bool IQueueDeclare.Durable { get { return m_durable; } }
+ bool IQueueDeclare.Exclusive { get { return m_exclusive; } }
+ bool IQueueDeclare.AutoDelete { get { return m_autoDelete; } }
+ bool IQueueDeclare.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IQueueDeclare.Arguments { get { return m_arguments; } }
+
+ public QueueDeclare() {}
+ public QueueDeclare(
+ ushort initTicket,
+ string initQueue,
+ bool initPassive,
+ bool initDurable,
+ bool initExclusive,
+ bool initAutoDelete,
+ bool initNowait,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_passive = initPassive;
+ m_durable = initDurable;
+ m_exclusive = initExclusive;
+ m_autoDelete = initAutoDelete;
+ m_nowait = initNowait;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "queue.declare"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_passive = reader.ReadBit();
+ m_durable = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_autoDelete = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_passive);
+ writer.WriteBit(m_durable);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_autoDelete);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_passive); sb.Append(",");
+ sb.Append(m_durable); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_autoDelete); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDeclareOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeclareOk {
+ public const int ClassId = 50;
+ public const int MethodId = 11;
+
+ public string m_queue;
+ public uint m_messageCount;
+ public uint m_consumerCount;
+
+ string IQueueDeclareOk.Queue { get { return m_queue; } }
+ uint IQueueDeclareOk.MessageCount { get { return m_messageCount; } }
+ uint IQueueDeclareOk.ConsumerCount { get { return m_consumerCount; } }
+
+ public QueueDeclareOk() {}
+ public QueueDeclareOk(
+ string initQueue,
+ uint initMessageCount,
+ uint initConsumerCount)
+ {
+ m_queue = initQueue;
+ m_messageCount = initMessageCount;
+ m_consumerCount = initConsumerCount;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "queue.declare-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_queue = reader.ReadShortstr();
+ m_messageCount = reader.ReadLong();
+ m_consumerCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_queue);
+ writer.WriteLong(m_messageCount);
+ writer.WriteLong(m_consumerCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_messageCount); sb.Append(",");
+ sb.Append(m_consumerCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueBind: RabbitMQ.Client.Impl.MethodBase, IQueueBind {
+ public const int ClassId = 50;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IQueueBind.Ticket { get { return m_ticket; } }
+ string IQueueBind.Queue { get { return m_queue; } }
+ string IQueueBind.Exchange { get { return m_exchange; } }
+ string IQueueBind.RoutingKey { get { return m_routingKey; } }
+ bool IQueueBind.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IQueueBind.Arguments { get { return m_arguments; } }
+
+ public QueueBind() {}
+ public QueueBind(
+ ushort initTicket,
+ string initQueue,
+ string initExchange,
+ string initRoutingKey,
+ bool initNowait,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_nowait = initNowait;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "queue.bind"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueBindOk: RabbitMQ.Client.Impl.MethodBase, IQueueBindOk {
+ public const int ClassId = 50;
+ public const int MethodId = 21;
+
+
+
+ public QueueBindOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "queue.bind-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueuePurge: RabbitMQ.Client.Impl.MethodBase, IQueuePurge {
+ public const int ClassId = 50;
+ public const int MethodId = 30;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_nowait;
+
+ ushort IQueuePurge.Ticket { get { return m_ticket; } }
+ string IQueuePurge.Queue { get { return m_queue; } }
+ bool IQueuePurge.Nowait { get { return m_nowait; } }
+
+ public QueuePurge() {}
+ public QueuePurge(
+ ushort initTicket,
+ string initQueue,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "queue.purge"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueuePurgeOk: RabbitMQ.Client.Impl.MethodBase, IQueuePurgeOk {
+ public const int ClassId = 50;
+ public const int MethodId = 31;
+
+ public uint m_messageCount;
+
+ uint IQueuePurgeOk.MessageCount { get { return m_messageCount; } }
+
+ public QueuePurgeOk() {}
+ public QueuePurgeOk(
+ uint initMessageCount)
+ {
+ m_messageCount = initMessageCount;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "queue.purge-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_messageCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_messageCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_messageCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDelete: RabbitMQ.Client.Impl.MethodBase, IQueueDelete {
+ public const int ClassId = 50;
+ public const int MethodId = 40;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_ifUnused;
+ public bool m_ifEmpty;
+ public bool m_nowait;
+
+ ushort IQueueDelete.Ticket { get { return m_ticket; } }
+ string IQueueDelete.Queue { get { return m_queue; } }
+ bool IQueueDelete.IfUnused { get { return m_ifUnused; } }
+ bool IQueueDelete.IfEmpty { get { return m_ifEmpty; } }
+ bool IQueueDelete.Nowait { get { return m_nowait; } }
+
+ public QueueDelete() {}
+ public QueueDelete(
+ ushort initTicket,
+ string initQueue,
+ bool initIfUnused,
+ bool initIfEmpty,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_ifUnused = initIfUnused;
+ m_ifEmpty = initIfEmpty;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "queue.delete"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_ifUnused = reader.ReadBit();
+ m_ifEmpty = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_ifUnused);
+ writer.WriteBit(m_ifEmpty);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_ifUnused); sb.Append(",");
+ sb.Append(m_ifEmpty); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDeleteOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeleteOk {
+ public const int ClassId = 50;
+ public const int MethodId = 41;
+
+ public uint m_messageCount;
+
+ uint IQueueDeleteOk.MessageCount { get { return m_messageCount; } }
+
+ public QueueDeleteOk() {}
+ public QueueDeleteOk(
+ uint initMessageCount)
+ {
+ m_messageCount = initMessageCount;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "queue.delete-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_messageCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_messageCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_messageCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicQos: RabbitMQ.Client.Impl.MethodBase, IBasicQos {
+ public const int ClassId = 60;
+ public const int MethodId = 10;
+
+ public uint m_prefetchSize;
+ public ushort m_prefetchCount;
+ public bool m_global;
+
+ uint IBasicQos.PrefetchSize { get { return m_prefetchSize; } }
+ ushort IBasicQos.PrefetchCount { get { return m_prefetchCount; } }
+ bool IBasicQos.Global { get { return m_global; } }
+
+ public BasicQos() {}
+ public BasicQos(
+ uint initPrefetchSize,
+ ushort initPrefetchCount,
+ bool initGlobal)
+ {
+ m_prefetchSize = initPrefetchSize;
+ m_prefetchCount = initPrefetchCount;
+ m_global = initGlobal;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "basic.qos"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_prefetchSize = reader.ReadLong();
+ m_prefetchCount = reader.ReadShort();
+ m_global = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_prefetchSize);
+ writer.WriteShort(m_prefetchCount);
+ writer.WriteBit(m_global);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_prefetchSize); sb.Append(",");
+ sb.Append(m_prefetchCount); sb.Append(",");
+ sb.Append(m_global);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicQosOk: RabbitMQ.Client.Impl.MethodBase, IBasicQosOk {
+ public const int ClassId = 60;
+ public const int MethodId = 11;
+
+
+
+ public BasicQosOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "basic.qos-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicConsume: RabbitMQ.Client.Impl.MethodBase, IBasicConsume {
+ public const int ClassId = 60;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_consumerTag;
+ public bool m_noLocal;
+ public bool m_noAck;
+ public bool m_exclusive;
+ public bool m_nowait;
+
+ ushort IBasicConsume.Ticket { get { return m_ticket; } }
+ string IBasicConsume.Queue { get { return m_queue; } }
+ string IBasicConsume.ConsumerTag { get { return m_consumerTag; } }
+ bool IBasicConsume.NoLocal { get { return m_noLocal; } }
+ bool IBasicConsume.NoAck { get { return m_noAck; } }
+ bool IBasicConsume.Exclusive { get { return m_exclusive; } }
+ bool IBasicConsume.Nowait { get { return m_nowait; } }
+
+ public BasicConsume() {}
+ public BasicConsume(
+ ushort initTicket,
+ string initQueue,
+ string initConsumerTag,
+ bool initNoLocal,
+ bool initNoAck,
+ bool initExclusive,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_consumerTag = initConsumerTag;
+ m_noLocal = initNoLocal;
+ m_noAck = initNoAck;
+ m_exclusive = initExclusive;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "basic.consume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_consumerTag = reader.ReadShortstr();
+ m_noLocal = reader.ReadBit();
+ m_noAck = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_noLocal);
+ writer.WriteBit(m_noAck);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_noLocal); sb.Append(",");
+ sb.Append(m_noAck); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicConsumeOk: RabbitMQ.Client.Impl.MethodBase, IBasicConsumeOk {
+ public const int ClassId = 60;
+ public const int MethodId = 21;
+
+ public string m_consumerTag;
+
+ string IBasicConsumeOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public BasicConsumeOk() {}
+ public BasicConsumeOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "basic.consume-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicCancel: RabbitMQ.Client.Impl.MethodBase, IBasicCancel {
+ public const int ClassId = 60;
+ public const int MethodId = 30;
+
+ public string m_consumerTag;
+ public bool m_nowait;
+
+ string IBasicCancel.ConsumerTag { get { return m_consumerTag; } }
+ bool IBasicCancel.Nowait { get { return m_nowait; } }
+
+ public BasicCancel() {}
+ public BasicCancel(
+ string initConsumerTag,
+ bool initNowait)
+ {
+ m_consumerTag = initConsumerTag;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "basic.cancel"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicCancelOk: RabbitMQ.Client.Impl.MethodBase, IBasicCancelOk {
+ public const int ClassId = 60;
+ public const int MethodId = 31;
+
+ public string m_consumerTag;
+
+ string IBasicCancelOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public BasicCancelOk() {}
+ public BasicCancelOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "basic.cancel-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicPublish: RabbitMQ.Client.Impl.MethodBase, IBasicPublish {
+ public const int ClassId = 60;
+ public const int MethodId = 40;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_mandatory;
+ public bool m_immediate;
+
+ ushort IBasicPublish.Ticket { get { return m_ticket; } }
+ string IBasicPublish.Exchange { get { return m_exchange; } }
+ string IBasicPublish.RoutingKey { get { return m_routingKey; } }
+ bool IBasicPublish.Mandatory { get { return m_mandatory; } }
+ bool IBasicPublish.Immediate { get { return m_immediate; } }
+
+ public BasicPublish() {}
+ public BasicPublish(
+ ushort initTicket,
+ string initExchange,
+ string initRoutingKey,
+ bool initMandatory,
+ bool initImmediate)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_mandatory = initMandatory;
+ m_immediate = initImmediate;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "basic.publish"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_mandatory = reader.ReadBit();
+ m_immediate = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_mandatory);
+ writer.WriteBit(m_immediate);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_mandatory); sb.Append(",");
+ sb.Append(m_immediate);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicReturn: RabbitMQ.Client.Impl.MethodBase, IBasicReturn {
+ public const int ClassId = 60;
+ public const int MethodId = 50;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public string m_exchange;
+ public string m_routingKey;
+
+ ushort IBasicReturn.ReplyCode { get { return m_replyCode; } }
+ string IBasicReturn.ReplyText { get { return m_replyText; } }
+ string IBasicReturn.Exchange { get { return m_exchange; } }
+ string IBasicReturn.RoutingKey { get { return m_routingKey; } }
+
+ public BasicReturn() {}
+ public BasicReturn(
+ ushort initReplyCode,
+ string initReplyText,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "basic.return"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicDeliver: RabbitMQ.Client.Impl.MethodBase, IBasicDeliver {
+ public const int ClassId = 60;
+ public const int MethodId = 60;
+
+ public string m_consumerTag;
+ public ulong m_deliveryTag;
+ public bool m_redelivered;
+ public string m_exchange;
+ public string m_routingKey;
+
+ string IBasicDeliver.ConsumerTag { get { return m_consumerTag; } }
+ ulong IBasicDeliver.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicDeliver.Redelivered { get { return m_redelivered; } }
+ string IBasicDeliver.Exchange { get { return m_exchange; } }
+ string IBasicDeliver.RoutingKey { get { return m_routingKey; } }
+
+ public BasicDeliver() {}
+ public BasicDeliver(
+ string initConsumerTag,
+ ulong initDeliveryTag,
+ bool initRedelivered,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_consumerTag = initConsumerTag;
+ m_deliveryTag = initDeliveryTag;
+ m_redelivered = initRedelivered;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "basic.deliver"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_deliveryTag = reader.ReadLonglong();
+ m_redelivered = reader.ReadBit();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_redelivered);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_redelivered); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicGet: RabbitMQ.Client.Impl.MethodBase, IBasicGet {
+ public const int ClassId = 60;
+ public const int MethodId = 70;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_noAck;
+
+ ushort IBasicGet.Ticket { get { return m_ticket; } }
+ string IBasicGet.Queue { get { return m_queue; } }
+ bool IBasicGet.NoAck { get { return m_noAck; } }
+
+ public BasicGet() {}
+ public BasicGet(
+ ushort initTicket,
+ string initQueue,
+ bool initNoAck)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_noAck = initNoAck;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 70; } }
+ public override string ProtocolMethodName { get { return "basic.get"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_noAck = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_noAck);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_noAck);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicGetOk: RabbitMQ.Client.Impl.MethodBase, IBasicGetOk {
+ public const int ClassId = 60;
+ public const int MethodId = 71;
+
+ public ulong m_deliveryTag;
+ public bool m_redelivered;
+ public string m_exchange;
+ public string m_routingKey;
+ public uint m_messageCount;
+
+ ulong IBasicGetOk.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicGetOk.Redelivered { get { return m_redelivered; } }
+ string IBasicGetOk.Exchange { get { return m_exchange; } }
+ string IBasicGetOk.RoutingKey { get { return m_routingKey; } }
+ uint IBasicGetOk.MessageCount { get { return m_messageCount; } }
+
+ public BasicGetOk() {}
+ public BasicGetOk(
+ ulong initDeliveryTag,
+ bool initRedelivered,
+ string initExchange,
+ string initRoutingKey,
+ uint initMessageCount)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_redelivered = initRedelivered;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_messageCount = initMessageCount;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 71; } }
+ public override string ProtocolMethodName { get { return "basic.get-ok"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_redelivered = reader.ReadBit();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_messageCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_redelivered);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteLong(m_messageCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_redelivered); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_messageCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicGetEmpty: RabbitMQ.Client.Impl.MethodBase, IBasicGetEmpty {
+ public const int ClassId = 60;
+ public const int MethodId = 72;
+
+ public string m_clusterId;
+
+ string IBasicGetEmpty.ClusterId { get { return m_clusterId; } }
+
+ public BasicGetEmpty() {}
+ public BasicGetEmpty(
+ string initClusterId)
+ {
+ m_clusterId = initClusterId;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 72; } }
+ public override string ProtocolMethodName { get { return "basic.get-empty"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_clusterId = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_clusterId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_clusterId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicAck: RabbitMQ.Client.Impl.MethodBase, IBasicAck {
+ public const int ClassId = 60;
+ public const int MethodId = 80;
+
+ public ulong m_deliveryTag;
+ public bool m_multiple;
+
+ ulong IBasicAck.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicAck.Multiple { get { return m_multiple; } }
+
+ public BasicAck() {}
+ public BasicAck(
+ ulong initDeliveryTag,
+ bool initMultiple)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_multiple = initMultiple;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 80; } }
+ public override string ProtocolMethodName { get { return "basic.ack"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_multiple = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_multiple);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_multiple);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicReject: RabbitMQ.Client.Impl.MethodBase, IBasicReject {
+ public const int ClassId = 60;
+ public const int MethodId = 90;
+
+ public ulong m_deliveryTag;
+ public bool m_requeue;
+
+ ulong IBasicReject.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicReject.Requeue { get { return m_requeue; } }
+
+ public BasicReject() {}
+ public BasicReject(
+ ulong initDeliveryTag,
+ bool initRequeue)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_requeue = initRequeue;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 90; } }
+ public override string ProtocolMethodName { get { return "basic.reject"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_requeue = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_requeue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_requeue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicRecover: RabbitMQ.Client.Impl.MethodBase, IBasicRecover {
+ public const int ClassId = 60;
+ public const int MethodId = 100;
+
+ public bool m_requeue;
+
+ bool IBasicRecover.Requeue { get { return m_requeue; } }
+
+ public BasicRecover() {}
+ public BasicRecover(
+ bool initRequeue)
+ {
+ m_requeue = initRequeue;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 100; } }
+ public override string ProtocolMethodName { get { return "basic.recover"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_requeue = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteBit(m_requeue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_requeue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileQos: RabbitMQ.Client.Impl.MethodBase, IFileQos {
+ public const int ClassId = 70;
+ public const int MethodId = 10;
+
+ public uint m_prefetchSize;
+ public ushort m_prefetchCount;
+ public bool m_global;
+
+ uint IFileQos.PrefetchSize { get { return m_prefetchSize; } }
+ ushort IFileQos.PrefetchCount { get { return m_prefetchCount; } }
+ bool IFileQos.Global { get { return m_global; } }
+
+ public FileQos() {}
+ public FileQos(
+ uint initPrefetchSize,
+ ushort initPrefetchCount,
+ bool initGlobal)
+ {
+ m_prefetchSize = initPrefetchSize;
+ m_prefetchCount = initPrefetchCount;
+ m_global = initGlobal;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "file.qos"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_prefetchSize = reader.ReadLong();
+ m_prefetchCount = reader.ReadShort();
+ m_global = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_prefetchSize);
+ writer.WriteShort(m_prefetchCount);
+ writer.WriteBit(m_global);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_prefetchSize); sb.Append(",");
+ sb.Append(m_prefetchCount); sb.Append(",");
+ sb.Append(m_global);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileQosOk: RabbitMQ.Client.Impl.MethodBase, IFileQosOk {
+ public const int ClassId = 70;
+ public const int MethodId = 11;
+
+
+
+ public FileQosOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "file.qos-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileConsume: RabbitMQ.Client.Impl.MethodBase, IFileConsume {
+ public const int ClassId = 70;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_consumerTag;
+ public bool m_noLocal;
+ public bool m_noAck;
+ public bool m_exclusive;
+ public bool m_nowait;
+
+ ushort IFileConsume.Ticket { get { return m_ticket; } }
+ string IFileConsume.Queue { get { return m_queue; } }
+ string IFileConsume.ConsumerTag { get { return m_consumerTag; } }
+ bool IFileConsume.NoLocal { get { return m_noLocal; } }
+ bool IFileConsume.NoAck { get { return m_noAck; } }
+ bool IFileConsume.Exclusive { get { return m_exclusive; } }
+ bool IFileConsume.Nowait { get { return m_nowait; } }
+
+ public FileConsume() {}
+ public FileConsume(
+ ushort initTicket,
+ string initQueue,
+ string initConsumerTag,
+ bool initNoLocal,
+ bool initNoAck,
+ bool initExclusive,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_consumerTag = initConsumerTag;
+ m_noLocal = initNoLocal;
+ m_noAck = initNoAck;
+ m_exclusive = initExclusive;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "file.consume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_consumerTag = reader.ReadShortstr();
+ m_noLocal = reader.ReadBit();
+ m_noAck = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_noLocal);
+ writer.WriteBit(m_noAck);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_noLocal); sb.Append(",");
+ sb.Append(m_noAck); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileConsumeOk: RabbitMQ.Client.Impl.MethodBase, IFileConsumeOk {
+ public const int ClassId = 70;
+ public const int MethodId = 21;
+
+ public string m_consumerTag;
+
+ string IFileConsumeOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public FileConsumeOk() {}
+ public FileConsumeOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "file.consume-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileCancel: RabbitMQ.Client.Impl.MethodBase, IFileCancel {
+ public const int ClassId = 70;
+ public const int MethodId = 30;
+
+ public string m_consumerTag;
+ public bool m_nowait;
+
+ string IFileCancel.ConsumerTag { get { return m_consumerTag; } }
+ bool IFileCancel.Nowait { get { return m_nowait; } }
+
+ public FileCancel() {}
+ public FileCancel(
+ string initConsumerTag,
+ bool initNowait)
+ {
+ m_consumerTag = initConsumerTag;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "file.cancel"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileCancelOk: RabbitMQ.Client.Impl.MethodBase, IFileCancelOk {
+ public const int ClassId = 70;
+ public const int MethodId = 31;
+
+ public string m_consumerTag;
+
+ string IFileCancelOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public FileCancelOk() {}
+ public FileCancelOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "file.cancel-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileOpen: RabbitMQ.Client.Impl.MethodBase, IFileOpen {
+ public const int ClassId = 70;
+ public const int MethodId = 40;
+
+ public string m_identifier;
+ public ulong m_contentSize;
+
+ string IFileOpen.Identifier { get { return m_identifier; } }
+ ulong IFileOpen.ContentSize { get { return m_contentSize; } }
+
+ public FileOpen() {}
+ public FileOpen(
+ string initIdentifier,
+ ulong initContentSize)
+ {
+ m_identifier = initIdentifier;
+ m_contentSize = initContentSize;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "file.open"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_identifier = reader.ReadShortstr();
+ m_contentSize = reader.ReadLonglong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_identifier);
+ writer.WriteLonglong(m_contentSize);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_identifier); sb.Append(",");
+ sb.Append(m_contentSize);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileOpenOk: RabbitMQ.Client.Impl.MethodBase, IFileOpenOk {
+ public const int ClassId = 70;
+ public const int MethodId = 41;
+
+ public ulong m_stagedSize;
+
+ ulong IFileOpenOk.StagedSize { get { return m_stagedSize; } }
+
+ public FileOpenOk() {}
+ public FileOpenOk(
+ ulong initStagedSize)
+ {
+ m_stagedSize = initStagedSize;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "file.open-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_stagedSize = reader.ReadLonglong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_stagedSize);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_stagedSize);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileStage: RabbitMQ.Client.Impl.MethodBase, IFileStage {
+ public const int ClassId = 70;
+ public const int MethodId = 50;
+
+
+
+ public FileStage(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "file.stage"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FilePublish: RabbitMQ.Client.Impl.MethodBase, IFilePublish {
+ public const int ClassId = 70;
+ public const int MethodId = 60;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_mandatory;
+ public bool m_immediate;
+ public string m_identifier;
+
+ ushort IFilePublish.Ticket { get { return m_ticket; } }
+ string IFilePublish.Exchange { get { return m_exchange; } }
+ string IFilePublish.RoutingKey { get { return m_routingKey; } }
+ bool IFilePublish.Mandatory { get { return m_mandatory; } }
+ bool IFilePublish.Immediate { get { return m_immediate; } }
+ string IFilePublish.Identifier { get { return m_identifier; } }
+
+ public FilePublish() {}
+ public FilePublish(
+ ushort initTicket,
+ string initExchange,
+ string initRoutingKey,
+ bool initMandatory,
+ bool initImmediate,
+ string initIdentifier)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_mandatory = initMandatory;
+ m_immediate = initImmediate;
+ m_identifier = initIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "file.publish"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_mandatory = reader.ReadBit();
+ m_immediate = reader.ReadBit();
+ m_identifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_mandatory);
+ writer.WriteBit(m_immediate);
+ writer.WriteShortstr(m_identifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_mandatory); sb.Append(",");
+ sb.Append(m_immediate); sb.Append(",");
+ sb.Append(m_identifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileReturn: RabbitMQ.Client.Impl.MethodBase, IFileReturn {
+ public const int ClassId = 70;
+ public const int MethodId = 70;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public string m_exchange;
+ public string m_routingKey;
+
+ ushort IFileReturn.ReplyCode { get { return m_replyCode; } }
+ string IFileReturn.ReplyText { get { return m_replyText; } }
+ string IFileReturn.Exchange { get { return m_exchange; } }
+ string IFileReturn.RoutingKey { get { return m_routingKey; } }
+
+ public FileReturn() {}
+ public FileReturn(
+ ushort initReplyCode,
+ string initReplyText,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 70; } }
+ public override string ProtocolMethodName { get { return "file.return"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileDeliver: RabbitMQ.Client.Impl.MethodBase, IFileDeliver {
+ public const int ClassId = 70;
+ public const int MethodId = 80;
+
+ public string m_consumerTag;
+ public ulong m_deliveryTag;
+ public bool m_redelivered;
+ public string m_exchange;
+ public string m_routingKey;
+ public string m_identifier;
+
+ string IFileDeliver.ConsumerTag { get { return m_consumerTag; } }
+ ulong IFileDeliver.DeliveryTag { get { return m_deliveryTag; } }
+ bool IFileDeliver.Redelivered { get { return m_redelivered; } }
+ string IFileDeliver.Exchange { get { return m_exchange; } }
+ string IFileDeliver.RoutingKey { get { return m_routingKey; } }
+ string IFileDeliver.Identifier { get { return m_identifier; } }
+
+ public FileDeliver() {}
+ public FileDeliver(
+ string initConsumerTag,
+ ulong initDeliveryTag,
+ bool initRedelivered,
+ string initExchange,
+ string initRoutingKey,
+ string initIdentifier)
+ {
+ m_consumerTag = initConsumerTag;
+ m_deliveryTag = initDeliveryTag;
+ m_redelivered = initRedelivered;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_identifier = initIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 80; } }
+ public override string ProtocolMethodName { get { return "file.deliver"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_deliveryTag = reader.ReadLonglong();
+ m_redelivered = reader.ReadBit();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_identifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_redelivered);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteShortstr(m_identifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_redelivered); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_identifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileAck: RabbitMQ.Client.Impl.MethodBase, IFileAck {
+ public const int ClassId = 70;
+ public const int MethodId = 90;
+
+ public ulong m_deliveryTag;
+ public bool m_multiple;
+
+ ulong IFileAck.DeliveryTag { get { return m_deliveryTag; } }
+ bool IFileAck.Multiple { get { return m_multiple; } }
+
+ public FileAck() {}
+ public FileAck(
+ ulong initDeliveryTag,
+ bool initMultiple)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_multiple = initMultiple;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 90; } }
+ public override string ProtocolMethodName { get { return "file.ack"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_multiple = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_multiple);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_multiple);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileReject: RabbitMQ.Client.Impl.MethodBase, IFileReject {
+ public const int ClassId = 70;
+ public const int MethodId = 100;
+
+ public ulong m_deliveryTag;
+ public bool m_requeue;
+
+ ulong IFileReject.DeliveryTag { get { return m_deliveryTag; } }
+ bool IFileReject.Requeue { get { return m_requeue; } }
+
+ public FileReject() {}
+ public FileReject(
+ ulong initDeliveryTag,
+ bool initRequeue)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_requeue = initRequeue;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 100; } }
+ public override string ProtocolMethodName { get { return "file.reject"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_requeue = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_requeue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_requeue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamQos: RabbitMQ.Client.Impl.MethodBase, IStreamQos {
+ public const int ClassId = 80;
+ public const int MethodId = 10;
+
+ public uint m_prefetchSize;
+ public ushort m_prefetchCount;
+ public uint m_consumeRate;
+ public bool m_global;
+
+ uint IStreamQos.PrefetchSize { get { return m_prefetchSize; } }
+ ushort IStreamQos.PrefetchCount { get { return m_prefetchCount; } }
+ uint IStreamQos.ConsumeRate { get { return m_consumeRate; } }
+ bool IStreamQos.Global { get { return m_global; } }
+
+ public StreamQos() {}
+ public StreamQos(
+ uint initPrefetchSize,
+ ushort initPrefetchCount,
+ uint initConsumeRate,
+ bool initGlobal)
+ {
+ m_prefetchSize = initPrefetchSize;
+ m_prefetchCount = initPrefetchCount;
+ m_consumeRate = initConsumeRate;
+ m_global = initGlobal;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "stream.qos"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_prefetchSize = reader.ReadLong();
+ m_prefetchCount = reader.ReadShort();
+ m_consumeRate = reader.ReadLong();
+ m_global = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_prefetchSize);
+ writer.WriteShort(m_prefetchCount);
+ writer.WriteLong(m_consumeRate);
+ writer.WriteBit(m_global);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_prefetchSize); sb.Append(",");
+ sb.Append(m_prefetchCount); sb.Append(",");
+ sb.Append(m_consumeRate); sb.Append(",");
+ sb.Append(m_global);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamQosOk: RabbitMQ.Client.Impl.MethodBase, IStreamQosOk {
+ public const int ClassId = 80;
+ public const int MethodId = 11;
+
+
+
+ public StreamQosOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "stream.qos-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamConsume: RabbitMQ.Client.Impl.MethodBase, IStreamConsume {
+ public const int ClassId = 80;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_consumerTag;
+ public bool m_noLocal;
+ public bool m_exclusive;
+ public bool m_nowait;
+
+ ushort IStreamConsume.Ticket { get { return m_ticket; } }
+ string IStreamConsume.Queue { get { return m_queue; } }
+ string IStreamConsume.ConsumerTag { get { return m_consumerTag; } }
+ bool IStreamConsume.NoLocal { get { return m_noLocal; } }
+ bool IStreamConsume.Exclusive { get { return m_exclusive; } }
+ bool IStreamConsume.Nowait { get { return m_nowait; } }
+
+ public StreamConsume() {}
+ public StreamConsume(
+ ushort initTicket,
+ string initQueue,
+ string initConsumerTag,
+ bool initNoLocal,
+ bool initExclusive,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_consumerTag = initConsumerTag;
+ m_noLocal = initNoLocal;
+ m_exclusive = initExclusive;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "stream.consume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_consumerTag = reader.ReadShortstr();
+ m_noLocal = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_noLocal);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_noLocal); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamConsumeOk: RabbitMQ.Client.Impl.MethodBase, IStreamConsumeOk {
+ public const int ClassId = 80;
+ public const int MethodId = 21;
+
+ public string m_consumerTag;
+
+ string IStreamConsumeOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public StreamConsumeOk() {}
+ public StreamConsumeOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "stream.consume-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamCancel: RabbitMQ.Client.Impl.MethodBase, IStreamCancel {
+ public const int ClassId = 80;
+ public const int MethodId = 30;
+
+ public string m_consumerTag;
+ public bool m_nowait;
+
+ string IStreamCancel.ConsumerTag { get { return m_consumerTag; } }
+ bool IStreamCancel.Nowait { get { return m_nowait; } }
+
+ public StreamCancel() {}
+ public StreamCancel(
+ string initConsumerTag,
+ bool initNowait)
+ {
+ m_consumerTag = initConsumerTag;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "stream.cancel"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamCancelOk: RabbitMQ.Client.Impl.MethodBase, IStreamCancelOk {
+ public const int ClassId = 80;
+ public const int MethodId = 31;
+
+ public string m_consumerTag;
+
+ string IStreamCancelOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public StreamCancelOk() {}
+ public StreamCancelOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "stream.cancel-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamPublish: RabbitMQ.Client.Impl.MethodBase, IStreamPublish {
+ public const int ClassId = 80;
+ public const int MethodId = 40;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_mandatory;
+ public bool m_immediate;
+
+ ushort IStreamPublish.Ticket { get { return m_ticket; } }
+ string IStreamPublish.Exchange { get { return m_exchange; } }
+ string IStreamPublish.RoutingKey { get { return m_routingKey; } }
+ bool IStreamPublish.Mandatory { get { return m_mandatory; } }
+ bool IStreamPublish.Immediate { get { return m_immediate; } }
+
+ public StreamPublish() {}
+ public StreamPublish(
+ ushort initTicket,
+ string initExchange,
+ string initRoutingKey,
+ bool initMandatory,
+ bool initImmediate)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_mandatory = initMandatory;
+ m_immediate = initImmediate;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "stream.publish"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_mandatory = reader.ReadBit();
+ m_immediate = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_mandatory);
+ writer.WriteBit(m_immediate);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_mandatory); sb.Append(",");
+ sb.Append(m_immediate);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamReturn: RabbitMQ.Client.Impl.MethodBase, IStreamReturn {
+ public const int ClassId = 80;
+ public const int MethodId = 50;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public string m_exchange;
+ public string m_routingKey;
+
+ ushort IStreamReturn.ReplyCode { get { return m_replyCode; } }
+ string IStreamReturn.ReplyText { get { return m_replyText; } }
+ string IStreamReturn.Exchange { get { return m_exchange; } }
+ string IStreamReturn.RoutingKey { get { return m_routingKey; } }
+
+ public StreamReturn() {}
+ public StreamReturn(
+ ushort initReplyCode,
+ string initReplyText,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "stream.return"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamDeliver: RabbitMQ.Client.Impl.MethodBase, IStreamDeliver {
+ public const int ClassId = 80;
+ public const int MethodId = 60;
+
+ public string m_consumerTag;
+ public ulong m_deliveryTag;
+ public string m_exchange;
+ public string m_queue;
+
+ string IStreamDeliver.ConsumerTag { get { return m_consumerTag; } }
+ ulong IStreamDeliver.DeliveryTag { get { return m_deliveryTag; } }
+ string IStreamDeliver.Exchange { get { return m_exchange; } }
+ string IStreamDeliver.Queue { get { return m_queue; } }
+
+ public StreamDeliver() {}
+ public StreamDeliver(
+ string initConsumerTag,
+ ulong initDeliveryTag,
+ string initExchange,
+ string initQueue)
+ {
+ m_consumerTag = initConsumerTag;
+ m_deliveryTag = initDeliveryTag;
+ m_exchange = initExchange;
+ m_queue = initQueue;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "stream.deliver"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_deliveryTag = reader.ReadLonglong();
+ m_exchange = reader.ReadShortstr();
+ m_queue = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_queue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_queue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxSelect: RabbitMQ.Client.Impl.MethodBase, ITxSelect {
+ public const int ClassId = 90;
+ public const int MethodId = 10;
+
+
+
+ public TxSelect(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "tx.select"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxSelectOk: RabbitMQ.Client.Impl.MethodBase, ITxSelectOk {
+ public const int ClassId = 90;
+ public const int MethodId = 11;
+
+
+
+ public TxSelectOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "tx.select-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxCommit: RabbitMQ.Client.Impl.MethodBase, ITxCommit {
+ public const int ClassId = 90;
+ public const int MethodId = 20;
+
+
+
+ public TxCommit(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "tx.commit"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxCommitOk: RabbitMQ.Client.Impl.MethodBase, ITxCommitOk {
+ public const int ClassId = 90;
+ public const int MethodId = 21;
+
+
+
+ public TxCommitOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "tx.commit-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxRollback: RabbitMQ.Client.Impl.MethodBase, ITxRollback {
+ public const int ClassId = 90;
+ public const int MethodId = 30;
+
+
+
+ public TxRollback(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "tx.rollback"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxRollbackOk: RabbitMQ.Client.Impl.MethodBase, ITxRollbackOk {
+ public const int ClassId = 90;
+ public const int MethodId = 31;
+
+
+
+ public TxRollbackOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "tx.rollback-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxSelect: RabbitMQ.Client.Impl.MethodBase, IDtxSelect {
+ public const int ClassId = 100;
+ public const int MethodId = 10;
+
+
+
+ public DtxSelect(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "dtx.select"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxSelectOk: RabbitMQ.Client.Impl.MethodBase, IDtxSelectOk {
+ public const int ClassId = 100;
+ public const int MethodId = 11;
+
+
+
+ public DtxSelectOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "dtx.select-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxStart: RabbitMQ.Client.Impl.MethodBase, IDtxStart {
+ public const int ClassId = 100;
+ public const int MethodId = 20;
+
+ public string m_dtxIdentifier;
+
+ string IDtxStart.DtxIdentifier { get { return m_dtxIdentifier; } }
+
+ public DtxStart() {}
+ public DtxStart(
+ string initDtxIdentifier)
+ {
+ m_dtxIdentifier = initDtxIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "dtx.start"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_dtxIdentifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_dtxIdentifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_dtxIdentifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxStartOk: RabbitMQ.Client.Impl.MethodBase, IDtxStartOk {
+ public const int ClassId = 100;
+ public const int MethodId = 21;
+
+
+
+ public DtxStartOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "dtx.start-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TunnelRequest: RabbitMQ.Client.Impl.MethodBase, ITunnelRequest {
+ public const int ClassId = 110;
+ public const int MethodId = 10;
+
+ public System.Collections.IDictionary m_metaData;
+
+ System.Collections.IDictionary ITunnelRequest.MetaData { get { return m_metaData; } }
+
+ public TunnelRequest() {}
+ public TunnelRequest(
+ System.Collections.IDictionary initMetaData)
+ {
+ m_metaData = initMetaData;
+ }
+
+ public override int ProtocolClassId { get { return 110; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "tunnel.request"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_metaData = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteTable(m_metaData);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_metaData);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestInteger: RabbitMQ.Client.Impl.MethodBase, ITestInteger {
+ public const int ClassId = 120;
+ public const int MethodId = 10;
+
+ public byte m_integer1;
+ public ushort m_integer2;
+ public uint m_integer3;
+ public ulong m_integer4;
+ public byte m_operation;
+
+ byte ITestInteger.Integer1 { get { return m_integer1; } }
+ ushort ITestInteger.Integer2 { get { return m_integer2; } }
+ uint ITestInteger.Integer3 { get { return m_integer3; } }
+ ulong ITestInteger.Integer4 { get { return m_integer4; } }
+ byte ITestInteger.Operation { get { return m_operation; } }
+
+ public TestInteger() {}
+ public TestInteger(
+ byte initInteger1,
+ ushort initInteger2,
+ uint initInteger3,
+ ulong initInteger4,
+ byte initOperation)
+ {
+ m_integer1 = initInteger1;
+ m_integer2 = initInteger2;
+ m_integer3 = initInteger3;
+ m_integer4 = initInteger4;
+ m_operation = initOperation;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "test.integer"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_integer1 = reader.ReadOctet();
+ m_integer2 = reader.ReadShort();
+ m_integer3 = reader.ReadLong();
+ m_integer4 = reader.ReadLonglong();
+ m_operation = reader.ReadOctet();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteOctet(m_integer1);
+ writer.WriteShort(m_integer2);
+ writer.WriteLong(m_integer3);
+ writer.WriteLonglong(m_integer4);
+ writer.WriteOctet(m_operation);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_integer1); sb.Append(",");
+ sb.Append(m_integer2); sb.Append(",");
+ sb.Append(m_integer3); sb.Append(",");
+ sb.Append(m_integer4); sb.Append(",");
+ sb.Append(m_operation);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestIntegerOk: RabbitMQ.Client.Impl.MethodBase, ITestIntegerOk {
+ public const int ClassId = 120;
+ public const int MethodId = 11;
+
+ public ulong m_result;
+
+ ulong ITestIntegerOk.Result { get { return m_result; } }
+
+ public TestIntegerOk() {}
+ public TestIntegerOk(
+ ulong initResult)
+ {
+ m_result = initResult;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "test.integer-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_result = reader.ReadLonglong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_result);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_result);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestString: RabbitMQ.Client.Impl.MethodBase, ITestString {
+ public const int ClassId = 120;
+ public const int MethodId = 20;
+
+ public string m_string1;
+ public byte[] m_string2;
+ public byte m_operation;
+
+ string ITestString.String1 { get { return m_string1; } }
+ byte[] ITestString.String2 { get { return m_string2; } }
+ byte ITestString.Operation { get { return m_operation; } }
+
+ public TestString() {}
+ public TestString(
+ string initString1,
+ byte[] initString2,
+ byte initOperation)
+ {
+ m_string1 = initString1;
+ m_string2 = initString2;
+ m_operation = initOperation;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "test.string"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_string1 = reader.ReadShortstr();
+ m_string2 = reader.ReadLongstr();
+ m_operation = reader.ReadOctet();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_string1);
+ writer.WriteLongstr(m_string2);
+ writer.WriteOctet(m_operation);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_string1); sb.Append(",");
+ sb.Append(m_string2); sb.Append(",");
+ sb.Append(m_operation);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestStringOk: RabbitMQ.Client.Impl.MethodBase, ITestStringOk {
+ public const int ClassId = 120;
+ public const int MethodId = 21;
+
+ public byte[] m_result;
+
+ byte[] ITestStringOk.Result { get { return m_result; } }
+
+ public TestStringOk() {}
+ public TestStringOk(
+ byte[] initResult)
+ {
+ m_result = initResult;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "test.string-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_result = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_result);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_result);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestTable: RabbitMQ.Client.Impl.MethodBase, ITestTable {
+ public const int ClassId = 120;
+ public const int MethodId = 30;
+
+ public System.Collections.IDictionary m_table;
+ public byte m_integerOp;
+ public byte m_stringOp;
+
+ System.Collections.IDictionary ITestTable.Table { get { return m_table; } }
+ byte ITestTable.IntegerOp { get { return m_integerOp; } }
+ byte ITestTable.StringOp { get { return m_stringOp; } }
+
+ public TestTable() {}
+ public TestTable(
+ System.Collections.IDictionary initTable,
+ byte initIntegerOp,
+ byte initStringOp)
+ {
+ m_table = initTable;
+ m_integerOp = initIntegerOp;
+ m_stringOp = initStringOp;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "test.table"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_table = reader.ReadTable();
+ m_integerOp = reader.ReadOctet();
+ m_stringOp = reader.ReadOctet();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteTable(m_table);
+ writer.WriteOctet(m_integerOp);
+ writer.WriteOctet(m_stringOp);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_table); sb.Append(",");
+ sb.Append(m_integerOp); sb.Append(",");
+ sb.Append(m_stringOp);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestTableOk: RabbitMQ.Client.Impl.MethodBase, ITestTableOk {
+ public const int ClassId = 120;
+ public const int MethodId = 31;
+
+ public ulong m_integerResult;
+ public byte[] m_stringResult;
+
+ ulong ITestTableOk.IntegerResult { get { return m_integerResult; } }
+ byte[] ITestTableOk.StringResult { get { return m_stringResult; } }
+
+ public TestTableOk() {}
+ public TestTableOk(
+ ulong initIntegerResult,
+ byte[] initStringResult)
+ {
+ m_integerResult = initIntegerResult;
+ m_stringResult = initStringResult;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "test.table-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_integerResult = reader.ReadLonglong();
+ m_stringResult = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_integerResult);
+ writer.WriteLongstr(m_stringResult);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_integerResult); sb.Append(",");
+ sb.Append(m_stringResult);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestContent: RabbitMQ.Client.Impl.MethodBase, ITestContent {
+ public const int ClassId = 120;
+ public const int MethodId = 40;
+
+
+
+ public TestContent(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "test.content"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestContentOk: RabbitMQ.Client.Impl.MethodBase, ITestContentOk {
+ public const int ClassId = 120;
+ public const int MethodId = 41;
+
+ public uint m_contentChecksum;
+
+ uint ITestContentOk.ContentChecksum { get { return m_contentChecksum; } }
+
+ public TestContentOk() {}
+ public TestContentOk(
+ uint initContentChecksum)
+ {
+ m_contentChecksum = initContentChecksum;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "test.content-ok"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_contentChecksum = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_contentChecksum);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_contentChecksum);
+ sb.Append(")");
+ }
+ }
+
+ public class Model: RabbitMQ.Client.Impl.ModelBase {
+ public Model(RabbitMQ.Client.Impl.ISession session): base(session) {}
+ public override System.UInt16 _Private_AccessRequest(
+ System.String @realm,
+ System.Boolean @exclusive,
+ System.Boolean @passive,
+ System.Boolean @active,
+ System.Boolean @write,
+ System.Boolean @read)
+ {
+ AccessRequest __req = new AccessRequest();
+ __req.m_realm = @realm;
+ __req.m_exclusive = @exclusive;
+ __req.m_passive = @passive;
+ __req.m_active = @active;
+ __req.m_write = @write;
+ __req.m_read = @read;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ AccessRequestOk __rep = __repBase as AccessRequestOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_ticket;
+ }
+ public override void _Private_BasicPublish(
+ System.UInt16 @ticket,
+ System.String @exchange,
+ System.String @routingKey,
+ System.Boolean @mandatory,
+ System.Boolean @immediate,
+ RabbitMQ.Client.IBasicProperties @basicProperties,
+ System.Byte[] @body)
+ {
+ BasicPublish __req = new BasicPublish();
+ __req.m_ticket = @ticket;
+ __req.m_exchange = @exchange;
+ __req.m_routingKey = @routingKey;
+ __req.m_mandatory = @mandatory;
+ __req.m_immediate = @immediate;
+ ModelSend(__req, (BasicProperties) basicProperties,body);
+ }
+ public override void _Private_BasicConsume(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.String @consumerTag,
+ System.Boolean @noLocal,
+ System.Boolean @noAck,
+ System.Boolean @exclusive,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @filter)
+ {
+ BasicConsume __req = new BasicConsume();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_consumerTag = @consumerTag;
+ __req.m_noLocal = @noLocal;
+ __req.m_noAck = @noAck;
+ __req.m_exclusive = @exclusive;
+ __req.m_nowait = @nowait;
+ if (@filter != null) {
+ throw new UnsupportedMethodFieldException("_Private_BasicConsume","filter");
+ }
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_BasicCancel(
+ System.String @consumerTag,
+ System.Boolean @nowait)
+ {
+ BasicCancel __req = new BasicCancel();
+ __req.m_consumerTag = @consumerTag;
+ __req.m_nowait = @nowait;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ChannelOpen(
+ System.String @outOfBand)
+ {
+ ChannelOpen __req = new ChannelOpen();
+ __req.m_outOfBand = @outOfBand;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ChannelOpenOk __rep = __repBase as ChannelOpenOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void _Private_ChannelCloseOk()
+ {
+ ChannelCloseOk __req = new ChannelCloseOk();
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ChannelClose(
+ System.UInt16 @replyCode,
+ System.String @replyText,
+ System.UInt16 @classId,
+ System.UInt16 @methodId)
+ {
+ ChannelClose __req = new ChannelClose();
+ __req.m_replyCode = @replyCode;
+ __req.m_replyText = @replyText;
+ __req.m_classId = @classId;
+ __req.m_methodId = @methodId;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_BasicGet(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @noAck)
+ {
+ BasicGet __req = new BasicGet();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_noAck = @noAck;
+ ModelSend(__req,null,null);
+ }
+ public override RabbitMQ.Client.Impl.ConnectionTuneDetails ConnectionStartOk(
+ System.Collections.IDictionary @clientProperties,
+ System.String @mechanism,
+ System.Byte[] @response,
+ System.String @locale)
+ {
+ ConnectionStartOk __req = new ConnectionStartOk();
+ __req.m_clientProperties = @clientProperties;
+ __req.m_mechanism = @mechanism;
+ __req.m_response = @response;
+ __req.m_locale = @locale;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ConnectionTune __rep = __repBase as ConnectionTune;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ RabbitMQ.Client.Impl.ConnectionTuneDetails __result = new RabbitMQ.Client.Impl.ConnectionTuneDetails();
+ __result.channelMax = __rep.m_channelMax;
+ __result.frameMax = __rep.m_frameMax;
+ __result.heartbeat = __rep.m_heartbeat;
+ return __result;
+ }
+ public override void ConnectionTuneOk(
+ System.UInt16 @channelMax,
+ System.UInt32 @frameMax,
+ System.UInt16 @heartbeat)
+ {
+ ConnectionTuneOk __req = new ConnectionTuneOk();
+ __req.m_channelMax = @channelMax;
+ __req.m_frameMax = @frameMax;
+ __req.m_heartbeat = @heartbeat;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ConnectionOpen(
+ System.String @virtualHost,
+ System.String @capabilities,
+ System.Boolean @insist)
+ {
+ ConnectionOpen __req = new ConnectionOpen();
+ __req.m_virtualHost = @virtualHost;
+ __req.m_capabilities = @capabilities;
+ __req.m_insist = @insist;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ConnectionClose(
+ System.UInt16 @replyCode,
+ System.String @replyText,
+ System.UInt16 @classId,
+ System.UInt16 @methodId)
+ {
+ ConnectionClose __req = new ConnectionClose();
+ __req.m_replyCode = @replyCode;
+ __req.m_replyText = @replyText;
+ __req.m_classId = @classId;
+ __req.m_methodId = @methodId;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ConnectionCloseOk __rep = __repBase as ConnectionCloseOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void _Private_ConnectionCloseOk()
+ {
+ ConnectionCloseOk __req = new ConnectionCloseOk();
+ ModelSend(__req,null,null);
+ }
+ public override RabbitMQ.Client.IBasicProperties CreateBasicProperties()
+ {
+ return new BasicProperties();
+ }
+ public override RabbitMQ.Client.IFileProperties CreateFileProperties()
+ {
+ return new FileProperties();
+ }
+ public override RabbitMQ.Client.IStreamProperties CreateStreamProperties()
+ {
+ return new StreamProperties();
+ }
+ public override void ChannelFlow(
+ System.Boolean @active)
+ {
+ ChannelFlow __req = new ChannelFlow();
+ __req.m_active = @active;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ChannelFlowOk __rep = __repBase as ChannelFlowOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void ExchangeDeclare(
+ System.UInt16 @ticket,
+ System.String @exchange,
+ System.String @type,
+ System.Boolean @passive,
+ System.Boolean @durable,
+ System.Boolean @autoDelete,
+ System.Boolean @internal,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @arguments)
+ {
+ ExchangeDeclare __req = new ExchangeDeclare();
+ __req.m_ticket = @ticket;
+ __req.m_exchange = @exchange;
+ __req.m_type = @type;
+ __req.m_passive = @passive;
+ __req.m_durable = @durable;
+ __req.m_autoDelete = @autoDelete;
+ __req.m_internal = @internal;
+ __req.m_nowait = @nowait;
+ __req.m_arguments = @arguments;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ExchangeDeclareOk __rep = __repBase as ExchangeDeclareOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void ExchangeDelete(
+ System.UInt16 @ticket,
+ System.String @exchange,
+ System.Boolean @ifUnused,
+ System.Boolean @nowait)
+ {
+ ExchangeDelete __req = new ExchangeDelete();
+ __req.m_ticket = @ticket;
+ __req.m_exchange = @exchange;
+ __req.m_ifUnused = @ifUnused;
+ __req.m_nowait = @nowait;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ExchangeDeleteOk __rep = __repBase as ExchangeDeleteOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override System.String QueueDeclare(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @passive,
+ System.Boolean @durable,
+ System.Boolean @exclusive,
+ System.Boolean @autoDelete,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @arguments)
+ {
+ QueueDeclare __req = new QueueDeclare();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_passive = @passive;
+ __req.m_durable = @durable;
+ __req.m_exclusive = @exclusive;
+ __req.m_autoDelete = @autoDelete;
+ __req.m_nowait = @nowait;
+ __req.m_arguments = @arguments;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ return null;
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueueDeclareOk __rep = __repBase as QueueDeclareOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_queue;
+ }
+ public override void QueueBind(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.String @exchange,
+ System.String @routingKey,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @arguments)
+ {
+ QueueBind __req = new QueueBind();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_exchange = @exchange;
+ __req.m_routingKey = @routingKey;
+ __req.m_nowait = @nowait;
+ __req.m_arguments = @arguments;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueueBindOk __rep = __repBase as QueueBindOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void QueueUnbind(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.String @exchange,
+ System.String @routingKey,
+ System.Collections.IDictionary @arguments)
+ {
+ throw new UnsupportedMethodException("QueueUnbind");
+ }
+ public override System.UInt32 QueuePurge(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @nowait)
+ {
+ QueuePurge __req = new QueuePurge();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_nowait = @nowait;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ return 0xFFFFFFFF;
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueuePurgeOk __rep = __repBase as QueuePurgeOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_messageCount;
+ }
+ public override System.UInt32 QueueDelete(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @ifUnused,
+ System.Boolean @ifEmpty,
+ System.Boolean @nowait)
+ {
+ QueueDelete __req = new QueueDelete();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_ifUnused = @ifUnused;
+ __req.m_ifEmpty = @ifEmpty;
+ __req.m_nowait = @nowait;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ return 0xFFFFFFFF;
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueueDeleteOk __rep = __repBase as QueueDeleteOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_messageCount;
+ }
+ public override void BasicQos(
+ System.UInt32 @prefetchSize,
+ System.UInt16 @prefetchCount,
+ System.Boolean @global)
+ {
+ BasicQos __req = new BasicQos();
+ __req.m_prefetchSize = @prefetchSize;
+ __req.m_prefetchCount = @prefetchCount;
+ __req.m_global = @global;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ BasicQosOk __rep = __repBase as BasicQosOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void BasicAck(
+ System.UInt64 @deliveryTag,
+ System.Boolean @multiple)
+ {
+ BasicAck __req = new BasicAck();
+ __req.m_deliveryTag = @deliveryTag;
+ __req.m_multiple = @multiple;
+ ModelSend(__req,null,null);
+ }
+ public override void BasicReject(
+ System.UInt64 @deliveryTag,
+ System.Boolean @requeue)
+ {
+ BasicReject __req = new BasicReject();
+ __req.m_deliveryTag = @deliveryTag;
+ __req.m_requeue = @requeue;
+ ModelSend(__req,null,null);
+ }
+ public override void BasicRecover(
+ System.Boolean @requeue)
+ {
+ BasicRecover __req = new BasicRecover();
+ __req.m_requeue = @requeue;
+ ModelSend(__req,null,null);
+ }
+ public override void TxSelect()
+ {
+ TxSelect __req = new TxSelect();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ TxSelectOk __rep = __repBase as TxSelectOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void TxCommit()
+ {
+ TxCommit __req = new TxCommit();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ TxCommitOk __rep = __repBase as TxCommitOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void TxRollback()
+ {
+ TxRollback __req = new TxRollback();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ TxRollbackOk __rep = __repBase as TxRollbackOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void DtxSelect()
+ {
+ DtxSelect __req = new DtxSelect();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ DtxSelectOk __rep = __repBase as DtxSelectOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void DtxStart(
+ System.String @dtxIdentifier)
+ {
+ DtxStart __req = new DtxStart();
+ __req.m_dtxIdentifier = @dtxIdentifier;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ DtxStartOk __rep = __repBase as DtxStartOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override bool DispatchAsynchronous(RabbitMQ.Client.Impl.Command cmd) {
+ RabbitMQ.Client.Impl.MethodBase __method = (RabbitMQ.Client.Impl.MethodBase) cmd.Method;
+ switch ((__method.ProtocolClassId << 16) | __method.ProtocolMethodId) {
+ case 3932181: {
+ BasicConsumeOk __impl = (BasicConsumeOk) __method;
+ HandleBasicConsumeOk(
+ __impl.m_consumerTag);
+ return true;
+ }
+ case 3932191: {
+ BasicCancelOk __impl = (BasicCancelOk) __method;
+ HandleBasicCancelOk(
+ __impl.m_consumerTag);
+ return true;
+ }
+ case 3932231: {
+ BasicGetOk __impl = (BasicGetOk) __method;
+ HandleBasicGetOk(
+ __impl.m_deliveryTag,
+ __impl.m_redelivered,
+ __impl.m_exchange,
+ __impl.m_routingKey,
+ __impl.m_messageCount,
+ (RabbitMQ.Client.IBasicProperties) cmd.Header,
+ cmd.Body);
+ return true;
+ }
+ case 3932232: {
+ HandleBasicGetEmpty();
+ return true;
+ }
+ case 3932220: {
+ BasicDeliver __impl = (BasicDeliver) __method;
+ HandleBasicDeliver(
+ __impl.m_consumerTag,
+ __impl.m_deliveryTag,
+ __impl.m_redelivered,
+ __impl.m_exchange,
+ __impl.m_routingKey,
+ (RabbitMQ.Client.IBasicProperties) cmd.Header,
+ cmd.Body);
+ return true;
+ }
+ case 3932210: {
+ BasicReturn __impl = (BasicReturn) __method;
+ HandleBasicReturn(
+ __impl.m_replyCode,
+ __impl.m_replyText,
+ __impl.m_exchange,
+ __impl.m_routingKey,
+ (RabbitMQ.Client.IBasicProperties) cmd.Header,
+ cmd.Body);
+ return true;
+ }
+ case 1310760: {
+ ChannelClose __impl = (ChannelClose) __method;
+ HandleChannelClose(
+ __impl.m_replyCode,
+ __impl.m_replyText,
+ __impl.m_classId,
+ __impl.m_methodId);
+ return true;
+ }
+ case 1310761: {
+ HandleChannelCloseOk();
+ return true;
+ }
+ case 655370: {
+ ConnectionStart __impl = (ConnectionStart) __method;
+ HandleConnectionStart(
+ __impl.m_versionMajor,
+ __impl.m_versionMinor,
+ __impl.m_serverProperties,
+ __impl.m_mechanisms,
+ __impl.m_locales);
+ return true;
+ }
+ case 655401: {
+ ConnectionOpenOk __impl = (ConnectionOpenOk) __method;
+ HandleConnectionOpenOk(
+ __impl.m_knownHosts);
+ return true;
+ }
+ case 655410: {
+ ConnectionRedirect __impl = (ConnectionRedirect) __method;
+ HandleConnectionRedirect(
+ __impl.m_host,
+ __impl.m_knownHosts);
+ return true;
+ }
+ case 655420: {
+ ConnectionClose __impl = (ConnectionClose) __method;
+ HandleConnectionClose(
+ __impl.m_replyCode,
+ __impl.m_replyText,
+ __impl.m_classId,
+ __impl.m_methodId);
+ return true;
+ }
+ default: return false;
+ }
+ }
+ }
+}
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-9.cs b/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-9.cs
new file mode 100644
index 0000000..336fea5
--- /dev/null
+++ b/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-9.cs
@@ -0,0 +1,6985 @@
+// Autogenerated code. Do not edit.
+
+using RabbitMQ.Client;
+using RabbitMQ.Client.Exceptions;
+
+namespace RabbitMQ.Client.Framing.v0_9 {
+ public class Protocol: RabbitMQ.Client.Framing.Impl.v0_9.ProtocolBase {
+ ///<summary>Protocol major version (= 0)</summary>
+ public override int MajorVersion { get { return 0; } }
+ ///<summary>Protocol minor version (= 9)</summary>
+ public override int MinorVersion { get { return 9; } }
+ ///<summary>Protocol API name (= AMQP_0_9)</summary>
+ public override string ApiName { get { return "AMQP_0_9"; } }
+ ///<summary>Default TCP port (= 5672)</summary>
+ public override int DefaultPort { get { return 5672; } }
+
+ public override RabbitMQ.Client.Impl.MethodBase DecodeMethodFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
+ ushort classId = reader.ReadUInt16();
+ ushort methodId = reader.ReadUInt16();
+
+ switch (classId) {
+ case 10: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionStart result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionStart();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionStartOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionStartOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionSecure result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionSecure();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionSecureOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionSecureOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionTune result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionTune();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionTuneOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionTuneOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionOpen result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionOpen();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionOpenOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 42: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionRedirect result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionRedirect();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionClose result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionClose();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 51: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ConnectionCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionCloseOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 20: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ChannelOpen result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelOpen();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ChannelOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelOpenOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ChannelFlow result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelFlow();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ChannelFlowOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelFlowOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ChannelClose result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelClose();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ChannelCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelCloseOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ChannelResume result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelResume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ChannelPing result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelPing();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 70: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ChannelPong result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelPong();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 80: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ChannelOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 30: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.AccessRequest result = new RabbitMQ.Client.Framing.Impl.v0_9.AccessRequest();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_9.AccessRequestOk result = new RabbitMQ.Client.Framing.Impl.v0_9.AccessRequestOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 40: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeclare result = new RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeclare();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeclareOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDelete result = new RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDelete();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeleteOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 50: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.QueueDeclare result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueDeclare();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_9.QueueDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueDeclareOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_9.QueueBind result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueBind();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_9.QueueBindOk result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueBindOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_9.QueueUnbind result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueUnbind();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 51: {
+ RabbitMQ.Client.Framing.Impl.v0_9.QueueUnbindOk result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueUnbindOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_9.QueuePurge result = new RabbitMQ.Client.Framing.Impl.v0_9.QueuePurge();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_9.QueuePurgeOk result = new RabbitMQ.Client.Framing.Impl.v0_9.QueuePurgeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_9.QueueDelete result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueDelete();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_9.QueueDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueDeleteOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 60: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicQos result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicQos();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicQosOk result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicQosOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicConsume result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicConsume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicConsumeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicCancel result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicCancel();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicCancelOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicPublish result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicPublish();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicReturn result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicReturn();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicDeliver result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicDeliver();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 70: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicGet result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicGet();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 71: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicGetOk result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicGetOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 72: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicGetEmpty result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicGetEmpty();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 80: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicAck result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicAck();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 90: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicReject result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicReject();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 100: {
+ RabbitMQ.Client.Framing.Impl.v0_9.BasicRecover result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicRecover();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 70: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileQos result = new RabbitMQ.Client.Framing.Impl.v0_9.FileQos();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileQosOk result = new RabbitMQ.Client.Framing.Impl.v0_9.FileQosOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileConsume result = new RabbitMQ.Client.Framing.Impl.v0_9.FileConsume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_9.FileConsumeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileCancel result = new RabbitMQ.Client.Framing.Impl.v0_9.FileCancel();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_9.FileCancelOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileOpen result = new RabbitMQ.Client.Framing.Impl.v0_9.FileOpen();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_9.FileOpenOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileStage result = new RabbitMQ.Client.Framing.Impl.v0_9.FileStage();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FilePublish result = new RabbitMQ.Client.Framing.Impl.v0_9.FilePublish();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 70: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileReturn result = new RabbitMQ.Client.Framing.Impl.v0_9.FileReturn();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 80: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileDeliver result = new RabbitMQ.Client.Framing.Impl.v0_9.FileDeliver();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 90: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileAck result = new RabbitMQ.Client.Framing.Impl.v0_9.FileAck();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 100: {
+ RabbitMQ.Client.Framing.Impl.v0_9.FileReject result = new RabbitMQ.Client.Framing.Impl.v0_9.FileReject();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 80: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.StreamQos result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamQos();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_9.StreamQosOk result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamQosOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_9.StreamConsume result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamConsume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_9.StreamConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamConsumeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_9.StreamCancel result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamCancel();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_9.StreamCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamCancelOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_9.StreamPublish result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamPublish();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_9.StreamReturn result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamReturn();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_9.StreamDeliver result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamDeliver();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 90: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.TxSelect result = new RabbitMQ.Client.Framing.Impl.v0_9.TxSelect();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_9.TxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_9.TxSelectOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_9.TxCommit result = new RabbitMQ.Client.Framing.Impl.v0_9.TxCommit();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_9.TxCommitOk result = new RabbitMQ.Client.Framing.Impl.v0_9.TxCommitOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_9.TxRollback result = new RabbitMQ.Client.Framing.Impl.v0_9.TxRollback();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_9.TxRollbackOk result = new RabbitMQ.Client.Framing.Impl.v0_9.TxRollbackOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 100: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.DtxSelect result = new RabbitMQ.Client.Framing.Impl.v0_9.DtxSelect();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_9.DtxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_9.DtxSelectOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_9.DtxStart result = new RabbitMQ.Client.Framing.Impl.v0_9.DtxStart();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_9.DtxStartOk result = new RabbitMQ.Client.Framing.Impl.v0_9.DtxStartOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 110: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.TunnelRequest result = new RabbitMQ.Client.Framing.Impl.v0_9.TunnelRequest();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 120: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageTransfer result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageTransfer();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageConsume result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageConsume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageCancel result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageCancel();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageGet result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageGet();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageRecover result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageRecover();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageOpen result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageOpen();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 70: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageClose result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageClose();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 80: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageAppend result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageAppend();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 90: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageCheckpoint result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageCheckpoint();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 100: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageResume result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageResume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 110: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageQos result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageQos();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 500: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageOk result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 510: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageEmpty result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageEmpty();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 520: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageReject result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageReject();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 530: {
+ RabbitMQ.Client.Framing.Impl.v0_9.MessageOffset result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageOffset();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ default: break;
+ }
+ throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, methodId);
+ }
+
+ public override RabbitMQ.Client.Impl.ContentHeaderBase DecodeContentHeaderFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
+ ushort classId = reader.ReadUInt16();
+
+ switch (classId) {
+ case 60: return new BasicProperties();
+ case 70: return new FileProperties();
+ case 80: return new StreamProperties();
+ case 110: return new TunnelProperties();
+ default: break;
+ }
+ throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, 0);
+ }
+ }
+ public class Constants {
+ ///<summary>(= 1)</summary>
+ public const int FrameMethod = 1;
+ ///<summary>(= 2)</summary>
+ public const int FrameHeader = 2;
+ ///<summary>(= 3)</summary>
+ public const int FrameBody = 3;
+ ///<summary>(= 4)</summary>
+ public const int FrameOobMethod = 4;
+ ///<summary>(= 5)</summary>
+ public const int FrameOobHeader = 5;
+ ///<summary>(= 6)</summary>
+ public const int FrameOobBody = 6;
+ ///<summary>(= 7)</summary>
+ public const int FrameTrace = 7;
+ ///<summary>(= 8)</summary>
+ public const int FrameHeartbeat = 8;
+ ///<summary>(= 4096)</summary>
+ public const int FrameMinSize = 4096;
+ ///<summary>(= 206)</summary>
+ public const int FrameEnd = 206;
+ ///<summary>(= 200)</summary>
+ public const int ReplySuccess = 200;
+ ///<summary>(= 310)</summary>
+ public const int NotDelivered = 310;
+ ///<summary>(= 311)</summary>
+ public const int ContentTooLarge = 311;
+ ///<summary>(= 312)</summary>
+ public const int NoRoute = 312;
+ ///<summary>(= 313)</summary>
+ public const int NoConsumers = 313;
+ ///<summary>(= 320)</summary>
+ public const int ConnectionForced = 320;
+ ///<summary>(= 402)</summary>
+ public const int InvalidPath = 402;
+ ///<summary>(= 403)</summary>
+ public const int AccessRefused = 403;
+ ///<summary>(= 404)</summary>
+ public const int NotFound = 404;
+ ///<summary>(= 405)</summary>
+ public const int ResourceLocked = 405;
+ ///<summary>(= 406)</summary>
+ public const int PreconditionFailed = 406;
+ ///<summary>(= 501)</summary>
+ public const int FrameError = 501;
+ ///<summary>(= 502)</summary>
+ public const int SyntaxError = 502;
+ ///<summary>(= 503)</summary>
+ public const int CommandInvalid = 503;
+ ///<summary>(= 504)</summary>
+ public const int ChannelError = 504;
+ ///<summary>(= 506)</summary>
+ public const int ResourceError = 506;
+ ///<summary>(= 530)</summary>
+ public const int NotAllowed = 530;
+ ///<summary>(= 540)</summary>
+ public const int NotImplemented = 540;
+ ///<summary>(= 541)</summary>
+ public const int InternalError = 541;
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.start".</summary>
+ public interface IConnectionStart: IMethod {
+ byte VersionMajor { get; }
+ byte VersionMinor { get; }
+ System.Collections.IDictionary ServerProperties { get; }
+ byte[] Mechanisms { get; }
+ byte[] Locales { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.start-ok".</summary>
+ public interface IConnectionStartOk: IMethod {
+ System.Collections.IDictionary ClientProperties { get; }
+ string Mechanism { get; }
+ byte[] Response { get; }
+ string Locale { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.secure".</summary>
+ public interface IConnectionSecure: IMethod {
+ byte[] Challenge { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.secure-ok".</summary>
+ public interface IConnectionSecureOk: IMethod {
+ byte[] Response { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.tune".</summary>
+ public interface IConnectionTune: IMethod {
+ ushort ChannelMax { get; }
+ uint FrameMax { get; }
+ ushort Heartbeat { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.tune-ok".</summary>
+ public interface IConnectionTuneOk: IMethod {
+ ushort ChannelMax { get; }
+ uint FrameMax { get; }
+ ushort Heartbeat { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.open".</summary>
+ public interface IConnectionOpen: IMethod {
+ string VirtualHost { get; }
+ string Capabilities { get; }
+ bool Insist { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.open-ok".</summary>
+ public interface IConnectionOpenOk: IMethod {
+ string KnownHosts { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.redirect".</summary>
+ public interface IConnectionRedirect: IMethod {
+ string Host { get; }
+ string KnownHosts { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.close".</summary>
+ public interface IConnectionClose: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ ushort ClassId { get; }
+ ushort MethodId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.close-ok".</summary>
+ public interface IConnectionCloseOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.open".</summary>
+ public interface IChannelOpen: IMethod {
+ string OutOfBand { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.open-ok".</summary>
+ public interface IChannelOpenOk: IMethod {
+ byte[] ChannelId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.flow".</summary>
+ public interface IChannelFlow: IMethod {
+ bool Active { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.flow-ok".</summary>
+ public interface IChannelFlowOk: IMethod {
+ bool Active { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.close".</summary>
+ public interface IChannelClose: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ ushort ClassId { get; }
+ ushort MethodId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.close-ok".</summary>
+ public interface IChannelCloseOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.resume".</summary>
+ public interface IChannelResume: IMethod {
+ byte[] ChannelId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.ping".</summary>
+ public interface IChannelPing: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.pong".</summary>
+ public interface IChannelPong: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.ok".</summary>
+ public interface IChannelOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "access.request".</summary>
+ public interface IAccessRequest: IMethod {
+ string Realm { get; }
+ bool Exclusive { get; }
+ bool Passive { get; }
+ bool Active { get; }
+ bool Write { get; }
+ bool Read { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "access.request-ok".</summary>
+ public interface IAccessRequestOk: IMethod {
+ ushort Ticket { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.declare".</summary>
+ public interface IExchangeDeclare: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string Type { get; }
+ bool Passive { get; }
+ bool Durable { get; }
+ bool AutoDelete { get; }
+ bool Internal { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.declare-ok".</summary>
+ public interface IExchangeDeclareOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.delete".</summary>
+ public interface IExchangeDelete: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ bool IfUnused { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.delete-ok".</summary>
+ public interface IExchangeDeleteOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.declare".</summary>
+ public interface IQueueDeclare: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool Passive { get; }
+ bool Durable { get; }
+ bool Exclusive { get; }
+ bool AutoDelete { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.declare-ok".</summary>
+ public interface IQueueDeclareOk: IMethod {
+ string Queue { get; }
+ uint MessageCount { get; }
+ uint ConsumerCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.bind".</summary>
+ public interface IQueueBind: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.bind-ok".</summary>
+ public interface IQueueBindOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.unbind".</summary>
+ public interface IQueueUnbind: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.unbind-ok".</summary>
+ public interface IQueueUnbindOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.purge".</summary>
+ public interface IQueuePurge: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.purge-ok".</summary>
+ public interface IQueuePurgeOk: IMethod {
+ uint MessageCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.delete".</summary>
+ public interface IQueueDelete: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool IfUnused { get; }
+ bool IfEmpty { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.delete-ok".</summary>
+ public interface IQueueDeleteOk: IMethod {
+ uint MessageCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.qos".</summary>
+ public interface IBasicQos: IMethod {
+ uint PrefetchSize { get; }
+ ushort PrefetchCount { get; }
+ bool Global { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.qos-ok".</summary>
+ public interface IBasicQosOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.consume".</summary>
+ public interface IBasicConsume: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string ConsumerTag { get; }
+ bool NoLocal { get; }
+ bool NoAck { get; }
+ bool Exclusive { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Filter { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.consume-ok".</summary>
+ public interface IBasicConsumeOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.cancel".</summary>
+ public interface IBasicCancel: IMethod {
+ string ConsumerTag { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.cancel-ok".</summary>
+ public interface IBasicCancelOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.publish".</summary>
+ public interface IBasicPublish: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Mandatory { get; }
+ bool Immediate { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.return".</summary>
+ public interface IBasicReturn: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.deliver".</summary>
+ public interface IBasicDeliver: IMethod {
+ string ConsumerTag { get; }
+ ulong DeliveryTag { get; }
+ bool Redelivered { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.get".</summary>
+ public interface IBasicGet: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool NoAck { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.get-ok".</summary>
+ public interface IBasicGetOk: IMethod {
+ ulong DeliveryTag { get; }
+ bool Redelivered { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ uint MessageCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.get-empty".</summary>
+ public interface IBasicGetEmpty: IMethod {
+ string ClusterId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.ack".</summary>
+ public interface IBasicAck: IMethod {
+ ulong DeliveryTag { get; }
+ bool Multiple { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.reject".</summary>
+ public interface IBasicReject: IMethod {
+ ulong DeliveryTag { get; }
+ bool Requeue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.recover".</summary>
+ public interface IBasicRecover: IMethod {
+ bool Requeue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.qos".</summary>
+ public interface IFileQos: IMethod {
+ uint PrefetchSize { get; }
+ ushort PrefetchCount { get; }
+ bool Global { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.qos-ok".</summary>
+ public interface IFileQosOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.consume".</summary>
+ public interface IFileConsume: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string ConsumerTag { get; }
+ bool NoLocal { get; }
+ bool NoAck { get; }
+ bool Exclusive { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Filter { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.consume-ok".</summary>
+ public interface IFileConsumeOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.cancel".</summary>
+ public interface IFileCancel: IMethod {
+ string ConsumerTag { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.cancel-ok".</summary>
+ public interface IFileCancelOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.open".</summary>
+ public interface IFileOpen: IMethod {
+ string Identifier { get; }
+ ulong ContentSize { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.open-ok".</summary>
+ public interface IFileOpenOk: IMethod {
+ ulong StagedSize { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.stage".</summary>
+ public interface IFileStage: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.publish".</summary>
+ public interface IFilePublish: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Mandatory { get; }
+ bool Immediate { get; }
+ string Identifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.return".</summary>
+ public interface IFileReturn: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.deliver".</summary>
+ public interface IFileDeliver: IMethod {
+ string ConsumerTag { get; }
+ ulong DeliveryTag { get; }
+ bool Redelivered { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ string Identifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.ack".</summary>
+ public interface IFileAck: IMethod {
+ ulong DeliveryTag { get; }
+ bool Multiple { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.reject".</summary>
+ public interface IFileReject: IMethod {
+ ulong DeliveryTag { get; }
+ bool Requeue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.qos".</summary>
+ public interface IStreamQos: IMethod {
+ uint PrefetchSize { get; }
+ ushort PrefetchCount { get; }
+ uint ConsumeRate { get; }
+ bool Global { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.qos-ok".</summary>
+ public interface IStreamQosOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.consume".</summary>
+ public interface IStreamConsume: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string ConsumerTag { get; }
+ bool NoLocal { get; }
+ bool Exclusive { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Filter { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.consume-ok".</summary>
+ public interface IStreamConsumeOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.cancel".</summary>
+ public interface IStreamCancel: IMethod {
+ string ConsumerTag { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.cancel-ok".</summary>
+ public interface IStreamCancelOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.publish".</summary>
+ public interface IStreamPublish: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Mandatory { get; }
+ bool Immediate { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.return".</summary>
+ public interface IStreamReturn: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.deliver".</summary>
+ public interface IStreamDeliver: IMethod {
+ string ConsumerTag { get; }
+ ulong DeliveryTag { get; }
+ string Exchange { get; }
+ string Queue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.select".</summary>
+ public interface ITxSelect: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.select-ok".</summary>
+ public interface ITxSelectOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.commit".</summary>
+ public interface ITxCommit: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.commit-ok".</summary>
+ public interface ITxCommitOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.rollback".</summary>
+ public interface ITxRollback: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.rollback-ok".</summary>
+ public interface ITxRollbackOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.select".</summary>
+ public interface IDtxSelect: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.select-ok".</summary>
+ public interface IDtxSelectOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.start".</summary>
+ public interface IDtxStart: IMethod {
+ string DtxIdentifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.start-ok".</summary>
+ public interface IDtxStartOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tunnel.request".</summary>
+ public interface ITunnelRequest: IMethod {
+ System.Collections.IDictionary MetaData { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.transfer".</summary>
+ public interface IMessageTransfer: IMethod {
+ ushort Ticket { get; }
+ string Destination { get; }
+ bool Redelivered { get; }
+ bool Immediate { get; }
+ ulong Ttl { get; }
+ byte Priority { get; }
+ AmqpTimestamp Timestamp { get; }
+ byte DeliveryMode { get; }
+ AmqpTimestamp Expiration { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ string MessageId { get; }
+ string CorrelationId { get; }
+ string ReplyTo { get; }
+ string ContentType { get; }
+ string ContentEncoding { get; }
+ string UserId { get; }
+ string AppId { get; }
+ string TransactionId { get; }
+ byte[] SecurityToken { get; }
+ System.Collections.IDictionary ApplicationHeaders { get; }
+ byte[] Body { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.consume".</summary>
+ public interface IMessageConsume: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string Destination { get; }
+ bool NoLocal { get; }
+ bool NoAck { get; }
+ bool Exclusive { get; }
+ System.Collections.IDictionary Filter { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.cancel".</summary>
+ public interface IMessageCancel: IMethod {
+ string Destination { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.get".</summary>
+ public interface IMessageGet: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string Destination { get; }
+ bool NoAck { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.recover".</summary>
+ public interface IMessageRecover: IMethod {
+ bool Requeue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.open".</summary>
+ public interface IMessageOpen: IMethod {
+ byte[] Reference { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.close".</summary>
+ public interface IMessageClose: IMethod {
+ byte[] Reference { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.append".</summary>
+ public interface IMessageAppend: IMethod {
+ byte[] Reference { get; }
+ byte[] Bytes { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.checkpoint".</summary>
+ public interface IMessageCheckpoint: IMethod {
+ byte[] Reference { get; }
+ string Identifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.resume".</summary>
+ public interface IMessageResume: IMethod {
+ byte[] Reference { get; }
+ string Identifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.qos".</summary>
+ public interface IMessageQos: IMethod {
+ uint PrefetchSize { get; }
+ ushort PrefetchCount { get; }
+ bool Global { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.ok".</summary>
+ public interface IMessageOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.empty".</summary>
+ public interface IMessageEmpty: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.reject".</summary>
+ public interface IMessageReject: IMethod {
+ ushort Code { get; }
+ string Text { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "message.offset".</summary>
+ public interface IMessageOffset: IMethod {
+ ulong Value { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "basic"</summary>
+ public class BasicProperties: RabbitMQ.Client.Impl.BasicProperties {
+ private string m_contentType;
+ private string m_contentEncoding;
+ private System.Collections.IDictionary m_headers;
+ private byte m_deliveryMode;
+ private byte m_priority;
+ private string m_correlationId;
+ private string m_replyTo;
+ private string m_expiration;
+ private string m_messageId;
+ private AmqpTimestamp m_timestamp;
+ private string m_type;
+ private string m_userId;
+ private string m_appId;
+ private string m_clusterId;
+
+ private bool contentType_present = false;
+ private bool contentEncoding_present = false;
+ private bool headers_present = false;
+ private bool deliveryMode_present = false;
+ private bool priority_present = false;
+ private bool correlationId_present = false;
+ private bool replyTo_present = false;
+ private bool expiration_present = false;
+ private bool messageId_present = false;
+ private bool timestamp_present = false;
+ private bool type_present = false;
+ private bool userId_present = false;
+ private bool appId_present = false;
+ private bool clusterId_present = false;
+
+ public override string ContentType {
+ get {
+ return m_contentType;
+ }
+ set {
+ contentType_present = true;
+ m_contentType = value;
+ }
+ }
+ public override string ContentEncoding {
+ get {
+ return m_contentEncoding;
+ }
+ set {
+ contentEncoding_present = true;
+ m_contentEncoding = value;
+ }
+ }
+ public override System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public override byte DeliveryMode {
+ get {
+ return m_deliveryMode;
+ }
+ set {
+ deliveryMode_present = true;
+ m_deliveryMode = value;
+ }
+ }
+ public override byte Priority {
+ get {
+ return m_priority;
+ }
+ set {
+ priority_present = true;
+ m_priority = value;
+ }
+ }
+ public override string CorrelationId {
+ get {
+ return m_correlationId;
+ }
+ set {
+ correlationId_present = true;
+ m_correlationId = value;
+ }
+ }
+ public override string ReplyTo {
+ get {
+ return m_replyTo;
+ }
+ set {
+ replyTo_present = true;
+ m_replyTo = value;
+ }
+ }
+ public override string Expiration {
+ get {
+ return m_expiration;
+ }
+ set {
+ expiration_present = true;
+ m_expiration = value;
+ }
+ }
+ public override string MessageId {
+ get {
+ return m_messageId;
+ }
+ set {
+ messageId_present = true;
+ m_messageId = value;
+ }
+ }
+ public override AmqpTimestamp Timestamp {
+ get {
+ return m_timestamp;
+ }
+ set {
+ timestamp_present = true;
+ m_timestamp = value;
+ }
+ }
+ public override string Type {
+ get {
+ return m_type;
+ }
+ set {
+ type_present = true;
+ m_type = value;
+ }
+ }
+ public override string UserId {
+ get {
+ return m_userId;
+ }
+ set {
+ userId_present = true;
+ m_userId = value;
+ }
+ }
+ public override string AppId {
+ get {
+ return m_appId;
+ }
+ set {
+ appId_present = true;
+ m_appId = value;
+ }
+ }
+ public override string ClusterId {
+ get {
+ return m_clusterId;
+ }
+ set {
+ clusterId_present = true;
+ m_clusterId = value;
+ }
+ }
+
+ public override void ClearContentType() { contentType_present = false; }
+ public override void ClearContentEncoding() { contentEncoding_present = false; }
+ public override void ClearHeaders() { headers_present = false; }
+ public override void ClearDeliveryMode() { deliveryMode_present = false; }
+ public override void ClearPriority() { priority_present = false; }
+ public override void ClearCorrelationId() { correlationId_present = false; }
+ public override void ClearReplyTo() { replyTo_present = false; }
+ public override void ClearExpiration() { expiration_present = false; }
+ public override void ClearMessageId() { messageId_present = false; }
+ public override void ClearTimestamp() { timestamp_present = false; }
+ public override void ClearType() { type_present = false; }
+ public override void ClearUserId() { userId_present = false; }
+ public override void ClearAppId() { appId_present = false; }
+ public override void ClearClusterId() { clusterId_present = false; }
+
+ public BasicProperties() {}
+ public override int ProtocolClassId { get { return 60; } }
+ public override string ProtocolClassName { get { return "basic"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ contentType_present = reader.ReadPresence();
+ contentEncoding_present = reader.ReadPresence();
+ headers_present = reader.ReadPresence();
+ deliveryMode_present = reader.ReadPresence();
+ priority_present = reader.ReadPresence();
+ correlationId_present = reader.ReadPresence();
+ replyTo_present = reader.ReadPresence();
+ expiration_present = reader.ReadPresence();
+ messageId_present = reader.ReadPresence();
+ timestamp_present = reader.ReadPresence();
+ type_present = reader.ReadPresence();
+ userId_present = reader.ReadPresence();
+ appId_present = reader.ReadPresence();
+ clusterId_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (contentType_present) { m_contentType = reader.ReadShortstr(); }
+ if (contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (deliveryMode_present) { m_deliveryMode = reader.ReadOctet(); }
+ if (priority_present) { m_priority = reader.ReadOctet(); }
+ if (correlationId_present) { m_correlationId = reader.ReadShortstr(); }
+ if (replyTo_present) { m_replyTo = reader.ReadShortstr(); }
+ if (expiration_present) { m_expiration = reader.ReadShortstr(); }
+ if (messageId_present) { m_messageId = reader.ReadShortstr(); }
+ if (timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
+ if (type_present) { m_type = reader.ReadShortstr(); }
+ if (userId_present) { m_userId = reader.ReadShortstr(); }
+ if (appId_present) { m_appId = reader.ReadShortstr(); }
+ if (clusterId_present) { m_clusterId = reader.ReadShortstr(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(contentType_present);
+ writer.WritePresence(contentEncoding_present);
+ writer.WritePresence(headers_present);
+ writer.WritePresence(deliveryMode_present);
+ writer.WritePresence(priority_present);
+ writer.WritePresence(correlationId_present);
+ writer.WritePresence(replyTo_present);
+ writer.WritePresence(expiration_present);
+ writer.WritePresence(messageId_present);
+ writer.WritePresence(timestamp_present);
+ writer.WritePresence(type_present);
+ writer.WritePresence(userId_present);
+ writer.WritePresence(appId_present);
+ writer.WritePresence(clusterId_present);
+ writer.FinishPresence();
+ if (contentType_present) { writer.WriteShortstr(m_contentType); }
+ if (contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (deliveryMode_present) { writer.WriteOctet(m_deliveryMode); }
+ if (priority_present) { writer.WriteOctet(m_priority); }
+ if (correlationId_present) { writer.WriteShortstr(m_correlationId); }
+ if (replyTo_present) { writer.WriteShortstr(m_replyTo); }
+ if (expiration_present) { writer.WriteShortstr(m_expiration); }
+ if (messageId_present) { writer.WriteShortstr(m_messageId); }
+ if (timestamp_present) { writer.WriteTimestamp(m_timestamp); }
+ if (type_present) { writer.WriteShortstr(m_type); }
+ if (userId_present) { writer.WriteShortstr(m_userId); }
+ if (appId_present) { writer.WriteShortstr(m_appId); }
+ if (clusterId_present) { writer.WriteShortstr(m_clusterId); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("content-type="); sb.Append(contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
+ sb.Append("content-encoding="); sb.Append(contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("delivery-mode="); sb.Append(deliveryMode_present ? m_deliveryMode.ToString() : "_"); sb.Append(", ");
+ sb.Append("priority="); sb.Append(priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
+ sb.Append("correlation-id="); sb.Append(correlationId_present ? (m_correlationId == null ? "(null)" : m_correlationId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("reply-to="); sb.Append(replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
+ sb.Append("expiration="); sb.Append(expiration_present ? (m_expiration == null ? "(null)" : m_expiration.ToString()) : "_"); sb.Append(", ");
+ sb.Append("message-id="); sb.Append(messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("timestamp="); sb.Append(timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
+ sb.Append("type="); sb.Append(type_present ? (m_type == null ? "(null)" : m_type.ToString()) : "_"); sb.Append(", ");
+ sb.Append("user-id="); sb.Append(userId_present ? (m_userId == null ? "(null)" : m_userId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("app-id="); sb.Append(appId_present ? (m_appId == null ? "(null)" : m_appId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("cluster-id="); sb.Append(clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "file"</summary>
+ public class FileProperties: RabbitMQ.Client.Impl.FileProperties {
+ private string m_contentType;
+ private string m_contentEncoding;
+ private System.Collections.IDictionary m_headers;
+ private byte m_priority;
+ private string m_replyTo;
+ private string m_messageId;
+ private string m_filename;
+ private AmqpTimestamp m_timestamp;
+ private string m_clusterId;
+
+ private bool contentType_present = false;
+ private bool contentEncoding_present = false;
+ private bool headers_present = false;
+ private bool priority_present = false;
+ private bool replyTo_present = false;
+ private bool messageId_present = false;
+ private bool filename_present = false;
+ private bool timestamp_present = false;
+ private bool clusterId_present = false;
+
+ public override string ContentType {
+ get {
+ return m_contentType;
+ }
+ set {
+ contentType_present = true;
+ m_contentType = value;
+ }
+ }
+ public override string ContentEncoding {
+ get {
+ return m_contentEncoding;
+ }
+ set {
+ contentEncoding_present = true;
+ m_contentEncoding = value;
+ }
+ }
+ public override System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public override byte Priority {
+ get {
+ return m_priority;
+ }
+ set {
+ priority_present = true;
+ m_priority = value;
+ }
+ }
+ public override string ReplyTo {
+ get {
+ return m_replyTo;
+ }
+ set {
+ replyTo_present = true;
+ m_replyTo = value;
+ }
+ }
+ public override string MessageId {
+ get {
+ return m_messageId;
+ }
+ set {
+ messageId_present = true;
+ m_messageId = value;
+ }
+ }
+ public override string Filename {
+ get {
+ return m_filename;
+ }
+ set {
+ filename_present = true;
+ m_filename = value;
+ }
+ }
+ public override AmqpTimestamp Timestamp {
+ get {
+ return m_timestamp;
+ }
+ set {
+ timestamp_present = true;
+ m_timestamp = value;
+ }
+ }
+ public override string ClusterId {
+ get {
+ return m_clusterId;
+ }
+ set {
+ clusterId_present = true;
+ m_clusterId = value;
+ }
+ }
+
+ public override void ClearContentType() { contentType_present = false; }
+ public override void ClearContentEncoding() { contentEncoding_present = false; }
+ public override void ClearHeaders() { headers_present = false; }
+ public override void ClearPriority() { priority_present = false; }
+ public override void ClearReplyTo() { replyTo_present = false; }
+ public override void ClearMessageId() { messageId_present = false; }
+ public override void ClearFilename() { filename_present = false; }
+ public override void ClearTimestamp() { timestamp_present = false; }
+ public override void ClearClusterId() { clusterId_present = false; }
+
+ public FileProperties() {}
+ public override int ProtocolClassId { get { return 70; } }
+ public override string ProtocolClassName { get { return "file"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ contentType_present = reader.ReadPresence();
+ contentEncoding_present = reader.ReadPresence();
+ headers_present = reader.ReadPresence();
+ priority_present = reader.ReadPresence();
+ replyTo_present = reader.ReadPresence();
+ messageId_present = reader.ReadPresence();
+ filename_present = reader.ReadPresence();
+ timestamp_present = reader.ReadPresence();
+ clusterId_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (contentType_present) { m_contentType = reader.ReadShortstr(); }
+ if (contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (priority_present) { m_priority = reader.ReadOctet(); }
+ if (replyTo_present) { m_replyTo = reader.ReadShortstr(); }
+ if (messageId_present) { m_messageId = reader.ReadShortstr(); }
+ if (filename_present) { m_filename = reader.ReadShortstr(); }
+ if (timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
+ if (clusterId_present) { m_clusterId = reader.ReadShortstr(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(contentType_present);
+ writer.WritePresence(contentEncoding_present);
+ writer.WritePresence(headers_present);
+ writer.WritePresence(priority_present);
+ writer.WritePresence(replyTo_present);
+ writer.WritePresence(messageId_present);
+ writer.WritePresence(filename_present);
+ writer.WritePresence(timestamp_present);
+ writer.WritePresence(clusterId_present);
+ writer.FinishPresence();
+ if (contentType_present) { writer.WriteShortstr(m_contentType); }
+ if (contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (priority_present) { writer.WriteOctet(m_priority); }
+ if (replyTo_present) { writer.WriteShortstr(m_replyTo); }
+ if (messageId_present) { writer.WriteShortstr(m_messageId); }
+ if (filename_present) { writer.WriteShortstr(m_filename); }
+ if (timestamp_present) { writer.WriteTimestamp(m_timestamp); }
+ if (clusterId_present) { writer.WriteShortstr(m_clusterId); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("content-type="); sb.Append(contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
+ sb.Append("content-encoding="); sb.Append(contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("priority="); sb.Append(priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
+ sb.Append("reply-to="); sb.Append(replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
+ sb.Append("message-id="); sb.Append(messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("filename="); sb.Append(filename_present ? (m_filename == null ? "(null)" : m_filename.ToString()) : "_"); sb.Append(", ");
+ sb.Append("timestamp="); sb.Append(timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
+ sb.Append("cluster-id="); sb.Append(clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "stream"</summary>
+ public class StreamProperties: RabbitMQ.Client.Impl.StreamProperties {
+ private string m_contentType;
+ private string m_contentEncoding;
+ private System.Collections.IDictionary m_headers;
+ private byte m_priority;
+ private AmqpTimestamp m_timestamp;
+
+ private bool contentType_present = false;
+ private bool contentEncoding_present = false;
+ private bool headers_present = false;
+ private bool priority_present = false;
+ private bool timestamp_present = false;
+
+ public override string ContentType {
+ get {
+ return m_contentType;
+ }
+ set {
+ contentType_present = true;
+ m_contentType = value;
+ }
+ }
+ public override string ContentEncoding {
+ get {
+ return m_contentEncoding;
+ }
+ set {
+ contentEncoding_present = true;
+ m_contentEncoding = value;
+ }
+ }
+ public override System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public override byte Priority {
+ get {
+ return m_priority;
+ }
+ set {
+ priority_present = true;
+ m_priority = value;
+ }
+ }
+ public override AmqpTimestamp Timestamp {
+ get {
+ return m_timestamp;
+ }
+ set {
+ timestamp_present = true;
+ m_timestamp = value;
+ }
+ }
+
+ public override void ClearContentType() { contentType_present = false; }
+ public override void ClearContentEncoding() { contentEncoding_present = false; }
+ public override void ClearHeaders() { headers_present = false; }
+ public override void ClearPriority() { priority_present = false; }
+ public override void ClearTimestamp() { timestamp_present = false; }
+
+ public StreamProperties() {}
+ public override int ProtocolClassId { get { return 80; } }
+ public override string ProtocolClassName { get { return "stream"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ contentType_present = reader.ReadPresence();
+ contentEncoding_present = reader.ReadPresence();
+ headers_present = reader.ReadPresence();
+ priority_present = reader.ReadPresence();
+ timestamp_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (contentType_present) { m_contentType = reader.ReadShortstr(); }
+ if (contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (priority_present) { m_priority = reader.ReadOctet(); }
+ if (timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(contentType_present);
+ writer.WritePresence(contentEncoding_present);
+ writer.WritePresence(headers_present);
+ writer.WritePresence(priority_present);
+ writer.WritePresence(timestamp_present);
+ writer.FinishPresence();
+ if (contentType_present) { writer.WriteShortstr(m_contentType); }
+ if (contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (priority_present) { writer.WriteOctet(m_priority); }
+ if (timestamp_present) { writer.WriteTimestamp(m_timestamp); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("content-type="); sb.Append(contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
+ sb.Append("content-encoding="); sb.Append(contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("priority="); sb.Append(priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
+ sb.Append("timestamp="); sb.Append(timestamp_present ? m_timestamp.ToString() : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "tunnel"</summary>
+ public class TunnelProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
+ private System.Collections.IDictionary m_headers;
+ private string m_proxyName;
+ private string m_dataName;
+ private byte m_durable;
+ private byte m_broadcast;
+
+ private bool headers_present = false;
+ private bool proxyName_present = false;
+ private bool dataName_present = false;
+ private bool durable_present = false;
+ private bool broadcast_present = false;
+
+ public System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public string ProxyName {
+ get {
+ return m_proxyName;
+ }
+ set {
+ proxyName_present = true;
+ m_proxyName = value;
+ }
+ }
+ public string DataName {
+ get {
+ return m_dataName;
+ }
+ set {
+ dataName_present = true;
+ m_dataName = value;
+ }
+ }
+ public byte Durable {
+ get {
+ return m_durable;
+ }
+ set {
+ durable_present = true;
+ m_durable = value;
+ }
+ }
+ public byte Broadcast {
+ get {
+ return m_broadcast;
+ }
+ set {
+ broadcast_present = true;
+ m_broadcast = value;
+ }
+ }
+
+ public void ClearHeaders() { headers_present = false; }
+ public void ClearProxyName() { proxyName_present = false; }
+ public void ClearDataName() { dataName_present = false; }
+ public void ClearDurable() { durable_present = false; }
+ public void ClearBroadcast() { broadcast_present = false; }
+
+ public TunnelProperties() {}
+ public override int ProtocolClassId { get { return 110; } }
+ public override string ProtocolClassName { get { return "tunnel"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ headers_present = reader.ReadPresence();
+ proxyName_present = reader.ReadPresence();
+ dataName_present = reader.ReadPresence();
+ durable_present = reader.ReadPresence();
+ broadcast_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (proxyName_present) { m_proxyName = reader.ReadShortstr(); }
+ if (dataName_present) { m_dataName = reader.ReadShortstr(); }
+ if (durable_present) { m_durable = reader.ReadOctet(); }
+ if (broadcast_present) { m_broadcast = reader.ReadOctet(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(headers_present);
+ writer.WritePresence(proxyName_present);
+ writer.WritePresence(dataName_present);
+ writer.WritePresence(durable_present);
+ writer.WritePresence(broadcast_present);
+ writer.FinishPresence();
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (proxyName_present) { writer.WriteShortstr(m_proxyName); }
+ if (dataName_present) { writer.WriteShortstr(m_dataName); }
+ if (durable_present) { writer.WriteOctet(m_durable); }
+ if (broadcast_present) { writer.WriteOctet(m_broadcast); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("proxy-name="); sb.Append(proxyName_present ? (m_proxyName == null ? "(null)" : m_proxyName.ToString()) : "_"); sb.Append(", ");
+ sb.Append("data-name="); sb.Append(dataName_present ? (m_dataName == null ? "(null)" : m_dataName.ToString()) : "_"); sb.Append(", ");
+ sb.Append("durable="); sb.Append(durable_present ? m_durable.ToString() : "_"); sb.Append(", ");
+ sb.Append("broadcast="); sb.Append(broadcast_present ? m_broadcast.ToString() : "_");
+ sb.Append(")");
+ }
+ }
+}
+namespace RabbitMQ.Client.Framing.Impl.v0_9 {
+ using RabbitMQ.Client.Framing.v0_9;
+ public enum ClassId {
+ Connection = 10,
+ Channel = 20,
+ Access = 30,
+ Exchange = 40,
+ Queue = 50,
+ Basic = 60,
+ File = 70,
+ Stream = 80,
+ Tx = 90,
+ Dtx = 100,
+ Tunnel = 110,
+ Message = 120,
+ Invalid = -1
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionStart: RabbitMQ.Client.Impl.MethodBase, IConnectionStart {
+ public const int ClassId = 10;
+ public const int MethodId = 10;
+
+ public byte m_versionMajor;
+ public byte m_versionMinor;
+ public System.Collections.IDictionary m_serverProperties;
+ public byte[] m_mechanisms;
+ public byte[] m_locales;
+
+ byte IConnectionStart.VersionMajor { get { return m_versionMajor; } }
+ byte IConnectionStart.VersionMinor { get { return m_versionMinor; } }
+ System.Collections.IDictionary IConnectionStart.ServerProperties { get { return m_serverProperties; } }
+ byte[] IConnectionStart.Mechanisms { get { return m_mechanisms; } }
+ byte[] IConnectionStart.Locales { get { return m_locales; } }
+
+ public ConnectionStart() {}
+ public ConnectionStart(
+ byte initVersionMajor,
+ byte initVersionMinor,
+ System.Collections.IDictionary initServerProperties,
+ byte[] initMechanisms,
+ byte[] initLocales)
+ {
+ m_versionMajor = initVersionMajor;
+ m_versionMinor = initVersionMinor;
+ m_serverProperties = initServerProperties;
+ m_mechanisms = initMechanisms;
+ m_locales = initLocales;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "connection.start"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_versionMajor = reader.ReadOctet();
+ m_versionMinor = reader.ReadOctet();
+ m_serverProperties = reader.ReadTable();
+ m_mechanisms = reader.ReadLongstr();
+ m_locales = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteOctet(m_versionMajor);
+ writer.WriteOctet(m_versionMinor);
+ writer.WriteTable(m_serverProperties);
+ writer.WriteLongstr(m_mechanisms);
+ writer.WriteLongstr(m_locales);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_versionMajor); sb.Append(",");
+ sb.Append(m_versionMinor); sb.Append(",");
+ sb.Append(m_serverProperties); sb.Append(",");
+ sb.Append(m_mechanisms); sb.Append(",");
+ sb.Append(m_locales);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionStartOk: RabbitMQ.Client.Impl.MethodBase, IConnectionStartOk {
+ public const int ClassId = 10;
+ public const int MethodId = 11;
+
+ public System.Collections.IDictionary m_clientProperties;
+ public string m_mechanism;
+ public byte[] m_response;
+ public string m_locale;
+
+ System.Collections.IDictionary IConnectionStartOk.ClientProperties { get { return m_clientProperties; } }
+ string IConnectionStartOk.Mechanism { get { return m_mechanism; } }
+ byte[] IConnectionStartOk.Response { get { return m_response; } }
+ string IConnectionStartOk.Locale { get { return m_locale; } }
+
+ public ConnectionStartOk() {}
+ public ConnectionStartOk(
+ System.Collections.IDictionary initClientProperties,
+ string initMechanism,
+ byte[] initResponse,
+ string initLocale)
+ {
+ m_clientProperties = initClientProperties;
+ m_mechanism = initMechanism;
+ m_response = initResponse;
+ m_locale = initLocale;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "connection.start-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_clientProperties = reader.ReadTable();
+ m_mechanism = reader.ReadShortstr();
+ m_response = reader.ReadLongstr();
+ m_locale = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteTable(m_clientProperties);
+ writer.WriteShortstr(m_mechanism);
+ writer.WriteLongstr(m_response);
+ writer.WriteShortstr(m_locale);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_clientProperties); sb.Append(",");
+ sb.Append(m_mechanism); sb.Append(",");
+ sb.Append(m_response); sb.Append(",");
+ sb.Append(m_locale);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionSecure: RabbitMQ.Client.Impl.MethodBase, IConnectionSecure {
+ public const int ClassId = 10;
+ public const int MethodId = 20;
+
+ public byte[] m_challenge;
+
+ byte[] IConnectionSecure.Challenge { get { return m_challenge; } }
+
+ public ConnectionSecure() {}
+ public ConnectionSecure(
+ byte[] initChallenge)
+ {
+ m_challenge = initChallenge;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "connection.secure"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_challenge = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_challenge);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_challenge);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionSecureOk: RabbitMQ.Client.Impl.MethodBase, IConnectionSecureOk {
+ public const int ClassId = 10;
+ public const int MethodId = 21;
+
+ public byte[] m_response;
+
+ byte[] IConnectionSecureOk.Response { get { return m_response; } }
+
+ public ConnectionSecureOk() {}
+ public ConnectionSecureOk(
+ byte[] initResponse)
+ {
+ m_response = initResponse;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "connection.secure-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_response = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_response);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_response);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionTune: RabbitMQ.Client.Impl.MethodBase, IConnectionTune {
+ public const int ClassId = 10;
+ public const int MethodId = 30;
+
+ public ushort m_channelMax;
+ public uint m_frameMax;
+ public ushort m_heartbeat;
+
+ ushort IConnectionTune.ChannelMax { get { return m_channelMax; } }
+ uint IConnectionTune.FrameMax { get { return m_frameMax; } }
+ ushort IConnectionTune.Heartbeat { get { return m_heartbeat; } }
+
+ public ConnectionTune() {}
+ public ConnectionTune(
+ ushort initChannelMax,
+ uint initFrameMax,
+ ushort initHeartbeat)
+ {
+ m_channelMax = initChannelMax;
+ m_frameMax = initFrameMax;
+ m_heartbeat = initHeartbeat;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "connection.tune"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_channelMax = reader.ReadShort();
+ m_frameMax = reader.ReadLong();
+ m_heartbeat = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_channelMax);
+ writer.WriteLong(m_frameMax);
+ writer.WriteShort(m_heartbeat);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_channelMax); sb.Append(",");
+ sb.Append(m_frameMax); sb.Append(",");
+ sb.Append(m_heartbeat);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionTuneOk: RabbitMQ.Client.Impl.MethodBase, IConnectionTuneOk {
+ public const int ClassId = 10;
+ public const int MethodId = 31;
+
+ public ushort m_channelMax;
+ public uint m_frameMax;
+ public ushort m_heartbeat;
+
+ ushort IConnectionTuneOk.ChannelMax { get { return m_channelMax; } }
+ uint IConnectionTuneOk.FrameMax { get { return m_frameMax; } }
+ ushort IConnectionTuneOk.Heartbeat { get { return m_heartbeat; } }
+
+ public ConnectionTuneOk() {}
+ public ConnectionTuneOk(
+ ushort initChannelMax,
+ uint initFrameMax,
+ ushort initHeartbeat)
+ {
+ m_channelMax = initChannelMax;
+ m_frameMax = initFrameMax;
+ m_heartbeat = initHeartbeat;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "connection.tune-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_channelMax = reader.ReadShort();
+ m_frameMax = reader.ReadLong();
+ m_heartbeat = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_channelMax);
+ writer.WriteLong(m_frameMax);
+ writer.WriteShort(m_heartbeat);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_channelMax); sb.Append(",");
+ sb.Append(m_frameMax); sb.Append(",");
+ sb.Append(m_heartbeat);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionOpen: RabbitMQ.Client.Impl.MethodBase, IConnectionOpen {
+ public const int ClassId = 10;
+ public const int MethodId = 40;
+
+ public string m_virtualHost;
+ public string m_capabilities;
+ public bool m_insist;
+
+ string IConnectionOpen.VirtualHost { get { return m_virtualHost; } }
+ string IConnectionOpen.Capabilities { get { return m_capabilities; } }
+ bool IConnectionOpen.Insist { get { return m_insist; } }
+
+ public ConnectionOpen() {}
+ public ConnectionOpen(
+ string initVirtualHost,
+ string initCapabilities,
+ bool initInsist)
+ {
+ m_virtualHost = initVirtualHost;
+ m_capabilities = initCapabilities;
+ m_insist = initInsist;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "connection.open"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_virtualHost = reader.ReadShortstr();
+ m_capabilities = reader.ReadShortstr();
+ m_insist = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_virtualHost);
+ writer.WriteShortstr(m_capabilities);
+ writer.WriteBit(m_insist);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_virtualHost); sb.Append(",");
+ sb.Append(m_capabilities); sb.Append(",");
+ sb.Append(m_insist);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionOpenOk: RabbitMQ.Client.Impl.MethodBase, IConnectionOpenOk {
+ public const int ClassId = 10;
+ public const int MethodId = 41;
+
+ public string m_knownHosts;
+
+ string IConnectionOpenOk.KnownHosts { get { return m_knownHosts; } }
+
+ public ConnectionOpenOk() {}
+ public ConnectionOpenOk(
+ string initKnownHosts)
+ {
+ m_knownHosts = initKnownHosts;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "connection.open-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_knownHosts = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_knownHosts);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_knownHosts);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionRedirect: RabbitMQ.Client.Impl.MethodBase, IConnectionRedirect {
+ public const int ClassId = 10;
+ public const int MethodId = 42;
+
+ public string m_host;
+ public string m_knownHosts;
+
+ string IConnectionRedirect.Host { get { return m_host; } }
+ string IConnectionRedirect.KnownHosts { get { return m_knownHosts; } }
+
+ public ConnectionRedirect() {}
+ public ConnectionRedirect(
+ string initHost,
+ string initKnownHosts)
+ {
+ m_host = initHost;
+ m_knownHosts = initKnownHosts;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 42; } }
+ public override string ProtocolMethodName { get { return "connection.redirect"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_host = reader.ReadShortstr();
+ m_knownHosts = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_host);
+ writer.WriteShortstr(m_knownHosts);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_host); sb.Append(",");
+ sb.Append(m_knownHosts);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionClose: RabbitMQ.Client.Impl.MethodBase, IConnectionClose {
+ public const int ClassId = 10;
+ public const int MethodId = 50;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public ushort m_classId;
+ public ushort m_methodId;
+
+ ushort IConnectionClose.ReplyCode { get { return m_replyCode; } }
+ string IConnectionClose.ReplyText { get { return m_replyText; } }
+ ushort IConnectionClose.ClassId { get { return m_classId; } }
+ ushort IConnectionClose.MethodId { get { return m_methodId; } }
+
+ public ConnectionClose() {}
+ public ConnectionClose(
+ ushort initReplyCode,
+ string initReplyText,
+ ushort initClassId,
+ ushort initMethodId)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_classId = initClassId;
+ m_methodId = initMethodId;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "connection.close"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_classId = reader.ReadShort();
+ m_methodId = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShort(m_classId);
+ writer.WriteShort(m_methodId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_classId); sb.Append(",");
+ sb.Append(m_methodId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionCloseOk: RabbitMQ.Client.Impl.MethodBase, IConnectionCloseOk {
+ public const int ClassId = 10;
+ public const int MethodId = 51;
+
+
+
+ public ConnectionCloseOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 51; } }
+ public override string ProtocolMethodName { get { return "connection.close-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelOpen: RabbitMQ.Client.Impl.MethodBase, IChannelOpen {
+ public const int ClassId = 20;
+ public const int MethodId = 10;
+
+ public string m_outOfBand;
+
+ string IChannelOpen.OutOfBand { get { return m_outOfBand; } }
+
+ public ChannelOpen() {}
+ public ChannelOpen(
+ string initOutOfBand)
+ {
+ m_outOfBand = initOutOfBand;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "channel.open"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_outOfBand = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_outOfBand);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_outOfBand);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelOpenOk: RabbitMQ.Client.Impl.MethodBase, IChannelOpenOk {
+ public const int ClassId = 20;
+ public const int MethodId = 11;
+
+ public byte[] m_channelId;
+
+ byte[] IChannelOpenOk.ChannelId { get { return m_channelId; } }
+
+ public ChannelOpenOk() {}
+ public ChannelOpenOk(
+ byte[] initChannelId)
+ {
+ m_channelId = initChannelId;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "channel.open-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_channelId = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_channelId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_channelId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelFlow: RabbitMQ.Client.Impl.MethodBase, IChannelFlow {
+ public const int ClassId = 20;
+ public const int MethodId = 20;
+
+ public bool m_active;
+
+ bool IChannelFlow.Active { get { return m_active; } }
+
+ public ChannelFlow() {}
+ public ChannelFlow(
+ bool initActive)
+ {
+ m_active = initActive;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "channel.flow"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_active = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteBit(m_active);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_active);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelFlowOk: RabbitMQ.Client.Impl.MethodBase, IChannelFlowOk {
+ public const int ClassId = 20;
+ public const int MethodId = 21;
+
+ public bool m_active;
+
+ bool IChannelFlowOk.Active { get { return m_active; } }
+
+ public ChannelFlowOk() {}
+ public ChannelFlowOk(
+ bool initActive)
+ {
+ m_active = initActive;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "channel.flow-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_active = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteBit(m_active);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_active);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelClose: RabbitMQ.Client.Impl.MethodBase, IChannelClose {
+ public const int ClassId = 20;
+ public const int MethodId = 40;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public ushort m_classId;
+ public ushort m_methodId;
+
+ ushort IChannelClose.ReplyCode { get { return m_replyCode; } }
+ string IChannelClose.ReplyText { get { return m_replyText; } }
+ ushort IChannelClose.ClassId { get { return m_classId; } }
+ ushort IChannelClose.MethodId { get { return m_methodId; } }
+
+ public ChannelClose() {}
+ public ChannelClose(
+ ushort initReplyCode,
+ string initReplyText,
+ ushort initClassId,
+ ushort initMethodId)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_classId = initClassId;
+ m_methodId = initMethodId;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "channel.close"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_classId = reader.ReadShort();
+ m_methodId = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShort(m_classId);
+ writer.WriteShort(m_methodId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_classId); sb.Append(",");
+ sb.Append(m_methodId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelCloseOk: RabbitMQ.Client.Impl.MethodBase, IChannelCloseOk {
+ public const int ClassId = 20;
+ public const int MethodId = 41;
+
+
+
+ public ChannelCloseOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "channel.close-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelResume: RabbitMQ.Client.Impl.MethodBase, IChannelResume {
+ public const int ClassId = 20;
+ public const int MethodId = 50;
+
+ public byte[] m_channelId;
+
+ byte[] IChannelResume.ChannelId { get { return m_channelId; } }
+
+ public ChannelResume() {}
+ public ChannelResume(
+ byte[] initChannelId)
+ {
+ m_channelId = initChannelId;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "channel.resume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_channelId = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_channelId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_channelId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelPing: RabbitMQ.Client.Impl.MethodBase, IChannelPing {
+ public const int ClassId = 20;
+ public const int MethodId = 60;
+
+
+
+ public ChannelPing(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "channel.ping"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelPong: RabbitMQ.Client.Impl.MethodBase, IChannelPong {
+ public const int ClassId = 20;
+ public const int MethodId = 70;
+
+
+
+ public ChannelPong(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 70; } }
+ public override string ProtocolMethodName { get { return "channel.pong"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelOk: RabbitMQ.Client.Impl.MethodBase, IChannelOk {
+ public const int ClassId = 20;
+ public const int MethodId = 80;
+
+
+
+ public ChannelOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 80; } }
+ public override string ProtocolMethodName { get { return "channel.ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class AccessRequest: RabbitMQ.Client.Impl.MethodBase, IAccessRequest {
+ public const int ClassId = 30;
+ public const int MethodId = 10;
+
+ public string m_realm;
+ public bool m_exclusive;
+ public bool m_passive;
+ public bool m_active;
+ public bool m_write;
+ public bool m_read;
+
+ string IAccessRequest.Realm { get { return m_realm; } }
+ bool IAccessRequest.Exclusive { get { return m_exclusive; } }
+ bool IAccessRequest.Passive { get { return m_passive; } }
+ bool IAccessRequest.Active { get { return m_active; } }
+ bool IAccessRequest.Write { get { return m_write; } }
+ bool IAccessRequest.Read { get { return m_read; } }
+
+ public AccessRequest() {}
+ public AccessRequest(
+ string initRealm,
+ bool initExclusive,
+ bool initPassive,
+ bool initActive,
+ bool initWrite,
+ bool initRead)
+ {
+ m_realm = initRealm;
+ m_exclusive = initExclusive;
+ m_passive = initPassive;
+ m_active = initActive;
+ m_write = initWrite;
+ m_read = initRead;
+ }
+
+ public override int ProtocolClassId { get { return 30; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "access.request"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_realm = reader.ReadShortstr();
+ m_exclusive = reader.ReadBit();
+ m_passive = reader.ReadBit();
+ m_active = reader.ReadBit();
+ m_write = reader.ReadBit();
+ m_read = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_realm);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_passive);
+ writer.WriteBit(m_active);
+ writer.WriteBit(m_write);
+ writer.WriteBit(m_read);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_realm); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_passive); sb.Append(",");
+ sb.Append(m_active); sb.Append(",");
+ sb.Append(m_write); sb.Append(",");
+ sb.Append(m_read);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class AccessRequestOk: RabbitMQ.Client.Impl.MethodBase, IAccessRequestOk {
+ public const int ClassId = 30;
+ public const int MethodId = 11;
+
+ public ushort m_ticket;
+
+ ushort IAccessRequestOk.Ticket { get { return m_ticket; } }
+
+ public AccessRequestOk() {}
+ public AccessRequestOk(
+ ushort initTicket)
+ {
+ m_ticket = initTicket;
+ }
+
+ public override int ProtocolClassId { get { return 30; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "access.request-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDeclare: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclare {
+ public const int ClassId = 40;
+ public const int MethodId = 10;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_type;
+ public bool m_passive;
+ public bool m_durable;
+ public bool m_autoDelete;
+ public bool m_internal;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IExchangeDeclare.Ticket { get { return m_ticket; } }
+ string IExchangeDeclare.Exchange { get { return m_exchange; } }
+ string IExchangeDeclare.Type { get { return m_type; } }
+ bool IExchangeDeclare.Passive { get { return m_passive; } }
+ bool IExchangeDeclare.Durable { get { return m_durable; } }
+ bool IExchangeDeclare.AutoDelete { get { return m_autoDelete; } }
+ bool IExchangeDeclare.Internal { get { return m_internal; } }
+ bool IExchangeDeclare.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IExchangeDeclare.Arguments { get { return m_arguments; } }
+
+ public ExchangeDeclare() {}
+ public ExchangeDeclare(
+ ushort initTicket,
+ string initExchange,
+ string initType,
+ bool initPassive,
+ bool initDurable,
+ bool initAutoDelete,
+ bool initInternal,
+ bool initNowait,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_type = initType;
+ m_passive = initPassive;
+ m_durable = initDurable;
+ m_autoDelete = initAutoDelete;
+ m_internal = initInternal;
+ m_nowait = initNowait;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "exchange.declare"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_type = reader.ReadShortstr();
+ m_passive = reader.ReadBit();
+ m_durable = reader.ReadBit();
+ m_autoDelete = reader.ReadBit();
+ m_internal = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_type);
+ writer.WriteBit(m_passive);
+ writer.WriteBit(m_durable);
+ writer.WriteBit(m_autoDelete);
+ writer.WriteBit(m_internal);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_type); sb.Append(",");
+ sb.Append(m_passive); sb.Append(",");
+ sb.Append(m_durable); sb.Append(",");
+ sb.Append(m_autoDelete); sb.Append(",");
+ sb.Append(m_internal); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDeclareOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclareOk {
+ public const int ClassId = 40;
+ public const int MethodId = 11;
+
+
+
+ public ExchangeDeclareOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "exchange.declare-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDelete: RabbitMQ.Client.Impl.MethodBase, IExchangeDelete {
+ public const int ClassId = 40;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public bool m_ifUnused;
+ public bool m_nowait;
+
+ ushort IExchangeDelete.Ticket { get { return m_ticket; } }
+ string IExchangeDelete.Exchange { get { return m_exchange; } }
+ bool IExchangeDelete.IfUnused { get { return m_ifUnused; } }
+ bool IExchangeDelete.Nowait { get { return m_nowait; } }
+
+ public ExchangeDelete() {}
+ public ExchangeDelete(
+ ushort initTicket,
+ string initExchange,
+ bool initIfUnused,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_ifUnused = initIfUnused;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "exchange.delete"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_ifUnused = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteBit(m_ifUnused);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_ifUnused); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDeleteOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeleteOk {
+ public const int ClassId = 40;
+ public const int MethodId = 21;
+
+
+
+ public ExchangeDeleteOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "exchange.delete-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDeclare: RabbitMQ.Client.Impl.MethodBase, IQueueDeclare {
+ public const int ClassId = 50;
+ public const int MethodId = 10;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_passive;
+ public bool m_durable;
+ public bool m_exclusive;
+ public bool m_autoDelete;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IQueueDeclare.Ticket { get { return m_ticket; } }
+ string IQueueDeclare.Queue { get { return m_queue; } }
+ bool IQueueDeclare.Passive { get { return m_passive; } }
+ bool IQueueDeclare.Durable { get { return m_durable; } }
+ bool IQueueDeclare.Exclusive { get { return m_exclusive; } }
+ bool IQueueDeclare.AutoDelete { get { return m_autoDelete; } }
+ bool IQueueDeclare.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IQueueDeclare.Arguments { get { return m_arguments; } }
+
+ public QueueDeclare() {}
+ public QueueDeclare(
+ ushort initTicket,
+ string initQueue,
+ bool initPassive,
+ bool initDurable,
+ bool initExclusive,
+ bool initAutoDelete,
+ bool initNowait,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_passive = initPassive;
+ m_durable = initDurable;
+ m_exclusive = initExclusive;
+ m_autoDelete = initAutoDelete;
+ m_nowait = initNowait;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "queue.declare"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_passive = reader.ReadBit();
+ m_durable = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_autoDelete = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_passive);
+ writer.WriteBit(m_durable);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_autoDelete);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_passive); sb.Append(",");
+ sb.Append(m_durable); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_autoDelete); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDeclareOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeclareOk {
+ public const int ClassId = 50;
+ public const int MethodId = 11;
+
+ public string m_queue;
+ public uint m_messageCount;
+ public uint m_consumerCount;
+
+ string IQueueDeclareOk.Queue { get { return m_queue; } }
+ uint IQueueDeclareOk.MessageCount { get { return m_messageCount; } }
+ uint IQueueDeclareOk.ConsumerCount { get { return m_consumerCount; } }
+
+ public QueueDeclareOk() {}
+ public QueueDeclareOk(
+ string initQueue,
+ uint initMessageCount,
+ uint initConsumerCount)
+ {
+ m_queue = initQueue;
+ m_messageCount = initMessageCount;
+ m_consumerCount = initConsumerCount;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "queue.declare-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_queue = reader.ReadShortstr();
+ m_messageCount = reader.ReadLong();
+ m_consumerCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_queue);
+ writer.WriteLong(m_messageCount);
+ writer.WriteLong(m_consumerCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_messageCount); sb.Append(",");
+ sb.Append(m_consumerCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueBind: RabbitMQ.Client.Impl.MethodBase, IQueueBind {
+ public const int ClassId = 50;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IQueueBind.Ticket { get { return m_ticket; } }
+ string IQueueBind.Queue { get { return m_queue; } }
+ string IQueueBind.Exchange { get { return m_exchange; } }
+ string IQueueBind.RoutingKey { get { return m_routingKey; } }
+ bool IQueueBind.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IQueueBind.Arguments { get { return m_arguments; } }
+
+ public QueueBind() {}
+ public QueueBind(
+ ushort initTicket,
+ string initQueue,
+ string initExchange,
+ string initRoutingKey,
+ bool initNowait,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_nowait = initNowait;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "queue.bind"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueBindOk: RabbitMQ.Client.Impl.MethodBase, IQueueBindOk {
+ public const int ClassId = 50;
+ public const int MethodId = 21;
+
+
+
+ public QueueBindOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "queue.bind-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueUnbind: RabbitMQ.Client.Impl.MethodBase, IQueueUnbind {
+ public const int ClassId = 50;
+ public const int MethodId = 50;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_exchange;
+ public string m_routingKey;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IQueueUnbind.Ticket { get { return m_ticket; } }
+ string IQueueUnbind.Queue { get { return m_queue; } }
+ string IQueueUnbind.Exchange { get { return m_exchange; } }
+ string IQueueUnbind.RoutingKey { get { return m_routingKey; } }
+ System.Collections.IDictionary IQueueUnbind.Arguments { get { return m_arguments; } }
+
+ public QueueUnbind() {}
+ public QueueUnbind(
+ ushort initTicket,
+ string initQueue,
+ string initExchange,
+ string initRoutingKey,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "queue.unbind"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueUnbindOk: RabbitMQ.Client.Impl.MethodBase, IQueueUnbindOk {
+ public const int ClassId = 50;
+ public const int MethodId = 51;
+
+
+
+ public QueueUnbindOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 51; } }
+ public override string ProtocolMethodName { get { return "queue.unbind-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueuePurge: RabbitMQ.Client.Impl.MethodBase, IQueuePurge {
+ public const int ClassId = 50;
+ public const int MethodId = 30;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_nowait;
+
+ ushort IQueuePurge.Ticket { get { return m_ticket; } }
+ string IQueuePurge.Queue { get { return m_queue; } }
+ bool IQueuePurge.Nowait { get { return m_nowait; } }
+
+ public QueuePurge() {}
+ public QueuePurge(
+ ushort initTicket,
+ string initQueue,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "queue.purge"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueuePurgeOk: RabbitMQ.Client.Impl.MethodBase, IQueuePurgeOk {
+ public const int ClassId = 50;
+ public const int MethodId = 31;
+
+ public uint m_messageCount;
+
+ uint IQueuePurgeOk.MessageCount { get { return m_messageCount; } }
+
+ public QueuePurgeOk() {}
+ public QueuePurgeOk(
+ uint initMessageCount)
+ {
+ m_messageCount = initMessageCount;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "queue.purge-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_messageCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_messageCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_messageCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDelete: RabbitMQ.Client.Impl.MethodBase, IQueueDelete {
+ public const int ClassId = 50;
+ public const int MethodId = 40;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_ifUnused;
+ public bool m_ifEmpty;
+ public bool m_nowait;
+
+ ushort IQueueDelete.Ticket { get { return m_ticket; } }
+ string IQueueDelete.Queue { get { return m_queue; } }
+ bool IQueueDelete.IfUnused { get { return m_ifUnused; } }
+ bool IQueueDelete.IfEmpty { get { return m_ifEmpty; } }
+ bool IQueueDelete.Nowait { get { return m_nowait; } }
+
+ public QueueDelete() {}
+ public QueueDelete(
+ ushort initTicket,
+ string initQueue,
+ bool initIfUnused,
+ bool initIfEmpty,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_ifUnused = initIfUnused;
+ m_ifEmpty = initIfEmpty;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "queue.delete"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_ifUnused = reader.ReadBit();
+ m_ifEmpty = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_ifUnused);
+ writer.WriteBit(m_ifEmpty);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_ifUnused); sb.Append(",");
+ sb.Append(m_ifEmpty); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDeleteOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeleteOk {
+ public const int ClassId = 50;
+ public const int MethodId = 41;
+
+ public uint m_messageCount;
+
+ uint IQueueDeleteOk.MessageCount { get { return m_messageCount; } }
+
+ public QueueDeleteOk() {}
+ public QueueDeleteOk(
+ uint initMessageCount)
+ {
+ m_messageCount = initMessageCount;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "queue.delete-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_messageCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_messageCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_messageCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicQos: RabbitMQ.Client.Impl.MethodBase, IBasicQos {
+ public const int ClassId = 60;
+ public const int MethodId = 10;
+
+ public uint m_prefetchSize;
+ public ushort m_prefetchCount;
+ public bool m_global;
+
+ uint IBasicQos.PrefetchSize { get { return m_prefetchSize; } }
+ ushort IBasicQos.PrefetchCount { get { return m_prefetchCount; } }
+ bool IBasicQos.Global { get { return m_global; } }
+
+ public BasicQos() {}
+ public BasicQos(
+ uint initPrefetchSize,
+ ushort initPrefetchCount,
+ bool initGlobal)
+ {
+ m_prefetchSize = initPrefetchSize;
+ m_prefetchCount = initPrefetchCount;
+ m_global = initGlobal;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "basic.qos"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_prefetchSize = reader.ReadLong();
+ m_prefetchCount = reader.ReadShort();
+ m_global = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_prefetchSize);
+ writer.WriteShort(m_prefetchCount);
+ writer.WriteBit(m_global);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_prefetchSize); sb.Append(",");
+ sb.Append(m_prefetchCount); sb.Append(",");
+ sb.Append(m_global);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicQosOk: RabbitMQ.Client.Impl.MethodBase, IBasicQosOk {
+ public const int ClassId = 60;
+ public const int MethodId = 11;
+
+
+
+ public BasicQosOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "basic.qos-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicConsume: RabbitMQ.Client.Impl.MethodBase, IBasicConsume {
+ public const int ClassId = 60;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_consumerTag;
+ public bool m_noLocal;
+ public bool m_noAck;
+ public bool m_exclusive;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_filter;
+
+ ushort IBasicConsume.Ticket { get { return m_ticket; } }
+ string IBasicConsume.Queue { get { return m_queue; } }
+ string IBasicConsume.ConsumerTag { get { return m_consumerTag; } }
+ bool IBasicConsume.NoLocal { get { return m_noLocal; } }
+ bool IBasicConsume.NoAck { get { return m_noAck; } }
+ bool IBasicConsume.Exclusive { get { return m_exclusive; } }
+ bool IBasicConsume.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IBasicConsume.Filter { get { return m_filter; } }
+
+ public BasicConsume() {}
+ public BasicConsume(
+ ushort initTicket,
+ string initQueue,
+ string initConsumerTag,
+ bool initNoLocal,
+ bool initNoAck,
+ bool initExclusive,
+ bool initNowait,
+ System.Collections.IDictionary initFilter)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_consumerTag = initConsumerTag;
+ m_noLocal = initNoLocal;
+ m_noAck = initNoAck;
+ m_exclusive = initExclusive;
+ m_nowait = initNowait;
+ m_filter = initFilter;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "basic.consume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_consumerTag = reader.ReadShortstr();
+ m_noLocal = reader.ReadBit();
+ m_noAck = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ m_filter = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_noLocal);
+ writer.WriteBit(m_noAck);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_filter);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_noLocal); sb.Append(",");
+ sb.Append(m_noAck); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_filter);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicConsumeOk: RabbitMQ.Client.Impl.MethodBase, IBasicConsumeOk {
+ public const int ClassId = 60;
+ public const int MethodId = 21;
+
+ public string m_consumerTag;
+
+ string IBasicConsumeOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public BasicConsumeOk() {}
+ public BasicConsumeOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "basic.consume-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicCancel: RabbitMQ.Client.Impl.MethodBase, IBasicCancel {
+ public const int ClassId = 60;
+ public const int MethodId = 30;
+
+ public string m_consumerTag;
+ public bool m_nowait;
+
+ string IBasicCancel.ConsumerTag { get { return m_consumerTag; } }
+ bool IBasicCancel.Nowait { get { return m_nowait; } }
+
+ public BasicCancel() {}
+ public BasicCancel(
+ string initConsumerTag,
+ bool initNowait)
+ {
+ m_consumerTag = initConsumerTag;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "basic.cancel"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicCancelOk: RabbitMQ.Client.Impl.MethodBase, IBasicCancelOk {
+ public const int ClassId = 60;
+ public const int MethodId = 31;
+
+ public string m_consumerTag;
+
+ string IBasicCancelOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public BasicCancelOk() {}
+ public BasicCancelOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "basic.cancel-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicPublish: RabbitMQ.Client.Impl.MethodBase, IBasicPublish {
+ public const int ClassId = 60;
+ public const int MethodId = 40;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_mandatory;
+ public bool m_immediate;
+
+ ushort IBasicPublish.Ticket { get { return m_ticket; } }
+ string IBasicPublish.Exchange { get { return m_exchange; } }
+ string IBasicPublish.RoutingKey { get { return m_routingKey; } }
+ bool IBasicPublish.Mandatory { get { return m_mandatory; } }
+ bool IBasicPublish.Immediate { get { return m_immediate; } }
+
+ public BasicPublish() {}
+ public BasicPublish(
+ ushort initTicket,
+ string initExchange,
+ string initRoutingKey,
+ bool initMandatory,
+ bool initImmediate)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_mandatory = initMandatory;
+ m_immediate = initImmediate;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "basic.publish"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_mandatory = reader.ReadBit();
+ m_immediate = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_mandatory);
+ writer.WriteBit(m_immediate);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_mandatory); sb.Append(",");
+ sb.Append(m_immediate);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicReturn: RabbitMQ.Client.Impl.MethodBase, IBasicReturn {
+ public const int ClassId = 60;
+ public const int MethodId = 50;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public string m_exchange;
+ public string m_routingKey;
+
+ ushort IBasicReturn.ReplyCode { get { return m_replyCode; } }
+ string IBasicReturn.ReplyText { get { return m_replyText; } }
+ string IBasicReturn.Exchange { get { return m_exchange; } }
+ string IBasicReturn.RoutingKey { get { return m_routingKey; } }
+
+ public BasicReturn() {}
+ public BasicReturn(
+ ushort initReplyCode,
+ string initReplyText,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "basic.return"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicDeliver: RabbitMQ.Client.Impl.MethodBase, IBasicDeliver {
+ public const int ClassId = 60;
+ public const int MethodId = 60;
+
+ public string m_consumerTag;
+ public ulong m_deliveryTag;
+ public bool m_redelivered;
+ public string m_exchange;
+ public string m_routingKey;
+
+ string IBasicDeliver.ConsumerTag { get { return m_consumerTag; } }
+ ulong IBasicDeliver.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicDeliver.Redelivered { get { return m_redelivered; } }
+ string IBasicDeliver.Exchange { get { return m_exchange; } }
+ string IBasicDeliver.RoutingKey { get { return m_routingKey; } }
+
+ public BasicDeliver() {}
+ public BasicDeliver(
+ string initConsumerTag,
+ ulong initDeliveryTag,
+ bool initRedelivered,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_consumerTag = initConsumerTag;
+ m_deliveryTag = initDeliveryTag;
+ m_redelivered = initRedelivered;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "basic.deliver"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_deliveryTag = reader.ReadLonglong();
+ m_redelivered = reader.ReadBit();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_redelivered);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_redelivered); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicGet: RabbitMQ.Client.Impl.MethodBase, IBasicGet {
+ public const int ClassId = 60;
+ public const int MethodId = 70;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_noAck;
+
+ ushort IBasicGet.Ticket { get { return m_ticket; } }
+ string IBasicGet.Queue { get { return m_queue; } }
+ bool IBasicGet.NoAck { get { return m_noAck; } }
+
+ public BasicGet() {}
+ public BasicGet(
+ ushort initTicket,
+ string initQueue,
+ bool initNoAck)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_noAck = initNoAck;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 70; } }
+ public override string ProtocolMethodName { get { return "basic.get"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_noAck = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_noAck);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_noAck);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicGetOk: RabbitMQ.Client.Impl.MethodBase, IBasicGetOk {
+ public const int ClassId = 60;
+ public const int MethodId = 71;
+
+ public ulong m_deliveryTag;
+ public bool m_redelivered;
+ public string m_exchange;
+ public string m_routingKey;
+ public uint m_messageCount;
+
+ ulong IBasicGetOk.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicGetOk.Redelivered { get { return m_redelivered; } }
+ string IBasicGetOk.Exchange { get { return m_exchange; } }
+ string IBasicGetOk.RoutingKey { get { return m_routingKey; } }
+ uint IBasicGetOk.MessageCount { get { return m_messageCount; } }
+
+ public BasicGetOk() {}
+ public BasicGetOk(
+ ulong initDeliveryTag,
+ bool initRedelivered,
+ string initExchange,
+ string initRoutingKey,
+ uint initMessageCount)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_redelivered = initRedelivered;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_messageCount = initMessageCount;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 71; } }
+ public override string ProtocolMethodName { get { return "basic.get-ok"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_redelivered = reader.ReadBit();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_messageCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_redelivered);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteLong(m_messageCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_redelivered); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_messageCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicGetEmpty: RabbitMQ.Client.Impl.MethodBase, IBasicGetEmpty {
+ public const int ClassId = 60;
+ public const int MethodId = 72;
+
+ public string m_clusterId;
+
+ string IBasicGetEmpty.ClusterId { get { return m_clusterId; } }
+
+ public BasicGetEmpty() {}
+ public BasicGetEmpty(
+ string initClusterId)
+ {
+ m_clusterId = initClusterId;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 72; } }
+ public override string ProtocolMethodName { get { return "basic.get-empty"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_clusterId = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_clusterId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_clusterId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicAck: RabbitMQ.Client.Impl.MethodBase, IBasicAck {
+ public const int ClassId = 60;
+ public const int MethodId = 80;
+
+ public ulong m_deliveryTag;
+ public bool m_multiple;
+
+ ulong IBasicAck.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicAck.Multiple { get { return m_multiple; } }
+
+ public BasicAck() {}
+ public BasicAck(
+ ulong initDeliveryTag,
+ bool initMultiple)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_multiple = initMultiple;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 80; } }
+ public override string ProtocolMethodName { get { return "basic.ack"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_multiple = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_multiple);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_multiple);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicReject: RabbitMQ.Client.Impl.MethodBase, IBasicReject {
+ public const int ClassId = 60;
+ public const int MethodId = 90;
+
+ public ulong m_deliveryTag;
+ public bool m_requeue;
+
+ ulong IBasicReject.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicReject.Requeue { get { return m_requeue; } }
+
+ public BasicReject() {}
+ public BasicReject(
+ ulong initDeliveryTag,
+ bool initRequeue)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_requeue = initRequeue;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 90; } }
+ public override string ProtocolMethodName { get { return "basic.reject"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_requeue = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_requeue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_requeue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicRecover: RabbitMQ.Client.Impl.MethodBase, IBasicRecover {
+ public const int ClassId = 60;
+ public const int MethodId = 100;
+
+ public bool m_requeue;
+
+ bool IBasicRecover.Requeue { get { return m_requeue; } }
+
+ public BasicRecover() {}
+ public BasicRecover(
+ bool initRequeue)
+ {
+ m_requeue = initRequeue;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 100; } }
+ public override string ProtocolMethodName { get { return "basic.recover"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_requeue = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteBit(m_requeue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_requeue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileQos: RabbitMQ.Client.Impl.MethodBase, IFileQos {
+ public const int ClassId = 70;
+ public const int MethodId = 10;
+
+ public uint m_prefetchSize;
+ public ushort m_prefetchCount;
+ public bool m_global;
+
+ uint IFileQos.PrefetchSize { get { return m_prefetchSize; } }
+ ushort IFileQos.PrefetchCount { get { return m_prefetchCount; } }
+ bool IFileQos.Global { get { return m_global; } }
+
+ public FileQos() {}
+ public FileQos(
+ uint initPrefetchSize,
+ ushort initPrefetchCount,
+ bool initGlobal)
+ {
+ m_prefetchSize = initPrefetchSize;
+ m_prefetchCount = initPrefetchCount;
+ m_global = initGlobal;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "file.qos"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_prefetchSize = reader.ReadLong();
+ m_prefetchCount = reader.ReadShort();
+ m_global = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_prefetchSize);
+ writer.WriteShort(m_prefetchCount);
+ writer.WriteBit(m_global);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_prefetchSize); sb.Append(",");
+ sb.Append(m_prefetchCount); sb.Append(",");
+ sb.Append(m_global);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileQosOk: RabbitMQ.Client.Impl.MethodBase, IFileQosOk {
+ public const int ClassId = 70;
+ public const int MethodId = 11;
+
+
+
+ public FileQosOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "file.qos-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileConsume: RabbitMQ.Client.Impl.MethodBase, IFileConsume {
+ public const int ClassId = 70;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_consumerTag;
+ public bool m_noLocal;
+ public bool m_noAck;
+ public bool m_exclusive;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_filter;
+
+ ushort IFileConsume.Ticket { get { return m_ticket; } }
+ string IFileConsume.Queue { get { return m_queue; } }
+ string IFileConsume.ConsumerTag { get { return m_consumerTag; } }
+ bool IFileConsume.NoLocal { get { return m_noLocal; } }
+ bool IFileConsume.NoAck { get { return m_noAck; } }
+ bool IFileConsume.Exclusive { get { return m_exclusive; } }
+ bool IFileConsume.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IFileConsume.Filter { get { return m_filter; } }
+
+ public FileConsume() {}
+ public FileConsume(
+ ushort initTicket,
+ string initQueue,
+ string initConsumerTag,
+ bool initNoLocal,
+ bool initNoAck,
+ bool initExclusive,
+ bool initNowait,
+ System.Collections.IDictionary initFilter)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_consumerTag = initConsumerTag;
+ m_noLocal = initNoLocal;
+ m_noAck = initNoAck;
+ m_exclusive = initExclusive;
+ m_nowait = initNowait;
+ m_filter = initFilter;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "file.consume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_consumerTag = reader.ReadShortstr();
+ m_noLocal = reader.ReadBit();
+ m_noAck = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ m_filter = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_noLocal);
+ writer.WriteBit(m_noAck);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_filter);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_noLocal); sb.Append(",");
+ sb.Append(m_noAck); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_filter);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileConsumeOk: RabbitMQ.Client.Impl.MethodBase, IFileConsumeOk {
+ public const int ClassId = 70;
+ public const int MethodId = 21;
+
+ public string m_consumerTag;
+
+ string IFileConsumeOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public FileConsumeOk() {}
+ public FileConsumeOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "file.consume-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileCancel: RabbitMQ.Client.Impl.MethodBase, IFileCancel {
+ public const int ClassId = 70;
+ public const int MethodId = 30;
+
+ public string m_consumerTag;
+ public bool m_nowait;
+
+ string IFileCancel.ConsumerTag { get { return m_consumerTag; } }
+ bool IFileCancel.Nowait { get { return m_nowait; } }
+
+ public FileCancel() {}
+ public FileCancel(
+ string initConsumerTag,
+ bool initNowait)
+ {
+ m_consumerTag = initConsumerTag;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "file.cancel"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileCancelOk: RabbitMQ.Client.Impl.MethodBase, IFileCancelOk {
+ public const int ClassId = 70;
+ public const int MethodId = 31;
+
+ public string m_consumerTag;
+
+ string IFileCancelOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public FileCancelOk() {}
+ public FileCancelOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "file.cancel-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileOpen: RabbitMQ.Client.Impl.MethodBase, IFileOpen {
+ public const int ClassId = 70;
+ public const int MethodId = 40;
+
+ public string m_identifier;
+ public ulong m_contentSize;
+
+ string IFileOpen.Identifier { get { return m_identifier; } }
+ ulong IFileOpen.ContentSize { get { return m_contentSize; } }
+
+ public FileOpen() {}
+ public FileOpen(
+ string initIdentifier,
+ ulong initContentSize)
+ {
+ m_identifier = initIdentifier;
+ m_contentSize = initContentSize;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "file.open"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_identifier = reader.ReadShortstr();
+ m_contentSize = reader.ReadLonglong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_identifier);
+ writer.WriteLonglong(m_contentSize);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_identifier); sb.Append(",");
+ sb.Append(m_contentSize);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileOpenOk: RabbitMQ.Client.Impl.MethodBase, IFileOpenOk {
+ public const int ClassId = 70;
+ public const int MethodId = 41;
+
+ public ulong m_stagedSize;
+
+ ulong IFileOpenOk.StagedSize { get { return m_stagedSize; } }
+
+ public FileOpenOk() {}
+ public FileOpenOk(
+ ulong initStagedSize)
+ {
+ m_stagedSize = initStagedSize;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "file.open-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_stagedSize = reader.ReadLonglong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_stagedSize);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_stagedSize);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileStage: RabbitMQ.Client.Impl.MethodBase, IFileStage {
+ public const int ClassId = 70;
+ public const int MethodId = 50;
+
+
+
+ public FileStage(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "file.stage"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FilePublish: RabbitMQ.Client.Impl.MethodBase, IFilePublish {
+ public const int ClassId = 70;
+ public const int MethodId = 60;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_mandatory;
+ public bool m_immediate;
+ public string m_identifier;
+
+ ushort IFilePublish.Ticket { get { return m_ticket; } }
+ string IFilePublish.Exchange { get { return m_exchange; } }
+ string IFilePublish.RoutingKey { get { return m_routingKey; } }
+ bool IFilePublish.Mandatory { get { return m_mandatory; } }
+ bool IFilePublish.Immediate { get { return m_immediate; } }
+ string IFilePublish.Identifier { get { return m_identifier; } }
+
+ public FilePublish() {}
+ public FilePublish(
+ ushort initTicket,
+ string initExchange,
+ string initRoutingKey,
+ bool initMandatory,
+ bool initImmediate,
+ string initIdentifier)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_mandatory = initMandatory;
+ m_immediate = initImmediate;
+ m_identifier = initIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "file.publish"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_mandatory = reader.ReadBit();
+ m_immediate = reader.ReadBit();
+ m_identifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_mandatory);
+ writer.WriteBit(m_immediate);
+ writer.WriteShortstr(m_identifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_mandatory); sb.Append(",");
+ sb.Append(m_immediate); sb.Append(",");
+ sb.Append(m_identifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileReturn: RabbitMQ.Client.Impl.MethodBase, IFileReturn {
+ public const int ClassId = 70;
+ public const int MethodId = 70;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public string m_exchange;
+ public string m_routingKey;
+
+ ushort IFileReturn.ReplyCode { get { return m_replyCode; } }
+ string IFileReturn.ReplyText { get { return m_replyText; } }
+ string IFileReturn.Exchange { get { return m_exchange; } }
+ string IFileReturn.RoutingKey { get { return m_routingKey; } }
+
+ public FileReturn() {}
+ public FileReturn(
+ ushort initReplyCode,
+ string initReplyText,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 70; } }
+ public override string ProtocolMethodName { get { return "file.return"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileDeliver: RabbitMQ.Client.Impl.MethodBase, IFileDeliver {
+ public const int ClassId = 70;
+ public const int MethodId = 80;
+
+ public string m_consumerTag;
+ public ulong m_deliveryTag;
+ public bool m_redelivered;
+ public string m_exchange;
+ public string m_routingKey;
+ public string m_identifier;
+
+ string IFileDeliver.ConsumerTag { get { return m_consumerTag; } }
+ ulong IFileDeliver.DeliveryTag { get { return m_deliveryTag; } }
+ bool IFileDeliver.Redelivered { get { return m_redelivered; } }
+ string IFileDeliver.Exchange { get { return m_exchange; } }
+ string IFileDeliver.RoutingKey { get { return m_routingKey; } }
+ string IFileDeliver.Identifier { get { return m_identifier; } }
+
+ public FileDeliver() {}
+ public FileDeliver(
+ string initConsumerTag,
+ ulong initDeliveryTag,
+ bool initRedelivered,
+ string initExchange,
+ string initRoutingKey,
+ string initIdentifier)
+ {
+ m_consumerTag = initConsumerTag;
+ m_deliveryTag = initDeliveryTag;
+ m_redelivered = initRedelivered;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_identifier = initIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 80; } }
+ public override string ProtocolMethodName { get { return "file.deliver"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_deliveryTag = reader.ReadLonglong();
+ m_redelivered = reader.ReadBit();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_identifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_redelivered);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteShortstr(m_identifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_redelivered); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_identifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileAck: RabbitMQ.Client.Impl.MethodBase, IFileAck {
+ public const int ClassId = 70;
+ public const int MethodId = 90;
+
+ public ulong m_deliveryTag;
+ public bool m_multiple;
+
+ ulong IFileAck.DeliveryTag { get { return m_deliveryTag; } }
+ bool IFileAck.Multiple { get { return m_multiple; } }
+
+ public FileAck() {}
+ public FileAck(
+ ulong initDeliveryTag,
+ bool initMultiple)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_multiple = initMultiple;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 90; } }
+ public override string ProtocolMethodName { get { return "file.ack"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_multiple = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_multiple);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_multiple);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileReject: RabbitMQ.Client.Impl.MethodBase, IFileReject {
+ public const int ClassId = 70;
+ public const int MethodId = 100;
+
+ public ulong m_deliveryTag;
+ public bool m_requeue;
+
+ ulong IFileReject.DeliveryTag { get { return m_deliveryTag; } }
+ bool IFileReject.Requeue { get { return m_requeue; } }
+
+ public FileReject() {}
+ public FileReject(
+ ulong initDeliveryTag,
+ bool initRequeue)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_requeue = initRequeue;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 100; } }
+ public override string ProtocolMethodName { get { return "file.reject"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_requeue = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_requeue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_requeue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamQos: RabbitMQ.Client.Impl.MethodBase, IStreamQos {
+ public const int ClassId = 80;
+ public const int MethodId = 10;
+
+ public uint m_prefetchSize;
+ public ushort m_prefetchCount;
+ public uint m_consumeRate;
+ public bool m_global;
+
+ uint IStreamQos.PrefetchSize { get { return m_prefetchSize; } }
+ ushort IStreamQos.PrefetchCount { get { return m_prefetchCount; } }
+ uint IStreamQos.ConsumeRate { get { return m_consumeRate; } }
+ bool IStreamQos.Global { get { return m_global; } }
+
+ public StreamQos() {}
+ public StreamQos(
+ uint initPrefetchSize,
+ ushort initPrefetchCount,
+ uint initConsumeRate,
+ bool initGlobal)
+ {
+ m_prefetchSize = initPrefetchSize;
+ m_prefetchCount = initPrefetchCount;
+ m_consumeRate = initConsumeRate;
+ m_global = initGlobal;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "stream.qos"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_prefetchSize = reader.ReadLong();
+ m_prefetchCount = reader.ReadShort();
+ m_consumeRate = reader.ReadLong();
+ m_global = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_prefetchSize);
+ writer.WriteShort(m_prefetchCount);
+ writer.WriteLong(m_consumeRate);
+ writer.WriteBit(m_global);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_prefetchSize); sb.Append(",");
+ sb.Append(m_prefetchCount); sb.Append(",");
+ sb.Append(m_consumeRate); sb.Append(",");
+ sb.Append(m_global);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamQosOk: RabbitMQ.Client.Impl.MethodBase, IStreamQosOk {
+ public const int ClassId = 80;
+ public const int MethodId = 11;
+
+
+
+ public StreamQosOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "stream.qos-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamConsume: RabbitMQ.Client.Impl.MethodBase, IStreamConsume {
+ public const int ClassId = 80;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_consumerTag;
+ public bool m_noLocal;
+ public bool m_exclusive;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_filter;
+
+ ushort IStreamConsume.Ticket { get { return m_ticket; } }
+ string IStreamConsume.Queue { get { return m_queue; } }
+ string IStreamConsume.ConsumerTag { get { return m_consumerTag; } }
+ bool IStreamConsume.NoLocal { get { return m_noLocal; } }
+ bool IStreamConsume.Exclusive { get { return m_exclusive; } }
+ bool IStreamConsume.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IStreamConsume.Filter { get { return m_filter; } }
+
+ public StreamConsume() {}
+ public StreamConsume(
+ ushort initTicket,
+ string initQueue,
+ string initConsumerTag,
+ bool initNoLocal,
+ bool initExclusive,
+ bool initNowait,
+ System.Collections.IDictionary initFilter)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_consumerTag = initConsumerTag;
+ m_noLocal = initNoLocal;
+ m_exclusive = initExclusive;
+ m_nowait = initNowait;
+ m_filter = initFilter;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "stream.consume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_consumerTag = reader.ReadShortstr();
+ m_noLocal = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ m_filter = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_noLocal);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_filter);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_noLocal); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_filter);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamConsumeOk: RabbitMQ.Client.Impl.MethodBase, IStreamConsumeOk {
+ public const int ClassId = 80;
+ public const int MethodId = 21;
+
+ public string m_consumerTag;
+
+ string IStreamConsumeOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public StreamConsumeOk() {}
+ public StreamConsumeOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "stream.consume-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamCancel: RabbitMQ.Client.Impl.MethodBase, IStreamCancel {
+ public const int ClassId = 80;
+ public const int MethodId = 30;
+
+ public string m_consumerTag;
+ public bool m_nowait;
+
+ string IStreamCancel.ConsumerTag { get { return m_consumerTag; } }
+ bool IStreamCancel.Nowait { get { return m_nowait; } }
+
+ public StreamCancel() {}
+ public StreamCancel(
+ string initConsumerTag,
+ bool initNowait)
+ {
+ m_consumerTag = initConsumerTag;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "stream.cancel"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamCancelOk: RabbitMQ.Client.Impl.MethodBase, IStreamCancelOk {
+ public const int ClassId = 80;
+ public const int MethodId = 31;
+
+ public string m_consumerTag;
+
+ string IStreamCancelOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public StreamCancelOk() {}
+ public StreamCancelOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "stream.cancel-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamPublish: RabbitMQ.Client.Impl.MethodBase, IStreamPublish {
+ public const int ClassId = 80;
+ public const int MethodId = 40;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_mandatory;
+ public bool m_immediate;
+
+ ushort IStreamPublish.Ticket { get { return m_ticket; } }
+ string IStreamPublish.Exchange { get { return m_exchange; } }
+ string IStreamPublish.RoutingKey { get { return m_routingKey; } }
+ bool IStreamPublish.Mandatory { get { return m_mandatory; } }
+ bool IStreamPublish.Immediate { get { return m_immediate; } }
+
+ public StreamPublish() {}
+ public StreamPublish(
+ ushort initTicket,
+ string initExchange,
+ string initRoutingKey,
+ bool initMandatory,
+ bool initImmediate)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_mandatory = initMandatory;
+ m_immediate = initImmediate;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "stream.publish"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_mandatory = reader.ReadBit();
+ m_immediate = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_mandatory);
+ writer.WriteBit(m_immediate);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_mandatory); sb.Append(",");
+ sb.Append(m_immediate);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamReturn: RabbitMQ.Client.Impl.MethodBase, IStreamReturn {
+ public const int ClassId = 80;
+ public const int MethodId = 50;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public string m_exchange;
+ public string m_routingKey;
+
+ ushort IStreamReturn.ReplyCode { get { return m_replyCode; } }
+ string IStreamReturn.ReplyText { get { return m_replyText; } }
+ string IStreamReturn.Exchange { get { return m_exchange; } }
+ string IStreamReturn.RoutingKey { get { return m_routingKey; } }
+
+ public StreamReturn() {}
+ public StreamReturn(
+ ushort initReplyCode,
+ string initReplyText,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "stream.return"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamDeliver: RabbitMQ.Client.Impl.MethodBase, IStreamDeliver {
+ public const int ClassId = 80;
+ public const int MethodId = 60;
+
+ public string m_consumerTag;
+ public ulong m_deliveryTag;
+ public string m_exchange;
+ public string m_queue;
+
+ string IStreamDeliver.ConsumerTag { get { return m_consumerTag; } }
+ ulong IStreamDeliver.DeliveryTag { get { return m_deliveryTag; } }
+ string IStreamDeliver.Exchange { get { return m_exchange; } }
+ string IStreamDeliver.Queue { get { return m_queue; } }
+
+ public StreamDeliver() {}
+ public StreamDeliver(
+ string initConsumerTag,
+ ulong initDeliveryTag,
+ string initExchange,
+ string initQueue)
+ {
+ m_consumerTag = initConsumerTag;
+ m_deliveryTag = initDeliveryTag;
+ m_exchange = initExchange;
+ m_queue = initQueue;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "stream.deliver"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_deliveryTag = reader.ReadLonglong();
+ m_exchange = reader.ReadShortstr();
+ m_queue = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_queue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_queue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxSelect: RabbitMQ.Client.Impl.MethodBase, ITxSelect {
+ public const int ClassId = 90;
+ public const int MethodId = 10;
+
+
+
+ public TxSelect(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "tx.select"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxSelectOk: RabbitMQ.Client.Impl.MethodBase, ITxSelectOk {
+ public const int ClassId = 90;
+ public const int MethodId = 11;
+
+
+
+ public TxSelectOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "tx.select-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxCommit: RabbitMQ.Client.Impl.MethodBase, ITxCommit {
+ public const int ClassId = 90;
+ public const int MethodId = 20;
+
+
+
+ public TxCommit(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "tx.commit"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxCommitOk: RabbitMQ.Client.Impl.MethodBase, ITxCommitOk {
+ public const int ClassId = 90;
+ public const int MethodId = 21;
+
+
+
+ public TxCommitOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "tx.commit-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxRollback: RabbitMQ.Client.Impl.MethodBase, ITxRollback {
+ public const int ClassId = 90;
+ public const int MethodId = 30;
+
+
+
+ public TxRollback(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "tx.rollback"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxRollbackOk: RabbitMQ.Client.Impl.MethodBase, ITxRollbackOk {
+ public const int ClassId = 90;
+ public const int MethodId = 31;
+
+
+
+ public TxRollbackOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "tx.rollback-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxSelect: RabbitMQ.Client.Impl.MethodBase, IDtxSelect {
+ public const int ClassId = 100;
+ public const int MethodId = 10;
+
+
+
+ public DtxSelect(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "dtx.select"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxSelectOk: RabbitMQ.Client.Impl.MethodBase, IDtxSelectOk {
+ public const int ClassId = 100;
+ public const int MethodId = 11;
+
+
+
+ public DtxSelectOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "dtx.select-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxStart: RabbitMQ.Client.Impl.MethodBase, IDtxStart {
+ public const int ClassId = 100;
+ public const int MethodId = 20;
+
+ public string m_dtxIdentifier;
+
+ string IDtxStart.DtxIdentifier { get { return m_dtxIdentifier; } }
+
+ public DtxStart() {}
+ public DtxStart(
+ string initDtxIdentifier)
+ {
+ m_dtxIdentifier = initDtxIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "dtx.start"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_dtxIdentifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_dtxIdentifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_dtxIdentifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxStartOk: RabbitMQ.Client.Impl.MethodBase, IDtxStartOk {
+ public const int ClassId = 100;
+ public const int MethodId = 21;
+
+
+
+ public DtxStartOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "dtx.start-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TunnelRequest: RabbitMQ.Client.Impl.MethodBase, ITunnelRequest {
+ public const int ClassId = 110;
+ public const int MethodId = 10;
+
+ public System.Collections.IDictionary m_metaData;
+
+ System.Collections.IDictionary ITunnelRequest.MetaData { get { return m_metaData; } }
+
+ public TunnelRequest() {}
+ public TunnelRequest(
+ System.Collections.IDictionary initMetaData)
+ {
+ m_metaData = initMetaData;
+ }
+
+ public override int ProtocolClassId { get { return 110; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "tunnel.request"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_metaData = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteTable(m_metaData);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_metaData);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageTransfer: RabbitMQ.Client.Impl.MethodBase, IMessageTransfer {
+ public const int ClassId = 120;
+ public const int MethodId = 10;
+
+ public ushort m_ticket;
+ public string m_destination;
+ public bool m_redelivered;
+ public bool m_immediate;
+ public ulong m_ttl;
+ public byte m_priority;
+ public AmqpTimestamp m_timestamp;
+ public byte m_deliveryMode;
+ public AmqpTimestamp m_expiration;
+ public string m_exchange;
+ public string m_routingKey;
+ public string m_messageId;
+ public string m_correlationId;
+ public string m_replyTo;
+ public string m_contentType;
+ public string m_contentEncoding;
+ public string m_userId;
+ public string m_appId;
+ public string m_transactionId;
+ public byte[] m_securityToken;
+ public System.Collections.IDictionary m_applicationHeaders;
+ public byte[] m_body;
+
+ ushort IMessageTransfer.Ticket { get { return m_ticket; } }
+ string IMessageTransfer.Destination { get { return m_destination; } }
+ bool IMessageTransfer.Redelivered { get { return m_redelivered; } }
+ bool IMessageTransfer.Immediate { get { return m_immediate; } }
+ ulong IMessageTransfer.Ttl { get { return m_ttl; } }
+ byte IMessageTransfer.Priority { get { return m_priority; } }
+ AmqpTimestamp IMessageTransfer.Timestamp { get { return m_timestamp; } }
+ byte IMessageTransfer.DeliveryMode { get { return m_deliveryMode; } }
+ AmqpTimestamp IMessageTransfer.Expiration { get { return m_expiration; } }
+ string IMessageTransfer.Exchange { get { return m_exchange; } }
+ string IMessageTransfer.RoutingKey { get { return m_routingKey; } }
+ string IMessageTransfer.MessageId { get { return m_messageId; } }
+ string IMessageTransfer.CorrelationId { get { return m_correlationId; } }
+ string IMessageTransfer.ReplyTo { get { return m_replyTo; } }
+ string IMessageTransfer.ContentType { get { return m_contentType; } }
+ string IMessageTransfer.ContentEncoding { get { return m_contentEncoding; } }
+ string IMessageTransfer.UserId { get { return m_userId; } }
+ string IMessageTransfer.AppId { get { return m_appId; } }
+ string IMessageTransfer.TransactionId { get { return m_transactionId; } }
+ byte[] IMessageTransfer.SecurityToken { get { return m_securityToken; } }
+ System.Collections.IDictionary IMessageTransfer.ApplicationHeaders { get { return m_applicationHeaders; } }
+ byte[] IMessageTransfer.Body { get { return m_body; } }
+
+ public MessageTransfer() {}
+ public MessageTransfer(
+ ushort initTicket,
+ string initDestination,
+ bool initRedelivered,
+ bool initImmediate,
+ ulong initTtl,
+ byte initPriority,
+ AmqpTimestamp initTimestamp,
+ byte initDeliveryMode,
+ AmqpTimestamp initExpiration,
+ string initExchange,
+ string initRoutingKey,
+ string initMessageId,
+ string initCorrelationId,
+ string initReplyTo,
+ string initContentType,
+ string initContentEncoding,
+ string initUserId,
+ string initAppId,
+ string initTransactionId,
+ byte[] initSecurityToken,
+ System.Collections.IDictionary initApplicationHeaders,
+ byte[] initBody)
+ {
+ m_ticket = initTicket;
+ m_destination = initDestination;
+ m_redelivered = initRedelivered;
+ m_immediate = initImmediate;
+ m_ttl = initTtl;
+ m_priority = initPriority;
+ m_timestamp = initTimestamp;
+ m_deliveryMode = initDeliveryMode;
+ m_expiration = initExpiration;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_messageId = initMessageId;
+ m_correlationId = initCorrelationId;
+ m_replyTo = initReplyTo;
+ m_contentType = initContentType;
+ m_contentEncoding = initContentEncoding;
+ m_userId = initUserId;
+ m_appId = initAppId;
+ m_transactionId = initTransactionId;
+ m_securityToken = initSecurityToken;
+ m_applicationHeaders = initApplicationHeaders;
+ m_body = initBody;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "message.transfer"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_destination = reader.ReadShortstr();
+ m_redelivered = reader.ReadBit();
+ m_immediate = reader.ReadBit();
+ m_ttl = reader.ReadLonglong();
+ m_priority = reader.ReadOctet();
+ m_timestamp = reader.ReadTimestamp();
+ m_deliveryMode = reader.ReadOctet();
+ m_expiration = reader.ReadTimestamp();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_messageId = reader.ReadShortstr();
+ m_correlationId = reader.ReadShortstr();
+ m_replyTo = reader.ReadShortstr();
+ m_contentType = reader.ReadShortstr();
+ m_contentEncoding = reader.ReadShortstr();
+ m_userId = reader.ReadShortstr();
+ m_appId = reader.ReadShortstr();
+ m_transactionId = reader.ReadShortstr();
+ m_securityToken = reader.ReadLongstr();
+ m_applicationHeaders = reader.ReadTable();
+ m_body = reader.ReadContent();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_destination);
+ writer.WriteBit(m_redelivered);
+ writer.WriteBit(m_immediate);
+ writer.WriteLonglong(m_ttl);
+ writer.WriteOctet(m_priority);
+ writer.WriteTimestamp(m_timestamp);
+ writer.WriteOctet(m_deliveryMode);
+ writer.WriteTimestamp(m_expiration);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteShortstr(m_messageId);
+ writer.WriteShortstr(m_correlationId);
+ writer.WriteShortstr(m_replyTo);
+ writer.WriteShortstr(m_contentType);
+ writer.WriteShortstr(m_contentEncoding);
+ writer.WriteShortstr(m_userId);
+ writer.WriteShortstr(m_appId);
+ writer.WriteShortstr(m_transactionId);
+ writer.WriteLongstr(m_securityToken);
+ writer.WriteTable(m_applicationHeaders);
+ writer.WriteContent(m_body);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_destination); sb.Append(",");
+ sb.Append(m_redelivered); sb.Append(",");
+ sb.Append(m_immediate); sb.Append(",");
+ sb.Append(m_ttl); sb.Append(",");
+ sb.Append(m_priority); sb.Append(",");
+ sb.Append(m_timestamp); sb.Append(",");
+ sb.Append(m_deliveryMode); sb.Append(",");
+ sb.Append(m_expiration); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_messageId); sb.Append(",");
+ sb.Append(m_correlationId); sb.Append(",");
+ sb.Append(m_replyTo); sb.Append(",");
+ sb.Append(m_contentType); sb.Append(",");
+ sb.Append(m_contentEncoding); sb.Append(",");
+ sb.Append(m_userId); sb.Append(",");
+ sb.Append(m_appId); sb.Append(",");
+ sb.Append(m_transactionId); sb.Append(",");
+ sb.Append(m_securityToken); sb.Append(",");
+ sb.Append(m_applicationHeaders); sb.Append(",");
+ sb.Append(m_body);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageConsume: RabbitMQ.Client.Impl.MethodBase, IMessageConsume {
+ public const int ClassId = 120;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_destination;
+ public bool m_noLocal;
+ public bool m_noAck;
+ public bool m_exclusive;
+ public System.Collections.IDictionary m_filter;
+
+ ushort IMessageConsume.Ticket { get { return m_ticket; } }
+ string IMessageConsume.Queue { get { return m_queue; } }
+ string IMessageConsume.Destination { get { return m_destination; } }
+ bool IMessageConsume.NoLocal { get { return m_noLocal; } }
+ bool IMessageConsume.NoAck { get { return m_noAck; } }
+ bool IMessageConsume.Exclusive { get { return m_exclusive; } }
+ System.Collections.IDictionary IMessageConsume.Filter { get { return m_filter; } }
+
+ public MessageConsume() {}
+ public MessageConsume(
+ ushort initTicket,
+ string initQueue,
+ string initDestination,
+ bool initNoLocal,
+ bool initNoAck,
+ bool initExclusive,
+ System.Collections.IDictionary initFilter)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_destination = initDestination;
+ m_noLocal = initNoLocal;
+ m_noAck = initNoAck;
+ m_exclusive = initExclusive;
+ m_filter = initFilter;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "message.consume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_destination = reader.ReadShortstr();
+ m_noLocal = reader.ReadBit();
+ m_noAck = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_filter = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_destination);
+ writer.WriteBit(m_noLocal);
+ writer.WriteBit(m_noAck);
+ writer.WriteBit(m_exclusive);
+ writer.WriteTable(m_filter);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_destination); sb.Append(",");
+ sb.Append(m_noLocal); sb.Append(",");
+ sb.Append(m_noAck); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_filter);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageCancel: RabbitMQ.Client.Impl.MethodBase, IMessageCancel {
+ public const int ClassId = 120;
+ public const int MethodId = 30;
+
+ public string m_destination;
+
+ string IMessageCancel.Destination { get { return m_destination; } }
+
+ public MessageCancel() {}
+ public MessageCancel(
+ string initDestination)
+ {
+ m_destination = initDestination;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "message.cancel"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_destination = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_destination);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_destination);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageGet: RabbitMQ.Client.Impl.MethodBase, IMessageGet {
+ public const int ClassId = 120;
+ public const int MethodId = 40;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_destination;
+ public bool m_noAck;
+
+ ushort IMessageGet.Ticket { get { return m_ticket; } }
+ string IMessageGet.Queue { get { return m_queue; } }
+ string IMessageGet.Destination { get { return m_destination; } }
+ bool IMessageGet.NoAck { get { return m_noAck; } }
+
+ public MessageGet() {}
+ public MessageGet(
+ ushort initTicket,
+ string initQueue,
+ string initDestination,
+ bool initNoAck)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_destination = initDestination;
+ m_noAck = initNoAck;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "message.get"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_destination = reader.ReadShortstr();
+ m_noAck = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_destination);
+ writer.WriteBit(m_noAck);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_destination); sb.Append(",");
+ sb.Append(m_noAck);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageRecover: RabbitMQ.Client.Impl.MethodBase, IMessageRecover {
+ public const int ClassId = 120;
+ public const int MethodId = 50;
+
+ public bool m_requeue;
+
+ bool IMessageRecover.Requeue { get { return m_requeue; } }
+
+ public MessageRecover() {}
+ public MessageRecover(
+ bool initRequeue)
+ {
+ m_requeue = initRequeue;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "message.recover"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_requeue = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteBit(m_requeue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_requeue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageOpen: RabbitMQ.Client.Impl.MethodBase, IMessageOpen {
+ public const int ClassId = 120;
+ public const int MethodId = 60;
+
+ public byte[] m_reference;
+
+ byte[] IMessageOpen.Reference { get { return m_reference; } }
+
+ public MessageOpen() {}
+ public MessageOpen(
+ byte[] initReference)
+ {
+ m_reference = initReference;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "message.open"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_reference = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_reference);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_reference);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageClose: RabbitMQ.Client.Impl.MethodBase, IMessageClose {
+ public const int ClassId = 120;
+ public const int MethodId = 70;
+
+ public byte[] m_reference;
+
+ byte[] IMessageClose.Reference { get { return m_reference; } }
+
+ public MessageClose() {}
+ public MessageClose(
+ byte[] initReference)
+ {
+ m_reference = initReference;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 70; } }
+ public override string ProtocolMethodName { get { return "message.close"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_reference = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_reference);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_reference);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageAppend: RabbitMQ.Client.Impl.MethodBase, IMessageAppend {
+ public const int ClassId = 120;
+ public const int MethodId = 80;
+
+ public byte[] m_reference;
+ public byte[] m_bytes;
+
+ byte[] IMessageAppend.Reference { get { return m_reference; } }
+ byte[] IMessageAppend.Bytes { get { return m_bytes; } }
+
+ public MessageAppend() {}
+ public MessageAppend(
+ byte[] initReference,
+ byte[] initBytes)
+ {
+ m_reference = initReference;
+ m_bytes = initBytes;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 80; } }
+ public override string ProtocolMethodName { get { return "message.append"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_reference = reader.ReadLongstr();
+ m_bytes = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_reference);
+ writer.WriteLongstr(m_bytes);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_reference); sb.Append(",");
+ sb.Append(m_bytes);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageCheckpoint: RabbitMQ.Client.Impl.MethodBase, IMessageCheckpoint {
+ public const int ClassId = 120;
+ public const int MethodId = 90;
+
+ public byte[] m_reference;
+ public string m_identifier;
+
+ byte[] IMessageCheckpoint.Reference { get { return m_reference; } }
+ string IMessageCheckpoint.Identifier { get { return m_identifier; } }
+
+ public MessageCheckpoint() {}
+ public MessageCheckpoint(
+ byte[] initReference,
+ string initIdentifier)
+ {
+ m_reference = initReference;
+ m_identifier = initIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 90; } }
+ public override string ProtocolMethodName { get { return "message.checkpoint"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_reference = reader.ReadLongstr();
+ m_identifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_reference);
+ writer.WriteShortstr(m_identifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_reference); sb.Append(",");
+ sb.Append(m_identifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageResume: RabbitMQ.Client.Impl.MethodBase, IMessageResume {
+ public const int ClassId = 120;
+ public const int MethodId = 100;
+
+ public byte[] m_reference;
+ public string m_identifier;
+
+ byte[] IMessageResume.Reference { get { return m_reference; } }
+ string IMessageResume.Identifier { get { return m_identifier; } }
+
+ public MessageResume() {}
+ public MessageResume(
+ byte[] initReference,
+ string initIdentifier)
+ {
+ m_reference = initReference;
+ m_identifier = initIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 100; } }
+ public override string ProtocolMethodName { get { return "message.resume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_reference = reader.ReadLongstr();
+ m_identifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_reference);
+ writer.WriteShortstr(m_identifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_reference); sb.Append(",");
+ sb.Append(m_identifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageQos: RabbitMQ.Client.Impl.MethodBase, IMessageQos {
+ public const int ClassId = 120;
+ public const int MethodId = 110;
+
+ public uint m_prefetchSize;
+ public ushort m_prefetchCount;
+ public bool m_global;
+
+ uint IMessageQos.PrefetchSize { get { return m_prefetchSize; } }
+ ushort IMessageQos.PrefetchCount { get { return m_prefetchCount; } }
+ bool IMessageQos.Global { get { return m_global; } }
+
+ public MessageQos() {}
+ public MessageQos(
+ uint initPrefetchSize,
+ ushort initPrefetchCount,
+ bool initGlobal)
+ {
+ m_prefetchSize = initPrefetchSize;
+ m_prefetchCount = initPrefetchCount;
+ m_global = initGlobal;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 110; } }
+ public override string ProtocolMethodName { get { return "message.qos"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_prefetchSize = reader.ReadLong();
+ m_prefetchCount = reader.ReadShort();
+ m_global = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_prefetchSize);
+ writer.WriteShort(m_prefetchCount);
+ writer.WriteBit(m_global);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_prefetchSize); sb.Append(",");
+ sb.Append(m_prefetchCount); sb.Append(",");
+ sb.Append(m_global);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageOk: RabbitMQ.Client.Impl.MethodBase, IMessageOk {
+ public const int ClassId = 120;
+ public const int MethodId = 500;
+
+
+
+ public MessageOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 500; } }
+ public override string ProtocolMethodName { get { return "message.ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageEmpty: RabbitMQ.Client.Impl.MethodBase, IMessageEmpty {
+ public const int ClassId = 120;
+ public const int MethodId = 510;
+
+
+
+ public MessageEmpty(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 510; } }
+ public override string ProtocolMethodName { get { return "message.empty"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageReject: RabbitMQ.Client.Impl.MethodBase, IMessageReject {
+ public const int ClassId = 120;
+ public const int MethodId = 520;
+
+ public ushort m_code;
+ public string m_text;
+
+ ushort IMessageReject.Code { get { return m_code; } }
+ string IMessageReject.Text { get { return m_text; } }
+
+ public MessageReject() {}
+ public MessageReject(
+ ushort initCode,
+ string initText)
+ {
+ m_code = initCode;
+ m_text = initText;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 520; } }
+ public override string ProtocolMethodName { get { return "message.reject"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_code = reader.ReadShort();
+ m_text = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_code);
+ writer.WriteShortstr(m_text);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_code); sb.Append(",");
+ sb.Append(m_text);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class MessageOffset: RabbitMQ.Client.Impl.MethodBase, IMessageOffset {
+ public const int ClassId = 120;
+ public const int MethodId = 530;
+
+ public ulong m_value;
+
+ ulong IMessageOffset.Value { get { return m_value; } }
+
+ public MessageOffset() {}
+ public MessageOffset(
+ ulong initValue)
+ {
+ m_value = initValue;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 530; } }
+ public override string ProtocolMethodName { get { return "message.offset"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_value = reader.ReadLonglong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_value);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_value);
+ sb.Append(")");
+ }
+ }
+
+ public class Model: RabbitMQ.Client.Impl.ModelBase {
+ public Model(RabbitMQ.Client.Impl.ISession session): base(session) {}
+ public override System.UInt16 _Private_AccessRequest(
+ System.String @realm,
+ System.Boolean @exclusive,
+ System.Boolean @passive,
+ System.Boolean @active,
+ System.Boolean @write,
+ System.Boolean @read)
+ {
+ AccessRequest __req = new AccessRequest();
+ __req.m_realm = @realm;
+ __req.m_exclusive = @exclusive;
+ __req.m_passive = @passive;
+ __req.m_active = @active;
+ __req.m_write = @write;
+ __req.m_read = @read;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ AccessRequestOk __rep = __repBase as AccessRequestOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_ticket;
+ }
+ public override void _Private_BasicPublish(
+ System.UInt16 @ticket,
+ System.String @exchange,
+ System.String @routingKey,
+ System.Boolean @mandatory,
+ System.Boolean @immediate,
+ RabbitMQ.Client.IBasicProperties @basicProperties,
+ System.Byte[] @body)
+ {
+ BasicPublish __req = new BasicPublish();
+ __req.m_ticket = @ticket;
+ __req.m_exchange = @exchange;
+ __req.m_routingKey = @routingKey;
+ __req.m_mandatory = @mandatory;
+ __req.m_immediate = @immediate;
+ ModelSend(__req, (BasicProperties) basicProperties,body);
+ }
+ public override void _Private_BasicConsume(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.String @consumerTag,
+ System.Boolean @noLocal,
+ System.Boolean @noAck,
+ System.Boolean @exclusive,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @filter)
+ {
+ BasicConsume __req = new BasicConsume();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_consumerTag = @consumerTag;
+ __req.m_noLocal = @noLocal;
+ __req.m_noAck = @noAck;
+ __req.m_exclusive = @exclusive;
+ __req.m_nowait = @nowait;
+ __req.m_filter = @filter;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_BasicCancel(
+ System.String @consumerTag,
+ System.Boolean @nowait)
+ {
+ BasicCancel __req = new BasicCancel();
+ __req.m_consumerTag = @consumerTag;
+ __req.m_nowait = @nowait;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ChannelOpen(
+ System.String @outOfBand)
+ {
+ ChannelOpen __req = new ChannelOpen();
+ __req.m_outOfBand = @outOfBand;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ChannelOpenOk __rep = __repBase as ChannelOpenOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void _Private_ChannelCloseOk()
+ {
+ ChannelCloseOk __req = new ChannelCloseOk();
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ChannelClose(
+ System.UInt16 @replyCode,
+ System.String @replyText,
+ System.UInt16 @classId,
+ System.UInt16 @methodId)
+ {
+ ChannelClose __req = new ChannelClose();
+ __req.m_replyCode = @replyCode;
+ __req.m_replyText = @replyText;
+ __req.m_classId = @classId;
+ __req.m_methodId = @methodId;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_BasicGet(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @noAck)
+ {
+ BasicGet __req = new BasicGet();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_noAck = @noAck;
+ ModelSend(__req,null,null);
+ }
+ public override RabbitMQ.Client.Impl.ConnectionTuneDetails ConnectionStartOk(
+ System.Collections.IDictionary @clientProperties,
+ System.String @mechanism,
+ System.Byte[] @response,
+ System.String @locale)
+ {
+ ConnectionStartOk __req = new ConnectionStartOk();
+ __req.m_clientProperties = @clientProperties;
+ __req.m_mechanism = @mechanism;
+ __req.m_response = @response;
+ __req.m_locale = @locale;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ConnectionTune __rep = __repBase as ConnectionTune;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ RabbitMQ.Client.Impl.ConnectionTuneDetails __result = new RabbitMQ.Client.Impl.ConnectionTuneDetails();
+ __result.channelMax = __rep.m_channelMax;
+ __result.frameMax = __rep.m_frameMax;
+ __result.heartbeat = __rep.m_heartbeat;
+ return __result;
+ }
+ public override void ConnectionTuneOk(
+ System.UInt16 @channelMax,
+ System.UInt32 @frameMax,
+ System.UInt16 @heartbeat)
+ {
+ ConnectionTuneOk __req = new ConnectionTuneOk();
+ __req.m_channelMax = @channelMax;
+ __req.m_frameMax = @frameMax;
+ __req.m_heartbeat = @heartbeat;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ConnectionOpen(
+ System.String @virtualHost,
+ System.String @capabilities,
+ System.Boolean @insist)
+ {
+ ConnectionOpen __req = new ConnectionOpen();
+ __req.m_virtualHost = @virtualHost;
+ __req.m_capabilities = @capabilities;
+ __req.m_insist = @insist;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ConnectionClose(
+ System.UInt16 @replyCode,
+ System.String @replyText,
+ System.UInt16 @classId,
+ System.UInt16 @methodId)
+ {
+ ConnectionClose __req = new ConnectionClose();
+ __req.m_replyCode = @replyCode;
+ __req.m_replyText = @replyText;
+ __req.m_classId = @classId;
+ __req.m_methodId = @methodId;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ConnectionCloseOk __rep = __repBase as ConnectionCloseOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void _Private_ConnectionCloseOk()
+ {
+ ConnectionCloseOk __req = new ConnectionCloseOk();
+ ModelSend(__req,null,null);
+ }
+ public override RabbitMQ.Client.IBasicProperties CreateBasicProperties()
+ {
+ return new BasicProperties();
+ }
+ public override RabbitMQ.Client.IFileProperties CreateFileProperties()
+ {
+ return new FileProperties();
+ }
+ public override RabbitMQ.Client.IStreamProperties CreateStreamProperties()
+ {
+ return new StreamProperties();
+ }
+ public override void ChannelFlow(
+ System.Boolean @active)
+ {
+ ChannelFlow __req = new ChannelFlow();
+ __req.m_active = @active;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ChannelFlowOk __rep = __repBase as ChannelFlowOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void ExchangeDeclare(
+ System.UInt16 @ticket,
+ System.String @exchange,
+ System.String @type,
+ System.Boolean @passive,
+ System.Boolean @durable,
+ System.Boolean @autoDelete,
+ System.Boolean @internal,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @arguments)
+ {
+ ExchangeDeclare __req = new ExchangeDeclare();
+ __req.m_ticket = @ticket;
+ __req.m_exchange = @exchange;
+ __req.m_type = @type;
+ __req.m_passive = @passive;
+ __req.m_durable = @durable;
+ __req.m_autoDelete = @autoDelete;
+ __req.m_internal = @internal;
+ __req.m_nowait = @nowait;
+ __req.m_arguments = @arguments;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ExchangeDeclareOk __rep = __repBase as ExchangeDeclareOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void ExchangeDelete(
+ System.UInt16 @ticket,
+ System.String @exchange,
+ System.Boolean @ifUnused,
+ System.Boolean @nowait)
+ {
+ ExchangeDelete __req = new ExchangeDelete();
+ __req.m_ticket = @ticket;
+ __req.m_exchange = @exchange;
+ __req.m_ifUnused = @ifUnused;
+ __req.m_nowait = @nowait;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ExchangeDeleteOk __rep = __repBase as ExchangeDeleteOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override System.String QueueDeclare(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @passive,
+ System.Boolean @durable,
+ System.Boolean @exclusive,
+ System.Boolean @autoDelete,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @arguments)
+ {
+ QueueDeclare __req = new QueueDeclare();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_passive = @passive;
+ __req.m_durable = @durable;
+ __req.m_exclusive = @exclusive;
+ __req.m_autoDelete = @autoDelete;
+ __req.m_nowait = @nowait;
+ __req.m_arguments = @arguments;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ return null;
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueueDeclareOk __rep = __repBase as QueueDeclareOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_queue;
+ }
+ public override void QueueBind(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.String @exchange,
+ System.String @routingKey,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @arguments)
+ {
+ QueueBind __req = new QueueBind();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_exchange = @exchange;
+ __req.m_routingKey = @routingKey;
+ __req.m_nowait = @nowait;
+ __req.m_arguments = @arguments;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueueBindOk __rep = __repBase as QueueBindOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void QueueUnbind(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.String @exchange,
+ System.String @routingKey,
+ System.Collections.IDictionary @arguments)
+ {
+ QueueUnbind __req = new QueueUnbind();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_exchange = @exchange;
+ __req.m_routingKey = @routingKey;
+ __req.m_arguments = @arguments;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueueUnbindOk __rep = __repBase as QueueUnbindOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override System.UInt32 QueuePurge(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @nowait)
+ {
+ QueuePurge __req = new QueuePurge();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_nowait = @nowait;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ return 0xFFFFFFFF;
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueuePurgeOk __rep = __repBase as QueuePurgeOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_messageCount;
+ }
+ public override System.UInt32 QueueDelete(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @ifUnused,
+ System.Boolean @ifEmpty,
+ System.Boolean @nowait)
+ {
+ QueueDelete __req = new QueueDelete();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_ifUnused = @ifUnused;
+ __req.m_ifEmpty = @ifEmpty;
+ __req.m_nowait = @nowait;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ return 0xFFFFFFFF;
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueueDeleteOk __rep = __repBase as QueueDeleteOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_messageCount;
+ }
+ public override void BasicQos(
+ System.UInt32 @prefetchSize,
+ System.UInt16 @prefetchCount,
+ System.Boolean @global)
+ {
+ BasicQos __req = new BasicQos();
+ __req.m_prefetchSize = @prefetchSize;
+ __req.m_prefetchCount = @prefetchCount;
+ __req.m_global = @global;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ BasicQosOk __rep = __repBase as BasicQosOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void BasicAck(
+ System.UInt64 @deliveryTag,
+ System.Boolean @multiple)
+ {
+ BasicAck __req = new BasicAck();
+ __req.m_deliveryTag = @deliveryTag;
+ __req.m_multiple = @multiple;
+ ModelSend(__req,null,null);
+ }
+ public override void BasicReject(
+ System.UInt64 @deliveryTag,
+ System.Boolean @requeue)
+ {
+ BasicReject __req = new BasicReject();
+ __req.m_deliveryTag = @deliveryTag;
+ __req.m_requeue = @requeue;
+ ModelSend(__req,null,null);
+ }
+ public override void BasicRecover(
+ System.Boolean @requeue)
+ {
+ BasicRecover __req = new BasicRecover();
+ __req.m_requeue = @requeue;
+ ModelSend(__req,null,null);
+ }
+ public override void TxSelect()
+ {
+ TxSelect __req = new TxSelect();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ TxSelectOk __rep = __repBase as TxSelectOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void TxCommit()
+ {
+ TxCommit __req = new TxCommit();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ TxCommitOk __rep = __repBase as TxCommitOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void TxRollback()
+ {
+ TxRollback __req = new TxRollback();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ TxRollbackOk __rep = __repBase as TxRollbackOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void DtxSelect()
+ {
+ DtxSelect __req = new DtxSelect();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ DtxSelectOk __rep = __repBase as DtxSelectOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void DtxStart(
+ System.String @dtxIdentifier)
+ {
+ DtxStart __req = new DtxStart();
+ __req.m_dtxIdentifier = @dtxIdentifier;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ DtxStartOk __rep = __repBase as DtxStartOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override bool DispatchAsynchronous(RabbitMQ.Client.Impl.Command cmd) {
+ RabbitMQ.Client.Impl.MethodBase __method = (RabbitMQ.Client.Impl.MethodBase) cmd.Method;
+ switch ((__method.ProtocolClassId << 16) | __method.ProtocolMethodId) {
+ case 3932181: {
+ BasicConsumeOk __impl = (BasicConsumeOk) __method;
+ HandleBasicConsumeOk(
+ __impl.m_consumerTag);
+ return true;
+ }
+ case 3932191: {
+ BasicCancelOk __impl = (BasicCancelOk) __method;
+ HandleBasicCancelOk(
+ __impl.m_consumerTag);
+ return true;
+ }
+ case 3932231: {
+ BasicGetOk __impl = (BasicGetOk) __method;
+ HandleBasicGetOk(
+ __impl.m_deliveryTag,
+ __impl.m_redelivered,
+ __impl.m_exchange,
+ __impl.m_routingKey,
+ __impl.m_messageCount,
+ (RabbitMQ.Client.IBasicProperties) cmd.Header,
+ cmd.Body);
+ return true;
+ }
+ case 3932232: {
+ HandleBasicGetEmpty();
+ return true;
+ }
+ case 3932220: {
+ BasicDeliver __impl = (BasicDeliver) __method;
+ HandleBasicDeliver(
+ __impl.m_consumerTag,
+ __impl.m_deliveryTag,
+ __impl.m_redelivered,
+ __impl.m_exchange,
+ __impl.m_routingKey,
+ (RabbitMQ.Client.IBasicProperties) cmd.Header,
+ cmd.Body);
+ return true;
+ }
+ case 3932210: {
+ BasicReturn __impl = (BasicReturn) __method;
+ HandleBasicReturn(
+ __impl.m_replyCode,
+ __impl.m_replyText,
+ __impl.m_exchange,
+ __impl.m_routingKey,
+ (RabbitMQ.Client.IBasicProperties) cmd.Header,
+ cmd.Body);
+ return true;
+ }
+ case 1310760: {
+ ChannelClose __impl = (ChannelClose) __method;
+ HandleChannelClose(
+ __impl.m_replyCode,
+ __impl.m_replyText,
+ __impl.m_classId,
+ __impl.m_methodId);
+ return true;
+ }
+ case 1310761: {
+ HandleChannelCloseOk();
+ return true;
+ }
+ case 655370: {
+ ConnectionStart __impl = (ConnectionStart) __method;
+ HandleConnectionStart(
+ __impl.m_versionMajor,
+ __impl.m_versionMinor,
+ __impl.m_serverProperties,
+ __impl.m_mechanisms,
+ __impl.m_locales);
+ return true;
+ }
+ case 655401: {
+ ConnectionOpenOk __impl = (ConnectionOpenOk) __method;
+ HandleConnectionOpenOk(
+ __impl.m_knownHosts);
+ return true;
+ }
+ case 655402: {
+ ConnectionRedirect __impl = (ConnectionRedirect) __method;
+ HandleConnectionRedirect(
+ __impl.m_host,
+ __impl.m_knownHosts);
+ return true;
+ }
+ case 655410: {
+ ConnectionClose __impl = (ConnectionClose) __method;
+ HandleConnectionClose(
+ __impl.m_replyCode,
+ __impl.m_replyText,
+ __impl.m_classId,
+ __impl.m_methodId);
+ return true;
+ }
+ default: return false;
+ }
+ }
+ }
+}
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-qpid-0-8.cs b/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-qpid-0-8.cs
new file mode 100644
index 0000000..7547c6e
--- /dev/null
+++ b/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-qpid-0-8.cs
@@ -0,0 +1,6401 @@
+// Autogenerated code. Do not edit.
+
+using RabbitMQ.Client;
+using RabbitMQ.Client.Exceptions;
+
+namespace RabbitMQ.Client.Framing.v0_8qpid {
+ public class Protocol: RabbitMQ.Client.Framing.Impl.v0_8qpid.ProtocolBase {
+ ///<summary>Protocol major version (= 8)</summary>
+ public override int MajorVersion { get { return 8; } }
+ ///<summary>Protocol minor version (= 0)</summary>
+ public override int MinorVersion { get { return 0; } }
+ ///<summary>Protocol API name (= AMQP_0_8_QPID)</summary>
+ public override string ApiName { get { return "AMQP_0_8_QPID"; } }
+ ///<summary>Default TCP port (= 5672)</summary>
+ public override int DefaultPort { get { return 5672; } }
+
+ public override RabbitMQ.Client.Impl.MethodBase DecodeMethodFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
+ ushort classId = reader.ReadUInt16();
+ ushort methodId = reader.ReadUInt16();
+
+ switch (classId) {
+ case 10: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionStart result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionStart();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionStartOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionStartOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionSecure result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionSecure();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionSecureOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionSecureOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionTune result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionTune();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionTuneOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionTuneOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionOpen result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionOpen();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionOpenOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionRedirect result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionRedirect();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionClose result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionClose();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 61: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionCloseOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 20: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelOpen result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelOpen();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelOpenOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelFlow result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelFlow();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelFlowOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelFlowOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelAlert result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelAlert();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelClose result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelClose();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelCloseOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 30: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.AccessRequest result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.AccessRequest();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.AccessRequestOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.AccessRequestOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 40: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeclare result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeclare();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeclareOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDelete result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDelete();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeleteOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 22: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeBound result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeBound();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 23: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeBoundOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeBoundOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 50: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeclare result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeclare();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeclareOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueBind result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueBind();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueBindOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueBindOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.QueuePurge result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueuePurge();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.QueuePurgeOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueuePurgeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDelete result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDelete();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeleteOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 60: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicQos result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicQos();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicQosOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicConsume result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicConsume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicConsumeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicCancel result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicCancel();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicCancelOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicPublish result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicPublish();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicReturn result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicReturn();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicDeliver();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 70: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGet result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGet();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 71: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGetOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGetOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 72: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGetEmpty result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGetEmpty();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 80: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicAck result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicAck();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 90: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicReject result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicReject();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 100: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicRecover result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicRecover();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 101: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicRecoverOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicRecoverOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 70: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileQos result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileQos();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileQosOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileConsume result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileConsume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileConsumeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileCancel result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileCancel();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileCancelOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileOpen result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileOpen();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileOpenOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileStage result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileStage();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FilePublish result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FilePublish();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 70: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileReturn result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileReturn();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 80: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileDeliver();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 90: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileAck result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileAck();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 100: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.FileReject result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileReject();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 80: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamQos result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamQos();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamQosOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamConsume result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamConsume();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamConsumeOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamCancel result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamCancel();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamCancelOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamPublish result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamPublish();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 50: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamReturn result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamReturn();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 60: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamDeliver();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 90: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TxSelect result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxSelect();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxSelectOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TxCommit result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxCommit();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TxCommitOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxCommitOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TxRollback result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxRollback();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TxRollbackOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxRollbackOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 100: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxSelect result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxSelect();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxSelectOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxStart result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxStart();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxStartOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxStartOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 110: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TunnelRequest result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TunnelRequest();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ case 120: {
+ switch (methodId) {
+ case 10: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TestInteger result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestInteger();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 11: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TestIntegerOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestIntegerOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 20: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TestString result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestString();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 21: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TestStringOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestStringOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 30: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TestTable result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestTable();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 31: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TestTableOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestTableOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 40: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TestContent result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestContent();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ case 41: {
+ RabbitMQ.Client.Framing.Impl.v0_8qpid.TestContentOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestContentOk();
+ result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
+ return result;
+ }
+ default: break;
+ }
+ break;
+ }
+ default: break;
+ }
+ throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, methodId);
+ }
+
+ public override RabbitMQ.Client.Impl.ContentHeaderBase DecodeContentHeaderFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
+ ushort classId = reader.ReadUInt16();
+
+ switch (classId) {
+ case 60: return new BasicProperties();
+ case 70: return new FileProperties();
+ case 80: return new StreamProperties();
+ case 110: return new TunnelProperties();
+ case 120: return new TestProperties();
+ default: break;
+ }
+ throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, 0);
+ }
+ }
+ public class Constants {
+ ///<summary>(= 1)</summary>
+ public const int FrameMethod = 1;
+ ///<summary>(= 2)</summary>
+ public const int FrameHeader = 2;
+ ///<summary>(= 3)</summary>
+ public const int FrameBody = 3;
+ ///<summary>(= 4)</summary>
+ public const int FrameOobMethod = 4;
+ ///<summary>(= 5)</summary>
+ public const int FrameOobHeader = 5;
+ ///<summary>(= 6)</summary>
+ public const int FrameOobBody = 6;
+ ///<summary>(= 7)</summary>
+ public const int FrameTrace = 7;
+ ///<summary>(= 8)</summary>
+ public const int FrameHeartbeat = 8;
+ ///<summary>(= 4096)</summary>
+ public const int FrameMinSize = 4096;
+ ///<summary>(= 206)</summary>
+ public const int FrameEnd = 206;
+ ///<summary>(= 200)</summary>
+ public const int ReplySuccess = 200;
+ ///<summary>(= 310)</summary>
+ public const int NotDelivered = 310;
+ ///<summary>(= 311)</summary>
+ public const int ContentTooLarge = 311;
+ ///<summary>(= 320)</summary>
+ public const int ConnectionForced = 320;
+ ///<summary>(= 402)</summary>
+ public const int InvalidPath = 402;
+ ///<summary>(= 403)</summary>
+ public const int AccessRefused = 403;
+ ///<summary>(= 404)</summary>
+ public const int NotFound = 404;
+ ///<summary>(= 405)</summary>
+ public const int ResourceLocked = 405;
+ ///<summary>(= 501)</summary>
+ public const int FrameError = 501;
+ ///<summary>(= 502)</summary>
+ public const int SyntaxError = 502;
+ ///<summary>(= 503)</summary>
+ public const int CommandInvalid = 503;
+ ///<summary>(= 504)</summary>
+ public const int ChannelError = 504;
+ ///<summary>(= 506)</summary>
+ public const int ResourceError = 506;
+ ///<summary>(= 530)</summary>
+ public const int NotAllowed = 530;
+ ///<summary>(= 540)</summary>
+ public const int NotImplemented = 540;
+ ///<summary>(= 541)</summary>
+ public const int InternalError = 541;
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.start".</summary>
+ public interface IConnectionStart: IMethod {
+ byte VersionMajor { get; }
+ byte VersionMinor { get; }
+ System.Collections.IDictionary ServerProperties { get; }
+ byte[] Mechanisms { get; }
+ byte[] Locales { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.start-ok".</summary>
+ public interface IConnectionStartOk: IMethod {
+ System.Collections.IDictionary ClientProperties { get; }
+ string Mechanism { get; }
+ byte[] Response { get; }
+ string Locale { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.secure".</summary>
+ public interface IConnectionSecure: IMethod {
+ byte[] Challenge { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.secure-ok".</summary>
+ public interface IConnectionSecureOk: IMethod {
+ byte[] Response { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.tune".</summary>
+ public interface IConnectionTune: IMethod {
+ ushort ChannelMax { get; }
+ uint FrameMax { get; }
+ ushort Heartbeat { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.tune-ok".</summary>
+ public interface IConnectionTuneOk: IMethod {
+ ushort ChannelMax { get; }
+ uint FrameMax { get; }
+ ushort Heartbeat { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.open".</summary>
+ public interface IConnectionOpen: IMethod {
+ string VirtualHost { get; }
+ string Capabilities { get; }
+ bool Insist { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.open-ok".</summary>
+ public interface IConnectionOpenOk: IMethod {
+ string KnownHosts { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.redirect".</summary>
+ public interface IConnectionRedirect: IMethod {
+ string Host { get; }
+ string KnownHosts { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.close".</summary>
+ public interface IConnectionClose: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ ushort ClassId { get; }
+ ushort MethodId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "connection.close-ok".</summary>
+ public interface IConnectionCloseOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.open".</summary>
+ public interface IChannelOpen: IMethod {
+ string OutOfBand { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.open-ok".</summary>
+ public interface IChannelOpenOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.flow".</summary>
+ public interface IChannelFlow: IMethod {
+ bool Active { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.flow-ok".</summary>
+ public interface IChannelFlowOk: IMethod {
+ bool Active { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.alert".</summary>
+ public interface IChannelAlert: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ System.Collections.IDictionary Details { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.close".</summary>
+ public interface IChannelClose: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ ushort ClassId { get; }
+ ushort MethodId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "channel.close-ok".</summary>
+ public interface IChannelCloseOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "access.request".</summary>
+ public interface IAccessRequest: IMethod {
+ string Realm { get; }
+ bool Exclusive { get; }
+ bool Passive { get; }
+ bool Active { get; }
+ bool Write { get; }
+ bool Read { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "access.request-ok".</summary>
+ public interface IAccessRequestOk: IMethod {
+ ushort Ticket { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.declare".</summary>
+ public interface IExchangeDeclare: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string Type { get; }
+ bool Passive { get; }
+ bool Durable { get; }
+ bool AutoDelete { get; }
+ bool Internal { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.declare-ok".</summary>
+ public interface IExchangeDeclareOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.delete".</summary>
+ public interface IExchangeDelete: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ bool IfUnused { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.delete-ok".</summary>
+ public interface IExchangeDeleteOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.bound".</summary>
+ public interface IExchangeBound: IMethod {
+ string Exchange { get; }
+ string RoutingKey { get; }
+ string Queue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "exchange.bound-ok".</summary>
+ public interface IExchangeBoundOk: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.declare".</summary>
+ public interface IQueueDeclare: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool Passive { get; }
+ bool Durable { get; }
+ bool Exclusive { get; }
+ bool AutoDelete { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.declare-ok".</summary>
+ public interface IQueueDeclareOk: IMethod {
+ string Queue { get; }
+ uint MessageCount { get; }
+ uint ConsumerCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.bind".</summary>
+ public interface IQueueBind: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.bind-ok".</summary>
+ public interface IQueueBindOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.purge".</summary>
+ public interface IQueuePurge: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.purge-ok".</summary>
+ public interface IQueuePurgeOk: IMethod {
+ uint MessageCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.delete".</summary>
+ public interface IQueueDelete: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool IfUnused { get; }
+ bool IfEmpty { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "queue.delete-ok".</summary>
+ public interface IQueueDeleteOk: IMethod {
+ uint MessageCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.qos".</summary>
+ public interface IBasicQos: IMethod {
+ uint PrefetchSize { get; }
+ ushort PrefetchCount { get; }
+ bool Global { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.qos-ok".</summary>
+ public interface IBasicQosOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.consume".</summary>
+ public interface IBasicConsume: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string ConsumerTag { get; }
+ bool NoLocal { get; }
+ bool NoAck { get; }
+ bool Exclusive { get; }
+ bool Nowait { get; }
+ System.Collections.IDictionary Arguments { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.consume-ok".</summary>
+ public interface IBasicConsumeOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.cancel".</summary>
+ public interface IBasicCancel: IMethod {
+ string ConsumerTag { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.cancel-ok".</summary>
+ public interface IBasicCancelOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.publish".</summary>
+ public interface IBasicPublish: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Mandatory { get; }
+ bool Immediate { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.return".</summary>
+ public interface IBasicReturn: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.deliver".</summary>
+ public interface IBasicDeliver: IMethod {
+ string ConsumerTag { get; }
+ ulong DeliveryTag { get; }
+ bool Redelivered { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.get".</summary>
+ public interface IBasicGet: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ bool NoAck { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.get-ok".</summary>
+ public interface IBasicGetOk: IMethod {
+ ulong DeliveryTag { get; }
+ bool Redelivered { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ uint MessageCount { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.get-empty".</summary>
+ public interface IBasicGetEmpty: IMethod {
+ string ClusterId { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.ack".</summary>
+ public interface IBasicAck: IMethod {
+ ulong DeliveryTag { get; }
+ bool Multiple { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.reject".</summary>
+ public interface IBasicReject: IMethod {
+ ulong DeliveryTag { get; }
+ bool Requeue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.recover".</summary>
+ public interface IBasicRecover: IMethod {
+ bool Requeue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "basic.recover-ok".</summary>
+ public interface IBasicRecoverOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.qos".</summary>
+ public interface IFileQos: IMethod {
+ uint PrefetchSize { get; }
+ ushort PrefetchCount { get; }
+ bool Global { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.qos-ok".</summary>
+ public interface IFileQosOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.consume".</summary>
+ public interface IFileConsume: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string ConsumerTag { get; }
+ bool NoLocal { get; }
+ bool NoAck { get; }
+ bool Exclusive { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.consume-ok".</summary>
+ public interface IFileConsumeOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.cancel".</summary>
+ public interface IFileCancel: IMethod {
+ string ConsumerTag { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.cancel-ok".</summary>
+ public interface IFileCancelOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.open".</summary>
+ public interface IFileOpen: IMethod {
+ string Identifier { get; }
+ ulong ContentSize { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.open-ok".</summary>
+ public interface IFileOpenOk: IMethod {
+ ulong StagedSize { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.stage".</summary>
+ public interface IFileStage: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.publish".</summary>
+ public interface IFilePublish: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Mandatory { get; }
+ bool Immediate { get; }
+ string Identifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.return".</summary>
+ public interface IFileReturn: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.deliver".</summary>
+ public interface IFileDeliver: IMethod {
+ string ConsumerTag { get; }
+ ulong DeliveryTag { get; }
+ bool Redelivered { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ string Identifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.ack".</summary>
+ public interface IFileAck: IMethod {
+ ulong DeliveryTag { get; }
+ bool Multiple { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "file.reject".</summary>
+ public interface IFileReject: IMethod {
+ ulong DeliveryTag { get; }
+ bool Requeue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.qos".</summary>
+ public interface IStreamQos: IMethod {
+ uint PrefetchSize { get; }
+ ushort PrefetchCount { get; }
+ uint ConsumeRate { get; }
+ bool Global { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.qos-ok".</summary>
+ public interface IStreamQosOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.consume".</summary>
+ public interface IStreamConsume: IMethod {
+ ushort Ticket { get; }
+ string Queue { get; }
+ string ConsumerTag { get; }
+ bool NoLocal { get; }
+ bool Exclusive { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.consume-ok".</summary>
+ public interface IStreamConsumeOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.cancel".</summary>
+ public interface IStreamCancel: IMethod {
+ string ConsumerTag { get; }
+ bool Nowait { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.cancel-ok".</summary>
+ public interface IStreamCancelOk: IMethod {
+ string ConsumerTag { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.publish".</summary>
+ public interface IStreamPublish: IMethod {
+ ushort Ticket { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ bool Mandatory { get; }
+ bool Immediate { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.return".</summary>
+ public interface IStreamReturn: IMethod {
+ ushort ReplyCode { get; }
+ string ReplyText { get; }
+ string Exchange { get; }
+ string RoutingKey { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "stream.deliver".</summary>
+ public interface IStreamDeliver: IMethod {
+ string ConsumerTag { get; }
+ ulong DeliveryTag { get; }
+ string Exchange { get; }
+ string Queue { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.select".</summary>
+ public interface ITxSelect: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.select-ok".</summary>
+ public interface ITxSelectOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.commit".</summary>
+ public interface ITxCommit: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.commit-ok".</summary>
+ public interface ITxCommitOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.rollback".</summary>
+ public interface ITxRollback: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tx.rollback-ok".</summary>
+ public interface ITxRollbackOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.select".</summary>
+ public interface IDtxSelect: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.select-ok".</summary>
+ public interface IDtxSelectOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.start".</summary>
+ public interface IDtxStart: IMethod {
+ string DtxIdentifier { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "dtx.start-ok".</summary>
+ public interface IDtxStartOk: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "tunnel.request".</summary>
+ public interface ITunnelRequest: IMethod {
+ System.Collections.IDictionary MetaData { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.integer".</summary>
+ public interface ITestInteger: IMethod {
+ byte Integer1 { get; }
+ ushort Integer2 { get; }
+ uint Integer3 { get; }
+ ulong Integer4 { get; }
+ byte Operation { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.integer-ok".</summary>
+ public interface ITestIntegerOk: IMethod {
+ ulong Result { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.string".</summary>
+ public interface ITestString: IMethod {
+ string String1 { get; }
+ byte[] String2 { get; }
+ byte Operation { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.string-ok".</summary>
+ public interface ITestStringOk: IMethod {
+ byte[] Result { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.table".</summary>
+ public interface ITestTable: IMethod {
+ System.Collections.IDictionary Table { get; }
+ byte IntegerOp { get; }
+ byte StringOp { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.table-ok".</summary>
+ public interface ITestTableOk: IMethod {
+ ulong IntegerResult { get; }
+ byte[] StringResult { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.content".</summary>
+ public interface ITestContent: IMethod {
+ }
+ /// <summary>Autogenerated type. AMQP specification method "test.content-ok".</summary>
+ public interface ITestContentOk: IMethod {
+ uint ContentChecksum { get; }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "basic"</summary>
+ public class BasicProperties: RabbitMQ.Client.Impl.BasicProperties {
+ private string m_contentType;
+ private string m_contentEncoding;
+ private System.Collections.IDictionary m_headers;
+ private byte m_deliveryMode;
+ private byte m_priority;
+ private string m_correlationId;
+ private string m_replyTo;
+ private string m_expiration;
+ private string m_messageId;
+ private AmqpTimestamp m_timestamp;
+ private string m_type;
+ private string m_userId;
+ private string m_appId;
+ private string m_clusterId;
+
+ private bool contentType_present = false;
+ private bool contentEncoding_present = false;
+ private bool headers_present = false;
+ private bool deliveryMode_present = false;
+ private bool priority_present = false;
+ private bool correlationId_present = false;
+ private bool replyTo_present = false;
+ private bool expiration_present = false;
+ private bool messageId_present = false;
+ private bool timestamp_present = false;
+ private bool type_present = false;
+ private bool userId_present = false;
+ private bool appId_present = false;
+ private bool clusterId_present = false;
+
+ public override string ContentType {
+ get {
+ return m_contentType;
+ }
+ set {
+ contentType_present = true;
+ m_contentType = value;
+ }
+ }
+ public override string ContentEncoding {
+ get {
+ return m_contentEncoding;
+ }
+ set {
+ contentEncoding_present = true;
+ m_contentEncoding = value;
+ }
+ }
+ public override System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public override byte DeliveryMode {
+ get {
+ return m_deliveryMode;
+ }
+ set {
+ deliveryMode_present = true;
+ m_deliveryMode = value;
+ }
+ }
+ public override byte Priority {
+ get {
+ return m_priority;
+ }
+ set {
+ priority_present = true;
+ m_priority = value;
+ }
+ }
+ public override string CorrelationId {
+ get {
+ return m_correlationId;
+ }
+ set {
+ correlationId_present = true;
+ m_correlationId = value;
+ }
+ }
+ public override string ReplyTo {
+ get {
+ return m_replyTo;
+ }
+ set {
+ replyTo_present = true;
+ m_replyTo = value;
+ }
+ }
+ public override string Expiration {
+ get {
+ return m_expiration;
+ }
+ set {
+ expiration_present = true;
+ m_expiration = value;
+ }
+ }
+ public override string MessageId {
+ get {
+ return m_messageId;
+ }
+ set {
+ messageId_present = true;
+ m_messageId = value;
+ }
+ }
+ public override AmqpTimestamp Timestamp {
+ get {
+ return m_timestamp;
+ }
+ set {
+ timestamp_present = true;
+ m_timestamp = value;
+ }
+ }
+ public override string Type {
+ get {
+ return m_type;
+ }
+ set {
+ type_present = true;
+ m_type = value;
+ }
+ }
+ public override string UserId {
+ get {
+ return m_userId;
+ }
+ set {
+ userId_present = true;
+ m_userId = value;
+ }
+ }
+ public override string AppId {
+ get {
+ return m_appId;
+ }
+ set {
+ appId_present = true;
+ m_appId = value;
+ }
+ }
+ public override string ClusterId {
+ get {
+ return m_clusterId;
+ }
+ set {
+ clusterId_present = true;
+ m_clusterId = value;
+ }
+ }
+
+ public override void ClearContentType() { contentType_present = false; }
+ public override void ClearContentEncoding() { contentEncoding_present = false; }
+ public override void ClearHeaders() { headers_present = false; }
+ public override void ClearDeliveryMode() { deliveryMode_present = false; }
+ public override void ClearPriority() { priority_present = false; }
+ public override void ClearCorrelationId() { correlationId_present = false; }
+ public override void ClearReplyTo() { replyTo_present = false; }
+ public override void ClearExpiration() { expiration_present = false; }
+ public override void ClearMessageId() { messageId_present = false; }
+ public override void ClearTimestamp() { timestamp_present = false; }
+ public override void ClearType() { type_present = false; }
+ public override void ClearUserId() { userId_present = false; }
+ public override void ClearAppId() { appId_present = false; }
+ public override void ClearClusterId() { clusterId_present = false; }
+
+ public BasicProperties() {}
+ public override int ProtocolClassId { get { return 60; } }
+ public override string ProtocolClassName { get { return "basic"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ contentType_present = reader.ReadPresence();
+ contentEncoding_present = reader.ReadPresence();
+ headers_present = reader.ReadPresence();
+ deliveryMode_present = reader.ReadPresence();
+ priority_present = reader.ReadPresence();
+ correlationId_present = reader.ReadPresence();
+ replyTo_present = reader.ReadPresence();
+ expiration_present = reader.ReadPresence();
+ messageId_present = reader.ReadPresence();
+ timestamp_present = reader.ReadPresence();
+ type_present = reader.ReadPresence();
+ userId_present = reader.ReadPresence();
+ appId_present = reader.ReadPresence();
+ clusterId_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (contentType_present) { m_contentType = reader.ReadShortstr(); }
+ if (contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (deliveryMode_present) { m_deliveryMode = reader.ReadOctet(); }
+ if (priority_present) { m_priority = reader.ReadOctet(); }
+ if (correlationId_present) { m_correlationId = reader.ReadShortstr(); }
+ if (replyTo_present) { m_replyTo = reader.ReadShortstr(); }
+ if (expiration_present) { m_expiration = reader.ReadShortstr(); }
+ if (messageId_present) { m_messageId = reader.ReadShortstr(); }
+ if (timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
+ if (type_present) { m_type = reader.ReadShortstr(); }
+ if (userId_present) { m_userId = reader.ReadShortstr(); }
+ if (appId_present) { m_appId = reader.ReadShortstr(); }
+ if (clusterId_present) { m_clusterId = reader.ReadShortstr(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(contentType_present);
+ writer.WritePresence(contentEncoding_present);
+ writer.WritePresence(headers_present);
+ writer.WritePresence(deliveryMode_present);
+ writer.WritePresence(priority_present);
+ writer.WritePresence(correlationId_present);
+ writer.WritePresence(replyTo_present);
+ writer.WritePresence(expiration_present);
+ writer.WritePresence(messageId_present);
+ writer.WritePresence(timestamp_present);
+ writer.WritePresence(type_present);
+ writer.WritePresence(userId_present);
+ writer.WritePresence(appId_present);
+ writer.WritePresence(clusterId_present);
+ writer.FinishPresence();
+ if (contentType_present) { writer.WriteShortstr(m_contentType); }
+ if (contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (deliveryMode_present) { writer.WriteOctet(m_deliveryMode); }
+ if (priority_present) { writer.WriteOctet(m_priority); }
+ if (correlationId_present) { writer.WriteShortstr(m_correlationId); }
+ if (replyTo_present) { writer.WriteShortstr(m_replyTo); }
+ if (expiration_present) { writer.WriteShortstr(m_expiration); }
+ if (messageId_present) { writer.WriteShortstr(m_messageId); }
+ if (timestamp_present) { writer.WriteTimestamp(m_timestamp); }
+ if (type_present) { writer.WriteShortstr(m_type); }
+ if (userId_present) { writer.WriteShortstr(m_userId); }
+ if (appId_present) { writer.WriteShortstr(m_appId); }
+ if (clusterId_present) { writer.WriteShortstr(m_clusterId); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("content type="); sb.Append(contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
+ sb.Append("content encoding="); sb.Append(contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("delivery mode="); sb.Append(deliveryMode_present ? m_deliveryMode.ToString() : "_"); sb.Append(", ");
+ sb.Append("priority="); sb.Append(priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
+ sb.Append("correlation id="); sb.Append(correlationId_present ? (m_correlationId == null ? "(null)" : m_correlationId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("reply to="); sb.Append(replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
+ sb.Append("expiration="); sb.Append(expiration_present ? (m_expiration == null ? "(null)" : m_expiration.ToString()) : "_"); sb.Append(", ");
+ sb.Append("message id="); sb.Append(messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("timestamp="); sb.Append(timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
+ sb.Append("type="); sb.Append(type_present ? (m_type == null ? "(null)" : m_type.ToString()) : "_"); sb.Append(", ");
+ sb.Append("user id="); sb.Append(userId_present ? (m_userId == null ? "(null)" : m_userId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("app id="); sb.Append(appId_present ? (m_appId == null ? "(null)" : m_appId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("cluster id="); sb.Append(clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "file"</summary>
+ public class FileProperties: RabbitMQ.Client.Impl.FileProperties {
+ private string m_contentType;
+ private string m_contentEncoding;
+ private System.Collections.IDictionary m_headers;
+ private byte m_priority;
+ private string m_replyTo;
+ private string m_messageId;
+ private string m_filename;
+ private AmqpTimestamp m_timestamp;
+ private string m_clusterId;
+
+ private bool contentType_present = false;
+ private bool contentEncoding_present = false;
+ private bool headers_present = false;
+ private bool priority_present = false;
+ private bool replyTo_present = false;
+ private bool messageId_present = false;
+ private bool filename_present = false;
+ private bool timestamp_present = false;
+ private bool clusterId_present = false;
+
+ public override string ContentType {
+ get {
+ return m_contentType;
+ }
+ set {
+ contentType_present = true;
+ m_contentType = value;
+ }
+ }
+ public override string ContentEncoding {
+ get {
+ return m_contentEncoding;
+ }
+ set {
+ contentEncoding_present = true;
+ m_contentEncoding = value;
+ }
+ }
+ public override System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public override byte Priority {
+ get {
+ return m_priority;
+ }
+ set {
+ priority_present = true;
+ m_priority = value;
+ }
+ }
+ public override string ReplyTo {
+ get {
+ return m_replyTo;
+ }
+ set {
+ replyTo_present = true;
+ m_replyTo = value;
+ }
+ }
+ public override string MessageId {
+ get {
+ return m_messageId;
+ }
+ set {
+ messageId_present = true;
+ m_messageId = value;
+ }
+ }
+ public override string Filename {
+ get {
+ return m_filename;
+ }
+ set {
+ filename_present = true;
+ m_filename = value;
+ }
+ }
+ public override AmqpTimestamp Timestamp {
+ get {
+ return m_timestamp;
+ }
+ set {
+ timestamp_present = true;
+ m_timestamp = value;
+ }
+ }
+ public override string ClusterId {
+ get {
+ return m_clusterId;
+ }
+ set {
+ clusterId_present = true;
+ m_clusterId = value;
+ }
+ }
+
+ public override void ClearContentType() { contentType_present = false; }
+ public override void ClearContentEncoding() { contentEncoding_present = false; }
+ public override void ClearHeaders() { headers_present = false; }
+ public override void ClearPriority() { priority_present = false; }
+ public override void ClearReplyTo() { replyTo_present = false; }
+ public override void ClearMessageId() { messageId_present = false; }
+ public override void ClearFilename() { filename_present = false; }
+ public override void ClearTimestamp() { timestamp_present = false; }
+ public override void ClearClusterId() { clusterId_present = false; }
+
+ public FileProperties() {}
+ public override int ProtocolClassId { get { return 70; } }
+ public override string ProtocolClassName { get { return "file"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ contentType_present = reader.ReadPresence();
+ contentEncoding_present = reader.ReadPresence();
+ headers_present = reader.ReadPresence();
+ priority_present = reader.ReadPresence();
+ replyTo_present = reader.ReadPresence();
+ messageId_present = reader.ReadPresence();
+ filename_present = reader.ReadPresence();
+ timestamp_present = reader.ReadPresence();
+ clusterId_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (contentType_present) { m_contentType = reader.ReadShortstr(); }
+ if (contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (priority_present) { m_priority = reader.ReadOctet(); }
+ if (replyTo_present) { m_replyTo = reader.ReadShortstr(); }
+ if (messageId_present) { m_messageId = reader.ReadShortstr(); }
+ if (filename_present) { m_filename = reader.ReadShortstr(); }
+ if (timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
+ if (clusterId_present) { m_clusterId = reader.ReadShortstr(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(contentType_present);
+ writer.WritePresence(contentEncoding_present);
+ writer.WritePresence(headers_present);
+ writer.WritePresence(priority_present);
+ writer.WritePresence(replyTo_present);
+ writer.WritePresence(messageId_present);
+ writer.WritePresence(filename_present);
+ writer.WritePresence(timestamp_present);
+ writer.WritePresence(clusterId_present);
+ writer.FinishPresence();
+ if (contentType_present) { writer.WriteShortstr(m_contentType); }
+ if (contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (priority_present) { writer.WriteOctet(m_priority); }
+ if (replyTo_present) { writer.WriteShortstr(m_replyTo); }
+ if (messageId_present) { writer.WriteShortstr(m_messageId); }
+ if (filename_present) { writer.WriteShortstr(m_filename); }
+ if (timestamp_present) { writer.WriteTimestamp(m_timestamp); }
+ if (clusterId_present) { writer.WriteShortstr(m_clusterId); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("content type="); sb.Append(contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
+ sb.Append("content encoding="); sb.Append(contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("priority="); sb.Append(priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
+ sb.Append("reply to="); sb.Append(replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
+ sb.Append("message id="); sb.Append(messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
+ sb.Append("filename="); sb.Append(filename_present ? (m_filename == null ? "(null)" : m_filename.ToString()) : "_"); sb.Append(", ");
+ sb.Append("timestamp="); sb.Append(timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
+ sb.Append("cluster id="); sb.Append(clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "stream"</summary>
+ public class StreamProperties: RabbitMQ.Client.Impl.StreamProperties {
+ private string m_contentType;
+ private string m_contentEncoding;
+ private System.Collections.IDictionary m_headers;
+ private byte m_priority;
+ private AmqpTimestamp m_timestamp;
+
+ private bool contentType_present = false;
+ private bool contentEncoding_present = false;
+ private bool headers_present = false;
+ private bool priority_present = false;
+ private bool timestamp_present = false;
+
+ public override string ContentType {
+ get {
+ return m_contentType;
+ }
+ set {
+ contentType_present = true;
+ m_contentType = value;
+ }
+ }
+ public override string ContentEncoding {
+ get {
+ return m_contentEncoding;
+ }
+ set {
+ contentEncoding_present = true;
+ m_contentEncoding = value;
+ }
+ }
+ public override System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public override byte Priority {
+ get {
+ return m_priority;
+ }
+ set {
+ priority_present = true;
+ m_priority = value;
+ }
+ }
+ public override AmqpTimestamp Timestamp {
+ get {
+ return m_timestamp;
+ }
+ set {
+ timestamp_present = true;
+ m_timestamp = value;
+ }
+ }
+
+ public override void ClearContentType() { contentType_present = false; }
+ public override void ClearContentEncoding() { contentEncoding_present = false; }
+ public override void ClearHeaders() { headers_present = false; }
+ public override void ClearPriority() { priority_present = false; }
+ public override void ClearTimestamp() { timestamp_present = false; }
+
+ public StreamProperties() {}
+ public override int ProtocolClassId { get { return 80; } }
+ public override string ProtocolClassName { get { return "stream"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ contentType_present = reader.ReadPresence();
+ contentEncoding_present = reader.ReadPresence();
+ headers_present = reader.ReadPresence();
+ priority_present = reader.ReadPresence();
+ timestamp_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (contentType_present) { m_contentType = reader.ReadShortstr(); }
+ if (contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (priority_present) { m_priority = reader.ReadOctet(); }
+ if (timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(contentType_present);
+ writer.WritePresence(contentEncoding_present);
+ writer.WritePresence(headers_present);
+ writer.WritePresence(priority_present);
+ writer.WritePresence(timestamp_present);
+ writer.FinishPresence();
+ if (contentType_present) { writer.WriteShortstr(m_contentType); }
+ if (contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (priority_present) { writer.WriteOctet(m_priority); }
+ if (timestamp_present) { writer.WriteTimestamp(m_timestamp); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("content type="); sb.Append(contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
+ sb.Append("content encoding="); sb.Append(contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("priority="); sb.Append(priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
+ sb.Append("timestamp="); sb.Append(timestamp_present ? m_timestamp.ToString() : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "tunnel"</summary>
+ public class TunnelProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
+ private System.Collections.IDictionary m_headers;
+ private string m_proxyName;
+ private string m_dataName;
+ private byte m_durable;
+ private byte m_broadcast;
+
+ private bool headers_present = false;
+ private bool proxyName_present = false;
+ private bool dataName_present = false;
+ private bool durable_present = false;
+ private bool broadcast_present = false;
+
+ public System.Collections.IDictionary Headers {
+ get {
+ return m_headers;
+ }
+ set {
+ headers_present = true;
+ m_headers = value;
+ }
+ }
+ public string ProxyName {
+ get {
+ return m_proxyName;
+ }
+ set {
+ proxyName_present = true;
+ m_proxyName = value;
+ }
+ }
+ public string DataName {
+ get {
+ return m_dataName;
+ }
+ set {
+ dataName_present = true;
+ m_dataName = value;
+ }
+ }
+ public byte Durable {
+ get {
+ return m_durable;
+ }
+ set {
+ durable_present = true;
+ m_durable = value;
+ }
+ }
+ public byte Broadcast {
+ get {
+ return m_broadcast;
+ }
+ set {
+ broadcast_present = true;
+ m_broadcast = value;
+ }
+ }
+
+ public void ClearHeaders() { headers_present = false; }
+ public void ClearProxyName() { proxyName_present = false; }
+ public void ClearDataName() { dataName_present = false; }
+ public void ClearDurable() { durable_present = false; }
+ public void ClearBroadcast() { broadcast_present = false; }
+
+ public TunnelProperties() {}
+ public override int ProtocolClassId { get { return 110; } }
+ public override string ProtocolClassName { get { return "tunnel"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ headers_present = reader.ReadPresence();
+ proxyName_present = reader.ReadPresence();
+ dataName_present = reader.ReadPresence();
+ durable_present = reader.ReadPresence();
+ broadcast_present = reader.ReadPresence();
+ reader.FinishPresence();
+ if (headers_present) { m_headers = reader.ReadTable(); }
+ if (proxyName_present) { m_proxyName = reader.ReadShortstr(); }
+ if (dataName_present) { m_dataName = reader.ReadShortstr(); }
+ if (durable_present) { m_durable = reader.ReadOctet(); }
+ if (broadcast_present) { m_broadcast = reader.ReadOctet(); }
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.WritePresence(headers_present);
+ writer.WritePresence(proxyName_present);
+ writer.WritePresence(dataName_present);
+ writer.WritePresence(durable_present);
+ writer.WritePresence(broadcast_present);
+ writer.FinishPresence();
+ if (headers_present) { writer.WriteTable(m_headers); }
+ if (proxyName_present) { writer.WriteShortstr(m_proxyName); }
+ if (dataName_present) { writer.WriteShortstr(m_dataName); }
+ if (durable_present) { writer.WriteOctet(m_durable); }
+ if (broadcast_present) { writer.WriteOctet(m_broadcast); }
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append("headers="); sb.Append(headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
+ sb.Append("proxy name="); sb.Append(proxyName_present ? (m_proxyName == null ? "(null)" : m_proxyName.ToString()) : "_"); sb.Append(", ");
+ sb.Append("data name="); sb.Append(dataName_present ? (m_dataName == null ? "(null)" : m_dataName.ToString()) : "_"); sb.Append(", ");
+ sb.Append("durable="); sb.Append(durable_present ? m_durable.ToString() : "_"); sb.Append(", ");
+ sb.Append("broadcast="); sb.Append(broadcast_present ? m_broadcast.ToString() : "_");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. AMQP specification content header properties for content class "test"</summary>
+ public class TestProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
+
+
+
+
+ public TestProperties() {}
+ public override int ProtocolClassId { get { return 120; } }
+ public override string ProtocolClassName { get { return "test"; } }
+
+ public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
+ reader.FinishPresence();
+ }
+
+ public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
+ writer.FinishPresence();
+ }
+
+ public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+}
+namespace RabbitMQ.Client.Framing.Impl.v0_8qpid {
+ using RabbitMQ.Client.Framing.v0_8qpid;
+ public enum ClassId {
+ Connection = 10,
+ Channel = 20,
+ Access = 30,
+ Exchange = 40,
+ Queue = 50,
+ Basic = 60,
+ File = 70,
+ Stream = 80,
+ Tx = 90,
+ Dtx = 100,
+ Tunnel = 110,
+ Test = 120,
+ Invalid = -1
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionStart: RabbitMQ.Client.Impl.MethodBase, IConnectionStart {
+ public const int ClassId = 10;
+ public const int MethodId = 10;
+
+ public byte m_versionMajor;
+ public byte m_versionMinor;
+ public System.Collections.IDictionary m_serverProperties;
+ public byte[] m_mechanisms;
+ public byte[] m_locales;
+
+ byte IConnectionStart.VersionMajor { get { return m_versionMajor; } }
+ byte IConnectionStart.VersionMinor { get { return m_versionMinor; } }
+ System.Collections.IDictionary IConnectionStart.ServerProperties { get { return m_serverProperties; } }
+ byte[] IConnectionStart.Mechanisms { get { return m_mechanisms; } }
+ byte[] IConnectionStart.Locales { get { return m_locales; } }
+
+ public ConnectionStart() {}
+ public ConnectionStart(
+ byte initVersionMajor,
+ byte initVersionMinor,
+ System.Collections.IDictionary initServerProperties,
+ byte[] initMechanisms,
+ byte[] initLocales)
+ {
+ m_versionMajor = initVersionMajor;
+ m_versionMinor = initVersionMinor;
+ m_serverProperties = initServerProperties;
+ m_mechanisms = initMechanisms;
+ m_locales = initLocales;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "connection.start"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_versionMajor = reader.ReadOctet();
+ m_versionMinor = reader.ReadOctet();
+ m_serverProperties = reader.ReadTable();
+ m_mechanisms = reader.ReadLongstr();
+ m_locales = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteOctet(m_versionMajor);
+ writer.WriteOctet(m_versionMinor);
+ writer.WriteTable(m_serverProperties);
+ writer.WriteLongstr(m_mechanisms);
+ writer.WriteLongstr(m_locales);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_versionMajor); sb.Append(",");
+ sb.Append(m_versionMinor); sb.Append(",");
+ sb.Append(m_serverProperties); sb.Append(",");
+ sb.Append(m_mechanisms); sb.Append(",");
+ sb.Append(m_locales);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionStartOk: RabbitMQ.Client.Impl.MethodBase, IConnectionStartOk {
+ public const int ClassId = 10;
+ public const int MethodId = 11;
+
+ public System.Collections.IDictionary m_clientProperties;
+ public string m_mechanism;
+ public byte[] m_response;
+ public string m_locale;
+
+ System.Collections.IDictionary IConnectionStartOk.ClientProperties { get { return m_clientProperties; } }
+ string IConnectionStartOk.Mechanism { get { return m_mechanism; } }
+ byte[] IConnectionStartOk.Response { get { return m_response; } }
+ string IConnectionStartOk.Locale { get { return m_locale; } }
+
+ public ConnectionStartOk() {}
+ public ConnectionStartOk(
+ System.Collections.IDictionary initClientProperties,
+ string initMechanism,
+ byte[] initResponse,
+ string initLocale)
+ {
+ m_clientProperties = initClientProperties;
+ m_mechanism = initMechanism;
+ m_response = initResponse;
+ m_locale = initLocale;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "connection.start-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_clientProperties = reader.ReadTable();
+ m_mechanism = reader.ReadShortstr();
+ m_response = reader.ReadLongstr();
+ m_locale = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteTable(m_clientProperties);
+ writer.WriteShortstr(m_mechanism);
+ writer.WriteLongstr(m_response);
+ writer.WriteShortstr(m_locale);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_clientProperties); sb.Append(",");
+ sb.Append(m_mechanism); sb.Append(",");
+ sb.Append(m_response); sb.Append(",");
+ sb.Append(m_locale);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionSecure: RabbitMQ.Client.Impl.MethodBase, IConnectionSecure {
+ public const int ClassId = 10;
+ public const int MethodId = 20;
+
+ public byte[] m_challenge;
+
+ byte[] IConnectionSecure.Challenge { get { return m_challenge; } }
+
+ public ConnectionSecure() {}
+ public ConnectionSecure(
+ byte[] initChallenge)
+ {
+ m_challenge = initChallenge;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "connection.secure"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_challenge = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_challenge);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_challenge);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionSecureOk: RabbitMQ.Client.Impl.MethodBase, IConnectionSecureOk {
+ public const int ClassId = 10;
+ public const int MethodId = 21;
+
+ public byte[] m_response;
+
+ byte[] IConnectionSecureOk.Response { get { return m_response; } }
+
+ public ConnectionSecureOk() {}
+ public ConnectionSecureOk(
+ byte[] initResponse)
+ {
+ m_response = initResponse;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "connection.secure-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_response = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_response);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_response);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionTune: RabbitMQ.Client.Impl.MethodBase, IConnectionTune {
+ public const int ClassId = 10;
+ public const int MethodId = 30;
+
+ public ushort m_channelMax;
+ public uint m_frameMax;
+ public ushort m_heartbeat;
+
+ ushort IConnectionTune.ChannelMax { get { return m_channelMax; } }
+ uint IConnectionTune.FrameMax { get { return m_frameMax; } }
+ ushort IConnectionTune.Heartbeat { get { return m_heartbeat; } }
+
+ public ConnectionTune() {}
+ public ConnectionTune(
+ ushort initChannelMax,
+ uint initFrameMax,
+ ushort initHeartbeat)
+ {
+ m_channelMax = initChannelMax;
+ m_frameMax = initFrameMax;
+ m_heartbeat = initHeartbeat;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "connection.tune"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_channelMax = reader.ReadShort();
+ m_frameMax = reader.ReadLong();
+ m_heartbeat = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_channelMax);
+ writer.WriteLong(m_frameMax);
+ writer.WriteShort(m_heartbeat);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_channelMax); sb.Append(",");
+ sb.Append(m_frameMax); sb.Append(",");
+ sb.Append(m_heartbeat);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionTuneOk: RabbitMQ.Client.Impl.MethodBase, IConnectionTuneOk {
+ public const int ClassId = 10;
+ public const int MethodId = 31;
+
+ public ushort m_channelMax;
+ public uint m_frameMax;
+ public ushort m_heartbeat;
+
+ ushort IConnectionTuneOk.ChannelMax { get { return m_channelMax; } }
+ uint IConnectionTuneOk.FrameMax { get { return m_frameMax; } }
+ ushort IConnectionTuneOk.Heartbeat { get { return m_heartbeat; } }
+
+ public ConnectionTuneOk() {}
+ public ConnectionTuneOk(
+ ushort initChannelMax,
+ uint initFrameMax,
+ ushort initHeartbeat)
+ {
+ m_channelMax = initChannelMax;
+ m_frameMax = initFrameMax;
+ m_heartbeat = initHeartbeat;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "connection.tune-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_channelMax = reader.ReadShort();
+ m_frameMax = reader.ReadLong();
+ m_heartbeat = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_channelMax);
+ writer.WriteLong(m_frameMax);
+ writer.WriteShort(m_heartbeat);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_channelMax); sb.Append(",");
+ sb.Append(m_frameMax); sb.Append(",");
+ sb.Append(m_heartbeat);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionOpen: RabbitMQ.Client.Impl.MethodBase, IConnectionOpen {
+ public const int ClassId = 10;
+ public const int MethodId = 40;
+
+ public string m_virtualHost;
+ public string m_capabilities;
+ public bool m_insist;
+
+ string IConnectionOpen.VirtualHost { get { return m_virtualHost; } }
+ string IConnectionOpen.Capabilities { get { return m_capabilities; } }
+ bool IConnectionOpen.Insist { get { return m_insist; } }
+
+ public ConnectionOpen() {}
+ public ConnectionOpen(
+ string initVirtualHost,
+ string initCapabilities,
+ bool initInsist)
+ {
+ m_virtualHost = initVirtualHost;
+ m_capabilities = initCapabilities;
+ m_insist = initInsist;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "connection.open"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_virtualHost = reader.ReadShortstr();
+ m_capabilities = reader.ReadShortstr();
+ m_insist = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_virtualHost);
+ writer.WriteShortstr(m_capabilities);
+ writer.WriteBit(m_insist);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_virtualHost); sb.Append(",");
+ sb.Append(m_capabilities); sb.Append(",");
+ sb.Append(m_insist);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionOpenOk: RabbitMQ.Client.Impl.MethodBase, IConnectionOpenOk {
+ public const int ClassId = 10;
+ public const int MethodId = 41;
+
+ public string m_knownHosts;
+
+ string IConnectionOpenOk.KnownHosts { get { return m_knownHosts; } }
+
+ public ConnectionOpenOk() {}
+ public ConnectionOpenOk(
+ string initKnownHosts)
+ {
+ m_knownHosts = initKnownHosts;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "connection.open-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_knownHosts = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_knownHosts);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_knownHosts);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionRedirect: RabbitMQ.Client.Impl.MethodBase, IConnectionRedirect {
+ public const int ClassId = 10;
+ public const int MethodId = 50;
+
+ public string m_host;
+ public string m_knownHosts;
+
+ string IConnectionRedirect.Host { get { return m_host; } }
+ string IConnectionRedirect.KnownHosts { get { return m_knownHosts; } }
+
+ public ConnectionRedirect() {}
+ public ConnectionRedirect(
+ string initHost,
+ string initKnownHosts)
+ {
+ m_host = initHost;
+ m_knownHosts = initKnownHosts;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "connection.redirect"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_host = reader.ReadShortstr();
+ m_knownHosts = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_host);
+ writer.WriteShortstr(m_knownHosts);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_host); sb.Append(",");
+ sb.Append(m_knownHosts);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionClose: RabbitMQ.Client.Impl.MethodBase, IConnectionClose {
+ public const int ClassId = 10;
+ public const int MethodId = 60;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public ushort m_classId;
+ public ushort m_methodId;
+
+ ushort IConnectionClose.ReplyCode { get { return m_replyCode; } }
+ string IConnectionClose.ReplyText { get { return m_replyText; } }
+ ushort IConnectionClose.ClassId { get { return m_classId; } }
+ ushort IConnectionClose.MethodId { get { return m_methodId; } }
+
+ public ConnectionClose() {}
+ public ConnectionClose(
+ ushort initReplyCode,
+ string initReplyText,
+ ushort initClassId,
+ ushort initMethodId)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_classId = initClassId;
+ m_methodId = initMethodId;
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "connection.close"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_classId = reader.ReadShort();
+ m_methodId = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShort(m_classId);
+ writer.WriteShort(m_methodId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_classId); sb.Append(",");
+ sb.Append(m_methodId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ConnectionCloseOk: RabbitMQ.Client.Impl.MethodBase, IConnectionCloseOk {
+ public const int ClassId = 10;
+ public const int MethodId = 61;
+
+
+
+ public ConnectionCloseOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 10; } }
+ public override int ProtocolMethodId { get { return 61; } }
+ public override string ProtocolMethodName { get { return "connection.close-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelOpen: RabbitMQ.Client.Impl.MethodBase, IChannelOpen {
+ public const int ClassId = 20;
+ public const int MethodId = 10;
+
+ public string m_outOfBand;
+
+ string IChannelOpen.OutOfBand { get { return m_outOfBand; } }
+
+ public ChannelOpen() {}
+ public ChannelOpen(
+ string initOutOfBand)
+ {
+ m_outOfBand = initOutOfBand;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "channel.open"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_outOfBand = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_outOfBand);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_outOfBand);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelOpenOk: RabbitMQ.Client.Impl.MethodBase, IChannelOpenOk {
+ public const int ClassId = 20;
+ public const int MethodId = 11;
+
+
+
+ public ChannelOpenOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "channel.open-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelFlow: RabbitMQ.Client.Impl.MethodBase, IChannelFlow {
+ public const int ClassId = 20;
+ public const int MethodId = 20;
+
+ public bool m_active;
+
+ bool IChannelFlow.Active { get { return m_active; } }
+
+ public ChannelFlow() {}
+ public ChannelFlow(
+ bool initActive)
+ {
+ m_active = initActive;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "channel.flow"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_active = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteBit(m_active);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_active);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelFlowOk: RabbitMQ.Client.Impl.MethodBase, IChannelFlowOk {
+ public const int ClassId = 20;
+ public const int MethodId = 21;
+
+ public bool m_active;
+
+ bool IChannelFlowOk.Active { get { return m_active; } }
+
+ public ChannelFlowOk() {}
+ public ChannelFlowOk(
+ bool initActive)
+ {
+ m_active = initActive;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "channel.flow-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_active = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteBit(m_active);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_active);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelAlert: RabbitMQ.Client.Impl.MethodBase, IChannelAlert {
+ public const int ClassId = 20;
+ public const int MethodId = 30;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public System.Collections.IDictionary m_details;
+
+ ushort IChannelAlert.ReplyCode { get { return m_replyCode; } }
+ string IChannelAlert.ReplyText { get { return m_replyText; } }
+ System.Collections.IDictionary IChannelAlert.Details { get { return m_details; } }
+
+ public ChannelAlert() {}
+ public ChannelAlert(
+ ushort initReplyCode,
+ string initReplyText,
+ System.Collections.IDictionary initDetails)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_details = initDetails;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "channel.alert"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_details = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteTable(m_details);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_details);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelClose: RabbitMQ.Client.Impl.MethodBase, IChannelClose {
+ public const int ClassId = 20;
+ public const int MethodId = 40;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public ushort m_classId;
+ public ushort m_methodId;
+
+ ushort IChannelClose.ReplyCode { get { return m_replyCode; } }
+ string IChannelClose.ReplyText { get { return m_replyText; } }
+ ushort IChannelClose.ClassId { get { return m_classId; } }
+ ushort IChannelClose.MethodId { get { return m_methodId; } }
+
+ public ChannelClose() {}
+ public ChannelClose(
+ ushort initReplyCode,
+ string initReplyText,
+ ushort initClassId,
+ ushort initMethodId)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_classId = initClassId;
+ m_methodId = initMethodId;
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "channel.close"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_classId = reader.ReadShort();
+ m_methodId = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShort(m_classId);
+ writer.WriteShort(m_methodId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_classId); sb.Append(",");
+ sb.Append(m_methodId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ChannelCloseOk: RabbitMQ.Client.Impl.MethodBase, IChannelCloseOk {
+ public const int ClassId = 20;
+ public const int MethodId = 41;
+
+
+
+ public ChannelCloseOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 20; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "channel.close-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class AccessRequest: RabbitMQ.Client.Impl.MethodBase, IAccessRequest {
+ public const int ClassId = 30;
+ public const int MethodId = 10;
+
+ public string m_realm;
+ public bool m_exclusive;
+ public bool m_passive;
+ public bool m_active;
+ public bool m_write;
+ public bool m_read;
+
+ string IAccessRequest.Realm { get { return m_realm; } }
+ bool IAccessRequest.Exclusive { get { return m_exclusive; } }
+ bool IAccessRequest.Passive { get { return m_passive; } }
+ bool IAccessRequest.Active { get { return m_active; } }
+ bool IAccessRequest.Write { get { return m_write; } }
+ bool IAccessRequest.Read { get { return m_read; } }
+
+ public AccessRequest() {}
+ public AccessRequest(
+ string initRealm,
+ bool initExclusive,
+ bool initPassive,
+ bool initActive,
+ bool initWrite,
+ bool initRead)
+ {
+ m_realm = initRealm;
+ m_exclusive = initExclusive;
+ m_passive = initPassive;
+ m_active = initActive;
+ m_write = initWrite;
+ m_read = initRead;
+ }
+
+ public override int ProtocolClassId { get { return 30; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "access.request"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_realm = reader.ReadShortstr();
+ m_exclusive = reader.ReadBit();
+ m_passive = reader.ReadBit();
+ m_active = reader.ReadBit();
+ m_write = reader.ReadBit();
+ m_read = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_realm);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_passive);
+ writer.WriteBit(m_active);
+ writer.WriteBit(m_write);
+ writer.WriteBit(m_read);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_realm); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_passive); sb.Append(",");
+ sb.Append(m_active); sb.Append(",");
+ sb.Append(m_write); sb.Append(",");
+ sb.Append(m_read);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class AccessRequestOk: RabbitMQ.Client.Impl.MethodBase, IAccessRequestOk {
+ public const int ClassId = 30;
+ public const int MethodId = 11;
+
+ public ushort m_ticket;
+
+ ushort IAccessRequestOk.Ticket { get { return m_ticket; } }
+
+ public AccessRequestOk() {}
+ public AccessRequestOk(
+ ushort initTicket)
+ {
+ m_ticket = initTicket;
+ }
+
+ public override int ProtocolClassId { get { return 30; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "access.request-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDeclare: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclare {
+ public const int ClassId = 40;
+ public const int MethodId = 10;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_type;
+ public bool m_passive;
+ public bool m_durable;
+ public bool m_autoDelete;
+ public bool m_internal;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IExchangeDeclare.Ticket { get { return m_ticket; } }
+ string IExchangeDeclare.Exchange { get { return m_exchange; } }
+ string IExchangeDeclare.Type { get { return m_type; } }
+ bool IExchangeDeclare.Passive { get { return m_passive; } }
+ bool IExchangeDeclare.Durable { get { return m_durable; } }
+ bool IExchangeDeclare.AutoDelete { get { return m_autoDelete; } }
+ bool IExchangeDeclare.Internal { get { return m_internal; } }
+ bool IExchangeDeclare.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IExchangeDeclare.Arguments { get { return m_arguments; } }
+
+ public ExchangeDeclare() {}
+ public ExchangeDeclare(
+ ushort initTicket,
+ string initExchange,
+ string initType,
+ bool initPassive,
+ bool initDurable,
+ bool initAutoDelete,
+ bool initInternal,
+ bool initNowait,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_type = initType;
+ m_passive = initPassive;
+ m_durable = initDurable;
+ m_autoDelete = initAutoDelete;
+ m_internal = initInternal;
+ m_nowait = initNowait;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "exchange.declare"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_type = reader.ReadShortstr();
+ m_passive = reader.ReadBit();
+ m_durable = reader.ReadBit();
+ m_autoDelete = reader.ReadBit();
+ m_internal = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_type);
+ writer.WriteBit(m_passive);
+ writer.WriteBit(m_durable);
+ writer.WriteBit(m_autoDelete);
+ writer.WriteBit(m_internal);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_type); sb.Append(",");
+ sb.Append(m_passive); sb.Append(",");
+ sb.Append(m_durable); sb.Append(",");
+ sb.Append(m_autoDelete); sb.Append(",");
+ sb.Append(m_internal); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDeclareOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclareOk {
+ public const int ClassId = 40;
+ public const int MethodId = 11;
+
+
+
+ public ExchangeDeclareOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "exchange.declare-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDelete: RabbitMQ.Client.Impl.MethodBase, IExchangeDelete {
+ public const int ClassId = 40;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public bool m_ifUnused;
+ public bool m_nowait;
+
+ ushort IExchangeDelete.Ticket { get { return m_ticket; } }
+ string IExchangeDelete.Exchange { get { return m_exchange; } }
+ bool IExchangeDelete.IfUnused { get { return m_ifUnused; } }
+ bool IExchangeDelete.Nowait { get { return m_nowait; } }
+
+ public ExchangeDelete() {}
+ public ExchangeDelete(
+ ushort initTicket,
+ string initExchange,
+ bool initIfUnused,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_ifUnused = initIfUnused;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "exchange.delete"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_ifUnused = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteBit(m_ifUnused);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_ifUnused); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeDeleteOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeleteOk {
+ public const int ClassId = 40;
+ public const int MethodId = 21;
+
+
+
+ public ExchangeDeleteOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "exchange.delete-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeBound: RabbitMQ.Client.Impl.MethodBase, IExchangeBound {
+ public const int ClassId = 40;
+ public const int MethodId = 22;
+
+ public string m_exchange;
+ public string m_routingKey;
+ public string m_queue;
+
+ string IExchangeBound.Exchange { get { return m_exchange; } }
+ string IExchangeBound.RoutingKey { get { return m_routingKey; } }
+ string IExchangeBound.Queue { get { return m_queue; } }
+
+ public ExchangeBound() {}
+ public ExchangeBound(
+ string initExchange,
+ string initRoutingKey,
+ string initQueue)
+ {
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_queue = initQueue;
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 22; } }
+ public override string ProtocolMethodName { get { return "exchange.bound"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_queue = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteShortstr(m_queue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_queue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class ExchangeBoundOk: RabbitMQ.Client.Impl.MethodBase, IExchangeBoundOk {
+ public const int ClassId = 40;
+ public const int MethodId = 23;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+
+ ushort IExchangeBoundOk.ReplyCode { get { return m_replyCode; } }
+ string IExchangeBoundOk.ReplyText { get { return m_replyText; } }
+
+ public ExchangeBoundOk() {}
+ public ExchangeBoundOk(
+ ushort initReplyCode,
+ string initReplyText)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ }
+
+ public override int ProtocolClassId { get { return 40; } }
+ public override int ProtocolMethodId { get { return 23; } }
+ public override string ProtocolMethodName { get { return "exchange.bound-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDeclare: RabbitMQ.Client.Impl.MethodBase, IQueueDeclare {
+ public const int ClassId = 50;
+ public const int MethodId = 10;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_passive;
+ public bool m_durable;
+ public bool m_exclusive;
+ public bool m_autoDelete;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IQueueDeclare.Ticket { get { return m_ticket; } }
+ string IQueueDeclare.Queue { get { return m_queue; } }
+ bool IQueueDeclare.Passive { get { return m_passive; } }
+ bool IQueueDeclare.Durable { get { return m_durable; } }
+ bool IQueueDeclare.Exclusive { get { return m_exclusive; } }
+ bool IQueueDeclare.AutoDelete { get { return m_autoDelete; } }
+ bool IQueueDeclare.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IQueueDeclare.Arguments { get { return m_arguments; } }
+
+ public QueueDeclare() {}
+ public QueueDeclare(
+ ushort initTicket,
+ string initQueue,
+ bool initPassive,
+ bool initDurable,
+ bool initExclusive,
+ bool initAutoDelete,
+ bool initNowait,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_passive = initPassive;
+ m_durable = initDurable;
+ m_exclusive = initExclusive;
+ m_autoDelete = initAutoDelete;
+ m_nowait = initNowait;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "queue.declare"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_passive = reader.ReadBit();
+ m_durable = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_autoDelete = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_passive);
+ writer.WriteBit(m_durable);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_autoDelete);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_passive); sb.Append(",");
+ sb.Append(m_durable); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_autoDelete); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDeclareOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeclareOk {
+ public const int ClassId = 50;
+ public const int MethodId = 11;
+
+ public string m_queue;
+ public uint m_messageCount;
+ public uint m_consumerCount;
+
+ string IQueueDeclareOk.Queue { get { return m_queue; } }
+ uint IQueueDeclareOk.MessageCount { get { return m_messageCount; } }
+ uint IQueueDeclareOk.ConsumerCount { get { return m_consumerCount; } }
+
+ public QueueDeclareOk() {}
+ public QueueDeclareOk(
+ string initQueue,
+ uint initMessageCount,
+ uint initConsumerCount)
+ {
+ m_queue = initQueue;
+ m_messageCount = initMessageCount;
+ m_consumerCount = initConsumerCount;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "queue.declare-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_queue = reader.ReadShortstr();
+ m_messageCount = reader.ReadLong();
+ m_consumerCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_queue);
+ writer.WriteLong(m_messageCount);
+ writer.WriteLong(m_consumerCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_messageCount); sb.Append(",");
+ sb.Append(m_consumerCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueBind: RabbitMQ.Client.Impl.MethodBase, IQueueBind {
+ public const int ClassId = 50;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IQueueBind.Ticket { get { return m_ticket; } }
+ string IQueueBind.Queue { get { return m_queue; } }
+ string IQueueBind.Exchange { get { return m_exchange; } }
+ string IQueueBind.RoutingKey { get { return m_routingKey; } }
+ bool IQueueBind.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IQueueBind.Arguments { get { return m_arguments; } }
+
+ public QueueBind() {}
+ public QueueBind(
+ ushort initTicket,
+ string initQueue,
+ string initExchange,
+ string initRoutingKey,
+ bool initNowait,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_nowait = initNowait;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "queue.bind"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueBindOk: RabbitMQ.Client.Impl.MethodBase, IQueueBindOk {
+ public const int ClassId = 50;
+ public const int MethodId = 21;
+
+
+
+ public QueueBindOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "queue.bind-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueuePurge: RabbitMQ.Client.Impl.MethodBase, IQueuePurge {
+ public const int ClassId = 50;
+ public const int MethodId = 30;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_nowait;
+
+ ushort IQueuePurge.Ticket { get { return m_ticket; } }
+ string IQueuePurge.Queue { get { return m_queue; } }
+ bool IQueuePurge.Nowait { get { return m_nowait; } }
+
+ public QueuePurge() {}
+ public QueuePurge(
+ ushort initTicket,
+ string initQueue,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "queue.purge"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueuePurgeOk: RabbitMQ.Client.Impl.MethodBase, IQueuePurgeOk {
+ public const int ClassId = 50;
+ public const int MethodId = 31;
+
+ public uint m_messageCount;
+
+ uint IQueuePurgeOk.MessageCount { get { return m_messageCount; } }
+
+ public QueuePurgeOk() {}
+ public QueuePurgeOk(
+ uint initMessageCount)
+ {
+ m_messageCount = initMessageCount;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "queue.purge-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_messageCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_messageCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_messageCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDelete: RabbitMQ.Client.Impl.MethodBase, IQueueDelete {
+ public const int ClassId = 50;
+ public const int MethodId = 40;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_ifUnused;
+ public bool m_ifEmpty;
+ public bool m_nowait;
+
+ ushort IQueueDelete.Ticket { get { return m_ticket; } }
+ string IQueueDelete.Queue { get { return m_queue; } }
+ bool IQueueDelete.IfUnused { get { return m_ifUnused; } }
+ bool IQueueDelete.IfEmpty { get { return m_ifEmpty; } }
+ bool IQueueDelete.Nowait { get { return m_nowait; } }
+
+ public QueueDelete() {}
+ public QueueDelete(
+ ushort initTicket,
+ string initQueue,
+ bool initIfUnused,
+ bool initIfEmpty,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_ifUnused = initIfUnused;
+ m_ifEmpty = initIfEmpty;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "queue.delete"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_ifUnused = reader.ReadBit();
+ m_ifEmpty = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_ifUnused);
+ writer.WriteBit(m_ifEmpty);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_ifUnused); sb.Append(",");
+ sb.Append(m_ifEmpty); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class QueueDeleteOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeleteOk {
+ public const int ClassId = 50;
+ public const int MethodId = 41;
+
+ public uint m_messageCount;
+
+ uint IQueueDeleteOk.MessageCount { get { return m_messageCount; } }
+
+ public QueueDeleteOk() {}
+ public QueueDeleteOk(
+ uint initMessageCount)
+ {
+ m_messageCount = initMessageCount;
+ }
+
+ public override int ProtocolClassId { get { return 50; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "queue.delete-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_messageCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_messageCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_messageCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicQos: RabbitMQ.Client.Impl.MethodBase, IBasicQos {
+ public const int ClassId = 60;
+ public const int MethodId = 10;
+
+ public uint m_prefetchSize;
+ public ushort m_prefetchCount;
+ public bool m_global;
+
+ uint IBasicQos.PrefetchSize { get { return m_prefetchSize; } }
+ ushort IBasicQos.PrefetchCount { get { return m_prefetchCount; } }
+ bool IBasicQos.Global { get { return m_global; } }
+
+ public BasicQos() {}
+ public BasicQos(
+ uint initPrefetchSize,
+ ushort initPrefetchCount,
+ bool initGlobal)
+ {
+ m_prefetchSize = initPrefetchSize;
+ m_prefetchCount = initPrefetchCount;
+ m_global = initGlobal;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "basic.qos"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_prefetchSize = reader.ReadLong();
+ m_prefetchCount = reader.ReadShort();
+ m_global = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_prefetchSize);
+ writer.WriteShort(m_prefetchCount);
+ writer.WriteBit(m_global);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_prefetchSize); sb.Append(",");
+ sb.Append(m_prefetchCount); sb.Append(",");
+ sb.Append(m_global);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicQosOk: RabbitMQ.Client.Impl.MethodBase, IBasicQosOk {
+ public const int ClassId = 60;
+ public const int MethodId = 11;
+
+
+
+ public BasicQosOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "basic.qos-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicConsume: RabbitMQ.Client.Impl.MethodBase, IBasicConsume {
+ public const int ClassId = 60;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_consumerTag;
+ public bool m_noLocal;
+ public bool m_noAck;
+ public bool m_exclusive;
+ public bool m_nowait;
+ public System.Collections.IDictionary m_arguments;
+
+ ushort IBasicConsume.Ticket { get { return m_ticket; } }
+ string IBasicConsume.Queue { get { return m_queue; } }
+ string IBasicConsume.ConsumerTag { get { return m_consumerTag; } }
+ bool IBasicConsume.NoLocal { get { return m_noLocal; } }
+ bool IBasicConsume.NoAck { get { return m_noAck; } }
+ bool IBasicConsume.Exclusive { get { return m_exclusive; } }
+ bool IBasicConsume.Nowait { get { return m_nowait; } }
+ System.Collections.IDictionary IBasicConsume.Arguments { get { return m_arguments; } }
+
+ public BasicConsume() {}
+ public BasicConsume(
+ ushort initTicket,
+ string initQueue,
+ string initConsumerTag,
+ bool initNoLocal,
+ bool initNoAck,
+ bool initExclusive,
+ bool initNowait,
+ System.Collections.IDictionary initArguments)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_consumerTag = initConsumerTag;
+ m_noLocal = initNoLocal;
+ m_noAck = initNoAck;
+ m_exclusive = initExclusive;
+ m_nowait = initNowait;
+ m_arguments = initArguments;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "basic.consume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_consumerTag = reader.ReadShortstr();
+ m_noLocal = reader.ReadBit();
+ m_noAck = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ m_arguments = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_noLocal);
+ writer.WriteBit(m_noAck);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_nowait);
+ writer.WriteTable(m_arguments);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_noLocal); sb.Append(",");
+ sb.Append(m_noAck); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_nowait); sb.Append(",");
+ sb.Append(m_arguments);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicConsumeOk: RabbitMQ.Client.Impl.MethodBase, IBasicConsumeOk {
+ public const int ClassId = 60;
+ public const int MethodId = 21;
+
+ public string m_consumerTag;
+
+ string IBasicConsumeOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public BasicConsumeOk() {}
+ public BasicConsumeOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "basic.consume-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicCancel: RabbitMQ.Client.Impl.MethodBase, IBasicCancel {
+ public const int ClassId = 60;
+ public const int MethodId = 30;
+
+ public string m_consumerTag;
+ public bool m_nowait;
+
+ string IBasicCancel.ConsumerTag { get { return m_consumerTag; } }
+ bool IBasicCancel.Nowait { get { return m_nowait; } }
+
+ public BasicCancel() {}
+ public BasicCancel(
+ string initConsumerTag,
+ bool initNowait)
+ {
+ m_consumerTag = initConsumerTag;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "basic.cancel"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicCancelOk: RabbitMQ.Client.Impl.MethodBase, IBasicCancelOk {
+ public const int ClassId = 60;
+ public const int MethodId = 31;
+
+ public string m_consumerTag;
+
+ string IBasicCancelOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public BasicCancelOk() {}
+ public BasicCancelOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "basic.cancel-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicPublish: RabbitMQ.Client.Impl.MethodBase, IBasicPublish {
+ public const int ClassId = 60;
+ public const int MethodId = 40;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_mandatory;
+ public bool m_immediate;
+
+ ushort IBasicPublish.Ticket { get { return m_ticket; } }
+ string IBasicPublish.Exchange { get { return m_exchange; } }
+ string IBasicPublish.RoutingKey { get { return m_routingKey; } }
+ bool IBasicPublish.Mandatory { get { return m_mandatory; } }
+ bool IBasicPublish.Immediate { get { return m_immediate; } }
+
+ public BasicPublish() {}
+ public BasicPublish(
+ ushort initTicket,
+ string initExchange,
+ string initRoutingKey,
+ bool initMandatory,
+ bool initImmediate)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_mandatory = initMandatory;
+ m_immediate = initImmediate;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "basic.publish"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_mandatory = reader.ReadBit();
+ m_immediate = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_mandatory);
+ writer.WriteBit(m_immediate);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_mandatory); sb.Append(",");
+ sb.Append(m_immediate);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicReturn: RabbitMQ.Client.Impl.MethodBase, IBasicReturn {
+ public const int ClassId = 60;
+ public const int MethodId = 50;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public string m_exchange;
+ public string m_routingKey;
+
+ ushort IBasicReturn.ReplyCode { get { return m_replyCode; } }
+ string IBasicReturn.ReplyText { get { return m_replyText; } }
+ string IBasicReturn.Exchange { get { return m_exchange; } }
+ string IBasicReturn.RoutingKey { get { return m_routingKey; } }
+
+ public BasicReturn() {}
+ public BasicReturn(
+ ushort initReplyCode,
+ string initReplyText,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "basic.return"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicDeliver: RabbitMQ.Client.Impl.MethodBase, IBasicDeliver {
+ public const int ClassId = 60;
+ public const int MethodId = 60;
+
+ public string m_consumerTag;
+ public ulong m_deliveryTag;
+ public bool m_redelivered;
+ public string m_exchange;
+ public string m_routingKey;
+
+ string IBasicDeliver.ConsumerTag { get { return m_consumerTag; } }
+ ulong IBasicDeliver.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicDeliver.Redelivered { get { return m_redelivered; } }
+ string IBasicDeliver.Exchange { get { return m_exchange; } }
+ string IBasicDeliver.RoutingKey { get { return m_routingKey; } }
+
+ public BasicDeliver() {}
+ public BasicDeliver(
+ string initConsumerTag,
+ ulong initDeliveryTag,
+ bool initRedelivered,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_consumerTag = initConsumerTag;
+ m_deliveryTag = initDeliveryTag;
+ m_redelivered = initRedelivered;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "basic.deliver"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_deliveryTag = reader.ReadLonglong();
+ m_redelivered = reader.ReadBit();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_redelivered);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_redelivered); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicGet: RabbitMQ.Client.Impl.MethodBase, IBasicGet {
+ public const int ClassId = 60;
+ public const int MethodId = 70;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public bool m_noAck;
+
+ ushort IBasicGet.Ticket { get { return m_ticket; } }
+ string IBasicGet.Queue { get { return m_queue; } }
+ bool IBasicGet.NoAck { get { return m_noAck; } }
+
+ public BasicGet() {}
+ public BasicGet(
+ ushort initTicket,
+ string initQueue,
+ bool initNoAck)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_noAck = initNoAck;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 70; } }
+ public override string ProtocolMethodName { get { return "basic.get"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_noAck = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteBit(m_noAck);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_noAck);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicGetOk: RabbitMQ.Client.Impl.MethodBase, IBasicGetOk {
+ public const int ClassId = 60;
+ public const int MethodId = 71;
+
+ public ulong m_deliveryTag;
+ public bool m_redelivered;
+ public string m_exchange;
+ public string m_routingKey;
+ public uint m_messageCount;
+
+ ulong IBasicGetOk.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicGetOk.Redelivered { get { return m_redelivered; } }
+ string IBasicGetOk.Exchange { get { return m_exchange; } }
+ string IBasicGetOk.RoutingKey { get { return m_routingKey; } }
+ uint IBasicGetOk.MessageCount { get { return m_messageCount; } }
+
+ public BasicGetOk() {}
+ public BasicGetOk(
+ ulong initDeliveryTag,
+ bool initRedelivered,
+ string initExchange,
+ string initRoutingKey,
+ uint initMessageCount)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_redelivered = initRedelivered;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_messageCount = initMessageCount;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 71; } }
+ public override string ProtocolMethodName { get { return "basic.get-ok"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_redelivered = reader.ReadBit();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_messageCount = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_redelivered);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteLong(m_messageCount);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_redelivered); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_messageCount);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicGetEmpty: RabbitMQ.Client.Impl.MethodBase, IBasicGetEmpty {
+ public const int ClassId = 60;
+ public const int MethodId = 72;
+
+ public string m_clusterId;
+
+ string IBasicGetEmpty.ClusterId { get { return m_clusterId; } }
+
+ public BasicGetEmpty() {}
+ public BasicGetEmpty(
+ string initClusterId)
+ {
+ m_clusterId = initClusterId;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 72; } }
+ public override string ProtocolMethodName { get { return "basic.get-empty"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_clusterId = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_clusterId);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_clusterId);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicAck: RabbitMQ.Client.Impl.MethodBase, IBasicAck {
+ public const int ClassId = 60;
+ public const int MethodId = 80;
+
+ public ulong m_deliveryTag;
+ public bool m_multiple;
+
+ ulong IBasicAck.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicAck.Multiple { get { return m_multiple; } }
+
+ public BasicAck() {}
+ public BasicAck(
+ ulong initDeliveryTag,
+ bool initMultiple)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_multiple = initMultiple;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 80; } }
+ public override string ProtocolMethodName { get { return "basic.ack"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_multiple = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_multiple);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_multiple);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicReject: RabbitMQ.Client.Impl.MethodBase, IBasicReject {
+ public const int ClassId = 60;
+ public const int MethodId = 90;
+
+ public ulong m_deliveryTag;
+ public bool m_requeue;
+
+ ulong IBasicReject.DeliveryTag { get { return m_deliveryTag; } }
+ bool IBasicReject.Requeue { get { return m_requeue; } }
+
+ public BasicReject() {}
+ public BasicReject(
+ ulong initDeliveryTag,
+ bool initRequeue)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_requeue = initRequeue;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 90; } }
+ public override string ProtocolMethodName { get { return "basic.reject"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_requeue = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_requeue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_requeue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicRecover: RabbitMQ.Client.Impl.MethodBase, IBasicRecover {
+ public const int ClassId = 60;
+ public const int MethodId = 100;
+
+ public bool m_requeue;
+
+ bool IBasicRecover.Requeue { get { return m_requeue; } }
+
+ public BasicRecover() {}
+ public BasicRecover(
+ bool initRequeue)
+ {
+ m_requeue = initRequeue;
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 100; } }
+ public override string ProtocolMethodName { get { return "basic.recover"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_requeue = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteBit(m_requeue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_requeue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class BasicRecoverOk: RabbitMQ.Client.Impl.MethodBase, IBasicRecoverOk {
+ public const int ClassId = 60;
+ public const int MethodId = 101;
+
+
+
+ public BasicRecoverOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 60; } }
+ public override int ProtocolMethodId { get { return 101; } }
+ public override string ProtocolMethodName { get { return "basic.recover-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileQos: RabbitMQ.Client.Impl.MethodBase, IFileQos {
+ public const int ClassId = 70;
+ public const int MethodId = 10;
+
+ public uint m_prefetchSize;
+ public ushort m_prefetchCount;
+ public bool m_global;
+
+ uint IFileQos.PrefetchSize { get { return m_prefetchSize; } }
+ ushort IFileQos.PrefetchCount { get { return m_prefetchCount; } }
+ bool IFileQos.Global { get { return m_global; } }
+
+ public FileQos() {}
+ public FileQos(
+ uint initPrefetchSize,
+ ushort initPrefetchCount,
+ bool initGlobal)
+ {
+ m_prefetchSize = initPrefetchSize;
+ m_prefetchCount = initPrefetchCount;
+ m_global = initGlobal;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "file.qos"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_prefetchSize = reader.ReadLong();
+ m_prefetchCount = reader.ReadShort();
+ m_global = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_prefetchSize);
+ writer.WriteShort(m_prefetchCount);
+ writer.WriteBit(m_global);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_prefetchSize); sb.Append(",");
+ sb.Append(m_prefetchCount); sb.Append(",");
+ sb.Append(m_global);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileQosOk: RabbitMQ.Client.Impl.MethodBase, IFileQosOk {
+ public const int ClassId = 70;
+ public const int MethodId = 11;
+
+
+
+ public FileQosOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "file.qos-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileConsume: RabbitMQ.Client.Impl.MethodBase, IFileConsume {
+ public const int ClassId = 70;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_consumerTag;
+ public bool m_noLocal;
+ public bool m_noAck;
+ public bool m_exclusive;
+ public bool m_nowait;
+
+ ushort IFileConsume.Ticket { get { return m_ticket; } }
+ string IFileConsume.Queue { get { return m_queue; } }
+ string IFileConsume.ConsumerTag { get { return m_consumerTag; } }
+ bool IFileConsume.NoLocal { get { return m_noLocal; } }
+ bool IFileConsume.NoAck { get { return m_noAck; } }
+ bool IFileConsume.Exclusive { get { return m_exclusive; } }
+ bool IFileConsume.Nowait { get { return m_nowait; } }
+
+ public FileConsume() {}
+ public FileConsume(
+ ushort initTicket,
+ string initQueue,
+ string initConsumerTag,
+ bool initNoLocal,
+ bool initNoAck,
+ bool initExclusive,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_consumerTag = initConsumerTag;
+ m_noLocal = initNoLocal;
+ m_noAck = initNoAck;
+ m_exclusive = initExclusive;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "file.consume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_consumerTag = reader.ReadShortstr();
+ m_noLocal = reader.ReadBit();
+ m_noAck = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_noLocal);
+ writer.WriteBit(m_noAck);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_noLocal); sb.Append(",");
+ sb.Append(m_noAck); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileConsumeOk: RabbitMQ.Client.Impl.MethodBase, IFileConsumeOk {
+ public const int ClassId = 70;
+ public const int MethodId = 21;
+
+ public string m_consumerTag;
+
+ string IFileConsumeOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public FileConsumeOk() {}
+ public FileConsumeOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "file.consume-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileCancel: RabbitMQ.Client.Impl.MethodBase, IFileCancel {
+ public const int ClassId = 70;
+ public const int MethodId = 30;
+
+ public string m_consumerTag;
+ public bool m_nowait;
+
+ string IFileCancel.ConsumerTag { get { return m_consumerTag; } }
+ bool IFileCancel.Nowait { get { return m_nowait; } }
+
+ public FileCancel() {}
+ public FileCancel(
+ string initConsumerTag,
+ bool initNowait)
+ {
+ m_consumerTag = initConsumerTag;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "file.cancel"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileCancelOk: RabbitMQ.Client.Impl.MethodBase, IFileCancelOk {
+ public const int ClassId = 70;
+ public const int MethodId = 31;
+
+ public string m_consumerTag;
+
+ string IFileCancelOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public FileCancelOk() {}
+ public FileCancelOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "file.cancel-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileOpen: RabbitMQ.Client.Impl.MethodBase, IFileOpen {
+ public const int ClassId = 70;
+ public const int MethodId = 40;
+
+ public string m_identifier;
+ public ulong m_contentSize;
+
+ string IFileOpen.Identifier { get { return m_identifier; } }
+ ulong IFileOpen.ContentSize { get { return m_contentSize; } }
+
+ public FileOpen() {}
+ public FileOpen(
+ string initIdentifier,
+ ulong initContentSize)
+ {
+ m_identifier = initIdentifier;
+ m_contentSize = initContentSize;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "file.open"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_identifier = reader.ReadShortstr();
+ m_contentSize = reader.ReadLonglong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_identifier);
+ writer.WriteLonglong(m_contentSize);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_identifier); sb.Append(",");
+ sb.Append(m_contentSize);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileOpenOk: RabbitMQ.Client.Impl.MethodBase, IFileOpenOk {
+ public const int ClassId = 70;
+ public const int MethodId = 41;
+
+ public ulong m_stagedSize;
+
+ ulong IFileOpenOk.StagedSize { get { return m_stagedSize; } }
+
+ public FileOpenOk() {}
+ public FileOpenOk(
+ ulong initStagedSize)
+ {
+ m_stagedSize = initStagedSize;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "file.open-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_stagedSize = reader.ReadLonglong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_stagedSize);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_stagedSize);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileStage: RabbitMQ.Client.Impl.MethodBase, IFileStage {
+ public const int ClassId = 70;
+ public const int MethodId = 50;
+
+
+
+ public FileStage(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "file.stage"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FilePublish: RabbitMQ.Client.Impl.MethodBase, IFilePublish {
+ public const int ClassId = 70;
+ public const int MethodId = 60;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_mandatory;
+ public bool m_immediate;
+ public string m_identifier;
+
+ ushort IFilePublish.Ticket { get { return m_ticket; } }
+ string IFilePublish.Exchange { get { return m_exchange; } }
+ string IFilePublish.RoutingKey { get { return m_routingKey; } }
+ bool IFilePublish.Mandatory { get { return m_mandatory; } }
+ bool IFilePublish.Immediate { get { return m_immediate; } }
+ string IFilePublish.Identifier { get { return m_identifier; } }
+
+ public FilePublish() {}
+ public FilePublish(
+ ushort initTicket,
+ string initExchange,
+ string initRoutingKey,
+ bool initMandatory,
+ bool initImmediate,
+ string initIdentifier)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_mandatory = initMandatory;
+ m_immediate = initImmediate;
+ m_identifier = initIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "file.publish"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_mandatory = reader.ReadBit();
+ m_immediate = reader.ReadBit();
+ m_identifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_mandatory);
+ writer.WriteBit(m_immediate);
+ writer.WriteShortstr(m_identifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_mandatory); sb.Append(",");
+ sb.Append(m_immediate); sb.Append(",");
+ sb.Append(m_identifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileReturn: RabbitMQ.Client.Impl.MethodBase, IFileReturn {
+ public const int ClassId = 70;
+ public const int MethodId = 70;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public string m_exchange;
+ public string m_routingKey;
+
+ ushort IFileReturn.ReplyCode { get { return m_replyCode; } }
+ string IFileReturn.ReplyText { get { return m_replyText; } }
+ string IFileReturn.Exchange { get { return m_exchange; } }
+ string IFileReturn.RoutingKey { get { return m_routingKey; } }
+
+ public FileReturn() {}
+ public FileReturn(
+ ushort initReplyCode,
+ string initReplyText,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 70; } }
+ public override string ProtocolMethodName { get { return "file.return"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileDeliver: RabbitMQ.Client.Impl.MethodBase, IFileDeliver {
+ public const int ClassId = 70;
+ public const int MethodId = 80;
+
+ public string m_consumerTag;
+ public ulong m_deliveryTag;
+ public bool m_redelivered;
+ public string m_exchange;
+ public string m_routingKey;
+ public string m_identifier;
+
+ string IFileDeliver.ConsumerTag { get { return m_consumerTag; } }
+ ulong IFileDeliver.DeliveryTag { get { return m_deliveryTag; } }
+ bool IFileDeliver.Redelivered { get { return m_redelivered; } }
+ string IFileDeliver.Exchange { get { return m_exchange; } }
+ string IFileDeliver.RoutingKey { get { return m_routingKey; } }
+ string IFileDeliver.Identifier { get { return m_identifier; } }
+
+ public FileDeliver() {}
+ public FileDeliver(
+ string initConsumerTag,
+ ulong initDeliveryTag,
+ bool initRedelivered,
+ string initExchange,
+ string initRoutingKey,
+ string initIdentifier)
+ {
+ m_consumerTag = initConsumerTag;
+ m_deliveryTag = initDeliveryTag;
+ m_redelivered = initRedelivered;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_identifier = initIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 80; } }
+ public override string ProtocolMethodName { get { return "file.deliver"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_deliveryTag = reader.ReadLonglong();
+ m_redelivered = reader.ReadBit();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_identifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_redelivered);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteShortstr(m_identifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_redelivered); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_identifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileAck: RabbitMQ.Client.Impl.MethodBase, IFileAck {
+ public const int ClassId = 70;
+ public const int MethodId = 90;
+
+ public ulong m_deliveryTag;
+ public bool m_multiple;
+
+ ulong IFileAck.DeliveryTag { get { return m_deliveryTag; } }
+ bool IFileAck.Multiple { get { return m_multiple; } }
+
+ public FileAck() {}
+ public FileAck(
+ ulong initDeliveryTag,
+ bool initMultiple)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_multiple = initMultiple;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 90; } }
+ public override string ProtocolMethodName { get { return "file.ack"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_multiple = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_multiple);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_multiple);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class FileReject: RabbitMQ.Client.Impl.MethodBase, IFileReject {
+ public const int ClassId = 70;
+ public const int MethodId = 100;
+
+ public ulong m_deliveryTag;
+ public bool m_requeue;
+
+ ulong IFileReject.DeliveryTag { get { return m_deliveryTag; } }
+ bool IFileReject.Requeue { get { return m_requeue; } }
+
+ public FileReject() {}
+ public FileReject(
+ ulong initDeliveryTag,
+ bool initRequeue)
+ {
+ m_deliveryTag = initDeliveryTag;
+ m_requeue = initRequeue;
+ }
+
+ public override int ProtocolClassId { get { return 70; } }
+ public override int ProtocolMethodId { get { return 100; } }
+ public override string ProtocolMethodName { get { return "file.reject"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_deliveryTag = reader.ReadLonglong();
+ m_requeue = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteBit(m_requeue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_requeue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamQos: RabbitMQ.Client.Impl.MethodBase, IStreamQos {
+ public const int ClassId = 80;
+ public const int MethodId = 10;
+
+ public uint m_prefetchSize;
+ public ushort m_prefetchCount;
+ public uint m_consumeRate;
+ public bool m_global;
+
+ uint IStreamQos.PrefetchSize { get { return m_prefetchSize; } }
+ ushort IStreamQos.PrefetchCount { get { return m_prefetchCount; } }
+ uint IStreamQos.ConsumeRate { get { return m_consumeRate; } }
+ bool IStreamQos.Global { get { return m_global; } }
+
+ public StreamQos() {}
+ public StreamQos(
+ uint initPrefetchSize,
+ ushort initPrefetchCount,
+ uint initConsumeRate,
+ bool initGlobal)
+ {
+ m_prefetchSize = initPrefetchSize;
+ m_prefetchCount = initPrefetchCount;
+ m_consumeRate = initConsumeRate;
+ m_global = initGlobal;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "stream.qos"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_prefetchSize = reader.ReadLong();
+ m_prefetchCount = reader.ReadShort();
+ m_consumeRate = reader.ReadLong();
+ m_global = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_prefetchSize);
+ writer.WriteShort(m_prefetchCount);
+ writer.WriteLong(m_consumeRate);
+ writer.WriteBit(m_global);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_prefetchSize); sb.Append(",");
+ sb.Append(m_prefetchCount); sb.Append(",");
+ sb.Append(m_consumeRate); sb.Append(",");
+ sb.Append(m_global);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamQosOk: RabbitMQ.Client.Impl.MethodBase, IStreamQosOk {
+ public const int ClassId = 80;
+ public const int MethodId = 11;
+
+
+
+ public StreamQosOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "stream.qos-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamConsume: RabbitMQ.Client.Impl.MethodBase, IStreamConsume {
+ public const int ClassId = 80;
+ public const int MethodId = 20;
+
+ public ushort m_ticket;
+ public string m_queue;
+ public string m_consumerTag;
+ public bool m_noLocal;
+ public bool m_exclusive;
+ public bool m_nowait;
+
+ ushort IStreamConsume.Ticket { get { return m_ticket; } }
+ string IStreamConsume.Queue { get { return m_queue; } }
+ string IStreamConsume.ConsumerTag { get { return m_consumerTag; } }
+ bool IStreamConsume.NoLocal { get { return m_noLocal; } }
+ bool IStreamConsume.Exclusive { get { return m_exclusive; } }
+ bool IStreamConsume.Nowait { get { return m_nowait; } }
+
+ public StreamConsume() {}
+ public StreamConsume(
+ ushort initTicket,
+ string initQueue,
+ string initConsumerTag,
+ bool initNoLocal,
+ bool initExclusive,
+ bool initNowait)
+ {
+ m_ticket = initTicket;
+ m_queue = initQueue;
+ m_consumerTag = initConsumerTag;
+ m_noLocal = initNoLocal;
+ m_exclusive = initExclusive;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "stream.consume"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_queue = reader.ReadShortstr();
+ m_consumerTag = reader.ReadShortstr();
+ m_noLocal = reader.ReadBit();
+ m_exclusive = reader.ReadBit();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_queue);
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_noLocal);
+ writer.WriteBit(m_exclusive);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_queue); sb.Append(",");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_noLocal); sb.Append(",");
+ sb.Append(m_exclusive); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamConsumeOk: RabbitMQ.Client.Impl.MethodBase, IStreamConsumeOk {
+ public const int ClassId = 80;
+ public const int MethodId = 21;
+
+ public string m_consumerTag;
+
+ string IStreamConsumeOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public StreamConsumeOk() {}
+ public StreamConsumeOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "stream.consume-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamCancel: RabbitMQ.Client.Impl.MethodBase, IStreamCancel {
+ public const int ClassId = 80;
+ public const int MethodId = 30;
+
+ public string m_consumerTag;
+ public bool m_nowait;
+
+ string IStreamCancel.ConsumerTag { get { return m_consumerTag; } }
+ bool IStreamCancel.Nowait { get { return m_nowait; } }
+
+ public StreamCancel() {}
+ public StreamCancel(
+ string initConsumerTag,
+ bool initNowait)
+ {
+ m_consumerTag = initConsumerTag;
+ m_nowait = initNowait;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "stream.cancel"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_nowait = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteBit(m_nowait);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_nowait);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamCancelOk: RabbitMQ.Client.Impl.MethodBase, IStreamCancelOk {
+ public const int ClassId = 80;
+ public const int MethodId = 31;
+
+ public string m_consumerTag;
+
+ string IStreamCancelOk.ConsumerTag { get { return m_consumerTag; } }
+
+ public StreamCancelOk() {}
+ public StreamCancelOk(
+ string initConsumerTag)
+ {
+ m_consumerTag = initConsumerTag;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "stream.cancel-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamPublish: RabbitMQ.Client.Impl.MethodBase, IStreamPublish {
+ public const int ClassId = 80;
+ public const int MethodId = 40;
+
+ public ushort m_ticket;
+ public string m_exchange;
+ public string m_routingKey;
+ public bool m_mandatory;
+ public bool m_immediate;
+
+ ushort IStreamPublish.Ticket { get { return m_ticket; } }
+ string IStreamPublish.Exchange { get { return m_exchange; } }
+ string IStreamPublish.RoutingKey { get { return m_routingKey; } }
+ bool IStreamPublish.Mandatory { get { return m_mandatory; } }
+ bool IStreamPublish.Immediate { get { return m_immediate; } }
+
+ public StreamPublish() {}
+ public StreamPublish(
+ ushort initTicket,
+ string initExchange,
+ string initRoutingKey,
+ bool initMandatory,
+ bool initImmediate)
+ {
+ m_ticket = initTicket;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ m_mandatory = initMandatory;
+ m_immediate = initImmediate;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "stream.publish"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_ticket = reader.ReadShort();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ m_mandatory = reader.ReadBit();
+ m_immediate = reader.ReadBit();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_ticket);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ writer.WriteBit(m_mandatory);
+ writer.WriteBit(m_immediate);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_ticket); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey); sb.Append(",");
+ sb.Append(m_mandatory); sb.Append(",");
+ sb.Append(m_immediate);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamReturn: RabbitMQ.Client.Impl.MethodBase, IStreamReturn {
+ public const int ClassId = 80;
+ public const int MethodId = 50;
+
+ public ushort m_replyCode;
+ public string m_replyText;
+ public string m_exchange;
+ public string m_routingKey;
+
+ ushort IStreamReturn.ReplyCode { get { return m_replyCode; } }
+ string IStreamReturn.ReplyText { get { return m_replyText; } }
+ string IStreamReturn.Exchange { get { return m_exchange; } }
+ string IStreamReturn.RoutingKey { get { return m_routingKey; } }
+
+ public StreamReturn() {}
+ public StreamReturn(
+ ushort initReplyCode,
+ string initReplyText,
+ string initExchange,
+ string initRoutingKey)
+ {
+ m_replyCode = initReplyCode;
+ m_replyText = initReplyText;
+ m_exchange = initExchange;
+ m_routingKey = initRoutingKey;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 50; } }
+ public override string ProtocolMethodName { get { return "stream.return"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_replyCode = reader.ReadShort();
+ m_replyText = reader.ReadShortstr();
+ m_exchange = reader.ReadShortstr();
+ m_routingKey = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShort(m_replyCode);
+ writer.WriteShortstr(m_replyText);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_routingKey);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_replyCode); sb.Append(",");
+ sb.Append(m_replyText); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_routingKey);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class StreamDeliver: RabbitMQ.Client.Impl.MethodBase, IStreamDeliver {
+ public const int ClassId = 80;
+ public const int MethodId = 60;
+
+ public string m_consumerTag;
+ public ulong m_deliveryTag;
+ public string m_exchange;
+ public string m_queue;
+
+ string IStreamDeliver.ConsumerTag { get { return m_consumerTag; } }
+ ulong IStreamDeliver.DeliveryTag { get { return m_deliveryTag; } }
+ string IStreamDeliver.Exchange { get { return m_exchange; } }
+ string IStreamDeliver.Queue { get { return m_queue; } }
+
+ public StreamDeliver() {}
+ public StreamDeliver(
+ string initConsumerTag,
+ ulong initDeliveryTag,
+ string initExchange,
+ string initQueue)
+ {
+ m_consumerTag = initConsumerTag;
+ m_deliveryTag = initDeliveryTag;
+ m_exchange = initExchange;
+ m_queue = initQueue;
+ }
+
+ public override int ProtocolClassId { get { return 80; } }
+ public override int ProtocolMethodId { get { return 60; } }
+ public override string ProtocolMethodName { get { return "stream.deliver"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_consumerTag = reader.ReadShortstr();
+ m_deliveryTag = reader.ReadLonglong();
+ m_exchange = reader.ReadShortstr();
+ m_queue = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_consumerTag);
+ writer.WriteLonglong(m_deliveryTag);
+ writer.WriteShortstr(m_exchange);
+ writer.WriteShortstr(m_queue);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_consumerTag); sb.Append(",");
+ sb.Append(m_deliveryTag); sb.Append(",");
+ sb.Append(m_exchange); sb.Append(",");
+ sb.Append(m_queue);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxSelect: RabbitMQ.Client.Impl.MethodBase, ITxSelect {
+ public const int ClassId = 90;
+ public const int MethodId = 10;
+
+
+
+ public TxSelect(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "tx.select"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxSelectOk: RabbitMQ.Client.Impl.MethodBase, ITxSelectOk {
+ public const int ClassId = 90;
+ public const int MethodId = 11;
+
+
+
+ public TxSelectOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "tx.select-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxCommit: RabbitMQ.Client.Impl.MethodBase, ITxCommit {
+ public const int ClassId = 90;
+ public const int MethodId = 20;
+
+
+
+ public TxCommit(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "tx.commit"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxCommitOk: RabbitMQ.Client.Impl.MethodBase, ITxCommitOk {
+ public const int ClassId = 90;
+ public const int MethodId = 21;
+
+
+
+ public TxCommitOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "tx.commit-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxRollback: RabbitMQ.Client.Impl.MethodBase, ITxRollback {
+ public const int ClassId = 90;
+ public const int MethodId = 30;
+
+
+
+ public TxRollback(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "tx.rollback"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TxRollbackOk: RabbitMQ.Client.Impl.MethodBase, ITxRollbackOk {
+ public const int ClassId = 90;
+ public const int MethodId = 31;
+
+
+
+ public TxRollbackOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 90; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "tx.rollback-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxSelect: RabbitMQ.Client.Impl.MethodBase, IDtxSelect {
+ public const int ClassId = 100;
+ public const int MethodId = 10;
+
+
+
+ public DtxSelect(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "dtx.select"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxSelectOk: RabbitMQ.Client.Impl.MethodBase, IDtxSelectOk {
+ public const int ClassId = 100;
+ public const int MethodId = 11;
+
+
+
+ public DtxSelectOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "dtx.select-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxStart: RabbitMQ.Client.Impl.MethodBase, IDtxStart {
+ public const int ClassId = 100;
+ public const int MethodId = 20;
+
+ public string m_dtxIdentifier;
+
+ string IDtxStart.DtxIdentifier { get { return m_dtxIdentifier; } }
+
+ public DtxStart() {}
+ public DtxStart(
+ string initDtxIdentifier)
+ {
+ m_dtxIdentifier = initDtxIdentifier;
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "dtx.start"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_dtxIdentifier = reader.ReadShortstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_dtxIdentifier);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_dtxIdentifier);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class DtxStartOk: RabbitMQ.Client.Impl.MethodBase, IDtxStartOk {
+ public const int ClassId = 100;
+ public const int MethodId = 21;
+
+
+
+ public DtxStartOk(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 100; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "dtx.start-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TunnelRequest: RabbitMQ.Client.Impl.MethodBase, ITunnelRequest {
+ public const int ClassId = 110;
+ public const int MethodId = 10;
+
+ public System.Collections.IDictionary m_metaData;
+
+ System.Collections.IDictionary ITunnelRequest.MetaData { get { return m_metaData; } }
+
+ public TunnelRequest() {}
+ public TunnelRequest(
+ System.Collections.IDictionary initMetaData)
+ {
+ m_metaData = initMetaData;
+ }
+
+ public override int ProtocolClassId { get { return 110; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "tunnel.request"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_metaData = reader.ReadTable();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteTable(m_metaData);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_metaData);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestInteger: RabbitMQ.Client.Impl.MethodBase, ITestInteger {
+ public const int ClassId = 120;
+ public const int MethodId = 10;
+
+ public byte m_integer1;
+ public ushort m_integer2;
+ public uint m_integer3;
+ public ulong m_integer4;
+ public byte m_operation;
+
+ byte ITestInteger.Integer1 { get { return m_integer1; } }
+ ushort ITestInteger.Integer2 { get { return m_integer2; } }
+ uint ITestInteger.Integer3 { get { return m_integer3; } }
+ ulong ITestInteger.Integer4 { get { return m_integer4; } }
+ byte ITestInteger.Operation { get { return m_operation; } }
+
+ public TestInteger() {}
+ public TestInteger(
+ byte initInteger1,
+ ushort initInteger2,
+ uint initInteger3,
+ ulong initInteger4,
+ byte initOperation)
+ {
+ m_integer1 = initInteger1;
+ m_integer2 = initInteger2;
+ m_integer3 = initInteger3;
+ m_integer4 = initInteger4;
+ m_operation = initOperation;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 10; } }
+ public override string ProtocolMethodName { get { return "test.integer"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_integer1 = reader.ReadOctet();
+ m_integer2 = reader.ReadShort();
+ m_integer3 = reader.ReadLong();
+ m_integer4 = reader.ReadLonglong();
+ m_operation = reader.ReadOctet();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteOctet(m_integer1);
+ writer.WriteShort(m_integer2);
+ writer.WriteLong(m_integer3);
+ writer.WriteLonglong(m_integer4);
+ writer.WriteOctet(m_operation);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_integer1); sb.Append(",");
+ sb.Append(m_integer2); sb.Append(",");
+ sb.Append(m_integer3); sb.Append(",");
+ sb.Append(m_integer4); sb.Append(",");
+ sb.Append(m_operation);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestIntegerOk: RabbitMQ.Client.Impl.MethodBase, ITestIntegerOk {
+ public const int ClassId = 120;
+ public const int MethodId = 11;
+
+ public ulong m_result;
+
+ ulong ITestIntegerOk.Result { get { return m_result; } }
+
+ public TestIntegerOk() {}
+ public TestIntegerOk(
+ ulong initResult)
+ {
+ m_result = initResult;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 11; } }
+ public override string ProtocolMethodName { get { return "test.integer-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_result = reader.ReadLonglong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_result);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_result);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestString: RabbitMQ.Client.Impl.MethodBase, ITestString {
+ public const int ClassId = 120;
+ public const int MethodId = 20;
+
+ public string m_string1;
+ public byte[] m_string2;
+ public byte m_operation;
+
+ string ITestString.String1 { get { return m_string1; } }
+ byte[] ITestString.String2 { get { return m_string2; } }
+ byte ITestString.Operation { get { return m_operation; } }
+
+ public TestString() {}
+ public TestString(
+ string initString1,
+ byte[] initString2,
+ byte initOperation)
+ {
+ m_string1 = initString1;
+ m_string2 = initString2;
+ m_operation = initOperation;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 20; } }
+ public override string ProtocolMethodName { get { return "test.string"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_string1 = reader.ReadShortstr();
+ m_string2 = reader.ReadLongstr();
+ m_operation = reader.ReadOctet();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteShortstr(m_string1);
+ writer.WriteLongstr(m_string2);
+ writer.WriteOctet(m_operation);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_string1); sb.Append(",");
+ sb.Append(m_string2); sb.Append(",");
+ sb.Append(m_operation);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestStringOk: RabbitMQ.Client.Impl.MethodBase, ITestStringOk {
+ public const int ClassId = 120;
+ public const int MethodId = 21;
+
+ public byte[] m_result;
+
+ byte[] ITestStringOk.Result { get { return m_result; } }
+
+ public TestStringOk() {}
+ public TestStringOk(
+ byte[] initResult)
+ {
+ m_result = initResult;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 21; } }
+ public override string ProtocolMethodName { get { return "test.string-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_result = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLongstr(m_result);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_result);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestTable: RabbitMQ.Client.Impl.MethodBase, ITestTable {
+ public const int ClassId = 120;
+ public const int MethodId = 30;
+
+ public System.Collections.IDictionary m_table;
+ public byte m_integerOp;
+ public byte m_stringOp;
+
+ System.Collections.IDictionary ITestTable.Table { get { return m_table; } }
+ byte ITestTable.IntegerOp { get { return m_integerOp; } }
+ byte ITestTable.StringOp { get { return m_stringOp; } }
+
+ public TestTable() {}
+ public TestTable(
+ System.Collections.IDictionary initTable,
+ byte initIntegerOp,
+ byte initStringOp)
+ {
+ m_table = initTable;
+ m_integerOp = initIntegerOp;
+ m_stringOp = initStringOp;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 30; } }
+ public override string ProtocolMethodName { get { return "test.table"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_table = reader.ReadTable();
+ m_integerOp = reader.ReadOctet();
+ m_stringOp = reader.ReadOctet();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteTable(m_table);
+ writer.WriteOctet(m_integerOp);
+ writer.WriteOctet(m_stringOp);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_table); sb.Append(",");
+ sb.Append(m_integerOp); sb.Append(",");
+ sb.Append(m_stringOp);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestTableOk: RabbitMQ.Client.Impl.MethodBase, ITestTableOk {
+ public const int ClassId = 120;
+ public const int MethodId = 31;
+
+ public ulong m_integerResult;
+ public byte[] m_stringResult;
+
+ ulong ITestTableOk.IntegerResult { get { return m_integerResult; } }
+ byte[] ITestTableOk.StringResult { get { return m_stringResult; } }
+
+ public TestTableOk() {}
+ public TestTableOk(
+ ulong initIntegerResult,
+ byte[] initStringResult)
+ {
+ m_integerResult = initIntegerResult;
+ m_stringResult = initStringResult;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 31; } }
+ public override string ProtocolMethodName { get { return "test.table-ok"; } }
+ public override bool HasContent { get { return false; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_integerResult = reader.ReadLonglong();
+ m_stringResult = reader.ReadLongstr();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLonglong(m_integerResult);
+ writer.WriteLongstr(m_stringResult);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_integerResult); sb.Append(",");
+ sb.Append(m_stringResult);
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestContent: RabbitMQ.Client.Impl.MethodBase, ITestContent {
+ public const int ClassId = 120;
+ public const int MethodId = 40;
+
+
+
+ public TestContent(
+)
+ {
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 40; } }
+ public override string ProtocolMethodName { get { return "test.content"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(")");
+ }
+ }
+ /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
+ public class TestContentOk: RabbitMQ.Client.Impl.MethodBase, ITestContentOk {
+ public const int ClassId = 120;
+ public const int MethodId = 41;
+
+ public uint m_contentChecksum;
+
+ uint ITestContentOk.ContentChecksum { get { return m_contentChecksum; } }
+
+ public TestContentOk() {}
+ public TestContentOk(
+ uint initContentChecksum)
+ {
+ m_contentChecksum = initContentChecksum;
+ }
+
+ public override int ProtocolClassId { get { return 120; } }
+ public override int ProtocolMethodId { get { return 41; } }
+ public override string ProtocolMethodName { get { return "test.content-ok"; } }
+ public override bool HasContent { get { return true; } }
+
+ public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
+ m_contentChecksum = reader.ReadLong();
+ }
+
+ public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
+ writer.WriteLong(m_contentChecksum);
+ }
+
+ public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
+ sb.Append("(");
+ sb.Append(m_contentChecksum);
+ sb.Append(")");
+ }
+ }
+
+ public class Model: RabbitMQ.Client.Impl.ModelBase {
+ public Model(RabbitMQ.Client.Impl.ISession session): base(session) {}
+ public override System.UInt16 _Private_AccessRequest(
+ System.String @realm,
+ System.Boolean @exclusive,
+ System.Boolean @passive,
+ System.Boolean @active,
+ System.Boolean @write,
+ System.Boolean @read)
+ {
+ AccessRequest __req = new AccessRequest();
+ __req.m_realm = @realm;
+ __req.m_exclusive = @exclusive;
+ __req.m_passive = @passive;
+ __req.m_active = @active;
+ __req.m_write = @write;
+ __req.m_read = @read;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ AccessRequestOk __rep = __repBase as AccessRequestOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_ticket;
+ }
+ public override void _Private_BasicPublish(
+ System.UInt16 @ticket,
+ System.String @exchange,
+ System.String @routingKey,
+ System.Boolean @mandatory,
+ System.Boolean @immediate,
+ RabbitMQ.Client.IBasicProperties @basicProperties,
+ System.Byte[] @body)
+ {
+ BasicPublish __req = new BasicPublish();
+ __req.m_ticket = @ticket;
+ __req.m_exchange = @exchange;
+ __req.m_routingKey = @routingKey;
+ __req.m_mandatory = @mandatory;
+ __req.m_immediate = @immediate;
+ ModelSend(__req, (BasicProperties) basicProperties,body);
+ }
+ public override void _Private_BasicConsume(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.String @consumerTag,
+ System.Boolean @noLocal,
+ System.Boolean @noAck,
+ System.Boolean @exclusive,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @filter)
+ {
+ BasicConsume __req = new BasicConsume();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_consumerTag = @consumerTag;
+ __req.m_noLocal = @noLocal;
+ __req.m_noAck = @noAck;
+ __req.m_exclusive = @exclusive;
+ __req.m_nowait = @nowait;
+ __req.m_arguments = @filter;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_BasicCancel(
+ System.String @consumerTag,
+ System.Boolean @nowait)
+ {
+ BasicCancel __req = new BasicCancel();
+ __req.m_consumerTag = @consumerTag;
+ __req.m_nowait = @nowait;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ChannelOpen(
+ System.String @outOfBand)
+ {
+ ChannelOpen __req = new ChannelOpen();
+ __req.m_outOfBand = @outOfBand;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ChannelOpenOk __rep = __repBase as ChannelOpenOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void _Private_ChannelCloseOk()
+ {
+ ChannelCloseOk __req = new ChannelCloseOk();
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ChannelClose(
+ System.UInt16 @replyCode,
+ System.String @replyText,
+ System.UInt16 @classId,
+ System.UInt16 @methodId)
+ {
+ ChannelClose __req = new ChannelClose();
+ __req.m_replyCode = @replyCode;
+ __req.m_replyText = @replyText;
+ __req.m_classId = @classId;
+ __req.m_methodId = @methodId;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_BasicGet(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @noAck)
+ {
+ BasicGet __req = new BasicGet();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_noAck = @noAck;
+ ModelSend(__req,null,null);
+ }
+ public override RabbitMQ.Client.Impl.ConnectionTuneDetails ConnectionStartOk(
+ System.Collections.IDictionary @clientProperties,
+ System.String @mechanism,
+ System.Byte[] @response,
+ System.String @locale)
+ {
+ ConnectionStartOk __req = new ConnectionStartOk();
+ __req.m_clientProperties = @clientProperties;
+ __req.m_mechanism = @mechanism;
+ __req.m_response = @response;
+ __req.m_locale = @locale;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ConnectionTune __rep = __repBase as ConnectionTune;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ RabbitMQ.Client.Impl.ConnectionTuneDetails __result = new RabbitMQ.Client.Impl.ConnectionTuneDetails();
+ __result.channelMax = __rep.m_channelMax;
+ __result.frameMax = __rep.m_frameMax;
+ __result.heartbeat = __rep.m_heartbeat;
+ return __result;
+ }
+ public override void ConnectionTuneOk(
+ System.UInt16 @channelMax,
+ System.UInt32 @frameMax,
+ System.UInt16 @heartbeat)
+ {
+ ConnectionTuneOk __req = new ConnectionTuneOk();
+ __req.m_channelMax = @channelMax;
+ __req.m_frameMax = @frameMax;
+ __req.m_heartbeat = @heartbeat;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ConnectionOpen(
+ System.String @virtualHost,
+ System.String @capabilities,
+ System.Boolean @insist)
+ {
+ ConnectionOpen __req = new ConnectionOpen();
+ __req.m_virtualHost = @virtualHost;
+ __req.m_capabilities = @capabilities;
+ __req.m_insist = @insist;
+ ModelSend(__req,null,null);
+ }
+ public override void _Private_ConnectionClose(
+ System.UInt16 @replyCode,
+ System.String @replyText,
+ System.UInt16 @classId,
+ System.UInt16 @methodId)
+ {
+ ConnectionClose __req = new ConnectionClose();
+ __req.m_replyCode = @replyCode;
+ __req.m_replyText = @replyText;
+ __req.m_classId = @classId;
+ __req.m_methodId = @methodId;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ConnectionCloseOk __rep = __repBase as ConnectionCloseOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void _Private_ConnectionCloseOk()
+ {
+ ConnectionCloseOk __req = new ConnectionCloseOk();
+ ModelSend(__req,null,null);
+ }
+ public override RabbitMQ.Client.IBasicProperties CreateBasicProperties()
+ {
+ return new BasicProperties();
+ }
+ public override RabbitMQ.Client.IFileProperties CreateFileProperties()
+ {
+ return new FileProperties();
+ }
+ public override RabbitMQ.Client.IStreamProperties CreateStreamProperties()
+ {
+ return new StreamProperties();
+ }
+ public override void ChannelFlow(
+ System.Boolean @active)
+ {
+ ChannelFlow __req = new ChannelFlow();
+ __req.m_active = @active;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ChannelFlowOk __rep = __repBase as ChannelFlowOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void ExchangeDeclare(
+ System.UInt16 @ticket,
+ System.String @exchange,
+ System.String @type,
+ System.Boolean @passive,
+ System.Boolean @durable,
+ System.Boolean @autoDelete,
+ System.Boolean @internal,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @arguments)
+ {
+ ExchangeDeclare __req = new ExchangeDeclare();
+ __req.m_ticket = @ticket;
+ __req.m_exchange = @exchange;
+ __req.m_type = @type;
+ __req.m_passive = @passive;
+ __req.m_durable = @durable;
+ __req.m_autoDelete = @autoDelete;
+ __req.m_internal = @internal;
+ __req.m_nowait = @nowait;
+ __req.m_arguments = @arguments;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ExchangeDeclareOk __rep = __repBase as ExchangeDeclareOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void ExchangeDelete(
+ System.UInt16 @ticket,
+ System.String @exchange,
+ System.Boolean @ifUnused,
+ System.Boolean @nowait)
+ {
+ ExchangeDelete __req = new ExchangeDelete();
+ __req.m_ticket = @ticket;
+ __req.m_exchange = @exchange;
+ __req.m_ifUnused = @ifUnused;
+ __req.m_nowait = @nowait;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ ExchangeDeleteOk __rep = __repBase as ExchangeDeleteOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override System.String QueueDeclare(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @passive,
+ System.Boolean @durable,
+ System.Boolean @exclusive,
+ System.Boolean @autoDelete,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @arguments)
+ {
+ QueueDeclare __req = new QueueDeclare();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_passive = @passive;
+ __req.m_durable = @durable;
+ __req.m_exclusive = @exclusive;
+ __req.m_autoDelete = @autoDelete;
+ __req.m_nowait = @nowait;
+ __req.m_arguments = @arguments;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ return null;
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueueDeclareOk __rep = __repBase as QueueDeclareOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_queue;
+ }
+ public override void QueueBind(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.String @exchange,
+ System.String @routingKey,
+ System.Boolean @nowait,
+ System.Collections.IDictionary @arguments)
+ {
+ QueueBind __req = new QueueBind();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_exchange = @exchange;
+ __req.m_routingKey = @routingKey;
+ __req.m_nowait = @nowait;
+ __req.m_arguments = @arguments;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueueBindOk __rep = __repBase as QueueBindOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void QueueUnbind(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.String @exchange,
+ System.String @routingKey,
+ System.Collections.IDictionary @arguments)
+ {
+ throw new UnsupportedMethodException("QueueUnbind");
+ }
+ public override System.UInt32 QueuePurge(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @nowait)
+ {
+ QueuePurge __req = new QueuePurge();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_nowait = @nowait;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ return 0xFFFFFFFF;
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueuePurgeOk __rep = __repBase as QueuePurgeOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_messageCount;
+ }
+ public override System.UInt32 QueueDelete(
+ System.UInt16 @ticket,
+ System.String @queue,
+ System.Boolean @ifUnused,
+ System.Boolean @ifEmpty,
+ System.Boolean @nowait)
+ {
+ QueueDelete __req = new QueueDelete();
+ __req.m_ticket = @ticket;
+ __req.m_queue = @queue;
+ __req.m_ifUnused = @ifUnused;
+ __req.m_ifEmpty = @ifEmpty;
+ __req.m_nowait = @nowait;
+ if (nowait) {
+ ModelSend(__req,null,null);
+ return 0xFFFFFFFF;
+ }
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ QueueDeleteOk __rep = __repBase as QueueDeleteOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ return __rep.m_messageCount;
+ }
+ public override void BasicQos(
+ System.UInt32 @prefetchSize,
+ System.UInt16 @prefetchCount,
+ System.Boolean @global)
+ {
+ BasicQos __req = new BasicQos();
+ __req.m_prefetchSize = @prefetchSize;
+ __req.m_prefetchCount = @prefetchCount;
+ __req.m_global = @global;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ BasicQosOk __rep = __repBase as BasicQosOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void BasicAck(
+ System.UInt64 @deliveryTag,
+ System.Boolean @multiple)
+ {
+ BasicAck __req = new BasicAck();
+ __req.m_deliveryTag = @deliveryTag;
+ __req.m_multiple = @multiple;
+ ModelSend(__req,null,null);
+ }
+ public override void BasicReject(
+ System.UInt64 @deliveryTag,
+ System.Boolean @requeue)
+ {
+ BasicReject __req = new BasicReject();
+ __req.m_deliveryTag = @deliveryTag;
+ __req.m_requeue = @requeue;
+ ModelSend(__req,null,null);
+ }
+ public override void BasicRecover(
+ System.Boolean @requeue)
+ {
+ BasicRecover __req = new BasicRecover();
+ __req.m_requeue = @requeue;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ BasicRecoverOk __rep = __repBase as BasicRecoverOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void TxSelect()
+ {
+ TxSelect __req = new TxSelect();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ TxSelectOk __rep = __repBase as TxSelectOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void TxCommit()
+ {
+ TxCommit __req = new TxCommit();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ TxCommitOk __rep = __repBase as TxCommitOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void TxRollback()
+ {
+ TxRollback __req = new TxRollback();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ TxRollbackOk __rep = __repBase as TxRollbackOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void DtxSelect()
+ {
+ DtxSelect __req = new DtxSelect();
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ DtxSelectOk __rep = __repBase as DtxSelectOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override void DtxStart(
+ System.String @dtxIdentifier)
+ {
+ DtxStart __req = new DtxStart();
+ __req.m_dtxIdentifier = @dtxIdentifier;
+ RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
+ DtxStartOk __rep = __repBase as DtxStartOk;
+ if (__rep == null) throw new UnexpectedMethodException(__repBase);
+ }
+ public override bool DispatchAsynchronous(RabbitMQ.Client.Impl.Command cmd) {
+ RabbitMQ.Client.Impl.MethodBase __method = (RabbitMQ.Client.Impl.MethodBase) cmd.Method;
+ switch ((__method.ProtocolClassId << 16) | __method.ProtocolMethodId) {
+ case 3932181: {
+ BasicConsumeOk __impl = (BasicConsumeOk) __method;
+ HandleBasicConsumeOk(
+ __impl.m_consumerTag);
+ return true;
+ }
+ case 3932191: {
+ BasicCancelOk __impl = (BasicCancelOk) __method;
+ HandleBasicCancelOk(
+ __impl.m_consumerTag);
+ return true;
+ }
+ case 3932231: {
+ BasicGetOk __impl = (BasicGetOk) __method;
+ HandleBasicGetOk(
+ __impl.m_deliveryTag,
+ __impl.m_redelivered,
+ __impl.m_exchange,
+ __impl.m_routingKey,
+ __impl.m_messageCount,
+ (RabbitMQ.Client.IBasicProperties) cmd.Header,
+ cmd.Body);
+ return true;
+ }
+ case 3932232: {
+ HandleBasicGetEmpty();
+ return true;
+ }
+ case 3932220: {
+ BasicDeliver __impl = (BasicDeliver) __method;
+ HandleBasicDeliver(
+ __impl.m_consumerTag,
+ __impl.m_deliveryTag,
+ __impl.m_redelivered,
+ __impl.m_exchange,
+ __impl.m_routingKey,
+ (RabbitMQ.Client.IBasicProperties) cmd.Header,
+ cmd.Body);
+ return true;
+ }
+ case 3932210: {
+ BasicReturn __impl = (BasicReturn) __method;
+ HandleBasicReturn(
+ __impl.m_replyCode,
+ __impl.m_replyText,
+ __impl.m_exchange,
+ __impl.m_routingKey,
+ (RabbitMQ.Client.IBasicProperties) cmd.Header,
+ cmd.Body);
+ return true;
+ }
+ case 1310760: {
+ ChannelClose __impl = (ChannelClose) __method;
+ HandleChannelClose(
+ __impl.m_replyCode,
+ __impl.m_replyText,
+ __impl.m_classId,
+ __impl.m_methodId);
+ return true;
+ }
+ case 1310761: {
+ HandleChannelCloseOk();
+ return true;
+ }
+ case 655370: {
+ ConnectionStart __impl = (ConnectionStart) __method;
+ HandleConnectionStart(
+ __impl.m_versionMajor,
+ __impl.m_versionMinor,
+ __impl.m_serverProperties,
+ __impl.m_mechanisms,
+ __impl.m_locales);
+ return true;
+ }
+ case 655401: {
+ ConnectionOpenOk __impl = (ConnectionOpenOk) __method;
+ HandleConnectionOpenOk(
+ __impl.m_knownHosts);
+ return true;
+ }
+ case 655410: {
+ ConnectionRedirect __impl = (ConnectionRedirect) __method;
+ HandleConnectionRedirect(
+ __impl.m_host,
+ __impl.m_knownHosts);
+ return true;
+ }
+ case 655420: {
+ ConnectionClose __impl = (ConnectionClose) __method;
+ HandleConnectionClose(
+ __impl.m_replyCode,
+ __impl.m_replyText,
+ __impl.m_classId,
+ __impl.m_methodId);
+ return true;
+ }
+ default: return false;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Configuration/System.Configuration/ChangeLog b/mcs/class/System.Configuration/System.Configuration/ChangeLog
index 2f64f36..6ae39cd 100644
--- a/mcs/class/System.Configuration/System.Configuration/ChangeLog
+++ b/mcs/class/System.Configuration/System.Configuration/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-08 Marek Habersack <mhabersack at novell.com>
+
+ * ConfigurationLocation.cs: if the path passed to constructor
+ starts with any of ' ' '.' '/' or '\', throw an exception. Fixes
+ bug #510735
2008-12-22 Gonzalo Paniagua Javier <gonzalo at novell.com>
diff --git a/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs b/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs
index f0109e9..b151da2 100644
--- a/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs
+++ b/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs
@@ -49,6 +49,16 @@ namespace System.Configuration {
internal ConfigurationLocation (string path, string xmlContent, Configuration parent, bool allowOverride)
{
+ if (!String.IsNullOrEmpty (path)) {
+ switch (path [0]) {
+ case ' ':
+ case '.':
+ case '/':
+ case '\\':
+ throw new ConfigurationErrorsException ("<location> path attribute must be a relative virtual path. It cannot start with any of ' ' '.' '/' or '\\'.");
+ }
+ }
+
this.path = path;
this.xmlContent = xmlContent;
this.parent = parent;
diff --git a/mcs/class/System.Core/System.Linq/ChangeLog b/mcs/class/System.Core/System.Linq/ChangeLog
index 9344c13..b720818 100644
--- a/mcs/class/System.Core/System.Linq/ChangeLog
+++ b/mcs/class/System.Core/System.Linq/ChangeLog
@@ -1,3 +1,22 @@
+2009-05-18 Jb Evain <jbevain at novell.com>
+
+ backport of 134333.
+
+ * Enumerable.cs (Max, Min): fix generic versions.
+
+2009-04-03 Jb Evain <jbevain at novell.com>
+
+ backport of 130961.
+
+ * Enumerable.cs (Cast): fix for when casted enumerator is already
+ of the appropriate type.
+
+2009-03-28 Jb Evain <jbevain at novell.com>
+
+ backport of r130478.
+
+ * Enumerable.cs: fix Intersect.
+
2009-02-23 Jb Evain <jbevain at novell.com>
backport of 127772.
diff --git a/mcs/class/System.Core/System.Linq/Enumerable.cs b/mcs/class/System.Core/System.Linq/Enumerable.cs
index 074d448..328ee51 100644
--- a/mcs/class/System.Core/System.Linq/Enumerable.cs
+++ b/mcs/class/System.Core/System.Linq/Enumerable.cs
@@ -335,6 +335,10 @@ namespace System.Linq
{
Check.Source (source);
+ var actual = source as IEnumerable<TResult>;
+ if (actual != null)
+ return actual;
+
return CreateCastIterator<TResult> (source);
}
@@ -854,7 +858,7 @@ namespace System.Linq
{
var items = new HashSet<TSource> (second, comparer);
foreach (TSource element in first) {
- if (items.Contains (element))
+ if (items.Remove (element))
yield return element;
}
}
@@ -1129,36 +1133,53 @@ namespace System.Linq
return value;
}
- public static TSource Max<TSource> (this IEnumerable<TSource> source)
+ static TSource IterateNullable<TSource> (IEnumerable<TSource> source, Func<TSource, TSource, bool> selector)
{
- Check.Source (source);
+ var value = default (TSource);
- bool notAssigned = true;
- TSource maximum = default (TSource);
- int counter = 0;
- foreach (TSource element in source) {
- if (notAssigned) {
- maximum = element;
- notAssigned = false;
- } else {
- int comparison;
- if (element is IComparable<TSource>)
- comparison = ((IComparable<TSource>) element).CompareTo (maximum);
- else if (element is System.IComparable)
- comparison = ((System.IComparable) element).CompareTo (maximum);
- else
- throw new ArgumentNullException ();
-
- if (comparison > 0)
- maximum = element;
+ foreach (var element in source) {
+ if (element == null)
+ continue;
+
+ if (value == null || selector (element, value))
+ value = element;
+ }
+
+ return value;
+ }
+
+ static TSource IterateNonNullable<TSource> (IEnumerable<TSource> source, Func<TSource, TSource, bool> selector)
+ {
+ var value = default (TSource);
+ bool empty = true;
+ foreach (var element in source) {
+ if (empty) {
+ value = element;
+ empty = false;
+ continue;
}
- counter++;
+
+ if (selector (element, value))
+ value = element;
}
- if (counter == 0)
+ if (empty)
throw new InvalidOperationException ();
- else
- return maximum;
+
+ return value;
+ }
+
+ public static TSource Max<TSource> (this IEnumerable<TSource> source)
+ {
+ Check.Source (source);
+
+ var comparer = Comparer<TSource>.Default;
+ Func<TSource, TSource, bool> compare = (a, b) => comparer.Compare (a, b) > 0;
+
+ if (default (TSource) == null)
+ return IterateNullable (source, compare);
+
+ return IterateNonNullable (source, compare);
}
public static int Max<TSource> (this IEnumerable<TSource> source, Func<TSource, int> selector)
@@ -1249,33 +1270,7 @@ namespace System.Linq
{
Check.SourceAndSelector (source, selector);
- bool notAssigned = true;
- TResult maximum = default (TResult);
- int counter = 0;
- foreach (TSource item in source) {
- TResult element = selector (item);
- if (notAssigned) {
- maximum = element;
- notAssigned = false;
- } else {
- int comparison;
- if (element is IComparable<TResult>)
- comparison = ((IComparable<TResult>) element).CompareTo (maximum);
- else if (element is System.IComparable)
- comparison = ((System.IComparable) element).CompareTo (maximum);
- else
- throw new ArgumentNullException ();
-
- if (comparison > 0)
- maximum = element;
- }
- counter++;
- }
-
- if (counter == 0)
- throw new InvalidOperationException ();
- else
- return maximum;
+ return source.Select (selector).Max ();
}
#endregion
@@ -1356,32 +1351,13 @@ namespace System.Linq
{
Check.Source (source);
- bool notAssigned = true;
- TSource minimum = default (TSource);
- int counter = 0;
- foreach (TSource element in source) {
- if (notAssigned) {
- minimum = element;
- notAssigned = false;
- } else {
- int comparison;
- if (element is IComparable<TSource>)
- comparison = ((IComparable<TSource>) element).CompareTo (minimum);
- else if (element is System.IComparable)
- comparison = ((System.IComparable) element).CompareTo (minimum);
- else
- throw new ArgumentNullException ();
-
- if (comparison < 0)
- minimum = element;
- }
- counter++;
- }
+ var comparer = Comparer<TSource>.Default;
+ Func<TSource, TSource, bool> compare = (a, b) => comparer.Compare (a, b) < 0;
- if (counter == 0)
- throw new InvalidOperationException ();
- else
- return minimum;
+ if (default (TSource) == null)
+ return IterateNullable (source, compare);
+
+ return IterateNonNullable (source, compare);
}
public static int Min<TSource> (this IEnumerable<TSource> source, Func<TSource, int> selector)
@@ -1458,33 +1434,7 @@ namespace System.Linq
{
Check.SourceAndSelector (source, selector);
- bool notAssigned = true;
- TResult minimum = default (TResult);
- int counter = 0;
- foreach (TSource item in source) {
- TResult element = selector (item);
- if (notAssigned) {
- minimum = element;
- notAssigned = false;
- } else {
- int comparison;
- if (element is IComparable<TResult>)
- comparison = ((IComparable<TResult>) element).CompareTo (minimum);
- else if (element is System.IComparable)
- comparison = ((System.IComparable) element).CompareTo (minimum);
- else
- throw new ArgumentNullException ();
-
- if (comparison < 0)
- minimum = element;
- }
- counter++;
- }
-
- if (counter == 0)
- throw new InvalidOperationException ();
- else
- return minimum;
+ return source.Select (selector).Min ();
}
#endregion
diff --git a/mcs/class/System.Core/System.Threading/ChangeLog b/mcs/class/System.Core/System.Threading/ChangeLog
index 90f2538..f9f4d81 100644
--- a/mcs/class/System.Core/System.Threading/ChangeLog
+++ b/mcs/class/System.Core/System.Threading/ChangeLog
@@ -1,3 +1,10 @@
+2009-06-15 Atsushi Enomoto <atsushi at ximian.com>
+
+ * ReaderWriterLockSlim.cs : fix deadlock when entered
+ read lock -> entered writer lock -> exited writer lock
+ -> exited read lock and then entered reader lock.
+ Fixed bug #512485, patch by Kazuki Oikawa.
+
2009-01-18 Marek Safar <marek.safar at gmail.com>
* ReaderWriterLockSlim.cs: Implemented all properties.
diff --git a/mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs b/mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs
index c562510..4745bc9 100644
--- a/mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs
+++ b/mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs
@@ -288,8 +288,11 @@ namespace System.Threading {
}
//Debug.Assert (numUpgradeWaiters > 0);
- write_thread = upgradable_thread = null;
- owners = 0;
+ if (upgradable_thread == Thread.CurrentThread)
+ owners = 1;
+ else
+ owners = 0;
+ write_thread = null;
ExitAndWakeUpAppropriateWaiters ();
}
diff --git a/mcs/class/System.Core/Test/System.Threading/ChangeLog b/mcs/class/System.Core/Test/System.Threading/ChangeLog
index 8c979c5..90c029a 100644
--- a/mcs/class/System.Core/Test/System.Threading/ChangeLog
+++ b/mcs/class/System.Core/Test/System.Threading/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-15 Atsushi Enomoto <atsushi at ximian.com>
+
+ * ReaderWriterLockSlimTest.cs : test for bug #512485, by
+ Kazuki Oikawa.
+
2009-01-18 Marek Safar <marek.safar at gmail.com>
* Initial entry.
diff --git a/mcs/class/System.Core/Test/System.Threading/ReaderWriterLockSlimTest.cs b/mcs/class/System.Core/Test/System.Threading/ReaderWriterLockSlimTest.cs
index fdf8d39..9ea3cf1 100644
--- a/mcs/class/System.Core/Test/System.Threading/ReaderWriterLockSlimTest.cs
+++ b/mcs/class/System.Core/Test/System.Threading/ReaderWriterLockSlimTest.cs
@@ -391,5 +391,18 @@ namespace MonoTests.System.Threading
t.Join ();
}
}
+
+ [Test]
+ public void EnterWriteLock_After_ExitUpgradeableReadLock ()
+ {
+ var v = new ReaderWriterLockSlim ();
+
+ v.EnterUpgradeableReadLock ();
+ Assert.IsTrue (v.TryEnterWriteLock (100));
+ v.ExitWriteLock ();
+ v.ExitUpgradeableReadLock ();
+ Assert.IsTrue (v.TryEnterWriteLock (100));
+ v.ExitWriteLock ();
+ }
}
}
diff --git a/mcs/class/System.Data.DataSetExtensions/System.Data/ChangeLog b/mcs/class/System.Data.DataSetExtensions/System.Data/ChangeLog
index 9bf78e7..fa39725 100644
--- a/mcs/class/System.Data.DataSetExtensions/System.Data/ChangeLog
+++ b/mcs/class/System.Data.DataSetExtensions/System.Data/ChangeLog
@@ -5,6 +5,12 @@
do not throw exception for column value being DBNull but return
null instead.
+2008-08-15 Gert Driesen <drieseng at users.sourceforge.net>
+
+ * DataRowComparer_1.cs: Modified Equals to return true if all column
+ values are equal. Modified ColumnsEqual to use Object.Equals for
+ reference types. Fixes bug #417398.
+
2008-05-14 Atsushi Enomoto <atsushi at ximian.com>
* DataTableExtensions.cs :
diff --git a/mcs/class/System.Data.DataSetExtensions/System.Data/DataRowComparer_1.cs b/mcs/class/System.Data.DataSetExtensions/System.Data/DataRowComparer_1.cs
index 3181ffb..0e44e20 100644
--- a/mcs/class/System.Data.DataSetExtensions/System.Data/DataRowComparer_1.cs
+++ b/mcs/class/System.Data.DataSetExtensions/System.Data/DataRowComparer_1.cs
@@ -61,7 +61,7 @@ namespace System.Data
for (int i = 0; i < columnCount; i++)
if (!ColumnsEqual (leftRow [i], rightRow [i]))
return false;
- return false;
+ return true;
}
bool ColumnsEqual (object leftCol, object rightCol)
@@ -76,8 +76,7 @@ namespace System.Data
if (vt != null && vt.Equals (rightCol))
return true;
-
- return false;
+ return leftCol.Equals (rightCol);
}
public int GetHashCode (TRow row)
diff --git a/mcs/class/System.Data.DataSetExtensions/Test/System.Data/ChangeLog b/mcs/class/System.Data.DataSetExtensions/Test/System.Data/ChangeLog
index 8a53d46..045fe6d 100644
--- a/mcs/class/System.Data.DataSetExtensions/Test/System.Data/ChangeLog
+++ b/mcs/class/System.Data.DataSetExtensions/Test/System.Data/ChangeLog
@@ -2,6 +2,11 @@
* DataRowExtensionsTest.cs: added
+2008-08-15 Gert Driesen <drieseng at users.sourceforge.net>
+
+ * DataRowComparerTest.cs: added tests for Equals and GetHashCode.
+ Enabled GetHashCodeWithVersions test.
+
2008-05-14 Atsushi Enomoto <atsushi at ximian.com>
* DataTableExtensionsTest.cs : new test.
diff --git a/mcs/class/System.Data.DataSetExtensions/Test/System.Data/DataRowComparerTest.cs b/mcs/class/System.Data.DataSetExtensions/Test/System.Data/DataRowComparerTest.cs
index 2be3836..5581cad 100644
--- a/mcs/class/System.Data.DataSetExtensions/Test/System.Data/DataRowComparerTest.cs
+++ b/mcs/class/System.Data.DataSetExtensions/Test/System.Data/DataRowComparerTest.cs
@@ -39,7 +39,176 @@ namespace MonoTests.System.Data
public class DataRowComparerTest
{
[Test]
- [Category ("NotWorking")]
+ public void Default ()
+ {
+ DataRowComparer<DataRow> c1 = DataRowComparer.Default;
+ DataRowComparer<DataRow> c2 = DataRowComparer.Default;
+ Assert.AreSame (c1, c2);
+ }
+
+ [Test]
+ public void Equals ()
+ {
+ DataRowComparer<DataRow> c = DataRowComparer.Default;
+
+ DataTable dtA = new DataTable ("tableA");
+ dtA.Columns.Add ("col1", typeof (int));
+ dtA.Columns.Add ("col2", typeof (string));
+ dtA.Columns.Add ("col3", typeof (DateTime));
+ DataRow r1 = dtA.Rows.Add (3, "bar", new DateTime (2008, 5, 7));
+ DataRow r2 = dtA.Rows.Add (3, "bar", new DateTime (2008, 5, 7));
+
+ Assert.IsTrue (c.Equals (r1, r2), "#A1");
+ r1 ["col1"] = 4;
+ Assert.IsFalse (c.Equals (r1, r2), "#A2");
+ r1 ["col1"] = 3;
+ Assert.IsTrue (c.Equals (r1, r2), "#A3");
+
+ r1 ["col2"] = null;
+ Assert.IsFalse (c.Equals (r1, r2), "#B1");
+ r2 ["col2"] = null;
+ Assert.IsTrue (c.Equals (r1, r2), "#B2");
+ r1 ["col2"] = "bar";
+ Assert.IsFalse (c.Equals (r1, r2), "#B3");
+ r2 ["col2"] = "bar";
+ Assert.IsTrue (c.Equals (r1, r2), "#B4");
+
+ r1 ["col3"] = DBNull.Value;
+ Assert.IsFalse (c.Equals (r1, r2), "#C1");
+ r2 ["col3"] = DBNull.Value;
+ Assert.IsTrue (c.Equals (r1, r2), "#C2");
+ r1 ["col3"] = new DateTime (2008, 5, 7);
+ Assert.IsFalse (c.Equals (r1, r2), "#C3");
+ r2 ["col3"] = new DateTime (2008, 5, 7);
+ Assert.IsTrue (c.Equals (r1, r2), "#C4");
+
+ Assert.IsFalse (c.Equals (r1, null), "#D1");
+ Assert.IsFalse (c.Equals (null, r1), "#D2");
+ Assert.IsTrue (c.Equals (null, null), "#D3");
+
+ // rows do not have to share the same parent
+
+ DataTable dtB = new DataTable ("tableB");
+ dtB.Columns.Add ("colB1", typeof (int));
+ dtB.Columns.Add ("colB2", typeof (string));
+ dtB.Columns.Add ("colB3", typeof (DateTime));
+
+ DataRow r3 = dtB.Rows.Add (3, "bar", new DateTime (2008, 5, 7));
+
+ Assert.IsTrue (c.Equals (r1, r3), "#E1");
+ r1 ["col1"] = 4;
+ Assert.IsFalse (c.Equals (r1, r3), "#E2");
+ r1 ["col1"] = 3;
+ Assert.IsTrue (c.Equals (r1, r3), "#E3");
+
+ // difference in rowstate is ignored
+
+ r1.AcceptChanges ();
+
+ Assert.IsTrue (c.Equals (r1, r2), "#G1");
+ r1 ["col1"] = 4;
+ Assert.IsFalse (c.Equals (r1, r2), "#G2");
+ r1 ["col1"] = 3;
+ Assert.IsTrue (c.Equals (r1, r2), "#G3");
+
+ // rows have different number of columns
+
+ DataTable dtC = new DataTable ("tableC");
+ dtC.Columns.Add ("colC1", typeof (int));
+ dtC.Columns.Add ("colC2", typeof (string));
+
+ DataRow r4 = dtC.Rows.Add (3, "bar");
+
+ Assert.IsFalse (c.Equals (r1, r4), "#H1");
+ r1 ["col3"] = DBNull.Value;
+ Assert.IsFalse (c.Equals (r1, r4), "#H2");
+ }
+
+ [Test]
+ public void Equals_Rows_Detached ()
+ {
+ DataRowComparer<DataRow> c = DataRowComparer.Default;
+
+ DataTable dt = new DataTable ("tableA");
+ dt.Columns.Add ("col1", typeof (int));
+ dt.Columns.Add ("col2", typeof (string));
+ dt.Columns.Add ("col3", typeof (DateTime));
+ DataRow r1 = dt.Rows.Add (3, "bar", new DateTime (2008, 5, 7));
+ DataRow r2 = dt.NewRow ();
+ r2.ItemArray = new object [] { 3, "bar", new DateTime (2008, 5, 7) };
+ DataRow r3 = dt.NewRow ();
+ r3.ItemArray = new object [] { 3, "bar", new DateTime (2008, 5, 7) };
+
+ // left row detached
+ Assert.IsTrue (c.Equals (r2, r1), "#A1");
+ r1 ["col1"] = 4;
+ Assert.IsFalse (c.Equals (r2, r1), "#A2");
+ r1 ["col1"] = 3;
+ Assert.IsTrue (c.Equals (r2, r1), "#A3");
+
+ // right row detached
+ Assert.IsTrue (c.Equals (r1, r2), "#B1");
+ r1 ["col2"] = "baz";
+ Assert.IsFalse (c.Equals (r1, r2), "#B2");
+ r1 ["col2"] = "bar";
+ Assert.IsTrue (c.Equals (r1, r2), "#B3");
+
+ // both rows detached
+ Assert.IsTrue (c.Equals (r2, r3), "#C1");
+ r2 ["col3"] = new DateTime (2008, 6, 7);
+ Assert.IsFalse (c.Equals (r2, r3), "#C2");
+ r2 ["col3"] = new DateTime (2008, 5, 7);
+ Assert.IsTrue (c.Equals (r2, r3), "#C3");
+ }
+
+ [Test]
+ public void Equals_Rows_Deleted ()
+ {
+ DataRowComparer<DataRow> c = DataRowComparer.Default;
+
+ DataTable dtA = new DataTable ("tableA");
+ dtA.Columns.Add ("col1", typeof (int));
+ dtA.Columns.Add ("col2", typeof (string));
+ dtA.Columns.Add ("col3", typeof (DateTime));
+ DataRow r1 = dtA.Rows.Add (3, "bar", new DateTime (2008, 5, 7));
+ DataRow r2 = dtA.Rows.Add (3, "bar", new DateTime (2008, 5, 7));
+
+ r1.Delete ();
+
+ // left row deleted
+ try {
+ c.Equals (r1, r2);
+ Assert.Fail ("#A1");
+ } catch (RowNotInTableException ex) {
+ Assert.AreEqual (typeof (RowNotInTableException), ex.GetType (), "#A2");
+ Assert.IsNull (ex.InnerException, "#A3");
+ Assert.IsNotNull (ex.Message, "#A4");
+ }
+
+ // right row deleted
+ try {
+ c.Equals (r2, r1);
+ Assert.Fail ("#B1");
+ } catch (RowNotInTableException ex) {
+ Assert.AreEqual (typeof (RowNotInTableException), ex.GetType (), "#B2");
+ Assert.IsNull (ex.InnerException, "#B3");
+ Assert.IsNotNull (ex.Message, "#B4");
+ }
+
+ r2.Delete ();
+
+ // both rows deleted
+ try {
+ c.Equals (r2, r1);
+ Assert.Fail ("#C1");
+ } catch (RowNotInTableException ex) {
+ Assert.AreEqual (typeof (RowNotInTableException), ex.GetType (), "#C2");
+ Assert.IsNull (ex.InnerException, "#C3");
+ Assert.IsNotNull (ex.Message, "#C4");
+ }
+ }
+
+ [Test]
public void GetHashCodeWithVersions ()
{
DataSet ds = new DataSet ();
@@ -65,5 +234,21 @@ namespace MonoTests.System.Data
Assert.IsFalse (c.GetHashCode (r1) == c.GetHashCode (r3), "#4");
*/
}
+
+ [Test]
+ public void GetHashCode_Row_Null ()
+ {
+ DataRowComparer<DataRow> c = DataRowComparer.Default;
+
+ try {
+ c.GetHashCode (null);
+ Assert.Fail ("#1");
+ } catch (ArgumentNullException ex) {
+ Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
+ Assert.IsNull (ex.InnerException, "#3");
+ Assert.IsNotNull (ex.Message, "#4");
+ Assert.AreEqual ("row", ex.ParamName, "#5");
+ }
+ }
}
}
diff --git a/mcs/class/System.Data.OracleClient/ChangeLog b/mcs/class/System.Data.OracleClient/ChangeLog
index 531a9e9..aaf9cf2 100644
--- a/mcs/class/System.Data.OracleClient/ChangeLog
+++ b/mcs/class/System.Data.OracleClient/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-29 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * System.Data.OracleClient.dll.sources: Add new file
+
2008-09-24 Daniel Morgan <monodanmorg at yahoo.com>
* Test/testblob.cs
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs
index b68234b..9647825 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs
@@ -658,6 +658,23 @@ namespace System.Data.OracleClient.Oci
out byte min,
out byte sec,
out uint fsec);
+
+ [DllImport ("oci")]
+ internal static extern int OCIIntervalGetDaySecond (IntPtr hndl,
+ IntPtr err,
+ out int days,
+ out int hours,
+ out int mins,
+ out int secs,
+ out int fsec,
+ IntPtr interval);
+
+ [DllImport ("oci")]
+ internal static extern int OCIIntervalGetYearMonth (IntPtr hndl,
+ IntPtr err,
+ out int years,
+ out int months,
+ IntPtr interval);
internal static int OCIDefineByPos (IntPtr stmtp,
out IntPtr defnpp,
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciDataType.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciDataType.cs
index 2b6aca1..60b8dcc 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciDataType.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciDataType.cs
@@ -47,6 +47,8 @@ namespace System.Data.OracleClient.Oci {
RSet = 0x74, // REF CURSOR
OciString = 0x9b,
OciDate = 0x9c,
- TimeStamp = 0xbb
+ TimeStamp = 0xbb,
+ IntervalYearToMonth = 0xbd,
+ IntervalDayToSecond = 0xbe
}
}
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciDefineHandle.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciDefineHandle.cs
index e562299..d278d9c 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciDefineHandle.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciDefineHandle.cs
@@ -54,6 +54,7 @@ namespace System.Data.OracleClient.Oci
OciLobLocator lobLocator;
OciDateTimeDescriptor dateTimeDesc;
+ OciIntervalDescriptor intervalDesc;
#endregion // Fields
@@ -149,6 +150,10 @@ namespace System.Data.OracleClient.Oci
case OciDataType.LongVarChar:
DefineLongVarChar (position, connection);
return;
+ case OciDataType.IntervalDayToSecond:
+ case OciDataType.IntervalYearToMonth:
+ DefineInterval (position, definedType, connection);
+ return;
default:
DefineChar (position, connection); // HANDLE ALL OTHERS AS CHAR FOR NOW
return;
@@ -380,6 +385,51 @@ namespace System.Data.OracleClient.Oci
}
}
+ void DefineInterval (int position, OciDataType type, OracleConnection connection)
+ {
+ ociType = type;
+ fieldType = typeof(string);
+ definedSize = -1;
+
+ switch (type) {
+ case OciDataType.IntervalDayToSecond:
+ definedSize = 11;
+ intervalDesc = (OciIntervalDescriptor) connection.Environment.Allocate (OciHandleType.IntervalDayToSecond);
+ break;
+ case OciDataType.IntervalYearToMonth:
+ intervalDesc = (OciIntervalDescriptor) connection.Environment.Allocate (OciHandleType.IntervalYearToMonth);
+ definedSize = 5;
+ break;
+ }
+
+ if (intervalDesc == null) {
+ OciErrorInfo info = connection.ErrorHandle.HandleError ();
+ throw new OracleException (info.ErrorCode, info.ErrorMessage);
+ }
+
+ value = intervalDesc.Handle;
+ intervalDesc.ErrorHandle = ErrorHandle;
+
+ int status = 0;
+
+ status = OciCalls.OCIDefineByPosPtr (Parent,
+ out handle,
+ ErrorHandle,
+ position + 1,
+ ref value,
+ definedSize,
+ ociType,
+ ref indicator,
+ ref rlenp,
+ IntPtr.Zero,
+ 0);
+
+ if (status != 0) {
+ OciErrorInfo info = connection.ErrorHandle.HandleError ();
+ throw new OracleException (info.ErrorCode, info.ErrorMessage);
+ }
+ }
+
protected override void Dispose (bool disposing)
{
if (!disposed) {
@@ -388,6 +438,8 @@ namespace System.Data.OracleClient.Oci
case OciDataType.Clob:
case OciDataType.Blob:
case OciDataType.TimeStamp:
+ case OciDataType.IntervalDayToSecond:
+ case OciDataType.IntervalYearToMonth:
break;
default:
Marshal.FreeHGlobal (value);
@@ -455,7 +507,7 @@ namespace System.Data.OracleClient.Oci
case OciDataType.Float:
tmp = Marshal.PtrToStringAnsi (Value, Size);
if (tmp != null)
- return Decimal.Parse (String.Copy ((string) tmp), formatProvider);
+ return Decimal.Parse (String.Copy ((string) tmp), formatProvider);
break;
case OciDataType.TimeStamp:
return dateTimeDesc.GetDateTime (conn.Environment, dateTimeDesc.ErrorHandle);
@@ -468,6 +520,10 @@ namespace System.Data.OracleClient.Oci
case OciDataType.Blob:
case OciDataType.Clob:
return GetOracleLob ();
+ case OciDataType.IntervalDayToSecond:
+ return new OracleTimeSpan (intervalDesc.GetDayToSecond (conn.Environment, intervalDesc.ErrorHandle));
+ case OciDataType.IntervalYearToMonth:
+ return new OracleMonthSpan (intervalDesc.GetYearToMonth (conn.Environment, intervalDesc.ErrorHandle));
default:
throw new Exception("OciDataType not implemented: " + DataType.ToString ());
}
@@ -502,6 +558,10 @@ namespace System.Data.OracleClient.Oci
case OciDataType.Long:
case OciDataType.RowIdDescriptor:
return new OracleString ((string) ovalue);
+ case OciDataType.IntervalDayToSecond:
+ return new OracleTimeSpan ((OracleTimeSpan) ovalue);
+ case OciDataType.IntervalYearToMonth:
+ return new OracleMonthSpan ((OracleMonthSpan) ovalue);
default:
// TODO: do other types
throw new NotImplementedException ();
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciHandle.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciHandle.cs
index d22dc62..5ef4cf7 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciHandle.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciHandle.cs
@@ -106,6 +106,9 @@ namespace System.Data.OracleClient.Oci {
return new OciRowIdDescriptor (this, newHandle);
case OciHandleType.TimeStamp:
return new OciDateTimeDescriptor (this, newHandle);
+ case OciHandleType.IntervalDayToSecond:
+ case OciHandleType.IntervalYearToMonth:
+ return new OciIntervalDescriptor (this, type, newHandle);
}
return null;
}
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciIntervalDescriptor.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciIntervalDescriptor.cs
new file mode 100644
index 0000000..843ce01
--- /dev/null
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciIntervalDescriptor.cs
@@ -0,0 +1,92 @@
+//
+// OciIntervalDescriptor.cs - used for an Oracle TIMESPAN/INTERVAL{YTM/DTS}
+//
+// Part of managed C#/.NET library System.Data.OracleClient.dll
+//
+// Part of the Mono class libraries at
+// mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci
+//
+// Assembly: System.Data.OracleClient.dll
+// Namespace: System.Data.OracleClient.Oci
+//
+// Author:
+// Veerapuram Varadhan <vvaradhan at novell.com>
+//
+// Copyright (C) Novell Inc, 2009
+//
+
+using System;
+using System.Data;
+using System.Data.OracleClient;
+using System.Runtime.InteropServices;
+
+namespace System.Data.OracleClient.Oci {
+ internal sealed class OciIntervalDescriptor : OciDescriptorHandle, IDisposable
+ {
+ #region Fields
+
+ OciErrorHandle errorHandle;
+ bool disposed = false;
+
+ #endregion // Fields
+
+ #region Constructors
+
+ public OciIntervalDescriptor (OciHandle parent, OciHandleType type, IntPtr newHandle)
+ : base (type, parent, newHandle)
+ {
+ }
+
+ #endregion // Constructors
+
+ #region Properties
+
+ public OciErrorHandle ErrorHandle {
+ get { return errorHandle; }
+ set { errorHandle = value; }
+ }
+
+ #endregion // Properties
+
+ #region Methods
+
+ protected override void Dispose (bool disposing)
+ {
+ if (!disposed) {
+ disposed = true;
+ base.Dispose (disposing);
+ }
+ }
+
+ public TimeSpan GetDayToSecond (OciHandle handle, OciErrorHandle errorHandle)
+ {
+ int days = 0;
+ int hours = 0;
+ int mins = 0;
+ int secs = 0;
+ int fsec = 0;
+ int fs = 0;
+
+ OciCalls.OCIIntervalGetDaySecond (handle, errorHandle, out days, out hours,
+ out mins, out secs, out fsec, this.handle);
+ if (fsec > 0) {
+ int fseci = (int) fsec;
+ fs = fseci / 1000000;
+ }
+ return new TimeSpan (days, hours, mins, secs, fs);
+ }
+
+ public int GetYearToMonth (OciHandle handle, OciErrorHandle errorHandle)
+ {
+ int years = 0;
+ int months = 0;
+
+ OciCalls.OCIIntervalGetYearMonth (handle, errorHandle, out years, out months, this.handle);
+
+ return ((years * 12) + months);
+ }
+
+ #endregion // Methods
+ }
+}
+
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciParameterDescriptor.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciParameterDescriptor.cs
index 6c419e1..8f6f6dc 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciParameterDescriptor.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciParameterDescriptor.cs
@@ -124,6 +124,10 @@ namespace System.Data.OracleClient.Oci {
return OracleType.DateTime;
case OciDataType.TimeStamp:
return OracleType.Timestamp;
+ case OciDataType.IntervalDayToSecond:
+ return OracleType.IntervalDayToSecond;
+ case OciDataType.IntervalYearToMonth:
+ return OracleType.IntervalYearToMonth;
default:
throw new NotImplementedException ();
}
@@ -186,6 +190,10 @@ namespace System.Data.OracleClient.Oci {
return typeof (System.DateTime);
case "TimeStamp":
return typeof (System.DateTime);
+ case "IntervalDayToSecond":
+ return typeof (System.TimeSpan);
+ case "IntervalYearToMonth":
+ return typeof (System.Int32);
default:
// FIXME: are these types correct?
return typeof(System.String);
@@ -250,6 +258,10 @@ namespace System.Data.OracleClient.Oci {
return "OciDate";
case OciDataType.TimeStamp:
return "TimeStamp";
+ case OciDataType.IntervalDayToSecond:
+ return "IntervalDayToSecond";
+ case OciDataType.IntervalYearToMonth:
+ return "IntervalYearToMonth";
default:
return "Unknown";
}
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.dll.sources b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.dll.sources
index 8c56fe6..6ea5b8b 100755
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.dll.sources
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.dll.sources
@@ -17,6 +17,7 @@ System.Data.OracleClient.Oci/OciErrorInfo.cs
System.Data.OracleClient.Oci/OciExecuteMode.cs
System.Data.OracleClient.Oci/OciHandle.cs
System.Data.OracleClient.Oci/OciHandleType.cs
+System.Data.OracleClient.Oci/OciIntervalDescriptor.cs
System.Data.OracleClient.Oci/OciLobLocator.cs
System.Data.OracleClient.Oci/OciLobType.cs
System.Data.OracleClient.Oci/OciNlsServiceType.cs
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/ChangeLog b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/ChangeLog
index 5aa4bd3..6d58cfa 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/ChangeLog
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/ChangeLog
@@ -1,3 +1,39 @@
+2009-06-04 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * OracleParameter.cs: Infer size only for 2.0 profile when only
+ value is passed. Fixes test failure under 1.1 profile.
+
+2009-06-03 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * OracleParameter.cs: Infer the ocitype before inferring the size
+
+2009-06-03 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * OracleParameter.cs: If a non-zero size is passed, update
+ the size member but sizeSet is updated only when a non-null
+ value is passed.
+
+2009-05-15 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * OracleParameter.cs: Consider DBNull.Value as null and
+ update size and sizeSet accordingly.
+
+2009-05-15 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ ** Fixes #424908
+ * OracleParameter.cs: Make sure size and sizeSet are properly
+ updated whenever value changes.
+
+2009-03-29 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * Fixes #480377
+ * OracleDataReader.cs: Implement MonthSpan and TimeSpan.
+
+2009-03-20 Daniel Morgan <monodanmorg at yahoo.com>
+
+ * OracleCommand.cs: fix suggested by Thracx <SpamMonkey01+Mono at gmail.com>
+ where the parameter was always item zero for an out parameter.
+
2009-02-23 Veerapuram Varadhan <vvaradhan at novell.com>
* OracleException: 2.0 changes - patch submitted by
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs
index 592c98c..db39d3d 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs
@@ -578,7 +578,7 @@ namespace System.Data.OracleClient
if (Parameters.Count > 0) {
for (int p = 0; p < Parameters.Count; p++) {
- OracleParameter parm = Parameters [0];
+ OracleParameter parm = Parameters [p];
if (parm.OracleType.Equals (OracleType.Cursor)) {
if (parm.Direction != ParameterDirection.Input) {
rd = (OracleDataReader) parm.Value;
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleDataReader.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleDataReader.cs
index 4ec2328..881ea3d 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleDataReader.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleDataReader.cs
@@ -422,10 +422,14 @@ namespace System.Data.OracleClient
return new OracleDateTime (GetDateTime (i));
}
- [MonoTODO]
public OracleMonthSpan GetOracleMonthSpan (int i)
{
- throw new NotImplementedException ();
+ if (IsDBNull (i))
+ throw new InvalidOperationException("The value is null");
+
+ OracleMonthSpan output = (OracleMonthSpan) ((OciDefineHandle) statement.Values [i]).GetValue (
+ command.Connection.SessionFormatProvider, command.Connection);
+ return output;
}
public OracleString GetOracleString (int i)
@@ -462,6 +466,10 @@ namespace System.Data.OracleClient
case OciDataType.Long:
case OciDataType.RowIdDescriptor:
return GetOracleString (i);
+ case OciDataType.IntervalDayToSecond:
+ return GetOracleTimeSpan (i);
+ case OciDataType.IntervalYearToMonth:
+ return GetOracleMonthSpan (i);
default:
throw new NotImplementedException ();
}
@@ -484,7 +492,6 @@ namespace System.Data.OracleClient
return retval;
}
- [MonoTODO]
public OracleTimeSpan GetOracleTimeSpan (int i)
{
return new OracleTimeSpan (GetTimeSpan (i));
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs
index 03a59ae..a44d947 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs
@@ -123,9 +123,17 @@ namespace System.Data.OracleClient
{
this.name = name;
this.value = value;
+ InferOracleType (value);
srcColumn = string.Empty;
SourceVersion = DataRowVersion.Current;
- InferOracleType (value);
+
+#if NET_2_0
+ // Find the OciType before inferring for the size
+ if (value != null && value != DBNull.Value) {
+ this.sizeSet = true;
+ this.size = InferSize ();
+ }
+#endif
}
public OracleParameter (string name, OracleType oracleType)
@@ -149,8 +157,13 @@ namespace System.Data.OracleClient
this.name = name;
if (size < 0)
throw new ArgumentException("Size must be not be negative.");
- this.size = size;
+
this.value = value;
+ this.size = size;
+ // set sizeSet to true iff value is not-null or non-zero size value
+ if (value != null && value != DBNull.Value && size > 0)
+ this.sizeSet = true;
+
SourceColumnNullMapping = sourceColumnNullMapping;
OracleType = oracleType;
Direction = direction;
@@ -164,8 +177,14 @@ namespace System.Data.OracleClient
this.name = name;
if (size < 0)
throw new ArgumentException("Size must be not be negative.");
- this.size = size;
+
this.value = value;
+ this.size = size;
+
+ // set sizeSet to true iff value is not-null or non-zero size value
+ if (value != null && value != DBNull.Value && size > 0)
+ this.sizeSet = true;
+
this.isNullable = isNullable;
this.precision = precision;
this.scale = scale;
@@ -353,6 +372,12 @@ namespace System.Data.OracleClient
this.value = value;
if (!oracleTypeSet)
InferOracleType (value);
+#if NET_2_0
+ if (value != null && value != DBNull.Value) {
+ this.size = InferSize ();
+ this.sizeSet = true;
+ }
+#endif
}
}
@@ -865,6 +890,10 @@ namespace System.Data.OracleClient
private void InferOracleType (object value)
{
+ // Should we throw an exception here?
+ if (value == null || value == DBNull.Value)
+ return;
+
Type type = value.GetType ();
string exception = String.Format ("The parameter data type of {0} is invalid.", type.FullName);
switch (type.FullName) {
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/ChangeLog b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/ChangeLog
index 7aeaf5b..760b6e1 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/ChangeLog
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/ChangeLog
@@ -1,3 +1,22 @@
+2009-06-04 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * OracleParameterTest.cs: Enable Constructor2 test for 2.0
+ profile and misc profile specific fixes.
+
+2009-06-03 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * OracleParameterTest.cs: Mark tests for bug #424908 as NotWorking
+ as it requires some more thorough debugging.
+
+2009-06-03 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * OracleParameterTest.cs: Use the member variables for
+ connection/command for executing the tests.
+
+2009-05-15 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * OracleParameterTest.cs: Added tests corresponding to #424908
+
2008-05-07 Gert Driesen <drieseng at users.sourceforge.net>
* OracleDataAdapterTest.cs: Added ctor and basic property tests.
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs
index 4bc6a3e..b72780f 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs
@@ -128,9 +128,6 @@ namespace MonoTests.System.Data.OracleClient
}
[Test] // ctor ()
-#if NET_2_0
- [Category ("NotWorking")] // #A8 fails
-#endif
public void Constructor2 ()
{
OracleParameter param;
@@ -163,7 +160,11 @@ namespace MonoTests.System.Data.OracleClient
Assert.AreEqual (string.Empty, param.ParameterName, "#B5");
Assert.AreEqual ((byte) 0, param.Precision, "#B6");
Assert.AreEqual ((byte) 0, param.Scale, "#B7");
+#if NET_2_0
+ Assert.AreEqual (7, param.Size, "#B8");
+#else
Assert.AreEqual (0, param.Size, "#B8");
+#endif
Assert.AreEqual (string.Empty, param.SourceColumn, "#B9");
#if NET_2_0
Assert.IsFalse (param.SourceColumnNullMapping, "#B10");
@@ -369,5 +370,137 @@ namespace MonoTests.System.Data.OracleClient
"Unexpected result value.");
}
}
+
+ private void ParamSize_SPCreation_ValueInsertion (OracleConnection conn)
+ {
+ string createSP =
+ "CREATE OR REPLACE PROCEDURE GetTextValue \n" +
+ "( \n" +
+ "id IN Number(10),\n" +
+ "text OUT varchar2(64) \n" +
+ ")\n" +
+ "AS\n" +
+ "BEGIN\n" +
+ "SELECT oratest.text INTO text \n" +
+ " FROM oratest\n" +
+ " WHERE oratest.id = id; \n" +
+ "END;\n";
+
+ string insertValue = "INSERT INTO oratest VALUES " +
+ "(424908, \"This is a test for 424908 parameter size bug\", NULL);";
+
+ using (command = conn.CreateCommand ()) {
+ command.CommandText = createSP;
+ command.CommandType = CommandType.Text;
+ command.ExecuteNonQuery ();
+
+ command.CommandText = insertValue;
+ command.ExecuteNonQuery ();
+
+ command.CommandText = "commit";
+ command.ExecuteNonQuery ();
+ }
+ }
+
+ [Test]
+ [Category("NotWorking")]
+ public void ParamSize_424908_ValueError ()
+ {
+ //OracleConnection conn = new OracleConnection (connection_string);
+ //conn.Open ();
+
+ ParamSize_SPCreation_ValueInsertion (connection);
+
+ using (command = connection.CreateCommand ()) {
+
+ OracleParameter id = new OracleParameter ();
+ id.ParameterName = "id";
+ id.OracleType = OracleType.Number;
+ id.Direction = ParameterDirection.Input;
+ id.Value = 424908;
+ command.Parameters.Add (id);
+
+ OracleParameter text = new OracleParameter ();
+ text.ParameterName = "text";
+ text.OracleType = OracleType.NVarChar;
+ text.Direction = ParameterDirection.Output;
+ text.Value = string.Empty;
+ text.Size = 64;
+ command.Parameters.Add (text);
+
+ try {
+ command.CommandType = CommandType.StoredProcedure;
+ command.CommandText = "GetTextValue";
+ command.ExecuteNonQuery ();
+ Assert.Fail ("Expected OracleException not occurred!");
+ } catch (OracleException ex) {
+ Assert.AreEqual ("6502", ex.Code, "Error code mismatch");
+ connection.Close ();
+ }
+ }
+ }
+
+ [Test]
+ [Category("NotWorking")]
+ public void ParamSize_424908_ConstructorSizeSetTest ()
+ {
+ //OracleConnection conn = new OracleConnection (connection_string);
+ //conn.Open ();
+
+ ParamSize_SPCreation_ValueInsertion (connection);
+
+ using (command = connection.CreateCommand ()) {
+ OracleParameter id = new OracleParameter ();
+ id.ParameterName = "id";
+ id.OracleType = OracleType.Number;
+ id.Direction = ParameterDirection.Input;
+ id.Value = 424908;
+ command.Parameters.Add (id);
+
+ OracleParameter text = new OracleParameter ("text", OracleType.NVarChar, 64);
+ text.Direction = ParameterDirection.Output;
+ text.Value = string.Empty;
+ command.Parameters.Add (text);
+
+ command.CommandType = CommandType.StoredProcedure;
+ command.CommandText = "GetTextValue";
+ command.ExecuteNonQuery ();
+
+ Assert.AreEqual ("This is a test for 424908 parameter size bug", text.Value, "OracleParameter value mismatch");
+ }
+ }
+
+ [Test]
+ [Category("NotWorking")]
+ public void ParamSize_424908_SizeNotSetError ()
+ {
+
+ ParamSize_SPCreation_ValueInsertion (connection);
+
+ using (command = connection.CreateCommand ()) {
+ OracleParameter id = new OracleParameter ();
+ id.ParameterName = "id";
+ id.OracleType = OracleType.Number;
+ id.Direction = ParameterDirection.Input;
+ id.Value = 424908;
+ command.Parameters.Add (id);
+
+ OracleParameter text = new OracleParameter ();
+ text.ParameterName = "text";
+ text.OracleType = OracleType.NVarChar;
+ text.Direction = ParameterDirection.Output;
+ text.Value = DBNull.Value;
+ command.Parameters.Add (text);
+
+ try {
+ command.CommandType = CommandType.StoredProcedure;
+ command.CommandText = "GetTextValue";
+ command.ExecuteNonQuery ();
+ Assert.Fail ("Expected System.Exception not occurred!");
+ } catch (Exception ex) {
+ Assert.AreEqual ("Size must be set.", ex.Message, "Exception mismatch");
+ }
+ }
+ }
}
}
diff --git a/mcs/class/System.Data/System.Data.Common/ChangeLog b/mcs/class/System.Data/System.Data.Common/ChangeLog
index 3237854..b4aea34 100644
--- a/mcs/class/System.Data/System.Data.Common/ChangeLog
+++ b/mcs/class/System.Data/System.Data.Common/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-31 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ * Fixes rest of #480377
+ * DataContainer.cs (GetContainerData, GetExplicitValue): Added to handle cases
+ where passed type overloads an explicit operator for conversion of values.
+
2009-01-03 Gert Driesen <drieseng at users.sourceforge.net>
* DbCommandBuilder.cs (QuoteIdentifier): Throw NotSupportedException.
diff --git a/mcs/class/System.Data/System.Data.Common/DataContainer.cs b/mcs/class/System.Data/System.Data.Common/DataContainer.cs
index b284c98..0fe347d 100644
--- a/mcs/class/System.Data/System.Data.Common/DataContainer.cs
+++ b/mcs/class/System.Data/System.Data.Common/DataContainer.cs
@@ -22,6 +22,8 @@
//
using System;
using System.Collections;
+using System.Reflection;
+using System.Reflection.Emit;
namespace System.Data.Common
{
@@ -143,6 +145,63 @@ namespace System.Data.Common
return container;
}
+ internal static object GetExplicitValue (object value)
+ {
+ Type valueType = value.GetType ();
+ MethodInfo method = valueType.GetMethod ("op_Explicit", new Type[]{valueType});
+ if (method != null)
+ return (method.Invoke (value, new object[]{value}));
+ return null;
+ }
+
+ internal object GetContainerData (object value)
+ {
+ object obj;
+
+ if (_type.IsInstanceOfType (value)) {
+ return value;
+ } else if (value is IConvertible) {
+ switch (Type.GetTypeCode(_type)) {
+ case TypeCode.Int16:
+ return (Convert.ToInt16 (value));
+ case TypeCode.Int32:
+ return (Convert.ToInt32 (value));
+ case TypeCode.Int64:
+ return (Convert.ToInt64 (value));
+ case TypeCode.String:
+ return (Convert.ToString (value));
+ case TypeCode.Boolean:
+ return (Convert.ToBoolean (value));
+ case TypeCode.Byte:
+ return (Convert.ToByte (value));
+ case TypeCode.Char:
+ return (Convert.ToChar (value));
+ case TypeCode.Double:
+ return (Convert.ToDouble (value));
+ case TypeCode.SByte:
+ return (Convert.ToSByte (value));
+ case TypeCode.Single:
+ return (Convert.ToSingle (value));
+ case TypeCode.UInt16:
+ return (Convert.ToUInt16 (value));
+ case TypeCode.UInt32:
+ return (Convert.ToUInt32 (value));
+ case TypeCode.UInt64:
+ return (Convert.ToUInt64 (value));
+ case TypeCode.DateTime:
+ return (Convert.ToDateTime (value));
+ case TypeCode.Decimal:
+ return (Convert.ToDecimal (value));
+ default:
+ throw new InvalidCastException ();
+ }
+ } else if ((obj = GetExplicitValue (value)) != null) {
+ return (obj);
+ } else {
+ throw new InvalidCastException ();
+ }
+ }
+
internal bool IsNull (int index)
{
return null_values == null || null_values [index];
@@ -201,7 +260,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is bool ? (bool) value : Convert.ToBoolean (value);
+ _values [index] = (bool) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -250,7 +309,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is char ? (char) value : Convert.ToChar (value);
+ _values [index] = (char) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -303,7 +362,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is byte ? (byte) value : Convert.ToByte (value);
+ _values [index] = (byte) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -356,7 +415,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is sbyte ? (sbyte) value : Convert.ToSByte (value);
+ _values [index] = (sbyte) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -409,7 +468,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is short ? (short) value : Convert.ToInt16 (value);
+ _values [index] = (short) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -462,7 +521,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is ushort ? (ushort) value : Convert.ToUInt16 (value);
+ _values [index] = (ushort) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -515,7 +574,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is int ? (int) value : Convert.ToInt32 (value);
+ _values [index] = (int) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -568,7 +627,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is uint ? (uint) value : Convert.ToUInt32 (value);
+ _values [index] = (uint) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -621,7 +680,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is long ? (long) value : Convert.ToInt64 (value);
+ _values [index] = (long) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -674,7 +733,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is ulong ? (ulong) value : Convert.ToUInt64 (value);
+ _values [index] = (ulong) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -727,7 +786,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is float ? (float) value : Convert.ToSingle (value);
+ _values [index] = (float) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -780,7 +839,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- _values [index] = value is double ? (double) value : Convert.ToDouble (value);
+ _values [index] = (double) GetContainerData (value);
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
@@ -894,7 +953,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- base.SetValue (index, Convert.ToDateTime (value));
+ base.SetValue (index, GetContainerData (value));
}
}
@@ -906,7 +965,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- base.SetValue (index, Convert.ToDecimal (value));
+ base.SetValue (index, GetContainerData (value));
}
}
@@ -920,7 +979,7 @@ namespace System.Data.Common
protected override void SetValue (int index, object value)
{
- SetValue (index, value is string ? (string) value : Convert.ToString (value));
+ SetValue (index, (string) GetContainerData (value));
}
protected override void SetValueFromSafeDataRecord (int index, ISafeDataRecord record, int field)
diff --git a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
index 82ce453..4a48ca8 100644
--- a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
+++ b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
@@ -1,3 +1,13 @@
+2009-05-08 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ ** Fixes #497715
+ * SqlParameter.cs: Map XML type properly.
+
+2009-04-28 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * SqlConnection.cs: if the error causes a disconnection from the
+ server, close the data stream.
+
2009-01-24 Gonzalo Paniagua Javier <gonzalo at novell.com>
* SqlConnection.cs: adapt to changes in TdsConnectionPool.
diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs
index ee1f5b3..3746709 100644
--- a/mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs
+++ b/mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs
@@ -302,6 +302,15 @@ namespace System.Data.SqlClient
private void ErrorHandler (object sender, TdsInternalErrorMessageEventArgs e)
{
+ try {
+ if (!tds.IsConnected)
+ Close ();
+ } catch {
+ try {
+ Close ();
+ } catch {
+ }
+ }
throw new SqlException (e.Class, e.LineNumber, e.Message, e.Number, e.Procedure, e.Server, "Mono SqlClient Data Provider", e.State);
}
diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs
index 06e2a04..1ea5681 100644
--- a/mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs
+++ b/mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs
@@ -628,6 +628,13 @@ namespace System.Data.SqlClient {
MetaParameter.TypeName = "datetime";
sqlDbType = SqlDbType.DateTime;
break;
+#if NET_2_0
+ case DbType.Xml:
+ MetaParameter.TypeName = "xml";
+ sqlDbType = SqlDbType.Xml;
+ MetaParameter.IsVariableSizeType = true;
+ break;
+#endif
default:
string exception = String.Format ("No mapping exists from DbType {0} to a known SqlDbType.", type);
throw new ArgumentException (exception);
@@ -711,6 +718,11 @@ namespace System.Data.SqlClient {
case "sql_variant":
SqlDbType = SqlDbType.Variant;
break;
+#if NET_2_0
+ case "xml":
+ SqlDbType = SqlDbType.Xml;
+ break;
+#endif
default:
SqlDbType = SqlDbType.Variant;
break;
@@ -828,6 +840,14 @@ namespace System.Data.SqlClient {
MetaParameter.TypeName = "sql_variant";
dbType = DbType.Object;
break;
+#if NET_2_0
+ case SqlDbType.Xml:
+ MetaParameter.TypeName = "xml";
+ dbType = DbType.Xml;
+ MetaParameter.IsVariableSizeType = true;
+ break;
+#endif
+
default:
string exception = String.Format ("No mapping exists from SqlDbType {0} to a known DbType.", type);
throw new ArgumentOutOfRangeException ("SqlDbType", exception);
@@ -966,6 +986,9 @@ namespace System.Data.SqlClient {
case SqlDbType.NChar:
case SqlDbType.Text:
case SqlDbType.NText:
+#if NET_2_0
+ case SqlDbType.Xml:
+#endif
return Convert.ChangeType (value, typeof (string));
case SqlDbType.UniqueIdentifier:
return Convert.ChangeType (value, typeof (Guid));
diff --git a/mcs/class/System.Data/System.Data/ChangeLog b/mcs/class/System.Data/System.Data/ChangeLog
index a0b1d31..2fc0808 100644
--- a/mcs/class/System.Data/System.Data/ChangeLog
+++ b/mcs/class/System.Data/System.Data/ChangeLog
@@ -1,3 +1,10 @@
+2009-05-16 Veerapuram Varadhan <vvaradhan at novell.com>
+
+ ** Fixes #325464 - ToolItems.xsd
+ * CustomDataClassGenerator.cs (CreateDataSetTableMembers): Prefix a "_" to
+ member names when it is same as that of the dataset. Fixes the CS0542 error
+ during compilation of the generated source.
+
2009-02-24 Veerapuram Varadhan <vvaradhan at novell.com>
* *Fixes #377146 - in a better way
diff --git a/mcs/class/System.Data/System.Data/CustomDataClassGenerator.cs b/mcs/class/System.Data/System.Data/CustomDataClassGenerator.cs
index d14289f..ef716c3 100644
--- a/mcs/class/System.Data/System.Data/CustomDataClassGenerator.cs
+++ b/mcs/class/System.Data/System.Data/CustomDataClassGenerator.cs
@@ -898,7 +898,7 @@ namespace System.Data
CodeMemberProperty pubTable = new CodeMemberProperty ();
pubTable.Type = TypeRef (tableTypeName);
pubTable.Attributes = MemberAttributes.Public;
- pubTable.Name = tableVarName;
+ pubTable.Name = tableVarName == table.TableName ? "_"+tableVarName : tableVarName;
pubTable.HasSet = false;
// Code: return __table[foo];
pubTable.GetStatements.Add (Return (FieldRef ("__table" + tableVarName)));
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs
index 68adec7..aef613c 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/SignedXml.cs
@@ -595,17 +595,28 @@ namespace System.Security.Cryptography.Xml {
return false;
byte[] actual = macAlg.ComputeHash (s);
- // HMAC signature may be partial
+ // HMAC signature may be partial and specified by <HMACOutputLength>
if (m_signature.SignedInfo.SignatureLength != null) {
- int length = actual.Length;
- try {
- // SignatureLength is in bits
- length = (Int32.Parse (m_signature.SignedInfo.SignatureLength) >> 3);
- }
- catch {
- }
-
- if (length != actual.Length) {
+ int length = Int32.Parse (m_signature.SignedInfo.SignatureLength);
+ // we only support signatures with a multiple of 8 bits
+ // and the value must match the signature length
+ if ((length & 7) != 0)
+ throw new CryptographicException ("Signature length must be a multiple of 8 bits.");
+
+ // SignatureLength is in bits (and we works on bytes, only in multiple of 8 bits)
+ // and both values must match for a signature to be valid
+ length >>= 3;
+ if (length != m_signature.SignatureValue.Length)
+ throw new CryptographicException ("Invalid signature length.");
+
+ // is the length "big" enough to make the signature meaningful ?
+ // we use a minimum of 80 bits (10 bytes) or half the HMAC normal output length
+ // e.g. HMACMD5 output 128 bits but our minimum is 80 bits (not 64 bits)
+ int minimum = Math.Max (10, actual.Length / 2);
+ if (length < minimum)
+ throw new CryptographicException ("HMAC signature is too small");
+
+ if (length < actual.Length) {
byte[] trunked = new byte [length];
Buffer.BlockCopy (actual, 0, trunked, 0, length);
actual = trunked;
diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/ChangeLog b/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/ChangeLog
index 333c7bc..7b8511b 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/ChangeLog
+++ b/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/ChangeLog
@@ -1,3 +1,11 @@
+2009-03-17 Marek Habersack <mhabersack at novell.com>
+
+ * JavaScriptSerializer.cs: if conversion of IDictionary or
+ IDictionary <K,V> to an object is requested, make sure that a
+ concrete type is used (in both cases Dictionary <string, object>).
+ Make sure that if the target type is an IDictionary<K,V> that the
+ key is either an object or a string.
+
2009-03-06 Marek Habersack <mhabersack at novell.com>
* JsonDeserializer.cs: unquoted key values must ignore leading
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 5892383..b3847e3 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
@@ -245,6 +245,20 @@ namespace System.Web.Script.Serialization
}
}
+ if (type.IsGenericType) {
+ if (type.GetGenericTypeDefinition ().IsAssignableFrom (typeof (IDictionary <,>))) {
+ Type[] arguments = type.GetGenericArguments ();
+ if (arguments == null || arguments.Length != 2 || (arguments [0] != typeof (object) && arguments [0] != typeof (string)))
+ throw new InvalidOperationException (
+ "Type '" + type + "' is not not supported for serialization/deserialization of a dictionary, keys must be strings or objects.");
+ if (type.IsAbstract) {
+ Type dictType = typeof (Dictionary <,>);
+ type = dictType.MakeGenericType (arguments [0], arguments [1]);
+ }
+ }
+ } else if (type.IsAssignableFrom (typeof (IDictionary)))
+ type = typeof (Dictionary <string, object>);
+
object target = Activator.CreateInstance (type, true);
foreach (KeyValuePair<string, object> entry in dict) {
diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Services/ChangeLog b/mcs/class/System.Web.Extensions/System.Web.Script.Services/ChangeLog
index 3b40a20..0dfeb10 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Script.Services/ChangeLog
+++ b/mcs/class/System.Web.Extensions/System.Web.Script.Services/ChangeLog
@@ -1,3 +1,13 @@
+2009-06-14 Robert Jordan <robertj at gmx.net>
+
+ * ScriptHandlerFactory.cs: handle precompiled web services.
+
+2009-04-03 Marek Habersack <mhabersack at novell.com>
+
+ * LogicalTypeInfo.cs: don't throw NREX when the passed type
+ doesn't have a parameterless constructor in
+ ShouldGenerateScript. Fixes bug #485435
+
2009-01-26 Marek Habersack <mhabersack at novell.com>
* ClientProxyHandler.cs: before generating the proxy check if the
diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs b/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
index d961e8e..2692c6e 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
@@ -365,7 +365,7 @@ var gtc = Sys.Net.WebServiceProxy._generateTypedConstructor;");
return false;
ConstructorInfo ci = type.GetConstructor (Type.EmptyTypes);
- if (!ci.IsPublic) {
+ if (ci == null || !ci.IsPublic) {
if (throwIfNot)
ThrowOnIncorrectGenerateScriptAttribute ();
return false;
diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Services/ScriptHandlerFactory.cs b/mcs/class/System.Web.Extensions/System.Web.Script.Services/ScriptHandlerFactory.cs
index d1bb30b..77279e7 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Script.Services/ScriptHandlerFactory.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.Script.Services/ScriptHandlerFactory.cs
@@ -30,6 +30,7 @@
using System;
using System.Collections.Generic;
using System.Text;
+using System.Web.Compilation;
using System.Web.Services.Protocols;
using System.Web.UI;
@@ -47,14 +48,20 @@ namespace System.Web.Script.Services
HttpRequest request = context.Request;
string contentType = request.ContentType;
if (!String.IsNullOrEmpty (contentType) && contentType.StartsWith ("application/json", StringComparison.OrdinalIgnoreCase)) {
- Type handlerType;
+ Type handlerType = null;
if (url.EndsWith (ProfileService.DefaultWebServicePath, StringComparison.Ordinal))
handlerType = typeof (ProfileService);
else
if (url.EndsWith (AuthenticationService.DefaultWebServicePath, StringComparison.Ordinal))
handlerType = typeof(AuthenticationService);
- else
- handlerType = WebServiceParser.GetCompiledType (url, context);
+ else {
+#if !TARGET_JVM
+ handlerType = BuildManager.GetCompiledType (url);
+#endif
+ if (handlerType == null)
+ handlerType = WebServiceParser.GetCompiledType (url, context);
+ }
+
return RestHandler.GetHandler (context, handlerType, url);
}
if (request.PathInfo.StartsWith ("/js", StringComparison.OrdinalIgnoreCase))
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI/AsyncPostBackTrigger.cs b/mcs/class/System.Web.Extensions/System.Web.UI/AsyncPostBackTrigger.cs
index 390cab4..64e61ad 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI/AsyncPostBackTrigger.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.UI/AsyncPostBackTrigger.cs
@@ -63,8 +63,16 @@ namespace System.Web.UI
}
}
- protected internal override bool HasTriggered () {
- throw new NotImplementedException ();
+ protected internal override bool HasTriggered ()
+ {
+ Control ctrl = Owner.FindControl (ControlID);
+ string ctrlUniqueID = ctrl != null ? ctrl.UniqueID : null;
+ if (ctrlUniqueID == null)
+ return false;
+
+ if (String.Compare (Owner.ScriptManager.AsyncPostBackSourceElementID, ctrlUniqueID, StringComparison.Ordinal) == 0)
+ return true;
+ return false;
}
// LAME SPEC: it seems DefaultEventAttribute is never queried for the event name.
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI/ChangeLog b/mcs/class/System.Web.Extensions/System.Web.UI/ChangeLog
index ec62b64..c434d46 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI/ChangeLog
+++ b/mcs/class/System.Web.Extensions/System.Web.UI/ChangeLog
@@ -1,3 +1,68 @@
+2009-04-23 Marek Habersack <mhabersack at novell.com>
+
+ * AsyncPostBackTrigger.cs: HasTriggered () must look up the
+ UniqueID of the control specified in the ControlID property or
+ otherwise it may miss certain triggers.
+
+2009-04-11 Marek Habersack <mhabersack at novell.com>
+
+ * UpdatePanel.cs: implemented SingleChildControlCollection to be
+ used in CreateControlCollection ().
+ RequiresUpdate not only checks the update mode and explicit update
+ requests, but also looks if any triggers fired.
+ Initialize () initializes triggers only if partial rendering is
+ supported by the ScriptManager.
+ IsInPartialRendering property no longer returns the value of
+ ScriptManager.IsInPartialRendering. Instead, it relies on the
+ value of instance field which can be set using new internal
+ SetInPartialRendering () method (called from
+ ScriptManager.RenderPageCallback ())
+ Simplified the logic in RenderChildren ().
+
+ * ScriptManager.cs: no need to register panels for refresh in
+ OnPreRenderComplete, this is now done in RenderPageCallback.
+ Modified HasBeenRendered () so that it doesn't query whether the
+ panel has been explicitly updated by the user, but checks whether
+ panel is in the list of panels to refresh.
+ RaisePostDataChangedEvent () doesn't update the panel whose id is
+ named in the POST request for refresh. This is handled in
+ RenderPageCallback.
+ Reverted the changes to WriteCallbackPanel and RenderFormCallback
+ committed in r129774.
+ RenderPageCallback now correctly detects panels to be refreshed
+ (and thus included in the async response).
+
+ * AsyncPostBackTrigger.cs, PostBackTrigger.cs: implemented
+ HasTriggered ().
+
+2009-04-08 Marek Habersack <mhabersack at novell.com>
+
+ * ScriptComponentDescriptor.cs: properties/events/references must
+ be serialized in alphabetical order. This matches what .NET
+ does. Some 3rd party controls depend upon this fact.
+
+2009-04-07 Marek Habersack <mhabersack at novell.com>
+
+ * ScriptComponentDescriptor.cs: new values replace old in
+ AddEntry.
+
+2009-03-19 Marek Habersack <mhabersack at novell.com>
+
+ * ScriptManager.cs: WriteCallbackPanel is called from
+ UpdatePanel.RenderChildren and should not output anything for
+ panels registered as the ones to refresh. If such a panel calls
+ this method, its output is stored in a dictionary to be used later
+ in RenderFormCallback.
+ RenderFormCallback first renders all the form controls. In that
+ process UpdatePanel instances, if any, may call
+ WriteCallbackPanel. After that, if there are panels registered for
+ refresh, another loop over the list is made this time checking
+ whether any panels left their output in WriteCallbackPanel. If a
+ panel hasn't done it it is rendered. And last, another check is
+ done to see if the loop described above caused any panels to leave
+ output in WriteCallbackPanel. If yes, the output is written to the
+ text writer.
+
2009-01-26 Marek Habersack <mhabersack at novell.com>
* ScriptManager.cs: before registering script service reference
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI/PostBackTrigger.cs b/mcs/class/System.Web.Extensions/System.Web.UI/PostBackTrigger.cs
index 5f6bacc..bafe1c7 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI/PostBackTrigger.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.UI/PostBackTrigger.cs
@@ -44,8 +44,11 @@ namespace System.Web.UI
}
}
- protected internal override bool HasTriggered () {
- throw new NotImplementedException ();
+ protected internal override bool HasTriggered ()
+ {
+ // Since this kind of trigger causes a normal postback, we never get
+ // triggered
+ return false;
}
protected internal override void Initialize () {
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI/ScriptComponentDescriptor.cs b/mcs/class/System.Web.Extensions/System.Web.UI/ScriptComponentDescriptor.cs
index 02fcb1e..c6939d9 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI/ScriptComponentDescriptor.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.UI/ScriptComponentDescriptor.cs
@@ -39,9 +39,9 @@ namespace System.Web.UI
string _elementID;
string _type;
string _id;
- Dictionary<string, string> _properties;
- Dictionary<string, string> _events;
- Dictionary<string, string> _references;
+ IDictionary<string, string> _properties;
+ IDictionary<string, string> _events;
+ IDictionary<string, string> _references;
public ScriptComponentDescriptor (string type) {
if (String.IsNullOrEmpty (type))
@@ -135,11 +135,13 @@ namespace System.Web.UI
AddEntry (ref _properties, String.Format ("\"{0}\"", name), script);
}
- void AddEntry (ref Dictionary<string, string> dictionary, string key, string value) {
+ void AddEntry (ref IDictionary<string, string> dictionary, string key, string value) {
if (dictionary == null)
- dictionary = new Dictionary<string, string> ();
+ dictionary = new SortedDictionary<string, string> ();
if (!dictionary.ContainsKey (key))
dictionary.Add (key, value);
+ else
+ dictionary [key] = value;
}
protected internal override string GetScript () {
@@ -157,7 +159,7 @@ namespace System.Web.UI
}
}
- internal static string SerializeDictionary (Dictionary<string, string> dictionary) {
+ internal static string SerializeDictionary (IDictionary<string, string> dictionary) {
if (dictionary == null || dictionary.Count == 0)
return "null";
StringBuilder sb = new StringBuilder ("{");
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs b/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
index 474a254..2d98387 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.UI/ScriptManager.cs
@@ -537,7 +537,7 @@ namespace System.Web.UI
}
StringBuilder sb = new StringBuilder ();
- sb.AppendLine ("if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');");
+ sb.AppendLine ("if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');");
ScriptingProfileServiceSection profileService = (ScriptingProfileServiceSection) WebConfigurationManager.GetSection ("system.web.extensions/scripting/webServices/profileService");
if (profileService != null && profileService.Enabled)
@@ -563,12 +563,6 @@ namespace System.Web.UI
if (IsMultiForm)
RegisterScriptReference (this, ajaxWebFormsExtensionScript, true);
}
-
- if (!String.IsNullOrEmpty (_panelToRefreshID)) {
- UpdatePanel panel = FindPanelWithId (_panelToRefreshID);
- if (panel != null)
- RegisterPanelForRefresh (panel);
- }
// Register Scripts
if (_scriptToRegister != null)
@@ -690,14 +684,23 @@ namespace System.Web.UI
}
#endif
- static bool HasBeenRendered (Control control) {
+ bool PanelRequiresUpdate (UpdatePanel panel)
+ {
+ if (panel == null || _panelsToRefresh == null || _panelsToRefresh.Count == 0)
+ return false;
+
+ return _panelsToRefresh.Contains (panel);
+ }
+
+ bool HasBeenRendered (Control control)
+ {
if (control == null)
return false;
UpdatePanel panel = control as UpdatePanel;
- if (panel != null && panel.RequiresUpdate)
- return true;
-
+ if (PanelRequiresUpdate (panel))
+ return true;
+
return HasBeenRendered (control.Parent);
}
@@ -740,10 +743,9 @@ namespace System.Web.UI
ResolveScriptReference (this, e);
}
- protected virtual void RaisePostDataChangedEvent () {
- UpdatePanel up = Page.FindControl (_panelToRefreshID) as UpdatePanel;
- if (up != null && up.ChildrenAsTriggers)
- up.Update ();
+ protected virtual void RaisePostDataChangedEvent ()
+ {
+ // Why override?
}
public static void RegisterArrayDeclaration (Page page, string arrayName, string arrayValue) {
@@ -813,7 +815,6 @@ namespace System.Web.UI
}
void RegisterScriptReference (Control control, ScriptReference script, bool loadScriptsBeforeUI) {
-
bool isDebugMode = IsDeploymentRetail ? false : (script.ScriptModeInternal == ScriptMode.Inherit ? IsDebuggingEnabled : (script.ScriptModeInternal == ScriptMode.Debug));
string url;
if (!String.IsNullOrEmpty (script.Path)) {
@@ -1205,12 +1206,11 @@ namespace System.Web.UI
else if (_panelsToRefresh.Contains (panel))
return;
- panel.Update ();
_panelsToRefresh.Add (panel);
}
- internal void WriteCallbackPanel (TextWriter output, UpdatePanel panel, StringBuilder panelOutput) {
- RegisterPanelForRefresh (panel);
+ internal void WriteCallbackPanel (TextWriter output, UpdatePanel panel, StringBuilder panelOutput)
+ {
WriteCallbackOutput (output, updatePanel, panel.ClientID, panelOutput);
}
@@ -1244,9 +1244,75 @@ namespace System.Web.UI
output.Write ('|');
}
- void RenderPageCallback (HtmlTextWriter output, Control container) {
+ void RenderPageCallback (HtmlTextWriter output, Control container)
+ {
Page page = (Page) container;
+ // MSDN: http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.aspx
+ //
+ // Refreshing UpdatePanel Content
+ //
+ // When partial-page rendering is enabled, a control can perform a postback
+ // that updates the whole page or an asynchronous postback that updates the
+ // content of one or more UpdatePanel controls. Whether a control causes an
+ // asynchronous postback and updates an UpdatePanel control depends on the
+ // following:
+ //
+ // * If the UpdateMode property of the UpdatePanel control is set to Always,
+ // the UpdatePanel control's content is updated on every postback that
+ // originates from the page. This includes asynchronous postbacks from
+ // controls that are inside other UpdatePanel controls and postbacks from
+ // controls that are not inside UpdatePanel controls.
+ //
+ // * If the UpdateMode property is set to Conditional, the UpdatePanel
+ // control's content is updated in the following circumstances:
+ //
+ // o When you call the Update method of the UpdatePanel control
+ // explicitly.
+ // o When the UpdatePanel control is nested inside another UpdatePanel
+ // control, and the parent panel is updated.
+ // o When a postback is caused by a control that is defined as a
+ // trigger by using the Triggers property of the UpdatePanel
+ // control. In this scenario, the control explicitly triggers an
+ // update of the panel content. The control can be either inside or
+ // outside the UpdatePanel control that the trigger is associated
+ // with.
+ // o When the ChildrenAsTriggers property is set to true and a child
+ // control of the UpdatePanel control causes a postback. Child
+ // controls of nested UpdatePanel controls do not cause an update to
+ // the outer UpdatePanel control unless they are explicitly defined
+ // as triggers.
+ //
+ if (_updatePanels != null && _updatePanels.Count > 0) {
+ bool needsUpdate;
+
+ foreach (UpdatePanel panel in _updatePanels) {
+ if (panel.RequiresUpdate || (!String.IsNullOrEmpty (_panelToRefreshID) && String.Compare (_panelToRefreshID, panel.UniqueID, StringComparison.Ordinal) == 0))
+ needsUpdate = true;
+ else
+ needsUpdate = false;
+
+ if (needsUpdate == false) {
+ Control parent = panel.Parent;
+ UpdatePanel parentPanel;
+
+ bool havePanelsToRefresh = _panelsToRefresh != null ? _panelsToRefresh.Count > 0 : false;
+ while (parent != null) {
+ parentPanel = parent as UpdatePanel;
+ if (havePanelsToRefresh && parentPanel != null && _panelsToRefresh.Contains (parentPanel)) {
+ needsUpdate = true;
+ break;
+ }
+ parent = parent.Parent;
+ }
+ }
+
+ panel.SetInPartialRendering (needsUpdate);
+ if (needsUpdate)
+ RegisterPanelForRefresh (panel);
+ }
+ }
+
page.Form.SetRenderMethodDelegate (RenderFormCallback);
HtmlTextParser parser = new HtmlTextParser (output);
page.Form.RenderControl (parser);
@@ -1323,6 +1389,7 @@ namespace System.Web.UI
return;
var registeredScripts = new Dictionary <string, RegisteredScript> ();
Control control;
+ Page page = Page;
for (int i = 0; i < scriptList.Count; i++) {
RegisteredScript scriptEntry = scriptList [i];
@@ -1330,27 +1397,27 @@ namespace System.Web.UI
continue;
control = scriptEntry.Control;
- if (Page == control || HasBeenRendered (control)) {
+ if (page == control || HasBeenRendered (control)) {
registeredScripts.Add (scriptEntry.Key, scriptEntry);
switch (scriptEntry.ScriptType) {
- case RegisteredScriptType.ClientScriptBlock:
- if (scriptEntry.AddScriptTags)
- WriteCallbackOutput (output, scriptBlock, scriptContentNoTags, scriptEntry.Script);
- else
- WriteCallbackOutput (output, scriptBlock, scriptContentWithTags, SerializeScriptBlock (scriptEntry));
- break;
- case RegisteredScriptType.ClientStartupScript:
- if (scriptEntry.AddScriptTags)
- WriteCallbackOutput (output, scriptStartupBlock, scriptContentNoTags, scriptEntry.Script);
- else
- WriteCallbackOutput (output, scriptStartupBlock, scriptContentWithTags, SerializeScriptBlock (scriptEntry));
- break;
- case RegisteredScriptType.ClientScriptInclude:
- WriteCallbackOutput (output, scriptBlock, scriptPath, scriptEntry.Url);
- break;
- case RegisteredScriptType.OnSubmitStatement:
- WriteCallbackOutput (output, onSubmit, null, scriptEntry.Script);
- break;
+ case RegisteredScriptType.ClientScriptBlock:
+ if (scriptEntry.AddScriptTags)
+ WriteCallbackOutput (output, scriptBlock, scriptContentNoTags, scriptEntry.Script);
+ else
+ WriteCallbackOutput (output, scriptBlock, scriptContentWithTags, SerializeScriptBlock (scriptEntry));
+ break;
+ case RegisteredScriptType.ClientStartupScript:
+ if (scriptEntry.AddScriptTags)
+ WriteCallbackOutput (output, scriptStartupBlock, scriptContentNoTags, scriptEntry.Script);
+ else
+ WriteCallbackOutput (output, scriptStartupBlock, scriptContentWithTags, SerializeScriptBlock (scriptEntry));
+ break;
+ case RegisteredScriptType.ClientScriptInclude:
+ WriteCallbackOutput (output, scriptBlock, scriptPath, scriptEntry.Url);
+ break;
+ case RegisteredScriptType.OnSubmitStatement:
+ WriteCallbackOutput (output, onSubmit, null, scriptEntry.Script);
+ break;
}
}
}
@@ -1397,7 +1464,8 @@ namespace System.Web.UI
throw new InvalidOperationException (String.Format ("The script tag registered for type '{0}' and key '{1}' has invalid characters outside of the script tags: {2}. Only properly formatted script tags can be registered.", scriptEntry.Type, scriptEntry.Key, scriptEntry.Script));
}
- void RenderFormCallback (HtmlTextWriter output, Control container) {
+ void RenderFormCallback (HtmlTextWriter output, Control container)
+ {
output = ((HtmlTextParser) output).ResponseOutput;
HtmlForm form = (HtmlForm) container;
HtmlTextWriter writer = new HtmlDropWriter (output);
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI/UpdatePanel.cs b/mcs/class/System.Web.Extensions/System.Web.UI/UpdatePanel.cs
index 0d2f161..52ca7c4 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI/UpdatePanel.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.UI/UpdatePanel.cs
@@ -44,15 +44,58 @@ namespace System.Web.UI
[AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class UpdatePanel : Control
{
+ sealed class SingleChildControlCollection : ControlCollection
+ {
+ public SingleChildControlCollection (Control owner)
+ : base (owner)
+ {}
+
+ internal void AddInternal (Control child)
+ {
+ base.Add (child);
+ }
+
+ public override void Add (Control child)
+ {
+ throw GetNoChildrenException ();
+ }
+
+ public override void AddAt (int index, Control child)
+ {
+ throw GetNoChildrenException ();
+ }
+
+ public override void Clear ()
+ {
+ throw GetNoChildrenException ();
+ }
+
+ public override void Remove (Control value)
+ {
+ throw GetNoChildrenException ();
+ }
+
+ public override void RemoveAt (int index)
+ {
+ throw GetNoChildrenException ();
+ }
+
+ InvalidOperationException GetNoChildrenException ()
+ {
+ return new InvalidOperationException ("The Controls property of UpdatePanel with ID '" + Owner.ID + "' cannot be modified directly. To change the contents of the UpdatePanel modify the child controls of the ContentTemplateContainer property.");
+ }
+ }
+
ITemplate _contentTemplate;
Control _contentTemplateContainer;
UpdatePanelUpdateMode _updateMode = UpdatePanelUpdateMode.Always;
bool _childrenAsTriggers = true;
- bool _requiresUpdate = false;
+ bool _requiresUpdate;
+ bool _inPartialRendering;
UpdatePanelTriggerCollection _triggers;
UpdatePanelRenderMode _renderMode = UpdatePanelRenderMode.Block;
ScriptManager _scriptManager;
-
+
[Category ("Behavior")]
[DefaultValue (true)]
public bool ChildrenAsTriggers {
@@ -81,23 +124,19 @@ namespace System.Web.UI
get {
if (_contentTemplateContainer == null) {
_contentTemplateContainer = CreateContentTemplateContainer ();
- Controls.Add (_contentTemplateContainer);
+ ((SingleChildControlCollection) Controls).AddInternal (_contentTemplateContainer);
}
return _contentTemplateContainer;
}
}
public override sealed ControlCollection Controls {
- get {
- return base.Controls;
- }
+ get { return base.Controls; }
}
[Browsable (false)]
public bool IsInPartialRendering {
- get {
- return ScriptManager.IsInPartialRendering;
- }
+ get { return _inPartialRendering; }
}
[Category ("Layout")]
@@ -112,7 +151,7 @@ namespace System.Web.UI
protected internal virtual bool RequiresUpdate {
get {
- return UpdateMode == UpdatePanelUpdateMode.Always || _requiresUpdate;
+ return UpdateMode == UpdatePanelUpdateMode.Always || _requiresUpdate || AnyTriggersFired ();
}
}
@@ -139,6 +178,18 @@ namespace System.Web.UI
}
}
+ bool AnyTriggersFired ()
+ {
+ if (_triggers == null || _triggers.Count == 0)
+ return false;
+
+ foreach (UpdatePanelTrigger trigger in _triggers)
+ if (trigger.HasTriggered ())
+ return true;
+
+ return false;
+ }
+
[Category ("Behavior")]
[DefaultValueAttribute (UpdatePanelUpdateMode.Always)]
public UpdatePanelUpdateMode UpdateMode {
@@ -149,30 +200,25 @@ namespace System.Web.UI
_updateMode = value;
}
}
-
- protected virtual Control CreateContentTemplateContainer () {
+
+ protected virtual Control CreateContentTemplateContainer ()
+ {
return new Control ();
}
- [MonoTODO ()]
- protected override sealed ControlCollection CreateControlCollection () {
- // TODO: Because this method is protected and sealed, it is visible to classes that inherit
- // from the UpdatePanel class, but it cannot be overridden. This method overrides
- // the base implementation to return a specialized ControlCollection object that throws
- // an InvalidOperationException when the Add(Control), AddAt(Int32, Control), Clear(),
- // Remove(Control), or RemoveAt(Int32) method of the ControlCollection class is invoked.
- // To change the content of the UpdatePanel control, modify the child controls of
- // the ContentTemplateContainer property.
-
- return base.CreateControlCollection ();
+ protected override sealed ControlCollection CreateControlCollection ()
+ {
+ return new SingleChildControlCollection (this);
}
- protected internal virtual void Initialize () {
- if (_triggers != null) {
- for (int i = 0; i < _triggers.Count; i++) {
- _triggers [i].Initialize ();
- }
- }
+ protected internal virtual void Initialize ()
+ {
+ int tcount = _triggers != null ? _triggers.Count : 0;
+ if (tcount == 0 || !ScriptManager.SupportsPartialRendering)
+ return;
+
+ for (int i = 0; i < tcount; i++)
+ _triggers [i].Initialize ();
}
protected override void OnInit (EventArgs e) {
@@ -211,36 +257,36 @@ namespace System.Web.UI
writer.RenderEndTag ();
}
- protected override void RenderChildren (HtmlTextWriter writer) {
- if (ScriptManager.IsInAsyncPostBack){
- if (!ScriptManager.IsInPartialRendering) {
- ScriptManager.IsInPartialRendering = true;
- ScriptManager.AlternativeHtmlTextWriter altWriter = writer as ScriptManager.AlternativeHtmlTextWriter;
- if (altWriter == null)
- altWriter = writer.InnerWriter as ScriptManager.AlternativeHtmlTextWriter;
- if (altWriter == null)
- throw new InvalidOperationException ("Internal error. Invalid writer object.");
+ protected override void RenderChildren (HtmlTextWriter writer)
+ {
+ if (IsInPartialRendering) {
+ ScriptManager.AlternativeHtmlTextWriter altWriter = writer as ScriptManager.AlternativeHtmlTextWriter;
+ if (altWriter == null)
+ altWriter = writer.InnerWriter as ScriptManager.AlternativeHtmlTextWriter;
+ if (altWriter == null)
+ throw new InvalidOperationException ("Internal error. Invalid writer object.");
- HtmlTextWriter responseOutput = altWriter.ResponseOutput;
- StringBuilder sb = new StringBuilder ();
- HtmlTextWriter w = new HtmlTextWriter (new StringWriter (sb));
- base.RenderChildren (w);
- w.Flush ();
+ HtmlTextWriter responseOutput = altWriter.ResponseOutput;
+ StringBuilder sb = new StringBuilder ();
+ HtmlTextWriter w = new HtmlTextWriter (new StringWriter (sb));
+ base.RenderChildren (w);
+ w.Flush ();
- ScriptManager.WriteCallbackPanel (responseOutput, this, sb);
- ScriptManager.IsInPartialRendering = false;
- }
- else {
- if (ScriptManager.IsInPartialRendering)
- ScriptManager.RegisterChildUpdatePanel (this);
- base.RenderChildren (writer);
- }
- }
- else
+ ScriptManager.WriteCallbackPanel (responseOutput, this, sb);
+ } else
base.RenderChildren (writer);
}
- public void Update () {
+ internal void SetInPartialRendering (bool setting)
+ {
+ _inPartialRendering = setting;
+ }
+
+ public void Update ()
+ {
+ if (UpdateMode == UpdatePanelUpdateMode.Always)
+ throw new InvalidOperationException ("The Update method can only be called on UpdatePanel with ID '" + ID + "' when UpdateMode is set to Conditional.");
+
_requiresUpdate = true;
}
}
diff --git a/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/ChangeLog b/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/ChangeLog
index a091454..d1e26b9 100644
--- a/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/ChangeLog
+++ b/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-17 Marek Habersack <mhabersack at novell.com>
+
+ * JavaScriptSerializerTest.cs: added tests for conversion to
+ IDictionary and IDictionary <K,V> types.
+
2009-03-06 Marek Habersack <mhabersack at novell.com>
* JavaScriptSerializerTest.cs: added a test for unquoted tests
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 a0f230a..3d057c5 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
@@ -1273,5 +1273,45 @@ namespace Tests.System.Web.Script.Serialization
Assert.AreEqual (dictOut.Count, 1, "#1");
Assert.AreEqual (dictOut["hello"], "world", "#2");
}
+
+ [Test]
+ public void ConvertToIDictionary ()
+ {
+ JavaScriptSerializer jss = new JavaScriptSerializer ();
+ string json = "{\"node\":{\"Text\":\"Root Node\",\"Value\":null,\"ExpandMode\":3,\"NavigateUrl\":null,\"PostBack\":true,\"DisabledCssClass\":null,\"SelectedCssClass\":null,\"HoveredCssClass\":null,\"ImageUrl\":null,\"HoveredImageUrl\":null,\"DisabledImageUrl\":null,\"ExpandedImageUrl\":null,\"ContextMenuID\":\"\"},\"context\":{\"NumberOfNodes\":1000}}";
+ object input = jss.Deserialize<IDictionary>(json);
+ IDictionary o = jss.ConvertToType<IDictionary>(input);
+
+ Assert.IsTrue (o != null, "#A1");
+ Assert.AreEqual (typeof (Dictionary <string, object>), o.GetType (), "#A2");
+ }
+
+ [Test]
+ public void ConvertToGenericIDictionary ()
+ {
+ JavaScriptSerializer jss = new JavaScriptSerializer ();
+ string json = "{\"node\":{\"Text\":\"Root Node\",\"Value\":null,\"ExpandMode\":3,\"NavigateUrl\":null,\"PostBack\":true,\"DisabledCssClass\":null,\"SelectedCssClass\":null,\"HoveredCssClass\":null,\"ImageUrl\":null,\"HoveredImageUrl\":null,\"DisabledImageUrl\":null,\"ExpandedImageUrl\":null,\"ContextMenuID\":\"\"},\"context\":{\"NumberOfNodes\":1000}}";
+
+ object input = jss.Deserialize<IDictionary>(json);
+
+ IDictionary <string, object> o = jss.ConvertToType<IDictionary <string, object>>(input);
+ Assert.IsTrue (o != null, "#A1");
+ Assert.AreEqual (typeof (Dictionary <string, object>), o.GetType (), "#A2");
+
+ IDictionary <object, object> o1 = jss.ConvertToType<IDictionary <object, object>>(input);
+ Assert.IsTrue (o1 != null, "#B1");
+ Assert.AreEqual (typeof (Dictionary <object, object>), o1.GetType (), "#B2");
+ }
+
+ [Test]
+ [ExpectedException (typeof (InvalidOperationException))]
+ public void ConvertToGenericIDictionary_InvalidDefinition ()
+ {
+ JavaScriptSerializer jss = new JavaScriptSerializer ();
+ string json = "{\"node\":{\"Text\":\"Root Node\",\"Value\":null,\"ExpandMode\":3,\"NavigateUrl\":null,\"PostBack\":true,\"DisabledCssClass\":null,\"SelectedCssClass\":null,\"HoveredCssClass\":null,\"ImageUrl\":null,\"HoveredImageUrl\":null,\"DisabledImageUrl\":null,\"ExpandedImageUrl\":null,\"ContextMenuID\":\"\"},\"context\":{\"NumberOfNodes\":1000}}";
+
+ object input = jss.Deserialize<IDictionary>(json);
+ IDictionary <int, object> o = jss.ConvertToType<IDictionary <int, object>>(input);
+ }
}
}
diff --git a/mcs/class/System.Web.Mvc/ChangeLog b/mcs/class/System.Web.Mvc/ChangeLog
new file mode 100644
index 0000000..452d71b
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/ChangeLog
@@ -0,0 +1,13 @@
+2009-07-17 Marek Habersack <mhabersack at novell.com>
+
+ * System.Web.Mvc/DefaultModelBinder.cs: applied workaround for gmcs
+ bug which is fixed in trunk but not in the 2.4 branch(es)
+
+2009-04-21 Marek Habersack <mhabersack at novell.com>
+
+ * Makefile: fixed resource ID generation.
+
+2009-04-02 Marek Habersack <mhabersack at novell.com>
+
+ * Initial import of ASP.NET MVC 1.0
+
diff --git a/mcs/class/System.Web.Mvc/GlobalSuppressions.cs b/mcs/class/System.Web.Mvc/GlobalSuppressions.cs
new file mode 100644
index 0000000..3823e4d
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/GlobalSuppressions.cs
@@ -0,0 +1,23 @@
+// This file is used by Code Analysis to maintain SuppressMessage
+// attributes that are applied to this project.
+// Project-level suppressions either have no target or are given
+// a specific target and scoped to a namespace, type, member, etc.
+//
+// To add a suppression to this file, right-click the message in the
+// Error List, point to "Suppress Message(s)", and click
+// "In Project Suppression File".
+// You do not need to add suppressions to this file manually.
+
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Scope = "member", Target = "System.Web.Mvc.TempDataDictionary.#System.Collections.Generic.ICollection`1<System.Collections.Generic.KeyValuePair`2<System.String,System.Object>>.Contains(System.Collections.Generic.KeyValuePair`2<System.String,System.Object>)",
+ Justification = "There are no defined scenarios for wanting to derive from this class, but we don't want to prevent it either.")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Scope = "member", Target = "System.Web.Mvc.TempDataDictionary.#System.Collections.Generic.ICollection`1<System.Collections.Generic.KeyValuePair`2<System.String,System.Object>>.CopyTo(System.Collections.Generic.KeyValuePair`2<System.String,System.Object>[],System.Int32)",
+ Justification = "There are no defined scenarios for wanting to derive from this class, but we don't want to prevent it either.")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Scope = "member", Target = "System.Web.Mvc.TempDataDictionary.#System.Collections.Generic.ICollection`1<System.Collections.Generic.KeyValuePair`2<System.String,System.Object>>.IsReadOnly",
+ Justification = "There are no defined scenarios for wanting to derive from this class, but we don't want to prevent it either.")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "System.Web.Mvc.Ajax",
+ Justification = "Helpers reside within a separate namespace to support alternate helper classes.")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Portability", "CA1903:UseOnlyApiFromTargetedFramework", MessageId = "System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
+ Justification = "The referenced assembly is bin-deployable, so we do not have an SP1 dependency.")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Portability", "CA1903:UseOnlyApiFromTargetedFramework", MessageId = "System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
+ Justification = "The referenced assembly is bin-deployable, so we do not have an SP1 dependency.")]
+
diff --git a/mcs/class/System.Web.Mvc/Makefile b/mcs/class/System.Web.Mvc/Makefile
new file mode 100644
index 0000000..5226ba9
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/Makefile
@@ -0,0 +1,46 @@
+thisdir = class/System.Web.Mvc
+SUBDIRS =
+include ../../build/rules.make
+
+LIBRARY = System.Web.Mvc.dll
+LIBRARY_USE_INTERMEDIATE_FILE = yes
+
+RESX_DIST = System.Web.Mvc/Resources/MvcResources.resx
+ifeq (net_2_0, $(PROFILE))
+RESX_RES = $(RESX_DIST:.resx=.resources)
+endif
+
+LIB_MCS_FLAGS = \
+ /r:System.dll \
+ /r:System.Core.dll \
+ /r:System.Configuration.dll \
+ /r:System.Data.dll \
+ /r:System.Xml.dll \
+ /r:System.Web.dll \
+ /r:System.Web.Abstractions.dll \
+ /r:System.Web.Routing.dll \
+ /r:System.Web.Extensions.dll \
+ $(foreach r, $(RESX_RES), /resource:$(r),System.Web.Mvc.Resources.$(notdir $(r)))
+
+ifeq (2.0, $(FRAMEWORK_VERSION))
+# This is a .NET 3.5 only assembly, but built during the 2.0 build
+LIB_MCS_FLAGS += -d:NET_3_5 -d:MONO
+endif
+
+EXTRA_DISTFILES = $(RESX_DIST)
+
+# This is a .NET 3.5+ assembly
+VALID_PROFILE := $(filter net_2_0 net_4_0, $(PROFILE))
+ifndef VALID_PROFILE
+LIBRARY_NAME = dummy-System.Web.Mvc.dll
+NO_INSTALL = yes
+NO_SIGN_ASSEMBLY = yes
+NO_TEST = yes
+endif
+
+include ../../build/library.make
+
+$(the_lib): $(RESX_RES)
+
+$(RESX_RES): %.resources: %.resx
+ $(RESGEN) `echo $< | $(PLATFORM_CHANGE_SEPARATOR_CMD)`
diff --git a/mcs/class/System.Web.Mvc/Properties/AssemblyInfo.cs b/mcs/class/System.Web.Mvc/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..a86ced3
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/Properties/AssemblyInfo.cs
@@ -0,0 +1,60 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Security;
+
+// 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("System.Web.Mvc.dll")]
+[assembly: AssemblyDescription("System.Web.Mvc.dll")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft Corporation")]
+[assembly: AssemblyProduct("Microsoft® .NET Framework")]
+[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
+[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("4b5f4208-c6b0-4c37-9a41-63325ffa52ad")]
+
+// 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.40310.0")]
+
+[assembly: AllowPartiallyTrustedCallers]
+[assembly: SecurityTransparent]
+[assembly: CLSCompliant(true)]
+[assembly: NeutralResourcesLanguage("en-US")]
+
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile("../winfx.pub")]
diff --git a/mcs/class/System.Web.Mvc/Properties/ChangeLog b/mcs/class/System.Web.Mvc/Properties/ChangeLog
new file mode 100644
index 0000000..3407eea
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/Properties/ChangeLog
@@ -0,0 +1,5 @@
+2009-04-02 Marek Habersack <mhabersack at novell.com>
+
+ * AssemblyInfo.cs: added Mono specific attributes to delay-sign
+ the assembly with the winfx.pub key.
+
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc.dll.sources b/mcs/class/System.Web.Mvc/System.Web.Mvc.dll.sources
new file mode 100644
index 0000000..1f440dd
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc.dll.sources
@@ -0,0 +1,156 @@
+../../build/common/Consts.cs
+../../build/common/MonoTODOAttribute.cs
+GlobalSuppressions.cs
+Properties/AssemblyInfo.cs
+System.Web.Mvc/Resources/MvcResources.Designer.cs
+System.Web.Mvc/AcceptVerbsAttribute.cs
+System.Web.Mvc/ActionDescriptor.cs
+System.Web.Mvc/ActionExecutedContext.cs
+System.Web.Mvc/ActionExecutingContext.cs
+System.Web.Mvc/ActionFilterAttribute.cs
+System.Web.Mvc/ActionMethodDispatcherCache.cs
+System.Web.Mvc/ActionMethodDispatcher.cs
+System.Web.Mvc/ActionMethodSelectorAttribute.cs
+System.Web.Mvc/ActionMethodSelectorCache.cs
+System.Web.Mvc/ActionMethodSelector.cs
+System.Web.Mvc/ActionNameAttribute.cs
+System.Web.Mvc/ActionNameSelectorAttribute.cs
+System.Web.Mvc/ActionResult.cs
+System.Web.Mvc/ActionSelector.cs
+System.Web.Mvc/AntiForgeryData.cs
+System.Web.Mvc/AntiForgeryDataSerializer.cs
+System.Web.Mvc/Ajax/AjaxExtensions.cs
+System.Web.Mvc/Ajax/AjaxOptions.cs
+System.Web.Mvc/AjaxHelper`1.cs
+System.Web.Mvc/AjaxHelper.cs
+System.Web.Mvc/Ajax/InsertionMode.cs
+System.Web.Mvc/AjaxRequestExtensions.cs
+System.Web.Mvc/AntiForgeryToken.cs
+System.Web.Mvc/AntiForgeryTokenSerializer.cs
+System.Web.Mvc/AuthorizationContext.cs
+System.Web.Mvc/AuthorizeAttribute.cs
+System.Web.Mvc/BindAttribute.cs
+System.Web.Mvc/BuildManagerWrapper.cs
+System.Web.Mvc/ContentResult.cs
+System.Web.Mvc/ControllerActionInvoker.cs
+System.Web.Mvc/ControllerBase.cs
+System.Web.Mvc/ControllerBuilder.cs
+System.Web.Mvc/ControllerContext.cs
+System.Web.Mvc/Controller.cs
+System.Web.Mvc/ControllerDescriptorCache.cs
+System.Web.Mvc/ControllerDescriptor.cs
+System.Web.Mvc/ControllerTypeCache.cs
+System.Web.Mvc/CustomModelBinderAttribute.cs
+System.Web.Mvc/DefaultControllerFactory.cs
+System.Web.Mvc/DefaultModelBinder.cs
+System.Web.Mvc/DefaultViewLocationCache.cs
+System.Web.Mvc/DescriptorUtil.cs
+System.Web.Mvc/DictionaryHelpers.cs
+System.Web.Mvc/EmptyResult.cs
+System.Web.Mvc/ExceptionContext.cs
+System.Web.Mvc/FileContentResult.cs
+System.Web.Mvc/FilePathResult.cs
+System.Web.Mvc/FileResult.cs
+System.Web.Mvc/FileStreamResult.cs
+System.Web.Mvc/FilterAttribute.cs
+System.Web.Mvc/FilterInfo.cs
+System.Web.Mvc/FormCollection.cs
+System.Web.Mvc/FormMethod.cs
+System.Web.Mvc/HandleErrorAttribute.cs
+System.Web.Mvc/HandleErrorInfo.cs
+System.Web.Mvc/Html/FormExtensions.cs
+System.Web.Mvc/HtmlHelper`1.cs
+System.Web.Mvc/HtmlHelper.cs
+System.Web.Mvc/Html/InputExtensions.cs
+System.Web.Mvc/Html/LinkExtensions.cs
+System.Web.Mvc/Html/MvcForm.cs
+System.Web.Mvc/Html/RenderPartialExtensions.cs
+System.Web.Mvc/Html/SelectExtensions.cs
+System.Web.Mvc/Html/TextAreaExtensions.cs
+System.Web.Mvc/Html/ValidationExtensions.cs
+System.Web.Mvc/HttpAntiForgeryException.cs
+System.Web.Mvc/HttpPostedFileBaseModelBinder.cs
+System.Web.Mvc/HttpUnauthorizedResult.cs
+System.Web.Mvc/HttpVerbs.cs
+System.Web.Mvc/IActionFilter.cs
+System.Web.Mvc/IActionInvoker.cs
+System.Web.Mvc/IAuthorizationFilter.cs
+System.Web.Mvc/IBuildManager.cs
+System.Web.Mvc/IController.cs
+System.Web.Mvc/IControllerFactory.cs
+System.Web.Mvc/IExceptionFilter.cs
+System.Web.Mvc/IModelBinder.cs
+System.Web.Mvc/InputType.cs
+System.Web.Mvc/IResultFilter.cs
+System.Web.Mvc/ITempDataProvider.cs
+System.Web.Mvc/IView.cs
+System.Web.Mvc/IViewDataContainer.cs
+System.Web.Mvc/IViewEngine.cs
+System.Web.Mvc/IViewLocationCache.cs
+System.Web.Mvc/JavaScriptResult.cs
+System.Web.Mvc/JsonResult.cs
+System.Web.Mvc/ModelBinderAttribute.cs
+System.Web.Mvc/ModelBinderDictionary.cs
+System.Web.Mvc/ModelBinders.cs
+System.Web.Mvc/ModelBindingContext.cs
+System.Web.Mvc/ModelErrorCollection.cs
+System.Web.Mvc/ModelError.cs
+System.Web.Mvc/ModelState.cs
+System.Web.Mvc/ModelStateDictionary.cs
+System.Web.Mvc/MultiSelectList.cs
+System.Web.Mvc/MvcHandler.cs
+System.Web.Mvc/MvcHttpHandler.cs
+System.Web.Mvc/MvcRouteHandler.cs
+System.Web.Mvc/NameValueCollectionExtensions.cs
+System.Web.Mvc/NonActionAttribute.cs
+System.Web.Mvc/NullViewLocationCache.cs
+System.Web.Mvc/OutputCacheAttribute.cs
+System.Web.Mvc/ParameterBindingInfo.cs
+System.Web.Mvc/ParameterDescriptor.cs
+System.Web.Mvc/PartialViewResult.cs
+System.Web.Mvc/PathHelpers.cs
+System.Web.Mvc/ReaderWriterCache`2.cs
+System.Web.Mvc/RedirectResult.cs
+System.Web.Mvc/RedirectToRouteResult.cs
+System.Web.Mvc/ReflectedActionDescriptor.cs
+System.Web.Mvc/ReflectedControllerDescriptor.cs
+System.Web.Mvc/ReflectedParameterBindingInfo.cs
+System.Web.Mvc/ReflectedParameterDescriptor.cs
+System.Web.Mvc/ResultExecutedContext.cs
+System.Web.Mvc/ResultExecutingContext.cs
+System.Web.Mvc/RouteCollectionExtensions.cs
+System.Web.Mvc/RouteValuesHelpers.cs
+System.Web.Mvc/SelectList.cs
+System.Web.Mvc/SelectListItem.cs
+System.Web.Mvc/SessionStateTempDataProvider.cs
+System.Web.Mvc/TagBuilder.cs
+System.Web.Mvc/TagRenderMode.cs
+System.Web.Mvc/TempDataDictionary.cs
+System.Web.Mvc/TypeHelpers.cs
+System.Web.Mvc/UrlHelper.cs
+System.Web.Mvc/ValidateAntiForgeryTokenAttribute.cs
+System.Web.Mvc/ValidateInputAttribute.cs
+System.Web.Mvc/ValueProviderDictionary.cs
+System.Web.Mvc/ValueProviderResult.cs
+System.Web.Mvc/ViewContext.cs
+System.Web.Mvc/ViewDataDictionary`1.cs
+System.Web.Mvc/ViewDataDictionary.cs
+System.Web.Mvc/ViewEngineCollection.cs
+System.Web.Mvc/ViewEngineResult.cs
+System.Web.Mvc/ViewEngines.cs
+System.Web.Mvc/ViewMasterPage`1.cs
+System.Web.Mvc/ViewMasterPage.cs
+System.Web.Mvc/ViewPage`1.cs
+System.Web.Mvc/ViewPageControlBuilder.cs
+System.Web.Mvc/ViewPage.cs
+System.Web.Mvc/ViewResultBase.cs
+System.Web.Mvc/ViewResult.cs
+System.Web.Mvc/ViewTypeControlBuilder.cs
+System.Web.Mvc/ViewType.cs
+System.Web.Mvc/ViewTypeParserFilter.cs
+System.Web.Mvc/ViewUserControl`1.cs
+System.Web.Mvc/ViewUserControlControlBuilder.cs
+System.Web.Mvc/ViewUserControl.cs
+System.Web.Mvc/VirtualPathProviderViewEngine.cs
+System.Web.Mvc/WebFormView.cs
+System.Web.Mvc/WebFormViewEngine.cs
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/AcceptVerbsAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/AcceptVerbsAttribute.cs
new file mode 100644
index 0000000..a404107
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/AcceptVerbsAttribute.cs
@@ -0,0 +1,71 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Linq;
+ using System.Reflection;
+ using System.Web.Mvc.Resources;
+
+ [SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments",
+ Justification = "The accessor is exposed as an ICollection<string>.")]
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
+ public sealed class AcceptVerbsAttribute : ActionMethodSelectorAttribute {
+
+ public AcceptVerbsAttribute(HttpVerbs verbs)
+ : this(EnumToArray(verbs)) {
+ }
+
+ public AcceptVerbsAttribute(params string[] verbs) {
+ if (verbs == null || verbs.Length == 0) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "verbs");
+ }
+
+ Verbs = new ReadOnlyCollection<string>(verbs);
+ }
+
+ public ICollection<string> Verbs {
+ get;
+ private set;
+ }
+
+ private static void AddEntryToList(HttpVerbs verbs, HttpVerbs match, List<string> verbList, string entryText) {
+ if ((verbs & match) != 0) {
+ verbList.Add(entryText);
+ }
+ }
+
+ internal static string[] EnumToArray(HttpVerbs verbs) {
+ List<string> verbList = new List<string>();
+
+ AddEntryToList(verbs, HttpVerbs.Get, verbList, "GET");
+ AddEntryToList(verbs, HttpVerbs.Post, verbList, "POST");
+ AddEntryToList(verbs, HttpVerbs.Put, verbList, "PUT");
+ AddEntryToList(verbs, HttpVerbs.Delete, verbList, "DELETE");
+ AddEntryToList(verbs, HttpVerbs.Head, verbList, "HEAD");
+
+ return verbList.ToArray();
+ }
+
+ public override bool IsValidForRequest(ControllerContext controllerContext, MethodInfo methodInfo) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+
+ string incomingVerb = controllerContext.HttpContext.Request.HttpMethod;
+ return Verbs.Contains(incomingVerb, StringComparer.OrdinalIgnoreCase);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionDescriptor.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionDescriptor.cs
new file mode 100644
index 0000000..1b93c2e
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionDescriptor.cs
@@ -0,0 +1,71 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Reflection;
+
+ public abstract class ActionDescriptor : ICustomAttributeProvider {
+
+ private static readonly ActionSelector[] _emptySelectors = new ActionSelector[0];
+
+ public abstract string ActionName {
+ get;
+ }
+
+ public abstract ControllerDescriptor ControllerDescriptor {
+ get;
+ }
+
+ public abstract object Execute(ControllerContext controllerContext, IDictionary<string, object> parameters);
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public virtual object[] GetCustomAttributes(bool inherit) {
+ return GetCustomAttributes(typeof(object), inherit);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public virtual object[] GetCustomAttributes(Type attributeType, bool inherit) {
+ if (attributeType == null) {
+ throw new ArgumentNullException("attributeType");
+ }
+
+ return (object[])Array.CreateInstance(attributeType, 0);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
+ Justification = "This method may perform non-trivial work.")]
+ public virtual FilterInfo GetFilters() {
+ return new FilterInfo();
+ }
+
+ public abstract ParameterDescriptor[] GetParameters();
+
+ [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
+ Justification = "This method may perform non-trivial work.")]
+ public virtual ICollection<ActionSelector> GetSelectors() {
+ return _emptySelectors;
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public virtual bool IsDefined(Type attributeType, bool inherit) {
+ if (attributeType == null) {
+ throw new ArgumentNullException("attributeType");
+ }
+
+ return false;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionExecutedContext.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionExecutedContext.cs
new file mode 100644
index 0000000..713f3e4
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionExecutedContext.cs
@@ -0,0 +1,68 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+
+ public class ActionExecutedContext : ControllerContext {
+
+ private ActionResult _result;
+
+ // parameterless constructor used for mocking
+ public ActionExecutedContext() {
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
+ Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]
+ public ActionExecutedContext(ControllerContext controllerContext, ActionDescriptor actionDescriptor, bool canceled, Exception exception)
+ : base(controllerContext) {
+ if (actionDescriptor == null) {
+ throw new ArgumentNullException("actionDescriptor");
+ }
+
+ ActionDescriptor = actionDescriptor;
+ Canceled = canceled;
+ Exception = exception;
+ }
+
+ public virtual ActionDescriptor ActionDescriptor {
+ get;
+ set;
+ }
+
+ public virtual bool Canceled {
+ get;
+ set;
+ }
+
+ public virtual Exception Exception {
+ get;
+ set;
+ }
+
+ public bool ExceptionHandled {
+ get;
+ set;
+ }
+
+ public ActionResult Result {
+ get {
+ return _result ?? EmptyResult.Instance;
+ }
+ set {
+ _result = value;
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionExecutingContext.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionExecutingContext.cs
new file mode 100644
index 0000000..51cbfff
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionExecutingContext.cs
@@ -0,0 +1,57 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+
+ public class ActionExecutingContext : ControllerContext {
+
+ // parameterless constructor used for mocking
+ public ActionExecutingContext() {
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
+ Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]
+ public ActionExecutingContext(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary<string, object> actionParameters)
+ : base(controllerContext) {
+ if (actionDescriptor == null) {
+ throw new ArgumentNullException("actionDescriptor");
+ }
+ if (actionParameters == null) {
+ throw new ArgumentNullException("actionParameters");
+ }
+
+ ActionDescriptor = actionDescriptor;
+ ActionParameters = actionParameters;
+ }
+
+ public virtual ActionDescriptor ActionDescriptor {
+ get;
+ set;
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "The property setter is only here to support mocking this type and should not be called at runtime.")]
+ public virtual IDictionary<string, object> ActionParameters {
+ get;
+ set;
+ }
+
+ public ActionResult Result {
+ get;
+ set;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionFilterAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionFilterAttribute.cs
new file mode 100644
index 0000000..ebe69a1
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionFilterAttribute.cs
@@ -0,0 +1,34 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
+ public abstract class ActionFilterAttribute : FilterAttribute, IActionFilter, IResultFilter {
+
+ // The OnXxx() methods are virtual rather than abstract so that a developer need override
+ // only the ones that interest him.
+
+ public virtual void OnActionExecuting(ActionExecutingContext filterContext) {
+ }
+
+ public virtual void OnActionExecuted(ActionExecutedContext filterContext) {
+ }
+
+ public virtual void OnResultExecuting(ResultExecutingContext filterContext) {
+ }
+
+ public virtual void OnResultExecuted(ResultExecutedContext filterContext) {
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodDispatcher.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodDispatcher.cs
new file mode 100644
index 0000000..5a48875
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodDispatcher.cs
@@ -0,0 +1,86 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq.Expressions;
+ using System.Reflection;
+
+ // The methods in this class don't perform error checking; that is the responsibility of the
+ // caller.
+ internal sealed class ActionMethodDispatcher {
+
+ private delegate object ActionExecutor(ControllerBase controller, object[] parameters);
+ private delegate void VoidActionExecutor(ControllerBase controller, object[] parameters);
+
+ private ActionExecutor _executor;
+
+ public ActionMethodDispatcher(MethodInfo methodInfo) {
+ _executor = GetExecutor(methodInfo);
+ MethodInfo = methodInfo;
+ }
+
+ public MethodInfo MethodInfo {
+ get;
+ private set;
+ }
+
+ public object Execute(ControllerBase controller, object[] parameters) {
+ return _executor(controller, parameters);
+ }
+
+ private static ActionExecutor GetExecutor(MethodInfo methodInfo) {
+ // Parameters to executor
+ ParameterExpression controllerParameter = Expression.Parameter(typeof(ControllerBase), "controller");
+ ParameterExpression parametersParameter = Expression.Parameter(typeof(object[]), "parameters");
+
+ // Build parameter list
+ List<Expression> parameters = new List<Expression>();
+ ParameterInfo[] paramInfos = methodInfo.GetParameters();
+ for (int i = 0; i < paramInfos.Length; i++) {
+ ParameterInfo paramInfo = paramInfos[i];
+ BinaryExpression valueObj = Expression.ArrayIndex(parametersParameter, Expression.Constant(i));
+ UnaryExpression valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
+
+ // valueCast is "(Ti) parameters[i]"
+ parameters.Add(valueCast);
+ }
+
+ // Call method
+ UnaryExpression instanceCast = (!methodInfo.IsStatic) ? Expression.Convert(controllerParameter, methodInfo.ReflectedType) : null;
+ MethodCallExpression methodCall = methodCall = Expression.Call(instanceCast, methodInfo, parameters);
+
+ // methodCall is "((TController) controller) method((T0) parameters[0], (T1) parameters[1], ...)"
+ // Create function
+ if (methodCall.Type == typeof(void)) {
+ Expression<VoidActionExecutor> lambda = Expression.Lambda<VoidActionExecutor>(methodCall, controllerParameter, parametersParameter);
+ VoidActionExecutor voidExecutor = lambda.Compile();
+ return WrapVoidAction(voidExecutor);
+ }
+ else {
+ // must coerce methodCall to match ActionExecutor signature
+ UnaryExpression castMethodCall = Expression.Convert(methodCall, typeof(object));
+ Expression<ActionExecutor> lambda = Expression.Lambda<ActionExecutor>(castMethodCall, controllerParameter, parametersParameter);
+ return lambda.Compile();
+ }
+ }
+
+ private static ActionExecutor WrapVoidAction(VoidActionExecutor executor) {
+ return delegate(ControllerBase controller, object[] parameters) {
+ executor(controller, parameters);
+ return null;
+ };
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodDispatcherCache.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodDispatcherCache.cs
new file mode 100644
index 0000000..b36bfac
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodDispatcherCache.cs
@@ -0,0 +1,27 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Reflection;
+
+ internal sealed class ActionMethodDispatcherCache : ReaderWriterCache<MethodInfo,ActionMethodDispatcher> {
+
+ public ActionMethodDispatcherCache() {
+ }
+
+ public ActionMethodDispatcher GetDispatcher(MethodInfo methodInfo) {
+ return FetchOrCreateItem(methodInfo, () => new ActionMethodDispatcher(methodInfo));
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodSelector.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodSelector.cs
new file mode 100644
index 0000000..ee5d0f4
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodSelector.cs
@@ -0,0 +1,125 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Globalization;
+ using System.Linq;
+ using System.Reflection;
+ using System.Text;
+ using System.Web.Mvc.Resources;
+
+ internal sealed class ActionMethodSelector {
+
+ public ActionMethodSelector(Type controllerType) {
+ ControllerType = controllerType;
+ PopulateLookupTables();
+ }
+
+ public Type ControllerType {
+ get;
+ private set;
+ }
+
+ public MethodInfo[] AliasedMethods {
+ get;
+ private set;
+ }
+
+ public ILookup<string, MethodInfo> NonAliasedMethods {
+ get;
+ private set;
+ }
+
+ private AmbiguousMatchException CreateAmbiguousMatchException(List<MethodInfo> ambiguousMethods, string actionName) {
+ StringBuilder exceptionMessageBuilder = new StringBuilder();
+ foreach (MethodInfo methodInfo in ambiguousMethods) {
+ string controllerAction = Convert.ToString(methodInfo, CultureInfo.CurrentUICulture);
+ string controllerType = methodInfo.DeclaringType.FullName;
+ exceptionMessageBuilder.AppendLine();
+ exceptionMessageBuilder.AppendFormat(CultureInfo.CurrentUICulture, MvcResources.ActionMethodSelector_AmbiguousMatchType, controllerAction, controllerType);
+ }
+ string message = String.Format(CultureInfo.CurrentUICulture, MvcResources.ActionMethodSelector_AmbiguousMatch,
+ actionName, ControllerType.Name, exceptionMessageBuilder);
+ return new AmbiguousMatchException(message);
+ }
+
+ public MethodInfo FindActionMethod(ControllerContext controllerContext, string actionName) {
+ List<MethodInfo> methodsMatchingName = GetMatchingAliasedMethods(controllerContext, actionName);
+ methodsMatchingName.AddRange(NonAliasedMethods[actionName]);
+ List<MethodInfo> finalMethods = RunSelectionFilters(controllerContext, methodsMatchingName);
+
+ switch (finalMethods.Count) {
+ case 0:
+ return null;
+
+ case 1:
+ return finalMethods[0];
+
+ default:
+ throw CreateAmbiguousMatchException(finalMethods, actionName);
+ }
+ }
+
+ internal List<MethodInfo> GetMatchingAliasedMethods(ControllerContext controllerContext, string actionName) {
+ // find all aliased methods which are opting in to this request
+ // to opt in, all attributes defined on the method must return true
+
+ var methods = from methodInfo in AliasedMethods
+ let attrs = (ActionNameSelectorAttribute[])methodInfo.GetCustomAttributes(typeof(ActionNameSelectorAttribute), true /* inherit */)
+ where attrs.All(attr => attr.IsValidName(controllerContext, actionName, methodInfo))
+ select methodInfo;
+ return methods.ToList();
+ }
+
+ private static bool IsMethodDecoratedWithAliasingAttribute(MethodInfo methodInfo) {
+ return methodInfo.IsDefined(typeof(ActionNameSelectorAttribute), true /* inherit */);
+ }
+
+ private static bool IsValidActionMethod(MethodInfo methodInfo) {
+ return !(methodInfo.IsSpecialName ||
+ methodInfo.GetBaseDefinition().DeclaringType.IsAssignableFrom(typeof(Controller)));
+ }
+
+ private void PopulateLookupTables() {
+ MethodInfo[] allMethods = ControllerType.GetMethods(BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public);
+ MethodInfo[] actionMethods = Array.FindAll(allMethods, IsValidActionMethod);
+
+ AliasedMethods = Array.FindAll(actionMethods, IsMethodDecoratedWithAliasingAttribute);
+ NonAliasedMethods = actionMethods.Except(AliasedMethods).ToLookup(method => method.Name, StringComparer.OrdinalIgnoreCase);
+ }
+
+ private static List<MethodInfo> RunSelectionFilters(ControllerContext controllerContext, List<MethodInfo> methodInfos) {
+ // remove all methods which are opting out of this request
+ // to opt out, at least one attribute defined on the method must return false
+
+ List<MethodInfo> matchesWithSelectionAttributes = new List<MethodInfo>();
+ List<MethodInfo> matchesWithoutSelectionAttributes = new List<MethodInfo>();
+
+ foreach (MethodInfo methodInfo in methodInfos) {
+ ActionMethodSelectorAttribute[] attrs = (ActionMethodSelectorAttribute[])methodInfo.GetCustomAttributes(typeof(ActionMethodSelectorAttribute), true /* inherit */);
+ if (attrs.Length == 0) {
+ matchesWithoutSelectionAttributes.Add(methodInfo);
+ }
+ else if (attrs.All(attr => attr.IsValidForRequest(controllerContext, methodInfo))) {
+ matchesWithSelectionAttributes.Add(methodInfo);
+ }
+ }
+
+ // if a matching action method had a selection attribute, consider it more specific than a matching action method
+ // without a selection attribute
+ return (matchesWithSelectionAttributes.Count > 0) ? matchesWithSelectionAttributes : matchesWithoutSelectionAttributes;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodSelectorAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodSelectorAttribute.cs
new file mode 100644
index 0000000..891d141
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodSelectorAttribute.cs
@@ -0,0 +1,21 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Reflection;
+
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
+ public abstract class ActionMethodSelectorAttribute : Attribute {
+ public abstract bool IsValidForRequest(ControllerContext controllerContext, MethodInfo methodInfo);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodSelectorCache.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodSelectorCache.cs
new file mode 100644
index 0000000..11a20c6
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionMethodSelectorCache.cs
@@ -0,0 +1,51 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Threading;
+
+ internal sealed class ActionMethodSelectorCache {
+
+ private ReaderWriterLock _rwLock = new ReaderWriterLock();
+ private Dictionary<Type, ActionMethodSelector> _selectorDictionary = new Dictionary<Type, ActionMethodSelector>();
+
+ // This method could potentially return multiple selectors for the same controllerType due to
+ // upgrading the lock from reader to writer, but the dictionary won't be corrupted as a result.
+ public ActionMethodSelector GetSelector(Type controllerType) {
+ ActionMethodSelector selector;
+
+ _rwLock.AcquireReaderLock(Timeout.Infinite);
+ try {
+ if (_selectorDictionary.TryGetValue(controllerType, out selector)) {
+ return selector;
+ }
+ }
+ finally {
+ _rwLock.ReleaseReaderLock();
+ }
+
+ // if we got this far, the selector was not in the cache
+ selector = new ActionMethodSelector(controllerType);
+ _rwLock.AcquireWriterLock(Timeout.Infinite);
+ try {
+ _selectorDictionary[controllerType] = selector;
+ return selector;
+ }
+ finally {
+ _rwLock.ReleaseWriterLock();
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionNameAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionNameAttribute.cs
new file mode 100644
index 0000000..193eab8
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionNameAttribute.cs
@@ -0,0 +1,39 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Reflection;
+ using System.Web.Mvc.Resources;
+
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
+ public sealed class ActionNameAttribute : ActionNameSelectorAttribute {
+
+ public ActionNameAttribute(string name) {
+ if (String.IsNullOrEmpty(name)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "name");
+ }
+
+ Name = name;
+ }
+
+ public string Name {
+ get;
+ private set;
+ }
+
+ public override bool IsValidName(ControllerContext controllerContext, string actionName, MethodInfo methodInfo) {
+ return String.Equals(actionName, Name, StringComparison.OrdinalIgnoreCase);
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionNameSelectorAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionNameSelectorAttribute.cs
new file mode 100644
index 0000000..819f0a2
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionNameSelectorAttribute.cs
@@ -0,0 +1,21 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Reflection;
+
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
+ public abstract class ActionNameSelectorAttribute : Attribute {
+ public abstract bool IsValidName(ControllerContext controllerContext, string actionName, MethodInfo methodInfo);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionResult.cs
new file mode 100644
index 0000000..3b0d047
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionResult.cs
@@ -0,0 +1,21 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public abstract class ActionResult {
+
+ public abstract void ExecuteResult(ControllerContext context);
+
+ }
+
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionSelector.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionSelector.cs
new file mode 100644
index 0000000..b4bdeaa
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ActionSelector.cs
@@ -0,0 +1,17 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public delegate bool ActionSelector(ControllerContext controllerContext);
+
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Ajax/AjaxExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Ajax/AjaxExtensions.cs
new file mode 100644
index 0000000..bbf673a
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Ajax/AjaxExtensions.cs
@@ -0,0 +1,295 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Ajax {
+ using System;
+ using System.Collections.Generic;
+ using System.ComponentModel;
+ using System.Globalization;
+ using System.Web;
+ using System.Web.Mvc;
+ using System.Web.Mvc.Html;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ public static class AjaxExtensions {
+ private const string LinkOnClickFormat = "Sys.Mvc.AsyncHyperlink.handleClick(this, new Sys.UI.DomEvent(event), {0});";
+ private const string FormOnSubmitFormat = "Sys.Mvc.AsyncForm.handleSubmit(this, new Sys.UI.DomEvent(event), {0});";
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, AjaxOptions ajaxOptions) {
+ return ActionLink(ajaxHelper, linkText, actionName, (string)null /* controllerName */, ajaxOptions);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, object routeValues, AjaxOptions ajaxOptions) {
+ return ActionLink(ajaxHelper, linkText, actionName, (string)null /* controllerName */, routeValues, ajaxOptions);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes) {
+ return ActionLink(ajaxHelper, linkText, actionName, (string)null /* controllerName */, routeValues, ajaxOptions, htmlAttributes);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions) {
+ return ActionLink(ajaxHelper, linkText, actionName, (string)null /* controllerName */, routeValues, ajaxOptions);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ return ActionLink(ajaxHelper, linkText, actionName, (string)null /* controllerName */, routeValues, ajaxOptions, htmlAttributes);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, AjaxOptions ajaxOptions) {
+ return ActionLink(ajaxHelper, linkText, actionName, controllerName, null /* values */, ajaxOptions, null /* htmlAttributes */);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, object routeValues, AjaxOptions ajaxOptions) {
+ return ActionLink(ajaxHelper, linkText, actionName, controllerName, routeValues, ajaxOptions, null /* htmlAttributes */);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes) {
+ RouteValueDictionary newValues = new RouteValueDictionary(routeValues);
+ Dictionary<string, object> newAttributes = ObjectToCaseSensitiveDictionary(htmlAttributes);
+ return ActionLink(ajaxHelper, linkText, actionName, controllerName, newValues, ajaxOptions, newAttributes);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions) {
+ return ActionLink(ajaxHelper, linkText, actionName, controllerName, routeValues, ajaxOptions, null /* htmlAttributes */);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(linkText)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "linkText");
+ }
+
+ string targetUrl = UrlHelper.GenerateUrl(null, actionName, controllerName, routeValues, ajaxHelper.RouteCollection, ajaxHelper.ViewContext.RequestContext, true /* includeImplicitMvcValues */);
+
+ return GenerateLink(linkText, targetUrl, GetAjaxOptions(ajaxOptions), htmlAttributes);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, string protocol, string hostName, string fragment, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes) {
+ RouteValueDictionary newValues = new RouteValueDictionary(routeValues);
+ Dictionary<string, object> newAttributes = ObjectToCaseSensitiveDictionary(htmlAttributes);
+ return ActionLink(ajaxHelper, linkText, actionName, controllerName, protocol, hostName, fragment, newValues, ajaxOptions, newAttributes);
+ }
+
+ public static string ActionLink(this AjaxHelper ajaxHelper, string linkText, string actionName, string controllerName, string protocol, string hostName, string fragment, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(linkText)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "linkText");
+ }
+
+ string targetUrl = UrlHelper.GenerateUrl(null /* routeName */, actionName, controllerName, protocol, hostName, fragment, routeValues, ajaxHelper.RouteCollection, ajaxHelper.ViewContext.RequestContext, true /* includeImplicitMvcValues */);
+
+ return GenerateLink(linkText, targetUrl, ajaxOptions, htmlAttributes);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, AjaxOptions ajaxOptions) {
+ string formAction = ajaxHelper.ViewContext.HttpContext.Request.RawUrl;
+
+ TagBuilder builder = new TagBuilder("form");
+
+ builder.MergeAttribute("action", formAction);
+ builder.MergeAttribute("method", "post");
+ builder.MergeAttribute("onsubmit", GenerateAjaxScript(GetAjaxOptions(ajaxOptions), FormOnSubmitFormat));
+
+ HttpResponseBase response = ajaxHelper.ViewContext.HttpContext.Response;
+ response.Write(builder.ToString(TagRenderMode.StartTag));
+ return new MvcForm(response);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, AjaxOptions ajaxOptions) {
+ return BeginForm(ajaxHelper, actionName, (string)null /* controllerName */, ajaxOptions);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, object routeValues, AjaxOptions ajaxOptions) {
+ return BeginForm(ajaxHelper, actionName, (string)null /* controllerName */, routeValues, ajaxOptions);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes) {
+ return BeginForm(ajaxHelper, actionName, (string)null /* controllerName */, routeValues, ajaxOptions, htmlAttributes);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions) {
+ return BeginForm(ajaxHelper, actionName, (string)null /* controllerName */, routeValues, ajaxOptions);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ return BeginForm(ajaxHelper, actionName, (string)null /* controllerName */, routeValues, ajaxOptions, htmlAttributes);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, string controllerName, AjaxOptions ajaxOptions) {
+ return BeginForm(ajaxHelper, actionName, controllerName, null /* values */, ajaxOptions, null /* htmlAttributes */);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, string controllerName, object routeValues, AjaxOptions ajaxOptions) {
+ return BeginForm(ajaxHelper, actionName, controllerName, routeValues, ajaxOptions, null /* htmlAttributes */);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, string controllerName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes) {
+ RouteValueDictionary newValues = new RouteValueDictionary(routeValues);
+ Dictionary<string, object> newAttributes = ObjectToCaseSensitiveDictionary(htmlAttributes);
+ return BeginForm(ajaxHelper, actionName, controllerName, newValues, ajaxOptions, newAttributes);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, string controllerName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions) {
+ return BeginForm(ajaxHelper, actionName, controllerName, routeValues, ajaxOptions, null /* htmlAttributes */);
+ }
+
+ public static MvcForm BeginForm(this AjaxHelper ajaxHelper, string actionName, string controllerName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ // get target URL
+ string formAction = UrlHelper.GenerateUrl(null, actionName, controllerName, routeValues ?? new RouteValueDictionary(), ajaxHelper.RouteCollection, ajaxHelper.ViewContext.RequestContext, true /* includeImplicitMvcValues */);
+ return FormHelper(ajaxHelper, formAction, ajaxOptions, htmlAttributes);
+ }
+
+ public static MvcForm BeginRouteForm(this AjaxHelper ajaxHelper, string routeName, AjaxOptions ajaxOptions) {
+ return BeginRouteForm(ajaxHelper, routeName, null /* routeValues */, ajaxOptions, null /* htmlAttributes */);
+ }
+
+ public static MvcForm BeginRouteForm(this AjaxHelper ajaxHelper, string routeName, object routeValues, AjaxOptions ajaxOptions) {
+ return BeginRouteForm(ajaxHelper, routeName, (object)routeValues, ajaxOptions, null /* htmlAttributes */);
+ }
+
+ public static MvcForm BeginRouteForm(this AjaxHelper ajaxHelper, string routeName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes) {
+ Dictionary<string, object> newAttributes = ObjectToCaseSensitiveDictionary(htmlAttributes);
+ return BeginRouteForm(ajaxHelper, routeName, new RouteValueDictionary(routeValues), ajaxOptions, newAttributes);
+ }
+
+ public static MvcForm BeginRouteForm(this AjaxHelper ajaxHelper, string routeName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions) {
+ return BeginRouteForm(ajaxHelper, routeName, routeValues, ajaxOptions, null /* htmlAttributes */);
+ }
+
+ public static MvcForm BeginRouteForm(this AjaxHelper ajaxHelper, string routeName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ string formAction = UrlHelper.GenerateUrl(routeName, null /* actionName */, null /* controllerName */, routeValues ?? new RouteValueDictionary(), ajaxHelper.RouteCollection, ajaxHelper.ViewContext.RequestContext, false /* includeImplicitMvcValues */);
+ return FormHelper(ajaxHelper, formAction, ajaxOptions, htmlAttributes);
+ }
+
+ private static MvcForm FormHelper(this AjaxHelper ajaxHelper, string formAction, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ TagBuilder builder = new TagBuilder("form");
+ builder.MergeAttributes(htmlAttributes);
+ builder.MergeAttribute("action", formAction);
+ builder.MergeAttribute("method", "post");
+ builder.MergeAttribute("onsubmit", GenerateAjaxScript(GetAjaxOptions(ajaxOptions), FormOnSubmitFormat));
+
+ HttpResponseBase response = ajaxHelper.ViewContext.HttpContext.Response;
+ response.Write(builder.ToString(TagRenderMode.StartTag));
+ return new MvcForm(response);
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, object routeValues, AjaxOptions ajaxOptions) {
+ return RouteLink(ajaxHelper, linkText, null /* routeName */, new RouteValueDictionary(routeValues), ajaxOptions,
+ new Dictionary<string, object>());
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes) {
+ return RouteLink(ajaxHelper, linkText, null /* routeName */, new RouteValueDictionary(routeValues), ajaxOptions,
+ ObjectToCaseSensitiveDictionary(htmlAttributes));
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, RouteValueDictionary routeValues, AjaxOptions ajaxOptions) {
+ return RouteLink(ajaxHelper, linkText, null /* routeName */, routeValues, ajaxOptions,
+ new Dictionary<string, object>());
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ return RouteLink(ajaxHelper, linkText, null /* routeName */, routeValues, ajaxOptions, htmlAttributes);
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, AjaxOptions ajaxOptions) {
+ return RouteLink(ajaxHelper, linkText, routeName, new RouteValueDictionary(), ajaxOptions,
+ new Dictionary<string, object>());
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, AjaxOptions ajaxOptions, object htmlAttributes) {
+ return RouteLink(ajaxHelper, linkText, routeName, new RouteValueDictionary(), ajaxOptions, ObjectToCaseSensitiveDictionary(htmlAttributes));
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ return RouteLink(ajaxHelper, linkText, routeName, new RouteValueDictionary(), ajaxOptions, htmlAttributes);
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, object routeValues, AjaxOptions ajaxOptions) {
+ return RouteLink(ajaxHelper, linkText, routeName, new RouteValueDictionary(routeValues), ajaxOptions,
+ new Dictionary<string, object>());
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes) {
+ return RouteLink(ajaxHelper, linkText, routeName, new RouteValueDictionary(routeValues), ajaxOptions,
+ ObjectToCaseSensitiveDictionary(htmlAttributes));
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions) {
+ return RouteLink(ajaxHelper, linkText, routeName, routeValues, ajaxOptions, new Dictionary<string, object>());
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(linkText)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "linkText");
+ }
+
+ string targetUrl = UrlHelper.GenerateUrl(routeName, null /* actionName */, null /* controllerName */, routeValues ?? new RouteValueDictionary(), ajaxHelper.RouteCollection, ajaxHelper.ViewContext.RequestContext, false /* includeImplicitMvcValues */);
+
+ return GenerateLink(linkText, targetUrl, GetAjaxOptions(ajaxOptions), htmlAttributes);
+ }
+
+ public static string RouteLink(this AjaxHelper ajaxHelper, string linkText, string routeName, string protocol, string hostName, string fragment, RouteValueDictionary routeValues, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(linkText)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "linkText");
+ }
+
+ string targetUrl = UrlHelper.GenerateUrl(routeName, null /* actionName */, null /* controllerName */, protocol, hostName, fragment, routeValues ?? new RouteValueDictionary(), ajaxHelper.RouteCollection, ajaxHelper.ViewContext.RequestContext, false /* includeImplicitMvcValues */);
+
+ return GenerateLink(linkText, targetUrl, GetAjaxOptions(ajaxOptions), htmlAttributes);
+ }
+
+ internal static string InsertionModeToString(InsertionMode insertionMode) {
+ switch (insertionMode) {
+ case InsertionMode.Replace:
+ return "Sys.Mvc.InsertionMode.replace";
+ case InsertionMode.InsertBefore:
+ return "Sys.Mvc.InsertionMode.insertBefore";
+ case InsertionMode.InsertAfter:
+ return "Sys.Mvc.InsertionMode.insertAfter";
+ default:
+ return ((int)insertionMode).ToString(CultureInfo.InvariantCulture);
+ }
+ }
+
+ private static Dictionary<string, object> ObjectToCaseSensitiveDictionary(object values) {
+ Dictionary<string, object> dict = new Dictionary<string, object>(StringComparer.Ordinal);
+ if (values != null) {
+ foreach (PropertyDescriptor prop in TypeDescriptor.GetProperties(values)) {
+ object val = prop.GetValue(values);
+ dict[prop.Name] = val;
+ }
+ }
+ return dict;
+ }
+
+ private static string GenerateLink(string linkText, string targetUrl, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
+ TagBuilder tag = new TagBuilder("a") {
+ InnerHtml = HttpUtility.HtmlEncode(linkText)
+ };
+
+ tag.MergeAttributes(htmlAttributes);
+ tag.MergeAttribute("href", targetUrl);
+ tag.MergeAttribute("onclick", GenerateAjaxScript(ajaxOptions, LinkOnClickFormat));
+
+ return tag.ToString(TagRenderMode.Normal);
+ }
+
+ private static string GenerateAjaxScript(AjaxOptions ajaxOptions, string scriptFormat) {
+ string optionsString = ajaxOptions.ToJavascriptString();
+ return String.Format(CultureInfo.InvariantCulture, scriptFormat, optionsString);
+ }
+
+ private static AjaxOptions GetAjaxOptions(AjaxOptions ajaxOptions) {
+ return (ajaxOptions != null) ? ajaxOptions : new AjaxOptions();
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Ajax/AjaxOptions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Ajax/AjaxOptions.cs
new file mode 100644
index 0000000..9be71e2
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Ajax/AjaxOptions.cs
@@ -0,0 +1,167 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Ajax {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Text;
+ using System.Web.Mvc.Resources;
+
+ public class AjaxOptions {
+ private string _confirm;
+ private string _httpMethod;
+ private InsertionMode _insertionMode = InsertionMode.Replace;
+ private string _loadingElementId;
+ private string _onBegin;
+ private string _onComplete;
+ private string _onFailure;
+ private string _onSuccess;
+ private string _updateTargetId;
+ private string _url;
+
+ public string Confirm {
+ get {
+ return _confirm ?? String.Empty;
+ }
+ set {
+ _confirm = value;
+ }
+ }
+
+ public string HttpMethod {
+ get {
+ return _httpMethod ?? String.Empty;
+ }
+ set {
+ _httpMethod = value;
+ }
+ }
+
+ public InsertionMode InsertionMode {
+ get {
+ return _insertionMode;
+ }
+ set {
+ switch (value) {
+ case InsertionMode.Replace:
+ case InsertionMode.InsertAfter:
+ case InsertionMode.InsertBefore:
+ _insertionMode = value;
+ return;
+
+ default:
+ throw new ArgumentOutOfRangeException("value", String.Format(CultureInfo.InvariantCulture,
+ MvcResources.Common_InvalidEnumValue, value, typeof(InsertionMode).FullName));
+ }
+ }
+ }
+
+ public string LoadingElementId {
+ get {
+ return _loadingElementId ?? String.Empty;
+ }
+ set {
+ _loadingElementId = value;
+ }
+ }
+
+ public string OnBegin {
+ get {
+ return _onBegin ?? String.Empty;
+ }
+ set {
+ _onBegin = value;
+ }
+ }
+
+ public string OnComplete {
+ get {
+ return _onComplete ?? String.Empty;
+ }
+ set {
+ _onComplete = value;
+ }
+ }
+
+ public string OnFailure {
+ get {
+ return _onFailure ?? String.Empty;
+ }
+ set {
+ _onFailure = value;
+ }
+ }
+
+ public string OnSuccess {
+ get {
+ return _onSuccess ?? String.Empty;
+ }
+ set {
+ _onSuccess = value;
+ }
+ }
+
+ public string UpdateTargetId {
+ get {
+ return _updateTargetId ?? String.Empty;
+ }
+ set {
+ _updateTargetId = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings",
+ Justification = "This property is used by the optionsBuilder which always accepts a string.")]
+ public string Url {
+ get {
+ return _url ?? String.Empty;
+ }
+ set {
+ _url = value;
+ }
+ }
+
+ internal string ToJavascriptString() {
+ // creates a string of the form { key1: value1, key2 : value2, ... }
+ StringBuilder optionsBuilder = new StringBuilder("{");
+ optionsBuilder.Append(String.Format(CultureInfo.InvariantCulture, " insertionMode: {0},", AjaxExtensions.InsertionModeToString(InsertionMode)));
+ optionsBuilder.Append(PropertyStringIfSpecified("confirm", Confirm));
+ optionsBuilder.Append(PropertyStringIfSpecified("httpMethod", HttpMethod));
+ optionsBuilder.Append(PropertyStringIfSpecified("loadingElementId", LoadingElementId));
+ optionsBuilder.Append(PropertyStringIfSpecified("updateTargetId", UpdateTargetId));
+ optionsBuilder.Append(PropertyStringIfSpecified("url", Url));
+ optionsBuilder.Append(EventStringIfSpecified("onBegin", OnBegin));
+ optionsBuilder.Append(EventStringIfSpecified("onComplete", OnComplete));
+ optionsBuilder.Append(EventStringIfSpecified("onFailure", OnFailure));
+ optionsBuilder.Append(EventStringIfSpecified("onSuccess", OnSuccess));
+ optionsBuilder.Length--;
+ optionsBuilder.Append(" }");
+ return optionsBuilder.ToString();
+ }
+
+ private static string EventStringIfSpecified(string propertyName, string handler) {
+ if (!String.IsNullOrEmpty(handler)) {
+ return String.Format(CultureInfo.InvariantCulture, " {0}: Function.createDelegate(this, {1}),", propertyName, handler.ToString());
+ }
+ return String.Empty;
+ }
+
+ private static string PropertyStringIfSpecified(string propertyName, string propertyValue) {
+ if (!String.IsNullOrEmpty(propertyValue)) {
+ string escapedPropertyValue = propertyValue.Replace("'", @"\'");
+ return String.Format(CultureInfo.InvariantCulture, " {0}: '{1}',", propertyName, escapedPropertyValue);
+ }
+ return String.Empty;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Ajax/InsertionMode.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Ajax/InsertionMode.cs
new file mode 100644
index 0000000..e0d4a93
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Ajax/InsertionMode.cs
@@ -0,0 +1,19 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Ajax {
+ public enum InsertionMode {
+ Replace = 0,
+ InsertBefore = 1,
+ InsertAfter = 2
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/AjaxHelper.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/AjaxHelper.cs
new file mode 100644
index 0000000..ecb4c62
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/AjaxHelper.cs
@@ -0,0 +1,59 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Web.Routing;
+
+ public class AjaxHelper {
+
+ public AjaxHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
+ : this(viewContext, viewDataContainer, RouteTable.Routes) {
+ }
+
+ public AjaxHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection) {
+ if (viewContext == null) {
+ throw new ArgumentNullException("viewContext");
+ }
+ if (viewDataContainer == null) {
+ throw new ArgumentNullException("viewDataContainer");
+ }
+ if (routeCollection == null) {
+ throw new ArgumentNullException("routeCollection");
+ }
+ ViewContext = viewContext;
+ ViewDataContainer = viewDataContainer;
+ RouteCollection = routeCollection;
+ }
+
+ public RouteCollection RouteCollection {
+ get;
+ private set;
+ }
+
+ public ViewContext ViewContext {
+ get;
+ private set;
+ }
+
+ public ViewDataDictionary ViewData {
+ get {
+ return ViewDataContainer.ViewData;
+ }
+ }
+
+ public IViewDataContainer ViewDataContainer {
+ get;
+ private set;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/AjaxHelper`1.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/AjaxHelper`1.cs
new file mode 100644
index 0000000..c18cd13
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/AjaxHelper`1.cs
@@ -0,0 +1,35 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Web.Routing;
+
+ public class AjaxHelper<TModel> : AjaxHelper where TModel : class {
+ private ViewDataDictionary<TModel> _viewData;
+
+ public AjaxHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
+ : this(viewContext, viewDataContainer, RouteTable.Routes) {
+ }
+
+ public AjaxHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
+ : base(viewContext, viewDataContainer, routeCollection) {
+
+ _viewData = new ViewDataDictionary<TModel>(viewDataContainer.ViewData);
+ }
+
+ public new ViewDataDictionary<TModel> ViewData {
+ get {
+ return _viewData;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/AjaxRequestExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/AjaxRequestExtensions.cs
new file mode 100644
index 0000000..a61abb1
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/AjaxRequestExtensions.cs
@@ -0,0 +1,26 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+
+ public static class AjaxRequestExtensions {
+
+ public static bool IsAjaxRequest(this HttpRequestBase request) {
+ if (request == null) {
+ throw new ArgumentNullException("request");
+ }
+
+ return (request["X-Requested-With"] == "XMLHttpRequest") || ((request.Headers != null) && (request.Headers["X-Requested-With"] == "XMLHttpRequest"));
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryData.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryData.cs
new file mode 100644
index 0000000..07d57cb
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryData.cs
@@ -0,0 +1,102 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Security.Cryptography;
+ using System.Text;
+
+ internal sealed class AntiForgeryData {
+
+ private const string AntiForgeryTokenFieldName = "__RequestVerificationToken";
+
+ private const int TokenLength = 128 / 8;
+ private static RNGCryptoServiceProvider _prng = new RNGCryptoServiceProvider();
+
+ private string _salt;
+ private string _value;
+
+ public AntiForgeryData() {
+ }
+
+ // copy constructor
+ public AntiForgeryData(AntiForgeryData token) {
+ if (token == null) {
+ throw new ArgumentNullException("token");
+ }
+
+ CreationDate = token.CreationDate;
+ Salt = token.Salt;
+ Value = token.Value;
+ }
+
+ public DateTime CreationDate {
+ get;
+ set;
+ }
+
+ public string Salt {
+ get {
+ return _salt ?? String.Empty;
+ }
+ set {
+ _salt = value;
+ }
+ }
+
+ public string Value {
+ get {
+ return _value ?? String.Empty;
+ }
+ set {
+ _value = value;
+ }
+ }
+
+ private static string Base64EncodeForCookieName(string s) {
+ byte[] rawBytes = Encoding.UTF8.GetBytes(s);
+ string base64String = Convert.ToBase64String(rawBytes);
+
+ // replace base64-specific characters with characters that are safe for a cookie name
+ return base64String.Replace('+', '.').Replace('/', '-').Replace('=', '_');
+ }
+
+ private static string GenerateRandomTokenString() {
+ byte[] tokenBytes = new byte[TokenLength];
+ _prng.GetBytes(tokenBytes);
+
+ string token = Convert.ToBase64String(tokenBytes);
+ return token;
+ }
+
+ // If the app path is provided, we're generating a cookie name rather than a field name, and the cookie names should
+ // be unique so that a development server cookie and an IIS cookie - both running on localhost - don't stomp on
+ // each other.
+ internal static string GetAntiForgeryTokenName(string appPath) {
+ if (String.IsNullOrEmpty(appPath)) {
+ return AntiForgeryTokenFieldName;
+ }
+ else {
+ return AntiForgeryTokenFieldName + "_" + Base64EncodeForCookieName(appPath);
+ }
+ }
+
+ public static AntiForgeryData NewToken() {
+ string tokenString = GenerateRandomTokenString();
+ return new AntiForgeryData() {
+ CreationDate = DateTime.Now,
+ Value = tokenString
+ };
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryDataSerializer.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryDataSerializer.cs
new file mode 100644
index 0000000..23698cd
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryDataSerializer.cs
@@ -0,0 +1,126 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.IO;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+ using System.Web.UI;
+
+ internal class AntiForgeryDataSerializer {
+
+ private IStateFormatter _formatter;
+
+ protected internal IStateFormatter Formatter {
+ get {
+ if (_formatter == null) {
+ _formatter = FormatterGenerator.GetFormatter();
+ }
+ return _formatter;
+ }
+ set {
+ _formatter = value;
+ }
+ }
+
+ private static HttpAntiForgeryException CreateValidationException(Exception innerException) {
+ return new HttpAntiForgeryException(MvcResources.AntiForgeryToken_ValidationFailed, innerException);
+ }
+
+ public virtual AntiForgeryData Deserialize(string serializedToken) {
+ if (String.IsNullOrEmpty(serializedToken)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "serializedToken");
+ }
+
+ // call property getter outside try { } block so that exceptions bubble up for debugging
+ IStateFormatter formatter = Formatter;
+
+ try {
+ Triplet deserializedObj = (Triplet)formatter.Deserialize(serializedToken);
+ return new AntiForgeryData() {
+ Salt = (string)deserializedObj.First,
+ Value = (string)deserializedObj.Second,
+ CreationDate = (DateTime)deserializedObj.Third
+ };
+ }
+ catch (Exception ex) {
+ throw CreateValidationException(ex);
+ }
+ }
+
+ public virtual string Serialize(AntiForgeryData token) {
+ if (token == null) {
+ throw new ArgumentNullException("token");
+ }
+
+ Triplet objToSerialize = new Triplet() {
+ First = token.Salt,
+ Second = token.Value,
+ Third = token.CreationDate
+ };
+
+ string serializedValue = Formatter.Serialize(objToSerialize);
+ return serializedValue;
+ }
+
+ // See http://www.yoda.arachsys.com/csharp/singleton.html (fifth version - fully lazy) for the singleton pattern
+ // used here. We need to defer the call to TokenPersister.CreateFormatterGenerator() until we're actually
+ // servicing a request, else HttpContext.Current might be invalid in TokenPersister.CreateFormatterGenerator().
+ private static class FormatterGenerator {
+
+ public static readonly Func<IStateFormatter> GetFormatter = TokenPersister.CreateFormatterGenerator();
+
+ [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline",
+ Justification = "This type must not be marked 'beforefieldinit'.")]
+ static FormatterGenerator() {
+ }
+
+ // This type is very difficult to unit-test because Page.ProcessRequest() requires mocking
+ // much of the hosting environment. For now, we can perform functional tests of this feature.
+ private sealed class TokenPersister : PageStatePersister {
+ private TokenPersister(Page page)
+ : base(page) {
+ }
+
+ public static Func<IStateFormatter> CreateFormatterGenerator() {
+ // This code instantiates a page and tricks it into thinking that it's servicing
+ // a postback scenario with encrypted ViewState, which is required to make the
+ // StateFormatter properly decrypt data. Specifically, this code sets the
+ // internal Page.ContainsEncryptedViewState flag.
+ TextWriter writer = TextWriter.Null;
+ HttpResponse response = new HttpResponse(writer);
+ HttpRequest request = new HttpRequest("DummyFile.aspx", HttpContext.Current.Request.Url.ToString(), "__EVENTTARGET=true&__VIEWSTATEENCRYPTED=true");
+ HttpContext context = new HttpContext(request, response);
+
+ Page page = new Page() {
+ EnableViewStateMac = true,
+ ViewStateEncryptionMode = ViewStateEncryptionMode.Always
+ };
+ page.ProcessRequest(context);
+
+ return () => new TokenPersister(page).StateFormatter;
+ }
+
+ public override void Load() {
+ throw new NotImplementedException();
+ }
+
+ public override void Save() {
+ throw new NotImplementedException();
+ }
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryToken.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryToken.cs
new file mode 100644
index 0000000..6061434
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryToken.cs
@@ -0,0 +1,67 @@
+namespace System.Web.Mvc {
+ using System;
+ using System.Security.Cryptography;
+
+ internal sealed class AntiForgeryToken {
+
+ private const int TokenLength = 128 / 8;
+ private static RNGCryptoServiceProvider _prng = new RNGCryptoServiceProvider();
+
+ private string _salt;
+ private string _value;
+
+ public AntiForgeryToken() {
+ }
+
+ // copy constructor
+ public AntiForgeryToken(AntiForgeryToken token) {
+ if (token == null) {
+ throw new ArgumentNullException("token");
+ }
+
+ CreationDate = token.CreationDate;
+ Salt = token.Salt;
+ Value = token.Value;
+ }
+
+ public DateTime CreationDate {
+ get;
+ set;
+ }
+
+ public string Salt {
+ get {
+ return _salt ?? String.Empty;
+ }
+ set {
+ _salt = value;
+ }
+ }
+
+ public string Value {
+ get {
+ return _value ?? String.Empty;
+ }
+ set {
+ _value = value;
+ }
+ }
+
+ private static string GenerateRandomTokenString() {
+ byte[] tokenBytes = new byte[TokenLength];
+ _prng.GetBytes(tokenBytes);
+
+ string token = Convert.ToBase64String(tokenBytes);
+ return token;
+ }
+
+ public static AntiForgeryToken NewToken() {
+ string tokenString = GenerateRandomTokenString();
+ return new AntiForgeryToken() {
+ CreationDate = DateTime.Now,
+ Value = tokenString
+ };
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryTokenSerializer.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryTokenSerializer.cs
new file mode 100644
index 0000000..875fd93
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/AntiForgeryTokenSerializer.cs
@@ -0,0 +1,114 @@
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.IO;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+ using System.Web.UI;
+
+ internal class AntiForgeryTokenSerializer {
+
+ private IStateFormatter _formatter;
+
+ protected internal IStateFormatter Formatter {
+ get {
+ if (_formatter == null) {
+ _formatter = FormatterGenerator.GetFormatter();
+ }
+ return _formatter;
+ }
+ set {
+ _formatter = value;
+ }
+ }
+
+ private static HttpAntiForgeryException CreateValidationException(Exception innerException) {
+ return new HttpAntiForgeryException(MvcResources.AntiForgeryToken_ValidationFailed, innerException);
+ }
+
+ public virtual AntiForgeryToken Deserialize(string serializedToken) {
+ if (String.IsNullOrEmpty(serializedToken)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "serializedToken");
+ }
+
+ // call property getter outside try { } block so that exceptions bubble up for debugging
+ IStateFormatter formatter = Formatter;
+
+ try {
+ Triplet deserializedObj = (Triplet)formatter.Deserialize(serializedToken);
+ return new AntiForgeryToken() {
+ Salt = (string)deserializedObj.First,
+ Value = (string)deserializedObj.Second,
+ CreationDate = (DateTime)deserializedObj.Third
+ };
+ }
+ catch (Exception ex) {
+ throw CreateValidationException(ex);
+ }
+ }
+
+ public virtual string Serialize(AntiForgeryToken token) {
+ if (token == null) {
+ throw new ArgumentNullException("token");
+ }
+
+ Triplet objToSerialize = new Triplet() {
+ First = token.Salt,
+ Second = token.Value,
+ Third = token.CreationDate
+ };
+
+ string serializedValue = Formatter.Serialize(objToSerialize);
+ return serializedValue;
+ }
+
+ // See http://www.yoda.arachsys.com/csharp/singleton.html (fifth version - fully lazy) for the singleton pattern
+ // used here. We need to defer the call to TokenPersister.CreateFormatterGenerator() until we're actually
+ // servicing a request, else HttpContext.Current might be invalid in TokenPersister.CreateFormatterGenerator().
+ private static class FormatterGenerator {
+
+ public static readonly Func<IStateFormatter> GetFormatter = TokenPersister.CreateFormatterGenerator();
+
+ [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline",
+ Justification = "This type must not be marked 'beforefieldinit'.")]
+ static FormatterGenerator() {
+ }
+
+ // This type is very difficult to unit-test because Page.ProcessRequest() requires mocking
+ // much of the hosting environment. For now, we can perform functional tests of this feature.
+ private sealed class TokenPersister : PageStatePersister {
+ private TokenPersister(Page page)
+ : base(page) {
+ }
+
+ public static Func<IStateFormatter> CreateFormatterGenerator() {
+ // This code instantiates a page and tricks it into thinking that it's servicing
+ // a postback scenario with encrypted ViewState, which is required to make the
+ // StateFormatter properly decrypt data. Specifically, this code sets the
+ // internal Page.ContainsEncryptedViewState flag.
+ TextWriter writer = TextWriter.Null;
+ HttpResponse response = new HttpResponse(writer);
+ HttpRequest request = new HttpRequest("DummyFile.aspx", HttpContext.Current.Request.Url.ToString(), "__EVENTTARGET=true&__VIEWSTATEENCRYPTED=true");
+ HttpContext context = new HttpContext(request, response);
+
+ Page page = new Page() {
+ EnableViewStateMac = true,
+ ViewStateEncryptionMode = ViewStateEncryptionMode.Always
+ };
+ page.ProcessRequest(context);
+
+ return () => new TokenPersister(page).StateFormatter;
+ }
+
+ public override void Load() {
+ throw new NotImplementedException();
+ }
+
+ public override void Save() {
+ throw new NotImplementedException();
+ }
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/AuthorizationContext.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/AuthorizationContext.cs
new file mode 100644
index 0000000..450e089
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/AuthorizationContext.cs
@@ -0,0 +1,31 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public class AuthorizationContext : ControllerContext {
+
+ // parameterless constructor used for mocking
+ public AuthorizationContext() {
+ }
+
+ public AuthorizationContext(ControllerContext controllerContext)
+ : base(controllerContext) {
+ }
+
+ public ActionResult Result {
+ get;
+ set;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/AuthorizeAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/AuthorizeAttribute.cs
new file mode 100644
index 0000000..087eeaa
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/AuthorizeAttribute.cs
@@ -0,0 +1,123 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Linq;
+ using System.Security.Principal;
+ using System.Web;
+
+ [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes",
+ Justification = "Unsealed so that subclassed types can set properties in the default constructor or override our behavior.")]
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)]
+ public class AuthorizeAttribute : FilterAttribute, IAuthorizationFilter {
+
+ private string _roles;
+ private string[] _rolesSplit = new string[0];
+ private string _users;
+ private string[] _usersSplit = new string[0];
+
+ public string Roles {
+ get {
+ return _roles ?? String.Empty;
+ }
+ set {
+ _roles = value;
+ _rolesSplit = SplitString(value);
+ }
+ }
+
+ public string Users {
+ get {
+ return _users ?? String.Empty;
+ }
+ set {
+ _users = value;
+ _usersSplit = SplitString(value);
+ }
+ }
+
+ // This method must be thread-safe since it is called by the thread-safe OnCacheAuthorization() method.
+ protected virtual bool AuthorizeCore(HttpContextBase httpContext) {
+ if (httpContext == null) {
+ throw new ArgumentNullException("httpContext");
+ }
+
+ IPrincipal user = httpContext.User;
+ if (!user.Identity.IsAuthenticated) {
+ return false;
+ }
+
+ if (_usersSplit.Length > 0 && !_usersSplit.Contains(user.Identity.Name, StringComparer.OrdinalIgnoreCase)) {
+ return false;
+ }
+
+ if (_rolesSplit.Length > 0 && !_rolesSplit.Any(user.IsInRole)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ private void CacheValidateHandler(HttpContext context, object data, ref HttpValidationStatus validationStatus) {
+ validationStatus = OnCacheAuthorization(new HttpContextWrapper(context));
+ }
+
+ public virtual void OnAuthorization(AuthorizationContext filterContext) {
+ if (filterContext == null) {
+ throw new ArgumentNullException("filterContext");
+ }
+
+ if (AuthorizeCore(filterContext.HttpContext)) {
+ // ** IMPORTANT **
+ // Since we're performing authorization at the action level, the authorization code runs
+ // after the output caching module. In the worst case this could allow an authorized user
+ // to cause the page to be cached, then an unauthorized user would later be served the
+ // cached page. We work around this by telling proxies not to cache the sensitive page,
+ // then we hook our custom authorization code into the caching mechanism so that we have
+ // the final say on whether a page should be served from the cache.
+
+ HttpCachePolicyBase cachePolicy = filterContext.HttpContext.Response.Cache;
+ cachePolicy.SetProxyMaxAge(new TimeSpan(0));
+ cachePolicy.AddValidationCallback(CacheValidateHandler, null /* data */);
+ }
+ else {
+ // auth failed, redirect to login page
+ filterContext.Result = new HttpUnauthorizedResult();
+ }
+ }
+
+ // This method must be thread-safe since it is called by the caching module.
+ protected virtual HttpValidationStatus OnCacheAuthorization(HttpContextBase httpContext) {
+ if (httpContext == null) {
+ throw new ArgumentNullException("httpContext");
+ }
+
+ bool isAuthorized = AuthorizeCore(httpContext);
+ return (isAuthorized) ? HttpValidationStatus.Valid : HttpValidationStatus.IgnoreThisRequest;
+ }
+
+ internal static string[] SplitString(string original) {
+ if (String.IsNullOrEmpty(original)) {
+ return new string[0];
+ }
+
+ var split = from piece in original.Split(',')
+ let trimmed = piece.Trim()
+ where !String.IsNullOrEmpty(trimmed)
+ select trimmed;
+ return split.ToArray();
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/BindAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/BindAttribute.cs
new file mode 100644
index 0000000..351fd74
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/BindAttribute.cs
@@ -0,0 +1,63 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Linq;
+
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
+ public sealed class BindAttribute : Attribute {
+
+ private string _exclude;
+ private string[] _excludeSplit = new string[0];
+ private string _include;
+ private string[] _includeSplit = new string[0];
+
+ public string Exclude {
+ get {
+ return _exclude ?? String.Empty;
+ }
+ set {
+ _exclude = value;
+ _excludeSplit = AuthorizeAttribute.SplitString(value);
+ }
+ }
+
+ public string Include {
+ get {
+ return _include ?? String.Empty;
+ }
+ set {
+ _include = value;
+ _includeSplit = AuthorizeAttribute.SplitString(value);
+ }
+ }
+
+ public string Prefix {
+ get;
+ set;
+ }
+
+ internal static bool IsPropertyAllowed(string propertyName, string[] includeProperties, string[] excludeProperties) {
+ // We allow a property to be bound if its both in the include list AND not in the exclude list.
+ // An empty include list implies all properties are allowed.
+ // An empty exclude list implies no properties are disallowed.
+ bool includeProperty = (includeProperties == null) || (includeProperties.Length == 0) || includeProperties.Contains(propertyName, StringComparer.OrdinalIgnoreCase);
+ bool excludeProperty = (excludeProperties != null) && excludeProperties.Contains(propertyName, StringComparer.OrdinalIgnoreCase);
+ return includeProperty && !excludeProperty;
+ }
+
+ public bool IsPropertyAllowed(string propertyName) {
+ return IsPropertyAllowed(propertyName, _includeSplit, _excludeSplit);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/BuildManagerWrapper.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/BuildManagerWrapper.cs
new file mode 100644
index 0000000..6c0b964
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/BuildManagerWrapper.cs
@@ -0,0 +1,28 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Collections;
+ using System.Web.Compilation;
+
+ internal sealed class BuildManagerWrapper : IBuildManager {
+ #region IBuildManager Members
+ object IBuildManager.CreateInstanceFromVirtualPath(string virtualPath, Type requiredBaseType) {
+ return BuildManager.CreateInstanceFromVirtualPath(virtualPath, requiredBaseType);
+ }
+
+ ICollection IBuildManager.GetReferencedAssemblies() {
+ return BuildManager.GetReferencedAssemblies();
+ }
+ #endregion
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ContentResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ContentResult.cs
new file mode 100644
index 0000000..da4bec4
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ContentResult.cs
@@ -0,0 +1,53 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Text;
+ using System.Web;
+
+ public class ContentResult : ActionResult {
+
+ public string Content {
+ get;
+ set;
+ }
+
+ public Encoding ContentEncoding {
+ get;
+ set;
+ }
+
+ public string ContentType {
+ get;
+ set;
+ }
+
+ public override void ExecuteResult(ControllerContext context) {
+ if (context == null) {
+ throw new ArgumentNullException("context");
+ }
+
+ HttpResponseBase response = context.HttpContext.Response;
+
+ if (!String.IsNullOrEmpty(ContentType)) {
+ response.ContentType = ContentType;
+ }
+ if (ContentEncoding != null) {
+ response.ContentEncoding = ContentEncoding;
+ }
+ if (Content != null) {
+ response.Write(Content);
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Controller.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Controller.cs
new file mode 100644
index 0000000..4c84fa8
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Controller.cs
@@ -0,0 +1,533 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.IO;
+ using System.Security.Principal;
+ using System.Text;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ public abstract class Controller : ControllerBase, IActionFilter, IAuthorizationFilter, IDisposable, IExceptionFilter, IResultFilter {
+
+ private IActionInvoker _actionInvoker;
+ private ModelBinderDictionary _binders;
+ private RouteCollection _routeCollection;
+ private ITempDataProvider _tempDataProvider;
+
+ public IActionInvoker ActionInvoker {
+ get {
+ if (_actionInvoker == null) {
+ _actionInvoker = new ControllerActionInvoker();
+ }
+ return _actionInvoker;
+ }
+ set {
+ _actionInvoker = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "Property is settable so that the dictionary can be provided for unit testing purposes.")]
+ protected internal ModelBinderDictionary Binders {
+ get {
+ if (_binders == null) {
+ _binders = ModelBinders.Binders;
+ }
+ return _binders;
+ }
+ set {
+ _binders = value;
+ }
+ }
+
+ public HttpContextBase HttpContext {
+ get {
+ return ControllerContext == null ? null : ControllerContext.HttpContext;
+ }
+ }
+
+ public ModelStateDictionary ModelState {
+ get {
+ return ViewData.ModelState;
+ }
+ }
+
+ public HttpRequestBase Request {
+ get {
+ return HttpContext == null ? null : HttpContext.Request;
+ }
+ }
+
+ public HttpResponseBase Response {
+ get {
+ return HttpContext == null ? null : HttpContext.Response;
+ }
+ }
+
+ internal RouteCollection RouteCollection {
+ get {
+ if (_routeCollection == null) {
+ _routeCollection = RouteTable.Routes;
+ }
+ return _routeCollection;
+ }
+ set {
+ _routeCollection = value;
+ }
+ }
+
+ public RouteData RouteData {
+ get {
+ return ControllerContext == null ? null : ControllerContext.RouteData;
+ }
+ }
+
+ public HttpServerUtilityBase Server {
+ get {
+ return HttpContext == null ? null : HttpContext.Server;
+ }
+ }
+
+ public HttpSessionStateBase Session {
+ get {
+ return HttpContext == null ? null : HttpContext.Session;
+ }
+ }
+
+ public ITempDataProvider TempDataProvider {
+ get {
+ if (_tempDataProvider == null) {
+ _tempDataProvider = new SessionStateTempDataProvider();
+ }
+ return _tempDataProvider;
+ }
+ set {
+ _tempDataProvider = value;
+ }
+ }
+
+ public UrlHelper Url {
+ get;
+ set;
+ }
+
+ public IPrincipal User {
+ get {
+ return HttpContext == null ? null : HttpContext.User;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#",
+ Justification = "'Content' refers to ContentResult type; 'content' refers to ContentResult.Content property.")]
+ protected internal ContentResult Content(string content) {
+ return Content(content, null /* contentType */);
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#",
+ Justification = "'Content' refers to ContentResult type; 'content' refers to ContentResult.Content property.")]
+ protected internal ContentResult Content(string content, string contentType) {
+ return Content(content, contentType, null /* contentEncoding */);
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#",
+ Justification = "'Content' refers to ContentResult type; 'content' refers to ContentResult.Content property.")]
+ protected internal virtual ContentResult Content(string content, string contentType, Encoding contentEncoding) {
+ return new ContentResult {
+ Content = content,
+ ContentType = contentType,
+ ContentEncoding = contentEncoding
+ };
+ }
+
+ // The default invoker will never match methods defined on the Controller type, so
+ // the Dispose() method is not web-callable. However, in general, since implicitly-
+ // implemented interface methods are public, they are web-callable unless decorated with
+ // [NonAction].
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Dispose() {
+ Dispose(true /* disposing */);
+ GC.SuppressFinalize(this);
+ }
+
+ protected virtual void Dispose(bool disposing) {
+ }
+
+ protected override void ExecuteCore() {
+ TempData.Load(ControllerContext, TempDataProvider);
+
+ try {
+ string actionName = RouteData.GetRequiredString("action");
+ if (!ActionInvoker.InvokeAction(ControllerContext, actionName)) {
+ HandleUnknownAction(actionName);
+ }
+ }
+ finally {
+ TempData.Save(ControllerContext, TempDataProvider);
+ }
+ }
+
+ protected internal FileContentResult File(byte[] fileContents, string contentType) {
+ return File(fileContents, contentType, null /* fileDownloadName */);
+ }
+
+ protected internal virtual FileContentResult File(byte[] fileContents, string contentType, string fileDownloadName) {
+ return new FileContentResult(fileContents, contentType) { FileDownloadName = fileDownloadName };
+ }
+
+ protected internal FileStreamResult File(Stream fileStream, string contentType) {
+ return File(fileStream, contentType, null /* fileDownloadName */);
+ }
+
+ protected internal virtual FileStreamResult File(Stream fileStream, string contentType, string fileDownloadName) {
+ return new FileStreamResult(fileStream, contentType) { FileDownloadName = fileDownloadName };
+ }
+
+ protected internal FilePathResult File(string fileName, string contentType) {
+ return File(fileName, contentType, null /* fileDownloadName */);
+ }
+
+ protected internal virtual FilePathResult File(string fileName, string contentType, string fileDownloadName) {
+ return new FilePathResult(fileName, contentType) { FileDownloadName = fileDownloadName };
+ }
+
+ protected virtual void HandleUnknownAction(string actionName) {
+ throw new HttpException(404, String.Format(CultureInfo.CurrentUICulture,
+ MvcResources.Controller_UnknownAction, actionName, GetType().FullName));
+ }
+
+ protected internal virtual JavaScriptResult JavaScript(string script) {
+ return new JavaScriptResult { Script = script };
+ }
+
+ protected internal JsonResult Json(object data) {
+ return Json(data, null /* contentType */);
+ }
+
+ protected internal JsonResult Json(object data, string contentType) {
+ return Json(data, contentType, null /* contentEncoding */);
+ }
+
+ protected internal virtual JsonResult Json(object data, string contentType, Encoding contentEncoding) {
+ return new JsonResult {
+ Data = data,
+ ContentType = contentType,
+ ContentEncoding = contentEncoding
+ };
+ }
+
+ protected override void Initialize(RequestContext requestContext) {
+ base.Initialize(requestContext);
+ Url = new UrlHelper(requestContext);
+ }
+
+ protected virtual void OnActionExecuting(ActionExecutingContext filterContext) {
+ }
+
+ protected virtual void OnActionExecuted(ActionExecutedContext filterContext) {
+ }
+
+ protected virtual void OnAuthorization(AuthorizationContext filterContext) {
+ }
+
+ protected virtual void OnException(ExceptionContext filterContext) {
+ }
+
+ protected virtual void OnResultExecuted(ResultExecutedContext filterContext) {
+ }
+
+ protected virtual void OnResultExecuting(ResultExecutingContext filterContext) {
+ }
+
+ protected internal PartialViewResult PartialView() {
+ return PartialView(null /* viewName */, null /* model */);
+ }
+
+ protected internal PartialViewResult PartialView(object model) {
+ return PartialView(null /* viewName */, model);
+ }
+
+ protected internal PartialViewResult PartialView(string viewName) {
+ return PartialView(viewName, null /* model */);
+ }
+
+ protected internal virtual PartialViewResult PartialView(string viewName, object model) {
+ if (model != null) {
+ ViewData.Model = model;
+ }
+
+ return new PartialViewResult {
+ ViewName = viewName,
+ ViewData = ViewData,
+ TempData = TempData
+ };
+ }
+
+ [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic",
+ Justification = "Instance method for consistency with other helpers.")]
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#",
+ Justification = "Response.Redirect() takes its URI as a string parameter.")]
+ protected internal virtual RedirectResult Redirect(string url) {
+ if (String.IsNullOrEmpty(url)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "url");
+ }
+ return new RedirectResult(url);
+ }
+
+ protected internal RedirectToRouteResult RedirectToAction(string actionName) {
+ return RedirectToAction(actionName, (RouteValueDictionary)null);
+ }
+
+ protected internal RedirectToRouteResult RedirectToAction(string actionName, object routeValues) {
+ return RedirectToAction(actionName, new RouteValueDictionary(routeValues));
+ }
+
+ protected internal RedirectToRouteResult RedirectToAction(string actionName, RouteValueDictionary routeValues) {
+ return RedirectToAction(actionName, null /* controllerName */, routeValues);
+ }
+
+ protected internal RedirectToRouteResult RedirectToAction(string actionName, string controllerName) {
+ return RedirectToAction(actionName, controllerName, (RouteValueDictionary)null);
+ }
+
+ protected internal RedirectToRouteResult RedirectToAction(string actionName, string controllerName, object routeValues) {
+ return RedirectToAction(actionName, controllerName, new RouteValueDictionary(routeValues));
+ }
+
+ protected internal virtual RedirectToRouteResult RedirectToAction(string actionName, string controllerName, RouteValueDictionary routeValues) {
+ RouteValueDictionary mergedRouteValues;
+
+ if (RouteData == null) {
+ mergedRouteValues = RouteValuesHelpers.MergeRouteValues(actionName, controllerName, null, routeValues, true /* includeImplicitMvcValues */);
+ }
+ else {
+ mergedRouteValues = RouteValuesHelpers.MergeRouteValues(actionName, controllerName, RouteData.Values, routeValues, true /* includeImplicitMvcValues */);
+ }
+
+ return new RedirectToRouteResult(mergedRouteValues);
+ }
+
+ protected internal RedirectToRouteResult RedirectToRoute(object routeValues) {
+ return RedirectToRoute(new RouteValueDictionary(routeValues));
+ }
+
+ protected internal RedirectToRouteResult RedirectToRoute(RouteValueDictionary routeValues) {
+ return RedirectToRoute(null /* routeName */, routeValues);
+ }
+
+ protected internal RedirectToRouteResult RedirectToRoute(string routeName) {
+ return RedirectToRoute(routeName, (RouteValueDictionary)null);
+ }
+
+ protected internal RedirectToRouteResult RedirectToRoute(string routeName, object routeValues) {
+ return RedirectToRoute(routeName, new RouteValueDictionary(routeValues));
+ }
+
+ protected internal virtual RedirectToRouteResult RedirectToRoute(string routeName, RouteValueDictionary routeValues) {
+ return new RedirectToRouteResult(routeName, RouteValuesHelpers.GetRouteValues(routeValues));
+ }
+
+ protected internal bool TryUpdateModel<TModel>(TModel model) where TModel : class {
+ return TryUpdateModel(model, null, null, null, ValueProvider);
+ }
+
+ protected internal bool TryUpdateModel<TModel>(TModel model, string prefix) where TModel : class {
+ return TryUpdateModel(model, prefix, null, null, ValueProvider);
+ }
+
+ protected internal bool TryUpdateModel<TModel>(TModel model, string[] includeProperties) where TModel : class {
+ return TryUpdateModel(model, null, includeProperties, null, ValueProvider);
+ }
+
+ protected internal bool TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties) where TModel : class {
+ return TryUpdateModel(model, prefix, includeProperties, null, ValueProvider);
+ }
+
+ protected internal bool TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) where TModel : class {
+ return TryUpdateModel(model, prefix, includeProperties, excludeProperties, ValueProvider);
+ }
+
+ protected internal bool TryUpdateModel<TModel>(TModel model, IDictionary<string, ValueProviderResult> valueProvider) where TModel : class {
+ return TryUpdateModel(model, null, null, null, valueProvider);
+ }
+
+ protected internal bool TryUpdateModel<TModel>(TModel model, string prefix, IDictionary<string, ValueProviderResult> valueProvider) where TModel : class {
+ return TryUpdateModel(model, prefix, null, null, valueProvider);
+ }
+
+ protected internal bool TryUpdateModel<TModel>(TModel model, string[] includeProperties, IDictionary<string, ValueProviderResult> valueProvider) where TModel : class {
+ return TryUpdateModel(model, null, includeProperties, null, valueProvider);
+ }
+
+ protected internal bool TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, IDictionary<string, ValueProviderResult> valueProvider) where TModel : class {
+ return TryUpdateModel(model, prefix, includeProperties, null, valueProvider);
+ }
+
+ protected internal bool TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties, IDictionary<string, ValueProviderResult> valueProvider) where TModel : class {
+ if (model == null) {
+ throw new ArgumentNullException("model");
+ }
+ if (valueProvider == null) {
+ throw new ArgumentNullException("valueProvider");
+ }
+
+ Predicate<string> propertyFilter = propertyName => BindAttribute.IsPropertyAllowed(propertyName, includeProperties, excludeProperties);
+ IModelBinder binder = Binders.GetBinder(typeof(TModel));
+
+ ModelBindingContext bindingContext = new ModelBindingContext() {
+ Model = model,
+ ModelName = prefix,
+ ModelState = ModelState,
+ ModelType = typeof(TModel),
+ PropertyFilter = propertyFilter,
+ ValueProvider = valueProvider
+ };
+ binder.BindModel(ControllerContext, bindingContext);
+ return ModelState.IsValid;
+ }
+
+ protected internal void UpdateModel<TModel>(TModel model) where TModel : class {
+ UpdateModel(model, null, null, null, ValueProvider);
+ }
+
+ protected internal void UpdateModel<TModel>(TModel model, string prefix) where TModel : class {
+ UpdateModel(model, prefix, null, null, ValueProvider);
+ }
+
+ protected internal void UpdateModel<TModel>(TModel model, string[] includeProperties) where TModel : class {
+ UpdateModel(model, null, includeProperties, null, ValueProvider);
+ }
+
+ protected internal void UpdateModel<TModel>(TModel model, string prefix, string[] includeProperties) where TModel : class {
+ UpdateModel(model, prefix, includeProperties, null, ValueProvider);
+ }
+
+ protected internal void UpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) where TModel : class {
+ UpdateModel(model, prefix, includeProperties, excludeProperties, ValueProvider);
+ }
+
+ protected internal void UpdateModel<TModel>(TModel model, IDictionary<string, ValueProviderResult> valueProvider) where TModel : class {
+ UpdateModel(model, null, null, null, valueProvider);
+ }
+
+ protected internal void UpdateModel<TModel>(TModel model, string prefix, IDictionary<string, ValueProviderResult> valueProvider) where TModel : class {
+ UpdateModel(model, prefix, null, null, valueProvider);
+ }
+
+ protected internal void UpdateModel<TModel>(TModel model, string[] includeProperties, IDictionary<string, ValueProviderResult> valueProvider) where TModel : class {
+ UpdateModel(model, null, includeProperties, null, valueProvider);
+ }
+
+ protected internal void UpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, IDictionary<string, ValueProviderResult> valueProvider) where TModel : class {
+ UpdateModel(model, prefix, includeProperties, null, valueProvider);
+ }
+
+ protected internal void UpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties, IDictionary<string, ValueProviderResult> valueProvider) where TModel : class {
+ bool success = TryUpdateModel(model, prefix, includeProperties, excludeProperties, valueProvider);
+ if (!success) {
+ string message = String.Format(CultureInfo.CurrentUICulture, MvcResources.Controller_UpdateModel_UpdateUnsuccessful,
+ typeof(TModel).FullName);
+ throw new InvalidOperationException(message);
+ }
+ }
+
+ protected internal ViewResult View() {
+ return View(null /* viewName */, null /* masterName */, null /* model */);
+ }
+
+ protected internal ViewResult View(object model) {
+ return View(null /* viewName */, null /* masterName */, model);
+ }
+
+ protected internal ViewResult View(string viewName) {
+ return View(viewName, null /* masterName */, null /* model */);
+ }
+
+ protected internal ViewResult View(string viewName, string masterName) {
+ return View(viewName, masterName, null /* model */);
+ }
+
+ protected internal ViewResult View(string viewName, object model) {
+ return View(viewName, null /* masterName */, model);
+ }
+
+ protected internal virtual ViewResult View(string viewName, string masterName, object model) {
+ if (model != null) {
+ ViewData.Model = model;
+ }
+
+ return new ViewResult {
+ ViewName = viewName,
+ MasterName = masterName,
+ ViewData = ViewData,
+ TempData = TempData
+ };
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#",
+ Justification = "The method name 'View' is a convenient shorthand for 'CreateViewResult'.")]
+ protected internal ViewResult View(IView view) {
+ return View(view, null /* model */);
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#",
+ Justification = "The method name 'View' is a convenient shorthand for 'CreateViewResult'.")]
+ protected internal virtual ViewResult View(IView view, object model) {
+ if (model != null) {
+ ViewData.Model = model;
+ }
+
+ return new ViewResult {
+ View = view,
+ ViewData = ViewData,
+ TempData = TempData
+ };
+ }
+
+ #region IActionFilter Members
+ void IActionFilter.OnActionExecuting(ActionExecutingContext filterContext) {
+ OnActionExecuting(filterContext);
+ }
+
+ void IActionFilter.OnActionExecuted(ActionExecutedContext filterContext) {
+ OnActionExecuted(filterContext);
+ }
+ #endregion
+
+ #region IAuthorizationFilter Members
+ void IAuthorizationFilter.OnAuthorization(AuthorizationContext filterContext) {
+ OnAuthorization(filterContext);
+ }
+ #endregion
+
+ #region IExceptionFilter Members
+ void IExceptionFilter.OnException(ExceptionContext filterContext) {
+ OnException(filterContext);
+ }
+ #endregion
+
+ #region IResultFilter Members
+ void IResultFilter.OnResultExecuting(ResultExecutingContext filterContext) {
+ OnResultExecuting(filterContext);
+ }
+
+ void IResultFilter.OnResultExecuted(ResultExecutedContext filterContext) {
+ OnResultExecuted(filterContext);
+ }
+ #endregion
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerActionInvoker.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerActionInvoker.cs
new file mode 100644
index 0000000..8eaba61
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerActionInvoker.cs
@@ -0,0 +1,328 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Linq;
+ using System.Threading;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+
+ public class ControllerActionInvoker : IActionInvoker {
+
+ private readonly static ControllerDescriptorCache _staticDescriptorCache = new ControllerDescriptorCache();
+
+ private ModelBinderDictionary _binders;
+ private ControllerDescriptorCache _instanceDescriptorCache;
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "Property is settable so that the dictionary can be provided for unit testing purposes.")]
+ protected internal ModelBinderDictionary Binders {
+ get {
+ if (_binders == null) {
+ _binders = ModelBinders.Binders;
+ }
+ return _binders;
+ }
+ set {
+ _binders = value;
+ }
+ }
+
+ internal ControllerDescriptorCache DescriptorCache {
+ get {
+ if (_instanceDescriptorCache == null) {
+ _instanceDescriptorCache = _staticDescriptorCache;
+ }
+ return _instanceDescriptorCache;
+ }
+ set {
+ _instanceDescriptorCache = value;
+ }
+ }
+
+ private static void AddControllerToFilterList<TFilter>(ControllerBase controller, IList<TFilter> filterList) where TFilter : class {
+ TFilter controllerAsFilter = controller as TFilter;
+ if (controllerAsFilter != null) {
+ filterList.Insert(0, controllerAsFilter);
+ }
+ }
+
+ protected virtual ActionResult CreateActionResult(ControllerContext controllerContext, ActionDescriptor actionDescriptor, object actionReturnValue) {
+ if (actionReturnValue == null) {
+ return new EmptyResult();
+ }
+
+ ActionResult actionResult = (actionReturnValue as ActionResult) ??
+ new ContentResult { Content = Convert.ToString(actionReturnValue, CultureInfo.InvariantCulture) };
+ return actionResult;
+ }
+
+ protected virtual ControllerDescriptor GetControllerDescriptor(ControllerContext controllerContext) {
+ Type controllerType = controllerContext.Controller.GetType();
+ ControllerDescriptor controllerDescriptor = DescriptorCache.GetDescriptor(controllerType);
+ return controllerDescriptor;
+ }
+
+ protected virtual ActionDescriptor FindAction(ControllerContext controllerContext, ControllerDescriptor controllerDescriptor, string actionName) {
+ ActionDescriptor actionDescriptor = controllerDescriptor.FindAction(controllerContext, actionName);
+ return actionDescriptor;
+ }
+
+ protected virtual FilterInfo GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor) {
+ FilterInfo filters = actionDescriptor.GetFilters();
+
+ // if the current controller implements one of the filter interfaces, it should be added to the list at position 0
+ ControllerBase controller = controllerContext.Controller;
+ AddControllerToFilterList(controller, filters.ActionFilters);
+ AddControllerToFilterList(controller, filters.ResultFilters);
+ AddControllerToFilterList(controller, filters.AuthorizationFilters);
+ AddControllerToFilterList(controller, filters.ExceptionFilters);
+
+ return filters;
+ }
+
+ private IModelBinder GetModelBinder(ParameterDescriptor parameterDescriptor) {
+ // look on the parameter itself, then look in the global table
+ return parameterDescriptor.BindingInfo.Binder ?? Binders.GetBinder(parameterDescriptor.ParameterType);
+ }
+
+ protected virtual object GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) {
+ // collect all of the necessary binding properties
+ Type parameterType = parameterDescriptor.ParameterType;
+ IModelBinder binder = GetModelBinder(parameterDescriptor);
+ IDictionary<string, ValueProviderResult> valueProvider = controllerContext.Controller.ValueProvider;
+ string parameterName = parameterDescriptor.BindingInfo.Prefix ?? parameterDescriptor.ParameterName;
+ Predicate<string> propertyFilter = GetPropertyFilter(parameterDescriptor);
+
+ // finally, call into the binder
+ ModelBindingContext bindingContext = new ModelBindingContext() {
+ FallbackToEmptyPrefix = (parameterDescriptor.BindingInfo.Prefix == null), // only fall back if prefix not specified
+ ModelName = parameterName,
+ ModelState = controllerContext.Controller.ViewData.ModelState,
+ ModelType = parameterType,
+ PropertyFilter = propertyFilter,
+ ValueProvider = valueProvider
+ };
+ object result = binder.BindModel(controllerContext, bindingContext);
+ return result;
+ }
+
+ protected virtual IDictionary<string, object> GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) {
+ Dictionary<string, object> parametersDict = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
+ ParameterDescriptor[] parameterDescriptors = actionDescriptor.GetParameters();
+
+ foreach (ParameterDescriptor parameterDescriptor in parameterDescriptors) {
+ parametersDict[parameterDescriptor.ParameterName] = GetParameterValue(controllerContext, parameterDescriptor);
+ }
+ return parametersDict;
+ }
+
+ private static Predicate<string> GetPropertyFilter(ParameterDescriptor parameterDescriptor) {
+ ParameterBindingInfo bindingInfo = parameterDescriptor.BindingInfo;
+ return propertyName => BindAttribute.IsPropertyAllowed(propertyName, bindingInfo.Include.ToArray(), bindingInfo.Exclude.ToArray());
+ }
+
+ public virtual bool InvokeAction(ControllerContext controllerContext, string actionName) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+ if (String.IsNullOrEmpty(actionName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "actionName");
+ }
+
+ ControllerDescriptor controllerDescriptor = GetControllerDescriptor(controllerContext);
+ ActionDescriptor actionDescriptor = FindAction(controllerContext, controllerDescriptor, actionName);
+ if (actionDescriptor != null) {
+ FilterInfo filterInfo = GetFilters(controllerContext, actionDescriptor);
+
+ try {
+ AuthorizationContext authContext = InvokeAuthorizationFilters(controllerContext, filterInfo.AuthorizationFilters, actionDescriptor);
+ if (authContext.Result != null) {
+ // the auth filter signaled that we should let it short-circuit the request
+ InvokeActionResult(controllerContext, authContext.Result);
+ }
+ else {
+ if (controllerContext.Controller.ValidateRequest) {
+ ValidateRequest(controllerContext.HttpContext.Request);
+ }
+
+ IDictionary<string, object> parameters = GetParameterValues(controllerContext, actionDescriptor);
+ ActionExecutedContext postActionContext = InvokeActionMethodWithFilters(controllerContext, filterInfo.ActionFilters, actionDescriptor, parameters);
+ InvokeActionResultWithFilters(controllerContext, filterInfo.ResultFilters, postActionContext.Result);
+ }
+ }
+ catch (ThreadAbortException) {
+ // This type of exception occurs as a result of Response.Redirect(), but we special-case so that
+ // the filters don't see this as an error.
+ throw;
+ }
+ catch (Exception ex) {
+ // something blew up, so execute the exception filters
+ ExceptionContext exceptionContext = InvokeExceptionFilters(controllerContext, filterInfo.ExceptionFilters, ex);
+ if (!exceptionContext.ExceptionHandled) {
+ throw;
+ }
+ InvokeActionResult(controllerContext, exceptionContext.Result);
+ }
+
+ return true;
+ }
+
+ // notify controller that no method matched
+ return false;
+ }
+
+ protected virtual ActionResult InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary<string, object> parameters) {
+ object returnValue = actionDescriptor.Execute(controllerContext, parameters);
+ ActionResult result = CreateActionResult(controllerContext, actionDescriptor, returnValue);
+ return result;
+ }
+
+ internal static ActionExecutedContext InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func<ActionExecutedContext> continuation) {
+ filter.OnActionExecuting(preContext);
+ if (preContext.Result != null) {
+ return new ActionExecutedContext(preContext, preContext.ActionDescriptor, true /* canceled */, null /* exception */) {
+ Result = preContext.Result
+ };
+ }
+
+ bool wasError = false;
+ ActionExecutedContext postContext = null;
+ try {
+ postContext = continuation();
+ }
+ catch (ThreadAbortException) {
+ // This type of exception occurs as a result of Response.Redirect(), but we special-case so that
+ // the filters don't see this as an error.
+ postContext = new ActionExecutedContext(preContext, preContext.ActionDescriptor, false /* canceled */, null /* exception */);
+ filter.OnActionExecuted(postContext);
+ throw;
+ }
+ catch (Exception ex) {
+ wasError = true;
+ postContext = new ActionExecutedContext(preContext, preContext.ActionDescriptor, false /* canceled */, ex);
+ filter.OnActionExecuted(postContext);
+ if (!postContext.ExceptionHandled) {
+ throw;
+ }
+ }
+ if (!wasError) {
+ filter.OnActionExecuted(postContext);
+ }
+ return postContext;
+ }
+
+ protected virtual ActionExecutedContext InvokeActionMethodWithFilters(ControllerContext controllerContext, IList<IActionFilter> filters, ActionDescriptor actionDescriptor, IDictionary<string, object> parameters) {
+ ActionExecutingContext preContext = new ActionExecutingContext(controllerContext, actionDescriptor, parameters);
+ Func<ActionExecutedContext> continuation = () =>
+ new ActionExecutedContext(controllerContext, actionDescriptor, false /* canceled */, null /* exception */) {
+ Result = InvokeActionMethod(controllerContext, actionDescriptor, parameters)
+ };
+
+ // need to reverse the filter list because the continuations are built up backward
+ Func<ActionExecutedContext> thunk = filters.Reverse().Aggregate(continuation,
+ (next, filter) => () => InvokeActionMethodFilter(filter, preContext, next));
+ return thunk();
+ }
+
+ protected virtual void InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) {
+ actionResult.ExecuteResult(controllerContext);
+ }
+
+ internal static ResultExecutedContext InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func<ResultExecutedContext> continuation) {
+ filter.OnResultExecuting(preContext);
+ if (preContext.Cancel) {
+ return new ResultExecutedContext(preContext, preContext.Result, true /* canceled */, null /* exception */);
+ }
+
+ bool wasError = false;
+ ResultExecutedContext postContext = null;
+ try {
+ postContext = continuation();
+ }
+ catch (ThreadAbortException) {
+ // This type of exception occurs as a result of Response.Redirect(), but we special-case so that
+ // the filters don't see this as an error.
+ postContext = new ResultExecutedContext(preContext, preContext.Result, false /* canceled */, null /* exception */);
+ filter.OnResultExecuted(postContext);
+ throw;
+ }
+ catch (Exception ex) {
+ wasError = true;
+ postContext = new ResultExecutedContext(preContext, preContext.Result, false /* canceled */, ex);
+ filter.OnResultExecuted(postContext);
+ if (!postContext.ExceptionHandled) {
+ throw;
+ }
+ }
+ if (!wasError) {
+ filter.OnResultExecuted(postContext);
+ }
+ return postContext;
+ }
+
+ protected virtual ResultExecutedContext InvokeActionResultWithFilters(ControllerContext controllerContext, IList<IResultFilter> filters, ActionResult actionResult) {
+ ResultExecutingContext preContext = new ResultExecutingContext(controllerContext, actionResult);
+ Func<ResultExecutedContext> continuation = delegate {
+ InvokeActionResult(controllerContext, actionResult);
+ return new ResultExecutedContext(controllerContext, actionResult, false /* canceled */, null /* exception */);
+ };
+
+ // need to reverse the filter list because the continuations are built up backward
+ Func<ResultExecutedContext> thunk = filters.Reverse().Aggregate(continuation,
+ (next, filter) => () => InvokeActionResultFilter(filter, preContext, next));
+ return thunk();
+ }
+
+ protected virtual AuthorizationContext InvokeAuthorizationFilters(ControllerContext controllerContext, IList<IAuthorizationFilter> filters, ActionDescriptor actionDescriptor) {
+ AuthorizationContext context = new AuthorizationContext(controllerContext);
+ foreach (IAuthorizationFilter filter in filters) {
+ filter.OnAuthorization(context);
+ // short-circuit evaluation
+ if (context.Result != null) {
+ break;
+ }
+ }
+
+ return context;
+ }
+
+ protected virtual ExceptionContext InvokeExceptionFilters(ControllerContext controllerContext, IList<IExceptionFilter> filters, Exception exception) {
+ ExceptionContext context = new ExceptionContext(controllerContext, exception);
+ foreach (IExceptionFilter filter in filters) {
+ filter.OnException(context);
+ }
+
+ return context;
+ }
+
+ [SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "rawUrl",
+ Justification = "We only care about the property getter's side effects, not the returned value.")]
+ private static void ValidateRequest(HttpRequestBase request) {
+ // DevDiv 214040: Enable Request Validation by default for all controller requests
+ //
+ // Note that we grab the Request's RawUrl to force it to be validated. Calling ValidateInput()
+ // doesn't actually validate anything. It just sets flags indicating that on the next usage of
+ // certain inputs that they should be validated. We special case RawUrl because the URL has already
+ // been consumed by routing and thus might contain dangerous data. By forcing the RawUrl to be
+ // re-read we're making sure that it gets validated by ASP.NET.
+
+ request.ValidateInput();
+ string rawUrl = request.RawUrl;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerBase.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerBase.cs
new file mode 100644
index 0000000..21f7b06
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerBase.cs
@@ -0,0 +1,103 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Web.Routing;
+
+ public abstract class ControllerBase : MarshalByRefObject, IController {
+
+ private TempDataDictionary _tempDataDictionary;
+ private bool _validateRequest = true;
+ private IDictionary<string, ValueProviderResult> _valueProvider;
+ private ViewDataDictionary _viewDataDictionary;
+
+ public ControllerContext ControllerContext {
+ get;
+ set;
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "This property is settable so that unit tests can provide mock implementations.")]
+ public TempDataDictionary TempData {
+ get {
+ if (_tempDataDictionary == null) {
+ _tempDataDictionary = new TempDataDictionary();
+ }
+ return _tempDataDictionary;
+ }
+ set {
+ _tempDataDictionary = value;
+ }
+ }
+
+ public bool ValidateRequest {
+ get {
+ return _validateRequest;
+ }
+ set {
+ _validateRequest = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "This property is settable so that unit tests can provide mock implementations.")]
+ public IDictionary<string, ValueProviderResult> ValueProvider {
+ get {
+ if (_valueProvider == null) {
+ _valueProvider = new ValueProviderDictionary(ControllerContext);
+ }
+ return _valueProvider;
+ }
+ set {
+ _valueProvider = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "This property is settable so that unit tests can provide mock implementations.")]
+ public ViewDataDictionary ViewData {
+ get {
+ if (_viewDataDictionary == null) {
+ _viewDataDictionary = new ViewDataDictionary();
+ }
+ return _viewDataDictionary;
+ }
+ set {
+ _viewDataDictionary = value;
+ }
+ }
+
+ protected virtual void Execute(RequestContext requestContext) {
+ if (requestContext == null) {
+ throw new ArgumentNullException("requestContext");
+ }
+
+ Initialize(requestContext);
+ ExecuteCore();
+ }
+
+ protected abstract void ExecuteCore();
+
+ protected virtual void Initialize(RequestContext requestContext) {
+ ControllerContext = new ControllerContext(requestContext, this);
+ }
+
+ #region IController Members
+ void IController.Execute(RequestContext requestContext) {
+ Execute(requestContext);
+ }
+ #endregion
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerBuilder.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerBuilder.cs
new file mode 100644
index 0000000..19d8970
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerBuilder.cs
@@ -0,0 +1,87 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Web.Mvc.Resources;
+
+ public class ControllerBuilder {
+
+ private Func<IControllerFactory> _factoryThunk;
+ private static ControllerBuilder _instance = new ControllerBuilder();
+ private HashSet<string> _namespaces = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
+
+ public ControllerBuilder() {
+ SetControllerFactory(new DefaultControllerFactory() {
+ ControllerBuilder = this
+ });
+ }
+
+ public static ControllerBuilder Current {
+ get {
+ return _instance;
+ }
+ }
+
+ public HashSet<string> DefaultNamespaces {
+ get {
+ return _namespaces;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
+ Justification = "Calling method multiple times might return different objects.")]
+ public IControllerFactory GetControllerFactory() {
+ IControllerFactory controllerFactoryInstance = _factoryThunk();
+ return controllerFactoryInstance;
+ }
+
+ public void SetControllerFactory(IControllerFactory controllerFactory) {
+ if (controllerFactory == null) {
+ throw new ArgumentNullException("controllerFactory");
+ }
+
+ _factoryThunk = () => controllerFactory;
+ }
+
+ public void SetControllerFactory(Type controllerFactoryType) {
+ if (controllerFactoryType == null) {
+ throw new ArgumentNullException("controllerFactoryType");
+ }
+ if (!typeof(IControllerFactory).IsAssignableFrom(controllerFactoryType)) {
+ throw new ArgumentException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.ControllerBuilder_MissingIControllerFactory,
+ controllerFactoryType),
+ "controllerFactoryType");
+ }
+
+ _factoryThunk = delegate() {
+ try {
+ return (IControllerFactory)Activator.CreateInstance(controllerFactoryType);
+ }
+ catch (Exception ex) {
+ throw new InvalidOperationException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.ControllerBuilder_ErrorCreatingControllerFactory,
+ controllerFactoryType),
+ ex);
+ }
+ };
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerContext.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerContext.cs
new file mode 100644
index 0000000..61a2f4a
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerContext.cs
@@ -0,0 +1,115 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Web;
+ using System.Web.Routing;
+
+ // Though many of the properties on ControllerContext and its subclassed types are virtual, there are still sealed
+ // properties (like ControllerContext.RequestContext, ActionExecutingContext.Result, etc.). If these properties
+ // were virtual, a mocking framework might override them with incorrect behavior (property getters would return
+ // null, property setters would be no-ops). By sealing these properties, we are forcing them to have the default
+ // "get or store a value" semantics that they were intended to have.
+
+ public class ControllerContext {
+
+ private HttpContextBase _httpContext;
+ private RequestContext _requestContext;
+ private RouteData _routeData;
+
+ // parameterless constructor used for mocking
+ public ControllerContext() {
+ }
+
+ // copy constructor - allows for subclassed types to take an existing ControllerContext as a parameter
+ // and we'll automatically set the appropriate properties
+ [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
+ Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]
+ protected ControllerContext(ControllerContext controllerContext) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+
+ Controller = controllerContext.Controller;
+ RequestContext = controllerContext.RequestContext;
+ }
+
+ public ControllerContext(HttpContextBase httpContext, RouteData routeData, ControllerBase controller)
+ : this(new RequestContext(httpContext, routeData), controller) {
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
+ Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]
+ public ControllerContext(RequestContext requestContext, ControllerBase controller) {
+ if (requestContext == null) {
+ throw new ArgumentNullException("requestContext");
+ }
+ if (controller == null) {
+ throw new ArgumentNullException("controller");
+ }
+
+ RequestContext = requestContext;
+ Controller = controller;
+ }
+
+ public virtual ControllerBase Controller {
+ get;
+ set;
+ }
+
+ public virtual HttpContextBase HttpContext {
+ get {
+ if (_httpContext == null) {
+ _httpContext = (_requestContext != null) ? _requestContext.HttpContext : new EmptyHttpContext();
+ }
+ return _httpContext;
+ }
+ set {
+ _httpContext = value;
+ }
+ }
+
+ public RequestContext RequestContext {
+ get {
+ if (_requestContext == null) {
+ // still need explicit calls to constructors since the property getters are virtual and might return null
+ HttpContextBase httpContext = HttpContext ?? new EmptyHttpContext();
+ RouteData routeData = RouteData ?? new RouteData();
+
+ _requestContext = new RequestContext(httpContext, routeData);
+ }
+ return _requestContext;
+ }
+ set {
+ _requestContext = value;
+ }
+ }
+
+ public virtual RouteData RouteData {
+ get {
+ if (_routeData == null) {
+ _routeData = (_requestContext != null) ? _requestContext.RouteData : new RouteData();
+ }
+ return _routeData;
+ }
+ set {
+ _routeData = value;
+ }
+ }
+
+ private sealed class EmptyHttpContext : HttpContextBase {
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerDescriptor.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerDescriptor.cs
new file mode 100644
index 0000000..b5ef743
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerDescriptor.cs
@@ -0,0 +1,63 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Reflection;
+
+ public abstract class ControllerDescriptor : ICustomAttributeProvider {
+
+ public virtual string ControllerName {
+ get {
+ string typeName = ControllerType.Name;
+ if (typeName.EndsWith("Controller", StringComparison.OrdinalIgnoreCase)) {
+ return typeName.Substring(0, typeName.Length - "Controller".Length);
+ }
+
+ return typeName;
+ }
+ }
+
+ public abstract Type ControllerType {
+ get;
+ }
+
+ public abstract ActionDescriptor FindAction(ControllerContext controllerContext, string actionName);
+
+ public abstract ActionDescriptor[] GetCanonicalActions();
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public virtual object[] GetCustomAttributes(bool inherit) {
+ return GetCustomAttributes(typeof(object), inherit);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public virtual object[] GetCustomAttributes(Type attributeType, bool inherit) {
+ if (attributeType == null) {
+ throw new ArgumentNullException("attributeType");
+ }
+
+ return (object[])Array.CreateInstance(attributeType, 0);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public virtual bool IsDefined(Type attributeType, bool inherit) {
+ if (attributeType == null) {
+ throw new ArgumentNullException("attributeType");
+ }
+
+ return false;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerDescriptorCache.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerDescriptorCache.cs
new file mode 100644
index 0000000..0c92149
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerDescriptorCache.cs
@@ -0,0 +1,26 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+
+ internal sealed class ControllerDescriptorCache : ReaderWriterCache<Type, ControllerDescriptor> {
+
+ public ControllerDescriptorCache() {
+ }
+
+ public ControllerDescriptor GetDescriptor(Type controllerType) {
+ return FetchOrCreateItem(controllerType, () => new ReflectedControllerDescriptor(controllerType));
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerTypeCache.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerTypeCache.cs
new file mode 100644
index 0000000..930a253
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ControllerTypeCache.cs
@@ -0,0 +1,103 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Reflection;
+
+ internal sealed class ControllerTypeCache {
+
+ private Dictionary<string, ILookup<string, Type>> _cache;
+ private object _lockObj = new object();
+
+ internal int Count {
+ get {
+ int count = 0;
+ foreach (var lookup in _cache.Values) {
+ foreach (var grouping in lookup) {
+ count += grouping.Count();
+ }
+ }
+ return count;
+ }
+ }
+
+ public void EnsureInitialized(IBuildManager buildManager) {
+ if (_cache == null) {
+ lock (_lockObj) {
+ if (_cache == null) {
+ List<Type> controllerTypes = GetAllControllerTypes(buildManager);
+ var groupedByName = controllerTypes.GroupBy(
+ t => t.Name.Substring(0, t.Name.Length - "Controller".Length),
+ StringComparer.OrdinalIgnoreCase);
+ _cache = groupedByName.ToDictionary(
+ g => g.Key,
+ g => g.ToLookup(t => t.Namespace ?? String.Empty, StringComparer.OrdinalIgnoreCase),
+ StringComparer.OrdinalIgnoreCase);
+ }
+ }
+ }
+ }
+
+ private static List<Type> GetAllControllerTypes(IBuildManager buildManager) {
+ // Go through all assemblies referenced by the application and search for
+ // controllers and controller factories.
+ List<Type> controllerTypes = new List<Type>();
+ ICollection assemblies = buildManager.GetReferencedAssemblies();
+ foreach (Assembly assembly in assemblies) {
+ Type[] typesInAsm;
+ try {
+ typesInAsm = assembly.GetTypes();
+ }
+ catch (ReflectionTypeLoadException ex) {
+ typesInAsm = ex.Types;
+ }
+ controllerTypes.AddRange(typesInAsm.Where(IsControllerType));
+ }
+ return controllerTypes;
+ }
+
+ public IList<Type> GetControllerTypes(string controllerName, HashSet<string> namespaces) {
+ List<Type> matchingTypes = new List<Type>();
+
+ ILookup<string, Type> nsLookup;
+ if (_cache.TryGetValue(controllerName, out nsLookup)) {
+ // this friendly name was located in the cache, now cycle through namespaces
+ if (namespaces != null) {
+ foreach (string ns in namespaces) {
+ matchingTypes.AddRange(nsLookup[ns]);
+ }
+ }
+ else {
+ // if the namespaces parameter is null, search *every* namespace
+ foreach (var nsGroup in nsLookup) {
+ matchingTypes.AddRange(nsGroup);
+ }
+ }
+ }
+
+ return matchingTypes;
+ }
+
+ internal static bool IsControllerType(Type t) {
+ return
+ t != null &&
+ t.IsPublic &&
+ t.Name.EndsWith("Controller", StringComparison.OrdinalIgnoreCase) &&
+ !t.IsAbstract &&
+ typeof(IController).IsAssignableFrom(t);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/CustomModelBinderAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/CustomModelBinderAttribute.cs
new file mode 100644
index 0000000..b1e348c
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/CustomModelBinderAttribute.cs
@@ -0,0 +1,27 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+
+ [AttributeUsage(ValidTargets, AllowMultiple = false, Inherited = false)]
+ public abstract class CustomModelBinderAttribute : Attribute {
+
+ internal const AttributeTargets ValidTargets = AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Struct;
+
+ [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
+ Justification = "This method can potentially perform a non-trivial amount of work.")]
+ public abstract IModelBinder GetBinder();
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/DefaultControllerFactory.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/DefaultControllerFactory.cs
new file mode 100644
index 0000000..a1da640
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/DefaultControllerFactory.cs
@@ -0,0 +1,174 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Globalization;
+ using System.Text;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ public class DefaultControllerFactory : IControllerFactory {
+
+ private IBuildManager _buildManager;
+ private ControllerBuilder _controllerBuilder;
+ private ControllerTypeCache _instanceControllerTypeCache;
+ private static ControllerTypeCache _staticControllerTypeCache = new ControllerTypeCache();
+
+ internal IBuildManager BuildManager {
+ get {
+ if (_buildManager == null) {
+ _buildManager = new BuildManagerWrapper();
+ }
+ return _buildManager;
+ }
+ set {
+ _buildManager = value;
+ }
+ }
+
+ internal ControllerBuilder ControllerBuilder {
+ get {
+ return _controllerBuilder ?? ControllerBuilder.Current;
+ }
+ set {
+ _controllerBuilder = value;
+ }
+ }
+
+ internal ControllerTypeCache ControllerTypeCache {
+ get {
+ return _instanceControllerTypeCache ?? _staticControllerTypeCache;
+ }
+ set {
+ _instanceControllerTypeCache = value;
+ }
+ }
+
+ public RequestContext RequestContext {
+ get;
+ set;
+ }
+
+ public virtual IController CreateController(RequestContext requestContext, string controllerName) {
+ if (requestContext == null) {
+ throw new ArgumentNullException("requestContext");
+ }
+ if (String.IsNullOrEmpty(controllerName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "controllerName");
+ }
+ RequestContext = requestContext;
+ Type controllerType = GetControllerType(controllerName);
+ IController controller = GetControllerInstance(controllerType);
+ return controller;
+ }
+
+ protected internal virtual IController GetControllerInstance(Type controllerType) {
+ if (controllerType == null) {
+ throw new HttpException(404,
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.DefaultControllerFactory_NoControllerFound,
+ RequestContext.HttpContext.Request.Path));
+ }
+ if (!typeof(IController).IsAssignableFrom(controllerType)) {
+ throw new ArgumentException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.DefaultControllerFactory_TypeDoesNotSubclassControllerBase,
+ controllerType),
+ "controllerType");
+ }
+ try {
+ return (IController)Activator.CreateInstance(controllerType);
+ }
+ catch (Exception ex) {
+ throw new InvalidOperationException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.DefaultControllerFactory_ErrorCreatingController,
+ controllerType),
+ ex);
+ }
+ }
+
+ protected internal virtual Type GetControllerType(string controllerName) {
+ if (String.IsNullOrEmpty(controllerName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "controllerName");
+ }
+
+ // first search in the current route's namespace collection
+ object routeNamespacesObj;
+ Type match;
+ if (RequestContext != null && RequestContext.RouteData.DataTokens.TryGetValue("Namespaces", out routeNamespacesObj)) {
+ IEnumerable<string> routeNamespaces = routeNamespacesObj as IEnumerable<string>;
+ if (routeNamespaces != null) {
+ HashSet<string> nsHash = new HashSet<string>(routeNamespaces, StringComparer.OrdinalIgnoreCase);
+ match = GetControllerTypeWithinNamespaces(controllerName, nsHash);
+ if (match != null) {
+ return match;
+ }
+ }
+ }
+
+ // then search in the application's default namespace collection
+ HashSet<string> nsDefaults = new HashSet<string>(ControllerBuilder.DefaultNamespaces, StringComparer.OrdinalIgnoreCase);
+ match = GetControllerTypeWithinNamespaces(controllerName, nsDefaults);
+ if (match != null) {
+ return match;
+ }
+
+ // if all else fails, search every namespace
+ return GetControllerTypeWithinNamespaces(controllerName, null /* namespaces */);
+ }
+
+ private Type GetControllerTypeWithinNamespaces(string controllerName, HashSet<string> namespaces) {
+ // Once the master list of controllers has been created we can quickly index into it
+ ControllerTypeCache.EnsureInitialized(BuildManager);
+
+ IList<Type> matchingTypes = ControllerTypeCache.GetControllerTypes(controllerName, namespaces);
+ switch (matchingTypes.Count) {
+ case 0:
+ // no matching types
+ return null;
+
+ case 1:
+ // single matching type
+ return matchingTypes[0];
+
+ default:
+ // multiple matching types
+ // we need to generate an exception containing all the controller types
+ StringBuilder sb = new StringBuilder();
+ foreach (Type matchedType in matchingTypes) {
+ sb.AppendLine();
+ sb.Append(matchedType.FullName);
+ }
+ throw new InvalidOperationException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.DefaultControllerFactory_ControllerNameAmbiguous,
+ controllerName, sb));
+ }
+ }
+
+ public virtual void ReleaseController(IController controller) {
+ IDisposable disposable = controller as IDisposable;
+ if (disposable != null) {
+ disposable.Dispose();
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/DefaultModelBinder.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/DefaultModelBinder.cs
new file mode 100644
index 0000000..8070fb5
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/DefaultModelBinder.cs
@@ -0,0 +1,579 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.ComponentModel;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Linq;
+ using System.Reflection;
+ using System.Web.Mvc.Resources;
+
+ public class DefaultModelBinder : IModelBinder {
+
+ private ModelBinderDictionary _binders;
+ private static string _resourceClassKey;
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "Property is settable so that the dictionary can be provided for unit testing purposes.")]
+ protected internal ModelBinderDictionary Binders {
+ get {
+ if (_binders == null) {
+ _binders = ModelBinders.Binders;
+ }
+ return _binders;
+ }
+ set {
+ _binders = value;
+ }
+ }
+
+ public static string ResourceClassKey {
+ get {
+ return _resourceClassKey ?? String.Empty;
+ }
+ set {
+ _resourceClassKey = value;
+ }
+ }
+
+ internal void BindComplexElementalModel(ControllerContext controllerContext, ModelBindingContext bindingContext, object model) {
+ // need to replace the property filter + model object and create an inner binding context
+ BindAttribute bindAttr = (BindAttribute)TypeDescriptor.GetAttributes(bindingContext.ModelType)[typeof(BindAttribute)];
+ Predicate<string> newPropertyFilter = (bindAttr != null)
+ ? propertyName => bindAttr.IsPropertyAllowed(propertyName) && bindingContext.PropertyFilter(propertyName)
+ : bindingContext.PropertyFilter;
+
+ ModelBindingContext newBindingContext = new ModelBindingContext() {
+ Model = model,
+ ModelName = bindingContext.ModelName,
+ ModelState = bindingContext.ModelState,
+ ModelType = bindingContext.ModelType,
+ PropertyFilter = newPropertyFilter,
+ ValueProvider = bindingContext.ValueProvider
+ };
+
+ // validation
+ if (OnModelUpdating(controllerContext, newBindingContext)) {
+ BindProperties(controllerContext, newBindingContext);
+ OnModelUpdated(controllerContext, newBindingContext);
+ }
+ }
+
+ internal object BindComplexModel(ControllerContext controllerContext, ModelBindingContext bindingContext) {
+ object model = bindingContext.Model;
+ Type modelType = bindingContext.ModelType;
+
+ // if we're being asked to create an array, create a list instead, then coerce to an array after the list is created
+ if (model == null && modelType.IsArray) {
+ Type elementType = modelType.GetElementType();
+ Type listType = typeof(List<>).MakeGenericType(elementType);
+ object collection = CreateModel(controllerContext, bindingContext, listType);
+
+ ModelBindingContext arrayBindingContext = new ModelBindingContext() {
+ Model = collection,
+ ModelName = bindingContext.ModelName,
+ ModelState = bindingContext.ModelState,
+ ModelType = listType,
+ PropertyFilter = bindingContext.PropertyFilter,
+ ValueProvider = bindingContext.ValueProvider
+ };
+ IList list = (IList)UpdateCollection(controllerContext, arrayBindingContext, elementType);
+
+ if (list == null) {
+ return null;
+ }
+
+ Array array = Array.CreateInstance(elementType, list.Count);
+ list.CopyTo(array, 0);
+ return array;
+ }
+
+ if (model == null) {
+ model = CreateModel(controllerContext,bindingContext,modelType);
+ }
+
+ // special-case IDictionary<,> and ICollection<>
+ Type dictionaryType = ExtractGenericInterface(modelType, typeof(IDictionary<,>));
+ if (dictionaryType != null) {
+ Type[] genericArguments = dictionaryType.GetGenericArguments();
+ Type keyType = genericArguments[0];
+ Type valueType = genericArguments[1];
+
+ ModelBindingContext dictionaryBindingContext = new ModelBindingContext() {
+ Model = model,
+ ModelName = bindingContext.ModelName,
+ ModelState = bindingContext.ModelState,
+ ModelType = modelType,
+ PropertyFilter = bindingContext.PropertyFilter,
+ ValueProvider = bindingContext.ValueProvider
+ };
+ object dictionary = UpdateDictionary(controllerContext, dictionaryBindingContext, keyType, valueType);
+ return dictionary;
+ }
+
+ Type enumerableType = ExtractGenericInterface(modelType, typeof(IEnumerable<>));
+ if (enumerableType != null) {
+ Type elementType = enumerableType.GetGenericArguments()[0];
+
+ Type collectionType = typeof(ICollection<>).MakeGenericType(elementType);
+ if (collectionType.IsInstanceOfType(model)) {
+ ModelBindingContext collectionBindingContext = new ModelBindingContext() {
+ Model = model,
+ ModelName = bindingContext.ModelName,
+ ModelState = bindingContext.ModelState,
+ ModelType = modelType,
+ PropertyFilter = bindingContext.PropertyFilter,
+ ValueProvider = bindingContext.ValueProvider
+ };
+ object collection = UpdateCollection(controllerContext, collectionBindingContext, elementType);
+ return collection;
+ }
+ }
+
+ // otherwise, just update the properties on the complex type
+ BindComplexElementalModel(controllerContext, bindingContext, model);
+ return model;
+ }
+
+ public virtual object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) {
+ if (bindingContext == null) {
+ throw new ArgumentNullException("bindingContext");
+ }
+
+ bool performedFallback = false;
+
+ if (!String.IsNullOrEmpty(bindingContext.ModelName) && !DictionaryHelpers.DoesAnyKeyHavePrefix(bindingContext.ValueProvider, bindingContext.ModelName)) {
+ // We couldn't find any entry that began with the prefix. If this is the top-level element, fall back
+ // to the empty prefix.
+ if (bindingContext.FallbackToEmptyPrefix) {
+ var ctx = new ModelBindingContext() {
+ Model = bindingContext.Model,
+ ModelState = bindingContext.ModelState,
+ ModelType = bindingContext.ModelType,
+ PropertyFilter = bindingContext.PropertyFilter,
+ ValueProvider = bindingContext.ValueProvider
+ };
+ bindingContext = ctx;
+ performedFallback = true;
+ }
+ else {
+ return null;
+ }
+ }
+
+ // Simple model = int, string, etc.; determined by calling TypeConverter.CanConvertFrom(typeof(string))
+ // or by seeing if a value in the request exactly matches the name of the model we're binding.
+ // Complex type = everything else.
+ if (!performedFallback) {
+ ValueProviderResult vpResult;
+ bindingContext.ValueProvider.TryGetValue(bindingContext.ModelName, out vpResult);
+ if (vpResult != null) {
+ return BindSimpleModel(controllerContext, bindingContext, vpResult);
+ }
+ }
+ if (TypeDescriptor.GetConverter(bindingContext.ModelType).CanConvertFrom(typeof(string))) {
+ return null;
+ }
+
+ return BindComplexModel(controllerContext, bindingContext);
+ }
+
+ private void BindProperties(ControllerContext controllerContext, ModelBindingContext bindingContext) {
+ PropertyDescriptorCollection properties = GetModelProperties(controllerContext, bindingContext);
+ foreach (PropertyDescriptor property in properties) {
+ BindProperty(controllerContext, bindingContext, property);
+ }
+ }
+
+ protected virtual void BindProperty(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor) {
+ // need to skip properties that aren't part of the request, else we might hit a StackOverflowException
+ string fullPropertyKey = CreateSubPropertyName(bindingContext.ModelName, propertyDescriptor.Name);
+ if (!DictionaryHelpers.DoesAnyKeyHavePrefix(bindingContext.ValueProvider, fullPropertyKey)) {
+ return;
+ }
+
+ // call into the property's model binder
+ IModelBinder propertyBinder = Binders.GetBinder(propertyDescriptor.PropertyType);
+ object originalPropertyValue = propertyDescriptor.GetValue(bindingContext.Model);
+ ModelBindingContext innerBindingContext = new ModelBindingContext() {
+ Model = originalPropertyValue,
+ ModelName = fullPropertyKey,
+ ModelState = bindingContext.ModelState,
+ ModelType = propertyDescriptor.PropertyType,
+ ValueProvider = bindingContext.ValueProvider
+ };
+ object newPropertyValue = propertyBinder.BindModel(controllerContext, innerBindingContext);
+
+ // validation
+ if (OnPropertyValidating(controllerContext, bindingContext, propertyDescriptor, newPropertyValue)) {
+ SetProperty(controllerContext, bindingContext, propertyDescriptor, newPropertyValue);
+ OnPropertyValidated(controllerContext, bindingContext, propertyDescriptor, newPropertyValue);
+ }
+ }
+
+ internal object BindSimpleModel(ControllerContext controllerContext, ModelBindingContext bindingContext, ValueProviderResult valueProviderResult) {
+ bindingContext.ModelState.SetModelValue(bindingContext.ModelName, valueProviderResult);
+
+ // if the value provider returns an instance of the requested data type, we can just short-circuit
+ // the evaluation and return that instance
+ if (bindingContext.ModelType.IsInstanceOfType(valueProviderResult.RawValue)) {
+ return valueProviderResult.RawValue;
+ }
+
+ // since a string is an IEnumerable<char>, we want it to skip the two checks immediately following
+ if (bindingContext.ModelType != typeof(string)) {
+
+ // conversion results in 3 cases, as below
+ if (bindingContext.ModelType.IsArray) {
+ // case 1: user asked for an array
+ // ValueProviderResult.ConvertTo() understands array types, so pass in the array type directly
+ object modelArray = ConvertProviderResult(bindingContext.ModelState, bindingContext.ModelName, valueProviderResult, bindingContext.ModelType);
+ return modelArray;
+ }
+
+ Type enumerableType = ExtractGenericInterface(bindingContext.ModelType, typeof(IEnumerable<>));
+ if (enumerableType != null) {
+ // case 2: user asked for a collection rather than an array
+ // need to call ConvertTo() on the array type, then copy the array to the collection
+ object modelCollection = CreateModel(controllerContext, bindingContext, bindingContext.ModelType);
+ Type elementType = enumerableType.GetGenericArguments()[0];
+ Type arrayType = elementType.MakeArrayType();
+ object modelArray = ConvertProviderResult(bindingContext.ModelState, bindingContext.ModelName, valueProviderResult, arrayType);
+
+ Type collectionType = typeof(ICollection<>).MakeGenericType(elementType);
+ if (collectionType.IsInstanceOfType(modelCollection)) {
+ CollectionHelpers.ReplaceCollection(elementType, modelCollection, modelArray);
+ }
+ return modelCollection;
+ }
+ }
+
+ // case 3: user asked for an individual element
+ object model = ConvertProviderResult(bindingContext.ModelState, bindingContext.ModelName, valueProviderResult, bindingContext.ModelType);
+ return model;
+ }
+
+ private static bool CanUpdateReadonlyTypedReference(Type type) {
+ // value types aren't strictly immutable, but because they have copy-by-value semantics
+ // we can't update a value type that is marked readonly
+ if (type.IsValueType) {
+ return false;
+ }
+
+ // arrays are mutable, but because we can't change their length we shouldn't try
+ // to update an array that is referenced readonly
+ if (type.IsArray) {
+ return false;
+ }
+
+ // special-case known common immutable types
+ if (type == typeof(string)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ [SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.Mvc.ValueProviderResult.ConvertTo(System.Type)",
+ Justification = "The target object should make the correct culture determination, not this method.")]
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes",
+ Justification = "We're recording this exception so that we can act on it later.")]
+ private static object ConvertProviderResult(ModelStateDictionary modelState, string modelStateKey, ValueProviderResult valueProviderResult, Type destinationType) {
+ try {
+ object convertedValue = valueProviderResult.ConvertTo(destinationType);
+ return convertedValue;
+ }
+ catch (Exception ex) {
+ modelState.AddModelError(modelStateKey, ex);
+ return null;
+ }
+ }
+
+ protected virtual object CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) {
+ Type typeToCreate = modelType;
+
+ // we can understand some collection interfaces, e.g. IList<>, IDictionary<,>
+ if (modelType.IsGenericType) {
+ Type genericTypeDefinition = modelType.GetGenericTypeDefinition();
+ if (genericTypeDefinition == typeof(IDictionary<,>)) {
+ typeToCreate = typeof(Dictionary<,>).MakeGenericType(modelType.GetGenericArguments());
+ }
+ else if (genericTypeDefinition == typeof(IEnumerable<>) || genericTypeDefinition == typeof(ICollection<>) || genericTypeDefinition == typeof(IList<>)) {
+ typeToCreate = typeof(List<>).MakeGenericType(modelType.GetGenericArguments());
+ }
+ }
+
+ // fallback to the type's default constructor
+ return Activator.CreateInstance(typeToCreate);
+ }
+
+ protected static string CreateSubIndexName(string prefix, int index) {
+ return String.Format(CultureInfo.InvariantCulture, "{0}[{1}]", prefix, index);
+ }
+
+ protected static string CreateSubPropertyName(string prefix, string propertyName) {
+ return (!String.IsNullOrEmpty(prefix)) ? prefix + "." + propertyName : propertyName;
+ }
+
+ private static Type ExtractGenericInterface(Type queryType, Type interfaceType) {
+ Func<Type, bool> matchesInterface = t => t.IsGenericType && t.GetGenericTypeDefinition() == interfaceType;
+ return (matchesInterface(queryType)) ? queryType : queryType.GetInterfaces().FirstOrDefault(matchesInterface);
+ }
+
+ protected virtual PropertyDescriptorCollection GetModelProperties(ControllerContext controllerContext, ModelBindingContext bindingContext) {
+ PropertyDescriptorCollection allProperties = TypeDescriptor.GetProperties(bindingContext.ModelType);
+ Predicate<string> propertyFilter = bindingContext.PropertyFilter;
+
+ var filteredProperties = from PropertyDescriptor property in allProperties
+ where ShouldUpdateProperty(property, propertyFilter)
+ select property;
+
+ return new PropertyDescriptorCollection(filteredProperties.ToArray());
+ }
+
+ private static string GetValueRequiredResource(ControllerContext controllerContext) {
+ string resourceValue = null;
+ if (!String.IsNullOrEmpty(ResourceClassKey) && (controllerContext != null) && (controllerContext.HttpContext != null)) {
+ // If the user specified a ResourceClassKey try to load the resource they specified.
+ // If the class key is invalid, an exception will be thrown.
+ // If the class key is valid but the resource is not found, it returns null, in which
+ // case it will fall back to the MVC default error message.
+ resourceValue = controllerContext.HttpContext.GetGlobalResourceObject(ResourceClassKey, "PropertyValueRequired", CultureInfo.CurrentUICulture) as string;
+ }
+ return resourceValue ?? MvcResources.DefaultModelBinder_ValueRequired;
+ }
+
+ protected virtual void OnModelUpdated(ControllerContext controllerContext, ModelBindingContext bindingContext) {
+ IDataErrorInfo errorProvider = bindingContext.Model as IDataErrorInfo;
+ if (errorProvider != null) {
+ string errorText = errorProvider.Error;
+ if (!String.IsNullOrEmpty(errorText)) {
+ bindingContext.ModelState.AddModelError(bindingContext.ModelName, errorText);
+ }
+ }
+ }
+
+ protected virtual bool OnModelUpdating(ControllerContext controllerContext, ModelBindingContext bindingContext) {
+ // default implementation does nothing
+
+ return true;
+ }
+
+ protected virtual void OnPropertyValidated(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, object value) {
+ IDataErrorInfo errorProvider = bindingContext.Model as IDataErrorInfo;
+ if (errorProvider != null) {
+ string errorText = errorProvider[propertyDescriptor.Name];
+ if (!String.IsNullOrEmpty(errorText)) {
+ string modelStateKey = CreateSubPropertyName(bindingContext.ModelName, propertyDescriptor.Name);
+ bindingContext.ModelState.AddModelError(modelStateKey, errorText);
+ }
+ }
+ }
+
+ protected virtual bool OnPropertyValidating(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, object value) {
+ // default implementation just checks to make sure that required text entry fields aren't left blank
+
+ string modelStateKey = CreateSubPropertyName(bindingContext.ModelName, propertyDescriptor.Name);
+ return VerifyValueUsability(controllerContext, bindingContext.ModelState, modelStateKey, propertyDescriptor.PropertyType, value);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes",
+ Justification = "We're recording this exception so that we can act on it later.")]
+ protected virtual void SetProperty(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, object value) {
+ if (propertyDescriptor.IsReadOnly) {
+ return;
+ }
+
+ try {
+ propertyDescriptor.SetValue(bindingContext.Model, value);
+ }
+ catch (Exception ex) {
+ string modelStateKey = CreateSubPropertyName(bindingContext.ModelName, propertyDescriptor.Name);
+ bindingContext.ModelState.AddModelError(modelStateKey, ex);
+ }
+ }
+
+ private static bool ShouldUpdateProperty(PropertyDescriptor property, Predicate<string> propertyFilter) {
+ if (property.IsReadOnly && !CanUpdateReadonlyTypedReference(property.PropertyType)) {
+ return false;
+ }
+
+ // if this property is rejected by the filter, move on
+ if (!propertyFilter(property.Name)) {
+ return false;
+ }
+
+ // otherwise, allow
+ return true;
+ }
+
+ internal object UpdateCollection(ControllerContext controllerContext, ModelBindingContext bindingContext, Type elementType) {
+ IModelBinder elementBinder = Binders.GetBinder(elementType);
+
+ // build up a list of items from the request
+ List<object> modelList = new List<object>();
+ for (int currentIndex = 0; ; currentIndex++) {
+ string subIndexKey = CreateSubIndexName(bindingContext.ModelName, currentIndex);
+ if (!DictionaryHelpers.DoesAnyKeyHavePrefix(bindingContext.ValueProvider, subIndexKey)) {
+ // we ran out of elements to pull
+ break;
+ }
+
+ ModelBindingContext innerContext = new ModelBindingContext() {
+ ModelName = subIndexKey,
+ ModelState = bindingContext.ModelState,
+ ModelType = elementType,
+ PropertyFilter = bindingContext.PropertyFilter,
+ ValueProvider = bindingContext.ValueProvider
+ };
+ object thisElement = elementBinder.BindModel(controllerContext, innerContext);
+
+ // we need to merge model errors up
+ VerifyValueUsability(controllerContext, bindingContext.ModelState, subIndexKey, elementType, thisElement);
+ modelList.Add(thisElement);
+ }
+
+ // if there weren't any elements at all in the request, just return
+ if (modelList.Count == 0) {
+ return null;
+ }
+
+ // replace the original collection
+ object collection = bindingContext.Model;
+ CollectionHelpers.ReplaceCollection(elementType, collection, modelList);
+ return collection;
+ }
+
+ internal object UpdateDictionary(ControllerContext controllerContext, ModelBindingContext bindingContext, Type keyType, Type valueType) {
+ IModelBinder keyBinder = Binders.GetBinder(keyType);
+ IModelBinder valueBinder = Binders.GetBinder(valueType);
+
+ // build up a list of items from the request
+ List<KeyValuePair<object, object>> modelList = new List<KeyValuePair<object, object>>();
+ for (int currentIndex = 0; ; currentIndex++) {
+ string subIndexKey = CreateSubIndexName(bindingContext.ModelName, currentIndex);
+ string keyFieldKey = CreateSubPropertyName(subIndexKey, "key");
+ string valueFieldKey = CreateSubPropertyName(subIndexKey, "value");
+
+ if (!(DictionaryHelpers.DoesAnyKeyHavePrefix(bindingContext.ValueProvider, keyFieldKey) && DictionaryHelpers.DoesAnyKeyHavePrefix(bindingContext.ValueProvider, valueFieldKey))) {
+ // we ran out of elements to pull
+ break;
+ }
+
+ // bind the key
+ ModelBindingContext keyBindingContext = new ModelBindingContext() {
+ ModelName = keyFieldKey,
+ ModelState = bindingContext.ModelState,
+ ModelType = keyType,
+ ValueProvider = bindingContext.ValueProvider
+ };
+ object thisKey = keyBinder.BindModel(controllerContext, keyBindingContext);
+
+ // we need to merge model errors up
+ VerifyValueUsability(controllerContext, bindingContext.ModelState, keyFieldKey, keyType, thisKey);
+ if (!keyType.IsInstanceOfType(thisKey)) {
+ // we can't add an invalid key, so just move on
+ continue;
+ }
+
+ // bind the value
+ ModelBindingContext valueBindingContext = new ModelBindingContext() {
+ ModelName = valueFieldKey,
+ ModelState = bindingContext.ModelState,
+ ModelType = valueType,
+ PropertyFilter = bindingContext.PropertyFilter,
+ ValueProvider = bindingContext.ValueProvider
+ };
+ object thisValue = valueBinder.BindModel(controllerContext, valueBindingContext);
+
+ // we need to merge model errors up
+ VerifyValueUsability(controllerContext, bindingContext.ModelState, valueFieldKey, valueType, thisValue);
+ KeyValuePair<object, object> kvp = new KeyValuePair<object, object>(thisKey, thisValue);
+ modelList.Add(kvp);
+ }
+
+ // if there weren't any elements at all in the request, just return
+ if (modelList.Count == 0) {
+ return null;
+ }
+
+ // replace the original collection
+ object dictionary = bindingContext.Model;
+ CollectionHelpers.ReplaceDictionary(keyType, valueType, dictionary, modelList);
+ return dictionary;
+ }
+
+ private static bool VerifyValueUsability(ControllerContext controllerContext, ModelStateDictionary modelState, string modelStateKey, Type elementType, object value) {
+ if (value == null && !TypeHelpers.TypeAllowsNullValue(elementType)) {
+ if (modelState.IsValidField(modelStateKey)) {
+ // a required entry field was left blank
+ string message = GetValueRequiredResource(controllerContext);
+ modelState.AddModelError(modelStateKey, message);
+ }
+ // we don't care about "you must enter a value" messages if there was an error
+ return false;
+ }
+
+ return true;
+ }
+
+ // This helper type is used because we're working with strongly-typed collections, but we don't know the Ts
+ // ahead of time. By using the generic methods below, we can consolidate the collection-specific code in a
+ // single helper type rather than having reflection-based calls spread throughout the DefaultModelBinder type.
+ // There is a single point of entry to each of the methods below, so they're fairly simple to maintain.
+
+ private static class CollectionHelpers {
+
+ private static readonly MethodInfo _replaceCollectionMethod = typeof(CollectionHelpers).GetMethod("ReplaceCollectionImpl", BindingFlags.Static | BindingFlags.NonPublic);
+ private static readonly MethodInfo _replaceDictionaryMethod = typeof(CollectionHelpers).GetMethod("ReplaceDictionaryImpl", BindingFlags.Static | BindingFlags.NonPublic);
+
+ public static void ReplaceCollection(Type collectionType, object collection, object newContents) {
+ MethodInfo targetMethod = _replaceCollectionMethod.MakeGenericMethod(collectionType);
+ targetMethod.Invoke(null, new object[] { collection, newContents });
+ }
+
+ private static void ReplaceCollectionImpl<T>(ICollection<T> collection, IEnumerable newContents) {
+ collection.Clear();
+ if (newContents != null) {
+ foreach (object item in newContents) {
+ // if the item was not a T, some conversion failed. the error message will be propagated,
+ // but in the meanwhile we need to make a placeholder element in the array.
+ T castItem = (item is T) ? (T)item : default(T);
+ collection.Add(castItem);
+ }
+ }
+ }
+
+ public static void ReplaceDictionary(Type keyType, Type valueType, object dictionary, object newContents) {
+ MethodInfo targetMethod = _replaceDictionaryMethod.MakeGenericMethod(keyType, valueType);
+ targetMethod.Invoke(null, new object[] { dictionary, newContents });
+ }
+
+ private static void ReplaceDictionaryImpl<TKey, TValue>(IDictionary<TKey, TValue> dictionary, IEnumerable<KeyValuePair<object, object>> newContents) {
+ dictionary.Clear();
+ foreach (var item in newContents) {
+ // if the item was not a T, some conversion failed. the error message will be propagated,
+ // but in the meanwhile we need to make a placeholder element in the dictionary.
+ TKey castKey = (TKey)item.Key; // this cast shouldn't fail
+ TValue castValue = (item.Value is TValue) ? (TValue)item.Value : default(TValue);
+ dictionary[castKey] = castValue;
+ }
+ }
+
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/DefaultViewLocationCache.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/DefaultViewLocationCache.cs
new file mode 100644
index 0000000..33eec56
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/DefaultViewLocationCache.cs
@@ -0,0 +1,60 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Web.Caching;
+ using System.Web.Mvc.Resources;
+
+ [SuppressMessage("Microsoft.Security", "CA2112:SecuredTypesShouldNotExposeFields",
+ Justification = "The Null field does not have access to secure information")]
+ public class DefaultViewLocationCache : IViewLocationCache {
+ private static readonly TimeSpan _defaultTimeSpan = new TimeSpan(0, 15, 0);
+
+ public DefaultViewLocationCache()
+ : this(_defaultTimeSpan) {
+ }
+
+ public DefaultViewLocationCache(TimeSpan timeSpan) {
+ if (timeSpan.Ticks < 0) {
+ throw new InvalidOperationException(MvcResources.DefaultViewLocationCache_NegativeTimeSpan);
+ }
+ TimeSpan = timeSpan;
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes",
+ Justification = "The reference type is immutable. ")]
+ public static readonly IViewLocationCache Null = new NullViewLocationCache();
+
+ public TimeSpan TimeSpan {
+ get;
+ private set;
+ }
+
+ #region IViewLocationCache Members
+ public string GetViewLocation(HttpContextBase httpContext, string key) {
+ if (httpContext == null) {
+ throw new ArgumentNullException("httpContext");
+ }
+ return (string)httpContext.Cache[key];
+ }
+
+ public void InsertViewLocation(HttpContextBase httpContext, string key, string virtualPath) {
+ if (httpContext == null) {
+ throw new ArgumentNullException("httpContext");
+ }
+ httpContext.Cache.Insert(key, virtualPath, null /* dependencies */, Cache.NoAbsoluteExpiration, TimeSpan);
+ }
+ #endregion
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/DescriptorUtil.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/DescriptorUtil.cs
new file mode 100644
index 0000000..b248771
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/DescriptorUtil.cs
@@ -0,0 +1,34 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Linq;
+ using System.Threading;
+
+ internal static class DescriptorUtil {
+
+ public static TDescriptor[] LazilyFetchOrCreateDescriptors<TReflection, TDescriptor>(ref TDescriptor[] cacheLocation, Func<TReflection[]> initializer, Func<TReflection, TDescriptor> converter) {
+ // did we already calculate this once?
+ TDescriptor[] existingCache = Interlocked.CompareExchange(ref cacheLocation, null, null);
+ if (existingCache != null) {
+ return existingCache;
+ }
+
+ TReflection[] memberInfos = initializer();
+ TDescriptor[] descriptors = memberInfos.Select(converter).Where(descriptor => descriptor != null).ToArray();
+ TDescriptor[] updatedCache = Interlocked.CompareExchange(ref cacheLocation, descriptors, null);
+ return updatedCache ?? descriptors;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/DictionaryHelpers.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/DictionaryHelpers.cs
new file mode 100644
index 0000000..171835c
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/DictionaryHelpers.cs
@@ -0,0 +1,52 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ internal static class DictionaryHelpers {
+
+ public static IEnumerable<KeyValuePair<string, TValue>> FindKeysWithPrefix<TValue>(IDictionary<string, TValue> dictionary, string prefix) {
+ TValue exactMatchValue;
+ if (dictionary.TryGetValue(prefix, out exactMatchValue)) {
+ yield return new KeyValuePair<string, TValue>(prefix, exactMatchValue);
+ }
+
+ foreach (var entry in dictionary) {
+ string key = entry.Key;
+
+ if (key.Length <= prefix.Length) {
+ continue;
+ }
+
+ if (!key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) {
+ continue;
+ }
+
+ char charAfterPrefix = key[prefix.Length];
+ switch (charAfterPrefix) {
+ case '[':
+ case '.':
+ yield return entry;
+ break;
+ }
+ }
+ }
+
+ public static bool DoesAnyKeyHavePrefix<TValue>(IDictionary<string, TValue> dictionary, string prefix) {
+ return FindKeysWithPrefix(dictionary, prefix).Any();
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/EmptyResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/EmptyResult.cs
new file mode 100644
index 0000000..61fe457
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/EmptyResult.cs
@@ -0,0 +1,29 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ // represents a result that doesn't do anything, like a controller action returning null
+ public class EmptyResult : ActionResult {
+
+ private static readonly EmptyResult _singleton = new EmptyResult();
+
+ internal static EmptyResult Instance {
+ get {
+ return _singleton;
+ }
+ }
+
+ public override void ExecuteResult(ControllerContext context) {
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ExceptionContext.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ExceptionContext.cs
new file mode 100644
index 0000000..0a11874
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ExceptionContext.cs
@@ -0,0 +1,56 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+
+ public class ExceptionContext : ControllerContext {
+
+ private ActionResult _result;
+
+ // parameterless constructor used for mocking
+ public ExceptionContext() {
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
+ Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]
+ public ExceptionContext(ControllerContext controllerContext, Exception exception)
+ : base(controllerContext) {
+ if (exception == null) {
+ throw new ArgumentNullException("exception");
+ }
+
+ Exception = exception;
+ }
+
+ public virtual Exception Exception {
+ get;
+ set;
+ }
+
+ public bool ExceptionHandled {
+ get;
+ set;
+ }
+
+ public ActionResult Result {
+ get {
+ return _result ?? EmptyResult.Instance;
+ }
+ set {
+ _result = value;
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/FileContentResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/FileContentResult.cs
new file mode 100644
index 0000000..ee34b42
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/FileContentResult.cs
@@ -0,0 +1,41 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Web;
+
+ public class FileContentResult : FileResult {
+
+ public FileContentResult(byte[] fileContents, string contentType)
+ : base(contentType) {
+ if (fileContents == null) {
+ throw new ArgumentNullException("fileContents");
+ }
+
+ FileContents = fileContents;
+ }
+
+ [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays",
+ Justification = "There's no reason to tamper-proof this array since it's supplied to the type's constructor.")]
+ public byte[] FileContents {
+ get;
+ private set;
+ }
+
+ protected override void WriteFile(HttpResponseBase response) {
+ response.OutputStream.Write(FileContents, 0, FileContents.Length);
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/FilePathResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/FilePathResult.cs
new file mode 100644
index 0000000..bfd74f8
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/FilePathResult.cs
@@ -0,0 +1,39 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+
+ public class FilePathResult : FileResult {
+
+ public FilePathResult(string fileName, string contentType)
+ : base(contentType) {
+ if (String.IsNullOrEmpty(fileName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "fileName");
+ }
+
+ FileName = fileName;
+ }
+
+ public string FileName {
+ get;
+ private set;
+ }
+
+ protected override void WriteFile(HttpResponseBase response) {
+ response.TransmitFile(FileName);
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/FileResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/FileResult.cs
new file mode 100644
index 0000000..f6ef70f
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/FileResult.cs
@@ -0,0 +1,70 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Net.Mime;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+
+ public abstract class FileResult : ActionResult {
+
+ protected FileResult(string contentType) {
+ if (String.IsNullOrEmpty(contentType)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "contentType");
+ }
+
+ ContentType = contentType;
+ }
+
+ private string _fileDownloadName;
+
+ public string ContentType {
+ get;
+ private set;
+ }
+
+ public string FileDownloadName {
+ get {
+ return _fileDownloadName ?? String.Empty;
+ }
+ set {
+ _fileDownloadName = value;
+ }
+ }
+
+ public override void ExecuteResult(ControllerContext context) {
+ if (context == null) {
+ throw new ArgumentNullException("context");
+ }
+
+ HttpResponseBase response = context.HttpContext.Response;
+ response.ContentType = ContentType;
+
+ if (!String.IsNullOrEmpty(FileDownloadName)) {
+ // From RFC 2183, Sec. 2.3:
+ // The sender may want to suggest a filename to be used if the entity is
+ // detached and stored in a separate file. If the receiving MUA writes
+ // the entity to a file, the suggested filename should be used as a
+ // basis for the actual filename, where possible.
+ ContentDisposition disposition = new ContentDisposition() { FileName = FileDownloadName };
+ string headerValue = disposition.ToString();
+ context.HttpContext.Response.AddHeader("Content-Disposition", headerValue);
+ }
+
+ WriteFile(response);
+ }
+
+ protected abstract void WriteFile(HttpResponseBase response);
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/FileStreamResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/FileStreamResult.cs
new file mode 100644
index 0000000..be808b7
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/FileStreamResult.cs
@@ -0,0 +1,56 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.IO;
+ using System.Web;
+
+ public class FileStreamResult : FileResult {
+
+ // default buffer size as defined in BufferedStream type
+ private const int _bufferSize = 0x1000;
+
+ public FileStreamResult(Stream fileStream, string contentType)
+ : base(contentType) {
+ if (fileStream == null) {
+ throw new ArgumentNullException("fileStream");
+ }
+
+ FileStream = fileStream;
+ }
+
+ public Stream FileStream {
+ get;
+ private set;
+ }
+
+ protected override void WriteFile(HttpResponseBase response) {
+ // grab chunks of data and write to the output stream
+ Stream outputStream = response.OutputStream;
+ using (FileStream) {
+ byte[] buffer = new byte[_bufferSize];
+
+ while (true) {
+ int bytesRead = FileStream.Read(buffer, 0, _bufferSize);
+ if (bytesRead == 0) {
+ // no more data
+ break;
+ }
+
+ outputStream.Write(buffer, 0, bytesRead);
+ }
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/FilterAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/FilterAttribute.cs
new file mode 100644
index 0000000..b802360
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/FilterAttribute.cs
@@ -0,0 +1,35 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Web.Mvc.Resources;
+
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
+ public abstract class FilterAttribute : Attribute {
+
+ private int _order = -1;
+
+ public int Order {
+ get {
+ return _order;
+ }
+ set {
+ if (value < -1) {
+ throw new ArgumentOutOfRangeException("value",
+ MvcResources.FilterAttribute_OrderOutOfRange);
+ }
+ _order = value;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/FilterInfo.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/FilterInfo.cs
new file mode 100644
index 0000000..7b5e487
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/FilterInfo.cs
@@ -0,0 +1,48 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Collections.Generic;
+
+ public class FilterInfo {
+
+ private List<IActionFilter> _actionFilters = new List<IActionFilter>();
+ private List<IAuthorizationFilter> _authorizationFilters = new List<IAuthorizationFilter>();
+ private List<IExceptionFilter> _exceptionFilters = new List<IExceptionFilter>();
+ private List<IResultFilter> _resultFilters = new List<IResultFilter>();
+
+ public IList<IActionFilter> ActionFilters {
+ get {
+ return _actionFilters;
+ }
+ }
+
+ public IList<IAuthorizationFilter> AuthorizationFilters {
+ get {
+ return _authorizationFilters;
+ }
+ }
+
+ public IList<IExceptionFilter> ExceptionFilters {
+ get {
+ return _exceptionFilters;
+ }
+ }
+
+ public IList<IResultFilter> ResultFilters {
+ get {
+ return _resultFilters;
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/FormCollection.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/FormCollection.cs
new file mode 100644
index 0000000..cef4c5f
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/FormCollection.cs
@@ -0,0 +1,90 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.Specialized;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Web.Mvc.Resources;
+
+ [SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable",
+ Justification = "It is not anticipated that users will need to serialize this type.")]
+ [SuppressMessage("Microsoft.Design", "CA1035:ICollectionImplementationsHaveStronglyTypedMembers",
+ Justification = "It is not anticipated that users will call FormCollection.CopyTo().")]
+ [FormCollectionBinder]
+ public class FormCollection : NameValueCollection {
+
+ public FormCollection() {
+ }
+
+ public FormCollection(NameValueCollection collection) {
+ if (collection == null) {
+ throw new ArgumentNullException("collection");
+ }
+
+ Add(collection);
+ }
+
+ public IDictionary<string, ValueProviderResult> ToValueProvider() {
+ CultureInfo currentCulture = CultureInfo.CurrentCulture;
+
+ Dictionary<string, ValueProviderResult> dict = new Dictionary<string, ValueProviderResult>(StringComparer.OrdinalIgnoreCase);
+ string[] keys = AllKeys;
+ foreach (string key in keys) {
+ string[] rawValue = GetValues(key);
+ string attemptedValue = this[key];
+ ValueProviderResult vpResult = new ValueProviderResult(rawValue, attemptedValue, currentCulture);
+ dict[key] = vpResult;
+ }
+
+ return dict;
+ }
+
+ public virtual ValueProviderResult GetValue(string name) {
+ if (String.IsNullOrEmpty(name)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "name");
+ }
+
+ string[] rawValue = GetValues(name);
+ if (rawValue == null) {
+ return null;
+ }
+
+ string attemptedValue = this[name];
+ return new ValueProviderResult(rawValue, attemptedValue, CultureInfo.CurrentCulture);
+ }
+}
+ sealed class FormCollectionBinderAttribute : CustomModelBinderAttribute {
+
+ // since the FormCollectionModelBinder.BindModel() method is thread-safe, we only need to keep
+ // a single instance of the binder around
+ private static readonly FormCollectionModelBinder _binder = new FormCollectionModelBinder();
+
+ public override IModelBinder GetBinder() {
+ return _binder;
+ }
+
+ // this class is used for generating a FormCollection object
+ private sealed class FormCollectionModelBinder : IModelBinder {
+ public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+
+ return new FormCollection(controllerContext.HttpContext.Request.Form);
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/FormMethod.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/FormMethod.cs
new file mode 100644
index 0000000..5b022b2
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/FormMethod.cs
@@ -0,0 +1,18 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ public enum FormMethod {
+ Get,
+ Post
+ }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/HandleErrorAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/HandleErrorAttribute.cs
new file mode 100644
index 0000000..38443cf
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/HandleErrorAttribute.cs
@@ -0,0 +1,108 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+
+ [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes",
+ Justification = "This attribute is AllowMultiple = true and users might want to override behavior.")]
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)]
+ public class HandleErrorAttribute : FilterAttribute, IExceptionFilter {
+
+ private const string _defaultView = "Error";
+
+ private Type _exceptionType = typeof(Exception);
+ private string _master;
+ private string _view;
+
+ public Type ExceptionType {
+ get {
+ return _exceptionType;
+ }
+ set {
+ if (value == null) {
+ throw new ArgumentNullException("value");
+ }
+ if (!typeof(Exception).IsAssignableFrom(value)) {
+ throw new ArgumentException(String.Format(CultureInfo.CurrentUICulture,
+ MvcResources.ExceptionViewAttribute_NonExceptionType, value.FullName));
+ }
+
+ _exceptionType = value;
+ }
+ }
+
+ public string Master {
+ get {
+ return _master ?? String.Empty;
+ }
+ set {
+ _master = value;
+ }
+ }
+
+ public string View {
+ get {
+ return (!String.IsNullOrEmpty(_view)) ? _view : _defaultView;
+ }
+ set {
+ _view = value;
+ }
+ }
+
+ public virtual void OnException(ExceptionContext filterContext) {
+ if (filterContext == null) {
+ throw new ArgumentNullException("filterContext");
+ }
+
+ // If custom errors are disabled, we need to let the normal ASP.NET exception handler
+ // execute so that the user can see useful debugging information.
+ if (filterContext.ExceptionHandled || !filterContext.HttpContext.IsCustomErrorEnabled) {
+ return;
+ }
+
+ Exception exception = filterContext.Exception;
+
+ // If this is not an HTTP 500 (for example, if somebody throws an HTTP 404 from an action method),
+ // ignore it.
+ if (new HttpException(null, exception).GetHttpCode() != 500) {
+ return;
+ }
+
+ if (!ExceptionType.IsInstanceOfType(exception)) {
+ return;
+ }
+
+ string controllerName = (string)filterContext.RouteData.Values["controller"];
+ string actionName = (string)filterContext.RouteData.Values["action"];
+ HandleErrorInfo model = new HandleErrorInfo(filterContext.Exception, controllerName, actionName);
+ filterContext.Result = new ViewResult {
+ ViewName = View,
+ MasterName = Master,
+ ViewData = new ViewDataDictionary<HandleErrorInfo>(model),
+ TempData = filterContext.Controller.TempData
+ };
+ filterContext.ExceptionHandled = true;
+ filterContext.HttpContext.Response.Clear();
+ filterContext.HttpContext.Response.StatusCode = 500;
+
+ // Certain versions of IIS will sometimes use their own error page when
+ // they detect a server error. Setting this property indicates that we
+ // want it to try to render ASP.NET MVC's error page instead.
+ filterContext.HttpContext.Response.TrySkipIisCustomErrors = true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/HandleErrorInfo.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/HandleErrorInfo.cs
new file mode 100644
index 0000000..9d6f1ab
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/HandleErrorInfo.cs
@@ -0,0 +1,51 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Web.Mvc.Resources;
+
+ public class HandleErrorInfo {
+
+ public HandleErrorInfo(Exception exception, string controllerName, string actionName) {
+ if (exception == null) {
+ throw new ArgumentNullException("exception");
+ }
+ if (String.IsNullOrEmpty(controllerName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "controllerName");
+ }
+ if (string.IsNullOrEmpty(actionName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "actionName");
+ }
+
+ Exception = exception;
+ ControllerName = controllerName;
+ ActionName = actionName;
+ }
+
+ public string ActionName {
+ get;
+ private set;
+ }
+
+ public string ControllerName {
+ get;
+ private set;
+ }
+
+ public Exception Exception {
+ get;
+ private set;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/FormExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/FormExtensions.cs
new file mode 100644
index 0000000..570ffd3
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/FormExtensions.cs
@@ -0,0 +1,140 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Html {
+ using System.Collections.Generic;
+ using System.Web.Routing;
+
+ public static class FormExtensions {
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper) {
+ // generates <form action="{current url}" method="post">...</form>
+ string formAction = htmlHelper.ViewContext.HttpContext.Request.RawUrl;
+ return FormHelper(htmlHelper, formAction, FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, object routeValues) {
+ return BeginForm(htmlHelper, null, null, new RouteValueDictionary(routeValues), FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, RouteValueDictionary routeValues) {
+ return BeginForm(htmlHelper, null, null, routeValues, FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName) {
+ return BeginForm(htmlHelper, actionName, controllerName, new RouteValueDictionary(), FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, object routeValues) {
+ return BeginForm(htmlHelper, actionName, controllerName, new RouteValueDictionary(routeValues), FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, RouteValueDictionary routeValues) {
+ return BeginForm(htmlHelper, actionName, controllerName, routeValues, FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, FormMethod method) {
+ return BeginForm(htmlHelper, actionName, controllerName, new RouteValueDictionary(), method, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, object routeValues, FormMethod method) {
+ return BeginForm(htmlHelper, actionName, controllerName, new RouteValueDictionary(routeValues), method, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, RouteValueDictionary routeValues, FormMethod method) {
+ return BeginForm(htmlHelper, actionName, controllerName, routeValues, method, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, FormMethod method, object htmlAttributes) {
+ return BeginForm(htmlHelper, actionName, controllerName, new RouteValueDictionary(), method, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, FormMethod method, IDictionary<string, object> htmlAttributes) {
+ return BeginForm(htmlHelper, actionName, controllerName, new RouteValueDictionary(), method, htmlAttributes);
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, object routeValues, FormMethod method, object htmlAttributes) {
+ return BeginForm(htmlHelper, actionName, controllerName, new RouteValueDictionary(routeValues), method, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static MvcForm BeginForm(this HtmlHelper htmlHelper, string actionName, string controllerName, RouteValueDictionary routeValues, FormMethod method, IDictionary<string, object> htmlAttributes) {
+ string formAction = UrlHelper.GenerateUrl(null /* routeName */, actionName, controllerName, routeValues, htmlHelper.RouteCollection, htmlHelper.ViewContext.RequestContext, true /* includeImplicitMvcValues */);
+ return FormHelper(htmlHelper, formAction, method, htmlAttributes);
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, object routeValues) {
+ return BeginRouteForm(htmlHelper, null /* routeName */, new RouteValueDictionary(routeValues), FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, RouteValueDictionary routeValues) {
+ return BeginRouteForm(htmlHelper, null /* routeName */, routeValues, FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, string routeName) {
+ return BeginRouteForm(htmlHelper, routeName, new RouteValueDictionary(), FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, string routeName, object routeValues) {
+ return BeginRouteForm(htmlHelper, routeName, new RouteValueDictionary(routeValues), FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, string routeName, RouteValueDictionary routeValues) {
+ return BeginRouteForm(htmlHelper, routeName, routeValues, FormMethod.Post, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, string routeName, FormMethod method) {
+ return BeginRouteForm(htmlHelper, routeName, new RouteValueDictionary(), method, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, string routeName, object routeValues, FormMethod method) {
+ return BeginRouteForm(htmlHelper, routeName, new RouteValueDictionary(routeValues), method, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, string routeName, RouteValueDictionary routeValues, FormMethod method) {
+ return BeginRouteForm(htmlHelper, routeName, routeValues, method, new RouteValueDictionary());
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, string routeName, FormMethod method, object htmlAttributes) {
+ return BeginRouteForm(htmlHelper, routeName, new RouteValueDictionary(), method, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, string routeName, FormMethod method, IDictionary<string, object> htmlAttributes) {
+ return BeginRouteForm(htmlHelper, routeName, new RouteValueDictionary(), method, htmlAttributes);
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, string routeName, object routeValues, FormMethod method, object htmlAttributes) {
+ return BeginRouteForm(htmlHelper, routeName, new RouteValueDictionary(routeValues), method, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static MvcForm BeginRouteForm(this HtmlHelper htmlHelper, string routeName, RouteValueDictionary routeValues, FormMethod method, IDictionary<string, object> htmlAttributes) {
+ string formAction = UrlHelper.GenerateUrl(routeName, null, null, routeValues, htmlHelper.RouteCollection, htmlHelper.ViewContext.RequestContext, false /* includeImplicitMvcValues */);
+ return FormHelper(htmlHelper, formAction, method, htmlAttributes);
+ }
+
+ public static void EndForm(this HtmlHelper htmlHelper) {
+ HttpResponseBase httpResponse = htmlHelper.ViewContext.HttpContext.Response;
+ httpResponse.Write("</form>");
+ }
+
+ private static MvcForm FormHelper(this HtmlHelper htmlHelper, string formAction, FormMethod method, IDictionary<string, object> htmlAttributes) {
+ TagBuilder tagBuilder = new TagBuilder("form");
+ tagBuilder.MergeAttributes(htmlAttributes);
+ // action is implicitly generated, so htmlAttributes take precedence.
+ tagBuilder.MergeAttribute("action", formAction);
+ // method is an explicit parameter, so it takes precedence over the htmlAttributes.
+ tagBuilder.MergeAttribute("method", HtmlHelper.GetFormMethodString(method), true);
+
+ HttpResponseBase httpResponse = htmlHelper.ViewContext.HttpContext.Response;
+ httpResponse.Write(tagBuilder.ToString(TagRenderMode.StartTag));
+ return new MvcForm(htmlHelper.ViewContext.HttpContext.Response);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/InputExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/InputExtensions.cs
new file mode 100644
index 0000000..0c697b4
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/InputExtensions.cs
@@ -0,0 +1,219 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Html {
+ using System;
+ using System.Collections.Generic;
+ using System.Globalization;
+ using System.Text;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ public static class InputExtensions {
+ public static string CheckBox(this HtmlHelper htmlHelper, string name) {
+ return CheckBox(htmlHelper, name, (object)null /* htmlAttributes */);
+ }
+
+ public static string CheckBox(this HtmlHelper htmlHelper, string name, bool isChecked) {
+ return CheckBox(htmlHelper, name, isChecked, (object)null /* htmlAttributes */);
+ }
+
+ public static string CheckBox(this HtmlHelper htmlHelper, string name, bool isChecked, object htmlAttributes) {
+ return CheckBox(htmlHelper, name, isChecked, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string CheckBox(this HtmlHelper htmlHelper, string name, object htmlAttributes) {
+ return CheckBox(htmlHelper, name, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string CheckBox(this HtmlHelper htmlHelper, string name, IDictionary<string, object> htmlAttributes) {
+ return htmlHelper.InputHelper(InputType.CheckBox, name, "true", true /* useViewData */, false /* isChecked */, true /* setId */, false /* isExplicitValue */, htmlAttributes);
+ }
+
+ public static string CheckBox(this HtmlHelper htmlHelper, string name, bool isChecked, IDictionary<string, object> htmlAttributes) {
+ // checked is an explicit parameter, but the value attribute is implicit so the dictionary's must take
+ // precedence.
+ RouteValueDictionary attributes = htmlAttributes == null ? new RouteValueDictionary() : new RouteValueDictionary(htmlAttributes);
+ attributes.Remove("checked");
+ return htmlHelper.InputHelper(InputType.CheckBox, name, "true", false /* useViewData */, isChecked, true /* setId */, false /* isExplicitValue */, attributes);
+ }
+
+ public static string Hidden(this HtmlHelper htmlHelper, string name) {
+ return Hidden(htmlHelper, name, null /* value */);
+ }
+
+ public static string Hidden(this HtmlHelper htmlHelper, string name, object value) {
+ return Hidden(htmlHelper, name, value, (object)null /* hmtlAttributes */);
+ }
+
+ public static string Hidden(this HtmlHelper htmlHelper, string name, object value, object htmlAttributes) {
+ return Hidden(htmlHelper, name, value, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string Hidden(this HtmlHelper htmlHelper, string name, object value, IDictionary<string, object> htmlAttributes) {
+ return InputHelper(htmlHelper, InputType.Hidden, name, value, (value == null) /* useViewData */, false /* isChecked */, true /* setId */, true /* isExplicitValue */, htmlAttributes);
+ }
+
+ public static string Password(this HtmlHelper htmlHelper, string name) {
+ return Password(htmlHelper, name, null /* value */);
+ }
+
+ public static string Password(this HtmlHelper htmlHelper, string name, object value) {
+ return Password(htmlHelper, name, value, (object)null /* htmlAttributes */);
+ }
+
+ public static string Password(this HtmlHelper htmlHelper, string name, object value, object htmlAttributes) {
+ return Password(htmlHelper, name, value, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string Password(this HtmlHelper htmlHelper, string name, object value, IDictionary<string, object> htmlAttributes) {
+ return InputHelper(htmlHelper, InputType.Password, name, value, false /* useViewData */, false /* isChecked */, true /* setId */, true /* isExplicitValue */, htmlAttributes);
+ }
+
+ public static string RadioButton(this HtmlHelper htmlHelper, string name, object value) {
+ return RadioButton(htmlHelper, name, value, (object)null /* htmlAttributes */);
+ }
+
+ public static string RadioButton(this HtmlHelper htmlHelper, string name, object value, object htmlAttributes) {
+ return RadioButton(htmlHelper, name, value, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string RadioButton(this HtmlHelper htmlHelper, string name, object value, IDictionary<string, object> htmlAttributes) {
+ // Determine whether or not to render the checked attribute based on the contents of ViewData.
+ string valueString = Convert.ToString(value, CultureInfo.CurrentCulture);
+ bool isChecked = (!String.IsNullOrEmpty(name)) && (String.Equals(htmlHelper.EvalString(name), valueString, StringComparison.OrdinalIgnoreCase));
+ // checked attributes is implicit, so we need to ensure that the dictionary takes precedence.
+ RouteValueDictionary attributes = htmlAttributes == null ? new RouteValueDictionary() : new RouteValueDictionary(htmlAttributes);
+ if (attributes.ContainsKey("checked")) {
+ return htmlHelper.InputHelper(InputType.Radio, name, value, false, false, true, true /* isExplicitValue */, attributes);
+ }
+
+ return RadioButton(htmlHelper, name, value, isChecked, htmlAttributes);
+ }
+
+ public static string RadioButton(this HtmlHelper htmlHelper, string name, object value, bool isChecked) {
+ return RadioButton(htmlHelper, name, value, isChecked, (object)null /* htmlAttributes */);
+ }
+
+ public static string RadioButton(this HtmlHelper htmlHelper, string name, object value, bool isChecked, object htmlAttributes) {
+ return RadioButton(htmlHelper, name, value, isChecked, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string RadioButton(this HtmlHelper htmlHelper, string name, object value, bool isChecked, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(name)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "name");
+ }
+ if (value == null) {
+ throw new ArgumentNullException("value");
+ }
+ // checked attribute is an explicit parameter so it takes precedence.
+ RouteValueDictionary attributes = htmlAttributes == null ? new RouteValueDictionary() : new RouteValueDictionary(htmlAttributes);
+ attributes.Remove("checked");
+ return htmlHelper.InputHelper(InputType.Radio, name, value, false, isChecked, true, true /* isExplicitValue */, attributes);
+ }
+
+ public static string TextBox(this HtmlHelper htmlHelper, string name) {
+ return TextBox(htmlHelper, name, null /* value */);
+ }
+
+ public static string TextBox(this HtmlHelper htmlHelper, string name, object value) {
+ return TextBox(htmlHelper, name, value, (object)null /* htmlAttributes */);
+ }
+
+ public static string TextBox(this HtmlHelper htmlHelper, string name, object value, object htmlAttributes) {
+ return TextBox(htmlHelper, name, value, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string TextBox(this HtmlHelper htmlHelper, string name, object value, IDictionary<string, object> htmlAttributes) {
+ return InputHelper(htmlHelper, InputType.Text, name, value, (value == null) /* useViewData */, false /* isChecked */, true /* setId */, true /* isExplicitValue */, htmlAttributes);
+ }
+
+ private static string InputHelper(this HtmlHelper htmlHelper, InputType inputType, string name, object value, bool useViewData, bool isChecked, bool setId, bool isExplicitValue, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(name)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "name");
+ }
+
+ TagBuilder tagBuilder = new TagBuilder("input");
+ tagBuilder.MergeAttributes(htmlAttributes);
+ tagBuilder.MergeAttribute("type", HtmlHelper.GetInputTypeString(inputType));
+ tagBuilder.MergeAttribute("name", name, true);
+
+ string valueParameter = Convert.ToString(value, CultureInfo.CurrentCulture);
+ bool usedModelState = false;
+
+ switch (inputType) {
+ case InputType.CheckBox:
+ bool? modelStateWasChecked = htmlHelper.GetModelStateValue(name, typeof(bool)) as bool?;
+ if (modelStateWasChecked.HasValue) {
+ isChecked = modelStateWasChecked.Value;
+ usedModelState = true;
+ }
+ goto case InputType.Radio;
+ case InputType.Radio:
+ if (!usedModelState) {
+ string modelStateValue = htmlHelper.GetModelStateValue(name, typeof(string)) as string;
+ if (modelStateValue != null) {
+ isChecked = String.Equals(modelStateValue, valueParameter, StringComparison.Ordinal);
+ usedModelState = true;
+ }
+ }
+ if (!usedModelState && useViewData) {
+ isChecked = htmlHelper.EvalBoolean(name);
+ }
+ if (isChecked) {
+ tagBuilder.MergeAttribute("checked", "checked");
+ }
+ tagBuilder.MergeAttribute("value", valueParameter, isExplicitValue);
+ break;
+ case InputType.Password:
+ if (value != null) {
+ tagBuilder.MergeAttribute("value", valueParameter, isExplicitValue);
+ }
+ break;
+ default:
+ string attemptedValue = (string)htmlHelper.GetModelStateValue(name, typeof(string));
+ tagBuilder.MergeAttribute("value", attemptedValue ?? ((useViewData) ? htmlHelper.EvalString(name) : valueParameter), isExplicitValue);
+ break;
+ }
+
+ if (setId) {
+ tagBuilder.GenerateId(name);
+ }
+
+ // If there are any errors for a named field, we add the css attribute.
+ ModelState modelState;
+ if (htmlHelper.ViewData.ModelState.TryGetValue(name, out modelState)) {
+ if (modelState.Errors.Count > 0) {
+ tagBuilder.AddCssClass(HtmlHelper.ValidationInputCssClassName);
+ }
+ }
+
+ if (inputType == InputType.CheckBox) {
+ // Render an additional <input type="hidden".../> for checkboxes. This
+ // addresses scenarios where unchecked checkboxes are not sent in the request.
+ // Sending a hidden input makes it possible to know that the checkbox was present
+ // on the page when the request was submitted.
+ StringBuilder inputItemBuilder = new StringBuilder();
+ inputItemBuilder.Append(tagBuilder.ToString(TagRenderMode.SelfClosing));
+
+ TagBuilder hiddenInput = new TagBuilder("input");
+ hiddenInput.MergeAttribute("type", HtmlHelper.GetInputTypeString(InputType.Hidden));
+ hiddenInput.MergeAttribute("name", name);
+ hiddenInput.MergeAttribute("value", "false");
+ inputItemBuilder.Append(hiddenInput.ToString(TagRenderMode.SelfClosing));
+ return inputItemBuilder.ToString();
+ }
+
+ return tagBuilder.ToString(TagRenderMode.SelfClosing);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/LinkExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/LinkExtensions.cs
new file mode 100644
index 0000000..c2203cc
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/LinkExtensions.cs
@@ -0,0 +1,112 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Html {
+ using System;
+ using System.Collections.Generic;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ public static class LinkExtensions {
+ public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName) {
+ return ActionLink(htmlHelper, linkText, actionName, null /* controllerName */, new RouteValueDictionary(), new RouteValueDictionary());
+ }
+
+ public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName, object routeValues) {
+ return ActionLink(htmlHelper, linkText, actionName, null /* controllerName */, new RouteValueDictionary(routeValues), new RouteValueDictionary());
+ }
+
+ public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName, object routeValues, object htmlAttributes) {
+ return ActionLink(htmlHelper, linkText, actionName, null /* controllerName */, new RouteValueDictionary(routeValues), new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName, RouteValueDictionary routeValues) {
+ return ActionLink(htmlHelper, linkText, actionName, null /* controllerName */, routeValues, new RouteValueDictionary());
+ }
+
+ public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes) {
+ return ActionLink(htmlHelper, linkText, actionName, null /* controllerName */, routeValues, htmlAttributes);
+ }
+
+ public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName, string controllerName) {
+ return ActionLink(htmlHelper, linkText, actionName, controllerName, new RouteValueDictionary(), new RouteValueDictionary());
+ }
+
+ public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName, string controllerName, object routeValues, object htmlAttributes) {
+ return ActionLink(htmlHelper, linkText, actionName, controllerName, new RouteValueDictionary(routeValues), new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName, string controllerName, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(linkText)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "linkText");
+ }
+ return HtmlHelper.GenerateLink(htmlHelper.ViewContext.RequestContext, htmlHelper.RouteCollection, linkText, null/* routeName */, actionName, controllerName, routeValues, htmlAttributes);
+ }
+
+ public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName, string controllerName, string protocol, string hostName, string fragment, object routeValues, object htmlAttributes) {
+ return ActionLink(htmlHelper, linkText, actionName, controllerName, protocol, hostName, fragment, new RouteValueDictionary(routeValues), new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string ActionLink(this HtmlHelper htmlHelper, string linkText, string actionName, string controllerName, string protocol, string hostName, string fragment, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(linkText)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "linkText");
+ }
+ return HtmlHelper.GenerateLink(htmlHelper.ViewContext.RequestContext, htmlHelper.RouteCollection, linkText, null /* routeName */, actionName, controllerName, protocol, hostName, fragment, routeValues, htmlAttributes);
+ }
+
+ public static string RouteLink(this HtmlHelper htmlHelper, string linkText, object routeValues) {
+ return RouteLink(htmlHelper, linkText, new RouteValueDictionary(routeValues));
+ }
+
+ public static string RouteLink(this HtmlHelper htmlHelper, string linkText, RouteValueDictionary routeValues) {
+ return RouteLink(htmlHelper, linkText, routeValues, new RouteValueDictionary());
+ }
+
+ public static string RouteLink(this HtmlHelper htmlHelper, string linkText, string routeName, object routeValues) {
+ return RouteLink(htmlHelper, linkText, routeName, new RouteValueDictionary(routeValues));
+ }
+
+ public static string RouteLink(this HtmlHelper htmlHelper, string linkText, string routeName, RouteValueDictionary routeValues) {
+ return RouteLink(htmlHelper, linkText, routeName, routeValues, new RouteValueDictionary());
+ }
+
+ public static string RouteLink(this HtmlHelper htmlHelper, string linkText, object routeValues, object htmlAttributes) {
+ return RouteLink(htmlHelper, linkText, new RouteValueDictionary(routeValues), new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string RouteLink(this HtmlHelper htmlHelper, string linkText, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes) {
+ return RouteLink(htmlHelper, linkText, null /* routeName */, routeValues, htmlAttributes);
+ }
+
+ public static string RouteLink(this HtmlHelper htmlHelper, string linkText, string routeName, object routeValues, object htmlAttributes) {
+ return RouteLink(htmlHelper, linkText, routeName, new RouteValueDictionary(routeValues), new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string RouteLink(this HtmlHelper htmlHelper, string linkText, string routeName, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(linkText)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "linkText");
+ }
+ return HtmlHelper.GenerateRouteLink(htmlHelper.ViewContext.RequestContext, htmlHelper.RouteCollection, linkText, routeName, routeValues, htmlAttributes);
+ }
+
+ public static string RouteLink(this HtmlHelper htmlHelper, string linkText, string routeName, string protocol, string hostName, string fragment, object routeValues, object htmlAttributes) {
+ return RouteLink(htmlHelper, linkText, routeName, protocol, hostName, fragment, new RouteValueDictionary(routeValues), new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string RouteLink(this HtmlHelper htmlHelper, string linkText, string routeName, string protocol, string hostName, string fragment, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(linkText)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "linkText");
+ }
+ return HtmlHelper.GenerateRouteLink(htmlHelper.ViewContext.RequestContext, htmlHelper.RouteCollection, linkText, routeName, protocol, hostName, fragment, routeValues, htmlAttributes);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/MvcForm.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/MvcForm.cs
new file mode 100644
index 0000000..061b4fe
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/MvcForm.cs
@@ -0,0 +1,45 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Html {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+
+ public class MvcForm : IDisposable {
+ private bool _disposed;
+ private readonly HttpResponseBase _httpResponse;
+
+ public MvcForm(HttpResponseBase httpResponse) {
+ if (httpResponse == null) {
+ throw new ArgumentNullException("httpResponse");
+ }
+ _httpResponse = httpResponse;
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Dispose() {
+ Dispose(true /* disposing */);
+ GC.SuppressFinalize(this);
+ }
+
+ protected virtual void Dispose(bool disposing) {
+ if (!_disposed) {
+ _disposed = true;
+ _httpResponse.Write("</form>");
+ }
+ }
+
+ public void EndForm() {
+ Dispose(true);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/RenderPartialExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/RenderPartialExtensions.cs
new file mode 100644
index 0000000..ceea7a0
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/RenderPartialExtensions.cs
@@ -0,0 +1,36 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Html {
+
+ public static class RenderPartialExtensions {
+ // Renders the partial view with the parent's view data
+ public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName) {
+ htmlHelper.RenderPartialInternal(partialViewName, htmlHelper.ViewData, null, ViewEngines.Engines);
+ }
+
+ // Renders the partial view with the given view data
+ public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, ViewDataDictionary viewData) {
+ htmlHelper.RenderPartialInternal(partialViewName, viewData, null, ViewEngines.Engines);
+ }
+
+ // Renders the partial view with an empty view data and the given model
+ public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, object model) {
+ htmlHelper.RenderPartialInternal(partialViewName, htmlHelper.ViewData, model, ViewEngines.Engines);
+ }
+
+ // Renders the partial view with a copy of the given view data plus the given model
+ public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, object model, ViewDataDictionary viewData) {
+ htmlHelper.RenderPartialInternal(partialViewName, viewData, model, ViewEngines.Engines);
+ }
+ }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/SelectExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/SelectExtensions.cs
new file mode 100644
index 0000000..9ca4768
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/SelectExtensions.cs
@@ -0,0 +1,185 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Html {
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Linq;
+ using System.Text;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ public static class SelectExtensions {
+ public static string DropDownList(this HtmlHelper htmlHelper, string name, string optionLabel) {
+ return SelectInternal(htmlHelper, optionLabel, name, null/* selectList */, false /* allowMultiple */, (IDictionary<string, object>)null /* htmlAttributes */);
+ }
+
+ public static string DropDownList(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem> selectList, string optionLabel) {
+ return DropDownList(htmlHelper, name, selectList, optionLabel, (IDictionary<string, object>)null);
+ }
+
+ public static string DropDownList(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem> selectList, string optionLabel, object htmlAttributes) {
+ return DropDownList(htmlHelper, name, selectList, optionLabel, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string DropDownList(this HtmlHelper htmlHelper, string name) {
+ return SelectInternal(htmlHelper, null /* optionLabel */, name, null /* selectList */, false /* allowMultiple */, (IDictionary<string, object>)null /* htmlAttributes */);
+ }
+
+ public static string DropDownList(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem> selectList) {
+ return DropDownList(htmlHelper, name, selectList, (object)null /* htmlAttributes */);
+ }
+
+ public static string DropDownList(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem> selectList, object htmlAttributes) {
+ return DropDownList(htmlHelper, name, selectList, new RouteValueDictionary(htmlAttributes));
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters",
+ Justification = "This type is appropriate for indicating a single selection.")]
+ public static string DropDownList(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem> selectList, IDictionary<string, object> htmlAttributes) {
+ return SelectInternal(htmlHelper, null /* optionLabel */, name, selectList, false /* allowMultiple */, htmlAttributes);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters",
+ Justification = "This type is appropriate for indicating a single selection.")]
+ public static string DropDownList(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem> selectList, string optionLabel, IDictionary<string, object> htmlAttributes) {
+ return SelectInternal(htmlHelper, optionLabel, name, selectList, false /* allowMultiple */, htmlAttributes);
+ }
+
+ public static string ListBox(this HtmlHelper htmlHelper, string name) {
+ return SelectInternal(htmlHelper, null/* optionLabel */, name, null/* selectList */, true/* allowMultiple */, (IDictionary<string, object>)null /* htmlAttributes */);
+ }
+
+ public static string ListBox(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem> selectList) {
+ return ListBox(htmlHelper, name, selectList, (IDictionary<string, object>)null);
+ }
+
+ public static string ListBox(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem> selectList, object htmlAttributes) {
+ return ListBox(htmlHelper, name, selectList, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string ListBox(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem> selectList, IDictionary<string, object> htmlAttributes) {
+ return SelectInternal(htmlHelper, null /* optionLabel */, name, selectList, true /* allowMultiple */, htmlAttributes);
+ }
+
+ private static IEnumerable<SelectListItem> GetSelectData(this HtmlHelper htmlHelper, string name) {
+ object o = null;
+ if (htmlHelper.ViewData != null) {
+ o = htmlHelper.ViewData.Eval(name);
+ }
+ if (o == null) {
+ throw new InvalidOperationException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.HtmlHelper_MissingSelectData,
+ name,
+ "IEnumerable<SelectListItem>"));
+ }
+ IEnumerable<SelectListItem> selectList = o as IEnumerable<SelectListItem>;
+ if (selectList == null) {
+ throw new InvalidOperationException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.HtmlHelper_WrongSelectDataType,
+ name,
+ o.GetType().FullName,
+ "IEnumerable<SelectListItem>"));
+ }
+ return selectList;
+ }
+
+ private static string ListItemToOption(SelectListItem item) {
+ TagBuilder builder = new TagBuilder("option") {
+ InnerHtml = HttpUtility.HtmlEncode(item.Text)
+ };
+ if (item.Value != null) {
+ builder.Attributes["value"] = item.Value;
+ }
+ if (item.Selected) {
+ builder.Attributes["selected"] = "selected";
+ }
+ return builder.ToString(TagRenderMode.Normal);
+ }
+
+ private static string SelectInternal(this HtmlHelper htmlHelper, string optionLabel, string name, IEnumerable<SelectListItem> selectList, bool allowMultiple, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(name)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "name");
+ }
+
+ bool usedViewData = false;
+
+ // If we got a null selectList, try to use ViewData to get the list of items.
+ if (selectList == null) {
+ selectList = htmlHelper.GetSelectData(name);
+ usedViewData = true;
+ }
+
+ object defaultValue = (allowMultiple) ? htmlHelper.GetModelStateValue(name, typeof(string[])) : htmlHelper.GetModelStateValue(name, typeof(string));
+
+ // If we haven't already used ViewData to get the entire list of items then we need to
+ // use the ViewData-supplied value before using the parameter-supplied value.
+ if (!usedViewData) {
+ if (defaultValue == null) {
+ defaultValue = htmlHelper.ViewData.Eval(name);
+ }
+ }
+
+ if (defaultValue != null) {
+ IEnumerable defaultValues = (allowMultiple) ? defaultValue as IEnumerable : new[] { defaultValue };
+ IEnumerable<string> values = from object value in defaultValues select Convert.ToString(value, CultureInfo.CurrentCulture);
+ HashSet<string> selectedValues = new HashSet<string>(values, StringComparer.OrdinalIgnoreCase);
+ List<SelectListItem> newSelectList = new List<SelectListItem>();
+
+ foreach (SelectListItem item in selectList) {
+ item.Selected = (item.Value != null) ? selectedValues.Contains(item.Value) : selectedValues.Contains(item.Text);
+ newSelectList.Add(item);
+ }
+ selectList = newSelectList;
+ }
+
+ // Convert each ListItem to an <option> tag
+ StringBuilder listItemBuilder = new StringBuilder();
+
+ // Make optionLabel the first item that gets rendered.
+ if (optionLabel != null) {
+ listItemBuilder.AppendLine(ListItemToOption(new SelectListItem() { Text = optionLabel, Value = String.Empty, Selected = false }));
+ }
+
+ foreach (SelectListItem item in selectList) {
+ listItemBuilder.AppendLine(ListItemToOption(item));
+ }
+
+ TagBuilder tagBuilder = new TagBuilder("select") {
+ InnerHtml = listItemBuilder.ToString()
+ };
+ tagBuilder.MergeAttributes(htmlAttributes);
+ tagBuilder.MergeAttribute("name", name);
+ tagBuilder.GenerateId(name);
+ if (allowMultiple) {
+ tagBuilder.MergeAttribute("multiple", "multiple");
+ }
+
+ // If there are any errors for a named field, we add the css attribute.
+ ModelState modelState;
+ if (htmlHelper.ViewData.ModelState.TryGetValue(name, out modelState)) {
+ if (modelState.Errors.Count > 0) {
+ tagBuilder.AddCssClass(HtmlHelper.ValidationInputCssClassName);
+ }
+ }
+
+ return tagBuilder.ToString(TagRenderMode.Normal);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/TextAreaExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/TextAreaExtensions.cs
new file mode 100644
index 0000000..dc1a84b
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/TextAreaExtensions.cs
@@ -0,0 +1,108 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Html {
+ using System;
+ using System.Collections.Generic;
+ using System.Globalization;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ public static class TextAreaExtensions {
+ // These values are similar to the defaults used by WebForms
+ // when using <asp:TextBox TextMode="MultiLine"> without specifying
+ // the Rows and Columns attributes.
+ private const int TextAreaRows = 2;
+ private const int TextAreaColumns = 20;
+
+ public static string TextArea(this HtmlHelper htmlHelper, string name) {
+ return TextArea(htmlHelper, name, (object)null /* htmlAttributes */);
+ }
+
+ public static string TextArea(this HtmlHelper htmlHelper, string name, object htmlAttributes) {
+ return TextArea(htmlHelper, name, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string TextArea(this HtmlHelper htmlHelper, string name, IDictionary<string, object> htmlAttributes) {
+ // Add implicit parameters
+ Dictionary<string, object> implicitAttributes = new Dictionary<string, object>();
+ implicitAttributes.Add("rows", TextAreaRows.ToString(CultureInfo.InvariantCulture));
+ implicitAttributes.Add("cols", TextAreaColumns.ToString(CultureInfo.InvariantCulture));
+ return TextAreaHelper(htmlHelper, name, true /* useViewData */, null /* value */, implicitAttributes, null /* explicitParameters */, htmlAttributes);
+ }
+
+ public static string TextArea(this HtmlHelper htmlHelper, string name, string value) {
+ return TextArea(htmlHelper, name, value, (object) null /* htmlAttributes */);
+ }
+
+ public static string TextArea(this HtmlHelper htmlHelper, string name, string value, object htmlAttributes) {
+ return TextArea(htmlHelper, name, value, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string TextArea(this HtmlHelper htmlHelper, string name, string value, IDictionary<string, object> htmlAttributes) {
+ // Add implicit parameters
+ Dictionary<string, object> implicitAttributes = new Dictionary<string, object>();
+ implicitAttributes.Add("rows", TextAreaRows.ToString(CultureInfo.InvariantCulture));
+ implicitAttributes.Add("cols", TextAreaColumns.ToString(CultureInfo.InvariantCulture));
+ return TextAreaHelper(htmlHelper, name, (value == null) /* useViewData */, value, implicitAttributes, null /* explicitParameters */, htmlAttributes);
+ }
+
+ public static string TextArea(this HtmlHelper htmlHelper, string name, string value, int rows, int columns, object htmlAttributes) {
+ return TextArea(htmlHelper, name, value, rows, columns, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string TextArea(this HtmlHelper htmlHelper, string name, string value, int rows, int columns, IDictionary<string, object> htmlAttributes) {
+ if (rows <= 0) {
+ throw new ArgumentOutOfRangeException("rows", MvcResources.HtmlHelper_TextAreaParameterOutOfRange);
+ }
+ if (columns <= 0) {
+ throw new ArgumentOutOfRangeException("columns", MvcResources.HtmlHelper_TextAreaParameterOutOfRange);
+ }
+
+ Dictionary<string, object> explicitParameters = new Dictionary<string, object>();
+ explicitParameters.Add("rows", rows.ToString(CultureInfo.InvariantCulture));
+ explicitParameters.Add("cols", columns.ToString(CultureInfo.InvariantCulture));
+ return TextAreaHelper(htmlHelper, name, (value == null) /* useViewData */, value, null /* implictAttributes */, explicitParameters, htmlAttributes);
+ }
+
+ private static string TextAreaHelper(this HtmlHelper htmlHelper, string name, bool useViewData, string value, IDictionary<string, object> implicitAttributes, IDictionary<string, object> explicitParameters, IDictionary<string, object> htmlAttributes) {
+ if (String.IsNullOrEmpty(name)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "name");
+ }
+
+ TagBuilder tagBuilder = new TagBuilder("textarea");
+ // Add implicit attributes.
+ tagBuilder.MergeAttributes(implicitAttributes);
+ tagBuilder.GenerateId(name);
+ // Merge htmlAttributes.
+ tagBuilder.MergeAttributes(htmlAttributes, true);
+ // Override all the attributes with explicit parameters.
+ tagBuilder.MergeAttributes(explicitParameters, true);
+ tagBuilder.MergeAttribute("name", name, true);
+
+ // If there are any errors for a named field, we add the css attribute.
+ ModelState modelState;
+ if (htmlHelper.ViewData.ModelState.TryGetValue(name, out modelState)) {
+ if (modelState.Errors.Count > 0) {
+ tagBuilder.AddCssClass(HtmlHelper.ValidationInputCssClassName);
+ }
+ }
+
+ // The first newline is always trimmed when a TextArea is rendered, so we add an extra one
+ // in case the value being rendered is something like "\r\nHello".
+ // The attempted value receives precedence over the explicitly supplied value parameter.
+ string attemptedValue = (string)htmlHelper.GetModelStateValue(name, typeof(string));
+ tagBuilder.SetInnerText(Environment.NewLine + (attemptedValue ?? ((useViewData) ? htmlHelper.EvalString(name) : value)));
+ return tagBuilder.ToString(TagRenderMode.Normal);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/ValidationExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/ValidationExtensions.cs
new file mode 100644
index 0000000..c5ebcd7
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Html/ValidationExtensions.cs
@@ -0,0 +1,162 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc.Html {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Text;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ public static class ValidationExtensions {
+
+ private static string _resourceClassKey;
+
+ public static string ResourceClassKey {
+ get {
+ return _resourceClassKey ?? String.Empty;
+ }
+ set {
+ _resourceClassKey = value;
+ }
+ }
+
+ private static string GetInvalidPropertyValueResource(HttpContextBase httpContext) {
+ string resourceValue = null;
+ if (!String.IsNullOrEmpty(ResourceClassKey) && (httpContext != null)) {
+ // If the user specified a ResourceClassKey try to load the resource they specified.
+ // If the class key is invalid, an exception will be thrown.
+ // If the class key is valid but the resource is not found, it returns null, in which
+ // case it will fall back to the MVC default error message.
+ resourceValue = httpContext.GetGlobalResourceObject(ResourceClassKey, "InvalidPropertyValue", CultureInfo.CurrentUICulture) as string;
+ }
+ return resourceValue ?? MvcResources.Common_ValueNotValidForProperty;
+ }
+
+ private static string GetUserErrorMessageOrDefault(HttpContextBase httpContext, ModelError error, ModelState modelState) {
+ if (!String.IsNullOrEmpty(error.ErrorMessage)) {
+ return error.ErrorMessage;
+ }
+ if (modelState == null) {
+ return null;
+ }
+
+ string attemptedValue = (modelState.Value != null) ? modelState.Value.AttemptedValue : null;
+ return String.Format(CultureInfo.CurrentCulture, GetInvalidPropertyValueResource(httpContext), attemptedValue);
+ }
+
+ public static string ValidationMessage(this HtmlHelper htmlHelper, string modelName) {
+ return ValidationMessage(htmlHelper, modelName, (object)null /* htmlAttributes */);
+ }
+
+ public static string ValidationMessage(this HtmlHelper htmlHelper, string modelName, object htmlAttributes) {
+ return ValidationMessage(htmlHelper, modelName, new RouteValueDictionary(htmlAttributes));
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames",
+ Justification = "'validationMessage' refers to the message that will be rendered by the ValidationMessage helper.")]
+ public static string ValidationMessage(this HtmlHelper htmlHelper, string modelName, string validationMessage) {
+ return ValidationMessage(htmlHelper, modelName, validationMessage, (object)null /* htmlAttributes */);
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames",
+ Justification = "'validationMessage' refers to the message that will be rendered by the ValidationMessage helper.")]
+ public static string ValidationMessage(this HtmlHelper htmlHelper, string modelName, string validationMessage, object htmlAttributes) {
+ return ValidationMessage(htmlHelper, modelName, validationMessage, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string ValidationMessage(this HtmlHelper htmlHelper, string modelName, IDictionary<string, object> htmlAttributes) {
+ return ValidationMessage(htmlHelper, modelName, null /* validationMessage */, htmlAttributes);
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames",
+ Justification = "'validationMessage' refers to the message that will be rendered by the ValidationMessage helper.")]
+ public static string ValidationMessage(this HtmlHelper htmlHelper, string modelName, string validationMessage, IDictionary<string, object> htmlAttributes) {
+ if (modelName == null) {
+ throw new ArgumentNullException("modelName");
+ }
+
+ if (!htmlHelper.ViewData.ModelState.ContainsKey(modelName)) {
+ return null;
+ }
+
+ ModelState modelState = htmlHelper.ViewData.ModelState[modelName];
+ ModelErrorCollection modelErrors = (modelState == null) ? null : modelState.Errors;
+ ModelError modelError = ((modelErrors == null) || (modelErrors.Count == 0)) ? null : modelErrors[0];
+
+ if (modelError == null) {
+ return null;
+ }
+
+ TagBuilder builder = new TagBuilder("span");
+ builder.MergeAttributes(htmlAttributes);
+ builder.MergeAttribute("class", HtmlHelper.ValidationMessageCssClassName);
+ builder.SetInnerText(String.IsNullOrEmpty(validationMessage) ? GetUserErrorMessageOrDefault(htmlHelper.ViewContext.HttpContext, modelError, modelState) : validationMessage);
+
+ return builder.ToString(TagRenderMode.Normal);
+ }
+
+ public static string ValidationSummary(this HtmlHelper htmlHelper) {
+ return ValidationSummary(htmlHelper, null /* message */);
+ }
+
+ public static string ValidationSummary(this HtmlHelper htmlHelper, string message) {
+ return ValidationSummary(htmlHelper, message, (object)null /* htmlAttributes */);
+ }
+
+ public static string ValidationSummary(this HtmlHelper htmlHelper, string message, object htmlAttributes) {
+ return ValidationSummary(htmlHelper, message, new RouteValueDictionary(htmlAttributes));
+ }
+
+ public static string ValidationSummary(this HtmlHelper htmlHelper, string message, IDictionary<string, object> htmlAttributes) {
+ // Nothing to do if there aren't any errors
+ if (htmlHelper.ViewData.ModelState.IsValid) {
+ return null;
+ }
+
+ string messageSpan;
+ if (!String.IsNullOrEmpty(message)) {
+ TagBuilder spanTag = new TagBuilder("span");
+ spanTag.MergeAttributes(htmlAttributes);
+ spanTag.MergeAttribute("class", HtmlHelper.ValidationSummaryCssClassName);
+ spanTag.SetInnerText(message);
+ messageSpan = spanTag.ToString(TagRenderMode.Normal) + Environment.NewLine;
+ }
+ else {
+ messageSpan = null;
+ }
+
+ StringBuilder htmlSummary = new StringBuilder();
+ TagBuilder unorderedList = new TagBuilder("ul");
+ unorderedList.MergeAttributes(htmlAttributes);
+ unorderedList.MergeAttribute("class", HtmlHelper.ValidationSummaryCssClassName);
+
+ foreach (ModelState modelState in htmlHelper.ViewData.ModelState.Values) {
+ foreach (ModelError modelError in modelState.Errors) {
+ string errorText = GetUserErrorMessageOrDefault(htmlHelper.ViewContext.HttpContext, modelError, null /* modelState */);
+ if (!String.IsNullOrEmpty(errorText)) {
+ TagBuilder listItem = new TagBuilder("li");
+ listItem.SetInnerText(errorText);
+ htmlSummary.AppendLine(listItem.ToString(TagRenderMode.Normal));
+ }
+ }
+ }
+
+ unorderedList.InnerHtml = htmlSummary.ToString();
+
+ return messageSpan + unorderedList.ToString(TagRenderMode.Normal);
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/HtmlHelper.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/HtmlHelper.cs
new file mode 100644
index 0000000..4ba6dc7
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/HtmlHelper.cs
@@ -0,0 +1,280 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Text;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ [SuppressMessage("Microsoft.Security", "CA2112:SecuredTypesShouldNotExposeFields",
+ Justification = "Public fields for CSS names do not contain secure information.")]
+ public class HtmlHelper {
+
+ private static string _idAttributeDotReplacement;
+
+ public static readonly string ValidationInputCssClassName = "input-validation-error";
+ public static readonly string ValidationMessageCssClassName = "field-validation-error";
+ public static readonly string ValidationSummaryCssClassName = "validation-summary-errors";
+
+ private AntiForgeryDataSerializer _serializer;
+
+ public HtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
+ : this(viewContext, viewDataContainer, RouteTable.Routes) {
+ }
+
+ public HtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection) {
+ if (viewContext == null) {
+ throw new ArgumentNullException("viewContext");
+ }
+ if (viewDataContainer == null) {
+ throw new ArgumentNullException("viewDataContainer");
+ }
+ if (routeCollection == null) {
+ throw new ArgumentNullException("routeCollection");
+ }
+ ViewContext = viewContext;
+ ViewDataContainer = viewDataContainer;
+ RouteCollection = routeCollection;
+ }
+
+ public static string IdAttributeDotReplacement {
+ get {
+ if (String.IsNullOrEmpty(_idAttributeDotReplacement)) {
+ _idAttributeDotReplacement = "_";
+ }
+ return _idAttributeDotReplacement;
+ }
+ set {
+ _idAttributeDotReplacement = value;
+ }
+ }
+
+ public RouteCollection RouteCollection {
+ get;
+ private set;
+ }
+
+ internal AntiForgeryDataSerializer Serializer {
+ get {
+ if (_serializer == null) {
+ _serializer = new AntiForgeryDataSerializer();
+ }
+ return _serializer;
+ }
+ set {
+ _serializer = value;
+ }
+ }
+
+ public ViewContext ViewContext {
+ get;
+ private set;
+ }
+
+ public ViewDataDictionary ViewData {
+ get {
+ return ViewDataContainer.ViewData;
+ }
+ }
+
+ public IViewDataContainer ViewDataContainer {
+ get;
+ private set;
+ }
+
+ public string AntiForgeryToken() {
+ return AntiForgeryToken(null /* salt */);
+ }
+
+ public string AntiForgeryToken(string salt) {
+ return AntiForgeryToken(salt, null /* domain */, null /* path */);
+ }
+
+ public string AntiForgeryToken(string salt, string domain, string path) {
+ string formValue = GetAntiForgeryTokenAndSetCookie(salt, domain, path);
+ string fieldName = AntiForgeryData.GetAntiForgeryTokenName(null);
+
+ TagBuilder builder = new TagBuilder("input");
+ builder.Attributes["type"] = "hidden";
+ builder.Attributes["name"] = fieldName;
+ builder.Attributes["value"] = formValue;
+ return builder.ToString(TagRenderMode.SelfClosing);
+ }
+
+ [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic",
+ Justification = "For consistency, all helpers are instance methods.")]
+ public string AttributeEncode(string value) {
+ return (!String.IsNullOrEmpty(value)) ? HttpUtility.HtmlAttributeEncode(value) : String.Empty;
+ }
+
+ public string AttributeEncode(object value) {
+ return AttributeEncode(Convert.ToString(value, CultureInfo.InvariantCulture));
+ }
+
+ [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic",
+ Justification = "For consistency, all helpers are instance methods.")]
+ public string Encode(string value) {
+ return (!String.IsNullOrEmpty(value)) ? HttpUtility.HtmlEncode(value) : String.Empty;
+ }
+
+ public string Encode(object value) {
+ return Encode(Convert.ToString(value, CultureInfo.CurrentCulture));
+ }
+
+ internal string EvalString(string key) {
+ return Convert.ToString(ViewData.Eval(key), CultureInfo.CurrentCulture);
+ }
+
+ internal bool EvalBoolean(string key) {
+ return Convert.ToBoolean(ViewData.Eval(key), CultureInfo.InvariantCulture);
+ }
+
+ internal static IView FindPartialView(ViewContext viewContext, string partialViewName, ViewEngineCollection viewEngineCollection) {
+ ViewEngineResult result = viewEngineCollection.FindPartialView(viewContext, partialViewName);
+ if (result.View != null) {
+ return result.View;
+ }
+
+ StringBuilder locationsText = new StringBuilder();
+ foreach (string location in result.SearchedLocations) {
+ locationsText.AppendLine();
+ locationsText.Append(location);
+ }
+
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture,
+ MvcResources.Common_PartialViewNotFound, partialViewName, locationsText));
+ }
+
+ public static string GenerateLink(RequestContext requestContext, RouteCollection routeCollection, string linkText, string routeName, string actionName, string controllerName, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes) {
+ return GenerateLink(requestContext, routeCollection, linkText, routeName, actionName, controllerName, null/* protocol */, null/* hostName */, null/* fragment */, routeValues, htmlAttributes);
+ }
+
+ public static string GenerateLink(RequestContext requestContext, RouteCollection routeCollection, string linkText, string routeName, string actionName, string controllerName, string protocol, string hostName, string fragment, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes) {
+ return GenerateLinkInternal(requestContext, routeCollection, linkText, routeName, actionName, controllerName, protocol, hostName, fragment, routeValues, htmlAttributes, true /* includeImplicitMvcValues */);
+ }
+
+ private static string GenerateLinkInternal(RequestContext requestContext, RouteCollection routeCollection, string linkText, string routeName, string actionName, string controllerName, string protocol, string hostName, string fragment, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes, bool includeImplicitMvcValues) {
+ string url = UrlHelper.GenerateUrl(routeName, actionName, controllerName, protocol, hostName, fragment, routeValues, routeCollection, requestContext, includeImplicitMvcValues);
+ TagBuilder tagBuilder = new TagBuilder("a") {
+ InnerHtml = (!String.IsNullOrEmpty(linkText)) ? HttpUtility.HtmlEncode(linkText) : String.Empty
+ };
+ tagBuilder.MergeAttributes(htmlAttributes);
+ tagBuilder.MergeAttribute("href", url);
+ return tagBuilder.ToString(TagRenderMode.Normal);
+ }
+
+ public static string GenerateRouteLink(RequestContext requestContext, RouteCollection routeCollection, string linkText, string routeName, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes) {
+ return GenerateRouteLink(requestContext, routeCollection, linkText, routeName, null/* protocol */, null/* hostName */, null/* fragment */, routeValues, htmlAttributes);
+ }
+
+ public static string GenerateRouteLink(RequestContext requestContext, RouteCollection routeCollection, string linkText, string routeName, string protocol, string hostName, string fragment, RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes) {
+ return GenerateLinkInternal(requestContext, routeCollection, linkText, routeName, null /* actionName */, null /* controllerName */, protocol, hostName, fragment, routeValues, htmlAttributes, false /* includeImplicitMvcValues */);
+ }
+
+ private string GetAntiForgeryTokenAndSetCookie(string salt, string domain, string path) {
+ string cookieName = AntiForgeryData.GetAntiForgeryTokenName(ViewContext.HttpContext.Request.ApplicationPath);
+
+ AntiForgeryData cookieToken;
+ HttpCookie cookie = ViewContext.HttpContext.Request.Cookies[cookieName];
+ if (cookie != null) {
+ cookieToken = Serializer.Deserialize(cookie.Value);
+ }
+ else {
+ cookieToken = AntiForgeryData.NewToken();
+ string cookieValue = Serializer.Serialize(cookieToken);
+
+ HttpCookie newCookie = new HttpCookie(cookieName, cookieValue) { HttpOnly = true, Domain = domain };
+ if (!String.IsNullOrEmpty(path)) {
+ newCookie.Path = path;
+ }
+ ViewContext.HttpContext.Response.Cookies.Set(newCookie);
+ }
+
+ AntiForgeryData formToken = new AntiForgeryData(cookieToken) {
+ CreationDate = DateTime.Now,
+ Salt = salt
+ };
+ string formValue = Serializer.Serialize(formToken);
+ return formValue;
+ }
+
+ public static string GetFormMethodString(FormMethod method) {
+ switch (method) {
+ case FormMethod.Get:
+ return "get";
+ case FormMethod.Post:
+ return "post";
+ default:
+ return "post";
+ }
+ }
+
+ public static string GetInputTypeString(InputType inputType) {
+ switch (inputType) {
+ case InputType.CheckBox:
+ return "checkbox";
+ case InputType.Hidden:
+ return "hidden";
+ case InputType.Password:
+ return "password";
+ case InputType.Radio:
+ return "radio";
+ case InputType.Text:
+ return "text";
+ default:
+ return "text";
+ }
+ }
+
+ internal object GetModelStateValue(string key, Type destinationType) {
+ ModelState modelState;
+ if (ViewData.ModelState.TryGetValue(key, out modelState)) {
+ return modelState.Value.ConvertTo(destinationType, null /* culture */);
+ }
+ return null;
+ }
+
+ internal virtual void RenderPartialInternal(string partialViewName, ViewDataDictionary viewData, object model, ViewEngineCollection viewEngineCollection) {
+ if (String.IsNullOrEmpty(partialViewName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "partialViewName");
+ }
+
+ ViewDataDictionary newViewData = null;
+
+ if (model == null) {
+ if (viewData == null) {
+ newViewData = new ViewDataDictionary(ViewData);
+ }
+ else {
+ newViewData = new ViewDataDictionary(viewData);
+ }
+ }
+ else {
+ if (viewData == null) {
+ newViewData = new ViewDataDictionary(model);
+ }
+ else {
+ newViewData = new ViewDataDictionary(viewData) { Model = model };
+ }
+ }
+
+ ViewContext newViewContext = new ViewContext(ViewContext, ViewContext.View, newViewData, ViewContext.TempData);
+ IView view = FindPartialView(newViewContext, partialViewName, viewEngineCollection);
+ view.Render(newViewContext, ViewContext.HttpContext.Response.Output);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/HtmlHelper`1.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/HtmlHelper`1.cs
new file mode 100644
index 0000000..0ff38a5
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/HtmlHelper`1.cs
@@ -0,0 +1,35 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Web.Routing;
+
+ public class HtmlHelper<TModel> : HtmlHelper where TModel : class {
+ private ViewDataDictionary<TModel> _viewData;
+
+ public HtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
+ : this(viewContext, viewDataContainer, RouteTable.Routes) {
+ }
+
+ public HtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
+ : base(viewContext, viewDataContainer, routeCollection) {
+
+ _viewData = new ViewDataDictionary<TModel>(viewDataContainer.ViewData);
+ }
+
+ public new ViewDataDictionary<TModel> ViewData {
+ get {
+ return _viewData;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpAntiForgeryException.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpAntiForgeryException.cs
new file mode 100644
index 0000000..695e923
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpAntiForgeryException.cs
@@ -0,0 +1,37 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Runtime.Serialization;
+ using System.Web;
+
+ [Serializable]
+ public sealed class HttpAntiForgeryException : HttpException {
+
+ public HttpAntiForgeryException() {
+ }
+
+ private HttpAntiForgeryException(SerializationInfo info, StreamingContext context)
+ : base(info, context) {
+ }
+
+ public HttpAntiForgeryException(string message)
+ : base(message) {
+ }
+
+ public HttpAntiForgeryException(string message, Exception innerException)
+ : base(message, innerException) {
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpPostedFileBaseModelBinder.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpPostedFileBaseModelBinder.cs
new file mode 100644
index 0000000..7d39815
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpPostedFileBaseModelBinder.cs
@@ -0,0 +1,44 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Web;
+
+ public class HttpPostedFileBaseModelBinder : IModelBinder {
+
+ public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+ if (bindingContext == null) {
+ throw new ArgumentNullException("bindingContext");
+ }
+
+ HttpPostedFileBase theFile = controllerContext.HttpContext.Request.Files[bindingContext.ModelName];
+
+ // case 1: there was no <input type="file" ... /> element in the post
+ if (theFile == null) {
+ return null;
+ }
+
+ // case 2: there was an <input type="file" ... /> element in the post, but it was left blank
+ if (theFile.ContentLength == 0 && String.IsNullOrEmpty(theFile.FileName)) {
+ return null;
+ }
+
+ // case 3: the file was posted
+ return theFile;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpUnauthorizedResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpUnauthorizedResult.cs
new file mode 100644
index 0000000..7b7aca0
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpUnauthorizedResult.cs
@@ -0,0 +1,29 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+
+ public class HttpUnauthorizedResult : ActionResult {
+
+ public override void ExecuteResult(ControllerContext context) {
+ if (context == null) {
+ throw new ArgumentNullException("context");
+ }
+
+ // 401 is the HTTP status code for unauthorized access - setting this
+ // will cause the active authentication module to execute its default
+ // unauthorized handler
+ context.HttpContext.Response.StatusCode = 401;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpVerbs.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpVerbs.cs
new file mode 100644
index 0000000..128dfc3
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/HttpVerbs.cs
@@ -0,0 +1,24 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+
+ [Flags]
+ public enum HttpVerbs {
+ Get = 1 << 0,
+ Post = 1 << 1,
+ Put = 1 << 2,
+ Delete = 1 << 3,
+ Head = 1 << 4
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IActionFilter.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IActionFilter.cs
new file mode 100644
index 0000000..260c9f5
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IActionFilter.cs
@@ -0,0 +1,19 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public interface IActionFilter {
+ void OnActionExecuting(ActionExecutingContext filterContext);
+ void OnActionExecuted(ActionExecutedContext filterContext);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IActionInvoker.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IActionInvoker.cs
new file mode 100644
index 0000000..f5b43f2
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IActionInvoker.cs
@@ -0,0 +1,18 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public interface IActionInvoker {
+ bool InvokeAction(ControllerContext controllerContext, string actionName);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IAuthorizationFilter.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IAuthorizationFilter.cs
new file mode 100644
index 0000000..96a54c3
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IAuthorizationFilter.cs
@@ -0,0 +1,18 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public interface IAuthorizationFilter {
+ void OnAuthorization(AuthorizationContext filterContext);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IBuildManager.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IBuildManager.cs
new file mode 100644
index 0000000..74f462c
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IBuildManager.cs
@@ -0,0 +1,21 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Collections;
+
+ // REVIEW: Should we make this public?
+ internal interface IBuildManager {
+ object CreateInstanceFromVirtualPath(string virtualPath, Type requiredBaseType);
+ ICollection GetReferencedAssemblies();
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IController.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IController.cs
new file mode 100644
index 0000000..83fca88
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IController.cs
@@ -0,0 +1,19 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Web.Routing;
+
+ public interface IController {
+ void Execute(RequestContext requestContext);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IControllerFactory.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IControllerFactory.cs
new file mode 100644
index 0000000..ed2b664
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IControllerFactory.cs
@@ -0,0 +1,20 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Web.Routing;
+
+ public interface IControllerFactory {
+ IController CreateController(RequestContext requestContext, string controllerName);
+ void ReleaseController(IController controller);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IExceptionFilter.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IExceptionFilter.cs
new file mode 100644
index 0000000..2186e04
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IExceptionFilter.cs
@@ -0,0 +1,18 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public interface IExceptionFilter {
+ void OnException(ExceptionContext filterContext);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IModelBinder.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IModelBinder.cs
new file mode 100644
index 0000000..321422f
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IModelBinder.cs
@@ -0,0 +1,18 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public interface IModelBinder {
+ object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IResultFilter.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IResultFilter.cs
new file mode 100644
index 0000000..d897cf5
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IResultFilter.cs
@@ -0,0 +1,19 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public interface IResultFilter {
+ void OnResultExecuting(ResultExecutingContext filterContext);
+ void OnResultExecuted(ResultExecutedContext filterContext);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ITempDataProvider.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ITempDataProvider.cs
new file mode 100644
index 0000000..0300fee
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ITempDataProvider.cs
@@ -0,0 +1,20 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Collections.Generic;
+
+ public interface ITempDataProvider {
+ IDictionary<string, object> LoadTempData(ControllerContext controllerContext);
+ void SaveTempData(ControllerContext controllerContext, IDictionary<string, object> values);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IView.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IView.cs
new file mode 100644
index 0000000..c5a9566
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IView.cs
@@ -0,0 +1,19 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.IO;
+
+ public interface IView {
+ void Render(ViewContext viewContext, TextWriter writer);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IViewDataContainer.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IViewDataContainer.cs
new file mode 100644
index 0000000..387338c
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IViewDataContainer.cs
@@ -0,0 +1,21 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Diagnostics.CodeAnalysis;
+
+ public interface IViewDataContainer {
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "This is the mechanism by which the ViewPage / ViewUserControl get their ViewDataDictionary objects.")]
+ ViewDataDictionary ViewData { get; set; }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IViewEngine.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IViewEngine.cs
new file mode 100644
index 0000000..e30800c
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IViewEngine.cs
@@ -0,0 +1,20 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public interface IViewEngine {
+ ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache);
+ ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache);
+ void ReleaseView(ControllerContext controllerContext, IView view);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/IViewLocationCache.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/IViewLocationCache.cs
new file mode 100644
index 0000000..87248d8
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/IViewLocationCache.cs
@@ -0,0 +1,20 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Web;
+
+ public interface IViewLocationCache {
+ string GetViewLocation(HttpContextBase httpContext, string key);
+ void InsertViewLocation(HttpContextBase httpContext, string key, string virtualPath);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/InputType.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/InputType.cs
new file mode 100644
index 0000000..1a77438
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/InputType.cs
@@ -0,0 +1,21 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ public enum InputType {
+ CheckBox,
+ Hidden,
+ Password,
+ Radio,
+ Text
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/JavaScriptResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/JavaScriptResult.cs
new file mode 100644
index 0000000..46326e2
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/JavaScriptResult.cs
@@ -0,0 +1,36 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+
+ public class JavaScriptResult : ActionResult {
+
+ public string Script {
+ get;
+ set;
+ }
+
+ public override void ExecuteResult(ControllerContext context) {
+ if (context == null) {
+ throw new ArgumentNullException("context");
+ }
+
+ HttpResponseBase response = context.HttpContext.Response;
+ response.ContentType = "application/x-javascript";
+
+ if (Script != null) {
+ response.Write(Script);
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/JsonResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/JsonResult.cs
new file mode 100644
index 0000000..4050377
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/JsonResult.cs
@@ -0,0 +1,61 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Text;
+ using System.Web;
+ using System.Web.Script.Serialization;
+
+ public class JsonResult : ActionResult {
+
+ public Encoding ContentEncoding {
+ get;
+ set;
+ }
+
+ public string ContentType {
+ get;
+ set;
+ }
+
+ public object Data {
+ get;
+ set;
+ }
+
+ public override void ExecuteResult(ControllerContext context) {
+ if (context == null) {
+ throw new ArgumentNullException("context");
+ }
+
+ HttpResponseBase response = context.HttpContext.Response;
+
+ if (!String.IsNullOrEmpty(ContentType)) {
+ response.ContentType = ContentType;
+ }
+ else {
+ response.ContentType = "application/json";
+ }
+ if (ContentEncoding != null) {
+ response.ContentEncoding = ContentEncoding;
+ }
+ if (Data != null) {
+ // The JavaScriptSerializer type was marked as obsolete prior to .NET Framework 3.5 SP1
+#pragma warning disable 0618
+ JavaScriptSerializer serializer = new JavaScriptSerializer();
+ response.Write(serializer.Serialize(Data));
+#pragma warning restore 0618
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBinderAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBinderAttribute.cs
new file mode 100644
index 0000000..5376e4c
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBinderAttribute.cs
@@ -0,0 +1,54 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Globalization;
+ using System.Web.Mvc.Resources;
+
+ [AttributeUsage(ValidTargets, AllowMultiple = false, Inherited = false)]
+ public sealed class ModelBinderAttribute : CustomModelBinderAttribute {
+
+ public ModelBinderAttribute(Type binderType) {
+ if (binderType == null) {
+ throw new ArgumentNullException("binderType");
+ }
+ if (!typeof(IModelBinder).IsAssignableFrom(binderType)) {
+ string message = String.Format(CultureInfo.CurrentUICulture,
+ MvcResources.ModelBinderAttribute_TypeNotIModelBinder, binderType.FullName);
+ throw new ArgumentException(message, "binderType");
+ }
+
+ BinderType = binderType;
+ }
+
+ public Type BinderType {
+ get;
+ private set;
+ }
+
+ public override IModelBinder GetBinder() {
+ try {
+ return (IModelBinder)Activator.CreateInstance(BinderType);
+ }
+ catch (Exception ex) {
+ throw new InvalidOperationException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.ModelBinderAttribute_ErrorCreatingModelBinder,
+ BinderType.FullName),
+ ex);
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBinderDictionary.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBinderDictionary.cs
new file mode 100644
index 0000000..0547661
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBinderDictionary.cs
@@ -0,0 +1,165 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Web.Mvc.Resources;
+
+ public class ModelBinderDictionary : IDictionary<Type, IModelBinder> {
+
+ private IModelBinder _defaultBinder;
+ private readonly Dictionary<Type, IModelBinder> _innerDictionary = new Dictionary<Type, IModelBinder>();
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public int Count {
+ get {
+ return _innerDictionary.Count;
+ }
+ }
+
+ public IModelBinder DefaultBinder {
+ get {
+ if (_defaultBinder == null) {
+ _defaultBinder = new DefaultModelBinder();
+ }
+ return _defaultBinder;
+ }
+ set {
+ _defaultBinder = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool IsReadOnly {
+ get {
+ return ((IDictionary<Type, IModelBinder>)_innerDictionary).IsReadOnly;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public ICollection<Type> Keys {
+ get {
+ return _innerDictionary.Keys;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public IModelBinder this[Type key] {
+ get {
+ IModelBinder binder;
+ _innerDictionary.TryGetValue(key, out binder);
+ return binder;
+ }
+ set {
+ _innerDictionary[key] = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public ICollection<IModelBinder> Values {
+ get {
+ return _innerDictionary.Values;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Add(KeyValuePair<Type, IModelBinder> item) {
+ ((IDictionary<Type, IModelBinder>)_innerDictionary).Add(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Add(Type key, IModelBinder value) {
+ _innerDictionary.Add(key, value);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Clear() {
+ _innerDictionary.Clear();
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Contains(KeyValuePair<Type, IModelBinder> item) {
+ return ((IDictionary<Type, IModelBinder>)_innerDictionary).Contains(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool ContainsKey(Type key) {
+ return _innerDictionary.ContainsKey(key);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void CopyTo(KeyValuePair<Type, IModelBinder>[] array, int arrayIndex) {
+ ((IDictionary<Type, IModelBinder>)_innerDictionary).CopyTo(array, arrayIndex);
+ }
+
+ public IModelBinder GetBinder(Type modelType) {
+ return GetBinder(modelType, true /* fallbackToDefault */);
+ }
+
+ public virtual IModelBinder GetBinder(Type modelType, bool fallbackToDefault) {
+ if (modelType == null) {
+ throw new ArgumentNullException("modelType");
+ }
+
+ return GetBinder(modelType, (fallbackToDefault) ? DefaultBinder : null);
+ }
+
+ private IModelBinder GetBinder(Type modelType, IModelBinder fallbackBinder) {
+ // Try to look up a binder for this type. We use this order of precedence:
+ // 1. Binder registered in the global table
+ // 2. Binder attribute defined on the type
+ // 3. Supplied fallback binder
+
+ IModelBinder binder;
+ if (_innerDictionary.TryGetValue(modelType, out binder)) {
+ return binder;
+ }
+
+ binder = ModelBinders.GetBinderFromAttributes(modelType,
+ () => String.Format(CultureInfo.CurrentUICulture, MvcResources.ModelBinderDictionary_MultipleAttributes, modelType.FullName));
+
+ return binder ?? fallbackBinder;
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public IEnumerator<KeyValuePair<Type, IModelBinder>> GetEnumerator() {
+ return _innerDictionary.GetEnumerator();
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Remove(KeyValuePair<Type, IModelBinder> item) {
+ return ((IDictionary<Type, IModelBinder>)_innerDictionary).Remove(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Remove(Type key) {
+ return _innerDictionary.Remove(key);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool TryGetValue(Type key, out IModelBinder value) {
+ return _innerDictionary.TryGetValue(key, out value);
+ }
+
+ #region IEnumerable Members
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ IEnumerator IEnumerable.GetEnumerator() {
+ return ((IEnumerable)_innerDictionary).GetEnumerator();
+ }
+ #endregion
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBinders.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBinders.cs
new file mode 100644
index 0000000..a9ada9a
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBinders.cs
@@ -0,0 +1,62 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Reflection;
+ using System.Web;
+
+ public static class ModelBinders {
+
+ private static readonly ModelBinderDictionary _binders = CreateDefaultBinderDictionary();
+
+ public static ModelBinderDictionary Binders {
+ get {
+ return _binders;
+ }
+ }
+
+ internal static IModelBinder GetBinderFromAttributes(ICustomAttributeProvider element, Func<string> errorMessageAccessor) {
+ // this method is used to get a custom binder based on the attributes of the element passed to it.
+ // it will return null if a binder cannot be detected based on the attributes alone.
+
+ CustomModelBinderAttribute[] attrs = (CustomModelBinderAttribute[])element.GetCustomAttributes(typeof(CustomModelBinderAttribute), true /* inherit */);
+ if (attrs == null) {
+ return null;
+ }
+
+ switch (attrs.Length) {
+ case 0:
+ return null;
+
+ case 1:
+ IModelBinder binder = attrs[0].GetBinder();
+ return binder;
+
+ default:
+ string errorMessage = errorMessageAccessor();
+ throw new InvalidOperationException(errorMessage);
+ }
+ }
+
+ private static ModelBinderDictionary CreateDefaultBinderDictionary() {
+ // We can't add a binder to the HttpPostedFileBase type as an attribute, so we'll just
+ // prepopulate the dictionary as a convenience to users.
+
+ ModelBinderDictionary binders = new ModelBinderDictionary() {
+ { typeof(HttpPostedFileBase), new HttpPostedFileBaseModelBinder() }
+ };
+ return binders;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBindingContext.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBindingContext.cs
new file mode 100644
index 0000000..c2227e0
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelBindingContext.cs
@@ -0,0 +1,87 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+
+ public class ModelBindingContext {
+
+ private static readonly Predicate<string> _defaultPropertyFilter = _ => true;
+
+ private string _modelName;
+ private ModelStateDictionary _modelState;
+ private Predicate<string> _propertyFilter;
+
+ public bool FallbackToEmptyPrefix {
+ get;
+ set;
+ }
+
+ public object Model {
+ get;
+ set;
+ }
+
+ public string ModelName {
+ get {
+ if (_modelName == null) {
+ _modelName = String.Empty;
+ }
+ return _modelName;
+ }
+ set {
+ _modelName = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "The containing type is mutable.")]
+ public ModelStateDictionary ModelState {
+ get {
+ if (_modelState == null) {
+ _modelState = new ModelStateDictionary();
+ }
+ return _modelState;
+ }
+ set {
+ _modelState = value;
+ }
+ }
+
+ public Type ModelType {
+ get;
+ set;
+ }
+
+ public Predicate<string> PropertyFilter {
+ get {
+ if (_propertyFilter == null) {
+ _propertyFilter = _defaultPropertyFilter;
+ }
+ return _propertyFilter;
+ }
+ set {
+ _propertyFilter = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "The containing type is mutable.")]
+ public IDictionary<string, ValueProviderResult> ValueProvider {
+ get;
+ set;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelError.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelError.cs
new file mode 100644
index 0000000..516bf47
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelError.cs
@@ -0,0 +1,46 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+
+ [Serializable]
+ public class ModelError {
+
+ public ModelError(Exception exception)
+ : this(exception, null /* errorMessage */) {
+ }
+
+ public ModelError(Exception exception, string errorMessage)
+ : this(errorMessage) {
+ if (exception == null) {
+ throw new ArgumentNullException("exception");
+ }
+
+ Exception = exception;
+ }
+
+ public ModelError(string errorMessage) {
+ ErrorMessage = errorMessage ?? String.Empty;
+ }
+
+ public Exception Exception {
+ get;
+ private set;
+ }
+
+ public string ErrorMessage {
+ get;
+ private set;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelErrorCollection.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelErrorCollection.cs
new file mode 100644
index 0000000..af50caf
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelErrorCollection.cs
@@ -0,0 +1,28 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.ObjectModel;
+
+ [Serializable]
+ public class ModelErrorCollection : Collection<ModelError> {
+
+ public void Add(Exception exception) {
+ Add(new ModelError(exception));
+ }
+
+ public void Add(string errorMessage) {
+ Add(new ModelError(errorMessage));
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelState.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelState.cs
new file mode 100644
index 0000000..49c3e29
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelState.cs
@@ -0,0 +1,31 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ [Serializable]
+ public class ModelState {
+
+ private ModelErrorCollection _errors = new ModelErrorCollection();
+
+ public ValueProviderResult Value {
+ get;
+ set;
+ }
+
+ public ModelErrorCollection Errors {
+ get {
+ return _errors;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelStateDictionary.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelStateDictionary.cs
new file mode 100644
index 0000000..92f16ad
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ModelStateDictionary.cs
@@ -0,0 +1,187 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Linq;
+
+ [Serializable]
+ public class ModelStateDictionary : IDictionary<string, ModelState> {
+
+ private readonly Dictionary<string, ModelState> _innerDictionary = new Dictionary<string, ModelState>(StringComparer.OrdinalIgnoreCase);
+
+ public ModelStateDictionary() {
+ }
+
+ public ModelStateDictionary(ModelStateDictionary dictionary) {
+ if (dictionary == null) {
+ throw new ArgumentNullException("dictionary");
+ }
+
+ foreach (var entry in dictionary) {
+ _innerDictionary.Add(entry.Key, entry.Value);
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public int Count {
+ get {
+ return _innerDictionary.Count;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool IsReadOnly {
+ get {
+ return ((IDictionary<string, ModelState>)_innerDictionary).IsReadOnly;
+ }
+ }
+
+ public bool IsValid {
+ get {
+ return Values.All(modelState => modelState.Errors.Count == 0);
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public ICollection<string> Keys {
+ get {
+ return _innerDictionary.Keys;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public ModelState this[string key] {
+ get {
+ ModelState value;
+ _innerDictionary.TryGetValue(key, out value);
+ return value;
+ }
+ set {
+ _innerDictionary[key] = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public ICollection<ModelState> Values {
+ get {
+ return _innerDictionary.Values;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Add(KeyValuePair<string, ModelState> item) {
+ ((IDictionary<string, ModelState>)_innerDictionary).Add(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Add(string key, ModelState value) {
+ _innerDictionary.Add(key, value);
+ }
+
+ public void AddModelError(string key, Exception exception) {
+ GetModelStateForKey(key).Errors.Add(exception);
+ }
+
+ public void AddModelError(string key, string errorMessage) {
+ GetModelStateForKey(key).Errors.Add(errorMessage);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Clear() {
+ _innerDictionary.Clear();
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Contains(KeyValuePair<string, ModelState> item) {
+ return ((IDictionary<string, ModelState>)_innerDictionary).Contains(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool ContainsKey(string key) {
+ return _innerDictionary.ContainsKey(key);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void CopyTo(KeyValuePair<string, ModelState>[] array, int arrayIndex) {
+ ((IDictionary<string, ModelState>)_innerDictionary).CopyTo(array, arrayIndex);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public IEnumerator<KeyValuePair<string, ModelState>> GetEnumerator() {
+ return _innerDictionary.GetEnumerator();
+ }
+
+ private ModelState GetModelStateForKey(string key) {
+ if (key == null) {
+ throw new ArgumentNullException("key");
+ }
+
+ ModelState modelState;
+ if (!TryGetValue(key, out modelState)) {
+ modelState = new ModelState();
+ this[key] = modelState;
+ }
+
+ return modelState;
+ }
+
+ public bool IsValidField(string key) {
+ if (key == null) {
+ throw new ArgumentNullException("key");
+ }
+
+ // if the key is not found in the dictionary, we just say that it's valid (since there are no errors)
+ return DictionaryHelpers.FindKeysWithPrefix(this, key).All(entry => entry.Value.Errors.Count == 0);
+ }
+
+ public void Merge(ModelStateDictionary dictionary) {
+ if (dictionary == null) {
+ return;
+ }
+
+ foreach (var entry in dictionary) {
+ this[entry.Key] = entry.Value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Remove(KeyValuePair<string, ModelState> item) {
+ return ((IDictionary<string, ModelState>)_innerDictionary).Remove(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Remove(string key) {
+ return _innerDictionary.Remove(key);
+ }
+
+ public void SetModelValue(string key, ValueProviderResult value) {
+ GetModelStateForKey(key).Value = value;
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool TryGetValue(string key, out ModelState value) {
+ return _innerDictionary.TryGetValue(key, out value);
+ }
+
+ #region IEnumerable Members
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ IEnumerator IEnumerable.GetEnumerator() {
+ return ((IEnumerable)_innerDictionary).GetEnumerator();
+ }
+ #endregion
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/MultiSelectList.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/MultiSelectList.cs
new file mode 100644
index 0000000..2a547c9
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/MultiSelectList.cs
@@ -0,0 +1,128 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Linq;
+ using System.Web.UI;
+
+ [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
+ [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Multi",
+ Justification = "Common shorthand for 'multiple'.")]
+ public class MultiSelectList : IEnumerable<SelectListItem> {
+
+ public MultiSelectList(IEnumerable items)
+ : this(items, null /* selectedValues */) {
+ }
+
+ public MultiSelectList(IEnumerable items, IEnumerable selectedValues)
+ : this(items, null /* dataValuefield */, null /* dataTextField */, selectedValues) {
+ }
+
+ public MultiSelectList(IEnumerable items, string dataValueField, string dataTextField)
+ : this(items, dataValueField, dataTextField, null /* selectedValues */) {
+ }
+
+ public MultiSelectList(IEnumerable items, string dataValueField, string dataTextField, IEnumerable selectedValues) {
+ if (items == null) {
+ throw new ArgumentNullException("items");
+ }
+
+ Items = items;
+ DataValueField = dataValueField;
+ DataTextField = dataTextField;
+ SelectedValues = selectedValues;
+ }
+
+ public string DataTextField {
+ get;
+ private set;
+ }
+
+ public string DataValueField {
+ get;
+ private set;
+ }
+
+ public IEnumerable Items {
+ get;
+ private set;
+ }
+
+ public IEnumerable SelectedValues {
+ get;
+ private set;
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public virtual IEnumerator<SelectListItem> GetEnumerator() {
+ return GetListItems().GetEnumerator();
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
+ Justification = "Operation performs conversions and returns a unique instance on each call.")]
+ internal IList<SelectListItem> GetListItems() {
+ return (!String.IsNullOrEmpty(DataValueField)) ?
+ GetListItemsWithValueField() :
+ GetListItemsWithoutValueField();
+ }
+
+ private IList<SelectListItem> GetListItemsWithValueField() {
+ HashSet<string> selectedValues = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
+ if (SelectedValues != null) {
+ selectedValues.UnionWith(from object value in SelectedValues select Convert.ToString(value, CultureInfo.CurrentCulture));
+ }
+
+ var listItems = from object item in Items
+ let value = Eval(item, DataValueField)
+ select new SelectListItem {
+ Value = value,
+ Text = Eval(item, DataTextField),
+ Selected = selectedValues.Contains(value)
+ };
+ return listItems.ToList();
+ }
+
+ private IList<SelectListItem> GetListItemsWithoutValueField() {
+ HashSet<object> selectedValues = new HashSet<object>();
+ if (SelectedValues != null) {
+ selectedValues.UnionWith(SelectedValues.Cast<object>());
+ }
+
+ var listItems = from object item in Items
+ select new SelectListItem {
+ Text = Eval(item, DataTextField),
+ Selected = selectedValues.Contains(item)
+ };
+ return listItems.ToList();
+ }
+
+ private static string Eval(object container, string expression) {
+ object value = container;
+ if (!String.IsNullOrEmpty(expression)) {
+ value = DataBinder.Eval(container, expression);
+ }
+ return Convert.ToString(value, CultureInfo.CurrentCulture);
+ }
+
+ #region IEnumerable Members
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ IEnumerator IEnumerable.GetEnumerator() {
+ return GetEnumerator();
+ }
+ #endregion
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/MvcHandler.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/MvcHandler.cs
new file mode 100644
index 0000000..3e11ccd
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/MvcHandler.cs
@@ -0,0 +1,120 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Reflection;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+ using System.Web.SessionState;
+
+ [SuppressMessage("Microsoft.Security", "CA2112:SecuredTypesShouldNotExposeFields", Justification = "There's nothing secret about the value of this field.")]
+ public class MvcHandler : IHttpHandler, IRequiresSessionState {
+ private ControllerBuilder _controllerBuilder;
+ private static string MvcVersion = GetMvcVersionString();
+
+ public static readonly string MvcVersionHeaderName = "X-AspNetMvc-Version";
+
+ public MvcHandler(RequestContext requestContext) {
+ if (requestContext == null) {
+ throw new ArgumentNullException("requestContext");
+ }
+ RequestContext = requestContext;
+ }
+
+ protected virtual bool IsReusable {
+ get {
+ return false;
+ }
+ }
+
+ internal ControllerBuilder ControllerBuilder {
+ get {
+ if (_controllerBuilder == null) {
+ _controllerBuilder = ControllerBuilder.Current;
+ }
+ return _controllerBuilder;
+ }
+ set {
+ _controllerBuilder = value;
+ }
+ }
+
+ public static bool DisableMvcResponseHeader {
+ get;
+ set;
+ }
+
+ public RequestContext RequestContext {
+ get;
+ private set;
+ }
+
+ protected internal virtual void AddVersionHeader(HttpContextBase httpContext) {
+ if (!DisableMvcResponseHeader) {
+ httpContext.Response.AppendHeader(MvcVersionHeaderName, MvcVersion);
+ }
+ }
+
+ private static string GetMvcVersionString() {
+ // DevDiv 216459:
+ // This code originally used Assembly.GetName(), but that requires FileIOPermission, which isn't granted in
+ // medium trust. However, Assembly.FullName *is* accessible in medium trust.
+ return new AssemblyName(typeof(MvcHandler).Assembly.FullName).Version.ToString(2);
+ }
+
+ protected virtual void ProcessRequest(HttpContext httpContext) {
+ HttpContextBase iHttpContext = new HttpContextWrapper(httpContext);
+ ProcessRequest(iHttpContext);
+ }
+
+ protected internal virtual void ProcessRequest(HttpContextBase httpContext) {
+ AddVersionHeader(httpContext);
+
+ // Get the controller type
+ string controllerName = RequestContext.RouteData.GetRequiredString("controller");
+
+ // Instantiate the controller and call Execute
+ IControllerFactory factory = ControllerBuilder.GetControllerFactory();
+ IController controller = factory.CreateController(RequestContext, controllerName);
+ if (controller == null) {
+ throw new InvalidOperationException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.ControllerBuilder_FactoryReturnedNull,
+ factory.GetType(),
+ controllerName));
+ }
+ try {
+ controller.Execute(RequestContext);
+ }
+ finally {
+ factory.ReleaseController(controller);
+ }
+ }
+
+ #region IHttpHandler Members
+ bool IHttpHandler.IsReusable {
+ get {
+ return IsReusable;
+ }
+ }
+
+ void IHttpHandler.ProcessRequest(HttpContext httpContext) {
+ ProcessRequest(httpContext);
+ }
+ #endregion
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/MvcHttpHandler.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/MvcHttpHandler.cs
new file mode 100644
index 0000000..8348cc6
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/MvcHttpHandler.cs
@@ -0,0 +1,27 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Web.Routing;
+ using System.Web.SessionState;
+
+ public class MvcHttpHandler : UrlRoutingHandler, IRequiresSessionState {
+
+ protected override void VerifyAndProcessRequest(IHttpHandler httpHandler, HttpContextBase httpContext) {
+ if (httpHandler == null) {
+ throw new ArgumentNullException("httpHandler");
+ }
+
+ httpHandler.ProcessRequest(HttpContext.Current);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/MvcRouteHandler.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/MvcRouteHandler.cs
new file mode 100644
index 0000000..c367c50
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/MvcRouteHandler.cs
@@ -0,0 +1,27 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Web.Routing;
+
+ public class MvcRouteHandler : IRouteHandler {
+ protected virtual IHttpHandler GetHttpHandler(RequestContext requestContext) {
+ return new MvcHandler(requestContext);
+ }
+
+ #region IRouteHandler Members
+ IHttpHandler IRouteHandler.GetHttpHandler(RequestContext requestContext) {
+ return GetHttpHandler(requestContext);
+ }
+ #endregion
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/NameValueCollectionExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/NameValueCollectionExtensions.cs
new file mode 100644
index 0000000..f297eaf
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/NameValueCollectionExtensions.cs
@@ -0,0 +1,39 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.Specialized;
+
+ public static class NameValueCollectionExtensions {
+
+ public static void CopyTo(this NameValueCollection collection, IDictionary<string, object> destination) {
+ CopyTo(collection, destination, false /* replaceEntries */);
+ }
+
+ public static void CopyTo(this NameValueCollection collection, IDictionary<string, object> destination, bool replaceEntries) {
+ if (collection == null) {
+ throw new ArgumentNullException("collection");
+ }
+ if (destination == null) {
+ throw new ArgumentNullException("destination");
+ }
+
+ foreach (string key in collection.Keys) {
+ if (replaceEntries || !destination.ContainsKey(key)) {
+ destination[key] = collection[key];
+ }
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/NonActionAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/NonActionAttribute.cs
new file mode 100644
index 0000000..2a6bcd6
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/NonActionAttribute.cs
@@ -0,0 +1,22 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Reflection;
+
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
+ public sealed class NonActionAttribute : ActionMethodSelectorAttribute {
+ public override bool IsValidForRequest(ControllerContext controllerContext, MethodInfo methodInfo) {
+ return false;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/NullViewLocationCache.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/NullViewLocationCache.cs
new file mode 100644
index 0000000..9e1596e
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/NullViewLocationCache.cs
@@ -0,0 +1,30 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+
+ internal sealed class NullViewLocationCache : IViewLocationCache {
+
+ #region IViewLocationCache Members
+ public string GetViewLocation(HttpContextBase httpContext, string key) {
+ return null;
+ }
+
+ public void InsertViewLocation(HttpContextBase httpContext, string key, string virtualPath) {
+ }
+ #endregion
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/OutputCacheAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/OutputCacheAttribute.cs
new file mode 100644
index 0000000..67279a1
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/OutputCacheAttribute.cs
@@ -0,0 +1,142 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Web;
+ using System.Web.UI;
+
+ [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes",
+ Justification = "Unsealed so that subclassed types can set properties in the default constructor.")]
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
+ public class OutputCacheAttribute : ActionFilterAttribute {
+
+ private OutputCacheParameters _cacheSettings = new OutputCacheParameters();
+
+ public string CacheProfile {
+ get {
+ return _cacheSettings.CacheProfile ?? String.Empty;
+ }
+ set {
+ _cacheSettings.CacheProfile = value;
+ }
+ }
+
+ internal OutputCacheParameters CacheSettings {
+ get {
+ return _cacheSettings;
+ }
+ }
+
+ public int Duration {
+ get {
+ return _cacheSettings.Duration;
+ }
+ set {
+ _cacheSettings.Duration = value;
+ }
+ }
+
+ public OutputCacheLocation Location {
+ get {
+ return _cacheSettings.Location;
+ }
+ set {
+ _cacheSettings.Location = value;
+ }
+ }
+
+ public bool NoStore {
+ get {
+ return _cacheSettings.NoStore;
+ }
+ set {
+ _cacheSettings.NoStore = value;
+ }
+ }
+
+ public string SqlDependency {
+ get {
+ return _cacheSettings.SqlDependency ?? String.Empty;
+ }
+ set {
+ _cacheSettings.SqlDependency = value;
+ }
+ }
+
+ public string VaryByContentEncoding {
+ get {
+ return _cacheSettings.VaryByContentEncoding ?? String.Empty;
+ }
+ set {
+ _cacheSettings.VaryByContentEncoding = value;
+ }
+ }
+
+ public string VaryByCustom {
+ get {
+ return _cacheSettings.VaryByCustom ?? String.Empty;
+ }
+ set {
+ _cacheSettings.VaryByCustom = value;
+ }
+ }
+
+ public string VaryByHeader {
+ get {
+ return _cacheSettings.VaryByHeader ?? String.Empty;
+ }
+ set {
+ _cacheSettings.VaryByHeader = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Param",
+ Justification = "Matches the @ OutputCache page directive.")]
+ public string VaryByParam {
+ get {
+ return _cacheSettings.VaryByParam ?? String.Empty;
+ }
+ set {
+ _cacheSettings.VaryByParam = value;
+ }
+ }
+
+ public override void OnResultExecuting(ResultExecutingContext filterContext) {
+ if (filterContext == null) {
+ throw new ArgumentNullException("filterContext");
+ }
+
+ // we need to call ProcessRequest() since there's no other way to set the Page.Response intrinsic
+ OutputCachedPage page = new OutputCachedPage(_cacheSettings);
+ page.ProcessRequest(HttpContext.Current);
+ }
+
+ private sealed class OutputCachedPage : Page {
+ private OutputCacheParameters _cacheSettings;
+
+ public OutputCachedPage(OutputCacheParameters cacheSettings) {
+ // Tracing requires Page IDs to be unique.
+ ID = Guid.NewGuid().ToString();
+ _cacheSettings = cacheSettings;
+ }
+
+ protected override void FrameworkInitialize() {
+ // when you put the <%@ OutputCache %> directive on a page, the generated code calls InitOutputCache() from here
+ base.FrameworkInitialize();
+ InitOutputCache(_cacheSettings);
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ParameterBindingInfo.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ParameterBindingInfo.cs
new file mode 100644
index 0000000..cf403f9
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ParameterBindingInfo.cs
@@ -0,0 +1,43 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Collections.Generic;
+
+ public abstract class ParameterBindingInfo {
+
+ public virtual IModelBinder Binder {
+ get {
+ return null;
+ }
+ }
+
+ public virtual ICollection<string> Exclude {
+ get {
+ return new string[0];
+ }
+ }
+
+ public virtual ICollection<string> Include {
+ get {
+ return new string[0];
+ }
+ }
+
+ public virtual string Prefix {
+ get {
+ return null;
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ParameterDescriptor.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ParameterDescriptor.cs
new file mode 100644
index 0000000..54e0eff
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ParameterDescriptor.cs
@@ -0,0 +1,67 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Reflection;
+
+ public abstract class ParameterDescriptor : ICustomAttributeProvider {
+
+ private static readonly EmptyParameterBindingInfo _emptyBindingInfo = new EmptyParameterBindingInfo();
+
+ public abstract ActionDescriptor ActionDescriptor {
+ get;
+ }
+
+ public virtual ParameterBindingInfo BindingInfo {
+ get {
+ return _emptyBindingInfo;
+ }
+ }
+
+ public abstract string ParameterName {
+ get;
+ }
+
+ public abstract Type ParameterType {
+ get;
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public virtual object[] GetCustomAttributes(bool inherit) {
+ return GetCustomAttributes(typeof(object), inherit);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public virtual object[] GetCustomAttributes(Type attributeType, bool inherit) {
+ if (attributeType == null) {
+ throw new ArgumentNullException("attributeType");
+ }
+
+ return (object[])Array.CreateInstance(attributeType, 0);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public virtual bool IsDefined(Type attributeType, bool inherit) {
+ if (attributeType == null) {
+ throw new ArgumentNullException("attributeType");
+ }
+
+ return false;
+ }
+
+ private sealed class EmptyParameterBindingInfo : ParameterBindingInfo {
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/PartialViewResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/PartialViewResult.cs
new file mode 100644
index 0000000..8e656e6
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/PartialViewResult.cs
@@ -0,0 +1,37 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Globalization;
+ using System.Text;
+ using System.Web.Mvc.Resources;
+
+ public class PartialViewResult : ViewResultBase {
+
+ protected override ViewEngineResult FindView(ControllerContext context) {
+ ViewEngineResult result = ViewEngineCollection.FindPartialView(context, ViewName);
+ if (result.View != null) {
+ return result;
+ }
+
+ // we need to generate an exception containing all the locations we searched
+ StringBuilder locationsText = new StringBuilder();
+ foreach (string location in result.SearchedLocations) {
+ locationsText.AppendLine();
+ locationsText.Append(location);
+ }
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture,
+ MvcResources.Common_PartialViewNotFound, ViewName, locationsText));
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/PathHelpers.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/PathHelpers.cs
new file mode 100644
index 0000000..0dc9a93
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/PathHelpers.cs
@@ -0,0 +1,97 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Specialized;
+ using System.Web;
+
+ internal static class PathHelpers {
+
+ private const string _urlRewriterServerVar = "HTTP_X_ORIGINAL_URL";
+
+ // this method can accept an app-relative path or an absolute path for contentPath
+ public static string GenerateClientUrl(HttpContextBase httpContext, string contentPath) {
+ if (String.IsNullOrEmpty(contentPath)) {
+ return contentPath;
+ }
+
+ // many of the methods we call internally can't handle query strings properly, so just strip it out for
+ // the time being
+ string query;
+ contentPath = StripQuery(contentPath, out query);
+
+ return GenerateClientUrlInternal(httpContext, contentPath) + query;
+ }
+
+ private static string GenerateClientUrlInternal(HttpContextBase httpContext, string contentPath) {
+ if (String.IsNullOrEmpty(contentPath)) {
+ return contentPath;
+ }
+
+ // can't call VirtualPathUtility.IsAppRelative since it throws on some inputs
+ bool isAppRelative = contentPath[0] == '~';
+ if (isAppRelative) {
+ string absoluteContentPath = VirtualPathUtility.ToAbsolute(contentPath, httpContext.Request.ApplicationPath);
+ string modifiedAbsoluteContentPath = httpContext.Response.ApplyAppPathModifier(absoluteContentPath);
+ return GenerateClientUrlInternal(httpContext, modifiedAbsoluteContentPath);
+ }
+
+ // we only want to manipulate the path if URL rewriting is active, else we risk breaking the generated URL
+ NameValueCollection serverVars = httpContext.Request.ServerVariables;
+ bool urlRewriterIsEnabled = (serverVars != null && serverVars[_urlRewriterServerVar] != null);
+ if (!urlRewriterIsEnabled) {
+ return contentPath;
+ }
+
+ // Since the rawUrl represents what the user sees in his browser, it is what we want to use as the base
+ // of our absolute paths. For example, consider mysite.example.com/foo, which is internally
+ // rewritten to content.example.com/mysite/foo. When we want to generate a link to ~/bar, we want to
+ // base it from / instead of /foo, otherwise the user ends up seeing mysite.example.com/foo/bar,
+ // which is incorrect.
+ string relativeUrlToDestination = MakeRelative(httpContext.Request.Path, contentPath);
+ string absoluteUrlToDestination = MakeAbsolute(httpContext.Request.RawUrl, relativeUrlToDestination);
+ return absoluteUrlToDestination;
+ }
+
+ public static string MakeAbsolute(string basePath, string relativePath) {
+ // The Combine() method can't handle query strings on the base path, so we trim it off.
+ string query;
+ basePath = StripQuery(basePath, out query);
+ return VirtualPathUtility.Combine(basePath, relativePath);
+ }
+
+ public static string MakeRelative(string fromPath, string toPath) {
+ string relativeUrl = VirtualPathUtility.MakeRelative(fromPath, toPath);
+ if (String.IsNullOrEmpty(relativeUrl) || relativeUrl[0] == '?') {
+ // Sometimes VirtualPathUtility.MakeRelative() will return an empty string when it meant to return '.',
+ // but links to {empty string} are browser dependent. We replace it with an explicit path to force
+ // consistency across browsers.
+ relativeUrl = "./" + relativeUrl;
+ }
+ return relativeUrl;
+ }
+
+ private static string StripQuery(string path, out string query) {
+ int queryIndex = path.IndexOf('?');
+ if (queryIndex >= 0) {
+ query = path.Substring(queryIndex);
+ return path.Substring(0, queryIndex);
+ }
+ else {
+ query = null;
+ return path;
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ReaderWriterCache`2.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ReaderWriterCache`2.cs
new file mode 100644
index 0000000..4611d69
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ReaderWriterCache`2.cs
@@ -0,0 +1,69 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Threading;
+
+ internal abstract class ReaderWriterCache<TKey, TValue> {
+
+ private readonly Dictionary<TKey, TValue> _cache;
+ private readonly ReaderWriterLock _rwLock = new ReaderWriterLock();
+
+ protected ReaderWriterCache()
+ : this(null) {
+ }
+
+ protected ReaderWriterCache(IEqualityComparer<TKey> comparer) {
+ _cache = new Dictionary<TKey, TValue>(comparer);
+ }
+
+ protected Dictionary<TKey, TValue> Cache {
+ get {
+ return _cache;
+ }
+ }
+
+ protected TValue FetchOrCreateItem(TKey key, Func<TValue> creator) {
+ // first, see if the item already exists in the cache
+ _rwLock.AcquireReaderLock(Timeout.Infinite);
+ try {
+ TValue existingEntry;
+ if (_cache.TryGetValue(key, out existingEntry)) {
+ return existingEntry;
+ }
+ }
+ finally {
+ _rwLock.ReleaseReaderLock();
+ }
+
+ // insert the new item into the cache
+ TValue newEntry = creator();
+ _rwLock.AcquireWriterLock(Timeout.Infinite);
+ try {
+ TValue existingEntry;
+ if (_cache.TryGetValue(key, out existingEntry)) {
+ // another thread already inserted an item, so use that one
+ return existingEntry;
+ }
+
+ _cache[key] = newEntry;
+ return newEntry;
+ }
+ finally {
+ _rwLock.ReleaseWriterLock();
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/RedirectResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/RedirectResult.cs
new file mode 100644
index 0000000..c24e8bc
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/RedirectResult.cs
@@ -0,0 +1,48 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Web.Mvc.Resources;
+
+ // represents a result that performs a redirection given some URI
+ public class RedirectResult : ActionResult {
+
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#",
+ Justification = "Response.Redirect() takes its URI as a string parameter.")]
+ public RedirectResult(string url) {
+ if (String.IsNullOrEmpty(url)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "url");
+ }
+
+ Url = url;
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings",
+ Justification = "Response.Redirect() takes its URI as a string parameter.")]
+ public string Url {
+ get;
+ private set;
+ }
+
+ public override void ExecuteResult(ControllerContext context) {
+ if (context == null) {
+ throw new ArgumentNullException("context");
+ }
+
+ string destinationUrl = UrlHelper.Content(Url, context.HttpContext);
+ context.HttpContext.Response.Redirect(destinationUrl, false /* endResponse */);
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/RedirectToRouteResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/RedirectToRouteResult.cs
new file mode 100644
index 0000000..1c067e4
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/RedirectToRouteResult.cs
@@ -0,0 +1,67 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ // represents a result that performs a redirection given some values dictionary
+ public class RedirectToRouteResult : ActionResult {
+
+ private RouteCollection _routes;
+
+ public RedirectToRouteResult(RouteValueDictionary routeValues) :
+ this(null, routeValues) {
+ }
+
+ public RedirectToRouteResult(string routeName, RouteValueDictionary routeValues) {
+ RouteName = routeName ?? String.Empty;
+ RouteValues = routeValues ?? new RouteValueDictionary();
+ }
+
+ public string RouteName {
+ get;
+ private set;
+ }
+
+ public RouteValueDictionary RouteValues {
+ get;
+ private set;
+ }
+
+ internal RouteCollection Routes {
+ get {
+ if (_routes == null) {
+ _routes = RouteTable.Routes;
+ }
+ return _routes;
+ }
+ set {
+ _routes = value;
+ }
+ }
+
+ public override void ExecuteResult(ControllerContext context) {
+ if (context == null) {
+ throw new ArgumentNullException("context");
+ }
+
+ string destinationUrl = UrlHelper.GenerateUrl(RouteName, null /* actionName */, null /* controllerName */, RouteValues, Routes, context.RequestContext, false /* includeImplicitMvcValues */);
+ if (String.IsNullOrEmpty(destinationUrl)) {
+ throw new InvalidOperationException(MvcResources.ActionRedirectResult_NoRouteMatched);
+ }
+
+ context.HttpContext.Response.Redirect(destinationUrl, false /* endResponse */);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedActionDescriptor.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedActionDescriptor.cs
new file mode 100644
index 0000000..2a71e42
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedActionDescriptor.cs
@@ -0,0 +1,219 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Globalization;
+ using System.Linq;
+ using System.Reflection;
+ using System.Web.Mvc.Resources;
+
+ public class ReflectedActionDescriptor : ActionDescriptor {
+
+ private readonly static ActionMethodDispatcherCache _staticDispatcherCache = new ActionMethodDispatcherCache();
+ private ActionMethodDispatcherCache _instanceDispatcherCache;
+
+ private readonly string _actionName;
+ private readonly ControllerDescriptor _controllerDescriptor;
+ private ParameterDescriptor[] _parametersCache;
+
+ public ReflectedActionDescriptor(MethodInfo methodInfo, string actionName, ControllerDescriptor controllerDescriptor)
+ : this(methodInfo, actionName, controllerDescriptor, true /* validateMethod */) {
+ }
+
+ internal ReflectedActionDescriptor(MethodInfo methodInfo, string actionName, ControllerDescriptor controllerDescriptor, bool validateMethod) {
+ if (methodInfo == null) {
+ throw new ArgumentNullException("methodInfo");
+ }
+ if (String.IsNullOrEmpty(actionName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "actionName");
+ }
+ if (controllerDescriptor == null) {
+ throw new ArgumentNullException("controllerDescriptor");
+ }
+
+ if (validateMethod) {
+ string failedMessage = VerifyActionMethodIsCallable(methodInfo);
+ if (failedMessage != null) {
+ throw new ArgumentException(failedMessage, "methodInfo");
+ }
+ }
+
+ MethodInfo = methodInfo;
+ _actionName = actionName;
+ _controllerDescriptor = controllerDescriptor;
+ }
+
+ public override string ActionName {
+ get {
+ return _actionName;
+ }
+ }
+
+ public override ControllerDescriptor ControllerDescriptor {
+ get {
+ return _controllerDescriptor;
+ }
+ }
+
+ internal ActionMethodDispatcherCache DispatcherCache {
+ get {
+ if (_instanceDispatcherCache == null) {
+ _instanceDispatcherCache = _staticDispatcherCache;
+ }
+ return _instanceDispatcherCache;
+ }
+ set {
+ _instanceDispatcherCache = value;
+ }
+ }
+
+ public MethodInfo MethodInfo {
+ get;
+ private set;
+ }
+
+ public override object Execute(ControllerContext controllerContext, IDictionary<string, object> parameters) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+ if (parameters == null) {
+ throw new ArgumentNullException("parameters");
+ }
+
+ ParameterInfo[] parameterInfos = MethodInfo.GetParameters();
+ var rawParameterValues = from parameterInfo in parameterInfos
+ select ExtractParameterFromDictionary(parameterInfo, parameters, MethodInfo);
+ object[] parametersArray = rawParameterValues.ToArray();
+
+ ActionMethodDispatcher dispatcher = DispatcherCache.GetDispatcher(MethodInfo);
+ object actionReturnValue = dispatcher.Execute(controllerContext.Controller, parametersArray);
+ return actionReturnValue;
+ }
+
+ private static object ExtractParameterFromDictionary(ParameterInfo parameterInfo, IDictionary<string, object> parameters, MethodInfo methodInfo) {
+ object value;
+
+ if (!parameters.TryGetValue(parameterInfo.Name, out value)) {
+ // the key should always be present, even if the parameter value is null
+ string message = String.Format(CultureInfo.CurrentUICulture, MvcResources.ReflectedActionDescriptor_ParameterNotInDictionary,
+ parameterInfo.Name, parameterInfo.ParameterType, methodInfo, methodInfo.DeclaringType);
+ throw new ArgumentException(message, "parameters");
+ }
+
+ if (value == null && !TypeHelpers.TypeAllowsNullValue(parameterInfo.ParameterType)) {
+ // tried to pass a null value for a non-nullable parameter type
+ string message = String.Format(CultureInfo.CurrentUICulture, MvcResources.ReflectedActionDescriptor_ParameterCannotBeNull,
+ parameterInfo.Name, parameterInfo.ParameterType, methodInfo, methodInfo.DeclaringType);
+ throw new ArgumentException(message, "parameters");
+ }
+
+ if (value != null && !parameterInfo.ParameterType.IsInstanceOfType(value)) {
+ // value was supplied but is not of the proper type
+ string message = String.Format(CultureInfo.CurrentUICulture, MvcResources.ReflectedActionDescriptor_ParameterValueHasWrongType,
+ parameterInfo.Name, methodInfo, methodInfo.DeclaringType, value.GetType(), parameterInfo.ParameterType);
+ throw new ArgumentException(message, "parameters");
+ }
+
+ return value;
+ }
+
+ public override object[] GetCustomAttributes(bool inherit) {
+ return MethodInfo.GetCustomAttributes(inherit);
+ }
+
+ public override object[] GetCustomAttributes(Type attributeType, bool inherit) {
+ return MethodInfo.GetCustomAttributes(attributeType, inherit);
+ }
+
+ public override FilterInfo GetFilters() {
+ // Enumerable.OrderBy() is a stable sort, so this method preserves scope ordering.
+ FilterAttribute[] typeFilters = (FilterAttribute[])MethodInfo.ReflectedType.GetCustomAttributes(typeof(FilterAttribute), true /* inherit */);
+ FilterAttribute[] methodFilters = (FilterAttribute[])MethodInfo.GetCustomAttributes(typeof(FilterAttribute), true /* inherit */);
+ List<FilterAttribute> orderedFilters = typeFilters.Concat(methodFilters).OrderBy(attr => attr.Order).ToList();
+
+ FilterInfo filterInfo = new FilterInfo();
+ MergeFiltersIntoList(orderedFilters, filterInfo.ActionFilters);
+ MergeFiltersIntoList(orderedFilters, filterInfo.AuthorizationFilters);
+ MergeFiltersIntoList(orderedFilters, filterInfo.ExceptionFilters);
+ MergeFiltersIntoList(orderedFilters, filterInfo.ResultFilters);
+ return filterInfo;
+ }
+
+ public override ParameterDescriptor[] GetParameters() {
+ ParameterDescriptor[] parameters = LazilyFetchParametersCollection();
+
+ // need to clone array so that user modifications aren't accidentally stored
+ return (ParameterDescriptor[])parameters.Clone();
+ }
+
+ public override ICollection<ActionSelector> GetSelectors() {
+ ActionMethodSelectorAttribute[] attrs = (ActionMethodSelectorAttribute[])MethodInfo.GetCustomAttributes(typeof(ActionMethodSelectorAttribute), true /* inherit */);
+ ActionSelector[] selectors = Array.ConvertAll(attrs, attr => (ActionSelector)(controllerContext => attr.IsValidForRequest(controllerContext, MethodInfo)));
+ return selectors;
+ }
+
+ public override bool IsDefined(Type attributeType, bool inherit) {
+ return MethodInfo.IsDefined(attributeType, inherit);
+ }
+
+ private ParameterDescriptor[] LazilyFetchParametersCollection() {
+ return DescriptorUtil.LazilyFetchOrCreateDescriptors<ParameterInfo, ParameterDescriptor>(
+ ref _parametersCache /* cacheLocation */,
+ MethodInfo.GetParameters /* initializer */,
+ parameterInfo => new ReflectedParameterDescriptor(parameterInfo, this) /* converter */);
+ }
+
+ private static void MergeFiltersIntoList<TFilter>(IList<FilterAttribute> allFilters, IList<TFilter> destFilters) where TFilter : class {
+ foreach (FilterAttribute filter in allFilters) {
+ TFilter castFilter = filter as TFilter;
+ if (castFilter != null) {
+ destFilters.Add(castFilter);
+ }
+ }
+ }
+
+ internal static ReflectedActionDescriptor TryCreateDescriptor(MethodInfo methodInfo, string name, ControllerDescriptor controllerDescriptor) {
+ ReflectedActionDescriptor descriptor = new ReflectedActionDescriptor(methodInfo, name, controllerDescriptor, false /* validateMethod */);
+ string failedMessage = VerifyActionMethodIsCallable(methodInfo);
+ return (failedMessage == null) ? descriptor : null;
+ }
+
+ private static string VerifyActionMethodIsCallable(MethodInfo methodInfo) {
+ // we can't call instance methods where the 'this' parameter is a type other than ControllerBase
+ if (!methodInfo.IsStatic && !typeof(ControllerBase).IsAssignableFrom(methodInfo.ReflectedType)) {
+ return String.Format(CultureInfo.CurrentUICulture, MvcResources.ReflectedActionDescriptor_CannotCallInstanceMethodOnNonControllerType,
+ methodInfo, methodInfo.ReflectedType.FullName);
+ }
+
+ // we can't call methods with open generic type parameters
+ if (methodInfo.ContainsGenericParameters) {
+ return String.Format(CultureInfo.CurrentUICulture, MvcResources.ReflectedActionDescriptor_CannotCallOpenGenericMethods,
+ methodInfo, methodInfo.ReflectedType.FullName);
+ }
+
+ // we can't call methods with ref/out parameters
+ ParameterInfo[] parameterInfos = methodInfo.GetParameters();
+ foreach (ParameterInfo parameterInfo in parameterInfos) {
+ if (parameterInfo.IsOut || parameterInfo.ParameterType.IsByRef) {
+ return String.Format(CultureInfo.CurrentUICulture, MvcResources.ReflectedActionDescriptor_CannotCallMethodsWithOutOrRefParameters,
+ methodInfo, methodInfo.ReflectedType.FullName, parameterInfo);
+ }
+ }
+
+ // we can call this method
+ return null;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedControllerDescriptor.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedControllerDescriptor.cs
new file mode 100644
index 0000000..1863dd3
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedControllerDescriptor.cs
@@ -0,0 +1,91 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Reflection;
+ using System.Web.Mvc.Resources;
+
+ public class ReflectedControllerDescriptor : ControllerDescriptor {
+
+ private ActionDescriptor[] _canonicalActionsCache;
+ private readonly Type _controllerType;
+ private readonly ActionMethodSelector _selector;
+
+ public ReflectedControllerDescriptor(Type controllerType) {
+ if (controllerType == null) {
+ throw new ArgumentNullException("controllerType");
+ }
+
+ _controllerType = controllerType;
+ _selector = new ActionMethodSelector(_controllerType);
+ }
+
+ public sealed override Type ControllerType {
+ get {
+ return _controllerType;
+ }
+ }
+
+ public override ActionDescriptor FindAction(ControllerContext controllerContext, string actionName) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+ if (String.IsNullOrEmpty(actionName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "actionName");
+ }
+
+ MethodInfo matched = _selector.FindActionMethod(controllerContext, actionName);
+ if (matched == null) {
+ return null;
+ }
+
+ return new ReflectedActionDescriptor(matched, actionName, this);
+ }
+
+ private MethodInfo[] GetAllActionMethodsFromSelector() {
+ List<MethodInfo> allValidMethods = new List<MethodInfo>();
+ allValidMethods.AddRange(_selector.AliasedMethods);
+ allValidMethods.AddRange(_selector.NonAliasedMethods.SelectMany(g => g));
+ return allValidMethods.ToArray();
+ }
+
+ public override ActionDescriptor[] GetCanonicalActions() {
+ ActionDescriptor[] actions = LazilyFetchCanonicalActionsCollection();
+
+ // need to clone array so that user modifications aren't accidentally stored
+ return (ActionDescriptor[])actions.Clone();
+ }
+
+ public override object[] GetCustomAttributes(bool inherit) {
+ return ControllerType.GetCustomAttributes(inherit);
+ }
+
+ public override object[] GetCustomAttributes(Type attributeType, bool inherit) {
+ return ControllerType.GetCustomAttributes(attributeType, inherit);
+ }
+
+ public override bool IsDefined(Type attributeType, bool inherit) {
+ return ControllerType.IsDefined(attributeType, inherit);
+ }
+
+ private ActionDescriptor[] LazilyFetchCanonicalActionsCollection() {
+ return DescriptorUtil.LazilyFetchOrCreateDescriptors<MethodInfo, ActionDescriptor>(
+ ref _canonicalActionsCache /* cacheLocation */,
+ GetAllActionMethodsFromSelector /* initializer */,
+ methodInfo => ReflectedActionDescriptor.TryCreateDescriptor(methodInfo, methodInfo.Name, this) /* converter */);
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedParameterBindingInfo.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedParameterBindingInfo.cs
new file mode 100644
index 0000000..3ad299c
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedParameterBindingInfo.cs
@@ -0,0 +1,73 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using System.Globalization;
+ using System.Reflection;
+ using System.Web.Mvc.Resources;
+
+ internal class ReflectedParameterBindingInfo : ParameterBindingInfo {
+
+ private ICollection<string> _exclude = new string[0];
+ private ICollection<string> _include = new string[0];
+ private readonly ParameterInfo _parameterInfo;
+ private string _prefix;
+
+ public ReflectedParameterBindingInfo(ParameterInfo parameterInfo) {
+ _parameterInfo = parameterInfo;
+ ReadSettingsFromBindAttribute();
+ }
+
+ public override IModelBinder Binder {
+ get {
+ IModelBinder binder = ModelBinders.GetBinderFromAttributes(_parameterInfo,
+ () => String.Format(CultureInfo.CurrentUICulture, MvcResources.ReflectedParameterBindingInfo_MultipleConverterAttributes,
+ _parameterInfo.Name, _parameterInfo.Member));
+
+ return binder;
+ }
+ }
+
+ public override ICollection<string> Exclude {
+ get {
+ return _exclude;
+ }
+ }
+
+ public override ICollection<string> Include {
+ get {
+ return _include;
+ }
+ }
+
+ public override string Prefix {
+ get {
+ return _prefix;
+ }
+ }
+
+ private void ReadSettingsFromBindAttribute() {
+ BindAttribute attr = (BindAttribute)Attribute.GetCustomAttribute(_parameterInfo, typeof(BindAttribute));
+ if (attr == null) {
+ return;
+ }
+
+ _exclude = new ReadOnlyCollection<string>(AuthorizeAttribute.SplitString(attr.Exclude));
+ _include = new ReadOnlyCollection<string>(AuthorizeAttribute.SplitString(attr.Include));
+ _prefix = attr.Prefix;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedParameterDescriptor.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedParameterDescriptor.cs
new file mode 100644
index 0000000..dc8f60f
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ReflectedParameterDescriptor.cs
@@ -0,0 +1,77 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Reflection;
+
+ public class ReflectedParameterDescriptor : ParameterDescriptor {
+
+ private readonly ActionDescriptor _actionDescriptor;
+ private readonly ReflectedParameterBindingInfo _bindingInfo;
+
+ public ReflectedParameterDescriptor(ParameterInfo parameterInfo, ActionDescriptor actionDescriptor) {
+ if (parameterInfo == null) {
+ throw new ArgumentNullException("parameterInfo");
+ }
+ if (actionDescriptor == null) {
+ throw new ArgumentNullException("actionDescriptor");
+ }
+
+ ParameterInfo = parameterInfo;
+ _actionDescriptor = actionDescriptor;
+ _bindingInfo = new ReflectedParameterBindingInfo(parameterInfo);
+ }
+
+ public override ActionDescriptor ActionDescriptor {
+ get {
+ return _actionDescriptor;
+ }
+ }
+
+ public override ParameterBindingInfo BindingInfo {
+ get {
+ return _bindingInfo;
+ }
+ }
+
+ public ParameterInfo ParameterInfo {
+ get;
+ private set;
+ }
+
+ public override string ParameterName {
+ get {
+ return ParameterInfo.Name;
+ }
+ }
+
+ public override Type ParameterType {
+ get {
+ return ParameterInfo.ParameterType;
+ }
+ }
+
+ public override object[] GetCustomAttributes(bool inherit) {
+ return ParameterInfo.GetCustomAttributes(inherit);
+ }
+
+ public override object[] GetCustomAttributes(Type attributeType, bool inherit) {
+ return ParameterInfo.GetCustomAttributes(attributeType, inherit);
+ }
+
+ public override bool IsDefined(Type attributeType, bool inherit) {
+ return ParameterInfo.IsDefined(attributeType, inherit);
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Resources/MvcResources.Designer.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/Resources/MvcResources.Designer.cs
new file mode 100644
index 0000000..d564904
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Resources/MvcResources.Designer.cs
@@ -0,0 +1,477 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3053
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace System.Web.Mvc.Resources {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class MvcResources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal MvcResources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("System.Web.Mvc.Resources.MvcResources", typeof(MvcResources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The current request for action '{0}' on controller type '{1}' is ambiguous between the following action methods:{2}.
+ /// </summary>
+ internal static string ActionMethodSelector_AmbiguousMatch {
+ get {
+ return ResourceManager.GetString("ActionMethodSelector_AmbiguousMatch", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to {0} on type {1}.
+ /// </summary>
+ internal static string ActionMethodSelector_AmbiguousMatchType {
+ get {
+ return ResourceManager.GetString("ActionMethodSelector_AmbiguousMatchType", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to No route in the route table matches the supplied values..
+ /// </summary>
+ internal static string ActionRedirectResult_NoRouteMatched {
+ get {
+ return ResourceManager.GetString("ActionRedirectResult_NoRouteMatched", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to A required anti-forgery token was not supplied or was invalid..
+ /// </summary>
+ internal static string AntiForgeryToken_ValidationFailed {
+ get {
+ return ResourceManager.GetString("AntiForgeryToken_ValidationFailed", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The value '{0}' is outside the valid range of the enumeration type '{1}'..
+ /// </summary>
+ internal static string Common_InvalidEnumValue {
+ get {
+ return ResourceManager.GetString("Common_InvalidEnumValue", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Value cannot be null or empty..
+ /// </summary>
+ internal static string Common_NullOrEmpty {
+ get {
+ return ResourceManager.GetString("Common_NullOrEmpty", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The partial view '{0}' could not be found. The following locations were searched:{1}.
+ /// </summary>
+ internal static string Common_PartialViewNotFound {
+ get {
+ return ResourceManager.GetString("Common_PartialViewNotFound", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The property '{0}' cannot be null or empty..
+ /// </summary>
+ internal static string Common_PropertyCannotBeNullOrEmpty {
+ get {
+ return ResourceManager.GetString("Common_PropertyCannotBeNullOrEmpty", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The value '{0}' is invalid..
+ /// </summary>
+ internal static string Common_ValueNotValidForProperty {
+ get {
+ return ResourceManager.GetString("Common_ValueNotValidForProperty", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The view '{0}' or its master could not be found. The following locations were searched:{1}.
+ /// </summary>
+ internal static string Common_ViewNotFound {
+ get {
+ return ResourceManager.GetString("Common_ViewNotFound", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to A public action method '{0}' could not be found on controller '{1}'..
+ /// </summary>
+ internal static string Controller_UnknownAction {
+ get {
+ return ResourceManager.GetString("Controller_UnknownAction", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The model of type '{0}' was not successfully updated..
+ /// </summary>
+ internal static string Controller_UpdateModel_UpdateUnsuccessful {
+ get {
+ return ResourceManager.GetString("Controller_UpdateModel_UpdateUnsuccessful", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to There was an error creating the IControllerFactory '{0}'. Check that it has a public parameterless constructor..
+ /// </summary>
+ internal static string ControllerBuilder_ErrorCreatingControllerFactory {
+ get {
+ return ResourceManager.GetString("ControllerBuilder_ErrorCreatingControllerFactory", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The IControllerFactory '{0}' did not return a controller for a controller named '{1}'..
+ /// </summary>
+ internal static string ControllerBuilder_FactoryReturnedNull {
+ get {
+ return ResourceManager.GetString("ControllerBuilder_FactoryReturnedNull", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The controller factory type '{0}' must implement the IControllerFactory interface..
+ /// </summary>
+ internal static string ControllerBuilder_MissingIControllerFactory {
+ get {
+ return ResourceManager.GetString("ControllerBuilder_MissingIControllerFactory", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The controller name '{0}' is ambiguous between the following types:{1}.
+ /// </summary>
+ internal static string DefaultControllerFactory_ControllerNameAmbiguous {
+ get {
+ return ResourceManager.GetString("DefaultControllerFactory_ControllerNameAmbiguous", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to An error occurred while creating a controller of type '{0}'. If the controller doesn't have a controller factory, ensure that it has a parameterless public constructor..
+ /// </summary>
+ internal static string DefaultControllerFactory_ErrorCreatingController {
+ get {
+ return ResourceManager.GetString("DefaultControllerFactory_ErrorCreatingController", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The controller for path '{0}' could not be found or it does not implement IController..
+ /// </summary>
+ internal static string DefaultControllerFactory_NoControllerFound {
+ get {
+ return ResourceManager.GetString("DefaultControllerFactory_NoControllerFound", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The controller type '{0}' must implement IController..
+ /// </summary>
+ internal static string DefaultControllerFactory_TypeDoesNotSubclassControllerBase {
+ get {
+ return ResourceManager.GetString("DefaultControllerFactory_TypeDoesNotSubclassControllerBase", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to A value is required..
+ /// </summary>
+ internal static string DefaultModelBinder_ValueRequired {
+ get {
+ return ResourceManager.GetString("DefaultModelBinder_ValueRequired", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The total number of ticks for the TimeSpan must be greater than 0..
+ /// </summary>
+ internal static string DefaultViewLocationCache_NegativeTimeSpan {
+ get {
+ return ResourceManager.GetString("DefaultViewLocationCache_NegativeTimeSpan", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The type '{0}' does not inherit from Exception..
+ /// </summary>
+ internal static string ExceptionViewAttribute_NonExceptionType {
+ get {
+ return ResourceManager.GetString("ExceptionViewAttribute_NonExceptionType", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Order must be greater than or equal to -1..
+ /// </summary>
+ internal static string FilterAttribute_OrderOutOfRange {
+ get {
+ return ResourceManager.GetString("FilterAttribute_OrderOutOfRange", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to There is no ViewData item with the key '{0}' of type '{1}'..
+ /// </summary>
+ internal static string HtmlHelper_MissingSelectData {
+ get {
+ return ResourceManager.GetString("HtmlHelper_MissingSelectData", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The value must be greater than or equal to zero..
+ /// </summary>
+ internal static string HtmlHelper_TextAreaParameterOutOfRange {
+ get {
+ return ResourceManager.GetString("HtmlHelper_TextAreaParameterOutOfRange", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The ViewData item with the key '{0}' is of type '{1}' but needs to be of type '{2}'..
+ /// </summary>
+ internal static string HtmlHelper_WrongSelectDataType {
+ get {
+ return ResourceManager.GetString("HtmlHelper_WrongSelectDataType", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to There was an error creating the IModelBinder '{0}'. Check that it has a public parameterless constructor..
+ /// </summary>
+ internal static string ModelBinderAttribute_ErrorCreatingModelBinder {
+ get {
+ return ResourceManager.GetString("ModelBinderAttribute_ErrorCreatingModelBinder", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The type '{0}' does not implement the IModelBinder interface..
+ /// </summary>
+ internal static string ModelBinderAttribute_TypeNotIModelBinder {
+ get {
+ return ResourceManager.GetString("ModelBinderAttribute_TypeNotIModelBinder", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The type '{0}' contains multiple attributes inheriting from CustomModelBinderAttribute..
+ /// </summary>
+ internal static string ModelBinderDictionary_MultipleAttributes {
+ get {
+ return ResourceManager.GetString("ModelBinderDictionary_MultipleAttributes", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Cannot create a descriptor for instance method '{0}' on type '{1}' since the type does not subclass ControllerBase..
+ /// </summary>
+ internal static string ReflectedActionDescriptor_CannotCallInstanceMethodOnNonControllerType {
+ get {
+ return ResourceManager.GetString("ReflectedActionDescriptor_CannotCallInstanceMethodOnNonControllerType", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Cannot call action method '{0}' on controller '{1}' since the parameter '{2}' is passed by reference..
+ /// </summary>
+ internal static string ReflectedActionDescriptor_CannotCallMethodsWithOutOrRefParameters {
+ get {
+ return ResourceManager.GetString("ReflectedActionDescriptor_CannotCallMethodsWithOutOrRefParameters", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Cannot call action method '{0}' on controller '{1}' since it is a generic method..
+ /// </summary>
+ internal static string ReflectedActionDescriptor_CannotCallOpenGenericMethods {
+ get {
+ return ResourceManager.GetString("ReflectedActionDescriptor_CannotCallOpenGenericMethods", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The parameters dictionary contains a null entry for parameter '{0}' of non-nullable type '{1}' for method '{2}' in '{3}'. To make a parameter optional its type should be either a reference type or a Nullable type..
+ /// </summary>
+ internal static string ReflectedActionDescriptor_ParameterCannotBeNull {
+ get {
+ return ResourceManager.GetString("ReflectedActionDescriptor_ParameterCannotBeNull", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The parameters dictionary does not contain an entry for parameter '{0}' of type '{1}' for method '{2}' in '{3}'. The dictionary must contain an entry for each parameter, even parameters with null values..
+ /// </summary>
+ internal static string ReflectedActionDescriptor_ParameterNotInDictionary {
+ get {
+ return ResourceManager.GetString("ReflectedActionDescriptor_ParameterNotInDictionary", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The parameters dictionary contains an invalid entry for parameter '{0}' for method '{1}' in '{2}'. The dictionary contains a value of type '{3}', but the parameter requires a value of type '{4}'..
+ /// </summary>
+ internal static string ReflectedActionDescriptor_ParameterValueHasWrongType {
+ get {
+ return ResourceManager.GetString("ReflectedActionDescriptor_ParameterValueHasWrongType", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The parameter '{0}' on method '{1}' contains multiple attributes inheriting from CustomModelBinderAttribute..
+ /// </summary>
+ internal static string ReflectedParameterBindingInfo_MultipleConverterAttributes {
+ get {
+ return ResourceManager.GetString("ReflectedParameterBindingInfo_MultipleConverterAttributes", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The SessionStateTempDataProvider requires SessionState to be enabled..
+ /// </summary>
+ internal static string SessionStateTempDataProvider_SessionStateDisabled {
+ get {
+ return ResourceManager.GetString("SessionStateTempDataProvider_SessionStateDisabled", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The parameter conversion from type '{0}' to type '{1}' failed. See the inner exception for more information..
+ /// </summary>
+ internal static string ValueProviderResult_ConversionThrew {
+ get {
+ return ResourceManager.GetString("ValueProviderResult_ConversionThrew", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The parameter conversion from type '{0}' to type '{1}' failed because no TypeConverter can convert between these types..
+ /// </summary>
+ internal static string ValueProviderResult_NoConverterExists {
+ get {
+ return ResourceManager.GetString("ValueProviderResult_NoConverterExists", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The model item passed into the dictionary is of type '{0}' but this dictionary requires a model item of type '{1}'..
+ /// </summary>
+ internal static string ViewDataDictionary_WrongTModelType {
+ get {
+ return ResourceManager.GetString("ViewDataDictionary_WrongTModelType", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to A ViewMasterPage can only be used with content pages that derive from ViewPage or ViewPage<TViewItem>..
+ /// </summary>
+ internal static string ViewMasterPage_RequiresViewPage {
+ get {
+ return ResourceManager.GetString("ViewMasterPage_RequiresViewPage", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The ViewUserControl '{0}' cannot find an IViewDataContainer. The ViewUserControl must be inside a ViewPage, ViewMasterPage, or another ViewUserControl..
+ /// </summary>
+ internal static string ViewUserControl_RequiresViewDataProvider {
+ get {
+ return ResourceManager.GetString("ViewUserControl_RequiresViewDataProvider", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to A ViewUserControl can only be used inside pages that derive from ViewPage or ViewPage<TViewItem>..
+ /// </summary>
+ internal static string ViewUserControl_RequiresViewPage {
+ get {
+ return ResourceManager.GetString("ViewUserControl_RequiresViewPage", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to A master name cannot be specified when the view is a ViewUserControl..
+ /// </summary>
+ internal static string WebFormViewEngine_UserControlCannotHaveMaster {
+ get {
+ return ResourceManager.GetString("WebFormViewEngine_UserControlCannotHaveMaster", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The view found at '{0}' could not be created..
+ /// </summary>
+ internal static string WebFormViewEngine_ViewCouldNotBeCreated {
+ get {
+ return ResourceManager.GetString("WebFormViewEngine_ViewCouldNotBeCreated", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to The view at '{0}' must derive from ViewPage, ViewPage<TViewData>, ViewUserControl, or ViewUserControl<TViewData>..
+ /// </summary>
+ internal static string WebFormViewEngine_WrongViewBase {
+ get {
+ return ResourceManager.GetString("WebFormViewEngine_WrongViewBase", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/Resources/MvcResources.resx b/mcs/class/System.Web.Mvc/System.Web.Mvc/Resources/MvcResources.resx
new file mode 100644
index 0000000..fb940f7
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/Resources/MvcResources.resx
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="ActionMethodSelector_AmbiguousMatch" xml:space="preserve">
+ <value>The current request for action '{0}' on controller type '{1}' is ambiguous between the following action methods:{2}</value>
+ </data>
+ <data name="ActionRedirectResult_NoRouteMatched" xml:space="preserve">
+ <value>No route in the route table matches the supplied values.</value>
+ </data>
+ <data name="Common_InvalidEnumValue" xml:space="preserve">
+ <value>The value '{0}' is outside the valid range of the enumeration type '{1}'.</value>
+ </data>
+ <data name="Common_NullOrEmpty" xml:space="preserve">
+ <value>Value cannot be null or empty.</value>
+ </data>
+ <data name="Common_PartialViewNotFound" xml:space="preserve">
+ <value>The partial view '{0}' could not be found. The following locations were searched:{1}</value>
+ </data>
+ <data name="Common_PropertyCannotBeNullOrEmpty" xml:space="preserve">
+ <value>The property '{0}' cannot be null or empty.</value>
+ </data>
+ <data name="Common_ViewNotFound" xml:space="preserve">
+ <value>The view '{0}' or its master could not be found. The following locations were searched:{1}</value>
+ </data>
+ <data name="ControllerBuilder_ErrorCreatingControllerFactory" xml:space="preserve">
+ <value>There was an error creating the IControllerFactory '{0}'. Check that it has a public parameterless constructor.</value>
+ </data>
+ <data name="ControllerBuilder_FactoryReturnedNull" xml:space="preserve">
+ <value>The IControllerFactory '{0}' did not return a controller for a controller named '{1}'.</value>
+ </data>
+ <data name="ControllerBuilder_MissingIControllerFactory" xml:space="preserve">
+ <value>The controller factory type '{0}' must implement the IControllerFactory interface.</value>
+ </data>
+ <data name="Controller_UnknownAction" xml:space="preserve">
+ <value>A public action method '{0}' could not be found on controller '{1}'.</value>
+ </data>
+ <data name="DefaultControllerFactory_ControllerNameAmbiguous" xml:space="preserve">
+ <value>The controller name '{0}' is ambiguous between the following types:{1}</value>
+ </data>
+ <data name="DefaultControllerFactory_ErrorCreatingController" xml:space="preserve">
+ <value>An error occurred while creating a controller of type '{0}'. If the controller doesn't have a controller factory, ensure that it has a parameterless public constructor.</value>
+ </data>
+ <data name="DefaultControllerFactory_NoControllerFound" xml:space="preserve">
+ <value>The controller for path '{0}' could not be found or it does not implement IController.</value>
+ </data>
+ <data name="DefaultControllerFactory_TypeDoesNotSubclassControllerBase" xml:space="preserve">
+ <value>The controller type '{0}' must implement IController.</value>
+ </data>
+ <data name="ValueProviderResult_ConversionThrew" xml:space="preserve">
+ <value>The parameter conversion from type '{0}' to type '{1}' failed. See the inner exception for more information.</value>
+ </data>
+ <data name="ValueProviderResult_NoConverterExists" xml:space="preserve">
+ <value>The parameter conversion from type '{0}' to type '{1}' failed because no TypeConverter can convert between these types.</value>
+ </data>
+ <data name="ExceptionViewAttribute_NonExceptionType" xml:space="preserve">
+ <value>The type '{0}' does not inherit from Exception.</value>
+ </data>
+ <data name="FilterAttribute_OrderOutOfRange" xml:space="preserve">
+ <value>Order must be greater than or equal to -1.</value>
+ </data>
+ <data name="HtmlHelper_MissingSelectData" xml:space="preserve">
+ <value>There is no ViewData item with the key '{0}' of type '{1}'.</value>
+ </data>
+ <data name="HtmlHelper_TextAreaParameterOutOfRange" xml:space="preserve">
+ <value>The value must be greater than or equal to zero.</value>
+ </data>
+ <data name="HtmlHelper_WrongSelectDataType" xml:space="preserve">
+ <value>The ViewData item with the key '{0}' is of type '{1}' but needs to be of type '{2}'.</value>
+ </data>
+ <data name="ModelBinderAttribute_ErrorCreatingModelBinder" xml:space="preserve">
+ <value>There was an error creating the IModelBinder '{0}'. Check that it has a public parameterless constructor.</value>
+ </data>
+ <data name="ModelBinderAttribute_TypeNotIModelBinder" xml:space="preserve">
+ <value>The type '{0}' does not implement the IModelBinder interface.</value>
+ </data>
+ <data name="ModelBinderDictionary_MultipleAttributes" xml:space="preserve">
+ <value>The type '{0}' contains multiple attributes inheriting from CustomModelBinderAttribute.</value>
+ </data>
+ <data name="SessionStateTempDataProvider_SessionStateDisabled" xml:space="preserve">
+ <value>The SessionStateTempDataProvider requires SessionState to be enabled.</value>
+ </data>
+ <data name="ViewDataDictionary_WrongTModelType" xml:space="preserve">
+ <value>The model item passed into the dictionary is of type '{0}' but this dictionary requires a model item of type '{1}'.</value>
+ </data>
+ <data name="ViewMasterPage_RequiresViewPage" xml:space="preserve">
+ <value>A ViewMasterPage can only be used with content pages that derive from ViewPage or ViewPage<TViewItem>.</value>
+ </data>
+ <data name="ViewUserControl_RequiresViewDataProvider" xml:space="preserve">
+ <value>The ViewUserControl '{0}' cannot find an IViewDataContainer. The ViewUserControl must be inside a ViewPage, ViewMasterPage, or another ViewUserControl.</value>
+ </data>
+ <data name="ViewUserControl_RequiresViewPage" xml:space="preserve">
+ <value>A ViewUserControl can only be used inside pages that derive from ViewPage or ViewPage<TViewItem>.</value>
+ </data>
+ <data name="WebFormViewEngine_UserControlCannotHaveMaster" xml:space="preserve">
+ <value>A master name cannot be specified when the view is a ViewUserControl.</value>
+ </data>
+ <data name="WebFormViewEngine_ViewCouldNotBeCreated" xml:space="preserve">
+ <value>The view found at '{0}' could not be created.</value>
+ </data>
+ <data name="WebFormViewEngine_WrongViewBase" xml:space="preserve">
+ <value>The view at '{0}' must derive from ViewPage, ViewPage<TViewData>, ViewUserControl, or ViewUserControl<TViewData>.</value>
+ </data>
+ <data name="Common_ValueNotValidForProperty" xml:space="preserve">
+ <value>The value '{0}' is invalid.</value>
+ </data>
+ <data name="ActionMethodSelector_AmbiguousMatchType" xml:space="preserve">
+ <value>{0} on type {1}</value>
+ </data>
+ <data name="Controller_UpdateModel_UpdateUnsuccessful" xml:space="preserve">
+ <value>The model of type '{0}' was not successfully updated.</value>
+ </data>
+ <data name="DefaultModelBinder_ValueRequired" xml:space="preserve">
+ <value>A value is required.</value>
+ </data>
+ <data name="ReflectedActionDescriptor_ParameterCannotBeNull" xml:space="preserve">
+ <value>The parameters dictionary contains a null entry for parameter '{0}' of non-nullable type '{1}' for method '{2}' in '{3}'. To make a parameter optional its type should be either a reference type or a Nullable type.</value>
+ </data>
+ <data name="ReflectedActionDescriptor_ParameterNotInDictionary" xml:space="preserve">
+ <value>The parameters dictionary does not contain an entry for parameter '{0}' of type '{1}' for method '{2}' in '{3}'. The dictionary must contain an entry for each parameter, even parameters with null values.</value>
+ </data>
+ <data name="ReflectedActionDescriptor_ParameterValueHasWrongType" xml:space="preserve">
+ <value>The parameters dictionary contains an invalid entry for parameter '{0}' for method '{1}' in '{2}'. The dictionary contains a value of type '{3}', but the parameter requires a value of type '{4}'.</value>
+ </data>
+ <data name="ReflectedParameterBindingInfo_MultipleConverterAttributes" xml:space="preserve">
+ <value>The parameter '{0}' on method '{1}' contains multiple attributes inheriting from CustomModelBinderAttribute.</value>
+ </data>
+ <data name="ReflectedActionDescriptor_CannotCallInstanceMethodOnNonControllerType" xml:space="preserve">
+ <value>Cannot create a descriptor for instance method '{0}' on type '{1}' since the type does not subclass ControllerBase.</value>
+ </data>
+ <data name="ReflectedActionDescriptor_CannotCallMethodsWithOutOrRefParameters" xml:space="preserve">
+ <value>Cannot call action method '{0}' on controller '{1}' since the parameter '{2}' is passed by reference.</value>
+ </data>
+ <data name="ReflectedActionDescriptor_CannotCallOpenGenericMethods" xml:space="preserve">
+ <value>Cannot call action method '{0}' on controller '{1}' since it is a generic method.</value>
+ </data>
+ <data name="DefaultViewLocationCache_NegativeTimeSpan" xml:space="preserve">
+ <value>The total number of ticks for the TimeSpan must be greater than 0.</value>
+ </data>
+ <data name="AntiForgeryToken_ValidationFailed" xml:space="preserve">
+ <value>A required anti-forgery token was not supplied or was invalid.</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ResultExecutedContext.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ResultExecutedContext.cs
new file mode 100644
index 0000000..722880f
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ResultExecutedContext.cs
@@ -0,0 +1,57 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+
+ public class ResultExecutedContext : ControllerContext {
+
+ // parameterless constructor used for mocking
+ public ResultExecutedContext() {
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
+ Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]
+ public ResultExecutedContext(ControllerContext controllerContext, ActionResult result, bool canceled, Exception exception)
+ : base(controllerContext) {
+ if (result == null) {
+ throw new ArgumentNullException("result");
+ }
+
+ Result = result;
+ Canceled = canceled;
+ Exception = exception;
+ }
+
+ public virtual bool Canceled {
+ get;
+ set;
+ }
+
+ public virtual Exception Exception {
+ get;
+ set;
+ }
+
+ public bool ExceptionHandled {
+ get;
+ set;
+ }
+
+ public virtual ActionResult Result {
+ get;
+ set;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ResultExecutingContext.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ResultExecutingContext.cs
new file mode 100644
index 0000000..ec4881a
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ResultExecutingContext.cs
@@ -0,0 +1,45 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+
+ public class ResultExecutingContext : ControllerContext {
+
+ // parameterless constructor used for mocking
+ public ResultExecutingContext() {
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
+ Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]
+ public ResultExecutingContext(ControllerContext controllerContext, ActionResult result)
+ : base(controllerContext) {
+ if (result == null) {
+ throw new ArgumentNullException("result");
+ }
+
+ Result = result;
+ }
+
+ public bool Cancel {
+ get;
+ set;
+ }
+
+ public virtual ActionResult Result {
+ get;
+ set;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/RouteCollectionExtensions.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/RouteCollectionExtensions.cs
new file mode 100644
index 0000000..9575e12
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/RouteCollectionExtensions.cs
@@ -0,0 +1,110 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Web.Routing;
+
+ public static class RouteCollectionExtensions {
+
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "1#",
+ Justification = "This is not a regular URL as it may contain special routing characters.")]
+ public static void IgnoreRoute(this RouteCollection routes, string url) {
+ IgnoreRoute(routes, url, null /* constraints */);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "1#",
+ Justification = "This is not a regular URL as it may contain special routing characters.")]
+ public static void IgnoreRoute(this RouteCollection routes, string url, object constraints) {
+ if (routes == null) {
+ throw new ArgumentNullException("routes");
+ }
+ if (url == null) {
+ throw new ArgumentNullException("url");
+ }
+
+ IgnoreRouteInternal route = new IgnoreRouteInternal(url) {
+ Constraints = new RouteValueDictionary(constraints)
+ };
+
+ routes.Add(route);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "2#",
+ Justification = "This is not a regular URL as it may contain special routing characters.")]
+ public static Route MapRoute(this RouteCollection routes, string name, string url) {
+ return MapRoute(routes, name, url, null /* defaults */, (object)null /* constraints */);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "2#",
+ Justification = "This is not a regular URL as it may contain special routing characters.")]
+ public static Route MapRoute(this RouteCollection routes, string name, string url, object defaults) {
+ return MapRoute(routes, name, url, defaults, (object)null /* constraints */);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "2#",
+ Justification = "This is not a regular URL as it may contain special routing characters.")]
+ public static Route MapRoute(this RouteCollection routes, string name, string url, object defaults, object constraints) {
+ return MapRoute(routes, name, url, defaults, constraints, null /* namespaces */);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "2#",
+ Justification = "This is not a regular URL as it may contain special routing characters.")]
+ public static Route MapRoute(this RouteCollection routes, string name, string url, string[] namespaces) {
+ return MapRoute(routes, name, url, null /* defaults */, null /* constraints */, namespaces);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "2#",
+ Justification = "This is not a regular URL as it may contain special routing characters.")]
+ public static Route MapRoute(this RouteCollection routes, string name, string url, object defaults, string[] namespaces) {
+ return MapRoute(routes, name, url, defaults, null /* constraints */, namespaces);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "2#",
+ Justification = "This is not a regular URL as it may contain special routing characters.")]
+ public static Route MapRoute(this RouteCollection routes, string name, string url, object defaults, object constraints, string[] namespaces) {
+ if (routes == null) {
+ throw new ArgumentNullException("routes");
+ }
+ if (url == null) {
+ throw new ArgumentNullException("url");
+ }
+
+ Route route = new Route(url, new MvcRouteHandler()) {
+ Defaults = new RouteValueDictionary(defaults),
+ Constraints = new RouteValueDictionary(constraints)
+ };
+
+ if ((namespaces != null) && (namespaces.Length > 0)) {
+ route.DataTokens = new RouteValueDictionary();
+ route.DataTokens["Namespaces"] = namespaces;
+ }
+
+ routes.Add(name, route);
+
+ return route;
+ }
+
+ private sealed class IgnoreRouteInternal : Route {
+ public IgnoreRouteInternal(string url)
+ : base(url, new StopRoutingHandler()) {
+ }
+
+ public override VirtualPathData GetVirtualPath(RequestContext requestContext, RouteValueDictionary routeValues) {
+ // Never match during route generation. This avoids the scenario where an IgnoreRoute with
+ // fairly relaxed constraints ends up eagerly matching all generated URLs.
+ return null;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/RouteValuesHelpers.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/RouteValuesHelpers.cs
new file mode 100644
index 0000000..3a0283b
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/RouteValuesHelpers.cs
@@ -0,0 +1,61 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Collections.Generic;
+ using System.Web.Routing;
+
+ internal static class RouteValuesHelpers {
+ public static RouteValueDictionary GetRouteValues(RouteValueDictionary routeValues) {
+ return (routeValues != null) ? new RouteValueDictionary(routeValues) : new RouteValueDictionary();
+ }
+
+ public static RouteValueDictionary MergeRouteValues(string actionName, string controllerName, RouteValueDictionary implicitRouteValues, RouteValueDictionary routeValues, bool includeImplicitMvcValues) {
+ // Create a new dictionary containing implicit and auto-generated values
+ RouteValueDictionary mergedRouteValues = new RouteValueDictionary();
+
+ if (includeImplicitMvcValues) {
+ // We only include MVC-specific values like 'controller' and 'action' if we are generating an action link.
+ // If we are generating a route link [as to MapRoute("Foo", "any/url", new { controller = ... })], including
+ // the current controller name will cause the route match to fail if the current controller is not the same
+ // as the destination controller.
+
+ object implicitValue;
+ if (implicitRouteValues != null && implicitRouteValues.TryGetValue("action", out implicitValue)) {
+ mergedRouteValues["action"] = implicitValue;
+ }
+
+ if (implicitRouteValues != null && implicitRouteValues.TryGetValue("controller", out implicitValue)) {
+ mergedRouteValues["controller"] = implicitValue;
+ }
+ }
+
+ // Merge values from the user's dictionary/object
+ if (routeValues != null) {
+ foreach (KeyValuePair<string, object> routeElement in GetRouteValues(routeValues)) {
+ mergedRouteValues[routeElement.Key] = routeElement.Value;
+ }
+ }
+
+ // Merge explicit parameters when not null
+ if (actionName != null) {
+ mergedRouteValues["action"] = actionName;
+ }
+
+ if (controllerName != null) {
+ mergedRouteValues["controller"] = controllerName;
+ }
+
+ return mergedRouteValues;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/SelectList.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/SelectList.cs
new file mode 100644
index 0000000..c7100a8
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/SelectList.cs
@@ -0,0 +1,46 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Collections;
+ using System.Diagnostics.CodeAnalysis;
+
+ [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
+ public class SelectList : MultiSelectList {
+
+ public SelectList(IEnumerable items)
+ : this(items, null /* selectedValue */) {
+ }
+
+ public SelectList(IEnumerable items, object selectedValue)
+ : this(items, null /* dataValuefield */, null /* dataTextField */, selectedValue) {
+ }
+
+ public SelectList(IEnumerable items, string dataValueField, string dataTextField)
+ : this(items, dataValueField, dataTextField, null /* selectedValue */) {
+ }
+
+ public SelectList(IEnumerable items, string dataValueField, string dataTextField, object selectedValue)
+ : base(items, dataValueField, dataTextField, ToEnumerable(selectedValue)) {
+ SelectedValue = selectedValue;
+ }
+
+ public object SelectedValue {
+ get;
+ private set;
+ }
+
+ private static IEnumerable ToEnumerable(object selectedValue) {
+ return (selectedValue != null) ? new object[] { selectedValue } : null;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/SelectListItem.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/SelectListItem.cs
new file mode 100644
index 0000000..bda4335
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/SelectListItem.cs
@@ -0,0 +1,32 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public class SelectListItem {
+
+ public bool Selected {
+ get;
+ set;
+ }
+
+ public string Text {
+ get;
+ set;
+ }
+
+ public string Value {
+ get;
+ set;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/SessionStateTempDataProvider.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/SessionStateTempDataProvider.cs
new file mode 100644
index 0000000..33fcbbb
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/SessionStateTempDataProvider.cs
@@ -0,0 +1,50 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Web.Mvc.Resources;
+
+ public class SessionStateTempDataProvider : ITempDataProvider {
+ internal const string TempDataSessionStateKey = "__ControllerTempData";
+
+ public virtual IDictionary<string, object> LoadTempData(ControllerContext controllerContext) {
+ HttpContextBase httpContext = controllerContext.HttpContext;
+
+ if (httpContext.Session == null) {
+ throw new InvalidOperationException(MvcResources.SessionStateTempDataProvider_SessionStateDisabled);
+ }
+
+ Dictionary<string, object> tempDataDictionary = httpContext.Session[TempDataSessionStateKey] as Dictionary<string, object>;
+
+ if (tempDataDictionary != null) {
+ // If we got it from Session, remove it so that no other request gets it
+ httpContext.Session.Remove(TempDataSessionStateKey);
+ return tempDataDictionary;
+ }
+ else {
+ return new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
+ }
+ }
+
+ public virtual void SaveTempData(ControllerContext controllerContext, IDictionary<string, object> values) {
+ HttpContextBase httpContext = controllerContext.HttpContext;
+
+ if (httpContext.Session == null) {
+ throw new InvalidOperationException(MvcResources.SessionStateTempDataProvider_SessionStateDisabled);
+ }
+
+ httpContext.Session[TempDataSessionStateKey] = values;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/TagBuilder.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/TagBuilder.cs
new file mode 100644
index 0000000..c36233c
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/TagBuilder.cs
@@ -0,0 +1,150 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Text;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+
+ public class TagBuilder {
+ private string _idAttributeDotReplacement;
+
+ private const string _attributeFormat = @" {0}=""{1}""";
+ private const string _elementFormatEndTag = "</{0}>";
+ private const string _elementFormatNormal = "<{0}{1}>{2}</{0}>";
+ private const string _elementFormatSelfClosing = "<{0}{1} />";
+ private const string _elementFormatStartTag = "<{0}{1}>";
+
+ private string _innerHtml;
+
+ public TagBuilder(string tagName) {
+ if (String.IsNullOrEmpty(tagName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "tagName");
+ }
+
+ TagName = tagName;
+ Attributes = new SortedDictionary<string, string>(StringComparer.Ordinal);
+ }
+
+ public IDictionary<string, string> Attributes {
+ get;
+ private set;
+ }
+
+ public string IdAttributeDotReplacement {
+ get {
+ if (String.IsNullOrEmpty(_idAttributeDotReplacement)) {
+ _idAttributeDotReplacement = HtmlHelper.IdAttributeDotReplacement;
+ }
+ return _idAttributeDotReplacement;
+ }
+ set {
+ _idAttributeDotReplacement = value;
+ }
+ }
+
+ public string InnerHtml {
+ get {
+ return _innerHtml ?? String.Empty;
+ }
+ set {
+ _innerHtml = value;
+ }
+ }
+
+ public string TagName {
+ get;
+ private set;
+ }
+
+ public void AddCssClass(string value) {
+ string currentValue;
+
+ if (Attributes.TryGetValue("class", out currentValue)) {
+ Attributes["class"] = value + " " + currentValue;
+ }
+ else {
+ Attributes["class"] = value;
+ }
+ }
+
+ public void GenerateId(string name) {
+ if (!String.IsNullOrEmpty(name)) {
+ MergeAttribute("id", name.Replace(".", IdAttributeDotReplacement));
+ }
+ }
+
+ private string GetAttributesString() {
+ StringBuilder sb = new StringBuilder();
+ foreach (var attribute in Attributes) {
+ string key = attribute.Key;
+ string value = HttpUtility.HtmlAttributeEncode(attribute.Value);
+ sb.AppendFormat(CultureInfo.InvariantCulture, _attributeFormat, key, value);
+ }
+ return sb.ToString();
+ }
+
+ public void MergeAttribute(string key, string value) {
+ MergeAttribute(key, value, false /* replaceExisting */);
+ }
+
+ public void MergeAttribute(string key, string value, bool replaceExisting) {
+ if (String.IsNullOrEmpty(key)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "key");
+ }
+
+ if (replaceExisting || !Attributes.ContainsKey(key)) {
+ Attributes[key] = value;
+ }
+ }
+
+ public void MergeAttributes<TKey, TValue>(IDictionary<TKey, TValue> attributes) {
+ MergeAttributes(attributes, false /* replaceExisting */);
+ }
+
+ public void MergeAttributes<TKey, TValue>(IDictionary<TKey, TValue> attributes, bool replaceExisting) {
+ if (attributes != null) {
+ foreach (var entry in attributes) {
+ string key = Convert.ToString(entry.Key, CultureInfo.InvariantCulture);
+ string value = Convert.ToString(entry.Value, CultureInfo.InvariantCulture);
+ MergeAttribute(key, value, replaceExisting);
+ }
+ }
+ }
+
+ public void SetInnerText(string innerText) {
+ InnerHtml = HttpUtility.HtmlEncode(innerText);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public override string ToString() {
+ return ToString(TagRenderMode.Normal);
+ }
+
+ public string ToString(TagRenderMode renderMode) {
+ switch (renderMode) {
+ case TagRenderMode.StartTag:
+ return String.Format(CultureInfo.InvariantCulture, _elementFormatStartTag, TagName, GetAttributesString());
+ case TagRenderMode.EndTag:
+ return String.Format(CultureInfo.InvariantCulture, _elementFormatEndTag, TagName);
+ case TagRenderMode.SelfClosing:
+ return String.Format(CultureInfo.InvariantCulture, _elementFormatSelfClosing, TagName, GetAttributesString());
+ default:
+ return String.Format(CultureInfo.InvariantCulture, _elementFormatNormal, TagName, GetAttributesString(), InnerHtml);
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/TagRenderMode.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/TagRenderMode.cs
new file mode 100644
index 0000000..2169670
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/TagRenderMode.cs
@@ -0,0 +1,20 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ public enum TagRenderMode {
+ Normal,
+ StartTag,
+ EndTag,
+ SelfClosing
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/TempDataDictionary.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/TempDataDictionary.cs
new file mode 100644
index 0000000..d42d893
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/TempDataDictionary.cs
@@ -0,0 +1,208 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Runtime.Serialization;
+
+ [Serializable]
+ public class TempDataDictionary : IDictionary<string, object>, ISerializable {
+ internal const string _tempDataSerializationKey = "__tempData";
+
+ internal Dictionary<string, object> _data;
+ private HashSet<string> _initialKeys;
+ private HashSet<string> _modifiedKeys;
+
+ public TempDataDictionary() {
+ _initialKeys = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
+ _modifiedKeys = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
+ _data = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
+ }
+
+ protected TempDataDictionary(SerializationInfo info, StreamingContext context) {
+ _initialKeys = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
+ _modifiedKeys = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
+ _data = info.GetValue(_tempDataSerializationKey, typeof(Dictionary<string, object>)) as Dictionary<string, object>;
+ }
+
+ public int Count {
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ get {
+ return _data.Count;
+ }
+ }
+
+ public Dictionary<string, object>.KeyCollection Keys {
+ get {
+ return _data.Keys;
+ }
+ }
+
+ public void Load(ControllerContext controllerContext, ITempDataProvider tempDataProvider) {
+ IDictionary<string, object> providerDictionary = tempDataProvider.LoadTempData(controllerContext);
+ _data = (providerDictionary != null) ? new Dictionary<string, object>(providerDictionary, StringComparer.OrdinalIgnoreCase) :
+ new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
+ _initialKeys = new HashSet<string>(_data.Keys);
+ _modifiedKeys.Clear();
+ }
+
+ public void Save(ControllerContext controllerContext, ITempDataProvider tempDataProvider) {
+ if (_modifiedKeys.Count > 0) {
+
+ // Apply change tracking.
+ foreach (string x in _initialKeys) {
+ if (!_modifiedKeys.Contains(x)) {
+ _data.Remove(x);
+ }
+ }
+
+ // Store the dictionary
+ tempDataProvider.SaveTempData(controllerContext, _data);
+ }
+ }
+
+ public Dictionary<string, object>.ValueCollection Values {
+ get {
+ return _data.Values;
+ }
+ }
+
+ public object this[string key] {
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ get {
+ object value;
+ if (TryGetValue(key, out value)) {
+ return value;
+ }
+ return null;
+ }
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ set {
+ _data[key] = value;
+ _modifiedKeys.Add(key);
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Add(string key, object value) {
+ _data.Add(key, value);
+ _modifiedKeys.Add(key);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Clear() {
+ _data.Clear();
+ _modifiedKeys.Clear();
+ _initialKeys.Clear();
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool ContainsKey(string key) {
+ return _data.ContainsKey(key);
+ }
+
+ public bool ContainsValue(object value) {
+ return _data.ContainsValue(value);
+ }
+
+ public Dictionary<string, object>.Enumerator GetEnumerator() {
+ return _data.GetEnumerator();
+ }
+
+ protected virtual void GetObjectData(SerializationInfo info, StreamingContext context) {
+ info.AddValue(_tempDataSerializationKey, _data);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Remove(string key) {
+ _initialKeys.Remove(key);
+ _modifiedKeys.Remove(key);
+ return _data.Remove(key);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool TryGetValue(string key, out object value) {
+ return _data.TryGetValue(key, out value);
+ }
+
+ #region IDictionary<string, object> Implementation
+ ICollection<string> IDictionary<string, object>.Keys {
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ get {
+ return ((IDictionary<string, object>)_data).Keys;
+ }
+ }
+
+ ICollection<object> IDictionary<string, object>.Values {
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ get {
+ return ((IDictionary<string, object>)_data).Values;
+ }
+ }
+ #endregion
+
+ #region IEnumerable<KeyValuePair<string, object>> Implementation
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator() {
+ return ((IEnumerable<KeyValuePair<string, object>>)_data).GetEnumerator();
+ }
+ #endregion
+
+ #region ICollection<KeyValuePair<string, object>> Implementation
+ bool ICollection<KeyValuePair<string, object>>.IsReadOnly {
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ get {
+ return ((ICollection<KeyValuePair<string, object>>)_data).IsReadOnly;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int index) {
+ ((ICollection<KeyValuePair<string, object>>)_data).CopyTo(array, index);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> keyValuePair) {
+ _modifiedKeys.Add(keyValuePair.Key);
+ ((ICollection<KeyValuePair<string, object>>)_data).Add(keyValuePair);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> keyValuePair) {
+ return ((ICollection<KeyValuePair<string, object>>)_data).Contains(keyValuePair);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> keyValuePair) {
+ _modifiedKeys.Remove(keyValuePair.Key);
+ return ((ICollection<KeyValuePair<string, object>>)_data).Remove(keyValuePair);
+ }
+ #endregion
+
+ #region IEnumerable Implementation
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ IEnumerator IEnumerable.GetEnumerator() {
+ return ((IEnumerable)_data).GetEnumerator();
+ }
+ #endregion
+
+ #region ISerializable Members
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) {
+ GetObjectData(info, context);
+ }
+ #endregion
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/TypeHelpers.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/TypeHelpers.cs
new file mode 100644
index 0000000..615d712
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/TypeHelpers.cs
@@ -0,0 +1,35 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+
+ internal static class TypeHelpers {
+
+ public static bool TypeAllowsNullValue(Type type) {
+ // reference types allow null values
+ if (!type.IsValueType) {
+ return true;
+ }
+
+ // nullable value types allow null values
+ // code lifted from System.Nullable.GetUnderlyingType()
+ if (type.IsGenericType && !type.IsGenericTypeDefinition && (type.GetGenericTypeDefinition() == typeof(Nullable<>))) {
+ return true;
+ }
+
+ // no other types allow null values
+ return false;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/UrlHelper.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/UrlHelper.cs
new file mode 100644
index 0000000..88c1c27
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/UrlHelper.cs
@@ -0,0 +1,191 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Web.Mvc.Resources;
+ using System.Web.Routing;
+
+ public class UrlHelper {
+ public UrlHelper(RequestContext requestContext)
+ : this(requestContext, RouteTable.Routes) {
+ }
+
+ public UrlHelper(RequestContext requestContext, RouteCollection routeCollection) {
+ if (requestContext == null) {
+ throw new ArgumentNullException("requestContext");
+ }
+ if (routeCollection == null) {
+ throw new ArgumentNullException("routeCollection");
+ }
+ RequestContext = requestContext;
+ RouteCollection = routeCollection;
+ }
+
+ public RequestContext RequestContext {
+ get;
+ private set;
+ }
+
+ public RouteCollection RouteCollection {
+ get;
+ private set;
+ }
+
+ public string Action(string actionName) {
+ return GenerateUrl(null /* routeName */, actionName, null, (RouteValueDictionary)null /* routeValues */);
+ }
+
+ public string Action(string actionName, object routeValues) {
+ return GenerateUrl(null /* routeName */, actionName, null /* controllerName */, new RouteValueDictionary(routeValues));
+ }
+
+ public string Action(string actionName, RouteValueDictionary routeValues) {
+ return GenerateUrl(null /* routeName */, actionName, null /* controllerName */, routeValues);
+ }
+
+ public string Action(string actionName, string controllerName) {
+ return GenerateUrl(null /* routeName */, actionName, controllerName, (RouteValueDictionary)null /* routeValues */);
+ }
+
+ public string Action(string actionName, string controllerName, object routeValues) {
+ return GenerateUrl(null /* routeName */, actionName, controllerName, new RouteValueDictionary(routeValues));
+ }
+
+ public string Action(string actionName, string controllerName, RouteValueDictionary routeValues) {
+ return GenerateUrl(null /* routeName */, actionName, controllerName, routeValues);
+ }
+
+ public string Action(string actionName, string controllerName, object routeValues, string protocol) {
+ return GenerateUrl(null /* routeName */, actionName, controllerName, protocol, null /* hostName */, null /* fragment */, new RouteValueDictionary(routeValues), RouteCollection, RequestContext, true /* includeImplicitMvcValues */);
+ }
+
+ public string Action(string actionName, string controllerName, RouteValueDictionary routeValues, string protocol, string hostName) {
+ return GenerateUrl(null /* routeName */, actionName, controllerName, protocol, hostName, null /* fragment */, routeValues, RouteCollection, RequestContext, true /* includeImplicitMvcValues */);
+ }
+
+ public string Content(string contentPath) {
+ return Content(contentPath, RequestContext.HttpContext);
+ }
+
+ internal static string Content(string contentPath, HttpContextBase httpContext) {
+ if (String.IsNullOrEmpty(contentPath)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "contentPath");
+ }
+
+ if (contentPath[0] == '~') {
+ return PathHelpers.GenerateClientUrl(httpContext, contentPath);
+ }
+ else {
+ return contentPath;
+ }
+ }
+
+ //REVIEW: Should we have an overload that takes Uri?
+ [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings",
+ Justification = "As the return value will used only for rendering, string return value is more appropriate.")]
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings",
+ Justification = "Needs to take same parameters as HttpUtility.UrlEncode()")]
+ [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic",
+ Justification = "For consistency, all helpers are instance methods.")]
+ public string Encode(string url) {
+ return HttpUtility.UrlEncode(url);
+ }
+
+ private string GenerateUrl(string routeName, string actionName, string controllerName, RouteValueDictionary routeValues) {
+ return GenerateUrl(routeName, actionName, controllerName, routeValues, RouteCollection, RequestContext, true /* includeImplicitMvcValues */);
+ }
+
+ internal static string GenerateUrl(string routeName, string actionName, string controllerName, string protocol, string hostName, string fragment, RouteValueDictionary routeValues, RouteCollection routeCollection, RequestContext requestContext, bool includeImplicitMvcValues) {
+ string url = GenerateUrl(routeName, actionName, controllerName, routeValues, routeCollection, requestContext, includeImplicitMvcValues);
+
+ if (url != null) {
+ if (!String.IsNullOrEmpty(fragment)) {
+ url = url + "#" + fragment;
+ }
+
+ if (!String.IsNullOrEmpty(protocol) || !String.IsNullOrEmpty(hostName)) {
+ Uri requestUrl = requestContext.HttpContext.Request.Url;
+ protocol = (!String.IsNullOrEmpty(protocol)) ? protocol : Uri.UriSchemeHttp;
+ hostName = (!String.IsNullOrEmpty(hostName)) ? hostName : requestUrl.Host;
+
+ string port = String.Empty;
+ string requestProtocol = requestUrl.Scheme;
+
+ if (String.Equals(protocol, requestProtocol, StringComparison.OrdinalIgnoreCase)) {
+ port = requestUrl.IsDefaultPort ? String.Empty : (":" + Convert.ToString(requestUrl.Port, CultureInfo.InvariantCulture));
+ }
+
+ url = protocol + Uri.SchemeDelimiter + hostName + port + url;
+ }
+ }
+
+ return url;
+ }
+
+ internal static string GenerateUrl(string routeName, string actionName, string controllerName, RouteValueDictionary routeValues, RouteCollection routeCollection, RequestContext requestContext, bool includeImplicitMvcValues) {
+ RouteValueDictionary mergedRouteValues = RouteValuesHelpers.MergeRouteValues(actionName, controllerName, requestContext.RouteData.Values, routeValues, includeImplicitMvcValues);
+
+ VirtualPathData vpd = routeCollection.GetVirtualPath(requestContext, routeName, mergedRouteValues);
+ if (vpd == null) {
+ return null;
+ }
+
+ string modifiedUrl = PathHelpers.GenerateClientUrl(requestContext.HttpContext, vpd.VirtualPath);
+ return modifiedUrl;
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings",
+ Justification = "As the return value will used only for rendering, string return value is more appropriate.")]
+ public string RouteUrl(object routeValues) {
+ return RouteUrl(null /* routeName */, routeValues);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings",
+ Justification = "As the return value will used only for rendering, string return value is more appropriate.")]
+ public string RouteUrl(RouteValueDictionary routeValues) {
+ return RouteUrl(null /* routeName */, routeValues);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings",
+ Justification = "As the return value will used only for rendering, string return value is more appropriate.")]
+ public string RouteUrl(string routeName) {
+ return RouteUrl(routeName, (object)null /* routeValues */);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings",
+ Justification = "As the return value will used only for rendering, string return value is more appropriate.")]
+ public string RouteUrl(string routeName, object routeValues) {
+ return RouteUrl(routeName, routeValues, null /* protocol */);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings",
+ Justification = "As the return value will used only for rendering, string return value is more appropriate.")]
+ public string RouteUrl(string routeName, RouteValueDictionary routeValues) {
+ return RouteUrl(routeName, routeValues, null /* protocol */, null /* hostName */);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings",
+ Justification = "As the return value will used only for rendering, string return value is more appropriate.")]
+ public string RouteUrl(string routeName, object routeValues, string protocol) {
+ return GenerateUrl(routeName, null /* actionName */, null /* controllerName */, protocol, null /* hostName */, null /* fragment */, new RouteValueDictionary(routeValues), RouteCollection, RequestContext, false /* includeImplicitMvcValues */);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings",
+ Justification = "As the return value will used only for rendering, string return value is more appropriate.")]
+ public string RouteUrl(string routeName, RouteValueDictionary routeValues, string protocol, string hostName) {
+ return GenerateUrl(routeName, null /* actionName */, null /* controllerName */, protocol, hostName, null /* fragment */, routeValues, RouteCollection, RequestContext, false /* includeImplicitMvcValues */);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ValidateAntiForgeryTokenAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ValidateAntiForgeryTokenAttribute.cs
new file mode 100644
index 0000000..0f494fc
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ValidateAntiForgeryTokenAttribute.cs
@@ -0,0 +1,87 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Web;
+ using System.Web.Mvc.Resources;
+
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
+ public sealed class ValidateAntiForgeryTokenAttribute : FilterAttribute, IAuthorizationFilter {
+
+ private string _salt;
+ private AntiForgeryDataSerializer _serializer;
+
+ public string Salt {
+ get {
+ return _salt ?? String.Empty;
+ }
+ set {
+ _salt = value;
+ }
+ }
+
+ internal AntiForgeryDataSerializer Serializer {
+ get {
+ if (_serializer == null) {
+ _serializer = new AntiForgeryDataSerializer();
+ }
+ return _serializer;
+ }
+ set {
+ _serializer = value;
+ }
+ }
+
+ private bool ValidateFormToken(AntiForgeryData token) {
+ return (String.Equals(Salt, token.Salt, StringComparison.Ordinal));
+ }
+
+ private static HttpAntiForgeryException CreateValidationException() {
+ return new HttpAntiForgeryException(MvcResources.AntiForgeryToken_ValidationFailed);
+ }
+
+ public void OnAuthorization(AuthorizationContext filterContext) {
+ if (filterContext == null) {
+ throw new ArgumentNullException("filterContext");
+ }
+
+ string fieldName = AntiForgeryData.GetAntiForgeryTokenName(null);
+ string cookieName = AntiForgeryData.GetAntiForgeryTokenName(filterContext.HttpContext.Request.ApplicationPath);
+
+ HttpCookie cookie = filterContext.HttpContext.Request.Cookies[cookieName];
+ if (cookie == null || String.IsNullOrEmpty(cookie.Value)) {
+ // error: cookie token is missing
+ throw CreateValidationException();
+ }
+ AntiForgeryData cookieToken = Serializer.Deserialize(cookie.Value);
+
+ string formValue = filterContext.HttpContext.Request.Form[fieldName];
+ if (String.IsNullOrEmpty(formValue)) {
+ // error: form token is missing
+ throw CreateValidationException();
+ }
+ AntiForgeryData formToken = Serializer.Deserialize(formValue);
+
+ if (!String.Equals(cookieToken.Value, formToken.Value, StringComparison.Ordinal)) {
+ // error: form token does not match cookie token
+ throw CreateValidationException();
+ }
+
+ if (!ValidateFormToken(formToken)) {
+ // error: custom validation failed
+ throw CreateValidationException();
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ValidateInputAttribute.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ValidateInputAttribute.cs
new file mode 100644
index 0000000..e67c3a0
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ValidateInputAttribute.cs
@@ -0,0 +1,40 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+
+ [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes",
+ Justification = "No compelling performance reason to seal this type.")]
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
+ public class ValidateInputAttribute : FilterAttribute, IAuthorizationFilter {
+
+ public ValidateInputAttribute(bool enableValidation) {
+ EnableValidation = enableValidation;
+ }
+
+ public bool EnableValidation {
+ get;
+ private set;
+ }
+
+ public virtual void OnAuthorization(AuthorizationContext filterContext) {
+ if (filterContext == null) {
+ throw new ArgumentNullException("filterContext");
+ }
+
+ filterContext.Controller.ValidateRequest = EnableValidation;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ValueProviderDictionary.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ValueProviderDictionary.cs
new file mode 100644
index 0000000..2d5a9be
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ValueProviderDictionary.cs
@@ -0,0 +1,193 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Collections.Specialized;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Web.Routing;
+
+ public class ValueProviderDictionary : IDictionary<string, ValueProviderResult> {
+
+ private readonly Dictionary<string, ValueProviderResult> _dictionary = new Dictionary<string, ValueProviderResult>(StringComparer.OrdinalIgnoreCase);
+
+ public ValueProviderDictionary(ControllerContext controllerContext) {
+ ControllerContext = controllerContext;
+ if (controllerContext != null) {
+ PopulateDictionary();
+ }
+ }
+
+ public ControllerContext ControllerContext {
+ get;
+ private set;
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public int Count {
+ get {
+ return ((ICollection<KeyValuePair<string, ValueProviderResult>>)Dictionary).Count;
+ }
+ }
+
+ internal Dictionary<string, ValueProviderResult> Dictionary {
+ get {
+ return _dictionary;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool IsReadOnly {
+ get {
+ return ((ICollection<KeyValuePair<string, ValueProviderResult>>)Dictionary).IsReadOnly;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public ICollection<string> Keys {
+ get {
+ return Dictionary.Keys;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public ValueProviderResult this[string key] {
+ get {
+ ValueProviderResult result;
+ Dictionary.TryGetValue(key, out result);
+ return result;
+ }
+ set {
+ Dictionary[key] = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public ICollection<ValueProviderResult> Values {
+ get {
+ return Dictionary.Values;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Add(KeyValuePair<string, ValueProviderResult> item) {
+ ((ICollection<KeyValuePair<string, ValueProviderResult>>)Dictionary).Add(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Add(string key, ValueProviderResult value) {
+ Dictionary.Add(key, value);
+ }
+
+ private void AddToDictionaryIfNotPresent(string key, ValueProviderResult result) {
+ if (!String.IsNullOrEmpty(key)) {
+ if (!Dictionary.ContainsKey(key)) {
+ Dictionary.Add(key, result);
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Clear() {
+ ((ICollection<KeyValuePair<string, ValueProviderResult>>)Dictionary).Clear();
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Contains(KeyValuePair<string, ValueProviderResult> item) {
+ return ((ICollection<KeyValuePair<string, ValueProviderResult>>)Dictionary).Contains(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool ContainsKey(string key) {
+ return Dictionary.ContainsKey(key);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void CopyTo(KeyValuePair<string, ValueProviderResult>[] array, int arrayIndex) {
+ ((ICollection<KeyValuePair<string, ValueProviderResult>>)Dictionary).CopyTo(array, arrayIndex);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public IEnumerator<KeyValuePair<string, ValueProviderResult>> GetEnumerator() {
+ return ((IEnumerable<KeyValuePair<string, ValueProviderResult>>)Dictionary).GetEnumerator();
+ }
+
+ private void PopulateDictionary() {
+ CultureInfo currentCulture = CultureInfo.CurrentCulture;
+ CultureInfo invariantCulture = CultureInfo.InvariantCulture;
+
+ // We use this order of precedence to populate the dictionary:
+ // 1. Request form submission (should be culture-aware)
+ // 2. Values from the RouteData (could be from the typed-in URL or from the route's default values)
+ // 3. URI query string
+
+ NameValueCollection form = ControllerContext.HttpContext.Request.Form;
+ if (form != null) {
+ string[] keys = form.AllKeys;
+ foreach (string key in keys) {
+ string[] rawValue = form.GetValues(key);
+ string attemptedValue = form[key];
+ ValueProviderResult result = new ValueProviderResult(rawValue, attemptedValue, currentCulture);
+ AddToDictionaryIfNotPresent(key, result);
+ }
+ }
+
+ RouteValueDictionary routeValues = ControllerContext.RouteData.Values;
+ if (routeValues != null) {
+ foreach (var kvp in routeValues) {
+ string key = kvp.Key;
+ object rawValue = kvp.Value;
+ string attemptedValue = Convert.ToString(rawValue, invariantCulture);
+ ValueProviderResult result = new ValueProviderResult(rawValue, attemptedValue, invariantCulture);
+ AddToDictionaryIfNotPresent(key, result);
+ }
+ }
+
+ NameValueCollection queryString = ControllerContext.HttpContext.Request.QueryString;
+ if (queryString != null) {
+ string[] keys = queryString.AllKeys;
+ foreach (string key in keys) {
+ string[] rawValue = queryString.GetValues(key);
+ string attemptedValue = queryString[key];
+ ValueProviderResult result = new ValueProviderResult(rawValue, attemptedValue, invariantCulture);
+ AddToDictionaryIfNotPresent(key, result);
+ }
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Remove(KeyValuePair<string, ValueProviderResult> item) {
+ return ((ICollection<KeyValuePair<string, ValueProviderResult>>)Dictionary).Remove(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Remove(string key) {
+ return Dictionary.Remove(key);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool TryGetValue(string key, out ValueProviderResult value) {
+ return Dictionary.TryGetValue(key, out value);
+ }
+
+ #region IEnumerable Members
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ IEnumerator IEnumerable.GetEnumerator() {
+ return ((IEnumerable)Dictionary).GetEnumerator();
+ }
+ #endregion
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ValueProviderResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ValueProviderResult.cs
new file mode 100644
index 0000000..dc5d306
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ValueProviderResult.cs
@@ -0,0 +1,147 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.ComponentModel;
+ using System.Globalization;
+ using System.Web.Mvc.Resources;
+
+ [Serializable]
+ public class ValueProviderResult {
+
+ private static readonly CultureInfo _staticCulture = CultureInfo.InvariantCulture;
+ private CultureInfo _instanceCulture;
+
+ // default constructor so that subclassed types can set the properties themselves
+ protected ValueProviderResult() {
+ }
+
+ public ValueProviderResult(object rawValue, string attemptedValue, CultureInfo culture) {
+ RawValue = rawValue;
+ AttemptedValue = attemptedValue;
+ Culture = culture;
+ }
+
+ public string AttemptedValue {
+ get;
+ protected set;
+ }
+
+ public CultureInfo Culture {
+ get {
+ if (_instanceCulture == null) {
+ _instanceCulture = _staticCulture;
+ }
+ return _instanceCulture;
+ }
+ protected set {
+ _instanceCulture = value;
+ }
+ }
+
+ public object RawValue {
+ get;
+ protected set;
+ }
+
+ private static object ConvertSimpleType(CultureInfo culture, object value, Type destinationType) {
+ if (value == null || destinationType.IsInstanceOfType(value)) {
+ return value;
+ }
+
+ // if this is a user-input value but the user didn't type anything, return no value
+ string valueAsString = value as string;
+ if (valueAsString != null && valueAsString.Length == 0) {
+ return null;
+ }
+
+ TypeConverter converter = TypeDescriptor.GetConverter(destinationType);
+ bool canConvertFrom = converter.CanConvertFrom(value.GetType());
+ if (!canConvertFrom) {
+ converter = TypeDescriptor.GetConverter(value.GetType());
+ }
+ if (!(canConvertFrom || converter.CanConvertTo(destinationType))) {
+ string message = String.Format(CultureInfo.CurrentUICulture, MvcResources.ValueProviderResult_NoConverterExists,
+ value.GetType().FullName, destinationType.FullName);
+ throw new InvalidOperationException(message);
+ }
+
+ try {
+ object convertedValue = (canConvertFrom) ?
+ converter.ConvertFrom(null /* context */, culture, value) :
+ converter.ConvertTo(null /* context */, culture, value, destinationType);
+ return convertedValue;
+ }
+ catch (Exception ex) {
+ string message = String.Format(CultureInfo.CurrentUICulture, MvcResources.ValueProviderResult_ConversionThrew,
+ value.GetType().FullName, destinationType.FullName);
+ throw new InvalidOperationException(message, ex);
+ }
+ }
+
+ public object ConvertTo(Type type) {
+ return ConvertTo(type, null /* culture */);
+ }
+
+ public virtual object ConvertTo(Type type, CultureInfo culture) {
+ if (type == null) {
+ throw new ArgumentNullException("type");
+ }
+
+ CultureInfo cultureToUse = culture ?? Culture;
+ return UnwrapPossibleArrayType(cultureToUse, RawValue, type);
+ }
+
+ private static object UnwrapPossibleArrayType(CultureInfo culture, object value, Type destinationType) {
+ if (value == null || destinationType.IsInstanceOfType(value)) {
+ return value;
+ }
+
+ // array conversion results in four cases, as below
+ Array valueAsArray = value as Array;
+ if (destinationType.IsArray) {
+ Type destinationElementType = destinationType.GetElementType();
+ if (valueAsArray != null) {
+ // case 1: both destination + source type are arrays, so convert each element
+ IList converted = Array.CreateInstance(destinationElementType, valueAsArray.Length);
+ for (int i = 0; i < valueAsArray.Length; i++) {
+ converted[i] = ConvertSimpleType(culture, valueAsArray.GetValue(i), destinationElementType);
+ }
+ return converted;
+ }
+ else {
+ // case 2: destination type is array but source is single element, so wrap element in array + convert
+ object element = ConvertSimpleType(culture, value, destinationElementType);
+ IList converted = Array.CreateInstance(destinationElementType, 1);
+ converted[0] = element;
+ return converted;
+ }
+ }
+ else if (valueAsArray != null) {
+ // case 3: destination type is single element but source is array, so extract first element + convert
+ if (valueAsArray.Length > 0) {
+ value = valueAsArray.GetValue(0);
+ return ConvertSimpleType(culture, value, destinationType);
+ }
+ else {
+ // case 3(a): source is empty array, so can't perform conversion
+ return null;
+ }
+ }
+ // case 4: both destination + source type are single elements, so convert
+ return ConvertSimpleType(culture, value, destinationType);
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewContext.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewContext.cs
new file mode 100644
index 0000000..5fbdd2e
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewContext.cs
@@ -0,0 +1,65 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+
+ public class ViewContext : ControllerContext {
+
+ // parameterless constructor used for mocking
+ public ViewContext() {
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
+ Justification = "The virtual property setters are only to support mocking frameworks, in which case this constructor shouldn't be called anyway.")]
+ public ViewContext(ControllerContext controllerContext, IView view, ViewDataDictionary viewData, TempDataDictionary tempData)
+ : base(controllerContext) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+ if (view == null) {
+ throw new ArgumentNullException("view");
+ }
+ if (viewData == null) {
+ throw new ArgumentNullException("viewData");
+ }
+ if (tempData == null) {
+ throw new ArgumentNullException("tempData");
+ }
+
+ View = view;
+ ViewData = viewData;
+ TempData = tempData;
+ }
+
+ public virtual IView View {
+ get;
+ set;
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "The property setter is only here to support mocking this type and should not be called at runtime.")]
+ public virtual ViewDataDictionary ViewData {
+ get;
+ set;
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "The property setter is only here to support mocking this type and should not be called at runtime.")]
+ public virtual TempDataDictionary TempData {
+ get;
+ set;
+ }
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewDataDictionary.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewDataDictionary.cs
new file mode 100644
index 0000000..87c77c6
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewDataDictionary.cs
@@ -0,0 +1,325 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.ComponentModel;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Reflection;
+ using System.Web.Mvc.Resources;
+
+ // TODO: Unit test ModelState interaction with VDD
+
+ public class ViewDataDictionary : IDictionary<string, object> {
+
+ private readonly Dictionary<string, object> _innerDictionary = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
+ private object _model;
+ private readonly ModelStateDictionary _modelState = new ModelStateDictionary();
+
+ public ViewDataDictionary()
+ : this((object)null) {
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
+ Justification = "See note on SetModel() method.")]
+ public ViewDataDictionary(object model) {
+ Model = model;
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors",
+ Justification = "See note on SetModel() method.")]
+ public ViewDataDictionary(ViewDataDictionary dictionary) {
+ if (dictionary == null) {
+ throw new ArgumentNullException("dictionary");
+ }
+
+ foreach (var entry in dictionary) {
+ _innerDictionary.Add(entry.Key, entry.Value);
+ }
+ foreach (var entry in dictionary.ModelState) {
+ ModelState.Add(entry.Key, entry.Value);
+ }
+ Model = dictionary.Model;
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public int Count {
+ get {
+ return _innerDictionary.Count;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool IsReadOnly {
+ get {
+ return ((IDictionary<string, object>)_innerDictionary).IsReadOnly;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public ICollection<string> Keys {
+ get {
+ return _innerDictionary.Keys;
+ }
+ }
+
+ public object Model {
+ get {
+ return _model;
+ }
+ set {
+ SetModel(value);
+ }
+ }
+
+ public ModelStateDictionary ModelState {
+ get {
+ return _modelState;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public object this[string key] {
+ get {
+ object value;
+ _innerDictionary.TryGetValue(key, out value);
+ return value;
+ }
+ set {
+ _innerDictionary[key] = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public ICollection<object> Values {
+ get {
+ return _innerDictionary.Values;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Add(KeyValuePair<string, object> item) {
+ ((IDictionary<string, object>)_innerDictionary).Add(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Add(string key, object value) {
+ _innerDictionary.Add(key, value);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void Clear() {
+ _innerDictionary.Clear();
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Contains(KeyValuePair<string, object> item) {
+ return ((IDictionary<string, object>)_innerDictionary).Contains(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool ContainsKey(string key) {
+ return _innerDictionary.ContainsKey(key);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) {
+ ((IDictionary<string, object>)_innerDictionary).CopyTo(array, arrayIndex);
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Eval",
+ Justification = "Commonly used shorthand for Evaluate.")]
+ public object Eval(string expression) {
+ if (String.IsNullOrEmpty(expression)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "expression");
+ }
+
+ return ViewDataEvaluator.Eval(this, expression);
+ }
+
+ [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Eval",
+ Justification = "Commonly used shorthand for Evaluate.")]
+ public string Eval(string expression, string format) {
+ object value = Eval(expression);
+
+ if (value == null) {
+ return String.Empty;
+ }
+
+ if (String.IsNullOrEmpty(format)) {
+ return Convert.ToString(value, CultureInfo.CurrentCulture);
+ }
+ else {
+ return String.Format(CultureInfo.CurrentCulture, format, value);
+ }
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public IEnumerator<KeyValuePair<string, object>> GetEnumerator() {
+ return _innerDictionary.GetEnumerator();
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Remove(KeyValuePair<string, object> item) {
+ return ((IDictionary<string, object>)_innerDictionary).Remove(item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool Remove(string key) {
+ return _innerDictionary.Remove(key);
+ }
+
+ // This method will execute before the derived type's instance constructor executes. Derived types must
+ // be aware of this and should plan accordingly. For example, the logic in SetModel() should be simple
+ // enough so as not to depend on the "this" pointer referencing a fully constructed object.
+ protected virtual void SetModel(object value) {
+ _model = value;
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ public bool TryGetValue(string key, out object value) {
+ return _innerDictionary.TryGetValue(key, out value);
+ }
+
+ internal static class ViewDataEvaluator {
+ public static object Eval(ViewDataDictionary vdd, string expression) {
+ //Given an expression "foo.bar.baz" we look up the following (pseudocode):
+ // this["foo.bar.baz.quux"]
+ // this["foo.bar.baz"]["quux"]
+ // this["foo.bar"]["baz.quux]
+ // this["foo.bar"]["baz"]["quux"]
+ // this["foo"]["bar.baz.quux"]
+ // this["foo"]["bar.baz"]["quux"]
+ // this["foo"]["bar"]["baz.quux"]
+ // this["foo"]["bar"]["baz"]["quux"]
+
+ object evaluated = EvalComplexExpression(vdd, expression);
+ return evaluated;
+ }
+
+ private static object EvalComplexExpression(object indexableObject, string expression) {
+ foreach (ExpressionPair expressionPair in GetRightToLeftExpressions(expression)) {
+ string subExpression = expressionPair.Left;
+ string postExpression = expressionPair.Right;
+
+ object subtarget = GetPropertyValue(indexableObject, subExpression);
+ if (subtarget != null) {
+ if (String.IsNullOrEmpty(postExpression))
+ return subtarget;
+
+ object potential = EvalComplexExpression(subtarget, postExpression);
+ if (potential != null) {
+ return potential;
+ }
+ }
+ }
+ return null;
+ }
+
+ private static IEnumerable<ExpressionPair> GetRightToLeftExpressions(string expression) {
+ // Produces an enumeration of all the combinations of complex property names
+ // given a complex expression. See the list above for an example of the result
+ // of the enumeration.
+
+ yield return new ExpressionPair(expression, String.Empty);
+
+ int lastDot = expression.LastIndexOf('.');
+
+ string subExpression = expression;
+ string postExpression = string.Empty;
+
+ while (lastDot > -1) {
+ subExpression = expression.Substring(0, lastDot);
+ postExpression = expression.Substring(lastDot + 1);
+ yield return new ExpressionPair(subExpression, postExpression);
+
+ lastDot = subExpression.LastIndexOf('.');
+ }
+ }
+
+ private static object GetIndexedPropertyValue(object indexableObject, string key) {
+ Type indexableType = indexableObject.GetType();
+
+ ViewDataDictionary vdd = indexableObject as ViewDataDictionary;
+ if (vdd != null) {
+ return vdd[key];
+ }
+
+ MethodInfo containsKeyMethod = indexableType.GetMethod("ContainsKey", BindingFlags.Public | BindingFlags.Instance, null, new Type[] { typeof(string) }, null);
+ if (containsKeyMethod != null) {
+ if (!(bool)containsKeyMethod.Invoke(indexableObject, new object[] { key })) {
+ return null;
+ }
+ }
+
+ PropertyInfo info = indexableType.GetProperty("Item", BindingFlags.Public | BindingFlags.Instance, null, null, new Type[] { typeof(string) }, null);
+ if (info != null) {
+ return info.GetValue(indexableObject, new object[] { key });
+ }
+
+ PropertyInfo objectInfo = indexableType.GetProperty("Item", BindingFlags.Public | BindingFlags.Instance, null, null, new Type[] { typeof(object) }, null);
+ if (objectInfo != null) {
+ return objectInfo.GetValue(indexableObject, new object[] { key });
+ }
+ return null;
+ }
+
+ private static object GetPropertyValue(object container, string propertyName) {
+ // This method handles one "segment" of a complex property expression
+
+ // First, we try to evaluate the property based on its indexer
+ object value = GetIndexedPropertyValue(container, propertyName);
+ if (value != null) {
+ return value;
+ }
+
+ // If the indexer didn't return anything useful, continue...
+
+ // If the container is a ViewDataDictionary then treat its Model property
+ // as the container instead of the ViewDataDictionary itself.
+ ViewDataDictionary vdd = container as ViewDataDictionary;
+ if (vdd != null) {
+ container = vdd.Model;
+ }
+
+ // Second, we try to use PropertyDescriptors and treat the expression as a property name
+ PropertyDescriptor descriptor = TypeDescriptor.GetProperties(container).Find(propertyName, true);
+ if (descriptor == null) {
+ return null;
+ }
+
+ return descriptor.GetValue(container);
+ }
+
+ private struct ExpressionPair {
+ public readonly string Left;
+ public readonly string Right;
+
+ public ExpressionPair(string left, string right) {
+ Left = left;
+ Right = right;
+ }
+ }
+ }
+
+ #region IEnumerable Members
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ IEnumerator IEnumerable.GetEnumerator() {
+ return ((IEnumerable)_innerDictionary).GetEnumerator();
+ }
+ #endregion
+
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewDataDictionary`1.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewDataDictionary`1.cs
new file mode 100644
index 0000000..0120163
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewDataDictionary`1.cs
@@ -0,0 +1,53 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Globalization;
+ using System.Web.Mvc.Resources;
+
+ public class ViewDataDictionary<TModel> : ViewDataDictionary where TModel : class {
+ public ViewDataDictionary() :
+ base() {
+ }
+
+ public ViewDataDictionary(TModel model) :
+ base(model) {
+ }
+
+ public ViewDataDictionary(ViewDataDictionary viewDataDictionary) :
+ base(viewDataDictionary) {
+ }
+
+ public new TModel Model {
+ get {
+ return (TModel)base.Model;
+ }
+ set {
+ SetModel(value);
+ }
+ }
+
+ protected override void SetModel(object value) {
+ TModel model = value as TModel;
+
+ // If there was a value but the cast failed, throw an exception
+ if ((value != null) && (model == null)) {
+ throw new InvalidOperationException(
+ String.Format(CultureInfo.CurrentUICulture,
+ MvcResources.ViewDataDictionary_WrongTModelType, value.GetType(), typeof(TModel)));
+ }
+
+ base.SetModel(value);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewEngineCollection.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewEngineCollection.cs
new file mode 100644
index 0000000..5b863d5
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewEngineCollection.cs
@@ -0,0 +1,98 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Web.Mvc.Resources;
+
+ public class ViewEngineCollection : Collection<IViewEngine> {
+
+ public ViewEngineCollection() {
+ }
+
+ public ViewEngineCollection(IList<IViewEngine> list)
+ : base(list) {
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ protected override void InsertItem(int index, IViewEngine item) {
+ if (item == null) {
+ throw new ArgumentNullException("item");
+ }
+ base.InsertItem(index, item);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
+ protected override void SetItem(int index, IViewEngine item) {
+ if (item == null) {
+ throw new ArgumentNullException("item");
+ }
+ base.SetItem(index, item);
+ }
+
+ private ViewEngineResult Find(Func<IViewEngine, ViewEngineResult> cacheLocator, Func<IViewEngine, ViewEngineResult> locator) {
+ ViewEngineResult result;
+
+ foreach (IViewEngine engine in Items) {
+ if (engine != null) {
+ result = cacheLocator(engine);
+
+ if (result.View != null) {
+ return result;
+ }
+ }
+ }
+
+ List<string> searched = new List<string>();
+
+ foreach (IViewEngine engine in Items) {
+ if (engine != null) {
+ result = locator(engine);
+
+ if (result.View != null) {
+ return result;
+ }
+
+ searched.AddRange(result.SearchedLocations);
+ }
+ }
+
+ return new ViewEngineResult(searched);
+ }
+
+ public virtual ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+ if (string.IsNullOrEmpty(partialViewName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "partialViewName");
+ }
+ Func<IViewEngine, ViewEngineResult> cacheLocator = e => e.FindPartialView(controllerContext, partialViewName, true);
+ Func<IViewEngine, ViewEngineResult> locator = e => e.FindPartialView(controllerContext, partialViewName, false);
+ return Find(cacheLocator, locator);
+ }
+
+ public virtual ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+ if (string.IsNullOrEmpty(viewName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "viewName");
+ }
+ Func<IViewEngine, ViewEngineResult> cacheLocator = e => e.FindView(controllerContext, viewName, masterName, true);
+ Func<IViewEngine, ViewEngineResult> locator = e => e.FindView(controllerContext, viewName, masterName, false);
+ return Find(cacheLocator, locator);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewEngineResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewEngineResult.cs
new file mode 100644
index 0000000..e1e4a49
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewEngineResult.cs
@@ -0,0 +1,54 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections.Generic;
+
+ public class ViewEngineResult {
+
+ public ViewEngineResult(IEnumerable<string> searchedLocations) {
+ if (searchedLocations == null) {
+ throw new ArgumentNullException("searchedLocations");
+ }
+
+ SearchedLocations = searchedLocations;
+ }
+
+ public ViewEngineResult(IView view, IViewEngine viewEngine) {
+ if (view == null) {
+ throw new ArgumentNullException("view");
+ }
+ if (viewEngine == null) {
+ throw new ArgumentNullException("viewEngine");
+ }
+
+ View = view;
+ ViewEngine = viewEngine;
+ }
+
+ public IEnumerable<string> SearchedLocations {
+ get;
+ private set;
+ }
+
+ public IView View {
+ get;
+ private set;
+ }
+
+ public IViewEngine ViewEngine {
+ get;
+ private set;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewEngines.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewEngines.cs
new file mode 100644
index 0000000..a6c258d
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewEngines.cs
@@ -0,0 +1,27 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public static class ViewEngines {
+
+ private readonly static ViewEngineCollection _engines = new ViewEngineCollection {
+ new WebFormViewEngine()
+ };
+
+ public static ViewEngineCollection Engines {
+ get {
+ return _engines;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewMasterPage.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewMasterPage.cs
new file mode 100644
index 0000000..74e2e7a
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewMasterPage.cs
@@ -0,0 +1,77 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Globalization;
+ using System.Web.Mvc.Resources;
+ using System.Web.UI;
+
+ public class ViewMasterPage : MasterPage {
+ public AjaxHelper Ajax {
+ get {
+ return ViewPage.Ajax;
+ }
+ }
+
+ public HtmlHelper Html {
+ get {
+ return ViewPage.Html;
+ }
+ }
+
+ public object Model {
+ get {
+ return ViewData.Model;
+ }
+ }
+
+ public TempDataDictionary TempData {
+ get {
+ return ViewPage.TempData;
+ }
+ }
+
+ public UrlHelper Url {
+ get {
+ return ViewPage.Url;
+ }
+ }
+
+ public ViewContext ViewContext {
+ get {
+ return ViewPage.ViewContext;
+ }
+ }
+
+ public ViewDataDictionary ViewData {
+ get {
+ return ViewPage.ViewData;
+ }
+ }
+
+ internal ViewPage ViewPage {
+ get {
+ ViewPage viewPage = Page as ViewPage;
+ if (viewPage == null) {
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, MvcResources.ViewMasterPage_RequiresViewPage));
+ }
+ return viewPage;
+ }
+ }
+
+ public HtmlTextWriter Writer {
+ get {
+ return ViewPage.Writer;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewMasterPage`1.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewMasterPage`1.cs
new file mode 100644
index 0000000..4ddf4c7
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewMasterPage`1.cs
@@ -0,0 +1,53 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+
+ public class ViewMasterPage<TModel> : ViewMasterPage where TModel : class {
+ private AjaxHelper<TModel> _ajaxHelper;
+ private HtmlHelper<TModel> _htmlHelper;
+ private ViewDataDictionary<TModel> _viewData;
+
+ public new AjaxHelper<TModel> Ajax {
+ get {
+ if (_ajaxHelper == null) {
+ _ajaxHelper = new AjaxHelper<TModel>(ViewContext, ViewPage);
+ }
+ return _ajaxHelper;
+ }
+ }
+
+ public new HtmlHelper<TModel> Html {
+ get {
+ if (_htmlHelper == null) {
+ _htmlHelper = new HtmlHelper<TModel>(ViewContext, ViewPage);
+ }
+ return _htmlHelper;
+ }
+ }
+
+ public new TModel Model {
+ get {
+ return ViewData.Model;
+ }
+ }
+
+ public new ViewDataDictionary<TModel> ViewData {
+ get {
+ if (_viewData == null) {
+ _viewData = new ViewDataDictionary<TModel>(ViewPage.ViewData);
+ }
+ return _viewData;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewPage.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewPage.cs
new file mode 100644
index 0000000..8baa0ca
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewPage.cs
@@ -0,0 +1,122 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Web;
+ using System.Web.UI;
+
+ [FileLevelControlBuilder(typeof(ViewPageControlBuilder))]
+ public class ViewPage : Page, IViewDataContainer {
+
+ private string _masterLocation;
+ private ViewDataDictionary _viewData;
+
+ public AjaxHelper Ajax {
+ get;
+ set;
+ }
+
+ public HtmlHelper Html {
+ get;
+ set;
+ }
+
+ public string MasterLocation {
+ get {
+ return _masterLocation ?? String.Empty;
+ }
+ set {
+ _masterLocation = value;
+ }
+ }
+
+ public object Model {
+ get {
+ return ViewData.Model;
+ }
+ }
+
+ public TempDataDictionary TempData {
+ get {
+ return ViewContext.TempData;
+ }
+ }
+
+ public UrlHelper Url {
+ get;
+ set;
+ }
+
+ public ViewContext ViewContext {
+ get;
+ set;
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "This is the mechanism by which the ViewPage gets its ViewDataDictionary object.")]
+ public ViewDataDictionary ViewData {
+ get {
+ if (_viewData == null) {
+ SetViewData(new ViewDataDictionary());
+ }
+ return _viewData;
+ }
+ set {
+ SetViewData(value);
+ }
+ }
+
+ public HtmlTextWriter Writer {
+ get;
+ private set;
+ }
+
+ public virtual void InitHelpers() {
+ Ajax = new AjaxHelper(ViewContext, this);
+ Html = new HtmlHelper(ViewContext, this);
+ Url = new UrlHelper(ViewContext.RequestContext);
+ }
+
+ [SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
+ protected override void OnPreInit(EventArgs e) {
+ base.OnPreInit(e);
+
+ if (!String.IsNullOrEmpty(MasterLocation)) {
+ MasterPageFile = MasterLocation;
+ }
+ }
+
+ protected override void Render(HtmlTextWriter writer) {
+ Writer = writer;
+ try {
+ base.Render(writer);
+ }
+ finally {
+ Writer = null;
+ }
+ }
+
+ public virtual void RenderView(ViewContext viewContext) {
+ ViewContext = viewContext;
+ InitHelpers();
+ // Tracing requires Page IDs to be unique.
+ ID = Guid.NewGuid().ToString();
+ ProcessRequest(HttpContext.Current);
+ }
+
+ protected virtual void SetViewData(ViewDataDictionary viewData) {
+ _viewData = viewData;
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewPageControlBuilder.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewPageControlBuilder.cs
new file mode 100644
index 0000000..feef8dc
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewPageControlBuilder.cs
@@ -0,0 +1,36 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.CodeDom;
+ using System.Web.UI;
+
+ internal sealed class ViewPageControlBuilder : FileLevelPageControlBuilder {
+ public string PageBaseType {
+ get;
+ set;
+ }
+
+ public override void ProcessGeneratedCode(
+ CodeCompileUnit codeCompileUnit,
+ CodeTypeDeclaration baseType,
+ CodeTypeDeclaration derivedType,
+ CodeMemberMethod buildMethod,
+ CodeMemberMethod dataBindingMethod) {
+
+ // If we find got a base class string, use it
+ if (PageBaseType != null) {
+ derivedType.BaseTypes[0] = new CodeTypeReference(PageBaseType);
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewPage`1.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewPage`1.cs
new file mode 100644
index 0000000..0a89f64
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewPage`1.cs
@@ -0,0 +1,62 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Diagnostics.CodeAnalysis;
+
+ public class ViewPage<TModel> : ViewPage where TModel : class {
+
+ private ViewDataDictionary<TModel> _viewData;
+
+ public new AjaxHelper<TModel> Ajax {
+ get;
+ set;
+ }
+
+ public new HtmlHelper<TModel> Html {
+ get;
+ set;
+ }
+
+ public new TModel Model {
+ get {
+ return ViewData.Model;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+ public new ViewDataDictionary<TModel> ViewData {
+ get {
+ if (_viewData == null) {
+ SetViewData(new ViewDataDictionary<TModel>());
+ }
+ return _viewData;
+ }
+ set {
+ SetViewData(value);
+ }
+ }
+
+ public override void InitHelpers() {
+ base.InitHelpers();
+
+ Ajax = new AjaxHelper<TModel>(ViewContext, this);
+ Html = new HtmlHelper<TModel>(ViewContext, this);
+ }
+
+ protected override void SetViewData(ViewDataDictionary viewData) {
+ _viewData = new ViewDataDictionary<TModel>(viewData);
+
+ base.SetViewData(_viewData);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewResult.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewResult.cs
new file mode 100644
index 0000000..6eade15
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewResult.cs
@@ -0,0 +1,47 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Globalization;
+ using System.Text;
+ using System.Web.Mvc.Resources;
+
+ public class ViewResult : ViewResultBase {
+ private string _masterName;
+
+ public string MasterName {
+ get {
+ return _masterName ?? String.Empty;
+ }
+ set {
+ _masterName = value;
+ }
+ }
+
+ protected override ViewEngineResult FindView(ControllerContext context) {
+ ViewEngineResult result = ViewEngineCollection.FindView(context, ViewName, MasterName);
+ if (result.View != null) {
+ return result;
+ }
+
+ // we need to generate an exception containing all the locations we searched
+ StringBuilder locationsText = new StringBuilder();
+ foreach (string location in result.SearchedLocations) {
+ locationsText.AppendLine();
+ locationsText.Append(location);
+ }
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture,
+ MvcResources.Common_ViewNotFound, ViewName, locationsText));
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewResultBase.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewResultBase.cs
new file mode 100644
index 0000000..b7a289f
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewResultBase.cs
@@ -0,0 +1,101 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+
+ public abstract class ViewResultBase : ActionResult {
+ private TempDataDictionary _tempData;
+ private ViewDataDictionary _viewData;
+ private ViewEngineCollection _viewEngineCollection;
+ private string _viewName;
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "This entire type is meant to be mutable.")]
+ public TempDataDictionary TempData {
+ get {
+ if (_tempData == null) {
+ _tempData = new TempDataDictionary();
+ }
+ return _tempData;
+ }
+ set {
+ _tempData = value;
+ }
+ }
+
+ public IView View {
+ get;
+ set;
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "This entire type is meant to be mutable.")]
+ public ViewDataDictionary ViewData {
+ get {
+ if (_viewData == null) {
+ _viewData = new ViewDataDictionary();
+ }
+ return _viewData;
+ }
+ set {
+ _viewData = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "This entire type is meant to be mutable.")]
+ public ViewEngineCollection ViewEngineCollection {
+ get {
+ return _viewEngineCollection ?? ViewEngines.Engines;
+ }
+ set {
+ _viewEngineCollection = value;
+ }
+ }
+
+ public string ViewName {
+ get {
+ return _viewName ?? String.Empty;
+ }
+ set {
+ _viewName = value;
+ }
+ }
+
+ public override void ExecuteResult(ControllerContext context) {
+ if (context == null) {
+ throw new ArgumentNullException("context");
+ }
+ if (String.IsNullOrEmpty(ViewName)) {
+ ViewName = context.RouteData.GetRequiredString("action");
+ }
+
+ ViewEngineResult result = null;
+
+ if (View == null) {
+ result = FindView(context);
+ View = result.View;
+ }
+
+ ViewContext viewContext = new ViewContext(context, View, ViewData, TempData);
+ View.Render(viewContext, context.HttpContext.Response.Output);
+
+ if (result != null) {
+ result.ViewEngine.ReleaseView(context, View);
+ }
+ }
+
+ protected abstract ViewEngineResult FindView(ControllerContext context);
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewType.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewType.cs
new file mode 100644
index 0000000..26db1e1
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewType.cs
@@ -0,0 +1,32 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.ComponentModel;
+ using System.Web.UI;
+
+ [ControlBuilder(typeof(ViewTypeControlBuilder))]
+ [NonVisualControl]
+ public class ViewType : Control {
+ private string _typeName;
+
+ [DefaultValue("")]
+ public string TypeName {
+ get {
+ return _typeName ?? String.Empty;
+ }
+ set {
+ _typeName = value;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewTypeControlBuilder.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewTypeControlBuilder.cs
new file mode 100644
index 0000000..56724c2
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewTypeControlBuilder.cs
@@ -0,0 +1,39 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.CodeDom;
+ using System.Collections;
+ using System.Web.UI;
+
+ internal sealed class ViewTypeControlBuilder : ControlBuilder {
+ private string _typeName;
+
+ public override void Init(TemplateParser parser, ControlBuilder parentBuilder, Type type, string tagName, string id, IDictionary attribs) {
+ base.Init(parser, parentBuilder, type, tagName, id, attribs);
+
+ _typeName = (string)attribs["typename"];
+ }
+
+ public override void ProcessGeneratedCode(
+ CodeCompileUnit codeCompileUnit,
+ CodeTypeDeclaration baseType,
+ CodeTypeDeclaration derivedType,
+ CodeMemberMethod buildMethod,
+ CodeMemberMethod dataBindingMethod) {
+
+ // Override the view's base type with the explicit base type
+ derivedType.BaseTypes[0] = new CodeTypeReference(_typeName);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewTypeParserFilter.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewTypeParserFilter.cs
new file mode 100644
index 0000000..3358418
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewTypeParserFilter.cs
@@ -0,0 +1,157 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Collections;
+ using System.Web.UI;
+
+ internal class ViewTypeParserFilter : PageParserFilter {
+
+ private string _viewBaseType;
+ private DirectiveType _directiveType = DirectiveType.Unknown;
+ private bool _viewTypeControlAdded;
+
+ public override void PreprocessDirective(string directiveName, IDictionary attributes) {
+ base.PreprocessDirective(directiveName, attributes);
+
+ string defaultBaseType = null;
+
+ // If we recognize the directive, keep track of what it was. If we don't recognize
+ // the directive then just stop.
+ switch (directiveName) {
+ case "page":
+ _directiveType = DirectiveType.Page;
+ defaultBaseType = typeof(ViewPage).FullName;
+ break;
+ case "control":
+ _directiveType = DirectiveType.UserControl;
+ defaultBaseType = typeof(ViewUserControl).FullName;
+ break;
+ case "master":
+ _directiveType = DirectiveType.Master;
+ defaultBaseType = typeof(ViewMasterPage).FullName;
+ break;
+ }
+
+ if (_directiveType == DirectiveType.Unknown) {
+ // If we're processing an unknown directive (e.g. a register directive), stop processing
+ return;
+ }
+
+ // Look for an inherit attribute
+ string inherits = (string)attributes["inherits"];
+ if (!String.IsNullOrEmpty(inherits)) {
+ // If it doesn't look like a generic type, don't do anything special,
+ // and let the parser do its normal processing
+ if (IsGenericTypeString(inherits)) {
+ // Remove the inherits attribute so the parser doesn't blow up
+ attributes["inherits"] = defaultBaseType;
+
+ // Remember the full type string so we can later give it to the ControlBuilder
+ _viewBaseType = inherits;
+ }
+ }
+ }
+
+ private static bool IsGenericTypeString(string typeName) {
+ // Detect C# and VB generic syntax
+ // REVIEW: what about other languages?
+ return typeName.IndexOfAny(new char[] { '<', '(' }) >= 0;
+ }
+
+ public override void ParseComplete(ControlBuilder rootBuilder) {
+ base.ParseComplete(rootBuilder);
+
+ // If it's our page ControlBuilder, give it the base type string
+ ViewPageControlBuilder pageBuilder = rootBuilder as ViewPageControlBuilder;
+ if (pageBuilder != null) {
+ pageBuilder.PageBaseType = _viewBaseType;
+ }
+ ViewUserControlControlBuilder userControlBuilder = rootBuilder as ViewUserControlControlBuilder;
+ if (userControlBuilder != null) {
+ userControlBuilder.UserControlBaseType = _viewBaseType;
+ }
+ }
+
+ public override bool ProcessCodeConstruct(CodeConstructType codeType, string code) {
+ if (codeType == CodeConstructType.ExpressionSnippet &&
+ !_viewTypeControlAdded &&
+ _viewBaseType != null &&
+ _directiveType == DirectiveType.Master) {
+
+ // If we're dealing with a master page that needs to have its base type set, do it here.
+ // It's done by adding the ViewType control, which has a builder that sets the base type.
+
+ // The code currently assumes that the file in question contains a code snippet, since
+ // that's the item we key off of in order to know when to add the ViewType control.
+
+ Hashtable attribs = new Hashtable();
+ attribs["typename"] = _viewBaseType;
+ AddControl(typeof(ViewType), attribs);
+ _viewTypeControlAdded = true;
+ }
+
+ return base.ProcessCodeConstruct(codeType, code);
+ }
+
+ // Everything else in this class is unrelated to our 'inherits' handling.
+ // Since PageParserFilter blocks everything by default, we need to unblock it
+
+ public override bool AllowCode {
+ get {
+ return true;
+ }
+ }
+
+ public override bool AllowBaseType(Type baseType) {
+ return true;
+ }
+
+ public override bool AllowControl(Type controlType, ControlBuilder builder) {
+ return true;
+ }
+
+ public override bool AllowVirtualReference(string referenceVirtualPath, VirtualReferenceType referenceType) {
+ return true;
+ }
+
+ public override bool AllowServerSideInclude(string includeVirtualPath) {
+ return true;
+ }
+
+ public override int NumberOfControlsAllowed {
+ get {
+ return -1;
+ }
+ }
+
+ public override int NumberOfDirectDependenciesAllowed {
+ get {
+ return -1;
+ }
+ }
+
+ public override int TotalNumberOfDependenciesAllowed {
+ get {
+ return -1;
+ }
+ }
+
+ private enum DirectiveType {
+ Unknown,
+ Page,
+ UserControl,
+ Master,
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewUserControl.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewUserControl.cs
new file mode 100644
index 0000000..c54db2b
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewUserControl.cs
@@ -0,0 +1,185 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.ComponentModel;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Web.Mvc.Resources;
+ using System.Web.UI;
+
+ [FileLevelControlBuilder(typeof(ViewUserControlControlBuilder))]
+ public class ViewUserControl : UserControl, IViewDataContainer {
+ private AjaxHelper _ajaxHelper;
+ private HtmlHelper _htmlHelper;
+ private ViewContext _viewContext;
+ private ViewDataDictionary _viewData;
+ private string _viewDataKey;
+
+ public AjaxHelper Ajax {
+ get {
+ if (_ajaxHelper == null) {
+ _ajaxHelper = new AjaxHelper(ViewContext, this);
+ }
+ return _ajaxHelper;
+ }
+ }
+
+ public HtmlHelper Html {
+ get {
+ if (_htmlHelper == null) {
+ _htmlHelper = new HtmlHelper(ViewContext, this);
+ }
+ return _htmlHelper;
+ }
+ }
+
+ public object Model {
+ get {
+ return ViewData.Model;
+ }
+ }
+
+ public TempDataDictionary TempData {
+ get {
+ return ViewPage.TempData;
+ }
+ }
+
+ public UrlHelper Url {
+ get {
+ return ViewPage.Url;
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public ViewContext ViewContext {
+ get {
+ return _viewContext ?? ViewPage.ViewContext;
+ }
+ set {
+ _viewContext = value;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly",
+ Justification = "This is the mechanism by which the ViewUserControl gets its ViewDataDictionary object.")]
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public ViewDataDictionary ViewData {
+ get {
+ EnsureViewData();
+ return _viewData;
+ }
+ set {
+ SetViewData(value);
+ }
+ }
+
+ [DefaultValue("")]
+ public string ViewDataKey {
+ get {
+ return _viewDataKey ?? String.Empty;
+ }
+ set {
+ _viewDataKey = value;
+ }
+ }
+
+ internal ViewPage ViewPage {
+ get {
+ ViewPage viewPage = Page as ViewPage;
+ if (viewPage == null) {
+ throw new InvalidOperationException(MvcResources.ViewUserControl_RequiresViewPage);
+ }
+ return viewPage;
+ }
+ }
+
+ public HtmlTextWriter Writer {
+ get {
+ return ViewPage.Writer;
+ }
+ }
+
+ protected virtual void SetViewData(ViewDataDictionary viewData) {
+ _viewData = viewData;
+ }
+
+ protected void EnsureViewData() {
+ if (_viewData != null) {
+ return;
+ }
+
+ // Get the ViewData for this ViewUserControl, optionally using the specified ViewDataKey
+ IViewDataContainer vdc = GetViewDataContainer(this);
+ if (vdc == null) {
+ throw new InvalidOperationException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.ViewUserControl_RequiresViewDataProvider,
+ AppRelativeVirtualPath));
+ }
+
+ ViewDataDictionary myViewData = vdc.ViewData;
+
+ // If we have a ViewDataKey, try to extract the ViewData from the dictionary, otherwise
+ // return the container's ViewData.
+ if (!String.IsNullOrEmpty(ViewDataKey)) {
+ object target = myViewData.Eval(ViewDataKey);
+ myViewData = target as ViewDataDictionary ?? new ViewDataDictionary(myViewData) { Model = target };
+ }
+
+ SetViewData(myViewData);
+ }
+
+ private static IViewDataContainer GetViewDataContainer(Control control) {
+ // Walk up the control hierarchy until we find someone that implements IViewDataContainer
+ while (control != null) {
+ control = control.Parent;
+ IViewDataContainer vdc = control as IViewDataContainer;
+ if (vdc != null) {
+ return vdc;
+ }
+ }
+ return null;
+ }
+
+ public virtual void RenderView(ViewContext viewContext) {
+ // TODO: Remove this hack. Without it, the browser appears to always load cached output
+ viewContext.HttpContext.Response.Cache.SetExpires(DateTime.Now);
+ ViewUserControlContainerPage containerPage = new ViewUserControlContainerPage(this);
+ // Tracing requires Page IDs to be unique.
+ ID = Guid.NewGuid().ToString();
+
+ RenderViewAndRestoreContentType(containerPage, viewContext);
+ }
+
+ internal static void RenderViewAndRestoreContentType(ViewPage containerPage, ViewContext viewContext) {
+ // We need to restore the Content-Type since Page.SetIntrinsics() will reset it. It's not possible
+ // to work around the call to SetIntrinsics() since the control's render method requires the
+ // containing page's Response property to be non-null, and SetIntrinsics() is the only way to set
+ // this.
+ string savedContentType = viewContext.HttpContext.Response.ContentType;
+ containerPage.RenderView(viewContext);
+ viewContext.HttpContext.Response.ContentType = savedContentType;
+ }
+
+ private sealed class ViewUserControlContainerPage : ViewPage {
+ public ViewUserControlContainerPage(ViewUserControl userControl) {
+ Controls.Add(userControl);
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewUserControlControlBuilder.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewUserControlControlBuilder.cs
new file mode 100644
index 0000000..d16fcfc
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewUserControlControlBuilder.cs
@@ -0,0 +1,36 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.CodeDom;
+ using System.Web.UI;
+
+ internal sealed class ViewUserControlControlBuilder : FileLevelUserControlBuilder {
+ internal string UserControlBaseType {
+ get;
+ set;
+ }
+
+ public override void ProcessGeneratedCode(
+ CodeCompileUnit codeCompileUnit,
+ CodeTypeDeclaration baseType,
+ CodeTypeDeclaration derivedType,
+ CodeMemberMethod buildMethod,
+ CodeMemberMethod dataBindingMethod) {
+
+ // If we find got a base class string, use it
+ if (UserControlBaseType != null) {
+ derivedType.BaseTypes[0] = new CodeTypeReference(UserControlBaseType);
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewUserControl`1.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewUserControl`1.cs
new file mode 100644
index 0000000..8852d7b
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/ViewUserControl`1.cs
@@ -0,0 +1,62 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Diagnostics.CodeAnalysis;
+
+ public class ViewUserControl<TModel> : ViewUserControl where TModel : class {
+ private AjaxHelper<TModel> _ajaxHelper;
+ private HtmlHelper<TModel> _htmlHelper;
+ private ViewDataDictionary<TModel> _viewData;
+
+ public new AjaxHelper<TModel> Ajax {
+ get {
+ if (_ajaxHelper == null) {
+ _ajaxHelper = new AjaxHelper<TModel>(ViewContext, this);
+ }
+ return _ajaxHelper;
+ }
+ }
+
+ public new HtmlHelper<TModel> Html {
+ get {
+ if (_htmlHelper == null) {
+ _htmlHelper = new HtmlHelper<TModel>(ViewContext, this);
+ }
+ return _htmlHelper;
+ }
+ }
+
+ public new TModel Model {
+ get {
+ return ViewData.Model;
+ }
+ }
+
+ [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+ public new ViewDataDictionary<TModel> ViewData {
+ get {
+ EnsureViewData();
+ return _viewData;
+ }
+ set {
+ SetViewData(value);
+ }
+ }
+
+ protected override void SetViewData(ViewDataDictionary viewData) {
+ _viewData = new ViewDataDictionary<TModel>(viewData);
+
+ base.SetViewData(_viewData);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/VirtualPathProviderViewEngine.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/VirtualPathProviderViewEngine.cs
new file mode 100644
index 0000000..d650d62
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/VirtualPathProviderViewEngine.cs
@@ -0,0 +1,201 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Globalization;
+ using System.Linq;
+ using System.Web;
+ using System.Web.Hosting;
+ using System.Web.Mvc.Resources;
+
+ public abstract class VirtualPathProviderViewEngine : IViewEngine {
+ // format is ":ViewCacheEntry:{cacheType}:{prefix}:{name}:{controllerName}:"
+ private const string _cacheKeyFormat = ":ViewCacheEntry:{0}:{1}:{2}:{3}:";
+ private const string _cacheKeyPrefix_Master = "Master";
+ private const string _cacheKeyPrefix_Partial = "Partial";
+ private const string _cacheKeyPrefix_View = "View";
+ private static readonly string[] _emptyLocations = new string[0];
+
+ private VirtualPathProvider _vpp;
+
+ [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
+ public string[] MasterLocationFormats {
+ get;
+ set;
+ }
+
+ [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
+ public string[] PartialViewLocationFormats {
+ get;
+ set;
+ }
+
+ public IViewLocationCache ViewLocationCache {
+ get;
+ set;
+ }
+
+ [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
+ public string[] ViewLocationFormats {
+ get;
+ set;
+ }
+
+ protected VirtualPathProvider VirtualPathProvider {
+ get {
+ if (_vpp == null) {
+ _vpp = HostingEnvironment.VirtualPathProvider;
+ }
+ return _vpp;
+ }
+ set {
+ _vpp = value;
+ }
+ }
+
+ protected VirtualPathProviderViewEngine() {
+ if (HttpContext.Current == null || HttpContext.Current.IsDebuggingEnabled) {
+ ViewLocationCache = DefaultViewLocationCache.Null;
+ }
+ else {
+ ViewLocationCache = new DefaultViewLocationCache();
+ }
+ }
+
+ private string CreateCacheKey(string prefix, string name, string controllerName) {
+ return String.Format(CultureInfo.InvariantCulture, _cacheKeyFormat,
+ GetType().AssemblyQualifiedName, prefix, name, controllerName);
+ }
+
+ protected abstract IView CreatePartialView(ControllerContext controllerContext, string partialPath);
+
+ protected abstract IView CreateView(ControllerContext controllerContext, string viewPath, string masterPath);
+
+ protected virtual bool FileExists(ControllerContext controllerContext, string virtualPath) {
+ return VirtualPathProvider.FileExists(virtualPath);
+ }
+
+ public virtual ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+ if (String.IsNullOrEmpty(partialViewName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "partialViewName");
+ }
+
+ string[] searched;
+ string controllerName = controllerContext.RouteData.GetRequiredString("controller");
+ string partialPath = GetPath(controllerContext, PartialViewLocationFormats, "PartialViewLocationFormats", partialViewName, controllerName, _cacheKeyPrefix_Partial, useCache, out searched);
+
+ if (String.IsNullOrEmpty(partialPath)) {
+ return new ViewEngineResult(searched);
+ }
+
+ return new ViewEngineResult(CreatePartialView(controllerContext, partialPath), this);
+ }
+
+ public virtual ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache) {
+ if (controllerContext == null) {
+ throw new ArgumentNullException("controllerContext");
+ }
+ if (String.IsNullOrEmpty(viewName)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "viewName");
+ }
+
+ string[] viewLocationsSearched;
+ string[] masterLocationsSearched;
+
+ string controllerName = controllerContext.RouteData.GetRequiredString("controller");
+ string viewPath = GetPath(controllerContext, ViewLocationFormats, "ViewLocationFormats", viewName, controllerName, _cacheKeyPrefix_View, useCache, out viewLocationsSearched);
+ string masterPath = GetPath(controllerContext, MasterLocationFormats, "MasterLocationFormats", masterName, controllerName, _cacheKeyPrefix_Master, useCache, out masterLocationsSearched);
+
+ if (String.IsNullOrEmpty(viewPath) || (String.IsNullOrEmpty(masterPath) && !String.IsNullOrEmpty(masterName))) {
+ return new ViewEngineResult(viewLocationsSearched.Union(masterLocationsSearched));
+ }
+
+ return new ViewEngineResult(CreateView(controllerContext, viewPath, masterPath), this);
+ }
+
+ private string GetPath(ControllerContext controllerContext, string[] locations, string locationsPropertyName, string name, string controllerName, string cacheKeyPrefix, bool useCache, out string[] searchedLocations) {
+ searchedLocations = _emptyLocations;
+
+ if (String.IsNullOrEmpty(name)) {
+ return String.Empty;
+ }
+
+ if (locations == null || locations.Length == 0) {
+ throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture,
+ MvcResources.Common_PropertyCannotBeNullOrEmpty, locationsPropertyName));
+ }
+
+ bool nameRepresentsPath = IsSpecificPath(name);
+ string cacheKey = CreateCacheKey(cacheKeyPrefix, name, (nameRepresentsPath) ? String.Empty : controllerName);
+
+ if (useCache) {
+ string result = ViewLocationCache.GetViewLocation(controllerContext.HttpContext, cacheKey);
+ if (result != null) {
+ return result;
+ }
+ }
+
+ return (nameRepresentsPath) ?
+ GetPathFromSpecificName(controllerContext, name, cacheKey, ref searchedLocations) :
+ GetPathFromGeneralName(controllerContext, locations, name, controllerName, cacheKey, ref searchedLocations);
+ }
+
+ private string GetPathFromGeneralName(ControllerContext controllerContext, string[] locations, string name, string controllerName, string cacheKey, ref string[] searchedLocations) {
+ string result = String.Empty;
+ searchedLocations = new string[locations.Length];
+
+ for (int i = 0; i < locations.Length; i++) {
+ string virtualPath = String.Format(CultureInfo.InvariantCulture, locations[i], name, controllerName);
+
+ if (FileExists(controllerContext, virtualPath)) {
+ searchedLocations = _emptyLocations;
+ result = virtualPath;
+ ViewLocationCache.InsertViewLocation(controllerContext.HttpContext, cacheKey, result);
+ break;
+ }
+
+ searchedLocations[i] = virtualPath;
+ }
+
+ return result;
+ }
+
+ private string GetPathFromSpecificName(ControllerContext controllerContext, string name, string cacheKey, ref string[] searchedLocations) {
+ string result = name;
+
+ if (!FileExists(controllerContext, name)) {
+ result = String.Empty;
+ searchedLocations = new[] { name };
+ }
+
+ ViewLocationCache.InsertViewLocation(controllerContext.HttpContext, cacheKey, result);
+ return result;
+ }
+
+ private static bool IsSpecificPath(string name) {
+ char c = name[0];
+ return (c == '~' || c == '/');
+ }
+
+ public virtual void ReleaseView(ControllerContext controllerContext, IView view) {
+ IDisposable disposable = view as IDisposable;
+ if (disposable != null) {
+ disposable.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/WebFormView.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/WebFormView.cs
new file mode 100644
index 0000000..446db7f
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/WebFormView.cs
@@ -0,0 +1,109 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System;
+ using System.Globalization;
+ using System.IO;
+ using System.Web.Mvc.Resources;
+
+ public class WebFormView : IView {
+
+ private IBuildManager _buildManager;
+
+ public WebFormView(string viewPath)
+ : this(viewPath, null) {
+ }
+
+ public WebFormView(string viewPath, string masterPath) {
+ if (String.IsNullOrEmpty(viewPath)) {
+ throw new ArgumentException(MvcResources.Common_NullOrEmpty, "viewPath");
+ }
+
+ ViewPath = viewPath;
+ MasterPath = masterPath ?? String.Empty;
+ }
+
+ internal IBuildManager BuildManager {
+ get {
+ if (_buildManager == null) {
+ _buildManager = new BuildManagerWrapper();
+ }
+ return _buildManager;
+ }
+ set {
+ _buildManager = value;
+ }
+ }
+
+ public string MasterPath {
+ get;
+ private set;
+ }
+
+ public string ViewPath {
+ get;
+ private set;
+ }
+
+ public virtual void Render(ViewContext viewContext, TextWriter writer) {
+ if (viewContext == null) {
+ throw new ArgumentNullException("viewContext");
+ }
+
+ object viewInstance = BuildManager.CreateInstanceFromVirtualPath(ViewPath, typeof(object));
+ if (viewInstance == null) {
+ throw new InvalidOperationException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.WebFormViewEngine_ViewCouldNotBeCreated,
+ ViewPath));
+ }
+
+ ViewPage viewPage = viewInstance as ViewPage;
+ if (viewPage != null) {
+ RenderViewPage(viewContext, viewPage);
+ return;
+ }
+
+ ViewUserControl viewUserControl = viewInstance as ViewUserControl;
+ if (viewUserControl != null) {
+ RenderViewUserControl(viewContext, viewUserControl);
+ return;
+ }
+
+ throw new InvalidOperationException(
+ String.Format(
+ CultureInfo.CurrentUICulture,
+ MvcResources.WebFormViewEngine_WrongViewBase,
+ ViewPath));
+ }
+
+ private void RenderViewPage(ViewContext context, ViewPage page) {
+ if (!String.IsNullOrEmpty(MasterPath)) {
+ page.MasterLocation = MasterPath;
+ }
+
+ page.ViewData = context.ViewData;
+ page.RenderView(context);
+ }
+
+ private void RenderViewUserControl(ViewContext context, ViewUserControl control) {
+ if (!String.IsNullOrEmpty(MasterPath)) {
+ throw new InvalidOperationException(MvcResources.WebFormViewEngine_UserControlCannotHaveMaster);
+ }
+
+ control.ViewData = context.ViewData;
+ control.RenderView(context);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mvc/System.Web.Mvc/WebFormViewEngine.cs b/mcs/class/System.Web.Mvc/System.Web.Mvc/WebFormViewEngine.cs
new file mode 100644
index 0000000..3134b48
--- /dev/null
+++ b/mcs/class/System.Web.Mvc/System.Web.Mvc/WebFormViewEngine.cs
@@ -0,0 +1,81 @@
+/* ****************************************************************************
+ *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *
+ * This software is subject to the Microsoft Public License (Ms-PL).
+ * A copy of the license can be found in the license.htm file included
+ * in this distribution.
+ *
+ * You must not remove this notice, or any other, from this software.
+ *
+ * ***************************************************************************/
+
+namespace System.Web.Mvc {
+ using System.Diagnostics.CodeAnalysis;
+ using System.Net;
+ using System.Web;
+
+ public class WebFormViewEngine : VirtualPathProviderViewEngine {
+
+ private IBuildManager _buildManager;
+
+ public WebFormViewEngine() {
+ MasterLocationFormats = new[] {
+ "~/Views/{1}/{0}.master",
+ "~/Views/Shared/{0}.master"
+ };
+
+ ViewLocationFormats = new[] {
+ "~/Views/{1}/{0}.aspx",
+ "~/Views/{1}/{0}.ascx",
+ "~/Views/Shared/{0}.aspx",
+ "~/Views/Shared/{0}.ascx"
+ };
+
+ PartialViewLocationFormats = ViewLocationFormats;
+ }
+
+ internal IBuildManager BuildManager {
+ get {
+ if (_buildManager == null) {
+ _buildManager = new BuildManagerWrapper();
+ }
+ return _buildManager;
+ }
+ set {
+ _buildManager = value;
+ }
+ }
+
+ protected override IView CreatePartialView(ControllerContext controllerContext, string partialPath) {
+ return new WebFormView(partialPath, null);
+ }
+
+ protected override IView CreateView(ControllerContext controllerContext, string viewPath, string masterPath) {
+ return new WebFormView(viewPath, masterPath);
+ }
+
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes",
+ Justification = "Exceptions are interpreted as indicating that the file does not exist.")]
+ protected override bool FileExists(ControllerContext controllerContext, string virtualPath) {
+ try {
+ object viewInstance = BuildManager.CreateInstanceFromVirtualPath(virtualPath, typeof(object));
+
+ return viewInstance != null;
+ }
+ catch (HttpException he) {
+ if (he.GetHttpCode() == (int)HttpStatusCode.NotFound) {
+ // If BuildManager returns a 404 (Not Found) that means the file did not exist
+ return false;
+ }
+ else {
+ // All other error codes imply other errors such as compilation or parsing errors
+ throw;
+ }
+ }
+ catch {
+ return false;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Routing/ChangeLog b/mcs/class/System.Web.Routing/ChangeLog
index ec260b6..2fa743e 100644
--- a/mcs/class/System.Web.Routing/ChangeLog
+++ b/mcs/class/System.Web.Routing/ChangeLog
@@ -1,3 +1,22 @@
+2009-05-27 Marek Habersack <mhabersack at novell.com>
+
+ * Makefile (LIB_MCS_FLAGS): added support for defining the DEBUG
+ symbol on compiler command line.
+
+2009-05-25 Marek Habersack <mhabersack at novell.com>
+
+ * System.Web.Routing_test.dll.sources: added
+ System.Web.Routing/AssertExtensions.cs
+
+ * System.Web.Routing.dll.sources: added
+ System.Web.Routing/PatternParser.cs
+ System.Web.Routing/PatternToken.cs
+ System.Web.Routing/PatternTokenType.cs
+ System.Web.Routing/RouteValueDictionaryExtensions.cs
+
+ removed
+ System.Web.Routing/UrlPattern.cs
+
2008-10-16 Atsushi Enomoto <atsushi at ximian.com>
* System.Web.Routing_test.dll.sources:
diff --git a/mcs/class/System.Web.Routing/Makefile b/mcs/class/System.Web.Routing/Makefile
index c4b1395..f8495b9 100644
--- a/mcs/class/System.Web.Routing/Makefile
+++ b/mcs/class/System.Web.Routing/Makefile
@@ -14,6 +14,10 @@ ifeq (2.0, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:NET_3_5
endif
+ifdef DEBUG
+LIB_MCS_FLAGS += -define:DEBUG
+endif
+
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES =
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing.dll.sources b/mcs/class/System.Web.Routing/System.Web.Routing.dll.sources
index c89f33c..be16d0b 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing.dll.sources
+++ b/mcs/class/System.Web.Routing/System.Web.Routing.dll.sources
@@ -4,6 +4,9 @@ Assembly/AssemblyInfo.cs
System.Web.Routing/HttpMethodConstraint.cs
System.Web.Routing/IRouteConstraint.cs
System.Web.Routing/IRouteHandler.cs
+System.Web.Routing/PatternParser.cs
+System.Web.Routing/PatternToken.cs
+System.Web.Routing/PatternTokenType.cs
System.Web.Routing/RequestContext.cs
System.Web.Routing/Route.cs
System.Web.Routing/RouteBase.cs
@@ -12,8 +15,8 @@ System.Web.Routing/RouteData.cs
System.Web.Routing/RouteDirection.cs
System.Web.Routing/RouteTable.cs
System.Web.Routing/RouteValueDictionary.cs
+System.Web.Routing/RouteValueDictionaryExtensions.cs
System.Web.Routing/StopRoutingHandler.cs
-System.Web.Routing/UrlPattern.cs
System.Web.Routing/UrlRoutingHandler.cs
System.Web.Routing/UrlRoutingModule.cs
System.Web.Routing/VirtualPathData.cs
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/ChangeLog b/mcs/class/System.Web.Routing/System.Web.Routing/ChangeLog
index 0473ba5..772598c 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/ChangeLog
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/ChangeLog
@@ -1,3 +1,73 @@
+2009-06-25 Marek Habersack <mhabersack at novell.com>
+
+ * PatternParser.cs: parameter name lookups must be
+ case-insensitive.
+ Null and empty (string) parameters are skipped when building query
+ part of the action path.
+
+2009-06-04 Marek Habersack <mhabersack at novell.com>
+
+ * RouteValueDictionaryExtensions.cs: if both values are strings in
+ Has (string, value), compare them case-insensitively. Fixes bug
+ #502555
+
+2009-05-27 Marek Habersack <mhabersack at novell.com>
+
+ * PatternParser.cs: if Match is passed an empty path, do not
+ attempt to match the Url segments, skip to defaults matching right
+ away.
+
+2009-05-25 Marek Habersack <mhabersack at novell.com>
+
+ * UrlPattern.cs: removed - replaced by PatternParser below.
+
+ * RouteValueDictionaryExtensions.cs: added - some shortcuts for
+ using RouteValueDictionary in PatternParser
+
+ * Route.cs: use the new PatternParser.
+ Factored out ProcessConstraint into ProcessConstraintInternal so
+ that the latter can be used by the PatternParser class.
+ Added parameter checks in ProcessConstraint.
+
+ * PatternTokenType.cs: added
+
+ * PatternToken.cs: added a helper class for the pattern parser.
+
+ * PatternParser.cs: added. New implementation of url
+ parser/matcher/generator which fixes all URL isues known so
+ far. Fixes bug #504378
+
+2009-05-12 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * UrlPattern.cs: if the pattern is line {a}/{b} and {b} is substituted
+ by an empty string, remove the '/' too.
+
+2009-05-12 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * UrlPattern.cs: non-string default arguments work now.
+
+2009-05-12 Marek Habersack <mhabersack at novell.com>
+
+ * UrlPattern.cs: TrySubstitute performs substitution trimming. If
+ a segment would be set to a default value and all of its following
+ segments as well, it will be omitted from the generated URL. The
+ value comparison is done case-insensitively when the dictionary
+ values are strings. Fixes bug #502555
+
+2009-05-11 Marek Habersack <mhabersack at novell.com>
+
+ * UrlPattern.cs: TrySubstitute treats defaults differently
+ now. They are not consulted when checking if the passed values
+ match the pattern, but only when substituting the values. Fixes
+ bug #502555
+
+2009-05-05 Marek Habersack <mhabersack at novell.com>
+
+ * UrlPattern.cs: Match adds defaults values should some keys be
+ missing from the url. Fixes bug #500739
+
+ * Route.cs: a small GetRouteData loop optimization
+
2009-02-18 Marek Habersack <mhabersack at novell.com>
* UrlPattern.cs: TrySubstitute now gets the collection of default
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/PatternParser.cs b/mcs/class/System.Web.Routing/System.Web.Routing/PatternParser.cs
new file mode 100644
index 0000000..44f7e1a
--- /dev/null
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/PatternParser.cs
@@ -0,0 +1,525 @@
+//
+// PatternParser.cs
+//
+// Author:
+// Atsushi Enomoto <atsushi at ximian.com>
+// Marek Habersack <mhabersack at novell.com>
+//
+// Copyright (C) 2008-2009 Novell Inc. http://novell.com
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Security.Permissions;
+using System.Text;
+using System.Web;
+using System.Web.Util;
+
+namespace System.Web.Routing
+{
+ sealed class PatternParser
+ {
+ struct PatternSegment
+ {
+ public bool AllLiteral;
+ public List <PatternToken> Tokens;
+ }
+
+ static readonly char[] placeholderDelimiters = { '{', '}' };
+
+ PatternSegment[] segments;
+ Dictionary <string, bool> parameterNames;
+ PatternToken[] tokens;
+
+ int segmentCount;
+ bool haveSegmentWithCatchAll;
+
+ public string Url {
+ get;
+ private set;
+ }
+
+ public PatternParser (string pattern)
+ {
+ this.Url = pattern;
+ Parse ();
+ }
+
+ void Parse ()
+ {
+ string url = Url;
+
+ if (String.IsNullOrEmpty (url))
+ throw new SystemException ("INTERNAL ERROR: it should not try to parse null or empty string");
+ if (url [0] == '~' || url [0] == '/')
+ throw new ArgumentException ("Url must not start with '~' or '/'");
+ if (url.IndexOf ('?') >= 0)
+ throw new ArgumentException ("Url must not contain '?'");
+
+ string[] parts = url.Split ('/');
+ int partsCount = segmentCount = parts.Length;
+ var allTokens = new List <PatternToken> ();
+ PatternToken tmpToken;
+
+ segments = new PatternSegment [partsCount];
+ parameterNames = new Dictionary <string, bool> (StringComparer.OrdinalIgnoreCase);
+
+ for (int i = 0; i < partsCount; i++) {
+ if (haveSegmentWithCatchAll)
+ throw new ArgumentException ("A catch-all parameter can only appear as the last segment of the route URL");
+
+ int catchAlls = 0;
+ string part = parts [i];
+ int partLength = part.Length;
+ var tokens = new List <PatternToken> ();
+
+ if (partLength == 0 && i < partsCount - 1)
+ throw new ArgumentException ("Consecutive URL segment separators '/' are not allowed");
+
+ if (part.IndexOf ("{}") != -1)
+ throw new ArgumentException ("Empty URL parameter name is not allowed");
+
+ if (i > 0)
+ allTokens.Add (null);
+
+ if (part.IndexOfAny (placeholderDelimiters) == -1) {
+ // no placeholders here, short-circuit it
+ tmpToken = new PatternToken (PatternTokenType.Literal, part);
+ tokens.Add (tmpToken);
+ allTokens.Add (tmpToken);
+ segments [i].AllLiteral = true;
+ segments [i].Tokens = tokens;
+ continue;
+ }
+
+ string tmp;
+ int from = 0, start;
+ bool allLiteral = true;
+ while (from < partLength) {
+ start = part.IndexOf ('{', from);
+ if (start >= partLength - 2)
+ throw new ArgumentException ("Unterminated URL parameter. It must contain matching '}'");
+
+ if (start < 0) {
+ if (part.IndexOf ('}', from) >= from)
+ throw new ArgumentException ("Unmatched URL parameter closer '}'. A corresponding '{' must precede");
+ tmp = part.Substring (from);
+ tmpToken = new PatternToken (PatternTokenType.Literal, tmp);
+ tokens.Add (tmpToken);
+ allTokens.Add (tmpToken);
+ from += tmp.Length;
+ break;
+ }
+
+ if (from == 0 && start > 0) {
+ tmpToken = new PatternToken (PatternTokenType.Literal, part.Substring (0, start));
+ tokens.Add (tmpToken);
+ allTokens.Add (tmpToken);
+ }
+
+ int end = part.IndexOf ('}', start + 1);
+ int next = part.IndexOf ('{', start + 1);
+
+ if (end < 0 || next >= 0 && next < end)
+ throw new ArgumentException ("Unterminated URL parameter. It must contain matching '}'");
+ if (next == end + 1)
+ throw new ArgumentException ("Two consecutive URL parameters are not allowed. Split into a different segment by '/', or a literal string.");
+
+ if (next == -1)
+ next = partLength;
+
+ string token = part.Substring (start + 1, end - start - 1);
+ PatternTokenType type;
+ if (token [0] == '*') {
+ catchAlls++;
+ haveSegmentWithCatchAll = true;
+ type = PatternTokenType.CatchAll;
+ token = token.Substring (1);
+ } else
+ type = PatternTokenType.Standard;
+
+ if (!parameterNames.ContainsKey (token))
+ parameterNames.Add (token, true);
+
+ tmpToken = new PatternToken (type, token);
+ tokens.Add (tmpToken);
+ allTokens.Add (tmpToken);
+ allLiteral = false;
+
+ if (end < partLength - 1) {
+ token = part.Substring (end + 1, next - end - 1);
+ tmpToken = new PatternToken (PatternTokenType.Literal, token);
+ tokens.Add (tmpToken);
+ allTokens.Add (tmpToken);
+ end += token.Length;
+ }
+
+ if (catchAlls > 1 || (catchAlls == 1 && tokens.Count > 1))
+ throw new ArgumentException ("A path segment that contains more than one section, such as a literal section or a parameter, cannot contain a catch-all parameter.");
+ from = end + 1;
+ }
+
+ segments [i].AllLiteral = allLiteral;
+ segments [i].Tokens = tokens;
+ }
+
+ if (allTokens.Count > 0)
+ this.tokens = allTokens.ToArray ();
+ allTokens = null;
+ }
+
+ RouteValueDictionary AddDefaults (RouteValueDictionary dict, RouteValueDictionary defaults)
+ {
+ if (defaults != null && defaults.Count > 0) {
+ string key;
+ foreach (var def in defaults) {
+ key = def.Key;
+ if (dict.ContainsKey (key))
+ continue;
+ dict.Add (key, def.Value);
+ }
+ }
+
+ return dict;
+ }
+
+ public RouteValueDictionary Match (string path, RouteValueDictionary defaults)
+ {
+ var ret = new RouteValueDictionary ();
+ string url = Url;
+ string [] argSegs;
+ int argsCount;
+
+ if (String.IsNullOrEmpty (path)) {
+ argSegs = null;
+ argsCount = 0;
+ } else {
+ // quick check
+ if (String.Compare (url, path, StringComparison.Ordinal) == 0 && url.IndexOf ('{') < 0)
+ return AddDefaults (ret, defaults);
+
+ argSegs = path.Split ('/');
+ argsCount = argSegs.Length;
+ }
+
+ bool haveDefaults = defaults != null && defaults.Count > 0;
+
+ if (argsCount == 1 && String.IsNullOrEmpty (argSegs [0]))
+ argsCount = 0;
+
+ if (!haveDefaults && ((haveSegmentWithCatchAll && argsCount < segmentCount) || (!haveSegmentWithCatchAll && argsCount != segmentCount)))
+ return null;
+
+ int i = 0;
+
+ foreach (PatternSegment segment in segments) {
+ if (i >= argsCount)
+ break;
+
+ if (segment.AllLiteral) {
+ if (String.Compare (argSegs [i], segment.Tokens [0].Name, StringComparison.OrdinalIgnoreCase) != 0)
+ return null;
+ i++;
+ continue;
+ }
+
+ string pathSegment = argSegs [i];
+ int pathSegmentLength = pathSegment != null ? pathSegment.Length : -1;
+ int pathIndex = 0;
+ PatternTokenType tokenType;
+ List <PatternToken> tokens = segment.Tokens;
+ int tokensCount = tokens.Count;
+
+ // Process the path segments ignoring the defaults
+ for (int tokenIndex = 0; tokenIndex < tokensCount; tokenIndex++) {
+ var token = tokens [tokenIndex];
+ if (pathIndex > pathSegmentLength - 1)
+ return null;
+
+ tokenType = token.Type;
+ var tokenName = token.Name;
+
+ // Catch-all
+ if (i > segmentCount - 1 || tokenType == PatternTokenType.CatchAll) {
+ if (tokenType != PatternTokenType.CatchAll)
+ return null;
+
+ StringBuilder sb = new StringBuilder ();
+ for (int j = i; j < argsCount; j++) {
+ if (j > i)
+ sb.Append ('/');
+ sb.Append (argSegs [j]);
+ }
+
+ ret.Add (tokenName, sb.ToString ());
+ break;
+ }
+
+ // Literal sections
+ if (token.Type == PatternTokenType.Literal) {
+ int nameLen = tokenName.Length;
+ if (pathSegmentLength < nameLen || String.Compare (pathSegment, pathIndex, tokenName, 0, nameLen, StringComparison.OrdinalIgnoreCase) != 0)
+ return null;
+ pathIndex += nameLen;
+ continue;
+ }
+
+ int nextTokenIndex = tokenIndex + 1;
+ if (nextTokenIndex >= tokensCount) {
+ // Last token
+ ret.Add (tokenName, pathSegment.Substring (pathIndex));
+ continue;
+ }
+
+ // Next token is a literal - greedy matching. It seems .NET
+ // uses a simple and naive algorithm here which finds the
+ // last ocurrence of the next section literal and assigns
+ // everything before that to this token. See the
+ // GetRouteData28 test in RouteTest.cs
+ var nextToken = tokens [nextTokenIndex];
+ string nextTokenName = nextToken.Name;
+ int lastIndex = pathSegment.LastIndexOf (nextTokenName, pathSegmentLength - 1, pathSegmentLength - pathIndex, StringComparison.OrdinalIgnoreCase);
+ if (lastIndex == -1)
+ return null;
+
+ int copyLength = lastIndex - pathIndex;
+ string sectionValue = pathSegment.Substring (pathIndex, copyLength);
+ if (String.IsNullOrEmpty (sectionValue))
+ return null;
+
+ ret.Add (tokenName, sectionValue);
+ pathIndex += copyLength;
+ }
+ i++;
+ }
+
+ // Check the remaining segments, if any, and see if they are required
+ //
+ // If a segment has more than one section (i.e. there's at least one
+ // literal, then it cannot match defaults
+ //
+ // All of the remaining segments must have all defaults provided and they
+ // must not be literals or the match will fail.
+ if (i < segmentCount) {
+ if (!haveDefaults)
+ return null;
+
+ for (;i < segmentCount; i++) {
+ var segment = segments [i];
+ if (segment.AllLiteral)
+ return null;
+
+ var tokens = segment.Tokens;
+ if (tokens.Count != 1)
+ return null;
+
+ if (!defaults.ContainsKey (tokens [0].Name))
+ return null;
+ }
+ }
+
+ return AddDefaults (ret, defaults);
+ }
+
+ public bool BuildUrl (Route route, RequestContext requestContext, RouteValueDictionary userValues, out string value)
+ {
+ value = null;
+ if (requestContext == null)
+ return false;
+
+ RouteData routeData = requestContext.RouteData;
+ RouteValueDictionary defaultValues = route != null ? route.Defaults : null;
+ RouteValueDictionary ambientValues = routeData.Values;
+
+ if (defaultValues != null && defaultValues.Count == 0)
+ defaultValues = null;
+ if (ambientValues != null && ambientValues.Count == 0)
+ ambientValues = null;
+ if (userValues != null && userValues.Count == 0)
+ userValues = null;
+
+ // Check URL parameters
+ // It is allowed to take ambient values for required parameters if:
+ //
+ // - there are no default values provided
+ // - the default values dictionary contains at least one required
+ // parameter value
+ //
+ bool canTakeFromAmbient;
+ if (defaultValues == null)
+ canTakeFromAmbient = true;
+ else {
+ canTakeFromAmbient = false;
+ foreach (KeyValuePair <string, bool> de in parameterNames) {
+ if (defaultValues.ContainsKey (de.Key)) {
+ canTakeFromAmbient = true;
+ break;
+ }
+ }
+ }
+
+ bool allMustBeInUserValues = false;
+ foreach (KeyValuePair <string, bool> de in parameterNames) {
+ string parameterName = de.Key;
+ // Is the parameter required?
+ if (defaultValues == null || !defaultValues.ContainsKey (parameterName)) {
+ // Yes, it is required (no value in defaults)
+ // Has the user provided value for it?
+ if (userValues == null || !userValues.ContainsKey (parameterName)) {
+ if (allMustBeInUserValues)
+ return false; // partial override => no match
+
+ if (!canTakeFromAmbient || ambientValues == null || !ambientValues.ContainsKey (parameterName))
+ return false; // no value provided => no match
+ } else if (canTakeFromAmbient)
+ allMustBeInUserValues = true;
+ }
+ }
+
+ // Check for non-url parameters
+ if (defaultValues != null) {
+ foreach (var de in defaultValues) {
+ string parameterName = de.Key;
+
+ if (parameterNames.ContainsKey (parameterName))
+ continue;
+
+ object parameterValue = null;
+ // Has the user specified value for this parameter and, if
+ // yes, is it the same as the one in defaults?
+ if (userValues != null && userValues.TryGetValue (parameterName, out parameterValue)) {
+ object defaultValue = de.Value;
+ if (defaultValue is string && parameterValue is string) {
+ if (String.Compare ((string)defaultValue, (string)parameterValue, StringComparison.Ordinal) != 0)
+ return false; // different value => no match
+ } else if (defaultValue != parameterValue)
+ return false; // different value => no match
+ }
+ }
+ }
+
+ // Check the constraints
+ RouteValueDictionary constraints = route != null ? route.Constraints : null;
+ if (constraints != null && constraints.Count > 0) {
+ HttpContextBase context = requestContext.HttpContext;
+ bool invalidConstraint;
+
+ foreach (var de in constraints) {
+ if (!Route.ProcessConstraintInternal (context, route, de.Value, de.Key, userValues, RouteDirection.UrlGeneration, out invalidConstraint) ||
+ invalidConstraint)
+ return false; // constraint not met => no match
+ }
+ }
+
+ // We're a match, generate the URL
+ var ret = new StringBuilder ();
+ bool canTrim = true;
+
+ // Going in reverse order, so that we can trim without much ado
+ int tokensCount = tokens.Length - 1;
+ for (int i = tokensCount; i >= 0; i--) {
+ PatternToken token = tokens [i];
+ if (token == null) {
+ if (i < tokensCount && ret.Length > 0 && ret [0] != '/')
+ ret.Insert (0, '/');
+ continue;
+ }
+
+ if (token.Type == PatternTokenType.Literal) {
+ ret.Insert (0, token.Name);
+ continue;
+ }
+
+ string parameterName = token.Name;
+ object tokenValue;
+
+ if (userValues.GetValue (parameterName, out tokenValue)) {
+ if (!defaultValues.Has (parameterName, tokenValue)) {
+ canTrim = false;
+ if (tokenValue != null)
+ ret.Insert (0, tokenValue.ToString ());
+ continue;
+ }
+
+ if (!canTrim && tokenValue != null)
+ ret.Insert (0, tokenValue.ToString ());
+ continue;
+ }
+
+ if (defaultValues.GetValue (parameterName, out tokenValue)) {
+ object ambientTokenValue;
+ if (ambientValues.GetValue (parameterName, out ambientTokenValue))
+ tokenValue = ambientTokenValue;
+
+ if (!canTrim && tokenValue != null)
+ ret.Insert (0, tokenValue.ToString ());
+ continue;
+ }
+
+ canTrim = false;
+ if (ambientValues.GetValue (parameterName, out tokenValue)) {
+ if (tokenValue != null)
+ ret.Insert (0, tokenValue.ToString ());
+ continue;
+ }
+ }
+
+ // All the values specified in userValues that aren't part of the original
+ // URL, the constraints or defaults collections are treated as overflow
+ // values - they are appended as query parameters to the URL
+ if (userValues != null) {
+ bool first = true;
+ foreach (var de in userValues) {
+ string parameterName = de.Key;
+
+ if (parameterNames.ContainsKey (parameterName) || defaultValues.Has (parameterName) || constraints.Has (parameterName))
+ continue;
+
+ object parameterValue = de.Value;
+ if (parameterValue == null)
+ continue;
+
+ var parameterValueAsString = parameterValue as string;
+ if (parameterValueAsString != null && parameterValueAsString.Length == 0)
+ continue;
+
+ if (first) {
+ ret.Append ('?');
+ first = false;
+ } else
+ ret.Append ('&');
+
+
+ ret.Append (Uri.EscapeDataString (parameterName));
+ ret.Append ('=');
+ if (parameterValue != null)
+ ret.Append (Uri.EscapeDataString (de.Value.ToString ()));
+ }
+ }
+
+ value = ret.ToString ();
+ return true;
+ }
+ }
+}
+
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/PatternToken.cs b/mcs/class/System.Web.Routing/System.Web.Routing/PatternToken.cs
new file mode 100644
index 0000000..5f40cee
--- /dev/null
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/PatternToken.cs
@@ -0,0 +1,81 @@
+//
+// PatternToken.cs
+//
+// Author:
+// Marek Habersack <mhabersack at novell.com>
+//
+// Copyright (C) 2009 Novell Inc. http://novell.com
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Text;
+using System.Web;
+
+namespace System.Web.Routing
+{
+ sealed class PatternToken
+ {
+ public PatternTokenType Type {
+ get;
+ private set;
+ }
+
+ public string Name {
+ get;
+ private set;
+ }
+
+ public PatternToken (PatternTokenType type, string name)
+ {
+ this.Type = type;
+ this.Name = name;
+ }
+
+ public override string ToString ()
+ {
+ StringBuilder sb = new StringBuilder ();
+
+ switch (Type) {
+ case PatternTokenType.Standard:
+ sb.Append ("PatternToken_Standard");
+ break;
+
+ case PatternTokenType.Literal:
+ sb.Append ("PatternToken_Literal");
+ break;
+
+ case PatternTokenType.CatchAll:
+ sb.Append ("PatternToken_CatchAll");
+ break;
+
+ default:
+ sb.Append ("PatternToken_UNKNOWN");
+ break;
+ }
+
+ sb.AppendFormat (" [Name = '{0}']", Name);
+
+ return sb.ToString ();
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/PatternTokenType.cs b/mcs/class/System.Web.Routing/System.Web.Routing/PatternTokenType.cs
new file mode 100644
index 0000000..7321ca1
--- /dev/null
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/PatternTokenType.cs
@@ -0,0 +1,40 @@
+//
+// PatternTokenType.cs
+//
+// Author:
+// Marek Habersack <mhabersack at novell.com>
+//
+// Copyright (C) 2009 Novell Inc. http://novell.com
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+
+namespace System.Web.Routing
+{
+ enum PatternTokenType
+ {
+ Standard,
+ Literal,
+ CatchAll
+ }
+}
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs b/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
index 3ab7c88..753d606 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
@@ -38,7 +38,7 @@ namespace System.Web.Routing
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class Route : RouteBase
{
- UrlPattern url;
+ PatternParser url;
public RouteValueDictionary Constraints { get; set; }
@@ -50,7 +50,7 @@ namespace System.Web.Routing
public string Url {
get { return url != null ? url.Url : String.Empty; }
- set { url = value != null ? new UrlPattern (value) : null; }
+ set { url = value != null ? new PatternParser (value) : null; }
}
public Route (string url, IRouteHandler routeHandler)
@@ -101,8 +101,11 @@ namespace System.Web.Routing
return null;
var rd = new RouteData (this, RouteHandler);
+ RouteValueDictionary rdValues = rd.Values;
+
foreach (var p in values)
- rd.Values.Add (p.Key, p.Value);
+ rdValues.Add (p.Key, p.Value);
+
return rd;
}
@@ -114,29 +117,52 @@ namespace System.Web.Routing
return new VirtualPathData (this, String.Empty);
// null values is allowed.
- if (values == null)
- values = requestContext.RouteData.Values;
+ // if (values == null)
+ // values = requestContext.RouteData.Values;
string s;
- if (!url.TrySubstitute (values, Defaults, out s))
+ if (!url.BuildUrl (this, requestContext, values, out s))
return null;
return new VirtualPathData (this, s);
}
- protected virtual bool ProcessConstraint (HttpContextBase httpContext, object constraint, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
+ internal static bool ProcessConstraintInternal (HttpContextBase httpContext, Route route, object constraint, string parameterName,
+ RouteValueDictionary values, RouteDirection routeDirection, out bool invalidConstraint)
{
+ invalidConstraint = false;
IRouteConstraint irc = constraint as IRouteConstraint;
if (irc != null)
- return irc.Match (httpContext, this, parameterName, values, routeDirection);
+ return irc.Match (httpContext, route, parameterName, values, routeDirection);
string s = constraint as string;
if (s != null) {
string v = values [parameterName] as string;
- return Regex.Match (v, s).Success;
+ if (!String.IsNullOrEmpty (v))
+ return Regex.Match (v, s).Success;
+ return false;
}
- throw new InvalidOperationException (String.Format ("Constraint parameter '{0}' must be either a string or an IRouteConstraint instance", parameterName));
+ invalidConstraint = true;
+ return false;
+ }
+
+ protected virtual bool ProcessConstraint (HttpContextBase httpContext, object constraint, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
+ {
+ if (parameterName == null)
+ throw new ArgumentNullException ("parameterName");
+
+ // .NET "compatibility"
+ if (values == null)
+ throw new NullReferenceException ();
+
+ bool invalidConstraint;
+ bool ret = ProcessConstraintInternal (httpContext, this, constraint, parameterName, values, routeDirection, out invalidConstraint);
+
+ if (invalidConstraint)
+ throw new InvalidOperationException (String.Format ("Constraint parameter '{0}' must be either a string or an IRouteConstraint instance", parameterName));
+
+ return ret;
}
}
}
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionaryExtensions.cs b/mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionaryExtensions.cs
new file mode 100644
index 0000000..1a1126b
--- /dev/null
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionaryExtensions.cs
@@ -0,0 +1,99 @@
+//
+// PatternParser.cs
+//
+// Author:
+// Marek Habersack <mhabersack at novell.com>
+//
+// Copyright (C) 2009 Novell Inc. http://novell.com
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+
+namespace System.Web.Routing
+{
+ static class RouteValueDictionaryExtensions
+ {
+ public static bool Has (this RouteValueDictionary dict, string key)
+ {
+ if (dict == null)
+ return false;
+
+ return dict.ContainsKey (key);
+ }
+
+ public static bool Has (this RouteValueDictionary dict, string key, object value)
+ {
+ if (dict == null)
+ return false;
+
+ object entryValue;
+ if (dict.TryGetValue (key, out entryValue)) {
+ if (value is string) {
+ if (!(entryValue is string))
+ return false;
+
+ string s1 = value as string;
+ string s2 = entryValue as string;
+ return String.Compare (s1, s2, StringComparison.OrdinalIgnoreCase) == 0;
+ }
+
+ return entryValue == null ? value == null : entryValue.Equals (value);
+ }
+
+ return false;
+ }
+
+ public static bool GetValue (this RouteValueDictionary dict, string key, out object value)
+ {
+ if (dict == null) {
+ value = null;
+ return false;
+ }
+
+ return dict.TryGetValue (key, out value);
+ }
+
+ [Conditional ("DEBUG")]
+ public static void Dump (this RouteValueDictionary dict, string name, string indent)
+ {
+ if (indent == null)
+ indent = String.Empty;
+
+ if (dict == null) {
+ Console.WriteLine (indent + "Dictionary '{0}' is null", name);
+ return;
+ }
+
+ if (dict.Count == 0) {
+ Console.WriteLine (indent + "Dictionary '{0}' is empty", name);
+ return;
+ }
+
+ Console.WriteLine (indent + "Dictionary '{0}':", name);
+ foreach (var de in dict)
+ Console.WriteLine (indent + "\t'{0}' == {1}", de.Key, de.Value);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/UrlPattern.cs b/mcs/class/System.Web.Routing/System.Web.Routing/UrlPattern.cs
deleted file mode 100644
index 1e5897b..0000000
--- a/mcs/class/System.Web.Routing/System.Web.Routing/UrlPattern.cs
+++ /dev/null
@@ -1,236 +0,0 @@
-//
-// Route.cs
-//
-// Author:
-// Atsushi Enomoto <atsushi at ximian.com>
-//
-// Copyright (C) 2008 Novell Inc. http://novell.com
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections.Generic;
-using System.Security.Permissions;
-using System.Web;
-
-namespace System.Web.Routing
-{
- internal class UrlPattern
- {
- int segmentsCount;
- string [] segments;
- int [] segmentLengths;
- bool [] segment_flags;
- string [] tokens;
-
- public UrlPattern (string url)
- {
- Url = url;
- Parse ();
- }
-
- public string Url { get; private set; }
-
- void Parse ()
- {
- if (String.IsNullOrEmpty (Url))
- throw new SystemException ("INTERNAL ERROR: it should not try to parse null or empty string");
- if (Url [0] == '~' || Url [0] == '/')
- throw new ArgumentException ("Url must not start with '~' or '/'");
- if (Url.IndexOf ('?') >= 0)
- throw new ArgumentException ("Url must not contain '?'");
-
- var tokens = new List<string> ();
-
- segments = Url.Split ('/');
- segmentsCount = segments.Length;
- segment_flags = new bool [segmentsCount];
- segmentLengths = new int [segmentsCount];
-
- for (int i = 0; i < segmentsCount; i++) {
- string s = segments [i];
- int slen = s.Length;
- segmentLengths [i] = slen;
- if (slen == 0 && i < segmentsCount - 1)
- throw new ArgumentException ("Consecutive URL segment separators '/' are not allowed");
- int from = 0;
- while (from < slen) {
- int start = s.IndexOf ('{', from);
- if (start == slen - 1)
- throw new ArgumentException ("Unterminated URL parameter. It must contain matching '}'");
- if (start < 0) {
- if (s.IndexOf ('}', from) >= from)
- throw new ArgumentException ("Unmatched URL parameter closer '}'. A corresponding '{' must precede");
- from = slen;
- continue;
- }
- segment_flags [i] = true;
- int end = s.IndexOf ('}', start + 1);
- int next = s.IndexOf ('{', start + 1);
- if (end < 0 || next >= 0 && next < end)
- throw new ArgumentException ("Unterminated URL parameter. It must contain matching '}'");
- if (end == start + 1)
- throw new ArgumentException ("Empty URL parameter name is not allowed");
- if (next == end + 1)
- throw new ArgumentException ("Two consecutive URL parameters are not allowed. Split into a different segment by '/', or a literal string.");
- string token = s.Substring (start + 1, end - start - 1);
- if (!tokens.Contains (token))
- tokens.Add (token);
- from = end + 1;
- }
- }
-
- this.tokens = tokens.ToArray ();
- }
-
- string SegmentToKey (string segment)
- {
- int start = segment.IndexOf ('{');
- int end = segment.IndexOf ('}');
- if (start == -1)
- start = 0;
- else
- start++;
-
- if (end == -1)
- end = segment.Length;
- return segment.Substring (start, end - start);
- }
-
- RouteValueDictionary tmp = new RouteValueDictionary ();
- public RouteValueDictionary Match (string path, RouteValueDictionary defaults)
- {
- tmp.Clear ();
-
- // quick check
- if (Url == path && Url.IndexOf ('{') < 0)
- return tmp;
-
- string [] argSegs = path.Split ('/');
- int argsLen = argSegs.Length;
- bool haveDefaults = defaults != null && defaults.Count > 0;
- if (!haveDefaults && argsLen != segmentsCount)
- return null;
-
- for (int i = 0; i < segmentsCount; i++) {
- if (segment_flags [i]) {
- string t = segments [i];
- string v = i < argsLen ? argSegs [i] : null;
-
- if (String.IsNullOrEmpty (v)) {
- string key = SegmentToKey (segments [i]);
- object o;
- if (haveDefaults && !defaults.TryGetValue (key, out o))
- return null; // ends with '/' while more
- // tokens are expected and
- // there are is no default
- // value in the defaults
- // dictionary.
-
- v = o as string;
- if (v == null)
- throw new InvalidOperationException ("The RouteData must contain an item named '" + key + "' with a string value.");
- }
-
- int tfrom = 0, vfrom = 0;
- while (tfrom < t.Length) {
- int start = t.IndexOf ('{', tfrom);
- if (start < 0) {
- int tlen = t.Length - tfrom;
- int vlen = v.Length - vfrom;
- if (tlen != vlen ||
- String.Compare (t, tfrom, v, vfrom, tlen, StringComparison.Ordinal) != 0)
- return null; // mismatch
- break;
- }
-
- // if there is a string literal before next template item, check it in the value string.
- int len = start - tfrom;
- if (len > 0 && String.CompareOrdinal (t, tfrom, v, vfrom, len) != 0)
- return null; // mismatch
- vfrom += len;
-
- int end = t.IndexOf ('}', start + 1);
- int next = t.IndexOf ('{', end + 1);
- string key = t.Substring (start + 1, end - start - 1);
- string nextToken = next < 0 ? t.Substring (end + 1) : t.Substring (end + 1, next - end - 1);
- int vnext = nextToken.Length > 0 ? v.IndexOf (nextToken, vfrom + 1, StringComparison.Ordinal) : -1;
-
- if (next < 0) {
- var vs = vnext < 0 ? v.Substring (vfrom) : v.Substring (vfrom, vnext - vfrom);
- tmp.Add (key, vs);
- vfrom = vs.Length;
- } else {
- if (vnext < 0)
- return null; // mismatch
- tmp.Add (key, v.Substring (vfrom, vnext - vfrom));
- vfrom = vnext;
- }
- tfrom = end + 1;
- }
- } else if (i > argsLen || segments [i] != argSegs [i])
- return null;
- }
-
- return tmp;
- }
-
- static readonly string [] substsep = {"{{"};
-
- // it may return null for invalid values.
- public bool TrySubstitute (RouteValueDictionary values, RouteValueDictionary defaults, out string value)
- {
- var replacements = new RouteValueDictionary ();
- if (values == null) {
- value = Url;
- return true;
- } else {
- object val;
- bool missing;
- foreach (string token in tokens) {
- val = null;
- missing = false;
- if (!values.TryGetValue (token, out val))
- if (defaults == null || !defaults.TryGetValue (token, out val))
- missing = true;
- if (missing) {
- value = null;
- return false;
- }
-
- replacements.Add (token, val);
- }
- }
-
- // horrible hack, but should work
- string [] arr = Url.Split (substsep, StringSplitOptions.None);
- for (int i = 0; i < arr.Length; i++) {
- string s = arr [i];
- foreach (var p in replacements)
- s = s.Replace ("{" + p.Key + "}", p.Value.ToString ());
- arr [i] = s;
- }
- value = String.Join ("{{", arr);
- return true;
- }
- }
-}
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing_test.dll.sources b/mcs/class/System.Web.Routing/System.Web.Routing_test.dll.sources
index c2513f4..5efc7e6 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing_test.dll.sources
+++ b/mcs/class/System.Web.Routing/System.Web.Routing_test.dll.sources
@@ -1,10 +1,14 @@
+System.Web.Routing/AssertExtensions.cs
+System.Web.Routing/FakeHttpWorkerRequest.cs
System.Web.Routing/HttpMethodConstraintTest.cs
+System.Web.Routing/KnownResponseHeader.cs
System.Web.Routing/RouteCollectionTest.cs
System.Web.Routing/RouteDataTest.cs
System.Web.Routing/RouteTest.cs
System.Web.Routing/RouteValueDictionaryTest.cs
System.Web.Routing/StopRoutingHandlerTest.cs
System.Web.Routing/TestStubTypes.cs
+System.Web.Routing/UnknownResponseHeader.cs
System.Web.Routing/UrlRoutingHandlerTest.cs
System.Web.Routing/UrlRoutingModuleTest.cs
System.Web.Routing/VirtualPathDataTest.cs
diff --git a/mcs/class/System.Web.Routing/Test/System.Web.Routing/AssertExtensions.cs b/mcs/class/System.Web.Routing/Test/System.Web.Routing/AssertExtensions.cs
new file mode 100644
index 0000000..b544165
--- /dev/null
+++ b/mcs/class/System.Web.Routing/Test/System.Web.Routing/AssertExtensions.cs
@@ -0,0 +1,76 @@
+//
+// AssertExtensions.cs
+//
+// Author:
+// Marek Habersack <mhabersack at novell.com>
+//
+// Copyright (C) 2009 Novell Inc. http://novell.com
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Web;
+using System.Web.Routing;
+using NUnit.Framework;
+
+namespace MonoTests.System.Web.Routing
+{
+ public delegate void AssertThrowsDelegate ();
+
+ public static class AssertExtensions
+ {
+ public static void Throws <EX> (AssertThrowsDelegate code)
+ {
+ Throws (typeof (EX), code);
+ }
+
+ public static void Throws <EX> (AssertThrowsDelegate code, string message)
+ {
+ Throws (typeof (EX), code, message);
+ }
+
+ public static void Throws (Type exceptionType, AssertThrowsDelegate code)
+ {
+ Throws (exceptionType, code, String.Empty);
+ }
+
+ public static void Throws (Type exceptionType, AssertThrowsDelegate code, string message)
+ {
+ if (code == null)
+ throw new ArgumentNullException ("code");
+ if (exceptionType == null)
+ throw new ArgumentNullException ("exceptionType");
+
+ try {
+ code ();
+ } catch (Exception ex) {
+ if (ex.GetType () != exceptionType)
+ Assert.Fail (message + " (got exception of type '" + ex.GetType () + "')");
+
+ // good!
+ return;
+ }
+
+ Assert.Fail (message);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Routing/Test/System.Web.Routing/ChangeLog b/mcs/class/System.Web.Routing/Test/System.Web.Routing/ChangeLog
index 5b3a7f4..a37598d 100644
--- a/mcs/class/System.Web.Routing/Test/System.Web.Routing/ChangeLog
+++ b/mcs/class/System.Web.Routing/Test/System.Web.Routing/ChangeLog
@@ -1,3 +1,37 @@
+2009-06-25 Marek Habersack <mhabersack at novell.com>
+
+ * RouteCollectionTest.cs, RouteTest.cs: added new tests for
+ GetVirtualPath
+
+2009-06-04 Marek Habersack <mhabersack at novell.com>
+
+ * RouteCollectionTest.cs: added two more test cases to the bug
+ #502555 test. They check whether url generation matches defaults
+ case-insensitively.
+
+2009-05-27 Marek Habersack <mhabersack at novell.com>
+
+ * RouteCollectionTest.cs: added a test for routes from
+ NerdDinner.
+
+2009-05-25 Marek Habersack <mhabersack at novell.com>
+
+ * RouteTest.cs: added several tests for GetVirtualPath,
+ GetRouteData, ProcessConstraint and refactored some tests.
+
+ * RouteCollectionTest.cs: added several tests for GetVirtualPath
+
+ * AssertExtensions.cs: added some methods to make code testing for
+ exception throws look nicer.
+
+2009-05-11 Marek Habersack <mhabersack at novell.com>
+
+ * RouteCollectionTest.cs: added test for bug #502555
+
+2009-05-05 Marek Habersack <mhabersack at novell.com>
+
+ * RouteTest.cs: added test for bug #500739
+
2008-10-23 Atsushi Enomoto <atsushi at ximian.com>
* RouteTest.cs :
diff --git a/mcs/class/System.Web.Routing/Test/System.Web.Routing/FakeHttpWorkerRequest.cs b/mcs/class/System.Web.Routing/Test/System.Web.Routing/FakeHttpWorkerRequest.cs
new file mode 100644
index 0000000..fc087ce
--- /dev/null
+++ b/mcs/class/System.Web.Routing/Test/System.Web.Routing/FakeHttpWorkerRequest.cs
@@ -0,0 +1,223 @@
+//
+// System.Web.HttpResponseTest.cs - Unit tests for System.Web.HttpResponse
+//
+// Author:
+// Miguel de Icaza <miguel at ximian.com>
+//
+// Copyright (C) 2005-2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.Text;
+using System.Web;
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+using NUnit.Framework;
+
+namespace MonoTests.Common
+{
+
+ public class FakeHttpWorkerRequest : HttpWorkerRequest
+ {
+ const string appPath = "/";
+ string queryString;
+ public Hashtable KnownResponseHeaders;
+ public Hashtable UnknownResponseHeaders;
+ public int return_kind;
+
+ public FakeHttpWorkerRequest ()
+ : this (1)
+ {
+ // for Mono
+ AppDomain.CurrentDomain.SetData (".appVPath", appPath);
+ }
+
+ public FakeHttpWorkerRequest (int re)
+ {
+ KnownResponseHeaders = CollectionsUtil.CreateCaseInsensitiveHashtable ();
+ UnknownResponseHeaders = CollectionsUtil.CreateCaseInsensitiveHashtable ();
+ return_kind = re;
+ queryString = String.Empty;
+ }
+
+ public override string GetUriPath ()
+ {
+ return "/fake";
+ }
+
+ public override string GetFilePath ()
+ {
+ return GetUriPath ();
+ }
+
+ public override string GetQueryString ()
+ {
+ return queryString;
+ }
+
+ public void SetQueryString (string queryString)
+ {
+ this.queryString = queryString;
+ }
+
+ public override string GetRawUrl ()
+ {
+ return "GetRawUrl";
+ }
+
+ public override string GetHttpVerbName ()
+ {
+ return "GET";
+ }
+
+ public override string GetHttpVersion ()
+ {
+ if (return_kind == 1)
+ return "HTTP/1.0";
+ else
+ return "HTTP/1.1";
+ }
+
+ public override string GetRemoteAddress ()
+ {
+ return "__GetRemoteAddress";
+ }
+
+ public override int GetRemotePort ()
+ {
+ return 1010;
+ }
+
+ public override string GetLocalAddress ()
+ {
+ return "GetLocalAddress";
+ }
+
+ public override string GetAppPath ()
+ {
+ return appPath;
+ }
+
+ public override int GetLocalPort ()
+ {
+ return 2020;
+ }
+
+ public override string MapPath (string virtualPath)
+ {
+#if TARGET_DOTNET
+ return "c:\\fakefile";
+#else
+ return "/fakefile";
+#endif
+ }
+
+ public bool status_sent;
+ public int status_code;
+ public string status_string;
+
+ public override void SendStatus (int s, string x)
+ {
+ status_sent = true;
+ status_code = s;
+ status_string = x;
+ }
+
+ void AddHeader (Hashtable table, string header_name, object header)
+ {
+ object o = table[header_name];
+ if (o == null)
+ table.Add (header_name, header);
+ else {
+ ArrayList al = o as ArrayList;
+ if (al == null) {
+ al = new ArrayList ();
+ al.Add (o);
+ table[header_name] = al;
+ } else
+ al = o as ArrayList;
+
+ al.Add (header);
+ }
+ }
+
+ bool headers_sent;
+ public override void SendKnownResponseHeader (int x, string j)
+ {
+ string header_name = HttpWorkerRequest.GetKnownRequestHeaderName (x);
+ AddHeader (KnownResponseHeaders, header_name, new KnownResponseHeader (x, j));
+ headers_sent = true;
+ }
+
+ public override void SendUnknownResponseHeader (string a, string b)
+ {
+ AddHeader (UnknownResponseHeaders, a, new UnknownResponseHeader (a, b));
+ headers_sent = true;
+ }
+
+ bool data_sent;
+ public byte[] data;
+ public int data_len;
+ public int total = 0;
+
+ public override void SendResponseFromMemory (byte[] arr, int x)
+ {
+ data_sent = true;
+ data = new byte[x];
+ for (int i = 0; i < x; i++)
+ data[i] = arr[i];
+ data_len = x;
+ total += data_len;
+ }
+
+ public override void SendResponseFromFile (string a, long b, long c)
+ {
+ data_sent = true;
+ }
+
+ public override void SendResponseFromFile (IntPtr a, long b, long c)
+ {
+ data_sent = true;
+ }
+
+ public override void FlushResponse (bool x)
+ {
+ }
+
+ public override void EndOfRequest ()
+ {
+ }
+
+ public override string GetKnownRequestHeader (int index)
+ {
+ return null;
+ }
+
+ public bool OutputProduced
+ {
+ get
+ {
+ return headers_sent || data_sent;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Routing/Test/System.Web.Routing/KnownResponseHeader.cs b/mcs/class/System.Web.Routing/Test/System.Web.Routing/KnownResponseHeader.cs
new file mode 100644
index 0000000..71806c3
--- /dev/null
+++ b/mcs/class/System.Web.Routing/Test/System.Web.Routing/KnownResponseHeader.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace MonoTests.Common
+{
+ class KnownResponseHeader
+ {
+ private int index;
+ private string value;
+
+ public KnownResponseHeader (int index, string value)
+ {
+ this.index = index;
+ this.value = value;
+ }
+
+ public int Index
+ {
+ get { return index; }
+ }
+
+ public string Value
+ {
+ get { return value; }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteCollectionTest.cs b/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteCollectionTest.cs
index b14de55..7631d86 100644
--- a/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteCollectionTest.cs
+++ b/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteCollectionTest.cs
@@ -32,6 +32,8 @@ using System.Web;
using System.Web.Routing;
using NUnit.Framework;
+using MonoTests.Common;
+
namespace MonoTests.System.Web.Routing
{
[TestFixture]
@@ -236,9 +238,291 @@ namespace MonoTests.System.Web.Routing
// it tries to get HttpContextBase.Response, so set it.
hc.SetResponse (new HttpResponseStub (2));
var rd = c.GetRouteData (hc);
+ Assert.IsNotNull (rd, "#1");
+
var vpd = c.GetVirtualPath (new RequestContext (hc, rd), rd.Values);
- Assert.AreEqual ("apppath/x/y_modified", vpd.VirtualPath, "#1");
- Assert.AreEqual (0, vpd.DataTokens.Count, "#2");
+ Assert.IsNotNull (vpd, "#2");
+ Assert.AreEqual ("apppath/x/y_modified", vpd.VirtualPath, "#3");
+ Assert.AreEqual (0, vpd.DataTokens.Count, "#4");
+ }
+
+ [Test (Description = "Bug #502555")]
+ public void GetVirtualPath2 ()
+ {
+ var c = new RouteCollection ();
+
+ c.Add ("Summary",
+ new MyRoute ("summary/{action}-{type}/{page}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new { controller = "Summary", action = "Index", page = 1}) }
+ );
+
+ c.Add ("Apis",
+ new MyRoute ("apis/{apiname}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new { controller = "Apis", action = "Index" }) }
+ );
+
+ c.Add ("Single Report",
+ new MyRoute ("report/{guid}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new { controller = "Reports", action = "SingleReport" }) }
+ );
+
+ c.Add ("Reports",
+ new MyRoute ("reports/{page}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new { controller = "Reports", action = "Index", page = 1 }) }
+ );
+
+ c.Add ("Default",
+ new MyRoute ("{controller}/{action}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new { controller = "Home", action = "Index"}) }
+ );
+
+ var hc = new HttpContextStub2 ("~/Home/About", String.Empty, String.Empty);
+ hc.SetResponse (new HttpResponseStub (2));
+ var rd = c.GetRouteData (hc);
+ var vpd = c.GetVirtualPath (new RequestContext (hc, rd), rd.Values);
+ Assert.IsNotNull (vpd, "#A1");
+ Assert.AreEqual ("/Home/About_modified", vpd.VirtualPath, "#A2");
+ Assert.AreEqual (0, vpd.DataTokens.Count, "#A3");
+
+ hc = new HttpContextStub2 ("~/Home/Index", String.Empty, String.Empty);
+ hc.SetResponse (new HttpResponseStub (2));
+ rd = c.GetRouteData (hc);
+ vpd = c.GetVirtualPath (new RequestContext (hc, rd), rd.Values);
+ Assert.IsNotNull (vpd, "#B1");
+ Assert.AreEqual ("/_modified", vpd.VirtualPath, "#B2");
+ Assert.AreEqual (0, vpd.DataTokens.Count, "#B3");
+
+ hc = new HttpContextStub2 ("~/Account/LogOn", String.Empty, String.Empty);
+ hc.SetResponse (new HttpResponseStub (2));
+ rd = c.GetRouteData (hc);
+ vpd = c.GetVirtualPath (new RequestContext (hc, rd), rd.Values);
+ Assert.IsNotNull (vpd, "#C1");
+ Assert.AreEqual ("/Account/LogOn_modified", vpd.VirtualPath, "#C2");
+ Assert.AreEqual (0, vpd.DataTokens.Count, "#C3");
+
+ hc = new HttpContextStub2 ("~/", String.Empty, String.Empty);
+ hc.SetResponse (new HttpResponseStub (3));
+ rd = c.GetRouteData (hc);
+ vpd = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { controller = "home" }) );
+ Assert.IsNotNull (vpd, "#D1");
+ Assert.AreEqual ("/", vpd.VirtualPath, "#D2");
+ Assert.AreEqual (0, vpd.DataTokens.Count, "#D3");
+
+ hc = new HttpContextStub2 ("~/", String.Empty, String.Empty);
+ hc.SetResponse (new HttpResponseStub (3));
+ rd = c.GetRouteData (hc);
+ vpd = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { controller = "Home" }) );
+ Assert.IsNotNull (vpd, "#E1");
+ Assert.AreEqual ("/", vpd.VirtualPath, "#E2");
+ Assert.AreEqual (0, vpd.DataTokens.Count, "#E3");
+ }
+
+ [Test]
+ public void GetVirtualPath3 ()
+ {
+ var c = new RouteCollection ();
+
+ c.Add ("todo-route",
+ new MyRoute ("todo/{action}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new {controller = "todo", action="list", page=0}) }
+ );
+
+ c.Add ("another-route",
+ new MyRoute ("{controller}/{action}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new {controller = "home", action="list", page=0}) }
+ );
+
+ var hc = new HttpContextStub2 ("~/home/list", String.Empty, String.Empty);
+ hc.SetResponse (new HttpResponseStub (3));
+ var rd = c.GetRouteData (hc);
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (3, rd.Values.Count, "#1-1");
+ Assert.AreEqual ("home", rd.Values["controller"], "#1-2");
+ Assert.AreEqual ("list", rd.Values["action"], "#1-3");
+ Assert.AreEqual (0, rd.Values["page"], "#1-4");
+
+ var vp = c.GetVirtualPath (new RequestContext (hc, rd), "todo-route", new RouteValueDictionary ());
+ Assert.IsNotNull (vp, "#2");
+ Assert.AreEqual ("/todo", vp.VirtualPath, "#2-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary ());
+ Assert.IsNotNull (vp, "#3");
+ Assert.AreEqual ("/todo", vp.VirtualPath, "#3-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { controller = "home" }));
+ Assert.IsNotNull (vp, "#4");
+ Assert.AreEqual ("/", vp.VirtualPath, "#4-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { controller = "home", extra="stuff" }));
+ Assert.IsNotNull (vp, "#5");
+ Assert.AreEqual ("/?extra=stuff", vp.VirtualPath, "#5-1");
+ }
+
+ [Test]
+ public void GetVirtualPath4 ()
+ {
+ var c = new RouteCollection ();
+
+ c.Add (new MyRoute ("blog/{user}/{action}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary {
+ { "controller", "blog" },
+ { "user", "admin" }
+ }
+ }
+ );
+
+ c.Add (new MyRoute ("forum/{user}/{action}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary {
+ { "controller", "forum" },
+ { "user", "admin" }
+ }
+ }
+ );
+
+ var hc = new HttpContextStub2 ("~/forum/admin/Index", String.Empty, String.Empty);
+ hc.SetResponse (new HttpResponseStub (3));
+ var rd = c.GetRouteData (hc);
+ Assert.IsNotNull (rd, "#1");
+
+ var vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { action="Index", controller="forum"}));
+ Assert.IsNotNull (vp, "#2");
+ Assert.AreEqual ("/forum/admin/Index", vp.VirtualPath, "#2-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { action="Index", controller="blah"}));
+ Assert.IsNull (vp, "#3");
+ }
+
+ [Test]
+ public void GetVirtualPath5 ()
+ {
+ var c = new RouteCollection ();
+
+ c.Add (new MyRoute ("reports/{year}/{month}/{day}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary {
+ { "day", 1 }
+ }
+ }
+ );
+
+ var hc = new HttpContextStub2 ("~/reports/2009/05", String.Empty, String.Empty);
+ hc.SetResponse (new HttpResponseStub (3));
+ var rd = c.GetRouteData (hc);
+ Assert.IsNotNull (rd, "#1");
+
+ var vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ { "year", 2007 },
+ { "month", 1 },
+ { "day", 12 },
+ }
+ );
+ Assert.IsNotNull (vp, "#2");
+ Assert.AreEqual ("/reports/2007/1/12", vp.VirtualPath, "#2-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ { "year", 2007 },
+ { "month", 1 }
+ }
+ );
+ Assert.IsNotNull (vp, "#3");
+ Assert.AreEqual ("/reports/2007/1", vp.VirtualPath, "#3-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ { "year", 2007 },
+ { "month", 1 },
+ { "day", 12 },
+ { "category", 123 }
+ }
+ );
+ Assert.IsNotNull (vp, "#4");
+ Assert.AreEqual ("/reports/2007/1/12?category=123", vp.VirtualPath, "#4-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ { "year", 2007 },
+ }
+ );
+ Assert.IsNull (vp, "#5");
+ }
+
+ [Test]
+ public void GetVirtualPath6 ()
+ {
+ var c = new RouteCollection ();
+
+ c.Add (new MyRoute ("reports/{year}/{month}/{day}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary {
+ { "day", 1 }
+ }
+ }
+ );
+
+ var hc = new HttpContextStub2 ("~/reports/2009/05", String.Empty, "/myapp");
+ hc.SetResponse (new HttpResponseStub (3));
+ var rd = c.GetRouteData (hc);
+ Assert.IsNotNull (rd, "#1");
+
+ var vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ { "year", 2007 },
+ { "month", 1 },
+ { "day", 12 },
+ }
+ );
+ Assert.IsNotNull (vp, "#2");
+ Assert.AreEqual ("/myapp/reports/2007/1/12", vp.VirtualPath, "#2-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ { "year", 2007 },
+ { "month", 1 }
+ }
+ );
+ Assert.IsNotNull (vp, "#3");
+ Assert.AreEqual ("/myapp/reports/2007/1", vp.VirtualPath, "#3-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ { "year", 2007 },
+ { "month", 1 },
+ { "day", 12 },
+ { "category", 123 }
+ }
+ );
+ Assert.IsNotNull (vp, "#4");
+ Assert.AreEqual ("/myapp/reports/2007/1/12?category=123", vp.VirtualPath, "#4-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ { "year", 2007 },
+ }
+ );
+ Assert.IsNull (vp, "#5");
+ }
+
+ [Test]
+ public void GetVirtualPath7 ()
+ {
+ var c = new RouteCollection ();
+
+ c.Add (new MyRoute ("{table}/{action}.aspx", new MyRouteHandler ()) {
+ Constraints = new RouteValueDictionary (new { action = "List|Details|Edit|Insert" }),
+ });
+
+ var req = new FakeHttpWorkerRequest ();
+ var ctx = new HttpContext (req);
+ HttpContext.Current = ctx;
+ var rd = new RouteData ();
+ var hc = new HttpContextWrapper (ctx);
+
+ var vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ {"Table", "FooTable"},
+ {"Action", "Details"}
+ });
+
+ Assert.IsNotNull (vp, "#A1");
+ Assert.AreEqual ("/FooTable/Details.aspx", vp.VirtualPath, "#A1-1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ {"Table", "FooTable"},
+ {"Action", String.Empty}
+ });
+
+ Assert.IsNull (vp, "#B1");
+
+ vp = c.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary {
+ {"Table", "FooTable"},
+ {"Action", null}
+ });
+
+ Assert.IsNull (vp, "#C1");
}
[Test]
@@ -255,5 +539,45 @@ namespace MonoTests.System.Web.Routing
Assert.AreEqual ("./Test/test.html", vpd.VirtualPath, "#1");
Assert.AreEqual (0, vpd.DataTokens.Count, "#2");
}
+
+ [Test (Description="Routes from NerdDinner")]
+ public void GetRouteDataNerdDinner ()
+ {
+ var c = new RouteCollection ();
+
+ c.Add ("UpcomingDiners",
+ new MyRoute ("Dinners/Page/{page}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new { controller = "Dinners", action = "Index" }) }
+ );
+
+ c.Add ("Default",
+ new MyRoute ("{controller}/{action}/{id}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new { controller = "Home", action = "Index", id = "" })}
+ );
+
+ var hc = new HttpContextStub2 ("~/", String.Empty, String.Empty);
+ hc.SetResponse (new HttpResponseStub (3));
+ var rd = c.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#A1");
+ }
+
+ [Test (Description="Routes from NerdDinner")]
+ public void GetRouteDataNerdDinner2 ()
+ {
+ var c = new RouteCollection ();
+
+ c.Add ("UpcomingDiners",
+ new MyRoute ("Dinners/Page/{page}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new { controller = "Dinners", action = "Index" }) }
+ );
+
+ c.Add ("Default",
+ new MyRoute ("{controller}/{action}/{id}", new MyRouteHandler ()) { Defaults = new RouteValueDictionary (new { controller = "Home", action = "Index", id = "" })}
+ );
+
+ var hc = new HttpContextStub2 ("~/Home/Index", String.Empty, String.Empty);
+ hc.SetResponse (new HttpResponseStub (3));
+ var rd = c.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#A1");
+ }
}
}
diff --git a/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteTest.cs b/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteTest.cs
index 9b113c1..cf88935 100644
--- a/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteTest.cs
+++ b/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteTest.cs
@@ -4,7 +4,7 @@
// Author:
// Atsushi Enomoto <atsushi at ximian.com>
//
-// Copyright (C) 2008 Novell Inc. http://novell.com
+// Copyright (C) 2008-2009 Novell Inc. http://novell.com
//
//
@@ -34,6 +34,14 @@ using NUnit.Framework;
namespace MonoTests.System.Web.Routing
{
+ class TestUrl
+ {
+ public string Url { get; set; }
+ public string Expected { get; set; }
+ public string Label { get; set; }
+ public Type ExpectedExceptionType { get; set; }
+ }
+
[TestFixture]
public class RouteTest
{
@@ -54,96 +62,89 @@ namespace MonoTests.System.Web.Routing
Assert.AreEqual (String.Empty, r.Url);
}
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void InvalidUrl ()
- {
- new Route ("~", null); // cannot start with '~'
- }
+ static readonly TestUrl[] __invalidUrls = {
+ // cannot start with '~'
+ new TestUrl () { Url = "~", ExpectedExceptionType = typeof (ArgumentException), Label = "#1" },
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void InvalidUrl2 ()
- {
- new Route ("/", null); // cannot start with '/'
- }
+ // cannot start with '/'
+ new TestUrl () { Url = "/", ExpectedExceptionType = typeof (ArgumentException), Label = "#2" },
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void InvalidUrl3 ()
- {
- new Route ("foo?bar", null); // cannot contain '?'
- }
+ // cannot contain '?'
+ new TestUrl () { Url = "foo?bar", ExpectedExceptionType = typeof (ArgumentException), Label = "#3" },
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void InvalidUrl4 ()
- {
- new Route ("foo/{bar", null); // unmatched '{'
- }
+ // unmatched '{'
+ new TestUrl () { Url = "foo/{bar", ExpectedExceptionType = typeof (ArgumentException), Label = "#4" },
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void InvalidUrl5 ()
- {
- new Route ("foo/bar}", null); // unmatched '}'
- }
+ // unmatched '}'
+ new TestUrl () { Url = "foo/bar}", ExpectedExceptionType = typeof (ArgumentException), Label = "#5" },
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void InvalidUrl6 ()
- {
- new Route ("foo/{}", null); // "" is an invalid parameter name.
- }
+ // "" is an invalid parameter name.
+ new TestUrl () { Url = "foo/{}", ExpectedExceptionType = typeof (ArgumentException), Label = "#6" },
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void InvalidUrl7 ()
- {
- new Route ("foo/{x/y/z}", null); // incomplete parameter in path segment.
- }
+ // incomplete parameter in path segment.
+ new TestUrl () { Url = "foo/{x/y/z}", ExpectedExceptionType = typeof (ArgumentException), Label = "#7" },
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void InvalidUrl8 ()
- {
- new Route ("foo/{a{{b}}c}", null); // regarded as an incomplete parameter
- }
+ // regarded as an incomplete parameter
+ new TestUrl () { Url = "foo/{a{{b}}c}", ExpectedExceptionType = typeof (ArgumentException), Label = "#8" },
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void InvalidUrl9 ()
- {
- new Route ("foo/{a}{b}", null); // consecutive parameters are not allowed
- }
+ // consecutive parameters are not allowed
+ new TestUrl () { Url = "foo/{a}{b}", ExpectedExceptionType = typeof (ArgumentException), Label = "#9" },
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void InvalidUrl10 ()
- {
- new Route ("foo//bar", null); // consecutive segment separators '/' are not allowed
- }
+ // consecutive segment separators '/' are not allowed
+ new TestUrl () { Url = "foo//bar", ExpectedExceptionType = typeof (ArgumentException), Label = "#10" },
- [Test]
- public void ValidUrl ()
- {
- var r = new Route ("{foo}/{bar}", null);
- Assert.AreEqual ("{foo}/{bar}", r.Url, "#1");
- Assert.IsNull (r.DataTokens, "#2");
- Assert.IsNull (r.Defaults, "#3");
- Assert.IsNull (r.Constraints, "#4");
- }
+ // A catch-all parameter can only appear as the last segment of the route URL
+ new TestUrl () { Url = "{first}/{*rest}/{foo}", ExpectedExceptionType = typeof (ArgumentException), Label = "#11" },
+ // A path segment that contains more than one section, such as a literal section or a parameter, cannot contain a catch-all parameter.
+ new TestUrl () { Url = "{first}/{*rest}-{foo}", ExpectedExceptionType = typeof (ArgumentException), Label = "#12" },
+
+ // A path segment that contains more than one section, such as a literal section or a parameter, cannot contain a catch-all parameter.
+ new TestUrl () { Url = "{first}/{foo}-{*rest}", ExpectedExceptionType = typeof (ArgumentException), Label = "#13" },
+
+ // A path segment that contains more than one section, such as a literal section or a parameter, cannot contain a catch-all parameter.
+ new TestUrl () { Url = "-{*rest}", ExpectedExceptionType = typeof (ArgumentException), Label = "#14" },
+ };
+
[Test]
- public void ValidUrl2 ()
+ public void InvalidUrls ()
{
- new Route ("a~c", null);
+ Route r;
+
+ foreach (TestUrl tu in __invalidUrls) {
+ AssertExtensions.Throws (tu.ExpectedExceptionType, () => r = new Route (tu.Url, null), tu.Label);
+ }
}
- [Test]
- public void ValidUrl3 ()
- {
- new Route ("foo/", null);
+ static readonly TestUrl[] __validUrls = {
+ new TestUrl () { Url = "{foo}/{bar}", Expected = "{foo}/{bar}", Label = "#1" },
+ new TestUrl () { Url = "a~c", Expected = "a~c", Label = "#2" },
+ new TestUrl () { Url = "foo/", Expected = "foo/", Label = "#3" },
+ new TestUrl () { Url = "summary/{action}-{type}/{page}", Expected = "summary/{action}-{type}/{page}", Label = "#4" },
+ new TestUrl () { Url = "{first}/{*rest}", Expected = "{first}/{*rest}", Label = "#5" },
+ new TestUrl () { Url = "{language}-{country}/{controller}/{action}", Expected = "{language}-{country}/{controller}/{action}", Label = "#6" },
+ new TestUrl () { Url = "{controller}.{action}.{id}", Expected = "{controller}.{action}.{id}", Label = "#7" },
+ new TestUrl () { Url = "{reporttype}/{year}/{month}/{date}", Expected = "{reporttype}/{year}/{month}/{date}", Label = "#8" },
+ new TestUrl () { Url = "Book{title}and{foo}", Expected = "Book{title}and{foo}", Label = "#9" },
+ new TestUrl () { Url = "foo/{ }", Expected = "foo/{ }", Label = "#10" },
+ new TestUrl () { Url = "foo/{ \t}", Expected = "foo/{ \t}", Label = "#11" },
+ new TestUrl () { Url = "foo/{ \n}", Expected = "foo/{ \n}", Label = "#12" },
+ new TestUrl () { Url = "foo/{ \t\n}", Expected = "foo/{ \t\n}", Label = "#13" },
+ new TestUrl () { Url = "-{foo}", Expected = "-{foo}", Label = "#14" },
+ };
+
+ [Test]
+ public void ValidUrls ()
+ {
+ Route r;
+
+ foreach (TestUrl tu in __validUrls) {
+ r = new Route (tu.Url, null);
+ Assert.AreEqual (tu.Expected, r.Url, tu.Label);
+ Assert.IsNull (r.DataTokens, tu.Label + "-2");
+ Assert.IsNull (r.Defaults, tu.Label + "-3");
+ Assert.IsNull (r.Constraints, tu.Label + "-4");
+ }
}
[Test]
@@ -258,7 +259,6 @@ namespace MonoTests.System.Web.Routing
}
[Test]
- [Ignore ("Pending testing - might be invalid test")]
public void GetRouteData7 ()
{
var r = new Route ("{table}/{action}.aspx", null);
@@ -267,6 +267,408 @@ namespace MonoTests.System.Web.Routing
}
[Test]
+ public void GetRouteData8 ()
+ {
+ var r = new Route ("{first}/{*rest}", null);
+ var hc = new HttpContextStub ("~/a/b/c/d", String.Empty);
+ var rd = r.GetRouteData (hc);
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (2, rd.Values.Count, "#4");
+ Assert.AreEqual ("a", rd.Values ["first"], "#4-1");
+ Assert.AreEqual ("b/c/d", rd.Values ["rest"], "#4-2");
+ }
+
+ [Test]
+ public void GetRouteData9 ()
+ {
+ var r = new Route ("summary/{action}-{type}/{page}", null);
+ var hc = new HttpContextStub ("~/summary/test-xml/1", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (3, rd.Values.Count, "#4");
+ Assert.AreEqual ("test", rd.Values["action"], "#4-1");
+ Assert.AreEqual ("xml", rd.Values["type"], "#4-2");
+ Assert.AreEqual ("1", rd.Values["page"], "#4-2");
+ }
+
+ [Test]
+ public void GetRouteData10 ()
+ {
+ var r = new Route ("summary/{action}-{type}/{page}", null);
+ var hc = new HttpContextStub ("~/summary/-xml/1", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNull (rd, "#1"); // mismatch, missing action
+ }
+
+ [Test]
+ public void GetRouteData11 ()
+ {
+ var r = new Route ("summary/{action}-{type}/{page}", null);
+ var hc = new HttpContextStub ("~/summary/test-/1", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNull (rd, "#1"); // mismatch, missing type
+ }
+
+ [Test]
+ public void GetRouteData12 ()
+ {
+ var r = new Route ("summary/{action}-{type}/{page}", null);
+ var hc = new HttpContextStub ("~/summary/test-xml", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNull (rd, "#1"); // mismatch, missing page
+ }
+
+ [Test]
+ public void GetRouteData13 ()
+ {
+ var r = new Route ("summary/{action}-{type}/{page}", null) {
+ Defaults = new RouteValueDictionary (new { action = "Index", page = 1 } )
+ };
+ var hc = new HttpContextStub ("~/summary/test-xml/1", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (3, rd.Values.Count, "#4");
+ Assert.AreEqual ("test", rd.Values["action"], "#4-1");
+ Assert.AreEqual ("xml", rd.Values["type"], "#4-2");
+ Assert.AreEqual ("1", rd.Values["page"], "#4-2");
+ }
+
+ [Test]
+ public void GetRouteData14 ()
+ {
+ var r = new Route ("{filename}.{ext}", null);
+ var hc = new HttpContextStub ("~/Foo.xml.aspx", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (2, rd.Values.Count, "#4");
+ Assert.AreEqual ("Foo.xml", rd.Values["filename"], "#4-1");
+ Assert.AreEqual ("aspx", rd.Values["ext"], "#4-2");
+ }
+
+ [Test]
+ public void GetRouteData15 ()
+ {
+ var r = new Route ("My{location}-{sublocation}", null);
+ var hc = new HttpContextStub ("~/MyHouse-LivingRoom", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (2, rd.Values.Count, "#4");
+ Assert.AreEqual ("House", rd.Values["location"], "#4-1");
+ Assert.AreEqual ("LivingRoom", rd.Values["sublocation"], "#4-2");
+ }
+
+ [Test]
+ public void GetRouteData16 ()
+ {
+ var r = new Route ("My{location}---{sublocation}", null);
+ var hc = new HttpContextStub ("~/MyHouse-LivingRoom", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNull (rd, "#1");
+ }
+
+ [Test]
+ public void GetRouteData17 ()
+ {
+ var r = new Route ("{foo}xyz{bar}", null);
+ var hc = new HttpContextStub ("~/xyzxyzxyzblah", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (2, rd.Values.Count, "#4");
+ Assert.AreEqual ("xyzxyz", rd.Values["foo"], "#4-1");
+ Assert.AreEqual ("blah", rd.Values["bar"], "#4-2");
+ }
+
+ [Test]
+ public void GetRouteData18 ()
+ {
+ var r = new Route ("foo/{ }", null);
+ var hc = new HttpContextStub ("~/foo/stuff", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (1, rd.Values.Count, "#4");
+ Assert.AreEqual ("stuff", rd.Values[" "], "#4-1");
+ }
+
+ [Test]
+ public void GetRouteData19 ()
+ {
+ var r = new Route ("foo/{ \t}", null);
+ var hc = new HttpContextStub ("~/foo/stuff", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (1, rd.Values.Count, "#4");
+ Assert.AreEqual ("stuff", rd.Values[" \t"], "#4-1");
+ }
+
+ [Test]
+ public void GetRouteData20 ()
+ {
+ var r = new Route ("foo/{ \n}", null);
+ var hc = new HttpContextStub ("~/foo/stuff", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (1, rd.Values.Count, "#4");
+ Assert.AreEqual ("stuff", rd.Values[" \n"], "#4-1");
+ }
+
+ [Test]
+ public void GetRouteData21 ()
+ {
+ var r = new Route ("foo/{ \t\n}", null);
+ var hc = new HttpContextStub ("~/foo/stuff", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (1, rd.Values.Count, "#4");
+ Assert.AreEqual ("stuff", rd.Values[" \t\n"], "#4-1");
+ }
+
+ [Test]
+ public void GetRouteData22 ()
+ {
+ var r = new Route ("foo/{ \t\n}", null);
+ var hc = new HttpContextStub ("~/FOO/stuff", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (1, rd.Values.Count, "#4");
+ Assert.AreEqual ("stuff", rd.Values[" \t\n"], "#4-1");
+ }
+
+ [Test]
+ public void GetRouteData23 ()
+ {
+ var r = new Route ("foo/{bar}-{baz}/{dancefloor}", null) {
+ Defaults = new RouteValueDictionary (new { bar = "BlueOyster", dancefloor = 1 })
+ };
+
+ var hc = new HttpContextStub ("~/foo/-nyc/1", String.Empty);
+ var rd = r.GetRouteData (hc);
+ Assert.IsNull (rd, "#1");
+
+ hc = new HttpContextStub ("~/foo/blueoyster-nyc", String.Empty);
+ rd = r.GetRouteData (hc);
+ Assert.IsNotNull (rd, "#2");
+ Assert.AreEqual (r, rd.Route, "#2-1");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#2-2");
+ Assert.AreEqual (3, rd.Values.Count, "#2-3");
+ Assert.AreEqual ("blueoyster", rd.Values["bar"], "#2-4");
+ Assert.AreEqual ("nyc", rd.Values["baz"], "#2-5");
+ Assert.AreEqual (1, rd.Values["dancefloor"], "#2-6");
+ Assert.IsTrue (typeof (int) == rd.Values["dancefloor"].GetType (), "#2-7");
+ }
+
+ [Test]
+ public void GetRouteData24 ()
+ {
+ var r = new Route ("foo/{bar}-{baz}/{dancefloor}", null) {
+ Defaults = new RouteValueDictionary (new { baz = "nyc", dancefloor = 1 })
+ };
+
+ var hc = new HttpContextStub ("~/foo/BlueOyster-/1", String.Empty);
+ var rd = r.GetRouteData (hc);
+ Assert.IsNull (rd, "#1");
+
+ hc = new HttpContextStub ("~/foo/blueoyster-", String.Empty);
+ rd = r.GetRouteData (hc);
+ Assert.IsNull (rd, "#2");
+
+ hc = new HttpContextStub ("~/foo/blueoyster-nyc", String.Empty);
+ rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#3");
+ Assert.AreEqual (r, rd.Route, "#3-1");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3-2");
+ Assert.AreEqual (3, rd.Values.Count, "#3-3");
+ Assert.AreEqual ("blueoyster", rd.Values["bar"], "#3-4");
+ Assert.AreEqual ("nyc", rd.Values["baz"], "#3-5");
+ Assert.AreEqual (1, rd.Values["dancefloor"], "#3-6");
+ Assert.IsTrue (typeof (int) == rd.Values["dancefloor"].GetType (), "#3-7");
+
+ hc = new HttpContextStub ("~/foo/blueoyster-nyc/4", String.Empty);
+ rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#4");
+ Assert.AreEqual (r, rd.Route, "#4-1");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#4-2");
+ Assert.AreEqual (3, rd.Values.Count, "#4-3");
+ Assert.AreEqual ("blueoyster", rd.Values["bar"], "#4-4");
+ Assert.AreEqual ("nyc", rd.Values["baz"], "#4-5");
+ Assert.AreEqual ("4", rd.Values["dancefloor"], "#4-6");
+ Assert.IsTrue (typeof (string) == rd.Values["dancefloor"].GetType (), "#4-7");
+ }
+
+ [Test]
+ public void GetRouteData25 ()
+ {
+ var r = new Route ("foo/{bar}/{baz}/{dancefloor}", null) {
+ Defaults = new RouteValueDictionary (new { baz = "nyc", dancefloor = 1 })
+ };
+
+ var hc = new HttpContextStub ("~/foo/BlueOyster", String.Empty);
+ var rd = r.GetRouteData (hc);
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#1-1");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#1-2");
+ Assert.AreEqual (3, rd.Values.Count, "#1-3");
+ Assert.AreEqual ("BlueOyster", rd.Values["bar"], "#1-4");
+ Assert.AreEqual ("nyc", rd.Values["baz"], "#1-5");
+ Assert.AreEqual (1, rd.Values["dancefloor"], "#1-6");
+ Assert.IsTrue (typeof (int) == rd.Values["dancefloor"].GetType (), "#1-7");
+
+ hc = new HttpContextStub ("~/foo/blueoyster/bigapple", String.Empty);
+ rd = r.GetRouteData (hc);
+ Assert.IsNotNull (rd, "#2");
+ Assert.AreEqual (r, rd.Route, "#2-1");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#2-2");
+ Assert.AreEqual (3, rd.Values.Count, "#2-3");
+ Assert.AreEqual ("blueoyster", rd.Values["bar"], "#2-4");
+ Assert.AreEqual ("bigapple", rd.Values["baz"], "#2-5");
+ Assert.AreEqual (1, rd.Values["dancefloor"], "#2-6");
+ Assert.IsTrue (typeof (int) == rd.Values["dancefloor"].GetType (), "#2-7");
+
+ hc = new HttpContextStub ("~/foo/blueoyster/bigapple/3", String.Empty);
+ rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#3");
+ Assert.AreEqual (r, rd.Route, "#3-1");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3-2");
+ Assert.AreEqual (3, rd.Values.Count, "#3-3");
+ Assert.AreEqual ("blueoyster", rd.Values["bar"], "#3-4");
+ Assert.AreEqual ("bigapple", rd.Values["baz"], "#3-5");
+ Assert.AreEqual ("3", rd.Values["dancefloor"], "#3-6");
+ Assert.IsTrue (typeof (string) == rd.Values["dancefloor"].GetType (), "#3-7");
+ }
+
+ [Test]
+ public void GetRouteData26 ()
+ {
+ var r = new Route ("foo/{bar}/{baz}-{dancefloor}", null) {
+ Defaults = new RouteValueDictionary (new { baz = "nyc", dancefloor = 1 })
+ };
+
+ var hc = new HttpContextStub ("~/foo/BlueOyster", String.Empty);
+ var rd = r.GetRouteData (hc);
+ Assert.IsNull (rd, "#1");
+
+ hc = new HttpContextStub ("~/foo/blueoyster/bigapple", String.Empty);
+ rd = r.GetRouteData (hc);
+ Assert.IsNull (rd, "#2");
+
+ hc = new HttpContextStub ("~/foo/blueoyster/bigapple-3", String.Empty);
+ rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#3");
+ Assert.AreEqual (r, rd.Route, "#3-1");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3-2");
+ Assert.AreEqual (3, rd.Values.Count, "#3-3");
+ Assert.AreEqual ("blueoyster", rd.Values["bar"], "#3-4");
+ Assert.AreEqual ("bigapple", rd.Values["baz"], "#3-5");
+ Assert.AreEqual ("3", rd.Values["dancefloor"], "#3-6");
+ Assert.IsTrue (typeof (string) == rd.Values["dancefloor"].GetType (), "#3-7");
+
+ hc = new HttpContextStub ("~/foo/blueoyster/-", String.Empty);
+ rd = r.GetRouteData (hc);
+
+ Assert.IsNull (rd, "#4");
+ }
+
+ [Test]
+ public void GetRouteData27 ()
+ {
+ var r = new Route ("foo/{bar}/{baz}/{dancefloor}", null) {
+ Defaults = new RouteValueDictionary (new { bar = "BlueOyster", dancefloor = 1 })
+ };
+
+ var hc = new HttpContextStub ("~/foo/nyc", String.Empty);
+ var rd = r.GetRouteData (hc);
+ Assert.IsNull (rd, "#1");
+ }
+
+ [Test]
+ public void GetRouteData28 ()
+ {
+ var r = new Route ("{foo}xyz{bar}xyz{baz}", null);
+ var hc = new HttpContextStub ("~/xyzxyzxyzxyzblah", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNull (rd, "#1");
+ }
+
+ [Test]
+ public void GetRouteData29 ()
+ {
+ var r = new Route ("{foo}xyz{bar}", null);
+ var hc = new HttpContextStub ("~/xyzxyzxyzxyzblah", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+ Assert.AreEqual (r, rd.Route, "#2");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#3");
+ Assert.AreEqual (2, rd.Values.Count, "#4");
+ Assert.AreEqual ("xyzxyzxyz", rd.Values["foo"], "#4-1");
+ Assert.AreEqual ("blah", rd.Values["bar"], "#4-2");
+ }
+
+ [Test]
+ public void GetRouteData30 ()
+ {
+ var r = new Route ("{foo}/bar/{baz}/boo/{blah}", null) {
+ Defaults = new RouteValueDictionary (new { baz = "meep", blah = "blurb" })
+ };
+
+ var hc = new HttpContextStub ("~/foo/bar", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNull (rd, "#1");
+
+ hc = new HttpContextStub ("~/foo/bar/baz/boo", String.Empty);
+ rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#2");
+ Assert.AreEqual (r, rd.Route, "#3");
+ Assert.AreEqual (0, rd.DataTokens.Count, "#4");
+ Assert.AreEqual (3, rd.Values.Count, "#4");
+ Assert.AreEqual ("foo", rd.Values["foo"], "#4-1");
+ Assert.AreEqual ("baz", rd.Values["baz"], "#4-2");
+ Assert.AreEqual ("blurb", rd.Values["blah"], "#4-3");
+ }
+
+ [Test]
[ExpectedException (typeof (ArgumentNullException))]
public void GetVirtualPathNullContext ()
{
@@ -365,5 +767,250 @@ namespace MonoTests.System.Web.Routing
Assert.AreEqual (r, vp.Route, "#3");
Assert.AreEqual (0, vp.DataTokens.Count, "#4");
}
+
+ [Test]
+ public void GetVirtualPath6 ()
+ {
+ var r = new MyRoute ("summary/{action}-{type}/{page}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary (new { action = "Index", page = 1 })
+ };
+ var hc = new HttpContextStub2 ("~/summary/Index-test/1", String.Empty);
+ var rd = r.GetRouteData (hc);
+ var values = new RouteValueDictionary (new { page = 2 });
+
+ Assert.IsNotNull (rd, "#1");
+ var vp = r.GetVirtualPath (new RequestContext (hc, rd), values);
+
+ Assert.IsNotNull (vp, "#2");
+ Assert.AreEqual ("summary/Index-test/2", vp.VirtualPath, "#2-1");
+ Assert.AreEqual (r, vp.Route, "#2-2");
+ Assert.AreEqual (0, vp.DataTokens.Count, "#2-3");
+
+ values = new RouteValueDictionary (new { page = 2, extra = "stuff" });
+ vp = r.GetVirtualPath (new RequestContext (hc, rd), values);
+
+ Assert.IsNotNull (vp, "#3");
+ Assert.AreEqual ("summary/Index-test/2?extra=stuff", vp.VirtualPath, "#3-2");
+ Assert.AreEqual (0, vp.DataTokens.Count, "#3-3");
+ }
+
+ [Test]
+ public void GetVirtualPath7 ()
+ {
+ var r = new MyRoute ("summary/{action}-{type}/{page}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary (new { action = "Index", page = 1 })
+ };
+ var hc = new HttpContextStub2 ("~/summary/Index-test/1", String.Empty);
+ var rd = r.GetRouteData (hc);
+ var values = new RouteValueDictionary (new { page = 2 });
+
+ Assert.IsNotNull (rd, "#1");
+ var vp = r.GetVirtualPath (new RequestContext (hc, rd), values);
+
+ Assert.IsNotNull (vp, "#2");
+ Assert.AreEqual ("summary/Index-test/2", vp.VirtualPath, "#2-1");
+ Assert.AreEqual (r, vp.Route, "#2-2");
+ Assert.AreEqual (0, vp.DataTokens.Count, "#2-3");
+ }
+
+ [Test]
+ public void GetVirtualPath8 ()
+ {
+ var r = new MyRoute ("todo/{action}/{page}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary (new { controller="todo", action="list", page=0 })
+ };
+ var hc = new HttpContextStub2 ("~/todo/list/2", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+
+ var vp = r.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { page = 3 }));
+ Assert.IsNotNull (vp, "#2");
+ Assert.AreEqual ("todo/list/3", vp.VirtualPath, "#2-1");
+ }
+
+ [Test]
+ public void GetVirtualPath9 ()
+ {
+ var r = new MyRoute ("todo/{action}/{page}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary {
+ {"controller", "todo"},
+ {"action", null},
+ {"page", null}
+ }
+ };
+
+ var hc = new HttpContextStub2 ("~/todo/list/2", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+
+ var vp = r.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { page = 3 }));
+ Assert.IsNotNull (vp, "#2");
+ Assert.AreEqual ("todo/list/3", vp.VirtualPath, "#2-1");
+ }
+
+ [Test]
+ public void GetVirtualPath10 ()
+ {
+ var r = new MyRoute ("{foo}/{bar}", new MyRouteHandler ());
+ var hc = new HttpContextStub ("~/foo/bar", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#1");
+
+ var vp = r.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { page = 3 }));
+ Assert.IsNotNull (vp, "#2");
+ Assert.AreEqual ("foo/bar?page=3", vp.VirtualPath, "#2-1");
+
+ vp = r.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { page = 3, another = "stuff" }));
+ Assert.IsNotNull (vp, "#3");
+ Assert.AreEqual ("foo/bar?page=3&another=stuff", vp.VirtualPath, "#3-1");
+
+ vp = r.GetVirtualPath (new RequestContext (hc, rd), new RouteValueDictionary (new { page = 3, another = "stuff", value = "with ; spaces & other chars" }));
+ Assert.IsNotNull (vp, "#4");
+ Assert.AreEqual ("foo/bar?page=3&another=stuff&value=with%20%3B%20spaces%20%26%20other%20chars", vp.VirtualPath, "#4-1");
+ }
+
+ [Test]
+ public void GetVirtualPath11 ()
+ {
+ var r = new MyRoute ("summary/{action}/{page}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary (new { action = "Index", page = 1 })
+ };
+ var hc = new HttpContextStub2 ("~/summary/test/1", String.Empty);
+ var rd = r.GetRouteData (hc);
+ var values = new RouteValueDictionary (new { page = 2 });
+
+ Assert.IsNotNull (rd, "#1");
+ var vp = r.GetVirtualPath (new RequestContext (hc, rd), values);
+
+ Assert.IsNotNull (vp, "#2");
+ Assert.AreEqual ("summary/test/2", vp.VirtualPath, "#2-1");
+ Assert.AreEqual (r, vp.Route, "#2-2");
+ Assert.AreEqual (0, vp.DataTokens.Count, "#2-3");
+
+ values = new RouteValueDictionary (new { page = 2, extra = "stuff" });
+ vp = r.GetVirtualPath (new RequestContext (hc, rd), values);
+
+ Assert.IsNotNull (vp, "#3");
+ Assert.AreEqual ("summary/test/2?extra=stuff", vp.VirtualPath, "#3-2");
+ Assert.AreEqual (0, vp.DataTokens.Count, "#3-3");
+ }
+
+ [Test]
+ public void GetVirtualPath12 ()
+ {
+ var r = new MyRoute ("{foo}/{bar}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary (new { bar = "baz" })
+ };
+
+ var hc = new HttpContextStub2 ("~/x/y", String.Empty);
+ var rd = r.GetRouteData (hc);
+ var values = new RouteValueDictionary ();
+
+ // Partial override is possible if defaults are specified
+ values ["foo"] = "A";
+ values ["baz"] = "B";
+
+ var vp = r.GetVirtualPath (new RequestContext (hc, rd), values);
+ Assert.IsNotNull (vp, "#1");
+ Assert.AreEqual ("A?baz=B", vp.VirtualPath, "#1-1");
+ }
+
+ [Test]
+ public void GetVirtualPath13 ()
+ {
+ var r = new MyRoute ("{foo}/{bar}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary (new { baz = "baz" })
+ };
+ var hc = new HttpContextStub2 ("~/x/y", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ // override a value incompletely
+ var values = new RouteValueDictionary ();
+ values ["foo"] = "A";
+
+ var vp = r.GetVirtualPath (new RequestContext (hc, rd), values);
+ Assert.IsNull (vp);
+ }
+
+ [Test]
+ public void GetVirtualPath14 ()
+ {
+ var r = new MyRoute ("{table}/{action}.aspx", new MyRouteHandler ());
+ var hc = new HttpContextStub2 ("~/x/y.aspx", String.Empty);
+ var rd = r.GetRouteData (hc);
+
+ // override a value incompletely
+ var values = new RouteValueDictionary (new {
+ emptyValue = String.Empty,
+ nullValue = (string)null,
+ nonEmptyValue = "SomeValue"
+ });
+
+ var vp = r.GetVirtualPath (new RequestContext (hc, rd), values);
+ Assert.IsNotNull (vp, "#A1");
+ Assert.AreEqual ("x/y.aspx?nonEmptyValue=SomeValue", vp.VirtualPath, "#A1-1");
+
+ values["nonEmptyValue"] = "Some Value + encoding &";
+ vp = r.GetVirtualPath (new RequestContext (hc, rd), values);
+ Assert.IsNotNull (vp, "#B1");
+ Assert.AreEqual ("x/y.aspx?nonEmptyValue=Some%20Value%20%2B%20encoding%20%26", vp.VirtualPath, "#B1-1");
+
+ }
+
+ // Bug #500739
+ [Test]
+ public void RouteGetRequiredStringWithDefaults ()
+ {
+ var routes = new RouteValueDictionary ();
+ var route = new Route ("Hello/{name}", new MyRouteHandler ()) {
+ Defaults = new RouteValueDictionary (new {controller = "Home", action = "Hello"})
+ };
+
+ routes.Add ("Name", route);
+
+ var hc = new HttpContextStub2 ("~/Hello/World", String.Empty);
+ var rd = route.GetRouteData (hc);
+
+ Assert.IsNotNull (rd, "#A1");
+ Assert.AreEqual ("Home", rd.GetRequiredString ("controller"), "#A2");
+ Assert.AreEqual ("Hello", rd.GetRequiredString ("action"), "#A3");
+ Assert.AreEqual ("World", rd.Values ["name"], "#A4");
+ }
+
+ [Test]
+ public void ProcessConstraint ()
+ {
+ var route = new MyRoute ("hello/{name}", new MyRouteHandler ());
+
+ Assert.IsFalse (route.DoProcessConstraint (null, "regex", "parameter", new RouteValueDictionary (), RouteDirection.IncomingRequest), "#1");
+
+ // constraint is null
+ AssertExtensions.Throws <InvalidOperationException> (
+ () => route.DoProcessConstraint (null, null, "parameter", new RouteValueDictionary (), RouteDirection.IncomingRequest),
+ "#2"
+ );
+
+ // constraint is neither a string or an IRouteConstraint instance
+ AssertExtensions.Throws <InvalidOperationException> (
+ () => route.DoProcessConstraint (null, 1, "parameter", new RouteValueDictionary (), RouteDirection.IncomingRequest),
+ "#3"
+ );
+
+ AssertExtensions.Throws <ArgumentNullException> (
+ () => route.DoProcessConstraint (null, "regex", null, new RouteValueDictionary (), RouteDirection.IncomingRequest),
+ "#4"
+ );
+
+ Assert.IsFalse (route.DoProcessConstraint (null, "regex", String.Empty, new RouteValueDictionary (), RouteDirection.IncomingRequest), "#5");
+
+ // This is a .NET programming error, so not sure if we should test for this...
+ AssertExtensions.Throws <NullReferenceException> (
+ () => route.DoProcessConstraint (null, "regex", "parameter", null, RouteDirection.IncomingRequest),
+ "#6"
+ );
+ }
}
}
diff --git a/mcs/class/System.Web.Routing/Test/System.Web.Routing/TestStubTypes.cs b/mcs/class/System.Web.Routing/Test/System.Web.Routing/TestStubTypes.cs
index e445d2b..0a2a8d5 100644
--- a/mcs/class/System.Web.Routing/Test/System.Web.Routing/TestStubTypes.cs
+++ b/mcs/class/System.Web.Routing/Test/System.Web.Routing/TestStubTypes.cs
@@ -76,7 +76,7 @@ namespace MonoTests.System.Web.Routing
}
string req_path, path_info;
-
+
public override string AppRelativeCurrentExecutionFilePath {
get { return req_path ?? base.AppRelativeCurrentExecutionFilePath; }
}
@@ -327,5 +327,10 @@ namespace MonoTests.System.Web.Routing
throw ex;
return base.GetVirtualPath (requestContext, values);
}
+
+ public bool DoProcessConstraint (HttpContextBase httpContext, object constraint, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
+ {
+ return ProcessConstraint (httpContext, constraint, parameterName, values, routeDirection);
+ }
}
}
diff --git a/mcs/class/System.Web.Routing/Test/System.Web.Routing/UnknownResponseHeader.cs b/mcs/class/System.Web.Routing/Test/System.Web.Routing/UnknownResponseHeader.cs
new file mode 100644
index 0000000..20d3ce0
--- /dev/null
+++ b/mcs/class/System.Web.Routing/Test/System.Web.Routing/UnknownResponseHeader.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace MonoTests.Common
+{
+ class UnknownResponseHeader
+ {
+ private string name;
+ private string value;
+
+ public UnknownResponseHeader (string name, string value)
+ {
+ this.name = name;
+ this.value = value;
+ }
+
+ public string Name
+ {
+ get { return name; }
+ }
+
+ public string Value
+ {
+ get { return value; }
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog b/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
index a9ae332..88da965 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
@@ -1,8 +1,20 @@
+2009-05-05 Marek Habersack <mhabersack at novell.com>
+
+ * Methods.cs: if SoapRpcMethodAttribute doesn't specify the action
+ or the action name is an empty string, generate the Action in
+ SoapMethodStubInfo constructor. Fixes bug #459790
+
+2009-04-21 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * HttpSoapWebServiceHandler.cs: provide the full stack trace instead
+ of just the Message to aid in debugging web service problems.
+ Bug #496758 fixed.
+
2008-06-10 Vladimir Krasnov <vladimirk at mainsoft.com>
* TypeStubManager.cs: fixed TypeStubInfo ctor, default binding name is
- wrong, when declared in WebServiceBindingAttribute, but not used.
- fixes. bug number: #345448
+ wrong, when declared in WebServiceBindingAttribute, but not used.
+ fixes. bug number: #345448
2008-02-22 Atsushi Enomoto <atsushi at ximian.com>
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpSoapWebServiceHandler.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpSoapWebServiceHandler.cs
index 0686f90..cf46635 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpSoapWebServiceHandler.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpSoapWebServiceHandler.cs
@@ -361,7 +361,7 @@ namespace System.Web.Services.Protocols
void SerializeFault (HttpContext context, SoapServerMessage requestMessage, Exception ex)
{
SoapException soex = ex as SoapException;
- if (soex == null) soex = new SoapException (ex.Message, WebServiceHelper.ServerFaultCode (requestMessage != null && requestMessage.IsSoap12), ex);
+ if (soex == null) soex = new SoapException (ex.ToString (), WebServiceHelper.ServerFaultCode (requestMessage != null && requestMessage.IsSoap12), ex);
SoapServerMessage faultMessage;
if (requestMessage != null)
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/Methods.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/Methods.cs
index 2ca191d..12a54fa 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/Methods.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/Methods.cs
@@ -157,6 +157,8 @@ namespace System.Web.Services.Protocols {
Use = SoapBindingUse.Encoded; // RPC always use encoded
Action = rma.Action;
+ if (Action != null && Action.Length == 0)
+ Action = null;
Binding = rma.Binding;
// When using RPC, MS.NET seems to ignore RequestElementName and
diff --git a/mcs/class/System.Web/ChangeLog b/mcs/class/System.Web/ChangeLog
index a34ca6a..1261a7c 100644
--- a/mcs/class/System.Web/ChangeLog
+++ b/mcs/class/System.Web/ChangeLog
@@ -1,3 +1,49 @@
+2009-07-23 Marek Habersack <mhabersack at novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/FullTagsInText.aspx
+ Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx
+
+2009-07-21 Marek Habersack <mhabersack at novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/UnquotedAngleBrackets.aspx
+
+2009-06-30 Marek Habersack <mhabersack at novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx
+
+2009-06-18 Marek Habersack <mhabersack at novell.com>
+
+ * browscap.ini.diff: updated to match the latest upstream
+ version.
+
+2009-06-04 Marek Habersack <mhabersack at novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx
+
+2009-05-10 Marek Habersack <mhabersack at novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx
+
+2009-04-28 Marek Habersack <mhabersack at novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx
+
+2009-04-24 Marek Habersack <mhabersack at novell.com>
+
+ * System.Web_test.dll.sources: added
+ System.Web.UI/PageParserFilterTest.cs
+
+2009-04-16 Marek Habersack <mhabersack at novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/NoBindForMethodsWithBindInName.aspx
+
2009-02-05 Marek Habersack <mhabersack at novell.com>
* Makefile (TEST_RESOURCE_FILES): added
diff --git a/mcs/class/System.Web/Makefile b/mcs/class/System.Web/Makefile
index 4e395e0..14228fd 100644
--- a/mcs/class/System.Web/Makefile
+++ b/mcs/class/System.Web/Makefile
@@ -159,7 +159,15 @@ TEST_RESOURCE_FILES = \
Test/mainsoft/NunitWebResources/ContentPlaceHolderInTemplate.master \
Test/mainsoft/NunitWebResources/MissingMasterFile.aspx \
Test/mainsoft/NunitWebResources/CustomSectionEmptyCollection.aspx \
- Test/mainsoft/NunitWebResources/LoginDisplayRememberMe.aspx
+ Test/mainsoft/NunitWebResources/LoginDisplayRememberMe.aspx \
+ Test/mainsoft/NunitWebResources/NoBindForMethodsWithBindInName.aspx \
+ Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx \
+ Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx \
+ Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx \
+ Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx \
+ Test/mainsoft/NunitWebResources/UnquotedAngleBrackets.aspx \
+ Test/mainsoft/NunitWebResources/FullTagsInText.aspx \
+ Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx
RESX_DIST = resources/TranslationResources.resx
ifeq (net_2_0, $(PROFILE))
diff --git a/mcs/class/System.Web/System.Web.Compilation/AppCodeCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/AppCodeCompiler.cs
index 71ac1d1..2e6b315 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AppCodeCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AppCodeCompiler.cs
@@ -668,9 +668,17 @@ namespace System.Web.Compilation
} else
return;
- if (HttpApplication.LoadTypeFromBin (providerTypeName) == null)
- throw new HttpException (String.Format ("Profile provider type not found: {0}",
- providerTypeName));
+ Exception noTypeException = null;
+ Type ptype = null;
+
+ try {
+ ptype = HttpApplication.LoadTypeFromBin (providerTypeName);
+ } catch (Exception ex) {
+ noTypeException = ex;
+ }
+
+ if (ptype == null)
+ throw new HttpException (String.Format ("Profile provider type not found: {0}", providerTypeName), noTypeException);
}
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/ApplicationFileBuildProvider.cs b/mcs/class/System.Web/System.Web.Compilation/ApplicationFileBuildProvider.cs
index 5eb02b3..95b0148 100644
--- a/mcs/class/System.Web/System.Web.Compilation/ApplicationFileBuildProvider.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/ApplicationFileBuildProvider.cs
@@ -46,12 +46,12 @@ namespace System.Web.Compilation
return new GlobalAsaxCompiler (parser as ApplicationFileParser);
}
- protected override TemplateParser CreateParser (string virtualPath, string physicalPath, HttpContext context)
+ protected override TemplateParser CreateParser (VirtualPath virtualPath, string physicalPath, HttpContext context)
{
- return CreateParser (virtualPath, physicalPath, OpenReader (virtualPath), context);
+ return CreateParser (virtualPath, physicalPath, OpenReader (virtualPath.Original), context);
}
- protected override TemplateParser CreateParser (string virtualPath, string physicalPath, TextReader reader, HttpContext context)
+ protected override TemplateParser CreateParser (VirtualPath virtualPath, string physicalPath, TextReader reader, HttpContext context)
{
return new ApplicationFileParser (virtualPath, physicalPath, reader, context);
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
index 3d7239c..b2edfb2 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
@@ -179,6 +179,11 @@ namespace System.Web.Compilation
class AspGenerator
{
+#if NET_2_0
+ const int READ_BUFFER_SIZE = 8192;
+
+ internal static Regex DirectiveRegex = new Regex (@"<%\s*@(\s*(?<attrname>\w[\w:]*(?=\W))(\s*(?<equal>=)\s*""(?<attrval>[^""]*)""|\s*(?<equal>=)\s*'(?<attrval>[^']*)'|\s*(?<equal>=)\s*(?<attrval>[^\s%>]*)|(?<equal>)(?<attrval>\s*?)))*\s*?%>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
+#endif
ParserStack pstack;
BuilderLocationStack stack;
TemplateParser tparser;
@@ -192,20 +197,32 @@ namespace System.Web.Compilation
bool inForm;
bool useOtherTags;
TagType lastTag;
+#if NET_2_0
+ AspComponentFoundry componentFoundry;
+ Stream inputStream;
+ public AspGenerator (TemplateParser tparser, AspComponentFoundry componentFoundry) : this (tparser)
+ {
+ this.componentFoundry = componentFoundry;
+ }
+#endif
+
public AspGenerator (TemplateParser tparser)
{
this.tparser = tparser;
text = new StringBuilder ();
stack = new BuilderLocationStack ();
+
+#if !NET_2_0
rootBuilder = new RootBuilder (tparser);
- stack.Push (rootBuilder, null);
tparser.RootBuilder = rootBuilder;
+ stack.Push (rootBuilder, null);
+#endif
pstack = new ParserStack ();
}
public RootBuilder RootBuilder {
- get { return tparser.RootBuilder; }
+ get { return rootBuilder; }
}
public AspParser Parser {
@@ -225,6 +242,236 @@ namespace System.Web.Compilation
return tparser.PageParserFilter;
}
}
+
+ // KLUDGE WARNING
+ //
+ // The kludge to determine the base type of the to-be-generated ASP.NET class is
+ // very unfortunate but with our current parser it is, unfortunately, necessary. The
+ // reason for reading the entire file into memory and parsing it with a regexp is
+ // that we need to read the main directive (i.e. <%@Page %>, <%@Control %> etc),
+ // pass it to the page parser filter if it exists, and finally read the inherits
+ // attribute of the directive to get access to the base type of the class to be
+ // generated. On that type we check whether it is decorated with the
+ // FileLevelControlBuilder attribute and, if yes, use the indicated type as the
+ // RootBuilder. This is necessary for the ASP.NET MVC views using the "generic"
+ // inherits declaration to work properly. Our current parser is not able to parse
+ // the input file out of sequence (i.e. directives first, then the rest) so we need
+ // to do what we do below, alas.
+ Hashtable GetDirectiveAttributesDictionary (string skipKeyName, CaptureCollection names, CaptureCollection values)
+ {
+ var ret = new Hashtable (StringComparer.InvariantCultureIgnoreCase);
+
+ int index = 0;
+ string keyName;
+ foreach (Capture c in names) {
+ keyName = c.Value;
+ if (String.Compare (skipKeyName, keyName, StringComparison.OrdinalIgnoreCase) == 0) {
+ index++;
+ continue;
+ }
+
+ ret.Add (c.Value, values [index++].Value);
+ }
+
+ return ret;
+ }
+
+ string GetDirectiveName (CaptureCollection names)
+ {
+ string val;
+ foreach (Capture c in names) {
+ val = c.Value;
+ if (Directive.IsDirective (val))
+ return val;
+ }
+
+ return tparser.DefaultDirectiveName;
+ }
+
+ int GetLineNumberForIndex (string fileContents, int index)
+ {
+ int line = 1;
+ char c;
+ bool foundCR = false;
+
+ for (int pos = 0; pos < index; pos++) {
+ c = fileContents [pos];
+ if (c == '\n' || foundCR) {
+ line++;
+ foundCR = false;
+ }
+
+ foundCR = (c == '\r');
+ }
+
+ return line;
+ }
+
+ int GetNumberOfLinesForRange (string fileContents, int index, int length)
+ {
+ int lines = 0;
+ int stop = index + length;
+ char c;
+ bool foundCR = false;
+
+ for (int pos = index; pos < stop; pos++) {
+ c = fileContents [pos];
+ if (c == '\n' || foundCR) {
+ lines++;
+ foundCR = false;
+ }
+
+ foundCR = (c == '\r');
+ }
+
+ return lines;
+ }
+
+ Type GetInheritedType (string fileContents, string filename)
+ {
+ MatchCollection matches = DirectiveRegex.Matches (fileContents);
+ if (matches == null || matches.Count == 0)
+ return null;
+
+ string wantedDirectiveName = tparser.DefaultDirectiveName.ToLower ();
+ string directiveName;
+ GroupCollection groups;
+ CaptureCollection ccNames;
+
+ foreach (Match match in matches) {
+ groups = match.Groups;
+ if (groups.Count < 6)
+ continue;
+
+ ccNames = groups [3].Captures;
+ directiveName = GetDirectiveName (ccNames);
+ if (String.IsNullOrEmpty (directiveName))
+ continue;
+
+ if (String.Compare (directiveName.ToLower (), wantedDirectiveName, StringComparison.Ordinal) != 0)
+ continue;
+
+ var loc = new Location (null);
+ int index = match.Index;
+
+ loc.Filename = filename;
+ loc.BeginLine = GetLineNumberForIndex (fileContents, index);
+ loc.EndLine = loc.BeginLine + GetNumberOfLinesForRange (fileContents, index, match.Length);
+
+ tparser.Location = loc;
+ tparser.allowedMainDirectives = 2;
+ tparser.AddDirective (wantedDirectiveName, GetDirectiveAttributesDictionary (wantedDirectiveName, ccNames, groups [5].Captures));
+
+ return tparser.BaseType;
+ }
+
+ return null;
+ }
+
+ string ReadFileContents (Stream inputStream, string filename)
+ {
+ string ret = null;
+
+ if (inputStream != null) {
+ if (inputStream.CanSeek) {
+ long curPos = inputStream.Position;
+ inputStream.Seek (0, SeekOrigin.Begin);
+
+ Encoding enc = WebEncoding.FileEncoding;
+ StringBuilder sb = new StringBuilder ();
+ byte[] buffer = new byte [READ_BUFFER_SIZE];
+ int nbytes;
+
+ while ((nbytes = inputStream.Read (buffer, 0, READ_BUFFER_SIZE)) > 0)
+ sb.Append (enc.GetString (buffer, 0, nbytes));
+ inputStream.Seek (curPos, SeekOrigin.Begin);
+
+ ret = sb.ToString ();
+ sb.Length = 0;
+ sb.Capacity = 0;
+ } else {
+ FileStream fs = inputStream as FileStream;
+ if (fs != null) {
+ string fname = fs.Name;
+ try {
+ if (File.Exists (fname))
+ ret = File.ReadAllText (fname);
+ } catch {
+ // ignore
+ }
+ }
+ }
+ }
+
+ if (ret == null && !String.IsNullOrEmpty (filename) && String.Compare (filename, "@@inner_string@@", StringComparison.Ordinal) != 0) {
+ try {
+ if (File.Exists (filename))
+ ret = File.ReadAllText (filename);
+ } catch {
+ // ignore
+ }
+ }
+
+ return ret;
+ }
+
+ Type GetRootBuilderType (Stream inputStream, string filename)
+ {
+ Type ret = null;
+ string fileContents;
+
+ if (tparser != null)
+ fileContents = ReadFileContents (inputStream, filename);
+ else
+ fileContents = null;
+
+ if (!String.IsNullOrEmpty (fileContents)) {
+ Type inheritedType = GetInheritedType (fileContents, filename);
+ fileContents = null;
+ if (inheritedType != null) {
+ FileLevelControlBuilderAttribute attr;
+
+ try {
+ object[] attrs = inheritedType.GetCustomAttributes (typeof (FileLevelControlBuilderAttribute), true);
+ if (attrs != null && attrs.Length > 0)
+ attr = attrs [0] as FileLevelControlBuilderAttribute;
+ else
+ attr = null;
+ } catch {
+ attr = null;
+ }
+
+ ret = attr != null ? attr.BuilderType : null;
+ }
+ }
+
+ if (ret == null) {
+ if (tparser is PageParser)
+ return typeof (FileLevelPageControlBuilder);
+ else if (tparser is UserControlParser)
+ return typeof (FileLevelUserControlBuilder);
+ else
+ return typeof (RootBuilder);
+ } else
+ return ret;
+ }
+
+ void CreateRootBuilder (Stream inputStream, string filename)
+ {
+ if (rootBuilder != null)
+ return;
+
+ Type rootBuilderType = GetRootBuilderType (inputStream, filename);
+ rootBuilder = Activator.CreateInstance (rootBuilderType) as RootBuilder;
+ if (rootBuilder == null)
+ throw new HttpException ("Cannot create an instance of file-level control builder.");
+ rootBuilder.Init (tparser, null, null, null, null, null);
+ if (componentFoundry != null)
+ rootBuilder.Foundry = componentFoundry;
+
+ stack.Push (rootBuilder, null);
+ tparser.RootBuilder = rootBuilder;
+ }
#endif
BaseCompiler GetCompilerFromType ()
@@ -255,6 +502,7 @@ namespace System.Web.Compilation
#if NET_2_0
parser.ParsingComplete += new ParsingCompleteHandler (ParsingCompleted);
tparser.AspGenerator = this;
+ CreateRootBuilder (inputStream, filename);
#endif
if (!pstack.Push (parser))
throw new ParseException (Location, "Infinite recursion detected including file: " + filename);
@@ -266,9 +514,6 @@ namespace System.Web.Compilation
tparser.AddDependency (arvp);
}
-#if NET_2_0
- tparser.MD5Checksum = parser.MD5Checksum;
-#endif
}
#if NET_2_0
@@ -300,15 +545,19 @@ namespace System.Web.Compilation
if (text.Length > 0)
FlushText ();
+#if NET_2_0
+ tparser.MD5Checksum = pstack.Parser.MD5Checksum;
+#endif
pstack.Pop ();
#if DEBUG
- PrintTree (rootBuilder, 0);
+ PrintTree (RootBuilder, 0);
#endif
if (stack.Count > 1 && pstack.Count == 0)
throw new ParseException (stack.Builder.Location,
"Expecting </" + stack.Builder.TagName + "> " + stack.Builder);
+
} finally {
if (reader != null)
reader.Close ();
@@ -317,6 +566,9 @@ namespace System.Web.Compilation
public void Parse (Stream stream, string filename, bool doInitParser)
{
+#if NET_2_0
+ inputStream = stream;
+#endif
Parse (new StreamReader (stream, WebEncoding.FileEncoding), filename, doInitParser);
}
@@ -448,7 +700,8 @@ namespace System.Web.Compilation
// KLUDGE WARNING!!
static readonly Regex runatServer=new Regex (@"<[\w:\.]+.*?runat=[""']?server[""']?.*?/>",
RegexOptions.Compiled | RegexOptions.Singleline |
- RegexOptions.Multiline | RegexOptions.IgnoreCase);
+ RegexOptions.Multiline | RegexOptions.IgnoreCase |
+ RegexOptions.CultureInvariant);
bool ProcessTagsInAttributes (ILocation location, string tagid, TagAttributes attributes, TagType type)
{
if (attributes == null || attributes.Count == 0)
@@ -485,7 +738,7 @@ namespace System.Web.Compilation
length = group.Length;
TextParsed (location, String.Format (" {0}=\"{1}", key, index > 0 ? value.Substring (0, index) : String.Empty));;
- FlushText ();
+ FlushText ();
ParseAttributeTag (group.Value);
if (index + length < value.Length)
TextParsed (location, value.Substring (index + length) + "\"");
@@ -521,12 +774,42 @@ namespace System.Web.Compilation
if (pfilter == null)
return;
- pfilter.ParseComplete (rootBuilder);
+ pfilter.ParseComplete (RootBuilder);
}
#endif
+
+ void CheckIfIncludeFileIsSecure (string filePath)
+ {
+ if (filePath == null || filePath.Length == 0)
+ return;
+
+ // a bit slow, but fully portable
+ string newdir = null;
+ Exception exception = null;
+ try {
+ string origdir = Directory.GetCurrentDirectory ();
+ Directory.SetCurrentDirectory (Path.GetDirectoryName (filePath));
+ newdir = Directory.GetCurrentDirectory ();
+ Directory.SetCurrentDirectory (origdir);
+ if (newdir [newdir.Length - 1] != '/')
+ newdir += "/";
+ } catch (DirectoryNotFoundException ex) {
+ return; // will be converted into 404
+ } catch (FileNotFoundException ex) {
+ return; // as above
+ } catch (Exception ex) {
+ // better safe than sorry
+ exception = ex;
+ }
+
+ if (exception != null || !StrUtils.StartsWith (newdir, HttpRuntime.AppDomainAppPath))
+ throw new ParseException (Location, "Files above the application's root directory cannot be included.");
+ }
void TagParsed (ILocation location, TagType tagtype, string tagid, TagAttributes attributes)
{
+ bool tagIgnored;
+
this.location = new Location (location);
if (tparser != null)
tparser.Location = location;
@@ -536,10 +819,12 @@ namespace System.Web.Compilation
if (0 == String.Compare (tagid, "script", true, CultureInfo.InvariantCulture)) {
bool in_script = (inScript || ignore_text);
- if (in_script || (tagtype != TagType.Close && attributes != null)) {
- if ((in_script || attributes.IsRunAtServer ()) && ProcessScript (tagtype, attributes))
+ if (in_script) {
+ if (ProcessScript (tagtype, attributes))
+ return;
+ } else
+ if (ProcessScript (tagtype, attributes))
return;
- }
}
lastTag = tagtype;
@@ -551,8 +836,9 @@ namespace System.Web.Compilation
tparser.AddDirective (tagid, attributes.GetDictionary (null));
break;
case TagType.Tag:
- if (ProcessTag (location, tagid, attributes, tagtype)) {
- useOtherTags = true;
+ if (ProcessTag (location, tagid, attributes, tagtype, out tagIgnored)) {
+ if (!tagIgnored)
+ useOtherTags = true;
break;
}
@@ -576,7 +862,7 @@ namespace System.Web.Compilation
break;
case TagType.SelfClosing:
int count = stack.Count;
- if (!ProcessTag (location, tagid, attributes, tagtype)) {
+ if (!ProcessTag (location, tagid, attributes, tagtype, out tagIgnored) && !tagIgnored) {
string plainText = location.PlainText;
if (!ProcessTagsInAttributes (location, tagid, attributes, TagType.SelfClosing))
TextParsed (location, plainText);
@@ -621,6 +907,7 @@ namespace System.Web.Compilation
Parse (tparser.MapPath (file), true);
} else {
string includeFilePath = GetIncludeFilePath (tparser.ParserDir, file);
+ CheckIfIncludeFileIsSecure (includeFilePath);
tparser.PushIncludeDir (Path.GetDirectoryName (includeFilePath));
try {
Parse (includeFilePath, true);
@@ -666,6 +953,8 @@ namespace System.Web.Compilation
if (ignore_text)
return;
+ // And again... the first one wins - if we have expressions and server-side
+ // controls together in one block of plain text, tough luck...
if (text.IndexOf ("<%") != -1 && !inScript) {
if (this.text.Length > 0)
FlushText (true);
@@ -673,8 +962,32 @@ namespace System.Web.Compilation
r.AddChildren (this);
return;
}
+
+ int startIndex = 0, index = 0;
+ Match match;
+ int textLen = text.Length;
+
+ while (index > -1 && startIndex < textLen) {
+ match = runatServer.Match (text, index);
+
+ if (match.Success) {
+ string value = match.Value;
+ index = match.Index;
+ if (index > startIndex)
+ this.text.Append (text.Substring (startIndex, index - startIndex));
+ ParseAttributeTag (value);
+ index += value.Length;
+ startIndex = index;
+ } else
+ break;
+
+ if (index < textLen)
+ index = text.IndexOf ('<', index);
+ else
+ break;
+ }
- this.text.Append (text);
+ this.text.Append (text.Substring (startIndex));
//PrintLocation (location);
}
@@ -754,7 +1067,7 @@ namespace System.Web.Compilation
if (!typeof (System.Web.UI.WebControls.Content).IsAssignableFrom (cb.ControlType))
return true;
- if (BuilderHasOtherThan (typeof (System.Web.UI.WebControls.Content), rootBuilder))
+ if (BuilderHasOtherThan (typeof (System.Web.UI.WebControls.Content), RootBuilder))
return false;
return true;
@@ -771,8 +1084,9 @@ namespace System.Web.Compilation
parent.AppendSubBuilder (builder);
}
- bool ProcessTag (ILocation location, string tagid, TagAttributes atts, TagType tagtype)
+ bool ProcessTag (ILocation location, string tagid, TagAttributes atts, TagType tagtype, out bool ignored)
{
+ ignored = false;
if (isApplication) {
if (String.Compare (tagid, "object", true, CultureInfo.InvariantCulture) != 0)
throw new ParseException (location, "Invalid tag for application file.");
@@ -780,6 +1094,13 @@ namespace System.Web.Compilation
ControlBuilder parent = stack.Builder;
ControlBuilder builder = null;
+ if (parent != null && parent.ControlType == typeof (HtmlTable) &&
+ (String.Compare (tagid, "thead", true, CultureInfo.InvariantCulture) == 0 ||
+ String.Compare (tagid, "tbody", true, CultureInfo.InvariantCulture) == 0)) {
+ ignored = true;
+ return true;
+ }
+
Hashtable htable = (atts != null) ? atts.GetDictionary (null) : emptyHash;
if (stack.Count > 1) {
try {
@@ -791,15 +1112,22 @@ namespace System.Web.Compilation
}
}
- if (builder == null && atts != null && atts.IsRunAtServer ()) {
+ bool runatServer = atts != null && atts.IsRunAtServer ();
+ if (builder == null && runatServer) {
string id = htable ["id"] as string;
if (id != null && !CodeGenerator.IsValidLanguageIndependentIdentifier (id))
throw new ParseException (Location, "'" + id + "' is not a valid identifier");
try {
- builder = rootBuilder.CreateSubBuilder (tagid, htable, null, tparser, location);
+ builder = RootBuilder.CreateSubBuilder (tagid, htable, null, tparser, location);
} catch (TypeLoadException e) {
throw new ParseException (Location, "Type not found.", e);
+ } catch (HttpException e) {
+ CompilationException inner = e.InnerException as CompilationException;
+ if (inner != null)
+ throw inner;
+
+ throw new ParseException (Location, e.Message, e);
} catch (Exception e) {
throw new ParseException (Location, e.Message, e);
}
@@ -808,6 +1136,11 @@ namespace System.Web.Compilation
if (builder == null)
return false;
+ // This is as good as we can do for now - if the parsed location contains
+ // both expressions and code render blocks then we're out of luck...
+ string plainText = location.PlainText;
+ if (!runatServer && plainText.IndexOf ("<%$") == -1&& plainText.IndexOf ("<%") > -1)
+ return false;
#if NET_2_0
PageParserFilter pfilter = PageParserFilter;
if (pfilter != null && !pfilter.AllowControl (builder.ControlType, builder))
@@ -834,7 +1167,7 @@ namespace System.Web.Compilation
} else {
if (!isApplication && builder is ObjectTagBuilder) {
ObjectTagBuilder ot = (ObjectTagBuilder) builder;
- if (ot.Scope != null && ot.Scope != "")
+ if (ot.Scope != null && ot.Scope.Length > 0)
throw new ParseException (location, "Scope not allowed here");
if (tagtype == TagType.Tag) {
@@ -928,6 +1261,9 @@ namespace System.Web.Compilation
}
return true;
}
+
+ if (current.ControlType == typeof (HtmlTable) && String.Compare (tagid, "thead", true, CultureInfo.InvariantCulture) == 0)
+ return true;
if (0 != String.Compare (tagid, btag, true, CultureInfo.InvariantCulture))
return false;
@@ -958,13 +1294,13 @@ namespace System.Web.Compilation
CodeConstructType MapTagTypeToConstructType (TagType tagtype)
{
switch (tagtype) {
- case TagType.DataBinding:
+ case TagType.CodeRenderExpression:
return CodeConstructType.ExpressionSnippet;
case TagType.CodeRender:
return CodeConstructType.CodeSnippet;
- case TagType.CodeRenderExpression:
+ case TagType.DataBinding:
return CodeConstructType.DataBindingSnippet;
default:
@@ -977,7 +1313,16 @@ namespace System.Web.Compilation
{
#if NET_2_0
PageParserFilter pfilter = PageParserFilter;
- if (pfilter != null && (!pfilter.AllowCode || !pfilter.ProcessCodeConstruct (MapTagTypeToConstructType (tagtype), code)))
+ // LAMESPEC:
+ //
+ // http://msdn.microsoft.com/en-us/library/system.web.ui.pageparserfilter.processcodeconstruct.aspx
+ //
+ // The above page says if false is returned then we should NOT process the
+ // code further, wheras in reality it's the other way around. The
+ // ProcessCodeConstruct return value means whether or not the filter
+ // _processed_ the code.
+ //
+ if (pfilter != null && (!pfilter.AllowCode || pfilter.ProcessCodeConstruct (MapTagTypeToConstructType (tagtype), code)))
return true;
#endif
ControlBuilder b = null;
@@ -1035,11 +1380,46 @@ namespace System.Web.Compilation
{
this.generator = generator;
int index = str.IndexOf ("<%");
- if (index > 0) {
- TextParsed (null, str.Substring (0, index));
- str = str.Substring (index);
- }
+ if (index > 0)
+ DoParseExpressions (str);
+ else
+ DoParse (str);
+ }
+ void DoParseExpressions (string str)
+ {
+ int startIndex = 0, index = 0;
+ Regex codeDirective = new Regex ("(<%(?!@)(?<code>.*?)%>)|(<[\\w:\\.]+.*?runat=[\"']?server[\"']?.*?/>)",
+ RegexOptions.Multiline | RegexOptions.Compiled | RegexOptions.CultureInvariant);
+ Match match;
+ int strLen = str.Length;
+
+ while (index > -1 && startIndex < strLen) {
+ match = codeDirective.Match (str, index);
+
+ if (match.Success) {
+ string value = match.Value;
+ index = match.Index;
+ if (index > startIndex)
+ TextParsed (null, str.Substring (startIndex, index - startIndex));
+ DoParse (value);
+ index += value.Length;
+ startIndex = index;
+ } else
+ break;
+
+ if (index < strLen)
+ index = str.IndexOf ('<', index);
+ else
+ break;
+ }
+
+ if (startIndex < strLen)
+ TextParsed (null, str.Substring (startIndex));
+ }
+
+ void DoParse (string str)
+ {
AspParser parser = new AspParser ("@@nested_tag@@", new StringReader (str));
parser.Error += new ParseErrorHandler (ParseError);
parser.TagParsed += new TagParsedHandler (TagParsed);
@@ -1064,6 +1444,7 @@ namespace System.Web.Compilation
case TagType.Tag:
case TagType.SelfClosing:
+ case TagType.Close:
if (generator != null)
generator.TagParsed (location, tagtype, tagid, attributes);
else
@@ -1071,7 +1452,9 @@ namespace System.Web.Compilation
break;
default:
- builder.AppendLiteralString (location.PlainText);
+ string text = location.PlainText;
+ if (text != null && text.Trim ().Length > 0)
+ builder.AppendLiteralString (text);
break;
}
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/AspParser.cs b/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
index b37e8a3..5c83cbd 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
@@ -3,8 +3,10 @@
//
// Authors:
// Gonzalo Paniagua Javier (gonzalo at ximian.com)
+// Marek Habersack <mhabersack at novell.com>
//
// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
+// (C) 2004-2009 Novell, Inc (http://novell.com)
//
//
@@ -52,17 +54,18 @@ namespace System.Web.Compilation
static readonly object textParsedEvent = new object ();
#if NET_2_0
static readonly object parsingCompleteEvent = new object();
-
- byte[] md5checksum;
+
+ MD5 checksum;
#endif
AspTokenizer tokenizer;
int beginLine, endLine;
int beginColumn, endColumn;
int beginPosition, endPosition;
string filename;
- string fileText;
string verbatimID;
-
+ string fileText;
+ StringReader fileReader;
+
EventHandlerList events = new EventHandlerList ();
public event ParseErrorHandler Error {
@@ -90,18 +93,19 @@ namespace System.Web.Compilation
public AspParser (string filename, TextReader input)
{
this.filename = filename;
- fileText = input.ReadToEnd ();
-#if NET_2_0
- MD5 md5 = MD5.Create ();
- md5checksum = md5.ComputeHash (Encoding.UTF8.GetBytes (fileText));
-#endif
- StringReader reader = new StringReader (fileText);
- tokenizer = new AspTokenizer (reader);
+ this.fileText = input.ReadToEnd ();
+ this.fileReader = new StringReader (this.fileText);
+ tokenizer = new AspTokenizer (this.fileReader);
}
#if NET_2_0
public byte[] MD5Checksum {
- get { return md5checksum; }
+ get {
+ if (checksum == null)
+ return new byte[0];
+
+ return checksum.Hash;
+ }
}
#endif
@@ -122,12 +126,17 @@ namespace System.Web.Compilation
}
public string FileText {
- get { return fileText; }
+ get {
+ if (fileText != null)
+ return fileText;
+
+ return null;
+ }
}
public string PlainText {
get {
- if (beginPosition >= endPosition)
+ if (beginPosition >= endPosition || fileText == null)
return null;
return fileText.Substring (beginPosition, endPosition - beginPosition);
@@ -144,10 +153,11 @@ namespace System.Web.Compilation
verbatimID = value;
}
}
-
+
bool Eat (int expected_token)
{
- if (tokenizer.get_token () != expected_token) {
+ int token = tokenizer.get_token ();
+ if (token != expected_token) {
tokenizer.put_back ();
return false;
}
@@ -173,60 +183,76 @@ namespace System.Web.Compilation
public void Parse ()
{
+ if (tokenizer == null) {
+ OnError ("AspParser not initialized properly.");
+ return;
+ }
+
int token;
string id;
TagAttributes attributes;
TagType tagtype = TagType.Text;
StringBuilder text = new StringBuilder ();
- while ((token = tokenizer.get_token ()) != Token.EOF) {
- BeginElement ();
+ try {
+ while ((token = tokenizer.get_token ()) != Token.EOF) {
+ BeginElement ();
- if (tokenizer.Verbatim){
- string end_verbatim = "</" + verbatimID + ">";
- string verbatim_text = GetVerbatim (token, end_verbatim);
+ if (tokenizer.Verbatim){
+ string end_verbatim = "</" + verbatimID + ">";
+ string verbatim_text = GetVerbatim (token, end_verbatim);
- if (verbatim_text == null)
- OnError ("Unexpected EOF processing " + verbatimID);
+ if (verbatim_text == null)
+ OnError ("Unexpected EOF processing " + verbatimID);
- tokenizer.Verbatim = false;
+ tokenizer.Verbatim = false;
- EndElement ();
- endPosition -= end_verbatim.Length;
- OnTextParsed (verbatim_text);
- beginPosition = endPosition;
- endPosition += end_verbatim.Length;
- OnTagParsed (TagType.Close, verbatimID, null);
- continue;
- }
-
- if (token == '<') {
- GetTag (out tagtype, out id, out attributes);
- EndElement ();
- if (tagtype == TagType.ServerComment)
+ EndElement ();
+ endPosition -= end_verbatim.Length;
+ OnTextParsed (verbatim_text);
+ beginPosition = endPosition;
+ endPosition += end_verbatim.Length;
+ OnTagParsed (TagType.Close, verbatimID, null);
continue;
+ }
+
+ if (token == '<') {
+ GetTag (out tagtype, out id, out attributes);
+ EndElement ();
+ if (tagtype == TagType.ServerComment)
+ continue;
- if (tagtype == TagType.Text)
- OnTextParsed (id);
- else
- OnTagParsed (tagtype, id, attributes);
+ if (tagtype == TagType.Text)
+ OnTextParsed (id);
+ else
+ OnTagParsed (tagtype, id, attributes);
- continue;
- }
+ continue;
+ }
- if (tokenizer.Value.Trim () == "" && tagtype == TagType.Directive) {
- continue;
- }
+ if (tokenizer.Value.Trim ().Length == 0 && tagtype == TagType.Directive) {
+ continue;
+ }
- text.Length = 0;
- do {
- text.Append (tokenizer.Value);
- token = tokenizer.get_token ();
- } while (token != '<' && token != Token.EOF);
+ text.Length = 0;
+ do {
+ text.Append (tokenizer.Value);
+ token = tokenizer.get_token ();
+ } while (token != '<' && token != Token.EOF);
- tokenizer.put_back ();
- EndElement ();
- OnTextParsed (text.ToString ());
+ tokenizer.put_back ();
+ EndElement ();
+ OnTextParsed (text.ToString ());
+ }
+ } finally {
+ if (fileReader != null) {
+ fileReader.Close ();
+ fileReader = null;
+ }
+#if NET_2_0
+ checksum = tokenizer.Checksum;
+#endif
+ tokenizer = null;
}
#if NET_2_0
@@ -358,9 +384,24 @@ namespace System.Web.Compilation
break;
default:
+ string idvalue = null;
+ // This is to handle code like:
+ //
+ // <asp:ListItem runat="server"> < </asp:ListItem>
+ //
+ if ((char)token == '<') {
+ string odds = tokenizer.Odds;
+ if (odds != null && odds.Length > 0 && Char.IsWhiteSpace (odds [0])) {
+ tokenizer.put_back ();
+ idvalue = odds;
+ } else
+ idvalue = tokenizer.Value;
+ } else
+ idvalue = tokenizer.Value;
+
tagtype = TagType.Text;
tokenizer.InTag = false;
- id = "<" + tokenizer.Value;
+ id = "<" + idvalue;
break;
}
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs b/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs
index fea85fe..1d37324 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs
@@ -32,6 +32,7 @@ using System;
using System.Collections;
using System.IO;
using System.Text;
+using System.Security.Cryptography;
namespace System.Web.Compilation
{
@@ -48,17 +49,22 @@ namespace System.Web.Compilation
class AspTokenizer
{
+#if NET_2_0
+ const int CHECKSUM_BUF_SIZE = 8192;
+#endif
class PutBackItem
{
public readonly string Value;
public readonly int Position;
public readonly int CurrentToken;
+ public readonly bool InTag;
- public PutBackItem (string value, int position, int currentToken)
+ public PutBackItem (string value, int position, int currentToken, bool inTag)
{
Value = value;
Position = position;
CurrentToken = currentToken;
+ InTag = inTag;
}
}
@@ -79,6 +85,15 @@ namespace System.Web.Compilation
int unget_value;
string val;
Stack putBackBuffer;
+#if NET_2_0
+ MD5 checksum;
+ char[] checksum_buf = new char [CHECKSUM_BUF_SIZE];
+ int checksum_buf_pos = -1;
+
+ public MD5 Checksum {
+ get { return checksum; }
+ }
+#endif
public AspTokenizer (TextReader reader)
{
@@ -105,7 +120,7 @@ namespace System.Web.Compilation
putBackBuffer = new Stack ();
string val = Value;
- putBackBuffer.Push (new PutBackItem (val, position, current_token));
+ putBackBuffer.Push (new PutBackItem (val, position, current_token, inTag));
position -= val.Length;
}
@@ -119,6 +134,7 @@ namespace System.Web.Compilation
val = null;
sb = new StringBuilder (pbi.Value);
current_token = pbi.CurrentToken;
+ inTag = pbi.InTag;
return current_token;
}
@@ -149,7 +165,36 @@ namespace System.Web.Compilation
position--;
col--;
}
+
+#if NET_2_0
+ void TransformNextBlock (int count, bool final)
+ {
+ byte[] input = Encoding.UTF8.GetBytes (checksum_buf, 0, count);
+
+ if (checksum == null)
+ checksum = MD5.Create ();
+
+ if (final)
+ checksum.TransformFinalBlock (input, 0, input.Length);
+ else
+ checksum.TransformBlock (input, 0, input.Length, input, 0);
+ input = null;
+
+ checksum_buf_pos = -1;
+ }
+ void UpdateChecksum (int c)
+ {
+ bool final = c == -1;
+
+ if (!final) {
+ if (checksum_buf_pos + 1 >= CHECKSUM_BUF_SIZE)
+ TransformNextBlock (checksum_buf_pos + 1, false);
+ checksum_buf [++checksum_buf_pos] = (char)c;
+ } else
+ TransformNextBlock (checksum_buf_pos + 1, true);
+ }
+#endif
int read_char ()
{
int c;
@@ -158,10 +203,16 @@ namespace System.Web.Compilation
have_unget = false;
} else {
c = sr.Read ();
+#if NET_2_0
+ UpdateChecksum (c);
+#endif
}
if (c == '\r' && sr.Peek () == '\n') {
c = sr.Read ();
+#if NET_2_0
+ UpdateChecksum (c);
+#endif
position++;
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs b/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs
index 7e52be7..7c354e7 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs
@@ -39,6 +39,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
+using System.Security.Cryptography;
using System.Reflection;
using System.Text;
using System.Web.Configuration;
@@ -80,6 +81,114 @@ namespace System.Web.Compilation {
}
public class AssemblyBuilder {
+ interface ICodePragmaGenerator
+ {
+ int ReserveSpace (string filename);
+ void DecorateFile (string path, string filename, MD5 checksum, Encoding enc);
+ }
+
+ class CSharpCodePragmaGenerator : ICodePragmaGenerator
+ {
+ // Copied from CSharpCodeGenerator.cs
+ string QuoteSnippetString (string value)
+ {
+ // FIXME: this is weird, but works.
+ string output = value.Replace ("\\", "\\\\");
+ output = output.Replace ("\"", "\\\"");
+ output = output.Replace ("\t", "\\t");
+ output = output.Replace ("\r", "\\r");
+ output = output.Replace ("\n", "\\n");
+
+ return "\"" + output + "\"";
+ }
+
+ string ChecksumToHex (MD5 checksum)
+ {
+ var ret = new StringBuilder ();
+ foreach (byte b in checksum.Hash)
+ ret.Append (b.ToString ("X2"));
+
+ return ret.ToString ();
+ }
+
+ const int pragmaChecksumStaticCount = 23;
+ const int pragmaLineStaticCount = 8;
+ const int md5ChecksumCount = 32;
+
+ public int ReserveSpace (string filename)
+ {
+ return pragmaChecksumStaticCount +
+ pragmaLineStaticCount +
+ md5ChecksumCount +
+ (QuoteSnippetString (filename).Length * 2) +
+ (Environment.NewLine.Length * 3) +
+ BaseCompiler.HashMD5.ToString ("B").Length;
+ }
+
+ public void DecorateFile (string path, string filename, MD5 checksum, Encoding enc)
+ {
+ string newline = Environment.NewLine;
+ var sb = new StringBuilder ();
+
+ sb.AppendFormat ("#pragma checksum {0} \"{1}\" \"{2}\"{3}{3}",
+ QuoteSnippetString (filename),
+ BaseCompiler.HashMD5.ToString ("B"),
+ ChecksumToHex (checksum),
+ newline);
+ sb.AppendFormat ("#line 1 {0}{1}", QuoteSnippetString (filename), newline);
+
+ byte[] bytes = enc.GetBytes (sb.ToString ());
+ using (FileStream fs = new FileStream (path, FileMode.Open, FileAccess.Write)) {
+ fs.Seek (enc.GetPreamble ().Length, SeekOrigin.Begin);
+ fs.Write (bytes, 0, bytes.Length);
+ bytes = null;
+
+ sb.Length = 0;
+ sb.AppendFormat ("{0}#line default{0}#line hidden{0}", newline);
+ bytes = Encoding.UTF8.GetBytes (sb.ToString ());
+
+ fs.Seek (0, SeekOrigin.End);
+ fs.Write (bytes, 0, bytes.Length);
+ }
+
+ sb = null;
+ bytes = null;
+ }
+ }
+
+ class VBCodePragmaGenerator : ICodePragmaGenerator
+ {
+ const int pragmaExternalSourceCount = 21;
+ public int ReserveSpace (string filename)
+ {
+ return pragmaExternalSourceCount +
+ filename.Length +
+ (Environment.NewLine.Length);
+ }
+
+ public void DecorateFile (string path, string filename, MD5 checksum, Encoding enc)
+ {
+ string newline = Environment.NewLine;
+ var sb = new StringBuilder ();
+
+ sb.AppendFormat ("#ExternalSource(\"{0}\",1){1}", filename, newline);
+ byte[] bytes = enc.GetBytes (sb.ToString ());
+ using (FileStream fs = new FileStream (path, FileMode.Open, FileAccess.Write)) {
+ fs.Seek (enc.GetPreamble ().Length, SeekOrigin.Begin);
+ fs.Write (bytes, 0, bytes.Length);
+ bytes = null;
+
+ sb.Length = 0;
+ sb.AppendFormat ("{0}#End ExternalSource{0}", newline);
+ bytes = enc.GetBytes (sb.ToString ());
+ fs.Seek (0, SeekOrigin.End);
+ fs.Write (bytes, 0, bytes.Length);
+ }
+ sb = null;
+ bytes = null;
+ }
+ }
+
const string DEFAULT_ASSEMBLY_BASE_NAME = "App_Web_";
const int COPY_BUFFER_SIZE = 8192;
@@ -319,7 +428,11 @@ namespace System.Web.Compilation {
{
AddCodeFile (path, bp, false);
}
-
+
+ // The kludge of using ICodePragmaGenerator for C# and VB code files is bad, but
+ // it's better than allowing for potential DoS while reading a file with arbitrary
+ // size in memory for use with the CodeSnippetCompileUnit class.
+ // Files with extensions other than .cs and .vb use CodeSnippetCompileUnit.
internal void AddCodeFile (string path, BuildProvider bp, bool isVirtual)
{
if (String.IsNullOrEmpty (path))
@@ -334,6 +447,22 @@ namespace System.Web.Compilation {
string extension = Path.GetExtension (path);
if (extension == null || extension.Length == 0)
return; // maybe better to throw an exception here?
+ ICodePragmaGenerator pragmaGenerator;
+
+ switch (extension.ToLower ()) {
+ case "cs":
+ pragmaGenerator = new CSharpCodePragmaGenerator ();
+ break;
+
+ case "vb":
+ pragmaGenerator = new VBCodePragmaGenerator ();
+ break;
+
+ default:
+ pragmaGenerator = null;
+ break;
+ }
+
extension = extension.Substring (1);
string filename = GetTempFilePhysicalPath (extension);
@@ -341,26 +470,79 @@ namespace System.Web.Compilation {
VirtualFile vf = HostingEnvironment.VirtualPathProvider.GetFile (path);
if (vf == null)
throw new HttpException (404, "Virtual file '" + path + "' does not exist.");
-
- CopyFile (vf.Open (), filename);
+ if (vf is DefaultVirtualFile)
+ path = HostingEnvironment.MapPath (path);
+ CopyFileWithChecksum (vf.Open (), filename, path, pragmaGenerator);
} else
- CopyFile (path, filename);
-
- SourceFiles.Add (filename);
+ CopyFileWithChecksum (path, filename, path, pragmaGenerator);
+
+ if (pragmaGenerator != null)
+ SourceFiles.Add (filename);
}
- void CopyFile (string input, string filename)
+ void CopyFileWithChecksum (string input, string to, string from, ICodePragmaGenerator pragmaGenerator)
{
- CopyFile (new FileStream (input, FileMode.Open, FileAccess.Read), filename);
+ CopyFileWithChecksum (new FileStream (input, FileMode.Open, FileAccess.Read), to, from, pragmaGenerator);
}
- void CopyFile (Stream input, string filename)
+ void CopyFileWithChecksum (Stream input, string to, string from, ICodePragmaGenerator pragmaGenerator)
{
- using (StreamWriter sw = new StreamWriter (new FileStream (filename, FileMode.Create, FileAccess.Write), Encoding.UTF8)) {
+ if (pragmaGenerator == null) {
+ // This is BAD, BAD, BAD! CodeDOM API is really no good in this
+ // instance.
+ string filedata;
using (StreamReader sr = new StreamReader (input, WebEncoding.FileEncoding)) {
- sw.Write (sr.ReadToEnd ());
+ filedata = sr.ReadToEnd ();
+ }
+
+ var snippet = new CodeSnippetCompileUnit (filedata);
+ snippet.LinePragma = new CodeLinePragma (from, 1);
+ filedata = null;
+ AddCodeCompileUnit (snippet);
+ snippet = null;
+
+ return;
+ }
+
+ MD5 checksum = MD5.Create ();
+ using (FileStream fs = new FileStream (to, FileMode.Create, FileAccess.Write)) {
+ using (StreamWriter sw = new StreamWriter (fs, Encoding.UTF8)) {
+ using (StreamReader sr = new StreamReader (input, WebEncoding.FileEncoding)) {
+ int count = pragmaGenerator.ReserveSpace (from);
+ char[] src;
+
+ if (count > COPY_BUFFER_SIZE)
+ src = new char [count];
+ else
+ src = new char [COPY_BUFFER_SIZE];
+
+ sw.Write (src, 0, count);
+ do {
+ count = sr.Read (src, 0, COPY_BUFFER_SIZE);
+ if (count == 0) {
+ UpdateChecksum (src, 0, checksum, true);
+ break;
+ }
+
+ sw.Write (src, 0, count);
+ UpdateChecksum (src, count, checksum, false);
+ } while (true);
+ src = null;
+ }
}
}
+ pragmaGenerator.DecorateFile (to, from, checksum, Encoding.UTF8);
+ }
+
+ void UpdateChecksum (char[] buf, int count, MD5 checksum, bool final)
+ {
+ byte[] input = Encoding.UTF8.GetBytes (buf, 0, count);
+
+ if (final)
+ checksum.TransformFinalBlock (input, 0, input.Length);
+ else
+ checksum.TransformBlock (input, 0, input.Length, input, 0);
+ input = null;
}
public Stream CreateEmbeddedResource (BuildProvider buildProvider, string name)
diff --git a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
index bab9166..143b8be 100644
--- a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
@@ -46,7 +46,7 @@ namespace System.Web.Compilation
const string DEFAULT_NAMESPACE = "ASP";
#if NET_2_0
- static Guid HashMD5 = new Guid(0x406ea660, 0x64cf, 0x4c82, 0xb6, 0xf0, 0x42, 0xd4, 0x81, 0x72, 0xa7, 0x99);
+ internal static Guid HashMD5 = new Guid(0x406ea660, 0x64cf, 0x4c82, 0xb6, 0xf0, 0x42, 0xd4, 0x81, 0x72, 0xa7, 0x99);
static BindingFlags replaceableFlags = BindingFlags.Public | BindingFlags.NonPublic |
BindingFlags.Instance;
#endif
@@ -836,6 +836,20 @@ namespace System.Web.Compilation
get { return unit; }
}
+#if NET_2_0
+ internal CodeTypeDeclaration DerivedType {
+ get { return mainClass; }
+ }
+
+ internal CodeTypeDeclaration BaseType {
+ get {
+ if (partialClass == null)
+ return DerivedType;
+ return partialClass;
+ }
+ }
+#endif
+
internal TemplateParser Parser {
get { return parser; }
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs b/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
index 9950724..0cdbb47 100644
--- a/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
@@ -377,7 +377,7 @@ namespace System.Web.Compilation {
bool addAssembliesInBin = false;
foreach (AssemblyInfo info in compConfig.Assemblies) {
if (info.Assembly == "*")
- addAssembliesInBin = true;
+ addAssembliesInBin = is_precompiled ? false : true;
else
LoadAssembly (info, al);
}
@@ -387,8 +387,11 @@ namespace System.Web.Compilation {
foreach (string assLocation in WebConfigurationManager.ExtraAssemblies)
LoadAssembly (assLocation, al);
-
- if (addAssembliesInBin)
+
+
+ // Precompiled sites unconditionally load all assemblies from bin/ (fix for
+ // bug #502016)
+ if (is_precompiled || addAssembliesInBin) {
foreach (string s in HttpApplication.BinDirectoryAssemblies) {
try {
LoadAssembly (s, al);
@@ -396,7 +399,8 @@ namespace System.Web.Compilation {
// ignore silently
}
}
-
+ }
+
lock (buildCacheLock) {
foreach (Assembly asm in referencedAssemblies)
if (!al.Contains (asm))
@@ -419,12 +423,49 @@ namespace System.Web.Compilation {
AddAssembly (Assembly.Load (info.Assembly), al);
}
+ // Deal with precompiled sites deployed in a different virtual path
+ static void FixVirtualPaths ()
+ {
+ string [] parts;
+ int skip = -1;
+ foreach (string vpath in precompiled.Keys) {
+ parts = vpath.Split ('/');
+ for (int i = 0; i < parts.Length; i++) {
+ string test_path = String.Join ("/", parts, i, parts.Length - i);
+ VirtualPath result = GetAbsoluteVirtualPath (test_path);
+ if (result != null && File.Exists (result.PhysicalPath)) {
+ skip = i;
+ break;
+ }
+ }
+ }
+ string app_vpath = HttpRuntime.AppDomainAppVirtualPath;
+ if (skip == -1 || (skip == 0 && app_vpath == "/"))
+ return;
+
+ if (!app_vpath.EndsWith ("/"))
+ app_vpath = app_vpath + "/";
+ Dictionary<string, PreCompilationData> copy = new Dictionary<string, PreCompilationData> (precompiled);
+ precompiled.Clear ();
+ foreach (KeyValuePair<string,PreCompilationData> entry in copy) {
+ parts = entry.Key.Split ('/');
+ string new_path;
+ if (String.IsNullOrEmpty (parts [0]))
+ new_path = app_vpath + String.Join ("/", parts, skip + 1, parts.Length - skip - 1);
+ else
+ new_path = app_vpath + String.Join ("/", parts, skip, parts.Length - skip);
+ entry.Value.VirtualPath = new_path;
+ precompiled.Add (new_path, entry.Value);
+ }
+ }
+
static void LoadPrecompilationInfo ()
{
string [] compiled = Directory.GetFiles (HttpRuntime.BinDirectory, "*.compiled");
foreach (string str in compiled) {
LoadCompiled (str);
}
+ FixVirtualPaths ();
}
static void LoadCompiled (string filename)
@@ -551,7 +592,7 @@ namespace System.Web.Compilation {
static Type GetPrecompiledType (string virtualPath)
{
PreCompilationData pc_data;
- if (precompiled.TryGetValue (virtualPath, out pc_data)) {
+ if (precompiled != null && precompiled.TryGetValue (virtualPath, out pc_data)) {
if (pc_data.Type == null) {
pc_data.Type = Type.GetType (pc_data.TypeName + ", " + pc_data.AssemblyFileName, true);
}
@@ -566,9 +607,9 @@ namespace System.Web.Compilation {
if (!is_precompiled)
return null;
- Type apptype = GetPrecompiledType (HttpRuntime.AppDomainAppVirtualPath + "/Global.asax");
+ Type apptype = GetPrecompiledType (VirtualPathUtility.Combine (HttpRuntime.AppDomainAppVirtualPath, "Global.asax"));
if (apptype == null)
- apptype = GetPrecompiledType (HttpRuntime.AppDomainAppVirtualPath + "/global.asax");
+ apptype = GetPrecompiledType (VirtualPathUtility.Combine (HttpRuntime.AppDomainAppVirtualPath, "global.asax"));
return apptype;
}
@@ -635,7 +676,7 @@ namespace System.Web.Compilation {
string extension = virtualPath.Extension;
var ret = new List <VirtualFile> ();
- if (virtualPath.StartsWith (FAKE_VIRTUAL_PATH_PREFIX)) {
+ if (virtualPath.IsFake) {
kind = BuildKind.Fake;
return ret;
}
@@ -1086,8 +1127,8 @@ namespace System.Web.Compilation {
string realpath;
bool dothrow = false;
- if (virtualPath.StartsWith (FAKE_VIRTUAL_PATH_PREFIX)) {
- realpath = virtualPath.Original.Substring (FAKE_VIRTUAL_PATH_PREFIX.Length);
+ if (virtualPath.IsFake) {
+ realpath = virtualPath.PhysicalPath;
if (!File.Exists (realpath) && !Directory.Exists (realpath))
dothrow = true;
} else {
@@ -1099,7 +1140,7 @@ namespace System.Web.Compilation {
}
if (dothrow)
- throw new HttpException (404, "The file '" + virtualPath + "' does not exist.");
+ throw new HttpException (404, "The file '" + virtualPath + "' does not exist.", virtualPath.Absolute);
}
const int ticketLockTimeout = 20000;
@@ -1143,11 +1184,12 @@ namespace System.Web.Compilation {
return;
Dictionary <Type, List <AssemblyBuilder>> assemblyBuilders = new Dictionary <Type, List <AssemblyBuilder>> ();
- bool checkForRecursion = buildKind == BuildKind.NonPages;
+ bool checkForRecursion = buildKind == BuildKind.NonPages || buildKind == BuildKind.Pages;
string buildItemVp;
BuildItem requestBuildItem = null;
AssemblyBuilder originalRequestAssemblyBuilder = null;
bool isRequestAssemblyBuilder = false;
+ var skippedItemsAssemblies = new List <Assembly> ();
foreach (BuildItem buildItem in buildItems) {
buildItemVp = buildItem.VirtualPath;
@@ -1165,8 +1207,14 @@ namespace System.Web.Compilation {
// our list might've been put into a different
// assembly in a recursive call.
lock (buildCacheLock) {
- if (buildCache.ContainsKey (buildItem.VirtualPath))
+ BuildCacheItem bci;
+
+ if (buildCache.TryGetValue (buildItem.VirtualPath, out bci)) {
+ Assembly asm = bci.assembly;
+ if (asm != null && !skippedItemsAssemblies.Contains (asm))
+ skippedItemsAssemblies.Add (asm);
continue;
+ }
}
}
@@ -1190,6 +1238,8 @@ namespace System.Web.Compilation {
bool needToBuildRequestItemAlone = false;
foreach (List <AssemblyBuilder> abuilders in assemblyBuilders.Values) {
foreach (AssemblyBuilder abuilder in abuilders) {
+ abuilder.AddAssemblyReference (skippedItemsAssemblies);
+
try {
GenerateAssembly (abuilder, buildItems, virtualPath, buildKind);
} catch (Exception ex) {
@@ -1259,11 +1309,11 @@ namespace System.Web.Compilation {
globalAsaxAssembly = compiledAssembly;
break;
}
-
+
foreach (BuildItem buildItem in buildItems) {
if (!buildItem.ProcessedFine || buildItem.assemblyBuilder != abuilder)
continue;
-
+
vp = buildItem.VirtualPath;
bp = buildItem.buildProvider;
buildItem.SetCompiledAssembly (abuilder, compiledAssembly);
diff --git a/mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs b/mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs
index 28ddc56..fecf934 100644
--- a/mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs
@@ -49,6 +49,7 @@ namespace System.Web.Compilation {
ArrayList ref_assemblies;
ICollection vpath_deps;
+ VirtualPath vpath;
protected BuildProvider()
{
@@ -57,7 +58,7 @@ namespace System.Web.Compilation {
internal void SetVirtualPath (VirtualPath virtualPath)
{
- virtual_path = virtualPath.Absolute;
+ vpath = virtualPath;
}
internal virtual void GenerateCode ()
@@ -126,9 +127,13 @@ namespace System.Web.Compilation {
}
protected internal string VirtualPath {
- get { return virtual_path; }
+ get { return vpath != null ? vpath.Absolute : null; }
}
+ internal VirtualPath VirtualPathInternal {
+ get { return vpath; }
+ }
+
public virtual ICollection VirtualPathDependencies {
get {
if (vpath_deps == null)
diff --git a/mcs/class/System.Web/System.Web.Compilation/ChangeLog b/mcs/class/System.Web/System.Web.Compilation/ChangeLog
index fe7975a..d49b97c 100644
--- a/mcs/class/System.Web/System.Web.Compilation/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Compilation/ChangeLog
@@ -1,3 +1,279 @@
+2009-07-23 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * BuildManager.cs: precompilation setup failed if the precompiled
+ virtual directory was / and it was deployed somewhere else.
+
+2009-07-13 Marek Habersack <mhabersack at novell.com>
+
+ * AppCodeCompiler.cs: wrap HttpApplication.LoadTypeFromBin call in
+ try/catch, so that we can wrap the possible exception in
+ HttpException.
+
+2009-07-21 Marek Habersack <mhabersack at novell.com>
+
+ * AspTokenizer.cs: in put_back, store inTag value as well.
+
+ * AspParser.cs: correctly parse code like "<asp:tag> < </asp:tag>"
+
+ * BuildManager.cs: GetReferencedAssemblies unconditionally
+ includes all assemblies from bin/ for precompiled sites. Fixes bug
+ #502016
+
+2009-06-25 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * BuildManager.cs: backport r131138.
+
+2009-06-15 Marek Habersack <mhabersack at novell.com>
+
+ * AspGenerator.cs: CreateRootBuilder quits when root builder
+ already exist. This can happen when recursively parsing an include
+ file. Fixes bug #512028
+
+2009-06-11 Marek Habersack <mhabersack at novell.com>
+
+ * PageCompiler.cs: if generating code to assign output cache
+ parameters, use special case for generating OutputCacheLocation
+ enum reference. Fixes bug #512037
+
+2009-06-04 Marek Habersack <mhabersack at novell.com>
+
+ * AspGenerator.cs: if plain text is parsed and it contains
+ server-side controls, parse and process them. Fixes bug #508888
+
+2009-06-02 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * BuildManager.cs: allow deployment of precompiled applications under
+ any virtual path, not just the default one used when precompiling.
+ Fixes bug #483268.
+
+2009-06-01 Marek Habersack <mhabersack at novell.com>
+
+ * BuildManager.cs: when throwing a 404 exception, pass the virtual
+ path to the exception constructor.
+
+ * AspGenerator.cs: fix mapping of our tag types into
+ CodeConstructType. Fixes bug #508570
+
+2009-05-26 Marek Habersack <mhabersack at novell.com>
+
+ * AspGenerator.cs: before including a file specified with the
+ <!--#include file="" --> directive, check if it's within the
+ current application's root.
+
+2009-05-18 Marek Habersack <mhabersack at novell.com>
+
+ * BuildManager.cs: GetPrecompiledApplicationType () uses
+ VirtualPathUtility.Combine to build global.asax virtual
+ path. Patch from Robert Jordan <robertj at gmx.net>, thanks! Fixes
+ bug #504615
+
+2009-05-10 Marek Habersack <mhabersack at novell.com>
+
+ * AspGenerator.cs: keep processing the tag if it is not a server
+ one and contains expressions and no code render blocks.
+
+2009-05-05 Marek Habersack <mhabersack at novell.com>
+
+ * AspGenerator.cs: create a Location and pass it to the parser
+ before calling AddDirective from GetInheritedType, so that we get
+ meaningful exception messages with source, line information etc.
+
+2009-05-04 Marek Habersack <mhabersack at novell.com>
+
+ * ThemeDirectoryBuildProvider.cs: use new AspGenerator constructor
+ which takes AspComponentFoundery as its
+ parameter. AspGenerator.RootBuilder isn't initialized until after
+ the parser is initialized.
+
+ * TemplateControlCompiler.cs: make sure to call
+ ProcessGeneratedCode on each instance of ControlBuilder after it's
+ fully generated. Fixes bug #500075
+
+ * BaseCompiler.cs: added two internal properties, BaseType and
+ DerivedType, which are used in calls to
+ ControlBuilder.ProcessGeneratedCode. Fixes bug #500075
+
+ * AspGenerator.cs: implemented a work around for our parser
+ limitation which is unable to extract the page/control's base type
+ before parsing the actual file contents. This is necessary to
+ support ASP.NET MVC's "generic" Inherits attribute. The reason we
+ need to find out what the base type is before parsing the file is
+ that we need to look at the type's custom attributes to see if a
+ root control builder type is specified (which is what ASP.NET MVC
+ does) and, if yes, use it instead of the default type. Fixes bug
+ #500075
+
+2009-04-28 Marek Habersack <mhabersack at novell.com>
+
+ * AspGenerator.cs: ProcessTag doesn't process a tag which is not
+ server-side and which has declarative expressions embedded. Fixes
+ bug #498637
+
+2009-04-24 Marek Habersack <mhabersack at novell.com>
+
+ * AspGenerator.cs: ProcessCode should _not_ stop processing the
+ passed code string if the filter's ProcessCodeConstruct returns
+ false. Fixes bug #497775
+
+2009-04-21 Marek Habersack <mhabersack at novell.com>
+
+ * PageCompiler.cs: implemented new way of setting output cache
+ parameters in the 2.0 profile. The generated code is now the same
+ as on .NET and uses the OutputCacheParameters class to pass
+ settings to InitOutputCache.
+
+2009-04-17 Marek Habersack <mhabersack at novell.com>
+
+ * AspGenerator.cs: if thead/tbody are parsed as children of a
+ server-side table control, ignore them. Fixes bug #481622
+
+2009-04-16 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateControlCompiler.cs: using a regexp to check whether an
+ expression is a Bind one. Fixes bug #493639
+ AssignPropertyFromResources now checks whether the field/property
+ passed to it is decorated with the Localizable custom attribute
+ and whether the resource provider contains an entry for that
+ property.
+
+2009-04-15 Marek Habersack <mhabersack at novell.com>
+
+ * BuildManager.cs: do not add all assemblies in bin/ when serving
+ a precompiled site. Fixes bug #493873
+ When serving a precompiled site, check if the bin/ directory
+ contains certain well-known assemblies and load them if present.
+
+2009-04-10 Marek Habersack <mhabersack at novell.com>
+
+ * BuildManager.cs: enabled recursion checking for page
+ targets. Also, if a built item is skipped because it has been
+ compiled recursively, add its assembly to the list of referenced
+ assemblies for the batch being currently compiled.
+
+2009-04-07 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateControlCompiler.cs: GenerateExpressionFromString doesn't
+ assume that the passed member is a property anymore. Fixes bug
+ #492252
+
+2009-04-03 Marek Habersack <mhabersack at novell.com>
+
+ * AspParser.cs: local copy of checksum generated by the tokenizer
+ is made right after parsing is done.
+
+ * AspGenerator.cs: set tparser.MD5Checksum in Parse instead of in
+ InitParser. Avoids empty checksums in #pragma checksum.
+
+2009-04-01 Marek Habersack <mhabersack at novell.com>
+
+ * AssemblyBuilder.cs: CSharpCodePragmaGenerator.ReserveSpace:
+ added the 2 extra chars to pragmaChecksumStaticCount constant (the
+ ones added by Gonzalo below) and removed one NewLine to account
+ for Martin's change below.
+ VBCodePragmaGenerator.ReserveSpace - one newline follows
+ #ExternalSource.
+ VBCodePragmaGenerator.DecorateFile - one newline follows
+ #ExternalSource.
+
+2009-04-01 Martin Baulig <martin at ximian.com>
+
+ * AssemblyBuilder.cs: Don't emit a blank line after the #line as
+ thid'd cause all line numbers to be off by 1.
+
+2009-03-31 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * AssemblyBuilder.cs: the guid has to be quoted.
+
+2009-03-31 Marek Habersack <mhabersack at novell.com>
+
+ * All of the below are part of the fix for bug #489687
+
+ * ThemeDirectoryCompiler.cs: pass VirtualPath instances to parser
+ constructors.
+
+ * BuildProvider.cs: associated virtual path is stored internally
+ as an instance of VirtualPath, accessible via new
+ VirtualPathInternal property.
+
+ * BuildManagerDirectoryBuilder.cs: VirtualPath.IsFake is used to
+ detect fake virtual paths.
+ GetBuildProvider now takes a VirtualPath instead of string for the
+ virtualPath parameter. The passed VirtualPath instance is passed
+ unchanged to BuildProvider.
+
+ * BuildManager.cs: AssertVirtualPathExists now uses
+ VirtualPath.IsFake to check for fake virtual paths.
+
+ * ApplicationFileBuildProvider.cs, GenericBuildProvider.cs,
+ MasterPageBuildProvider.cs, PageBuildProvider.cs,
+ ThemeBuildProvider.cs, UserControlBuildProvider.cs,
+ WebHandlerBuildProvider.cs, WebServiceBuildProvider.cs:
+ CreateParser overloads now take a VirtualPath instead of a string
+ for the virtualPath parameter.
+
+ * ThemeBuildProvider.cs: use new parser constructors which take
+ VirtualPath instances instead of strings.
+
+2009-03-30 Marek Habersack <mhabersack at novell.com>
+
+ * AspTokenizer.cs: UpdateChecksum - fixed off-by-one bug when
+ processing the checksum buffer.
+
+ * AssemblyBuilder.cs: introduced a kludge to add #pragma checksum
+ and #pragma lines (or its vb equivalent - #ExternalSource) to
+ code-behind files named in the CodeFile/Src directives while
+ copying them to the dynamic directory for compilation. The kludge
+ works by recognizing the .cs and .vb extensions and wrapping the
+ file contents in the appropriate directives. This is done in this
+ way because the other possible way, using the
+ CodeSnippetCompileUnit, requires the entire file to be read in
+ memory and then passed to CodeDOM. We fall back to this way when
+ the file being copied is neither C# or VB.
+
+2009-03-25 Marek Habersack <mhabersack at novell.com>
+
+ * AspTokenizer.cs: MD5 checksum calculation happens here. It's
+ done incrementally as characters are read.
+
+ * AspParser.cs: the MD5 checksum is no longer computed here. Moved
+ to AspTokenizer.
+ After parsing, both the tokenizer and the string reader are
+ disposed of.
+
+ * AssemblyBuilder.cs: renamed CopyFile to CopyFileWithChecksum, in
+ prepration for future inclusion of checksum and line pragmas in
+ the file being copied.
+ Files are copied chunk by chunk, not by reading the entire
+ contents.
+
+2009-03-23 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateBuildProvider.cs: add values of the CodeFile and Src
+ page/master/control directives to the list of file dependencies.
+ Extract language also for master/page, not only for controls.
+
+2009-03-16 Marek Habersack <mhabersack at novell.com>
+
+ * AspGenerator.cs: when parsing nested tags (includes tags inside
+ client-side javascript script blocks) pass the closing tag up to
+ the containing parser.
+ Instead of parsing the whole plain text contents, plus the two
+ constructs we're interested in from it using regexs. This is
+ necessary as we might be passed JavaScript code and without
+ understanding its syntax we'll confuse the '<' character for the
+ start of a tag.
+ TagParsed now better handles <script> tags. For both server and
+ client tags ProcessScript is called and the input text, in case of
+ client tags, is read verbatim to be processed when ProcessScript
+ is called to close the tag. At this point the verbatim text is
+ checked whether it contains server-side tags and/or expressions.
+
+2009-03-16 Marek Habersack <mhabersack at novell.com>
+
+ * AspGenerator.cs: when parsing nested tags (includes tags inside
+ client-side javascript script blocks) pass the closing tag up to
+ the containing parser.
+
2009-02-28 Gonzalo Paniagua Javier <gonzalo at novell.com>
* AppResourcesAssemblyBuilder.cs:
diff --git a/mcs/class/System.Web/System.Web.Compilation/GenericBuildProvider.cs b/mcs/class/System.Web/System.Web.Compilation/GenericBuildProvider.cs
index 139d6f8..51fdc00 100644
--- a/mcs/class/System.Web/System.Web.Compilation/GenericBuildProvider.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/GenericBuildProvider.cs
@@ -49,8 +49,8 @@ namespace System.Web.Compilation
bool _parsed;
bool _codeGenerated;
- protected abstract TParser CreateParser (string virtualPath, string physicalPath, TextReader reader, HttpContext context);
- protected abstract TParser CreateParser (string virtualPath, string physicalPath, HttpContext context);
+ protected abstract TParser CreateParser (VirtualPath virtualPath, string physicalPath, TextReader reader, HttpContext context);
+ protected abstract TParser CreateParser (VirtualPath virtualPath, string physicalPath, HttpContext context);
protected abstract BaseCompiler CreateCompiler (TParser parser);
protected abstract string GetParserLanguage (TParser parser);
protected abstract ICollection GetParserDependencies (TParser parser);
@@ -153,10 +153,10 @@ namespace System.Web.Compilation
// This is intended to be used by builders which may need to do special processing
// on the virtualPath before actually opening the reader.
- protected virtual TextReader SpecialOpenReader (string virtualPath, out string physicalPath)
+ protected virtual TextReader SpecialOpenReader (VirtualPath virtualPath, out string physicalPath)
{
physicalPath = null;
- return OpenReader (virtualPath);
+ return OpenReader (virtualPath.Original);
}
// FIXME: figure this out.
@@ -181,8 +181,8 @@ namespace System.Web.Compilation
public TParser Parser {
get {
if (_parser == null) {
- string vp = VirtualPath;
- if (String.IsNullOrEmpty (vp))
+ VirtualPath vp = VirtualPathInternal;
+ if (vp == null)
throw new HttpException ("VirtualPath not set, cannot instantiate parser.");
if (!IsDirectoryBuilder) {
diff --git a/mcs/class/System.Web/System.Web.Compilation/MasterPageBuildProvider.cs b/mcs/class/System.Web/System.Web.Compilation/MasterPageBuildProvider.cs
index a52cd46..41d22f2 100644
--- a/mcs/class/System.Web/System.Web.Compilation/MasterPageBuildProvider.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/MasterPageBuildProvider.cs
@@ -52,12 +52,12 @@ namespace System.Web.Compilation {
return new MasterPageCompiler (parser as MasterPageParser);
}
- protected override TemplateParser CreateParser (string virtualPath, string physicalPath, HttpContext context)
+ protected override TemplateParser CreateParser (VirtualPath virtualPath, string physicalPath, HttpContext context)
{
- return CreateParser (virtualPath, physicalPath, OpenReader (virtualPath), context);
+ return CreateParser (virtualPath, physicalPath, OpenReader (virtualPath.Original), context);
}
- protected override TemplateParser CreateParser (string virtualPath, string physicalPath, TextReader reader, HttpContext context)
+ protected override TemplateParser CreateParser (VirtualPath virtualPath, string physicalPath, TextReader reader, HttpContext context)
{
return new MasterPageParser (virtualPath, physicalPath, reader, context);
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/PageBuildProvider.cs b/mcs/class/System.Web/System.Web.Compilation/PageBuildProvider.cs
index 3bbeb1d..51df8a2 100644
--- a/mcs/class/System.Web/System.Web.Compilation/PageBuildProvider.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/PageBuildProvider.cs
@@ -57,11 +57,11 @@ namespace System.Web.Compilation {
return base.MapPath (virtualPath);
}
- protected override TextReader SpecialOpenReader (string virtualPath, out string physicalPath)
+ protected override TextReader SpecialOpenReader (VirtualPath virtualPath, out string physicalPath)
{
// We need this hack to support out-of-application wsdl helpers
- if (StrUtils.StartsWith (virtualPath, BuildManager.FAKE_VIRTUAL_PATH_PREFIX)) {
- physicalPath = virtualPath.Substring (BuildManager.FAKE_VIRTUAL_PATH_PREFIX.Length);
+ if (virtualPath.IsFake) {
+ physicalPath = virtualPath.PhysicalPath;
return new StreamReader (physicalPath);
} else
physicalPath = null;
@@ -74,12 +74,12 @@ namespace System.Web.Compilation {
return new PageCompiler (parser as PageParser);
}
- protected override TemplateParser CreateParser (string virtualPath, string physicalPath, HttpContext context)
+ protected override TemplateParser CreateParser (VirtualPath virtualPath, string physicalPath, HttpContext context)
{
- return CreateParser (virtualPath, physicalPath, OpenReader (virtualPath), context);
+ return CreateParser (virtualPath, physicalPath, OpenReader (virtualPath.Original), context);
}
- protected override TemplateParser CreateParser (string virtualPath, string physicalPath, TextReader reader, HttpContext context)
+ protected override TemplateParser CreateParser (VirtualPath virtualPath, string physicalPath, TextReader reader, HttpContext context)
{
return new PageParser (virtualPath, physicalPath, reader, context);
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs
index eb54503..2a4642e 100644
--- a/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs
@@ -38,6 +38,7 @@ using System.Web.UI;
using System.Web.SessionState;
using System.Web.Util;
#if NET_2_0
+using System.Collections.Generic;
using System.Web.Profile;
#endif
@@ -68,11 +69,26 @@ namespace System.Web.Compilation
fld.Attributes = MemberAttributes.Private | MemberAttributes.Static;
fld.InitExpression = new CodePrimitiveExpression (null);
mainClass.Members.Add (fld);
+
+#if NET_2_0
+ if (pageParser.OutputCache) {
+ fld = new CodeMemberField (typeof (OutputCacheParameters), "__outputCacheSettings");
+ fld.Attributes = MemberAttributes.Private | MemberAttributes.Static;
+ fld.InitExpression = new CodePrimitiveExpression (null);
+ mainClass.Members.Add (fld);
+ }
+#endif
}
protected override void CreateConstructor (CodeStatementCollection localVars,
CodeStatementCollection trueStmt)
{
+#if NET_2_0
+ if (!String.IsNullOrEmpty (pageParser.MasterPageFile))
+ // This is here just to trigger master page build, so that its type
+ // is available when compiling the page itself.
+ BuildManager.GetCompiledType (pageParser.MasterPageFile);
+#endif
if (pageParser.ClientTarget != null) {
CodeExpression prop;
prop = new CodePropertyReferenceExpression (thisRef, "ClientTarget");
@@ -217,13 +233,16 @@ namespace System.Web.Compilation
if (contentType != null)
method.Statements.Add (CreatePropertyAssign ("ContentType", contentType));
+#if !NET_2_0
if (pageParser.OutputCache) {
CodeMethodReferenceExpression init = new CodeMethodReferenceExpression (null,
"InitOutputCache");
CodeMethodInvokeExpression invoke = new CodeMethodInvokeExpression (init,
OutputCacheParams ());
method.Statements.Add (invoke);
+
}
+#endif
int lcid = pageParser.LCID;
if (lcid != -1)
@@ -283,6 +302,15 @@ namespace System.Web.Compilation
}
#endif
}
+
+#if NET_2_0
+ protected override void AddStatementsToConstructor (CodeConstructor ctor)
+ {
+ base.AddStatementsToConstructor (ctor);
+ if (pageParser.OutputCache)
+ OutputCacheParamsBlock (ctor);
+ }
+#endif
protected override void AddStatementsToInitMethod (CodeMemberMethod method)
{
@@ -349,7 +377,15 @@ namespace System.Web.Compilation
#endif
);
- }
+ }
+
+#if NET_2_0
+ if (pageParser.OutputCache) {
+ CodeMethodReferenceExpression init = new CodeMethodReferenceExpression (thisRef, "InitOutputCache");
+ CodeMethodInvokeExpression invoke = new CodeMethodInvokeExpression (init, GetMainClassFieldReferenceExpression ("__outputCacheSettings"));
+ method.Statements.Add (invoke);
+ }
+#endif
#if ONLY_1_1
AddStatementsFromDirective (method);
@@ -366,13 +402,76 @@ namespace System.Web.Compilation
#endif
}
+#if NET_2_0
+ CodeAssignStatement AssignOutputCacheParameter (CodeVariableReferenceExpression variable, string propName, object value)
+ {
+ var ret = new CodeAssignStatement ();
+
+ ret.Left = new CodeFieldReferenceExpression (variable, propName);
+
+ if (value is OutputCacheLocation)
+ ret.Right = new CodeFieldReferenceExpression (
+ new CodeTypeReferenceExpression (new CodeTypeReference (typeof (OutputCacheLocation), CodeTypeReferenceOptions.GlobalReference)),
+ value.ToString ()
+ );
+ else
+ ret.Right = new CodePrimitiveExpression (value);
+ return ret;
+ }
+
+ void OutputCacheParamsBlock (CodeMemberMethod method)
+ {
+ var statements = new List <CodeStatement> ();
+ var localSettingsDecl = new CodeVariableDeclarationStatement (typeof (OutputCacheParameters), "outputCacheSettings");
+ var localSettings = new CodeVariableReferenceExpression ("outputCacheSettings");
+
+ statements.Add (localSettingsDecl);
+ statements.Add (
+ new CodeAssignStatement (
+ localSettings,
+ new CodeObjectCreateExpression (typeof (OutputCacheParameters), new CodeExpression[] {})
+ )
+ );
+
+ TemplateParser.OutputCacheParsedParams parsed = pageParser.OutputCacheParsedParameters;
+ if ((parsed & TemplateParser.OutputCacheParsedParams.CacheProfile) != 0)
+ statements.Add (AssignOutputCacheParameter (localSettings, "CacheProfile", pageParser.OutputCacheCacheProfile));
+ statements.Add (AssignOutputCacheParameter (localSettings, "Duration", pageParser.OutputCacheDuration));
+ if ((parsed & TemplateParser.OutputCacheParsedParams.Location) != 0)
+ statements.Add (AssignOutputCacheParameter (localSettings, "Location", pageParser.OutputCacheLocation));
+ if ((parsed & TemplateParser.OutputCacheParsedParams.NoStore) != 0)
+ statements.Add (AssignOutputCacheParameter (localSettings, "NoStore", pageParser.OutputCacheNoStore));
+ if ((parsed & TemplateParser.OutputCacheParsedParams.SqlDependency) != 0)
+ statements.Add (AssignOutputCacheParameter (localSettings, "SqlDependency", pageParser.OutputCacheSqlDependency));
+ if ((parsed & TemplateParser.OutputCacheParsedParams.VaryByContentEncodings) != 0)
+ statements.Add (AssignOutputCacheParameter (localSettings, "VaryByContentEncoding", pageParser.OutputCacheVaryByContentEncodings));
+ if ((parsed & TemplateParser.OutputCacheParsedParams.VaryByControl) != 0)
+ statements.Add (AssignOutputCacheParameter (localSettings, "VaryByControl", pageParser.OutputCacheVaryByControls));
+ if ((parsed & TemplateParser.OutputCacheParsedParams.VaryByCustom) != 0)
+ statements.Add (AssignOutputCacheParameter (localSettings, "VaryByCustom", pageParser.OutputCacheVaryByCustom));
+ if ((parsed & TemplateParser.OutputCacheParsedParams.VaryByHeader) != 0)
+ statements.Add (AssignOutputCacheParameter (localSettings, "VaryByHeader", pageParser.OutputCacheVaryByHeader));
+ statements.Add (AssignOutputCacheParameter (localSettings, "VaryByParam", pageParser.OutputCacheVaryByParam));
+
+ CodeFieldReferenceExpression outputCacheSettings = GetMainClassFieldReferenceExpression ("__outputCacheSettings");
+ statements.Add (new CodeAssignStatement (outputCacheSettings, localSettings));
+
+ var cond = new CodeConditionStatement (
+ new CodeBinaryOperatorExpression (
+ outputCacheSettings,
+ CodeBinaryOperatorType.IdentityEquality,
+ new CodePrimitiveExpression (null)
+ ),
+ statements.ToArray ()
+ );
+
+ method.Statements.Add (cond);
+ }
+#else
CodeExpression[] OutputCacheParams ()
{
return new CodeExpression [] {
new CodePrimitiveExpression (pageParser.OutputCacheDuration),
-#if NET_2_0
- new CodePrimitiveExpression (pageParser.OutputCacheVaryByContentEncodings),
-#endif
new CodePrimitiveExpression (pageParser.OutputCacheVaryByHeader),
new CodePrimitiveExpression (pageParser.OutputCacheVaryByCustom),
new CodeSnippetExpression (typeof (OutputCacheLocation).ToString () +
@@ -380,7 +479,8 @@ namespace System.Web.Compilation
new CodePrimitiveExpression (pageParser.OutputCacheVaryByParam)
};
}
-
+#endif
+
#if NET_2_0
void CreateStronglyTypedProperty (Type type, string name)
{
diff --git a/mcs/class/System.Web/System.Web.Compilation/TagAttributes.cs b/mcs/class/System.Web/System.Web.Compilation/TagAttributes.cs
index 78f3883..093e23e 100644
--- a/mcs/class/System.Web/System.Web.Compilation/TagAttributes.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/TagAttributes.cs
@@ -196,6 +196,9 @@ namespace System.Web.Compilation
result.Length--;
result.Append ('}');
+ if (IsRunAtServer ())
+ result.Append (" @Server");
+
return result.ToString ();
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
index a91e099..ee928f8 100644
--- a/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
@@ -47,6 +47,7 @@ using System.Configuration;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Web.Configuration;
+using System.Resources;
#endif
namespace System.Web.Compilation
@@ -67,6 +68,7 @@ namespace System.Web.Compilation
#if NET_2_0
List <string> masterPageContentPlaceHolders;
+ static Regex startsWithBindRegex = new Regex (@"^Bind\s*\(", RegexOptions.Compiled | RegexOptions.IgnoreCase);
// When modifying those, make sure to look at the SanitizeBindCall to make sure it
// picks up correct groups.
static Regex bindRegex = new Regex (@"Bind\s*\(\s*[""']+(.*?)[""']+((\s*,\s*[""']+(.*?)[""']+)?)\s*\)\s*%>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
@@ -522,7 +524,7 @@ namespace System.Web.Compilation
#if NET_2_0
bool need_if = false;
- if (StrUtils.StartsWith (value, "Bind", true)) {
+ if (startsWithBindRegex.Match (value).Success) {
valueExpression = CreateEvalInvokeExpression (bindRegexInValue, value, true);
if (valueExpression != null)
need_if = true;
@@ -535,7 +537,6 @@ namespace System.Web.Compilation
valueExpression = new CodeSnippetExpression (value);
method = CreateDBMethod (builder, dbMethodName, GetContainerType (builder), builder.ControlType);
-
CodeVariableReferenceExpression targetExpr = new CodeVariableReferenceExpression ("target");
// This should be a CodePropertyReferenceExpression for properties... but it works anyway
@@ -851,6 +852,32 @@ namespace System.Web.Compilation
return ret;
}
+
+ bool ResourceProviderHasObject (string key)
+ {
+ IResourceProvider rp = HttpContext.GetResourceProvider (key, true);
+ if (rp == null)
+ return false;
+
+ IResourceReader rr = rp.ResourceReader;
+ if (rr == null)
+ return false;
+
+ IDictionaryEnumerator ide = rr.GetEnumerator ();
+ if (ide == null)
+ return false;
+
+ string dictKey;
+ while (ide.MoveNext ()) {
+ dictKey = ide.Key as string;
+ if (String.IsNullOrEmpty (dictKey))
+ continue;
+ if (String.Compare (key, dictKey, StringComparison.Ordinal) == 0)
+ return true;
+ }
+
+ return false;
+ }
void AssignPropertyFromResources (ControlBuilder builder, MemberInfo mi, string attvalue)
{
@@ -860,9 +887,16 @@ namespace System.Web.Compilation
if (!isProperty && !isField || !IsWritablePropertyOrField (mi))
return;
+ object[] attrs = mi.GetCustomAttributes (typeof (LocalizableAttribute), true);
+ if (attrs == null || attrs.Length == 0 || !((LocalizableAttribute)attrs [0]).IsLocalizable)
+ return;
+
string memberName = mi.Name;
string resname = String.Concat (attvalue, ".", memberName);
+ if (!ResourceProviderHasObject (resname))
+ return;
+
// __ctrl.Text = System.Convert.ToString(HttpContext.GetLocalResourceObject("ButtonResource1.Text"));
string inputFile = parser.InputFile;
string physPath = HttpContext.Current.Request.PhysicalApplicationPath;
@@ -989,7 +1023,7 @@ namespace System.Web.Compilation
string value = attvalue.Substring (3, attvalue.Length - 5).Trim ();
CodeExpression valueExpression = null;
#if NET_2_0
- if (StrUtils.StartsWith (value, "Bind", true))
+ if (startsWithBindRegex.Match (value).Success)
valueExpression = CreateEvalInvokeExpression (bindRegexInValue, value, true);
else
#endif
@@ -1061,6 +1095,9 @@ namespace System.Web.Compilation
AddEventAssign (method, builder, "DataBinding", typeof (EventHandler), dbMethodName);
method = CreateDBMethod (builder, dbMethodName, GetContainerType (builder), builder.ControlType);
+#if NET_2_0
+ builder.DataBindingMethod = method;
+#endif
CodeCastExpression cast;
CodeMethodReferenceExpression methodExpr;
CodeMethodInvokeExpression expr;
@@ -1378,7 +1415,9 @@ namespace System.Web.Compilation
// Add the DataBind handler
method = CreateDBMethod (builder, dbMethodName, GetContainerType (builder), typeof (DataBoundLiteralControl));
-
+#if NET_2_0
+ builder.DataBindingMethod = method;
+#endif
CodeVariableReferenceExpression targetExpr = new CodeVariableReferenceExpression ("target");
CodeMethodInvokeExpression invoke = new CodeMethodInvokeExpression ();
invoke.Method = new CodeMethodReferenceExpression (targetExpr, "SetDataBoundString");
@@ -1393,7 +1432,7 @@ namespace System.Web.Compilation
method.Statements.Add (AddLinePragma (invoke, builder));
mainClass.Members.Add (method);
-
+
AddChildCall (builder, db);
}
@@ -1456,11 +1495,8 @@ namespace System.Web.Compilation
FlushText (builder, sb);
if (b is ObjectTagBuilder) {
ProcessObjectTag ((ObjectTagBuilder) b);
- continue;
- }
-
- StringPropertyBuilder pb = b as StringPropertyBuilder;
- if (pb != null){
+ } else if (b is StringPropertyBuilder) {
+ StringPropertyBuilder pb = b as StringPropertyBuilder;
if (pb.Children != null && pb.Children.Count > 0) {
StringBuilder asb = new StringBuilder ();
foreach (string s in pb.Children)
@@ -1471,11 +1507,9 @@ namespace System.Web.Compilation
assign.Right = new CodePrimitiveExpression (asb.ToString ());
method.Statements.Add (AddLinePragma (assign, builder));
}
- continue;
}
-
#if NET_2_0
- if (b is ContentBuilderInternal) {
+ else if (b is ContentBuilderInternal) {
ContentBuilderInternal cb = (ContentBuilderInternal) b;
CreateControlTree (cb, false, true);
AddContentTemplateInvocation (cb, builder.Method, cb.Method.Name);
@@ -1483,33 +1517,28 @@ namespace System.Web.Compilation
}
#endif
// Ignore TemplateBuilders - they are processed in InitMethod
- if (b is TemplateBuilder)
- continue;
-
- if (b is CodeRenderBuilder) {
+ else if (b is TemplateBuilder) {
+ } else if (b is CodeRenderBuilder) {
AddCodeRender (builder, (CodeRenderBuilder) b);
- continue;
- }
-
- if (b is DataBindingBuilder) {
+ } else if (b is DataBindingBuilder) {
AddDataBindingLiteral (builder, (DataBindingBuilder) b);
- continue;
- }
-
- if (b is ControlBuilder) {
+ } else if (b is ControlBuilder) {
ControlBuilder child = (ControlBuilder) b;
CreateControlTree (child, inTemplate, builder.ChildrenAsProperties);
AddChildCall (builder, child);
continue;
- }
+ } else
+ throw new Exception ("???");
- throw new Exception ("???");
+#if NET_2_0
+ ControlBuilder bldr = b as ControlBuilder;
+ bldr.ProcessGeneratedCode (CompileUnit, BaseType, DerivedType, bldr.Method, bldr.DataBindingMethod);
+#endif
}
FlushText (builder, sb);
}
-
ControlBuilder defaultPropertyBuilder = builder.DefaultPropertyBuilder;
if (defaultPropertyBuilder != null) {
CreateControlTree (defaultPropertyBuilder, false, true);
@@ -1545,6 +1574,10 @@ namespace System.Web.Compilation
if (!childrenAsProperties && typeof (Control).IsAssignableFrom (builder.ControlType))
builder.Method.Statements.Add (new CodeMethodReturnStatement (ctrlVar));
+
+#if NET_2_0
+ builder.ProcessGeneratedCode (CompileUnit, BaseType, DerivedType, builder.Method, builder.DataBindingMethod);
+#endif
}
#if NET_2_0
@@ -1809,6 +1842,9 @@ namespace System.Web.Compilation
}
#endif
+ if (tca == TypeConverterAttribute.Default)
+ tca = null;
+
if (tca == null)
return null;
@@ -2012,10 +2048,34 @@ namespace System.Web.Compilation
}
}
- TypeConverter converter = preConverted ? cvt :
- wasNullable ? TypeDescriptor.GetConverter (type) :
- TypeDescriptor.GetProperties (member.DeclaringType) [member.Name].Converter;
+ TypeConverter converter = preConverted ? cvt : wasNullable ? TypeDescriptor.GetConverter (type) : null;
+ if (converter == null) {
+ PropertyDescriptor pdesc = TypeDescriptor.GetProperties (member.DeclaringType) [member.Name];
+ if (pdesc != null)
+ converter = pdesc.Converter;
+ else {
+ Type memberType;
+ switch (member.MemberType) {
+ case MemberTypes.Field:
+ memberType = ((FieldInfo)member).FieldType;
+ break;
+
+ case MemberTypes.Property:
+ memberType = ((PropertyInfo)member).PropertyType;
+ break;
+
+ default:
+ memberType = null;
+ break;
+ }
+
+ if (memberType == null)
+ return null;
+ converter = TypeDescriptor.GetConverter (memberType);
+ }
+ }
+
if (preConverted || (converter != null && SafeCanConvertFrom (typeof (string), converter))) {
object value = preConverted ? convertedFromAttr : converter.ConvertFromInvariantString (str);
diff --git a/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryBuildProvider.cs b/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryBuildProvider.cs
index 05e28de..bcbd861 100644
--- a/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryBuildProvider.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryBuildProvider.cs
@@ -60,19 +60,19 @@ namespace System.Web.Compilation
return new PageThemeCompiler (parser as PageThemeParser);
}
- protected override TemplateParser CreateParser (string virtualPath, string inputFile, TextReader reader, HttpContext context)
+ protected override TemplateParser CreateParser (VirtualPath virtualPath, string inputFile, TextReader reader, HttpContext context)
{
return CreateParser (virtualPath, inputFile, context);
}
- protected override TemplateParser CreateParser (string virtualPath, string inputFile, HttpContext context)
+ protected override TemplateParser CreateParser (VirtualPath virtualPath, string inputFile, HttpContext context)
{
- string vp = VirtualPathUtility.AppendTrailingSlash (virtualPath);
- string physicalPath = context.Request.MapPath (vp);
+ string vp = VirtualPathUtility.AppendTrailingSlash (virtualPath.Original);
+ string physicalPath = virtualPath.PhysicalPath;
if (!Directory.Exists (physicalPath))
- throw new HttpException (String.Concat ("Theme '", vp ,"' cannot be found in the application or global theme directories."));
+ throw new HttpException (String.Concat ("Theme '", virtualPath.Original ,"' cannot be found in the application or global theme directories."));
- PageThemeParser ptp = new PageThemeParser (vp, context);
+ PageThemeParser ptp = new PageThemeParser (virtualPath, context);
string[] css_files = Directory.GetFiles (physicalPath, "*.css");
string[] css_urls = new string [css_files.Length];
@@ -91,11 +91,10 @@ namespace System.Web.Compilation
foreach (string skin_file in skin_files) {
skin_file_url = VirtualPathUtility.Combine (vp, Path.GetFileName (skin_file));
- PageThemeFileParser ptfp = new PageThemeFileParser (skin_file_url, skin_file, context);
+ PageThemeFileParser ptfp = new PageThemeFileParser (new VirtualPath (skin_file_url), skin_file, context);
ptp.AddDependency (skin_file_url);
- generator = new AspGenerator (ptfp);
- ptfp.RootBuilder.Foundry = shared_foundry;
+ generator = new AspGenerator (ptfp, shared_foundry);
generator.Parse ();
if (ptfp.RootBuilder.Children != null)
diff --git a/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryCompiler.cs
index a1fc894..5c9fd44 100644
--- a/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryCompiler.cs
@@ -49,7 +49,7 @@ namespace System.Web.UI
throw new HttpException (String.Format ("Theme '{0}' cannot be found in the application or global theme directories.", theme));
string [] skin_files = Directory.GetFiles (physicalPath, "*.skin");
- PageThemeParser ptp = new PageThemeParser (virtualPath, context);
+ PageThemeParser ptp = new PageThemeParser (new VirtualPath (virtualPath), context);
string[] css_files = Directory.GetFiles (physicalPath, "*.css");
string[] css_urls = new string[css_files.Length];
@@ -65,7 +65,7 @@ namespace System.Web.UI
string skin_file_url;
for (int i = 0; i < skin_files.Length; i ++) {
skin_file_url = VirtualPathUtility.Combine (virtualPath, Path.GetFileName (skin_files [i]));
- PageThemeFileParser ptfp = new PageThemeFileParser (skin_file_url,
+ PageThemeFileParser ptfp = new PageThemeFileParser (new VirtualPath (skin_file_url),
skin_files[i],
context);
diff --git a/mcs/class/System.Web/System.Web.Compilation/UserControlBuildProvider.cs b/mcs/class/System.Web/System.Web.Compilation/UserControlBuildProvider.cs
index cf851a3..190d400 100644
--- a/mcs/class/System.Web/System.Web.Compilation/UserControlBuildProvider.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/UserControlBuildProvider.cs
@@ -50,12 +50,12 @@ namespace System.Web.Compilation {
return new UserControlCompiler (parser as UserControlParser);
}
- protected override TemplateParser CreateParser (string virtualPath, string physicalPath, HttpContext context)
+ protected override TemplateParser CreateParser (VirtualPath virtualPath, string physicalPath, HttpContext context)
{
- return CreateParser (virtualPath, physicalPath, OpenReader (virtualPath), context);
+ return CreateParser (virtualPath, physicalPath, OpenReader (virtualPath.Original), context);
}
- protected override TemplateParser CreateParser (string virtualPath, string physicalPath, TextReader reader, HttpContext context)
+ protected override TemplateParser CreateParser (VirtualPath virtualPath, string physicalPath, TextReader reader, HttpContext context)
{
return new UserControlParser (virtualPath, physicalPath, reader, context);
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/WebHandlerBuildProvider.cs b/mcs/class/System.Web/System.Web.Compilation/WebHandlerBuildProvider.cs
index a41dbc1..6ce9fd3 100644
--- a/mcs/class/System.Web/System.Web.Compilation/WebHandlerBuildProvider.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/WebHandlerBuildProvider.cs
@@ -46,14 +46,14 @@ namespace System.Web.Compilation {
{
}
- protected override SimpleWebHandlerParser CreateParser (string virtualPath, string physicalPath, TextReader reader, HttpContext context)
+ protected override SimpleWebHandlerParser CreateParser (VirtualPath virtualPath, string physicalPath, TextReader reader, HttpContext context)
{
return new WebHandlerParser (context, virtualPath, physicalPath, reader);
}
- protected override SimpleWebHandlerParser CreateParser (string virtualPath, string physicalPath, HttpContext context)
+ protected override SimpleWebHandlerParser CreateParser (VirtualPath virtualPath, string physicalPath, HttpContext context)
{
- return new WebHandlerParser (context, virtualPath, physicalPath, OpenReader (virtualPath));
+ return new WebHandlerParser (context, virtualPath, physicalPath, OpenReader (virtualPath.Original));
}
}
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/WebServiceBuildProvider.cs b/mcs/class/System.Web/System.Web.Compilation/WebServiceBuildProvider.cs
index fdbfeee..ac76d6a 100644
--- a/mcs/class/System.Web/System.Web.Compilation/WebServiceBuildProvider.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/WebServiceBuildProvider.cs
@@ -47,14 +47,14 @@ namespace System.Web.Compilation {
{
}
- protected override SimpleWebHandlerParser CreateParser (string virtualPath, string physicalPath, TextReader reader, HttpContext context)
+ protected override SimpleWebHandlerParser CreateParser (VirtualPath virtualPath, string physicalPath, TextReader reader, HttpContext context)
{
return new WebServiceParser (context, virtualPath, physicalPath, reader);
}
- protected override SimpleWebHandlerParser CreateParser (string virtualPath, string physicalPath, HttpContext context)
+ protected override SimpleWebHandlerParser CreateParser (VirtualPath virtualPath, string physicalPath, HttpContext context)
{
- return new WebServiceParser (context, virtualPath, physicalPath, OpenReader (virtualPath));
+ return new WebServiceParser (context, virtualPath, physicalPath, OpenReader (virtualPath.Original));
}
}
}
diff --git a/mcs/class/System.Web/System.Web.Configuration/ChangeLog b/mcs/class/System.Web/System.Web.Configuration/ChangeLog
index befa2eb..7e32789 100644
--- a/mcs/class/System.Web/System.Web.Configuration/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Configuration/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-14 Marek Habersack <mhabersack at novell.com>
+
+ * HandlerFactoryConfiguration.cs: if we're matching a default
+ handler, disallow caching.
+
2009-01-08 Gert Driesen <drieseng at users.sourceforge.net>
* HandlerFactoryConfiguration.cs: Allow handlers with non-public
diff --git a/mcs/class/System.Web/System.Web.Configuration/HandlerFactoryConfiguration.cs b/mcs/class/System.Web/System.Web.Configuration/HandlerFactoryConfiguration.cs
index d049d38..0e90f7f 100644
--- a/mcs/class/System.Web/System.Web.Configuration/HandlerFactoryConfiguration.cs
+++ b/mcs/class/System.Web/System.Web.Configuration/HandlerFactoryConfiguration.cs
@@ -184,7 +184,7 @@ namespace System.Web.Configuration {
return false;
}
- public object LocateHandler (string verb, string filepath)
+ public object LocateHandler (string verb, string filepath, out bool allowCache)
{
int start, end;
int count = handlers.Count;
@@ -197,8 +197,10 @@ namespace System.Web.Configuration {
HttpHandler handler = (HttpHandler) handlers [i];
if (handler.Verbs == null){
- if (handler.PathMatches (filepath))
+ if (handler.PathMatches (filepath)) {
+ allowCache = handler.OriginalPath != "*";
return handler.GetHandlerInstance ();
+ }
continue;
}
@@ -207,12 +209,15 @@ namespace System.Web.Configuration {
j--;
if (verbs [j] != verb)
continue;
- if (handler.PathMatches (filepath))
+ if (handler.PathMatches (filepath)) {
+ allowCache = handler.OriginalPath != "*";
return handler.GetHandlerInstance ();
+ }
}
}
}
+ allowCache = false;
return null;
}
}
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/ApplicationSettingsConfigurationFileMap.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/ApplicationSettingsConfigurationFileMap.cs
new file mode 100644
index 0000000..a34d4a3
--- /dev/null
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/ApplicationSettingsConfigurationFileMap.cs
@@ -0,0 +1,51 @@
+//
+// System.Web.Configuration.ApplicationSettingsConfigurationFileMap.cs
+//
+// Authors:
+// Marek Habersack (mhabersack at novell.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_2_0
+using System;
+using System.Configuration;
+using System.Web;
+using System.Web.Configuration;
+
+namespace System.Web.Configuration
+{
+ // Part of fix for bug #491531
+ class ApplicationSettingsConfigurationFileMap : ConfigurationFileMap
+ {
+ public ApplicationSettingsConfigurationFileMap ()
+ {
+ HttpContext ctx = HttpContext.Current;
+ HttpRequest req = ctx != null ? ctx.Request : null;
+
+ if (req != null) {
+ MachineConfigFilename = WebConfigurationHost.GetWebConfigFileName (req.MapPath (WebConfigurationManager.FindWebConfig (req.CurrentExecutionFilePath)));
+ } else
+ MachineConfigFilename = null;
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
index 39acac1..095838a 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
@@ -1,8 +1,61 @@
+2009-07-13 Marek Habersack <mhabersack at novell.com>
+
+ * ProvidersHelper.cs: InstantiateProvider doesn't have to
+ explicitly look for types in App_Code assemblies - this is done in
+ HttpApplication.LoadType.
+
+2009-06-12 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * WebConfigurationHost.cs: workaround to avoid definition errors when
+ a null config path is passed.
+
+2009-06-05 Marek Habersack <mhabersack at novell.com>
+
+ * WebConfigurationManager.cs: OpenWebConfiguration caches
+ configurations with a key generated from all the parameters passed
+ to it, not just from path.
+ Added internal GetSection method which takes HttpContext as its
+ third parameter - used in calling OpenWebConfiguration.
+ FindWebConfig is no longer used in GetSection - it breaks handling
+ of <location> elements in config files. Fixes bug #510302
+
+2009-06-03 Marek Habersack <mhabersack at novell.com>
+
+ * MonoSettingsSection.cs: added new property,
+ verificationCompatibility, which serves the same purpose as the
+ registry key described in http://support.microsoft.com/kb/932552
+ (when set to 1 it turns off virtual path validity
+ verification). Fixes bug #509163
+
+2009-05-14 Marek Habersack <mhabersack at novell.com>
+
+ * HttpHandlersSection.cs: if we're matching a default handler,
+ disallow caching.
+
+2009-04-03 Marek Habersack <mhabersack at novell.com>
+
+ * WebConfigurationManager.cs: added code in the static constructor
+ to enable retrieving application settings via
+ ApplicationSettingsBase from within asp.net applications. Fixes
+ bug #491531
+
+ * ApplicationSettingsConfigurationFileMap.cs: added.
+
+2009-03-12 Dean Brettle <dean at brettle.com>
+
+ * nBrowser/Build.cs: made Browser() method thread-safe and moved the
+ actual tree creation to a private InitializeTree() method for clarity.
+
2009-03-01 Marek Habersack <mhabersack at novell.com>
* WebConfigurationManager.cs: optimized GetWebApplicationSection a
bit
+2009-02-28 Marek Habersack <mhabersack at novell.com>
+
+ * WebConfigurationManager.cs: make sure no nrex happens in
+ GetSectionCacheKey ()
+
2009-02-26 Gonzalo Paniagua Javier <gonzalo at novell.com>
* WebConfigurationManager.cs: generate a hash from the string hsah
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/HttpHandlersSection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/HttpHandlersSection.cs
index f7b2890..2625dc1 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/HttpHandlersSection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/HttpHandlersSection.cs
@@ -66,17 +66,19 @@ namespace System.Web.Configuration
}
#region CompatabilityCode
- internal object LocateHandler (string verb, string filepath)
+ internal object LocateHandler (string verb, string filepath, out bool allowCache)
{
int top = Handlers.Count;
-
+
for (int i = 0; i < top; i++){
HttpHandlerAction handler = (HttpHandlerAction) Handlers [i];
string[] verbs = handler.Verbs;
if (verbs == null){
- if (handler.PathMatches (filepath))
+ if (handler.PathMatches (filepath)) {
+ allowCache = handler.Path != "*";
return handler.GetHandlerInstance ();
+ }
continue;
}
@@ -84,11 +86,14 @@ namespace System.Web.Configuration
j--;
if (verbs [j] != verb)
continue;
- if (handler.PathMatches (filepath))
+ if (handler.PathMatches (filepath)) {
+ allowCache = handler.Path != "*";
return handler.GetHandlerInstance ();
+ }
}
}
+ allowCache = false;
return null;
}
#endregion
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/MonoSettingsSection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/MonoSettingsSection.cs
index 7de027b..35dc618 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/MonoSettingsSection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/MonoSettingsSection.cs
@@ -40,16 +40,19 @@ namespace System.Web.Configuration
static ConfigurationPropertyCollection properties;
static ConfigurationProperty compilersCompatibilityProp;
static ConfigurationProperty useCompilersCompatibilityProp;
+ static ConfigurationProperty verificationCompatibilityProp;
static MonoSettingsSection ()
{
compilersCompatibilityProp = new ConfigurationProperty ("compilersCompatibility", typeof (CompilerCollection), null, null, PropertyHelper.DefaultValidator,
ConfigurationPropertyOptions.None);
useCompilersCompatibilityProp = new ConfigurationProperty ("useCompilersCompatibility", typeof (bool), true);
+ verificationCompatibilityProp = new ConfigurationProperty ("verificationCompatibility", typeof (int), 0);
properties = new ConfigurationPropertyCollection ();
properties.Add (compilersCompatibilityProp);
properties.Add (useCompilersCompatibilityProp);
+ properties.Add (verificationCompatibilityProp);
}
[ConfigurationProperty ("compilersCompatibility")]
@@ -62,6 +65,12 @@ namespace System.Web.Configuration
get { return (bool) base [useCompilersCompatibilityProp]; }
set { base [useCompilersCompatibilityProp] = value; }
}
+
+ [ConfigurationProperty ("verificationCompatibility", DefaultValue = "0")]
+ public int VerificationCompatibility {
+ get { return (int) base [verificationCompatibilityProp]; }
+ set { base [verificationCompatibilityProp] = value; }
+ }
protected override ConfigurationPropertyCollection Properties {
get { return properties; }
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/ProvidersHelper.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/ProvidersHelper.cs
index e9b8dca..becc491 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/ProvidersHelper.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/ProvidersHelper.cs
@@ -48,27 +48,6 @@ namespace System.Web.Configuration {
public static ProviderBase InstantiateProvider (ProviderSettings providerSettings, Type providerType)
{
Type settingsType = HttpApplication.LoadType (providerSettings.Type);
-
- if (settingsType == null)
- settingsType = HttpApplication.LoadTypeFromBin (providerSettings.Type);
-
- // check App_Code dlls
- if (settingsType == null) {
- IList appCode = BuildManager.CodeAssemblies;
-
- if (appCode != null && appCode.Count > 0) {
- Assembly asm;
- foreach (object o in appCode) {
- asm = o as Assembly;
- if (asm == null)
- continue;
- settingsType = asm.GetType (providerSettings.Type);
- if (settingsType != null)
- break;
- }
- }
- }
-
if (settingsType == null)
throw new ConfigurationErrorsException (String.Format ("Could not find type: {0}",
providerSettings.Type));
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
index 24cd3b0..6bfe659 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
@@ -360,6 +360,8 @@ namespace System.Web.Configuration
return configPath == MachinePath || configPath == MachineWebPath;
case ConfigurationAllowDefinition.MachineToWebRoot:
case ConfigurationAllowDefinition.MachineToApplication:
+ if (String.IsNullOrEmpty (configPath))
+ return true;
return (String.Compare (configPath, MachinePath, StringComparison.Ordinal) == 0) ||
(String.Compare (configPath, MachineWebPath, StringComparison.Ordinal) == 0) ||
(String.Compare (configPath, "/", StringComparison.Ordinal) == 0) ||
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
index 3ed59ea..3435e7d 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
@@ -164,6 +164,14 @@ namespace System.Web.Configuration {
PropertyInfo prop = typeof(ConfigurationManager).GetProperty ("ConfigurationFactory", BindingFlags.Static | BindingFlags.NonPublic);
if (prop != null)
configFactory = prop.GetValue (null, null) as IInternalConfigConfigurationFactory;
+
+ // Part of fix for bug #491531
+ Type type = Type.GetType ("System.Configuration.CustomizableFileSettingsProvider, System", false);
+ if (type != null) {
+ FieldInfo fi = type.GetField ("webConfigurationFileMapType", BindingFlags.Static | BindingFlags.NonPublic);
+ if (fi != null && fi.FieldType == Type.GetType ("System.Type"))
+ fi.SetValue (null, typeof (ApplicationSettingsConfigurationFileMap));
+ }
}
public static _Configuration OpenMachineConfiguration ()
@@ -238,13 +246,13 @@ namespace System.Web.Configuration {
if (path == null || path.Length == 0)
path = "/";
- _Configuration conf;
-
- conf = (_Configuration) configurations [path];
+ string confKey = path + site + locationSubPath + server + userName + password;
+ _Configuration conf = null;
+ conf = (_Configuration) configurations [confKey];
if (conf == null) {
try {
conf = ConfigurationFactory.Create (typeof (WebConfigurationHost), null, path, site, locationSubPath, server, userName, password);
- configurations [path] = conf;
+ configurations [confKey] = conf;
} catch (Exception ex) {
lock (hasConfigErrorsLock) {
hasConfigErrors = true;
@@ -305,27 +313,29 @@ namespace System.Web.Configuration {
public static object GetSection (string sectionName)
{
- return GetSection (sectionName, GetCurrentPath (HttpContext.Current));
+ HttpContext context = HttpContext.Current;
+ return GetSection (sectionName, GetCurrentPath (context), context);
}
public static object GetSection (string sectionName, string path)
{
+ return GetSection (sectionName, path, HttpContext.Current);
+ }
+
+ internal static object GetSection (string sectionName, string path, HttpContext context)
+ {
object cachedSection = sectionCache [GetSectionCacheKey (sectionName, path)];
if (cachedSection != null)
return cachedSection;
- string configPath;
- if (String.Compare (path, HttpRuntime.AppDomainAppVirtualPath, StringComparison.Ordinal) == 0) {
- configPath = path;
- } else {
- int len = path != null ? path.Length : 0;
- if (len == 0)
- configPath = path;
- else
- configPath = FindWebConfig (path);
- }
-
- _Configuration c = OpenWebConfiguration (configPath);
+
+ HttpRequest req = context != null ? context.Request : null;
+ _Configuration c = OpenWebConfiguration (path, /* path */
+ null, /* site */
+ req != null ? VirtualPathUtility.GetDirectory (req.Path) : null, /* locationSubPath */
+ null, /* server */
+ null, /* userName */
+ null /* password */);
ConfigurationSection section = c.GetSection (sectionName);
if (section == null)
@@ -351,7 +361,7 @@ namespace System.Web.Configuration {
return value;
#endif
}
-
+
static string MapPath (HttpRequest req, string virtualPath)
{
if (req != null)
@@ -386,7 +396,7 @@ namespace System.Web.Configuration {
return curPath.Substring (0, idx);
}
- static string FindWebConfig (string path)
+ internal static string FindWebConfig (string path)
{
if (String.IsNullOrEmpty (path))
return path;
@@ -419,7 +429,7 @@ namespace System.Web.Configuration {
curPath = rootPath;
break;
}
-
+
if (WebConfigurationHost.GetWebConfigFileName (physPath) != null)
break;
@@ -484,7 +494,7 @@ namespace System.Web.Configuration {
static int GetSectionCacheKey (string sectionName, string path)
{
- return sectionName.GetHashCode () ^ (path.GetHashCode () + 37);
+ return (sectionName != null ? sectionName.GetHashCode () : 0) ^ ((path != null ? path.GetHashCode () : 0) + 37);
}
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/nBrowser/Build.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/nBrowser/Build.cs
index d05dc1a..727703f 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/nBrowser/Build.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/nBrowser/Build.cs
@@ -41,6 +41,7 @@ namespace System.Web.Configuration.nBrowser
private System.Collections.Generic.Dictionary<string, string> BrowserKeys;
//
+ private object browserSyncRoot = new object();
private System.Web.Configuration.nBrowser.Node browser;
/// <summary>
@@ -146,11 +147,22 @@ namespace System.Web.Configuration.nBrowser
/// <returns></returns>
public Node Browser()
{
- if (browser != null)
+ if (browser == null)
{
- return browser;
+ lock (browserSyncRoot)
+ {
+ if (browser == null)
+ {
+ browser = InitializeTree();
+ }
+ }
}
- browser = new Node();
+ return browser;
+ }
+
+ private Node InitializeTree()
+ {
+ Node root = new Node();
//Custom Sorted List, to allow where Multple files in Diff directorys might have the same
//filename. So still to some degree first come first serve but might be close enough
//to how microsoft System to match much more closely.
@@ -194,7 +206,7 @@ namespace System.Web.Configuration.nBrowser
throw new nBrowser.Exception(String.Format("Parent not found with id = {0}", child.ParentId));
}
if (parent == null)
- parent = browser;
+ parent = root;
parent.AddChild(child);
}
}
@@ -215,7 +227,7 @@ namespace System.Web.Configuration.nBrowser
}
Node parentNode = this.GetNode(node.ParentId);
if (parentNode == null)
- parentNode = browser;
+ parentNode = root;
// insert the default node between the regular node and it's parent.
parentNode.RemoveChild(node);
defaultNode.AddChild(node);
@@ -233,7 +245,7 @@ namespace System.Web.Configuration.nBrowser
}
#endregion
- return browser;
+ return root;
}
/// <summary>
diff --git a/mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs b/mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs
index 9b39902..5db7944 100644
--- a/mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs
+++ b/mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs
@@ -220,11 +220,13 @@ namespace System.Web.Handlers {
void System.Web.IHttpHandler.ProcessRequest (HttpContext context)
#endif
{
+ HttpRequest request = context.Request;
+ HttpResponse response = context.Response;
string resourceName;
string asmName;
Assembly assembly;
- DecryptAssemblyResource (context.Request.QueryString ["d"], out asmName, out resourceName);
+ DecryptAssemblyResource (request.QueryString ["d"], out asmName, out resourceName);
if (resourceName == null)
throw new HttpException (404, "No resource name given");
@@ -255,11 +257,49 @@ namespace System.Web.Handlers {
if (wra == null)
throw new HttpException (404, String.Concat ("Resource ", resourceName, " not found"));
- context.Response.ContentType = wra.ContentType;
+ string req_cache = request.Headers ["Cache-Control"];
+ if (req_cache == "max-age=0") {
+ long atime;
+#if NET_2_0
+ if (Int64.TryParse (request.QueryString ["t"], out atime)) {
+#else
+ atime = -1;
+ try {
+ atime = Int64.Parse (request.QueryString ["t"]);
+ } catch {}
+ if (atime > -1) {
+#endif
+ if (atime == File.GetLastWriteTimeUtc (assembly.Location).Ticks) {
+ response.StatusCode = 304;
+ return;
+ }
+ }
+ }
+ string modif_since = request.Headers ["If-Modified-Since"];
+ if (modif_since != null && modif_since != "") {
+ try {
+ DateTime modif;
+#if NET_2_0
+ if (DateTime.TryParseExact (modif_since, "r", null, 0, out modif))
+#else
+ modif = DateTime.MinValue;
+ try {
+ modif = DateTime.ParseExact (modif_since, "r", null, 0);
+ } catch { }
+ if (modif != DateTime.MinValue)
+#endif
+ if (File.GetLastWriteTimeUtc (assembly.Location) <= modif)
+ response.StatusCode = 304;
+ return;
+ } catch {}
+ }
+
+ response.ContentType = wra.ContentType;
- /* tell the client they can cache resources for 1 year */
- context.Response.ExpiresAbsolute = DateTime.Now.AddYears (1);
- context.Response.CacheControl = "private";
+ DateTime utcnow = DateTime.UtcNow;
+ response.AddHeader ("Last-Modified", utcnow.ToString ("r"));
+ response.ExpiresAbsolute = utcnow.AddYears (1);
+ response.CacheControl = "public";
Stream s = assembly.GetManifestResourceStream (resourceName);
if (s == null)
@@ -267,13 +307,13 @@ namespace System.Web.Handlers {
if (wra.PerformSubstitution) {
using (StreamReader r = new StreamReader (s)) {
- TextWriter w = context.Response.Output;
+ TextWriter w = response.Output;
new PerformSubstitutionHelper (assembly).PerformSubstitution (r, w);
}
}
else {
byte [] buf = new byte [1024];
- Stream output = context.Response.OutputStream;
+ Stream output = response.OutputStream;
int c;
do {
c = s.Read (buf, 0, 1024);
@@ -281,7 +321,7 @@ namespace System.Web.Handlers {
} while (c > 0);
}
#if SYSTEM_WEB_EXTENSIONS
- TextWriter writer = context.Response.Output;
+ TextWriter writer = response.Output;
foreach (ScriptResourceAttribute sra in assembly.GetCustomAttributes (typeof (ScriptResourceAttribute), false)) {
if (sra.ScriptName == resourceName) {
string scriptResourceName = sra.ScriptResourceName;
@@ -329,7 +369,7 @@ namespace System.Web.Handlers {
}
}
- bool notifyScriptLoaded = context.Request.QueryString ["n"] == "t";
+ bool notifyScriptLoaded = request.QueryString ["n"] == "t";
if (notifyScriptLoaded) {
writer.WriteLine ();
writer.WriteLine ("if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();");
diff --git a/mcs/class/System.Web/System.Web.Handlers/ChangeLog b/mcs/class/System.Web/System.Web.Handlers/ChangeLog
index a27895e..e0793cb 100644
--- a/mcs/class/System.Web/System.Web.Handlers/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Handlers/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-04 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * AssemblyResourceLoader.cs: MS sets cacheability to public. Add
+ Last-Modified header and return 304 if validating max-age=0 or
+ If-Modified-Since succeeds.
+
2008-05-14 Marek Habersack <mhabersack at novell.com>
* AssemblyResourceLoader.cs: do not add the same entry to a
diff --git a/mcs/class/System.Web/System.Web.Security/ChangeLog b/mcs/class/System.Web/System.Web.Security/ChangeLog
index 1c53b5d..420471a 100644
--- a/mcs/class/System.Web/System.Web.Security/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Security/ChangeLog
@@ -1,3 +1,12 @@
+2009-05-28 Marek Habersack <mhabersack at novell.com>
+
+ * FormsAuthenticationModule.cs: if forms authentication login URL
+ is not rooted, make it relative to the application root, so that
+ MapPath maps it correctly.
+ Use String.Compare for checking whether requested URL matches the
+ login URL - be case-insensitive when running on Windows or with
+ IOMAP in effect.
+
2009-03-10 Marek Habersack <mhabersack at novell.com>
* UrlAuthorizationModule.cs: OnAuthorizeRequest must use the
diff --git a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
index 8e53da6..e468950 100644
--- a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
+++ b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
@@ -28,6 +28,7 @@
//
using System.ComponentModel;
+using System.Globalization;
using System.Security.Permissions;
using System.Security.Principal;
using System.Text;
@@ -109,14 +110,17 @@ namespace System.Web.Security
slidingExpiration = _config.SlidingExpiration;
#endif
- string reqPath = "";
+ if (!VirtualPathUtility.IsRooted (loginPage))
+ loginPage = "~/" + loginPage;
+
+ string reqPath = String.Empty;
string loginPath = null;
try {
reqPath = context.Request.PhysicalPath;
loginPath = context.Request.MapPath (loginPage);
} catch {} // ignore
- context.SkipAuthorization = (reqPath == loginPath);
+ context.SkipAuthorization = String.Compare (reqPath, loginPath, HttpRuntime.CaseInsensitive, CultureInfo.InvariantCulture) == 0;
#if NET_2_0
//TODO: need to check that the handler is System.Web.Handlers.AssemblyResourceLoader type
diff --git a/mcs/class/System.Web/System.Web.SessionState/ChangeLog b/mcs/class/System.Web/System.Web.SessionState/ChangeLog
index ddfb22a..1d1b6a4 100644
--- a/mcs/class/System.Web/System.Web.SessionState/ChangeLog
+++ b/mcs/class/System.Web/System.Web.SessionState/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-03 Marek Habersack <mhabersack at novell.com>
+
+ * SessionSQLServerHandler.cs: recreate connection after database
+ became unavailable but the session handler is still alive. Fixes
+ bug #491508. Patch from Hubert Fongarnand
+ <informatique.internet at fiducial.fr>, thanks!
+
2008-10-21 Marek Habersack <mhabersack at novell.com>
* SessionStateModule.cs: OnAcquireState should set up a session
diff --git a/mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs b/mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs
index 64822d1..62beb19 100644
--- a/mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs
+++ b/mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs
@@ -67,25 +67,11 @@ namespace System.Web.SessionState {
public void Init (SessionStateModule module, HttpApplication context,
SessionConfig config)
{
- string connectionTypeName;
- string providerAssemblyName;
- string cncString;
+
this.config = config;
this.AppPath = context.Request.ApplicationPath;
- GetConnectionData (out providerAssemblyName, out connectionTypeName, out cncString);
- if (cncType == null) {
- Assembly dbAssembly = Assembly.Load (providerAssemblyName);
- cncType = dbAssembly.GetType (connectionTypeName, true);
- if (!typeof (IDbConnection).IsAssignableFrom (cncType))
- throw new ApplicationException ("The type '" + cncType +
- "' does not implement IDB Connection.\n" +
- "Check 'DbConnectionType' in server.exe.config.");
- }
-
- cnc = (IDbConnection) Activator.CreateInstance (cncType);
- cnc.ConnectionString = cncString;
try {
InitializeConnection ();
} catch (Exception exc) {
@@ -100,6 +86,25 @@ namespace System.Web.SessionState {
ReplaceParamPrefix (ref deleteCommandText);
}
}
+
+ void CreateNewConnection()
+ {
+ string connectionTypeName;
+ string providerAssemblyName;
+ string cncString;
+ GetConnectionData (out providerAssemblyName, out connectionTypeName, out cncString);
+ if (cncType == null) {
+ Assembly dbAssembly = Assembly.Load (providerAssemblyName);
+ cncType = dbAssembly.GetType (connectionTypeName, true);
+ if (!typeof (IDbConnection).IsAssignableFrom (cncType))
+ throw new ApplicationException ("The type '" + cncType +
+ "' does not implement IDB Connection.\n" +
+ "Check 'DbConnectionType' in server.exe.config.");
+ }
+
+ cnc = (IDbConnection) Activator.CreateInstance (cncType);
+ cnc.ConnectionString = cncString;
+ }
void ReplaceParamPrefix(ref string command)
{
@@ -317,6 +322,8 @@ namespace System.Web.SessionState {
void InitializeConnection()
{
+ if (cnc == null)
+ CreateNewConnection();
cnc.Open ();
selectCommand = cnc.CreateCommand ();
selectCommand.CommandText = selectCommandText;
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
index 00bf59f..809717f 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
@@ -1,3 +1,13 @@
+2009-05-15 Marek Habersack <mhabersack at novell.com>
+
+ * HtmlForm.cs: if application isn't running on /, make sure we
+ generate the correct relative path for the action form attribute.
+
+2009-04-15 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * HtmlInputText.cs: make sure we're inside a Page before dereferencing
+ it.
+
2008-11-06 Marek Habersack <mhabersack at novell.com>
* HtmlForm.cs: added the undocumented, but supported, Action
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
index b56ecaa..e9b088e 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
@@ -32,6 +32,7 @@ using System.Security.Permissions;
using System.Web.Util;
using System.Web.UI.WebControls;
using System.Web.Configuration;
+using System.Web.SessionState;
namespace System.Web.UI.HtmlControls
{
@@ -277,9 +278,32 @@ namespace System.Web.UI.HtmlControls
} else {
// Fun. We need to make cookieless sessions work, so no
// absolute paths here.
- Uri current_uri = new Uri ("http://host" + current_path);
- Uri fp_uri = new Uri ("http://host" + file_path);
- action = fp_uri.MakeRelative (current_uri);
+ bool cookieless;
+
+#if NET_2_0
+ SessionStateSection sec = WebConfigurationManager.GetSection ("system.web/sessionState") as SessionStateSection;
+ cookieless = sec != null ? sec.Cookieless == HttpCookieMode.UseUri: false;
+#else
+ SessionConfig sec = HttpContext.GetAppConfig ("system.web/sessionState") as SessionConfig;
+ cookieless = sec != null ? sec.CookieLess : false;
+#endif
+ string appVPath = HttpRuntime.AppDomainAppVirtualPath;
+ int appVPathLen = appVPath.Length;
+
+ if (appVPathLen > 1) {
+ if (cookieless) {
+ if (StrUtils.StartsWith (file_path, appVPath, true))
+ file_path = file_path.Substring (appVPathLen);
+ } else if (StrUtils.StartsWith (current_path, appVPath, true))
+ current_path = current_path.Substring (appVPathLen);
+ }
+
+ if (cookieless) {
+ Uri current_uri = new Uri ("http://host" + current_path);
+ Uri fp_uri = new Uri ("http://host" + file_path);
+ action = fp_uri.MakeRelative (current_uri);
+ } else
+ action = current_path;
}
#if NET_2_0
} else
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputText.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputText.cs
index 4926dc6..25c2ec4 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputText.cs
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputText.cs
@@ -111,7 +111,9 @@ namespace System.Web.UI.HtmlControls {
#if NET_2_0
protected internal override void Render (HtmlTextWriter writer)
{
- Page.ClientScript.RegisterForEventValidation (UniqueID);
+ Page page = Page;
+ if (page != null)
+ page.ClientScript.RegisterForEventValidation (UniqueID);
base.Render (writer);
}
#endif
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
index 958e404..2d6f5ea 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
@@ -1,3 +1,16 @@
+2009-05-29 Marek Habersack <mhabersack at novell.com>
+
+ * ListItem.cs: when tracking view state is turned on after
+ attributes have been set, make sure that the associated state bag
+ begins tracking state and that all of its existing items are
+ marked as dirty. Do the same after loading view state. Fixes bug
+ #507836
+
+2009-03-17 Marek Habersack <mhabersack at novell.com>
+
+ * Unit.cs: introduced a field to tell the difference between empty
+ (as in Unit.Empty) and 0px units.
+
2009-03-06 Marek Habersack <mhabersack at novell.com>
* WebControl.cs: if savedState is not an instance of Pair in
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ListItem.cs b/mcs/class/System.Web/System.Web.UI.WebControls/ListItem.cs
index cdbb6b2..6c68137 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ListItem.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ListItem.cs
@@ -4,7 +4,7 @@
// Authors:
// Ben Maurer (bmaurer at novell.com)
//
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// (C) 2005-2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -116,6 +116,7 @@ namespace System.Web.UI.WebControls {
if (states [0] != null) {
sb = new StateBag (true);
sb.LoadViewState (states[0]);
+ sb.SetDirty (true);
}
if (states [1] != null)
@@ -163,6 +164,10 @@ namespace System.Web.UI.WebControls {
internal void TrackViewState ()
{
tracking = true;
+ if (sb != null) {
+ sb.TrackViewState ();
+ sb.SetDirty (true);
+ }
}
public override string ToString ()
@@ -209,7 +214,7 @@ namespace System.Web.UI.WebControls {
if (r == null)
r = value;
if (r == null)
- r = "";
+ r = String.Empty;
return r;
}
@@ -227,7 +232,7 @@ namespace System.Web.UI.WebControls {
if (r == null)
r = text;
if (r == null)
- r = "";
+ r = String.Empty;
return r;
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Unit.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Unit.cs
index aa1c540..030fbe5 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Unit.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Unit.cs
@@ -52,6 +52,7 @@ namespace System.Web.UI.WebControls {
UnitType type;
double value;
+ bool valueSet;
public static readonly Unit Empty;
public Unit (double value, UnitType type)
@@ -64,6 +65,7 @@ namespace System.Web.UI.WebControls {
this.value = (int) value;
else
this.value = value;
+ valueSet = true;
}
public Unit (double value) : this (value, UnitType.Pixel)
@@ -256,6 +258,7 @@ namespace System.Web.UI.WebControls {
if (haveSep && type == UnitType.Pixel)
throw new FormatException ("Pixel units do not allow floating point values");
+ valueSet = true;
}
public Unit (string value) : this (value, '.')
@@ -320,7 +323,7 @@ namespace System.Web.UI.WebControls {
{
if (obj is Unit){
Unit other = (Unit) obj;
- return (other.type == type && other.value == value);
+ return (other.type == type && other.value == value && valueSet == other.valueSet);
}
return false;
}
@@ -332,12 +335,12 @@ namespace System.Web.UI.WebControls {
public static bool operator == (Unit left, Unit right)
{
- return left.Type == right.Type && left.Value == right.Value;
+ return left.Type == right.Type && left.Value == right.Value && left.valueSet == right.valueSet;
}
public static bool operator != (Unit left, Unit right)
{
- return left.Type != right.Type || left.Value != right.Value;
+ return left.Type != right.Type || left.Value != right.Value || left.valueSet != right.valueSet;
}
public static implicit operator Unit (int n)
diff --git a/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs b/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
index ea67fe6..dd32374 100644
--- a/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
@@ -50,28 +50,28 @@ namespace System.Web.UI
#if NET_2_0
VirtualPath = new VirtualPath ("/" + Path.GetFileName (fname));
#endif
+ LoadConfigDefaults ();
}
#if NET_2_0
- internal ApplicationFileParser (string virtualPath, TextReader reader, HttpContext context)
+ internal ApplicationFileParser (VirtualPath virtualPath, TextReader reader, HttpContext context)
: this (virtualPath, null, reader, context)
{
}
- internal ApplicationFileParser (string virtualPath, string inputFile, TextReader reader, HttpContext context)
+ internal ApplicationFileParser (VirtualPath virtualPath, string inputFile, TextReader reader, HttpContext context)
{
- VirtualPath = new VirtualPath (virtualPath);
+ VirtualPath = virtualPath;
Context = context;
Reader = reader;
- if (String.IsNullOrEmpty (inputFile)) {
- HttpRequest req = context != null ? context.Request : null;
- if (req != null)
- InputFile = req.MapPath (virtualPath);
- } else
+ if (String.IsNullOrEmpty (inputFile))
+ InputFile = virtualPath.PhysicalPath;
+ else
InputFile = inputFile;
SetBaseType (null);
+ LoadConfigDefaults ();
}
#endif
diff --git a/mcs/class/System.Web/System.Web.UI/BaseParser.cs b/mcs/class/System.Web/System.Web.UI/BaseParser.cs
index a1c0448..ecca948 100644
--- a/mcs/class/System.Web/System.Web.UI/BaseParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/BaseParser.cs
@@ -151,10 +151,23 @@ namespace System.Web.UI
}
#if NET_2_0
+ internal TSection GetConfigSection <TSection> (string section) where TSection: global::System.Configuration.ConfigurationSection
+ {
+ VirtualPath vpath = VirtualPath;
+ string vp = vpath != null ? vpath.Absolute : null;
+ if (vp == null)
+ return WebConfigurationManager.GetWebApplicationSection (section) as TSection;
+ else
+ return WebConfigurationManager.GetSection (section, vp) as TSection;
+ }
+
+ internal VirtualPath VirtualPath {
+ get;
+ set;
+ }
+
internal CompilationSection CompilationConfig {
- get {
- return WebConfigurationManager.GetWebApplicationSection ("system.web/compilation") as CompilationSection;
- }
+ get { return GetConfigSection <CompilationSection> ("system.web/compilation"); }
}
#else
diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog
index 0d1a0d2..c099277 100644
--- a/mcs/class/System.Web/System.Web.UI/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI/ChangeLog
@@ -1,3 +1,138 @@
+2009-07-23 Marek Habersack <mhabersack at novell.com>
+
+ * ControlBuilder.cs: added an internal helper property
+ IsNamingContainer.
+
+2009-06-15 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateParser.cs: AddAssembliesInBin (1.1 profile) tries to
+ load every assembly in order to see if it's a valid one. All bad
+ dll image errors are silently ignored. Fixes bug #315816
+
+2009-06-05 Marek Habersack <mhabersack at novell.com>
+
+ * Page.cs: InitializeTheme uses WebConfigurationManager.GetSection
+ to retrieve page theme name. GetWebApplicationSection cannot be
+ used because the system.web/pages section is valid also in
+ subdirectories. Fixes bug #510302
+
+2009-06-01 Marek Habersack <mhabersack at novell.com>
+
+ * ClientScriptManager.cs: WriteHiddenFields doesn't add the id
+ attribute to generated input element in the 1.1 profile. Fixes bug
+ #508167. Patch from Hubert FONGARNAND
+ <informatique.internet at fiducial.fr>, thanks!
+
+2009-05-29 Marek Habersack <mhabersack at novell.com>
+
+ * StateBag.cs: made SetDirty (bool) available on 1.1 as
+ internal. Fixes bug #507836
+
+2009-05-05 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateParser.cs: PageParserFilterType uses
+ HttpApplication.LoadType so that it is able to load the filter
+ from App_Code or with not fully qualified type names.
+
+2009-05-04 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateParser.cs: take RootBuilder from the associated
+ generator.
+ Allow the main page directive to be added twice if the parser
+ needs it. Used by AspGenerator when extracting the inherited type
+ name before actual parsing. Fixes bug #500075
+
+ * FileLevelControlBuilderAttribute.cs,
+ FileLevelPageControlBuilder.cs, FileLevelUserControlBuilder.cs:
+ implemented
+
+ * ControlBuilder.cs: added a new internal property,
+ DataBindingMethod.
+ Implemented ProcessGeneratedCode.
+
+2009-04-30 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateParser.cs: removed the PageParserFilterTypeName
+ property, the filter type name is looked up on demand now.
+
+ * ApplicationFileParser.cs, MasterPageParser.cs,
+ UserControlParser.cs: load config defaults explicitly after
+ initializing the instance.
+
+2009-04-24 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateParser.cs: PageParserFilter.Initialize now takes just
+ one parameter.
+ AddImport ignores null/empty namespaces. Fixes bug #498118
+
+ * PageParserFilter.cs: a few alignments for .NET compatibility in
+ the default behavior.
+
+2009-04-22 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateParser.cs: create the imports ArrayList before
+ attempting to use it. Fixes bug #497174
+
+2009-04-21 Marek Habersack <mhabersack at novell.com>
+
+ * Page.cs: added support for OutputCacheParameters.NoStore to
+ InitOutputCache.
+
+ * SimpleWebHandlerParser.cs: retrieve CompilationSection from the
+ appropriate web.config file.
+
+ * BaseParser.cs: moved the internal property VirtualPath from
+ TemplateParser to here and added an internal method
+ GetConfigSection to retrieve sections from the correct web.config
+ file on 2.0 applications. Fixes bug #494245
+
+ * PageParser.cs: use the new GetConfigSection method to retrieve
+ ClientTargetSection.
+
+ * TemplateParser.cs: moved the VirtualPath property to
+ BaseParser.
+ PagesConfig now uses the new GetConfigSection method. Fixes bug
+ #494245
+ Added support for the SqlDependency, NoStore and CacheProfile
+ attributes of the OutputCache directive. Fixes bug #496951
+
+2009-04-15 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateParser.cs: use generic lists for import, namespace and
+ interface caches. If a namespace is added (e.g. by parsing the
+ Import directive), find the assembly in which namespace is
+ defined.
+
+2009-04-07 Marek Habersack <mhabersack at novell.com>
+
+ * Control.cs: ApplyTheme - make sure Page is not null before using
+ it. Fixes bug #492666
+
+2009-03-31 Marek Habersack <mhabersack at novell.com>
+
+ * Page.cs: SavePageViewState saves the list of controls which
+ require post back regardless of whether view state is disabled or
+ not. Fixes bug #490753
+
+ * ApplicationFileParser.cs, MasterPageParser.cs, PageParser.cs,
+ PageThemeFileParser.cs, PageThemeParser.cs, UserControlParser.cs,
+ WebHandlerParser.cs, WebServiceParser.cs: 2.0 constructors take a
+ VirtualPath instance for the virtualPath parameter, instead of a
+ string.
+
+2009-03-18 Marek Habersack <mhabersack at novell.com>
+
+ * Control.cs: AppRelativeResourceDirectory no longer returns a
+ hard-coded "~/" when template control's virtual path cannot be
+ determined. It returns application relative version of
+ TemplateSourceDirectory instead.
+
+2009-03-13 Marek Habersack <mhabersack at novell.com>
+
+ * Control.cs: clear the controls cache on control removal. This
+ ensures that a subsequent FindControl call won't return the
+ removed control.
+
2009-03-06 Marek Habersack <mhabersack at novell.com>
* XPathBinder.cs: use the pased namespace manager
diff --git a/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs b/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
index 9156712..1f24124 100644
--- a/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
+++ b/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
@@ -658,7 +658,11 @@ namespace System.Web.UI
#endif
foreach (string key in hiddenFields.Keys) {
string value = hiddenFields [key] as string;
+#if NET_2_0
writer.WriteLine ("<input type=\"hidden\" name=\"{0}\" id=\"{0}\" value=\"{1}\" />", key, HttpUtility.HtmlAttributeEncode (value));
+#else
+ writer.WriteLine ("<input type=\"hidden\" name=\"{0}\" value=\"{1}\" />", key, HttpUtility.HtmlAttributeEncode (value));
+#endif
}
#if NET_2_0
writer.RenderEndTag (); // DIV
diff --git a/mcs/class/System.Web/System.Web.UI/CollectionBuilder.cs b/mcs/class/System.Web/System.Web.UI/CollectionBuilder.cs
index 8582e3a..00076d5 100644
--- a/mcs/class/System.Web/System.Web.UI/CollectionBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/CollectionBuilder.cs
@@ -44,7 +44,7 @@ namespace System.Web.UI
public override void AppendLiteralString (string s)
{
- if (s != null && s.Trim () != "")
+ if (s != null && s.Trim ().Length > 0)
throw new HttpException ("Literal content not allowed for " + ControlType);
}
diff --git a/mcs/class/System.Web/System.Web.UI/Control.cs b/mcs/class/System.Web/System.Web.UI/Control.cs
index 68a6597..ae13fb9 100644
--- a/mcs/class/System.Web/System.Web.UI/Control.cs
+++ b/mcs/class/System.Web/System.Web.UI/Control.cs
@@ -178,13 +178,14 @@ namespace System.Web.UI
return _appRelativeTemplateSourceDirectory;
string tempSrcDir = null;
-
TemplateControl templateControl = TemplateControl;
- if (templateControl != null)
- if (!string.IsNullOrEmpty (templateControl.AppRelativeVirtualPath))
- tempSrcDir = VirtualPathUtility.GetDirectory (templateControl.AppRelativeVirtualPath, false);
-
- _appRelativeTemplateSourceDirectory = (tempSrcDir != null) ? tempSrcDir : "~/";
+ if (templateControl != null) {
+ string templateVirtualPath = templateControl.AppRelativeVirtualPath;
+ if (!String.IsNullOrEmpty (templateVirtualPath))
+ tempSrcDir = VirtualPathUtility.GetDirectory (templateVirtualPath, false);
+ }
+
+ _appRelativeTemplateSourceDirectory = (tempSrcDir != null) ? tempSrcDir : VirtualPathUtility.ToAppRelative (TemplateSourceDirectory);
return _appRelativeTemplateSourceDirectory;
}
[EditorBrowsable (EditorBrowsableState.Never)]
@@ -692,6 +693,9 @@ namespace System.Web.UI
[EditorBrowsable (EditorBrowsableState.Advanced)]
public virtual void ApplyStyleSheetSkin (Page page)
{
+ if (page == null)
+ return;
+
if (!EnableTheming) /* this enough? */
return;
@@ -1341,14 +1345,15 @@ namespace System.Web.UI
#else
string ts = TemplateSourceDirectory;
#endif
- if (ts == null || ts.Length == 0 ||
- Context == null || Context.Response == null ||
- relativeUrl.IndexOf (':') >= 0)
- return relativeUrl;
- HttpResponse resp = Context.Response;
+ HttpContext ctx = Context;
+ HttpResponse resp = ctx != null ? ctx.Response : null;
+ if (ts == null || ts.Length == 0 || resp == null || relativeUrl.IndexOf (':') >= 0)
+ return relativeUrl;
+
if (!VirtualPathUtility.IsAppRelative (relativeUrl))
relativeUrl = VirtualPathUtility.Combine (VirtualPathUtility.AppendTrailingSlash (ts), relativeUrl);
+
return resp.ApplyAppPathModifier (relativeUrl);
}
@@ -1722,8 +1727,9 @@ namespace System.Web.UI
trace.Write ("control", String.Concat ("ApplyThemeRecursive ", _userId, " ", type_name));
}
#endif
- if (Page.PageTheme != null && EnableTheming) {
- ControlSkin controlSkin = Page.PageTheme.GetControlSkin (GetType (), SkinID);
+ Page page = Page;
+ if (page != null && page.PageTheme != null && EnableTheming) {
+ ControlSkin controlSkin = page.PageTheme.GetControlSkin (GetType (), SkinID);
if (controlSkin != null)
controlSkin.ApplySkin (this);
}
@@ -1757,6 +1763,7 @@ namespace System.Web.UI
}
control.NullifyUniqueID ();
control.SetMask (REMOVED, true);
+ ResetControlsCache ();
}
#if NET_2_0
diff --git a/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs
index 1486aca..16aac32 100644
--- a/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/ControlBuilder.cs
@@ -142,6 +142,13 @@ namespace System.Web.UI {
set { method = value; }
}
+#if NET_2_0
+ internal CodeMemberMethod DataBindingMethod {
+ get;
+ set;
+ }
+#endif
+
internal CodeStatementCollection MethodStatements {
get { return methodStatements; }
set { methodStatements = value; }
@@ -218,6 +225,15 @@ namespace System.Web.UI {
}
}
+ internal bool IsNamingContainer {
+ get {
+ if (type == null)
+ return false;
+
+ return typeof (INamingContainer).IsAssignableFrom (type);
+ }
+ }
+
ControlBuilder MyNamingContainer {
get {
if (myNamingContainer == null) {
@@ -317,7 +333,7 @@ namespace System.Web.UI {
internal RootBuilder Root {
get {
- if (GetType () == typeof (RootBuilder))
+ if (typeof (RootBuilder).IsAssignableFrom (GetType ()))
return (RootBuilder) this;
return (RootBuilder) parentBuilder.Root;
@@ -754,14 +770,13 @@ namespace System.Web.UI {
return CreateInstance ();
}
- [MonoTODO]
public virtual void ProcessGeneratedCode(CodeCompileUnit codeCompileUnit,
- CodeTypeDeclaration baseType,
- CodeTypeDeclaration derivedType,
- CodeMemberMethod buildMethod,
- CodeMemberMethod dataBindingMethod)
+ CodeTypeDeclaration baseType,
+ CodeTypeDeclaration derivedType,
+ CodeMemberMethod buildMethod,
+ CodeMemberMethod dataBindingMethod)
{
- throw new NotImplementedException ();
+ // nothing to do
}
internal void ResetState()
diff --git a/mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute.cs b/mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute.cs
index 1310314..948a29e 100644
--- a/mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute.cs
@@ -1,62 +1,85 @@
-//
-// System.Web.UI.FileLevelControlBuilderAttribute.cs
-//
-// Authors:
-// Arina Itkes (arinai at mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.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.
-//
-
-#if NET_2_0
-namespace System.Web.UI
-{
- [AttributeUsageAttribute (AttributeTargets.Class)]
- public sealed class FileLevelControlBuilderAttribute : Attribute
- {
- public FileLevelControlBuilderAttribute (Type builderType)
- {}
-
- public static readonly FileLevelControlBuilderAttribute Default;
-
- public Type BuilderType { get { throw new NotImplementedException (); } }
-
- public override bool Equals (Object obj)
- {
- throw new NotImplementedException ();
- }
- public static bool Equals (Object objA, Object objB)
- {
- throw new NotImplementedException ();
- }
- public override int GetHashCode ()
- {
- throw new NotImplementedException ();
- }
- public override bool IsDefaultAttribute ()
- {
- throw new NotImplementedException ();
- }
- }
-}
-#endif
+//
+// System.Web.UI.FileLevelControlBuilderAttribute.cs
+//
+// Authors:
+// Arina Itkes (arinai at mainsoft.com)
+// Marek Habersack (mhabersack at novell.com)
+//
+// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
+// (C) 2009 Novell, Inc (http://novell.com/)
+//
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+namespace System.Web.UI
+{
+ [AttributeUsageAttribute (AttributeTargets.Class)]
+ public sealed class FileLevelControlBuilderAttribute : Attribute
+ {
+ public static readonly FileLevelControlBuilderAttribute Default = new FileLevelControlBuilderAttribute (null);
+
+ public FileLevelControlBuilderAttribute (Type builderType)
+ {
+ this.BuilderType = builderType;
+ }
+
+ public Type BuilderType {
+ get;
+ private set;
+ }
+
+ public override bool Equals (Object obj)
+ {
+ var attr = obj as FileLevelControlBuilderAttribute;
+ return ((attr != null) && this.BuilderType == attr.BuilderType);
+ }
+
+ public new static bool Equals (Object objA, Object objB)
+ {
+ var attrA = objA as FileLevelControlBuilderAttribute;
+ if (attrA == null)
+ return false;
+
+ var attrB = objB as FileLevelControlBuilderAttribute;
+ if (attrB == null)
+ return false;
+
+ return (attrA.BuilderType == attrB.BuilderType);
+ }
+
+ public override int GetHashCode ()
+ {
+ Type type = BuilderType;
+ if (type == null)
+ return base.GetHashCode ();
+
+ return type.GetHashCode ();
+ }
+
+ public override bool IsDefaultAttribute ()
+ {
+ return Equals (Default);
+ }
+ }
+}
+#endif
diff --git a/mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.cs
index 57bde99..92f9cec 100644
--- a/mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.cs
@@ -1,10 +1,12 @@
//
-// System.Web.UI.FileLevelControlBuilderAttribute.cs
+// System.Web.UI.FileLevelControlBuilder.cs
//
// Authors:
// Arina Itkes (arinai at mainsoft.com)
+// Marek Habersack <mhabersack at novell.com>
//
// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
+// (C) 2009 Novell, Inc (http://novell.com/)
//
//
//
@@ -30,22 +32,50 @@
#if NET_2_0
using System.Web.UI;
+using System.Web.UI.WebControls;
namespace System.Web.UI
{
public class FileLevelPageControlBuilder : RootBuilder
{
+ bool hasContentControls;
+ bool hasLiteralControls;
+ bool hasOtherControls;
+
public FileLevelPageControlBuilder ()
{
- throw new NotImplementedException ();
}
+
public override void AppendLiteralString (string text)
{
- throw new NotImplementedException ();
+ bool emptyText = text != null ? text.Trim ().Length == 0 : true;
+ if (hasContentControls && !emptyText)
+ throw new HttpException ("Literal strings cannot be appended to Content pages.");
+
+ if (!emptyText)
+ hasLiteralControls = true;
+
+ base.AppendLiteralString (text);
}
+
public override void AppendSubBuilder (ControlBuilder subBuilder)
{
- throw new NotImplementedException ();
+ if (subBuilder == null) {
+ base.AppendSubBuilder (subBuilder);
+ return;
+ }
+
+ if (typeof (ContentBuilderInternal).IsAssignableFrom (subBuilder.GetType ())) {
+ if (hasOtherControls)
+ throw new HttpException ("Only Content controls are supported on content pages.");
+
+ hasContentControls = true;
+ if (hasLiteralControls)
+ throw new HttpParseException ("Only Content controls are supported on content pages.");
+ } else
+ hasOtherControls = true;
+
+ base.AppendSubBuilder (subBuilder);
}
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.cs b/mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.cs
index e0e424d..9a0f94f 100644
--- a/mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.cs
@@ -37,7 +37,6 @@ namespace System.Web.UI
{
public FileLevelUserControlBuilder ()
{
- throw new NotImplementedException ();
}
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/MasterPageParser.cs b/mcs/class/System.Web/System.Web.UI/MasterPageParser.cs
index 9098bd4..2ded2b8 100644
--- a/mcs/class/System.Web/System.Web.UI/MasterPageParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/MasterPageParser.cs
@@ -49,25 +49,27 @@ namespace System.Web.UI
List <string> contentPlaceHolderIds;
string cacheEntryName;
- internal MasterPageParser (string virtualPath, string inputFile, HttpContext context)
+ internal MasterPageParser (VirtualPath virtualPath, string inputFile, HttpContext context)
: base (virtualPath, inputFile, context, "System.Web.UI.MasterPage")
{
this.cacheEntryName = String.Concat ("@@MasterPagePHIDS:", virtualPath, ":", inputFile);
contentPlaceHolderIds = HttpRuntime.InternalCache.Get (this.cacheEntryName) as List <string>;
+ LoadConfigDefaults ();
}
- internal MasterPageParser (string virtualPath, TextReader reader, HttpContext context)
+ internal MasterPageParser (VirtualPath virtualPath, TextReader reader, HttpContext context)
: this (virtualPath, null, reader, context)
{
}
- internal MasterPageParser (string virtualPath, string inputFile, TextReader reader, HttpContext context)
+ internal MasterPageParser (VirtualPath virtualPath, string inputFile, TextReader reader, HttpContext context)
: base (virtualPath, inputFile, reader, context)
{
this.cacheEntryName = String.Concat ("@@MasterPagePHIDS:", virtualPath, ":", InputFile);
contentPlaceHolderIds = HttpRuntime.InternalCache.Get (this.cacheEntryName) as List <string>;
+ LoadConfigDefaults ();
}
public static MasterPage GetCompiledMasterInstance (string virtualPath, string inputFile, HttpContext context)
diff --git a/mcs/class/System.Web/System.Web.UI/Page.cs b/mcs/class/System.Web/System.Web.UI/Page.cs
index 4fce426..5289cc3 100644
--- a/mcs/class/System.Web/System.Web.UI/Page.cs
+++ b/mcs/class/System.Web/System.Web.UI/Page.cs
@@ -636,7 +636,7 @@ public partial class Page : TemplateControl, IHttpHandler
void InitializeTheme ()
{
if (_theme == null) {
- PagesSection ps = WebConfigurationManager.GetWebApplicationSection ("system.web/pages") as PagesSection;
+ PagesSection ps = WebConfigurationManager.GetSection ("system.web/pages") as PagesSection;
if (ps != null)
_theme = ps.Theme;
}
@@ -963,16 +963,22 @@ public partial class Page : TemplateControl, IHttpHandler
}
#if NET_2_0
- [MonoTODO("The following properties of OutputCacheParameters are silently ignored: CacheProfile, NoStore, SqlDependency")]
+ [MonoTODO("The following properties of OutputCacheParameters are silently ignored: CacheProfile, SqlDependency")]
protected internal virtual void InitOutputCache(OutputCacheParameters cacheSettings)
{
- if (cacheSettings.Enabled)
+ if (cacheSettings.Enabled) {
InitOutputCache(cacheSettings.Duration,
cacheSettings.VaryByContentEncoding,
cacheSettings.VaryByHeader,
cacheSettings.VaryByCustom,
cacheSettings.Location,
cacheSettings.VaryByParam);
+
+ HttpResponse response = Response;
+ HttpCachePolicy cache = response != null ? response.Cache : null;
+ if (cache != null && cacheSettings.NoStore)
+ cache.SetNoStore ();
+ }
}
#endif
@@ -1934,14 +1940,14 @@ public partial class Page : TemplateControl, IHttpHandler
#endif
Pair vsr = null;
-
- if (EnableViewState) {
- object viewState = SaveViewStateRecursive ();
- object reqPostback = (_requiresPostBack != null && _requiresPostBack.Count > 0) ? _requiresPostBack : null;
-
- if (viewState != null || reqPostback != null)
- vsr = new Pair (viewState, reqPostback);
- }
+ object viewState = null;
+
+ if (EnableViewState)
+ viewState = SaveViewStateRecursive ();
+
+ object reqPostback = (_requiresPostBack != null && _requiresPostBack.Count > 0) ? _requiresPostBack : null;
+ if (viewState != null || reqPostback != null)
+ vsr = new Pair (viewState, reqPostback);
Pair pair = new Pair ();
pair.First = vsr;
diff --git a/mcs/class/System.Web/System.Web.UI/PageParser.cs b/mcs/class/System.Web/System.Web.UI/PageParser.cs
index f5869b3..23467df 100644
--- a/mcs/class/System.Web/System.Web.UI/PageParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageParser.cs
@@ -97,22 +97,20 @@ namespace System.Web.UI
}
#if NET_2_0
- internal PageParser (string virtualPath, TextReader reader, HttpContext context)
+ internal PageParser (VirtualPath virtualPath, TextReader reader, HttpContext context)
: this (virtualPath, null, reader, context)
{
}
- internal PageParser (string virtualPath, string inputFile, TextReader reader, HttpContext context)
+ internal PageParser (VirtualPath virtualPath, string inputFile, TextReader reader, HttpContext context)
{
- this.VirtualPath = new VirtualPath (virtualPath);
+ this.VirtualPath = virtualPath;
Context = context;
- BaseVirtualDir = VirtualPathUtility.GetDirectory (virtualPath, false);
+ BaseVirtualDir = virtualPath.DirectoryNoNormalize;
Reader = reader;
- if (String.IsNullOrEmpty (inputFile)) {
- HttpRequest req = context != null ? context.Request : null;
- if (req != null)
- InputFile = req.MapPath (virtualPath);
- } else
+ if (String.IsNullOrEmpty (inputFile))
+ InputFile = virtualPath.PhysicalPath;
+ else
InputFile = inputFile;
SetBaseType (null);
AddApplicationAssembly ();
@@ -318,7 +316,7 @@ namespace System.Web.UI
if (clientTarget != null) {
clientTarget = clientTarget.Trim ();
#if NET_2_0
- ClientTargetSection sec = (ClientTargetSection)WebConfigurationManager.GetWebApplicationSection ("system.web/clientTarget");
+ ClientTargetSection sec = GetConfigSection <ClientTargetSection> ("system.web/clientTarget");
ClientTarget ct = null;
if ((ct = sec.ClientTargets [clientTarget]) == null)
@@ -389,11 +387,11 @@ namespace System.Web.UI
#if NET_2_0
internal override void AddDirective (string directive, Hashtable atts)
- {
+ {
bool isMasterType = String.Compare ("MasterType", directive, StringComparison.OrdinalIgnoreCase) == 0;
bool isPreviousPageType = isMasterType ? false : String.Compare ("PreviousPageType", directive,
StringComparison.OrdinalIgnoreCase) == 0;
-
+
string typeName = null;
string virtualPath = null;
Type type = null;
diff --git a/mcs/class/System.Web/System.Web.UI/PageParserFilter.cs b/mcs/class/System.Web/System.Web.UI/PageParserFilter.cs
index 419bd7c..01bf9f9 100644
--- a/mcs/class/System.Web/System.Web.UI/PageParserFilter.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageParserFilter.cs
@@ -47,7 +47,7 @@ namespace System.Web.UI
[MonoTODO ("Need to implement support for this in the parser")]
protected int Line {
- get { return 0; }
+ get { return parser.Location.BeginLine; }
}
public virtual int NumberOfControlsAllowed {
@@ -63,8 +63,7 @@ namespace System.Web.UI
}
protected string VirtualPath {
- get;
- private set;
+ get { return parser.VirtualPath.Absolute; }
}
protected void AddControl (Type type, IDictionary attributes)
@@ -113,13 +112,9 @@ namespace System.Web.UI
{
}
- internal void Initialize (VirtualPath virtualPath, TemplateParser parser)
+ internal void Initialize (TemplateParser parser)
{
- if (virtualPath == null)
- throw new ArgumentNullException ("virtualPath");
-
this.parser = parser;
- VirtualPath = virtualPath.Absolute;
Initialize ();
}
diff --git a/mcs/class/System.Web/System.Web.UI/PageThemeFileParser.cs b/mcs/class/System.Web/System.Web.UI/PageThemeFileParser.cs
index 567dc8d..77a6b95 100644
--- a/mcs/class/System.Web/System.Web.UI/PageThemeFileParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageThemeFileParser.cs
@@ -41,7 +41,7 @@ namespace System.Web.UI
{
internal sealed class PageThemeFileParser: UserControlParser
{
- internal PageThemeFileParser (string virtualPath, string inputFile, HttpContext context)
+ internal PageThemeFileParser (VirtualPath virtualPath, string inputFile, HttpContext context)
: base (virtualPath, inputFile, context, "System.Web.UI.PageTheme")
{
}
diff --git a/mcs/class/System.Web/System.Web.UI/PageThemeParser.cs b/mcs/class/System.Web/System.Web.UI/PageThemeParser.cs
index 5462a93..13a087e 100644
--- a/mcs/class/System.Web/System.Web.UI/PageThemeParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageThemeParser.cs
@@ -48,10 +48,10 @@ namespace System.Web.UI
set { linkedStyleSheets = value; }
}
- internal PageThemeParser (string virtualPath, HttpContext context)
- : base (virtualPath, Path.GetDirectoryName(virtualPath), context, "System.Web.UI.PageTheme")
+ internal PageThemeParser (VirtualPath virtualPath, HttpContext context)
+ : base (virtualPath, virtualPath.PhysicalPath, context, "System.Web.UI.PageTheme")
{
- AddDependency (virtualPath);
+ AddDependency (virtualPath.Original);
}
internal override void HandleOptions (object obj)
diff --git a/mcs/class/System.Web/System.Web.UI/RootBuilder.cs b/mcs/class/System.Web/System.Web.UI/RootBuilder.cs
index 15a87ea..444eb42 100644
--- a/mcs/class/System.Web/System.Web.UI/RootBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/RootBuilder.cs
@@ -43,6 +43,8 @@ namespace System.Web.UI {
public RootBuilder ()
{
+ foundry = new AspComponentFoundry ();
+ Line = 1;
}
#else
public sealed class RootBuilder : TemplateBuilder {
diff --git a/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs b/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
index bb57e4d..7d8e4ff 100644
--- a/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
@@ -575,7 +575,11 @@ namespace System.Web.UI
#if NET_2_0
CompilationSection CompilationConfig {
get {
- return (CompilationSection)WebConfigurationManager.GetWebApplicationSection ("system.web/compilation");
+ string vp = VirtualPath;
+ if (String.IsNullOrEmpty (vp))
+ return WebConfigurationManager.GetWebApplicationSection ("system.web/compilation") as CompilationSection;
+ else
+ return WebConfigurationManager.GetSection ("system.web/compilation", vp) as CompilationSection;
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/StateBag.cs b/mcs/class/System.Web/System.Web.UI/StateBag.cs
index 946a07c..725bdfa 100644
--- a/mcs/class/System.Web/System.Web.UI/StateBag.cs
+++ b/mcs/class/System.Web/System.Web.UI/StateBag.cs
@@ -271,13 +271,16 @@ namespace System.Web.UI {
}
#if NET_2_0
- public void SetDirty (bool dirty)
+ public
+#else
+ internal
+#endif
+ void SetDirty (bool dirty)
{
foreach (DictionaryEntry de in ht) {
StateItem si = (StateItem) de.Value;
si.IsDirty = dirty;
}
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateBuilder.cs b/mcs/class/System.Web/System.Web.UI/TemplateBuilder.cs
index dcc784c..6709cf4 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateBuilder.cs
@@ -109,6 +109,8 @@ namespace System.Web.UI {
IDictionary attribs)
{
// enough?
+ if (parser != null)
+ FileName = parser.InputFile;
base.Init (parser, parentBuilder, type, tagName, ID, attribs);
}
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateParser.cs b/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
index 409d8ac..1b8d4ed 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
@@ -65,15 +65,38 @@ namespace System.Web.UI {
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class TemplateParser : BaseParser
{
+#if NET_2_0
+ [Flags]
+ internal enum OutputCacheParsedParams
+ {
+ Location = 0x0001,
+ CacheProfile = 0x0002,
+ NoStore = 0x0004,
+ SqlDependency = 0x0008,
+ VaryByCustom = 0x0010,
+ VaryByHeader = 0x0020,
+ VaryByControl = 0x0040,
+ VaryByContentEncodings = 0x0080
+ }
+#endif
+
string inputFile;
string text;
Hashtable mainAttributes;
ArrayList dependencies;
ArrayList assemblies;
Hashtable anames;
+#if NET_2_0
+ string[] binDirAssemblies;
+ Dictionary <string, bool> namespacesCache;
+ List <string> imports;
+ List <string> interfaces;
+ List <ServerSideScript> scripts;
+#else
ArrayList imports;
ArrayList interfaces;
ArrayList scripts;
+#endif
Type baseType;
bool baseTypeIsGlobal = true;
string className;
@@ -89,12 +112,18 @@ namespace System.Web.UI {
int oc_duration;
string oc_header, oc_custom, oc_param, oc_controls;
#if NET_2_0
- string oc_content_encodings;
+ string oc_content_encodings, oc_cacheprofile, oc_sqldependency;
+ bool oc_nostore;
+ OutputCacheParsedParams oc_parsed_params = 0;
#endif
bool oc_shared;
OutputCacheLocation oc_location;
CultureInfo invariantCulture = CultureInfo.InvariantCulture;
#if NET_2_0
+ // Kludge needed to support pre-parsing of the main directive (see
+ // AspNetGenerator.GetRootBuilderType)
+ internal int allowedMainDirectives = 0;
+
byte[] md5checksum;
string src;
bool srcIsLegacy;
@@ -102,7 +131,6 @@ namespace System.Web.UI {
string codeFileBaseClass;
string metaResourceKey;
Type codeFileBaseClassType;
- string pageParserFilterTypeName;
Type pageParserFilterType;
PageParserFilter pageParserFilter;
@@ -120,11 +148,11 @@ namespace System.Web.UI {
internal TemplateParser ()
{
LoadConfigDefaults ();
-
- imports = new ArrayList ();
#if NET_2_0
+ imports = new List <string> ();
AddNamespaces (imports);
#else
+ imports = new ArrayList ();
imports.Add ("System");
imports.Add ("System.Collections");
imports.Add ("System.Collections.Specialized");
@@ -143,16 +171,10 @@ namespace System.Web.UI {
assemblies = new ArrayList ();
#if NET_2_0
CompilationSection compConfig = CompilationConfig;
-
- bool addAssembliesInBin = false;
foreach (AssemblyInfo info in compConfig.Assemblies) {
- if (info.Assembly == "*")
- addAssembliesInBin = true;
- else
+ if (info.Assembly != "*")
AddAssemblyByName (info.Assembly);
}
- if (addAssembliesInBin)
- AddAssembliesInBin ();
foreach (NamespaceInfo info in PagesConfig.Namespaces) {
imports.Add (info.Namespace);
@@ -173,9 +195,6 @@ namespace System.Web.UI {
internal virtual void LoadConfigDefaults ()
{
debug = CompilationConfig.Debug;
-#if NET_2_0
- pageParserFilterTypeName = PagesConfig.PageParserFilterType;
-#endif
}
internal void AddApplicationAssembly ()
@@ -200,12 +219,12 @@ namespace System.Web.UI {
generator.AddControl (type, attributes);
}
- void AddNamespaces (ArrayList imports)
+ void AddNamespaces (List <string> imports)
{
if (BuildManager.HaveResources)
imports.Add ("System.Resources");
- PagesSection pages = WebConfigurationManager.GetWebApplicationSection ("system.web/pages") as PagesSection;
+ PagesSection pages = PagesConfig;
if (pages == null)
return;
@@ -301,18 +320,33 @@ namespace System.Web.UI {
{
#if NET_2_0
var pageParserFilter = PageParserFilter;
- if (pageParserFilter != null)
- pageParserFilter.PreprocessDirective (directive.ToLower (CultureInfo.InvariantCulture), atts);
#endif
if (String.Compare (directive, DefaultDirectiveName, true) == 0) {
- if (mainAttributes != null)
+#if NET_2_0
+ bool allowMainDirective = allowedMainDirectives > 0;
+#else
+ bool allowMainDirective = false;
+#endif
+ if (mainAttributes != null && !allowMainDirective)
ThrowParseException ("Only 1 " + DefaultDirectiveName + " is allowed");
-
+#if NET_2_0
+ allowedMainDirectives--;
+ if (mainAttributes != null)
+ return;
+
+ if (pageParserFilter != null)
+ pageParserFilter.PreprocessDirective (directive.ToLower (CultureInfo.InvariantCulture), atts);
+#endif
+
mainAttributes = atts;
ProcessMainAttributes (mainAttributes);
return;
}
-
+#if NET_2_0
+ else if (pageParserFilter != null)
+ pageParserFilter.PreprocessDirective (directive.ToLower (CultureInfo.InvariantCulture), atts);
+#endif
+
int cmp = String.Compare ("Assembly", directive, true);
if (cmp == 0) {
string name = GetString (atts, "Name", null);
@@ -342,8 +376,7 @@ namespace System.Web.UI {
if (atts.Count > 0)
ThrowParseException ("Attribute " + GetOneKey (atts) + " unknown.");
- if (namesp != null && namesp != "")
- AddImport (namesp);
+ AddImport (namesp);
return;
}
@@ -390,8 +423,28 @@ namespace System.Web.UI {
"to a positive integer value");
break;
#if NET_2_0
+ case "sqldependency":
+ oc_sqldependency = (string) entry.Value;
+ break;
+
+ case "nostore":
+ try {
+ oc_nostore = Boolean.Parse ((string) entry.Value);
+ oc_parsed_params |= OutputCacheParsedParams.NoStore;
+ } catch {
+ ThrowParseException ("The 'NoStore' attribute is case sensitive" +
+ " and must be set to 'true' or 'false'.");
+ }
+ break;
+
+ case "cacheprofile":
+ oc_cacheprofile = (string) entry.Value;
+ oc_parsed_params |= OutputCacheParsedParams.CacheProfile;
+ break;
+
case "varybycontentencodings":
oc_content_encodings = (string) entry.Value;
+ oc_parsed_params |= OutputCacheParsedParams.VaryByContentEncodings;
break;
#endif
case "varybyparam":
@@ -401,9 +454,15 @@ namespace System.Web.UI {
break;
case "varybyheader":
oc_header = (string) entry.Value;
+#if NET_2_0
+ oc_parsed_params |= OutputCacheParsedParams.VaryByHeader;
+#endif
break;
case "varybycustom":
oc_custom = (string) entry.Value;
+#if NET_2_0
+ oc_parsed_params |= OutputCacheParsedParams.VaryByCustom;
+#endif
break;
case "location":
if (!(this is PageParser))
@@ -412,6 +471,9 @@ namespace System.Web.UI {
try {
oc_location = (OutputCacheLocation) Enum.Parse (
typeof (OutputCacheLocation), (string) entry.Value, true);
+#if NET_2_0
+ oc_parsed_params |= OutputCacheParsedParams.Location;
+#endif
} catch {
ThrowParseException ("The 'location' attribute is case sensitive and " +
"must be one of the following values: Any, Client, " +
@@ -424,6 +486,9 @@ namespace System.Web.UI {
goto default;
#endif
oc_controls = (string) entry.Value;
+#if NET_2_0
+ oc_parsed_params |= OutputCacheParsedParams.VaryByControl;
+#endif
break;
case "shared":
if (this is PageParser)
@@ -471,14 +536,26 @@ namespace System.Web.UI {
void AddAssembliesInBin ()
{
- foreach (string s in HttpApplication.BinDirectoryAssemblies)
- assemblies.Add (s);
+ Assembly asm;
+ foreach (string s in HttpApplication.BinDirectoryAssemblies) {
+ try {
+ asm = Assembly.LoadFrom (s);
+ assemblies.Add (asm.Location);
+ } catch (BadImageFormatException) {
+ // ignore silently
+ }
+ }
}
internal virtual void AddInterface (string iface)
{
- if (interfaces == null)
+ if (interfaces == null) {
+#if NET_2_0
+ interfaces = new List <string> ();
+#else
interfaces = new ArrayList ();
+#endif
+ }
if (!interfaces.Contains (iface))
interfaces.Add (iface);
@@ -486,13 +563,73 @@ namespace System.Web.UI {
internal virtual void AddImport (string namesp)
{
- if (imports == null)
+ if (namesp == null || namesp.Length == 0)
+ return;
+
+ if (imports == null) {
+#if NET_2_0
+ imports = new List <string> ();
+#else
imports = new ArrayList ();
+#endif
+ }
+
+ if (imports.Contains (namesp))
+ return;
+
+ imports.Add (namesp);
+#if NET_2_0
+ AddAssemblyForNamespace (namesp);
+#endif
+ }
+
+#if NET_2_0
+ void AddAssemblyForNamespace (string namesp)
+ {
+ if (binDirAssemblies == null)
+ binDirAssemblies = HttpApplication.BinDirectoryAssemblies;
+ if (binDirAssemblies.Length == 0)
+ return;
- if (!imports.Contains (namesp))
- imports.Add (namesp);
+ if (namespacesCache == null)
+ namespacesCache = new Dictionary <string, bool> ();
+ else if (namespacesCache.ContainsKey (namesp))
+ return;
+
+ foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies ())
+ if (FindNamespaceInAssembly (asm, namesp))
+ return;
+
+ IList tla = BuildManager.TopLevelAssemblies;
+ if (tla != null && tla.Count > 0) {
+ foreach (Assembly asm in tla) {
+ if (FindNamespaceInAssembly (asm, namesp))
+ return;
+ }
+ }
+
+ Assembly a;
+ foreach (string s in binDirAssemblies) {
+ a = Assembly.LoadFrom (s);
+ if (FindNamespaceInAssembly (a, namesp))
+ return;
+ }
}
+ bool FindNamespaceInAssembly (Assembly asm, string namesp)
+ {
+ foreach (Type type in asm.GetTypes ()) {
+ if (String.Compare (type.Namespace, namesp, StringComparison.Ordinal) == 0) {
+ namespacesCache.Add (namesp, true);
+ AddAssembly (asm, true);
+ return true;
+ }
+ }
+
+ return false;
+ }
+#endif
+
internal virtual void AddSourceDependency (string filename)
{
if (dependencies != null && dependencies.Contains (filename))
@@ -617,7 +754,7 @@ namespace System.Web.UI {
explicitOn = GetBool (atts, "Explicit", compConfig.Explicit);
if (atts.ContainsKey ("LinePragmas"))
linePragmasOn = GetBool (atts, "LinePragmas", true);
-
+
string inherits = GetString (atts, "Inherits", null);
#if NET_2_0
string srcRealPath = null;
@@ -935,30 +1072,32 @@ namespace System.Web.UI {
set { md5checksum = value; }
}
- internal string PageParserFilterTypeName {
- get { return pageParserFilterTypeName; }
- }
-
internal PageParserFilter PageParserFilter {
get {
if (pageParserFilter != null)
return pageParserFilter;
-
- if (String.IsNullOrEmpty (pageParserFilterTypeName))
- return null;
- pageParserFilter = Activator.CreateInstance (PageParserFilterType) as PageParserFilter;
- pageParserFilter.Initialize (VirtualPath, this);
+ Type t = PageParserFilterType;
+ if (t == null)
+ return null;
+ pageParserFilter = Activator.CreateInstance (t) as PageParserFilter;
+ pageParserFilter.Initialize (this);
+
return pageParserFilter;
}
}
internal Type PageParserFilterType {
get {
- if (pageParserFilterType == null)
- pageParserFilterType = Type.GetType (PageParserFilterTypeName, true);
-
+ if (pageParserFilterType == null) {
+ string typeName = PagesConfig.PageParserFilterType;
+ if (String.IsNullOrEmpty (typeName))
+ return null;
+
+ pageParserFilterType = HttpApplication.LoadType (typeName, true);
+ }
+
return pageParserFilterType;
}
}
@@ -975,14 +1114,7 @@ namespace System.Web.UI {
internal ILocation DirectiveLocation {
get { return directiveLocation; }
}
-
-#if NET_2_0
- internal VirtualPath VirtualPath {
- get;
- set;
- }
-#endif
-
+
internal string ParserDir {
get {
if (includeDirs == null || includeDirs.Count == 0)
@@ -1152,6 +1284,24 @@ namespace System.Web.UI {
}
}
+#if NET_2_0
+ internal List <ServerSideScript> Scripts {
+ get {
+ if (scripts == null)
+ scripts = new List <ServerSideScript> ();
+
+ return scripts;
+ }
+ }
+
+ internal List <string> Imports {
+ get { return imports; }
+ }
+
+ internal List <string> Interfaces {
+ get { return interfaces; }
+ }
+#else
internal ArrayList Scripts {
get {
if (scripts == null)
@@ -1165,6 +1315,11 @@ namespace System.Web.UI {
get { return imports; }
}
+ internal ArrayList Interfaces {
+ get { return interfaces; }
+ }
+#endif
+
internal ArrayList Assemblies {
get {
if (appAssemblyIndex != -1) {
@@ -1178,12 +1333,17 @@ namespace System.Web.UI {
}
}
- internal ArrayList Interfaces {
- get { return interfaces; }
- }
-
internal RootBuilder RootBuilder {
- get { return rootBuilder; }
+ get {
+#if NET_2_0
+ if (rootBuilder != null)
+ return rootBuilder;
+ AspGenerator generator = AspGenerator;
+ if (generator != null)
+ rootBuilder = generator.RootBuilder;
+#endif
+ return rootBuilder;
+ }
set { rootBuilder = value; }
}
@@ -1225,10 +1385,26 @@ namespace System.Web.UI {
}
#if NET_2_0
+ internal OutputCacheParsedParams OutputCacheParsedParameters {
+ get { return oc_parsed_params; }
+ }
+
+ internal string OutputCacheSqlDependency {
+ get { return oc_sqldependency; }
+ }
+
+ internal string OutputCacheCacheProfile {
+ get { return oc_cacheprofile; }
+ }
+
internal string OutputCacheVaryByContentEncodings {
get { return oc_content_encodings; }
}
+ internal bool OutputCacheNoStore {
+ get { return oc_nostore; }
+ }
+
internal virtual TextReader Reader {
get { return null; }
set { /* no-op */ }
@@ -1265,9 +1441,7 @@ namespace System.Web.UI {
}
internal PagesSection PagesConfig {
- get {
- return WebConfigurationManager.GetWebApplicationSection ("system.web/pages") as PagesSection;
- }
+ get { return GetConfigSection <PagesSection> ("system.web/pages") as PagesSection; }
}
internal AspGenerator AspGenerator {
@@ -1280,5 +1454,4 @@ namespace System.Web.UI {
}
#endif
}
-}
-
+}
\ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/UserControlParser.cs b/mcs/class/System.Web/System.Web.UI/UserControlParser.cs
index fec23b4..9edf2fd 100644
--- a/mcs/class/System.Web/System.Web.UI/UserControlParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/UserControlParser.cs
@@ -42,6 +42,8 @@ namespace System.Web.UI
string masterPage;
#endif
+
+#if !NET_2_0
internal UserControlParser (string virtualPath, string inputFile, HttpContext context)
: this (virtualPath, inputFile, context, null)
{
@@ -52,12 +54,9 @@ namespace System.Web.UI
{
this.Dependencies = deps;
}
-
+
internal UserControlParser (string virtualPath, string inputFile, HttpContext context, string type)
{
-#if NET_2_0
- VirtualPath = new VirtualPath (virtualPath);
-#endif
Context = context;
BaseVirtualDir = VirtualPathUtility.GetDirectory (virtualPath, false);
InputFile = inputFile;
@@ -65,28 +64,49 @@ namespace System.Web.UI
AddApplicationAssembly ();
}
-#if NET_2_0
- internal UserControlParser (string virtualPath, TextReader reader, HttpContext context)
+#else
+ internal UserControlParser (VirtualPath virtualPath, string inputFile, HttpContext context)
+ : this (virtualPath, inputFile, context, null)
+ {
+ }
+
+ internal UserControlParser (VirtualPath virtualPath, string inputFile, ArrayList deps, HttpContext context)
+ : this (virtualPath, inputFile, context, null)
+ {
+ this.Dependencies = deps;
+ }
+
+ internal UserControlParser (VirtualPath virtualPath, string inputFile, HttpContext context, string type)
+ {
+ VirtualPath = virtualPath;
+ Context = context;
+ BaseVirtualDir = virtualPath.DirectoryNoNormalize;
+ InputFile = inputFile;
+ SetBaseType (type);
+ AddApplicationAssembly ();
+ LoadConfigDefaults ();
+ }
+
+ internal UserControlParser (VirtualPath virtualPath, TextReader reader, HttpContext context)
: this (virtualPath, null, reader, context)
{
}
- internal UserControlParser (string virtualPath, string inputFile, TextReader reader, HttpContext context)
+ internal UserControlParser (VirtualPath virtualPath, string inputFile, TextReader reader, HttpContext context)
{
- VirtualPath = new VirtualPath (virtualPath);
+ VirtualPath = virtualPath;
Context = context;
- BaseVirtualDir = VirtualPathUtility.GetDirectory (virtualPath, false);
-
- if (String.IsNullOrEmpty (inputFile)) {
- HttpRequest req = context != null ? context.Request : null;
- if (req != null)
- InputFile = req.MapPath (virtualPath);
- } else
+ BaseVirtualDir = virtualPath.DirectoryNoNormalize;
+
+ if (String.IsNullOrEmpty (inputFile))
+ InputFile = virtualPath.PhysicalPath;
+ else
InputFile = inputFile;
Reader = reader;
SetBaseType (null);
AddApplicationAssembly ();
+ LoadConfigDefaults ();
}
internal UserControlParser (TextReader reader, int? uniqueSuffix, HttpContext context)
@@ -104,6 +124,7 @@ namespace System.Web.UI
Reader = reader;
SetBaseType (null);
AddApplicationAssembly ();
+ LoadConfigDefaults ();
}
internal static Type GetCompiledType (TextReader reader, int? inputHashCode, HttpContext context)
@@ -115,13 +136,21 @@ namespace System.Web.UI
internal static Type GetCompiledType (string virtualPath, string inputFile, ArrayList deps, HttpContext context)
{
+#if NET_2_0
+ UserControlParser ucp = new UserControlParser (new VirtualPath (virtualPath), inputFile, deps, context);
+#else
UserControlParser ucp = new UserControlParser (virtualPath, inputFile, deps, context);
+#endif
return ucp.CompileIntoType ();
}
public static Type GetCompiledType (string virtualPath, string inputFile, HttpContext context)
{
+#if NET_2_0
+ UserControlParser ucp = new UserControlParser (new VirtualPath (virtualPath), inputFile, context);
+#else
UserControlParser ucp = new UserControlParser (virtualPath, inputFile, context);
+#endif
return ucp.CompileIntoType ();
}
diff --git a/mcs/class/System.Web/System.Web.UI/WebHandlerParser.cs b/mcs/class/System.Web/System.Web.UI/WebHandlerParser.cs
index 3b40f71..46f147a 100644
--- a/mcs/class/System.Web/System.Web.UI/WebHandlerParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/WebHandlerParser.cs
@@ -42,13 +42,13 @@ namespace System.Web.UI
}
#if NET_2_0
- internal WebHandlerParser (HttpContext context, string virtualPath, TextReader reader)
+ internal WebHandlerParser (HttpContext context, VirtualPath virtualPath, TextReader reader)
: this (context, virtualPath, null, reader)
{
}
- internal WebHandlerParser (HttpContext context, string virtualPath, string physicalPath, TextReader reader)
- : base (context, virtualPath, physicalPath, reader)
+ internal WebHandlerParser (HttpContext context, VirtualPath virtualPath, string physicalPath, TextReader reader)
+ : base (context, virtualPath.Original, physicalPath, reader)
{
}
#endif
diff --git a/mcs/class/System.Web/System.Web.UI/WebServiceParser.cs b/mcs/class/System.Web/System.Web.UI/WebServiceParser.cs
index c7a5775..63c72fc 100644
--- a/mcs/class/System.Web/System.Web.UI/WebServiceParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/WebServiceParser.cs
@@ -44,13 +44,13 @@ namespace System.Web.UI {
}
#if NET_2_0
- internal WebServiceParser (HttpContext context, string virtualPath, TextReader reader)
+ internal WebServiceParser (HttpContext context, VirtualPath virtualPath, TextReader reader)
: this (context, virtualPath, null, reader)
{
}
- internal WebServiceParser (HttpContext context, string virtualPath, string physicalPath, TextReader reader)
- : base (context, virtualPath, physicalPath, reader)
+ internal WebServiceParser (HttpContext context, VirtualPath virtualPath, string physicalPath, TextReader reader)
+ : base (context, virtualPath.Original, physicalPath, reader)
{
}
#endif
diff --git a/mcs/class/System.Web/System.Web.dll.sources b/mcs/class/System.Web/System.Web.dll.sources
index 57da297..189450f 100644
--- a/mcs/class/System.Web/System.Web.dll.sources
+++ b/mcs/class/System.Web/System.Web.dll.sources
@@ -140,6 +140,7 @@ System.Web.Configuration/WebConfigurationSettings.cs
System.Web.Configuration/WebControlsSectionHandler.cs
System.Web.Configuration_2.0/AdapterDictionary.cs
System.Web.Configuration_2.0/AnonymousIdentificationSection.cs
+System.Web.Configuration_2.0/ApplicationSettingsConfigurationFileMap.cs
System.Web.Configuration_2.0/AssemblyCollection.cs
System.Web.Configuration_2.0/AssemblyInfo.cs
System.Web.Configuration_2.0/AuthenticationSection.cs
diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog
index a10d61f..64a6f2c 100644
--- a/mcs/class/System.Web/System.Web/ChangeLog
+++ b/mcs/class/System.Web/System.Web/ChangeLog
@@ -1,3 +1,157 @@
+2009-07-13 Marek Habersack <mhabersack at novell.com>
+
+ * HttpApplication.cs: LoadType - wrap call to LoadTypeFromBin in
+ try/catch so that we can decide whether or not to throw
+ exceptions. LoadTypeFromBin - ignore the FileLoadException and
+ BadImageException exceptions as they don't matter in this
+ context.
+
+2009-07-23 Marek Habersack <mhabersack at novell.com>
+
+ * HttpException.cs: if an exception is processed which refers to
+ internal "files", don't show the internal name.
+
+2009-06-05 Marek Habersack <mhabersack at novell.com>
+
+ * VirtualPathUtility.cs: IsValidVirtualPath no longer uses
+ WebConfigurationManager.GetSection to retrieve the verification
+ setting. Instead, the setting is retrieved in the static
+ constructor.
+
+ * HttpRequest.cs: ApplyUrlMapping must not use
+ WebConfigurationManager.GetSection as it would cause a recursive
+ call loop. Code to detect whether url mappings are in effect has
+ been moved to a static constructor.
+
+2009-06-04 Marek Habersack <mhabersack at novell.com>
+
+ * HttpResponse.cs: version header configuration is read lazily
+ now.
+
+ * HttpException.cs: do not show version info if custom errors are
+ in effect. Fixes bug #509092
+ Don't generate trace for 403. Fixes bug #509092
+
+ * HttpApplicationFactory.cs: OnFileChanged ignores the directory
+ part of the file triggering the event. Fixes bug #509998
+
+2009-06-03 Marek Habersack <mhabersack at novell.com>
+
+ * VirtualPathUtility.cs: IsValidVirtualPath now checks the value
+ of the
+ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\VerificationCompatibility
+ registry key when running on Windows and also consults the
+ mono-specific system.web/monoSettings configuration section to see
+ what is the verificationCompatibility property set to. If either
+ of the two is set to 1, Mono will not verify the validity of
+ the current request's path. Fixes bug #509163
+
+ * HttpApplicationFactory.cs: OnFileChanged must check whether the
+ modified location is a directory before it decides to ignore it
+ when watcher's filter is "?eb.?config". Fixes bug #509450 (see
+ also bug #495011)
+
+ * HttpForbiddenHandler.cs: updated the error message to match
+ .NET, added requested path and description. Fixes bug #509092
+
+ * HttpException.cs: if trace is not requested, don't output <!--
+ following the version information in WriteFileBottom. Fixes bug
+ #509475
+ GetDefaultErrorMessage appends trace only if showTrace is
+ true. Fixes bug #509092
+
+2009-06-02 Marek Habersack <mhabersack at novell.com>
+
+ * HttpApplication.cs: LocateHandler needs to pass current request
+ path and filepath to WebConfigurationManager when retrieving
+ system.web/httpHandlers section as only this will guarantee that
+ any <location> elements relating to the current request's which
+ contain system.web/httpHandlers section will be correctly read and
+ used. Also fixes reading httpHandlers section if it's found in
+ web.config located in a subdirectory. Fixes bug #509069
+
+ * HttpException.cs: 403 errors get same treatment as 404
+ below. Fixes bug #509092
+
+2009-06-01 Marek Habersack <mhabersack at novell.com>
+
+ * HttpException.cs: if custom errors are enabled and the error
+ code is 404 show the "standard" 404 error message instead of the
+ default custom error mode one. Fixes bug #508649
+
+2009-05-28 Marek Habersack <mhabersack at novell.com>
+
+ * HttpUtility.cs: fixed UrlDecode for encoded strings which
+ should be converted to byte sequences longer than 2 bytes. Fixes
+ bug #507666
+
+2009-05-14 Marek Habersack <mhabersack at novell.com>
+
+ * HttpApplication.cs: LocateHandler won't cache if a default
+ handler was returned.
+
+2009-05-07 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * MimeTypes.cs: add silverlight related types.
+
+2009-04-28 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * HttpContext.cs:
+ * HttpWorkerRequest.cs:
+ * HttpRuntime.cs: if other parts of the system are using the
+ threadpool and we queue requests, once the threadpool is free we
+ might still not get back to use it to the maximum extent possible.
+ Adding a few more calls to QueuePendingRequest ensures that does not
+ happen.
+
+2009-04-24 Marek Habersack <mhabersack at novell.com>
+
+ * HtmlizedException.cs: make HtmlException derive from
+ HttpException. System.Web.Mvc relies upon compile and parse
+ exception being descendants of HttpException or otherwise it will
+ catch and ignore compilation/parsing errors.
+
+2009-04-16 Marek Habersack <mhabersack at novell.com>
+
+ * HttpContext.cs: local resources code now uses the custom
+ resource provider factory, just like the global resources
+ code. Fixes bug #493263
+
+2009-04-15 Marek Habersack <mhabersack at novell.com>
+
+ * HttpApplicationFactory.cs: if a notification is received from a
+ FileSystemWatcher which was configured to watch for
+ subdirectories, uses a filter (currently we have just one such
+ watcher - waiting for changes to '?eb.?onfig') and the event
+ doesn't match the filter, ignore the event. Fixes bug #495011
+
+2009-04-13 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * HttpUtility.cs: the collection returned from ParseQueryString knows
+ how to convert the key/value pairs to a string.
+
+2009-04-10 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * HttpResponseStream.cs: use the unsafe version when copying buffers.
+
+2009-03-31 Marek Habersack <mhabersack at novell.com>
+
+ * HttpApplicationFactory.cs: use glob patterns to watch for
+ changes to global.asax and web.config files.
+ Set up recursive watch on web.config in a separate thread, to
+ minimize application startup delay. Fixes bug #490497
+
+ * VirtualPath.cs: added code to detect whether the VirtualPath
+ instance represents a fake virtual path (IsFake property).
+ Added new property DirectoryNoNormalize which returns
+ non-normalized directory for the VirtualPath instance.
+ Made ToString () a bit more friendly and well-behaved.
+
+2009-03-25 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * HttpResponse.cs: ClearHeaders() also resets cacheability.
+ Bug #485557 fixed.
+
2009-03-04 Marek Habersack <mhabersack at novell.com>
* HttpRuntime.cs: do not clean the dynamic base directory in
diff --git a/mcs/class/System.Web/System.Web/HtmlizedException.cs b/mcs/class/System.Web/System.Web/HtmlizedException.cs
index 564fb5b..d595465 100644
--- a/mcs/class/System.Web/System.Web/HtmlizedException.cs
+++ b/mcs/class/System.Web/System.Web/HtmlizedException.cs
@@ -37,7 +37,7 @@ using System.Security.Permissions;
namespace System.Web
{
[Serializable]
- internal abstract class HtmlizedException : Exception
+ internal abstract class HtmlizedException : HttpException
{
protected HtmlizedException (SerializationInfo info, StreamingContext context)
: base (info, context)
diff --git a/mcs/class/System.Web/System.Web/HttpApplication.cs b/mcs/class/System.Web/System.Web/HttpApplication.cs
index 64e2a0a..ec7f076 100644
--- a/mcs/class/System.Web/System.Web/HttpApplication.cs
+++ b/mcs/class/System.Web/System.Web/HttpApplication.cs
@@ -1585,7 +1585,7 @@ namespace System.Web {
cache.Clear ();
}
- object LocateHandler (string verb, string url)
+ object LocateHandler (HttpRequest req, string verb, string url)
{
Hashtable cache = GetHandlerCache ();
string id = String.Concat (verb, url);
@@ -1593,17 +1593,19 @@ namespace System.Web {
if (ret != null)
return ret;
-
+
+ bool allowCache;
#if NET_2_0
- HttpHandlersSection httpHandlersSection = (HttpHandlersSection) WebConfigurationManager.GetWebApplicationSection ("system.web/httpHandlers");
- ret = httpHandlersSection.LocateHandler (verb, url);
+ global::System.Configuration.Configuration cfg = WebConfigurationManager.OpenWebConfiguration (req.Path, null, req.FilePath);
+ HttpHandlersSection httpHandlersSection = cfg.GetSection ("system.web/httpHandlers") as HttpHandlersSection;
+ ret = httpHandlersSection.LocateHandler (verb, url, out allowCache);
#else
HandlerFactoryConfiguration factory_config = (HandlerFactoryConfiguration) HttpContext.GetAppConfig ("system.web/httpHandlers");
- ret = factory_config.LocateHandler (verb, url);
+ ret = factory_config.LocateHandler (verb, url, out allowCache);
#endif
IHttpHandler handler = ret as IHttpHandler;
- if (handler != null && handler.IsReusable)
+ if (allowCache && handler != null && handler.IsReusable)
cache [id] = ret;
return ret;
@@ -1624,10 +1626,9 @@ namespace System.Web {
string verb = request.RequestType;
IHttpHandler handler = null;
- object o = LocateHandler (verb, url);
+ object o = LocateHandler (request, verb, url);
factory = o as IHttpHandlerFactory;
-
if (factory == null) {
handler = (IHttpHandler) o;
} else {
@@ -1839,12 +1840,19 @@ namespace System.Web {
}
#endif
- type = LoadTypeFromBin (typeName);
+ Exception loadException = null;
+ try {
+ type = null;
+ type = LoadTypeFromBin (typeName);
+ } catch (Exception ex) {
+ loadException = ex;
+ }
+
if (type != null)
return type;
#endif
if (throwOnMissing)
- throw new TypeLoadException (String.Format ("Type '{0}' cannot be found", typeName));
+ throw new TypeLoadException (String.Format ("Type '{0}' cannot be found", typeName), loadException);
return null;
}
@@ -1854,7 +1862,18 @@ namespace System.Web {
Type type = null;
foreach (string s in BinDirectoryAssemblies) {
- Assembly binA = Assembly.LoadFrom (s);
+ Assembly binA = null;
+
+ try {
+ binA = Assembly.LoadFrom (s);
+ } catch (FileLoadException) {
+ // ignore
+ continue;
+ } catch (BadImageFormatException) {
+ // ignore
+ continue;
+ }
+
type = binA.GetType (typeName, false);
if (type == null)
continue;
diff --git a/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs b/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
index 1abd3f3..bb88024 100644
--- a/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
+++ b/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
@@ -34,6 +34,7 @@ using System.Web.UI;
using System.Web.SessionState;
using System.Web.Configuration;
using System.Threading;
+using System.Web.Util;
using System.Web.Compilation;
#if TARGET_J2EE
@@ -479,11 +480,21 @@ namespace System.Web {
app_state = new HttpApplicationState ();
}
- WatchLocationForRestart("Global.asax");
- WatchLocationForRestart("global.asax");
- WatchLocationForRestart(String.Empty, "Web.config", true);
- WatchLocationForRestart(String.Empty, "web.config", true);
- WatchLocationForRestart(String.Empty, "Web.Config", true);
+ WatchLocationForRestart ("?lobal.asax");
+#if CODE_DISABLED_UNTIL_SYSTEM_CONFIGURATION_IS_FIXED
+ // This is the correct behavior, but until
+ // System.Configuration is fixed to properly reload
+ // configuration when it is modified on disk, we need to use
+ // the recursive watchers below.
+ WatchLocationForRestart ("?eb.?onfig");
+#else
+ // This is to avoid startup delays. Inotify/FAM code looks
+ // recursively for all subdirectories and adds them to the
+ // watch set. This can take a lot of time for deep directory
+ // trees (see bug #490497)
+ ThreadPool.QueueUserWorkItem (new WaitCallback (SetUpWebConfigWatchers), null);
+#endif
+
needs_init = false;
#if NET_2_0
} catch (Exception) {
@@ -503,6 +514,11 @@ namespace System.Web {
}
}
+
+ static void SetUpWebConfigWatchers (object state)
+ {
+ WatchLocationForRestart (String.Empty, "?eb.?onfig", true);
+ }
//
// Multiple-threads might hit this one on startup, and we have
@@ -610,7 +626,7 @@ namespace System.Web {
internal static bool WatchLocationForRestart (string filter)
{
- return WatchLocationForRestart ("", filter, false);
+ return WatchLocationForRestart (String.Empty, filter, false);
}
internal static bool WatchLocationForRestart (string virtualPath, string filter)
@@ -700,6 +716,22 @@ namespace System.Web {
static void OnFileChanged(object sender, FileSystemEventArgs args)
{
+ string name = args.Name;
+ if (StrUtils.EndsWith (name, "onfig", true)) {
+ if (String.Compare (Path.GetFileName (name), "web.config", true) != 0)
+ return;
+ } else if (StrUtils.EndsWith (name, "lobal.asax", true) && String.Compare (name, "global.asax", true) != 0)
+ return;
+
+ // {Inotify,FAM}Watcher will notify about events for a directory regardless
+ // of the filter pattern. This might be a bug in the watchers code, but
+ // since I couldn't find any rationale for the code in there I'd opted for
+ // not removing it and instead working around the issue here. Fix for bug
+ // #495011
+ FileSystemWatcher watcher = sender as FileSystemWatcher;
+ if (watcher != null && String.Compare (watcher.Filter, "?eb.?onfig", true) == 0 && Directory.Exists (name))
+ return;
+
lock (watchers_lock) {
if(app_shutdown)
return;
diff --git a/mcs/class/System.Web/System.Web/HttpContext.cs b/mcs/class/System.Web/System.Web/HttpContext.cs
index d8b2755..c6552d4 100644
--- a/mcs/class/System.Web/System.Web/HttpContext.cs
+++ b/mcs/class/System.Web/System.Web/HttpContext.cs
@@ -470,40 +470,59 @@ namespace System.Web {
return GetGlobalResourceObject (classKey, resourceKey, Thread.CurrentThread.CurrentUICulture);
}
- static object GetGlobalObjectFromFactory (string classKey, string resourceKey, CultureInfo culture)
+ static bool EnsureProviderFactory ()
{
- // FIXME: Retention of data
+ if (resource_providers == null)
+ resource_providers = new Dictionary <string, IResourceProvider> ();
+
+ if (provider_factory != null)
+ return true;
- if (provider_factory == null) {
- GlobalizationSection gs = WebConfigurationManager.GetSection ("system.web/globalization") as GlobalizationSection;
+ GlobalizationSection gs = WebConfigurationManager.GetSection ("system.web/globalization") as GlobalizationSection;
- if (gs == null)
- return null;
+ if (gs == null)
+ return false;
- String rsfTypeName = gs.ResourceProviderFactoryType;
- if (String.IsNullOrEmpty (rsfTypeName))
- return null;
+ String rsfTypeName = gs.ResourceProviderFactoryType;
+ if (String.IsNullOrEmpty (rsfTypeName))
+ return false;
- Type rsfType = Type.GetType (rsfTypeName, true);
- ResourceProviderFactory rpf = Activator.CreateInstance (rsfType) as ResourceProviderFactory;
+ Type rsfType = HttpApplication.LoadType (rsfTypeName, true);
+ ResourceProviderFactory rpf = Activator.CreateInstance (rsfType) as ResourceProviderFactory;
- if (rpf == null)
- return null;
+ if (rpf == null)
+ return false;
- provider_factory = rpf;
- }
-
- if (resource_providers == null)
- resource_providers = new Dictionary <string, IResourceProvider> ();
+ provider_factory = rpf;
+ return true;
+ }
+
+ internal static IResourceProvider GetResourceProvider (string key, bool isLocal)
+ {
+ if (!EnsureProviderFactory ())
+ return null;
- IResourceProvider rp;
- if (!resource_providers.TryGetValue (classKey, out rp)) {
- rp = provider_factory.CreateGlobalResourceProvider (classKey);
+ IResourceProvider rp = null;
+ if (!resource_providers.TryGetValue (key, out rp)) {
+ if (isLocal)
+ rp = provider_factory.CreateLocalResourceProvider (key);
+ else
+ rp = provider_factory.CreateGlobalResourceProvider (key);
if (rp == null)
return null;
- resource_providers.Add (classKey, rp);
+ resource_providers.Add (key, rp);
}
+ return rp;
+ }
+
+ static object GetGlobalObjectFromFactory (string classKey, string resourceKey, CultureInfo culture)
+ {
+ // FIXME: Retention of data
+ IResourceProvider rp = GetResourceProvider (classKey, false);
+ if (rp == null)
+ return null;
+
return rp.GetObject (resourceKey, culture);
}
@@ -524,12 +543,25 @@ namespace System.Web {
return GetLocalResourceObject (virtualPath, resourceKey, Thread.CurrentThread.CurrentUICulture);
}
+ static object GetLocalObjectFromFactory (string virtualPath, string resourceKey, CultureInfo culture)
+ {
+ IResourceProvider rp = GetResourceProvider (virtualPath, true);
+ if (rp == null)
+ return null;
+
+ return rp.GetObject (resourceKey, culture);
+ }
+
public static object GetLocalResourceObject (string virtualPath, string resourceKey, CultureInfo culture)
{
if (!VirtualPathUtility.IsAbsolute (virtualPath))
throw new ArgumentException ("The specified virtualPath was not rooted.");
+
+ object ret = GetLocalObjectFromFactory (virtualPath, resourceKey, culture);
+ if (ret != null)
+ return ret;
- string path = Path.GetDirectoryName (virtualPath);
+ string path = VirtualPathUtility.GetDirectory (virtualPath);
Assembly asm = AppResourcesCompiler.GetCachedLocalResourcesAssembly (path);
if (asm == null) {
AppResourcesCompiler ac = new AppResourcesCompiler (path);
@@ -742,6 +774,7 @@ namespace System.Web {
#if !TARGET_J2EE
void TimeoutReached(object state) {
+ HttpRuntime.QueuePendingRequest (false);
if (Interlocked.CompareExchange (ref timeout_possible, 0, 0) == 0) {
timer.Change(2000, 0);
return;
diff --git a/mcs/class/System.Web/System.Web/HttpException.cs b/mcs/class/System.Web/System.Web/HttpException.cs
index 52517b5..c6e8fc1 100644
--- a/mcs/class/System.Web/System.Web/HttpException.cs
+++ b/mcs/class/System.Web/System.Web/HttpException.cs
@@ -87,12 +87,17 @@ namespace System.Web
}
#if NET_2_0
- protected HttpException (SerializationInfo info, StreamingContext context)
+ protected
+#else
+ internal
+#endif
+ HttpException (SerializationInfo info, StreamingContext context)
: base (info, context)
{
http_code = info.GetInt32 ("_httpCode");
}
+#if NET_2_0
[SecurityPermission (SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData (SerializationInfo info, StreamingContext context)
{
@@ -128,11 +133,15 @@ namespace System.Web
{
try {
HttpContext ctx = HttpContext.Current;
- if (ctx != null && ctx.IsCustomErrorEnabled)
- return GetCustomErrorDefaultMessage ();
+ if (ctx != null && ctx.IsCustomErrorEnabled) {
+ if (http_code != 404 && http_code != 403)
+ return GetCustomErrorDefaultMessage ();
+ else
+ return GetDefaultErrorMessage (false);
+ }
if (!(this.InnerException is HtmlizedException))
- return GetDefaultErrorMessage ();
+ return GetDefaultErrorMessage (true);
return GetHtmlizedErrorMessage ();
} catch (Exception ex) {
@@ -206,33 +215,35 @@ table.sampleCode {{width: 100%; background-color: #ffffcc; }}
void WriteFileBottom (StringBuilder builder, bool showTrace)
{
- builder.Append ("<hr style=\"color: silver\"/>");
- builder.AppendFormat ("<strong>Version information: </strong> Mono Version: {0}; ASP.NET Version: {0}</body></html>\r\n<!--", Environment.Version);
- if (!showTrace)
- return;
-
- string trace, message;
- bool haveTrace;
- Exception ex = this;
+ if (showTrace) {
+ builder.Append ("<hr style=\"color: silver\"/>");
+ builder.AppendFormat ("<strong>Version information: </strong> Mono Version: {0}; ASP.NET Version: {0}</body></html>\r\n", Environment.Version);
- while (ex != null) {
- trace = ex.StackTrace;
- message = ex.Message;
- haveTrace = (trace != null && trace.Length > 0);
+ string trace, message;
+ bool haveTrace;
+ Exception ex = this;
+
+ builder.Append ("\r\n<!--");
+ while (ex != null) {
+ trace = ex.StackTrace;
+ message = ex.Message;
+ haveTrace = (trace != null && trace.Length > 0);
- if (!haveTrace && (message == null || message.Length == 0)) {
- ex = ex.InnerException;
- continue;
- }
+ if (!haveTrace && (message == null || message.Length == 0)) {
+ ex = ex.InnerException;
+ continue;
+ }
- builder.Append ("\r\n[" + ex.GetType () + "]: " + HtmlEncode (message) + "\r\n");
- if (haveTrace)
- builder.Append (ex.StackTrace);
+ builder.Append ("\r\n[" + ex.GetType () + "]: " + HtmlEncode (message) + "\r\n");
+ if (haveTrace)
+ builder.Append (ex.StackTrace);
- ex = ex.InnerException;
- }
+ ex = ex.InnerException;
+ }
- builder.Append ("\r\n-->");
+ builder.Append ("\r\n-->");
+ } else
+ builder.Append ("</body></html>\r\n");
}
string GetCustomErrorDefaultMessage ()
@@ -287,7 +298,7 @@ table.sampleCode {{width: 100%; background-color: #ffffcc; }}
return builder.ToString ();
}
- string GetDefaultErrorMessage ()
+ string GetDefaultErrorMessage (bool showTrace)
{
Exception ex, baseEx;
ex = baseEx = GetBaseException ();
@@ -309,15 +320,15 @@ table.sampleCode {{width: 100%; background-color: #ffffcc; }}
builder.Append ("</p>\r\n");
if (resource_name != null && resource_name.Length > 0)
- builder.AppendFormat ("<p><strong>Resource URL: </strong>{0}</p>\r\n", resource_name);
+ builder.AppendFormat ("<p><strong>Requested URL: </strong>{0}</p>\r\n", resource_name);
- if (baseEx != null && http_code != 404) {
+ if (showTrace && baseEx != null && http_code != 404 && http_code != 403) {
builder.Append ("<p><strong>Stack Trace: </strong></p>");
builder.Append ("<table summary=\"Stack Trace\" class=\"sampleCode\">\r\n<tr><td>");
WriteTextAsCode (builder, baseEx.ToString ());
builder.Append ("</td></tr>\r\n</table>\r\n");
}
- WriteFileBottom (builder, true);
+ WriteFileBottom (builder, showTrace);
return builder.ToString ();
}
@@ -331,6 +342,17 @@ table.sampleCode {{width: 100%; background-color: #ffffcc; }}
return res.Replace ("\r\n", "<br />");
}
+ string FormatSourceFile (string filename)
+ {
+ if (filename == null || filename.Length == 0)
+ return String.Empty;
+
+ if (filename.StartsWith ("@@"))
+ return "[internal] <!-- " + filename + " -->";
+
+ return filename;
+ }
+
string GetHtmlizedErrorMessage ()
{
StringBuilder builder = new StringBuilder ();
@@ -380,9 +402,9 @@ table.sampleCode {{width: 100%; background-color: #ffffcc; }}
builder.Append ("<br/><p><strong>Source File: </strong>");
if (exc.SourceFile != exc.FileName)
- builder.Append (exc.SourceFile);
+ builder.Append (FormatSourceFile (exc.SourceFile));
else
- builder.Append (exc.FileName);
+ builder.Append (FormatSourceFile (exc.FileName));
if ((isParseException || isCompileException) && exc.ErrorLines.Length > 0) {
builder.Append (" <strong>Line: </strong>");
diff --git a/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs b/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs
index 6e3dff6..af5ddf4 100644
--- a/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs
+++ b/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs
@@ -34,7 +34,16 @@ namespace System.Web
{
public void ProcessRequest (HttpContext context)
{
- throw new HttpException (403, "Forbidden");
+ HttpRequest req = context != null ? context.Request : null;
+ string path = req != null ? req.Path : null;
+ string description = "The type of page you have requested is not served because it has been explicitly forbidden. The extension '" +
+ (path == null ? String.Empty : VirtualPathUtility.GetExtension (path)) +
+ "' may be incorrect. Please review the URL below and make sure that it is spelled correctly.";
+
+ throw new HttpException (403,
+ "This type of page is not served.",
+ req != null ? req.Path : null,
+ description);
}
public bool IsReusable
diff --git a/mcs/class/System.Web/System.Web/HttpRequest.cs b/mcs/class/System.Web/System.Web/HttpRequest.cs
index 2c9e63a..1c4cbbc 100644
--- a/mcs/class/System.Web/System.Web/HttpRequest.cs
+++ b/mcs/class/System.Web/System.Web/HttpRequest.cs
@@ -96,10 +96,26 @@ namespace System.Web {
bool validate_cookies, validate_query_string, validate_form;
bool checked_cookies, checked_query_string, checked_form;
+#if NET_2_0
+ static readonly UrlMappingCollection urlMappings;
+#endif
+
readonly static char [] queryTrimChars = {'?'};
static HttpRequest ()
{
+#if NET_2_0
+ try {
+ UrlMappingsSection ums = WebConfigurationManager.GetWebApplicationSection ("system.web/urlMappings") as UrlMappingsSection;
+ if (ums != null && ums.IsEnabled) {
+ urlMappings = ums.UrlMappings;
+ if (urlMappings.Count == 0)
+ urlMappings = null;
+ }
+ } catch {
+ // unlikely to happen
+ }
+#endif
host_addresses = GetLocalHostAddresses ();
}
@@ -163,19 +179,13 @@ namespace System.Web {
#if NET_2_0
internal string ApplyUrlMapping (string url)
{
- if (WebConfigurationManager.HasConfigErrors)
- return url;
-
- UrlMappingsSection ums = WebConfigurationManager.GetSection ("system.web/urlMappings", ApplicationPath) as UrlMappingsSection;
- UrlMappingCollection umc;
-
- if (ums == null || !ums.IsEnabled || (umc = ums.UrlMappings).Count == 0)
+ if (urlMappings == null)
return url;
string relUrl = VirtualPathUtility.ToAppRelative (url);
UrlMapping um = null;
- foreach (UrlMapping u in umc) {
+ foreach (UrlMapping u in urlMappings) {
if (u == null)
continue;
if (String.Compare (relUrl, u.Url, StringComparison.Ordinal) == 0) {
diff --git a/mcs/class/System.Web/System.Web/HttpResponse.cs b/mcs/class/System.Web/System.Web/HttpResponse.cs
index 274f73f..5d36e9d 100644
--- a/mcs/class/System.Web/System.Web/HttpResponse.cs
+++ b/mcs/class/System.Web/System.Web/HttpResponse.cs
@@ -69,7 +69,8 @@ namespace System.Web {
string user_cache_control = "private";
string redirect_location;
- static UnknownResponseHeader version_header;
+ UnknownResponseHeader version_header;
+ bool version_header_checked;
//
// Negative Content-Length means we auto-compute the size of content-length
@@ -104,19 +105,6 @@ namespace System.Web {
Encoding headerEncoding;
#endif
- static HttpResponse ()
- {
-#if NET_2_0
- HttpRuntimeSection config = WebConfigurationManager.GetWebApplicationSection ("system.web/httpRuntime") as HttpRuntimeSection;
-#else
- HttpRuntimeConfig config = HttpContext.GetAppConfig ("system.web/httpRuntime") as HttpRuntimeConfig;
-#endif
- if (config != null && config.EnableVersionHeader) {
- string version = Environment.Version.ToString (3);
- version_header = new UnknownResponseHeader ("X-AspNet-Version", version);
- }
- }
-
internal HttpResponse ()
{
output_stream = new HttpResponseStream (this);
@@ -145,6 +133,25 @@ namespace System.Web {
return prev;
}
+ internal UnknownResponseHeader VersionHeader {
+ get {
+ if (!version_header_checked && version_header == null) {
+ version_header_checked = true;
+#if NET_2_0
+ HttpRuntimeSection config = WebConfigurationManager.GetWebApplicationSection ("system.web/httpRuntime") as HttpRuntimeSection;
+#else
+ HttpRuntimeConfig config = HttpContext.GetAppConfig ("system.web/httpRuntime") as HttpRuntimeConfig;
+#endif
+ if (config != null && config.EnableVersionHeader) {
+ string version = Environment.Version.ToString (3);
+ version_header = new UnknownResponseHeader ("X-AspNet-Version", version);
+ }
+ }
+
+ return version_header;
+ }
+ }
+
internal string[] FileDependencies {
get {
if (fileDependencies == null || fileDependencies.Count == 0)
@@ -581,7 +588,12 @@ namespace System.Web {
content_type = "text/html";
transfer_encoding = null;
user_cache_control = null;
- headers.Clear ();
+ user_cache_control = "private";
+ if (cache_policy != null)
+ cache_policy.Cacheability = HttpCacheability.Private;
+
+ if (headers != null)
+ headers.Clear ();
}
internal bool HeadersSent {
@@ -636,7 +648,8 @@ namespace System.Web {
write_headers.Add (new UnknownResponseHeader ("Location", redirect_location));
#if !TARGET_J2EE
- if (version_header != null)
+ UnknownResponseHeader vh = VersionHeader;
+ if (vh != null)
write_headers.Add (version_header);
//
diff --git a/mcs/class/System.Web/System.Web/HttpResponseStream.cs b/mcs/class/System.Web/System.Web/HttpResponseStream.cs
index 6b8b9f9..d7e86bb 100644
--- a/mcs/class/System.Web/System.Web/HttpResponseStream.cs
+++ b/mcs/class/System.Web/System.Web/HttpResponseStream.cs
@@ -266,12 +266,16 @@ namespace System.Web {
get { return length; }
}
- public int Write (byte [] buf, int offset, int count)
+ public unsafe int Write (byte [] buf, int offset, int count)
{
if (Expandable == false)
throw new Exception ("This should not happen.");
- blocks.Write (buf, offset, count);
+ fixed (byte *p = &buf[0]) {
+ IntPtr p2 = new IntPtr (p + offset);
+ blocks.Write (p2, count);
+ }
+
length += count;
return count;
}
diff --git a/mcs/class/System.Web/System.Web/HttpRuntime.cs b/mcs/class/System.Web/System.Web/HttpRuntime.cs
index e503d5d..d1ac5d4 100644
--- a/mcs/class/System.Web/System.Web/HttpRuntime.cs
+++ b/mcs/class/System.Web/System.Web/HttpRuntime.cs
@@ -331,12 +331,18 @@ namespace System.Web {
// Remove all items from cache.
}
- static void QueuePendingRequests ()
+ internal static HttpWorkerRequest QueuePendingRequest (bool started_internally)
{
- HttpWorkerRequest request = queue_manager.GetNextRequest (null);
- if (request == null)
- return;
- ThreadPool.QueueUserWorkItem (do_RealProcessRequest, request);
+ HttpWorkerRequest next = queue_manager.GetNextRequest (null);
+ if (next == null)
+ return null;
+
+ if (!started_internally) {
+ next.StartedInternally = true;
+ ThreadPool.QueueUserWorkItem (do_RealProcessRequest, next);
+ return null;
+ }
+ return next;
}
#if !TARGET_J2EE
@@ -455,14 +461,24 @@ namespace System.Web {
static void RealProcessRequest (object o)
{
+ HttpWorkerRequest req = (HttpWorkerRequest) o;
+ bool started_internally = req.StartedInternally;
+ do {
+ Process (req);
+ req = QueuePendingRequest (started_internally);
+ } while (started_internally && req != null);
+ }
+
+ static void Process (HttpWorkerRequest req)
+ {
#if TARGET_J2EE
HttpContext context = HttpContext.Current;
if (context == null)
- context = new HttpContext ((HttpWorkerRequest) o);
+ context = new HttpContext (req);
else
- context.SetWorkerRequest ((HttpWorkerRequest) o);
+ context.SetWorkerRequest (req);
#else
- HttpContext context = new HttpContext ((HttpWorkerRequest) o);
+ HttpContext context = new HttpContext (req);
#endif
HttpContext.Current = context;
bool error = false;
@@ -473,7 +489,7 @@ namespace System.Web {
#endif
firstRun = false;
if (initialException != null) {
- FinishWithException ((HttpWorkerRequest) o, new HttpException ("Initial exception", initialException));
+ FinishWithException (req, new HttpException ("Initial exception", initialException));
error = true;
}
}
@@ -492,7 +508,7 @@ namespace System.Web {
try {
app = HttpApplicationFactory.GetApplication (context);
} catch (Exception e) {
- FinishWithException ((HttpWorkerRequest) o, new HttpException ("", e));
+ FinishWithException (req, new HttpException ("", e));
error = true;
}
}
@@ -531,8 +547,6 @@ namespace System.Web {
HttpApplicationFactory.Recycle (app);
}
-
- QueuePendingRequests ();
}
//
@@ -554,6 +568,7 @@ namespace System.Web {
if (request == null)
return;
+ QueuePendingRequest (false);
RealProcessRequest (request);
}
diff --git a/mcs/class/System.Web/System.Web/HttpUtility.cs b/mcs/class/System.Web/System.Web/HttpUtility.cs
index 82111ff..fe54758 100644
--- a/mcs/class/System.Web/System.Web/HttpUtility.cs
+++ b/mcs/class/System.Web/System.Web/HttpUtility.cs
@@ -37,6 +37,10 @@ using System.Security.Permissions;
using System.Text;
using System.Web.Util;
+#if NET_2_0
+using System.Collections.Generic;
+#endif
+
namespace System.Web {
// CAS - no InheritanceDemand here as the class is sealed
@@ -381,6 +385,15 @@ namespace System.Web {
return e.GetChars (b.GetBuffer (), 0, (int) b.Length);
}
+ static void WriteCharBytes (IList buf, char ch, Encoding e)
+ {
+ if (ch > 255) {
+ foreach (byte b in e.GetBytes (new char[] { ch }))
+ buf.Add (b);
+ } else
+ buf.Add ((byte)ch);
+ }
+
public static string UrlDecode (string s, Encoding e)
{
if (null == s)
@@ -388,57 +401,53 @@ namespace System.Web {
if (s.IndexOf ('%') == -1 && s.IndexOf ('+') == -1)
return s;
-
+
if (e == null)
e = Encoding.UTF8;
-
- StringBuilder output = new StringBuilder ();
+
long len = s.Length;
- MemoryStream bytes = new MemoryStream ();
+#if NET_2_0
+ var bytes = new List <byte> ();
+#else
+ ArrayList bytes = new ArrayList ();
+#endif
int xchar;
-
+ char ch;
+
for (int i = 0; i < len; i++) {
- if (s [i] == '%' && i + 2 < len && s [i + 1] != '%') {
+ ch = s [i];
+ if (ch == '%' && i + 2 < len && s [i + 1] != '%') {
if (s [i + 1] == 'u' && i + 5 < len) {
- if (bytes.Length > 0) {
- output.Append (GetChars (bytes, e));
- bytes.SetLength (0);
- }
-
+ // unicode hex sequence
xchar = GetChar (s, i + 2, 4);
if (xchar != -1) {
- output.Append ((char) xchar);
+ WriteCharBytes (bytes, (char)xchar, e);
i += 5;
- } else {
- output.Append ('%');
- }
+ } else
+ WriteCharBytes (bytes, '%', e);
} else if ((xchar = GetChar (s, i + 1, 2)) != -1) {
- bytes.WriteByte ((byte) xchar);
+ WriteCharBytes (bytes, (char)xchar, e);
i += 2;
} else {
- output.Append ('%');
+ WriteCharBytes (bytes, '%', e);
}
continue;
}
- if (bytes.Length > 0) {
- output.Append (GetChars (bytes, e));
- bytes.SetLength (0);
- }
-
- if (s [i] == '+') {
- output.Append (' ');
- } else {
- output.Append (s [i]);
- }
- }
-
- if (bytes.Length > 0) {
- output.Append (GetChars (bytes, e));
+ if (ch == '+')
+ WriteCharBytes (bytes, ' ', e);
+ else
+ WriteCharBytes (bytes, ch, e);
}
-
+
+#if NET_2_0
+ byte[] buf = bytes.ToArray ();
+#else
+ byte[] buf = (byte[])bytes.ToArray (typeof (byte));
+#endif
bytes = null;
- return output.ToString ();
+ return e.GetString (buf);
+
}
public static string UrlDecode (byte [] bytes, Encoding e)
@@ -1033,6 +1042,23 @@ namespace System.Web {
#endif
#if NET_2_0
+ class HttpQSCollection : NameValueCollection {
+ public override string ToString ()
+ {
+ int count = Count;
+ if (count == 0)
+ return "";
+ StringBuilder sb = new StringBuilder ();
+ string [] keys = AllKeys;
+ for (int i = 0; i < count; i++) {
+ sb.AppendFormat ("{0}={1}&", keys [i], this [keys [i]]);
+ }
+ if (sb.Length > 0)
+ sb.Length--;
+ return sb.ToString ();
+ }
+ }
+
public static NameValueCollection ParseQueryString (string query)
{
return ParseQueryString (query, Encoding.UTF8);
@@ -1049,7 +1075,7 @@ namespace System.Web {
if (query[0] == '?')
query = query.Substring (1);
- NameValueCollection result = new NameValueCollection ();
+ NameValueCollection result = new HttpQSCollection ();
ParseQueryString (query, encoding, result);
return result;
}
diff --git a/mcs/class/System.Web/System.Web/HttpWorkerRequest.cs b/mcs/class/System.Web/System.Web/HttpWorkerRequest.cs
index 9be8452..e3a9667 100644
--- a/mcs/class/System.Web/System.Web/HttpWorkerRequest.cs
+++ b/mcs/class/System.Web/System.Web/HttpWorkerRequest.cs
@@ -119,6 +119,12 @@ namespace System.Web {
ResponseHeaderIndexer[GetKnownResponseHeaderName(i)] = i;
}
+ bool started_internally;
+ internal bool StartedInternally {
+ get { return started_internally; }
+ set { started_internally = value; }
+ }
+
public virtual string MachineConfigPath {
get {
return null;
diff --git a/mcs/class/System.Web/System.Web/MimeTypes.cs b/mcs/class/System.Web/System.Web/MimeTypes.cs
index 3947599..ba86530 100644
--- a/mcs/class/System.Web/System.Web/MimeTypes.cs
+++ b/mcs/class/System.Web/System.Web/MimeTypes.cs
@@ -509,6 +509,9 @@ namespace System.Web
mimeTypes.Add ("wsrc", "application/x-wais-source");
mimeTypes.Add ("wtk", "application/x-wintalk");
mimeTypes.Add ("xaf", "x-world/x-vrml");
+ mimeTypes.Add ("xaml", "application/xaml+xml");
+ mimeTypes.Add ("xap", "application/x-silverlight-app");
+ mimeTypes.Add ("xbap", "application/x-ms-xbap");
mimeTypes.Add ("xbm", "image/x-xbitmap");
mimeTypes.Add ("xdr", "video/x-amt-demorun");
mimeTypes.Add ("xgz", "xgl/drawing");
diff --git a/mcs/class/System.Web/System.Web/VirtualPath.cs b/mcs/class/System.Web/System.Web/VirtualPath.cs
index ecc79f1..8f7f6ad 100644
--- a/mcs/class/System.Web/System.Web/VirtualPath.cs
+++ b/mcs/class/System.Web/System.Web/VirtualPath.cs
@@ -28,6 +28,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
+using System.IO;
+using System.Web.Compilation;
using System.Web.Util;
namespace System.Web
@@ -39,6 +41,7 @@ namespace System.Web
string _appRelativeNotRooted;
string _extension;
string _directory;
+ string _directoryNoNormalize;
string _currentRequestDirectory;
string _physicalPath;
@@ -47,6 +50,11 @@ namespace System.Web
private set;
}
+ public bool IsFake {
+ get;
+ private set;
+ }
+
public bool IsRooted {
get;
private set;
@@ -131,6 +139,15 @@ namespace System.Web
}
}
+ public string DirectoryNoNormalize {
+ get {
+ if (_directoryNoNormalize == null)
+ _directoryNoNormalize = VirtualPathUtility.GetDirectory (Absolute, false);
+
+ return _directoryNoNormalize;
+ }
+ }
+
public string CurrentRequestDirectory {
get {
if (_currentRequestDirectory != null)
@@ -165,11 +182,18 @@ namespace System.Web
public VirtualPath (string vpath)
{
- Original = vpath;
-
IsRooted = VirtualPathUtility.IsRooted (vpath);
IsAbsolute = VirtualPathUtility.IsAbsolute (vpath);
IsAppRelative = VirtualPathUtility.IsAppRelative (vpath);
+
+ if (StrUtils.StartsWith (vpath, BuildManager.FAKE_VIRTUAL_PATH_PREFIX)) {
+ _physicalPath = vpath.Substring (BuildManager.FAKE_VIRTUAL_PATH_PREFIX.Length);
+ Original = "~/" + Path.GetFileName (_physicalPath);
+ IsFake = true;
+ } else {
+ Original = vpath;
+ IsFake = false;
+ }
}
public VirtualPath (string vpath, string baseVirtualDir)
@@ -205,7 +229,15 @@ namespace System.Web
public override string ToString ()
{
- return Original;
+ string ret = Original;
+
+ if (String.IsNullOrEmpty (ret))
+ return GetType ().ToString ();
+
+ if (IsFake)
+ ret += " [fake]";
+
+ return ret;
}
public static VirtualPath PhysicalToVirtual (string physical_path)
diff --git a/mcs/class/System.Web/System.Web/VirtualPathUtility.cs b/mcs/class/System.Web/System.Web/VirtualPathUtility.cs
index 2387ad9..ea166c0 100644
--- a/mcs/class/System.Web/System.Web/VirtualPathUtility.cs
+++ b/mcs/class/System.Web/System.Web/VirtualPathUtility.cs
@@ -29,9 +29,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
+using System.Collections.Specialized;
+using System.Web.Configuration;
using System.Web.Util;
using System.Text;
+using Microsoft.Win32;
namespace System.Web {
@@ -40,6 +42,23 @@ namespace System.Web {
#endif
static class VirtualPathUtility
{
+#if NET_2_0
+ static bool monoSettingsVerifyCompatibility;
+ static bool runningOnWindows;
+
+ static VirtualPathUtility ()
+ {
+ try {
+ runningOnWindows = HttpRuntime.RunningOnWindows;
+ var monoSettings = WebConfigurationManager.GetWebApplicationSection ("system.web/monoSettings") as MonoSettingsSection;
+ if (monoSettings != null)
+ monoSettingsVerifyCompatibility = monoSettings.VerificationCompatibility != 1;
+ } catch {
+ // ignore
+ }
+ }
+#endif
+
public static string AppendTrailingSlash (string virtualPath)
{
if (virtualPath == null)
@@ -455,12 +474,32 @@ namespace System.Web {
}
// See: http://support.microsoft.com/kb/932552
+ // See: https://bugzilla.novell.com/show_bug.cgi?id=509163
static readonly char[] invalidVirtualPathChars = {':', '*'};
+ static readonly string aspNetVerificationKey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\ASP.NET";
internal static bool IsValidVirtualPath (string path)
{
if (path == null)
return false;
-
+
+#if NET_2_0
+ bool doValidate = true;
+ if (runningOnWindows) {
+ try {
+ object v = Registry.GetValue (aspNetVerificationKey, "VerificationCompatibility", null);
+ if (v != null && v is int)
+ doValidate = (int)v != 1;
+ } catch {
+ // ignore
+ }
+ }
+
+ if (doValidate)
+ doValidate = monoSettingsVerifyCompatibility;
+
+ if (!doValidate)
+ return true;
+#endif
return path.IndexOfAny (invalidVirtualPathChars) == -1;
}
}
diff --git a/mcs/class/System.Web/System.Web_test.dll.sources b/mcs/class/System.Web/System.Web_test.dll.sources
index 405e068..e0ae432 100644
--- a/mcs/class/System.Web/System.Web_test.dll.sources
+++ b/mcs/class/System.Web/System.Web_test.dll.sources
@@ -130,6 +130,7 @@ System.Web.UI/HtmlTextWriterTest.cs
System.Web.UI/MinimizableAttributeTypeConverterTest.cs
System.Web.UI/OutputCacheParametersTest.cs
System.Web.UI/PageParserTest.cs
+System.Web.UI/PageParserFilterTest.cs
System.Web.UI/PageTest.cs
System.Web.UI/PostBackOptionsTest.cs
System.Web.UI/PropertyConverterTest.cs
diff --git a/mcs/class/System.Web/Test/System.Web.Compilation/ChangeLog b/mcs/class/System.Web/Test/System.Web.Compilation/ChangeLog
index 1f7cdc2..06b3dfa 100644
--- a/mcs/class/System.Web/Test/System.Web.Compilation/ChangeLog
+++ b/mcs/class/System.Web/Test/System.Web.Compilation/ChangeLog
@@ -1,3 +1,24 @@
+2009-06-30 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateControlCompilerTest.cs: added test for bug #517656
+
+2009-06-04 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateControlCompilerTest.cs: added test for bug #508888
+
+2009-05-10 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateControlCompilerTest.cs: added a test for expressions in
+ list control items.
+
+2009-04-28 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateControlCompilerTest.cs: added test for bug #498637
+
+2009-04-16 Marek Habersack <mhabersack at novell.com>
+
+ * TemplateControlCompilerTest.cs: added test for bug #493639
+
2008-12-08 Marek Habersack <mhabersack at novell.com>
* TemplateControlCompilerTest.cs: added another valid Bind
diff --git a/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs b/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs
index 17cbdbb..115cac7 100644
--- a/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using MonoTests.SystemWeb.Framework;
+using MonoTests.stand_alone.WebHarness;
using NUnit.Framework;
using System.Web;
using System.Web.Compilation;
@@ -52,6 +53,11 @@ namespace MonoTests.System.Web.Compilation {
WebTest.CopyResource (GetType (), "ReadOnlyPropertyBind.aspx", "ReadOnlyPropertyBind.aspx");
WebTest.CopyResource (GetType (), "ReadOnlyPropertyControl.ascx", "ReadOnlyPropertyControl.ascx");
WebTest.CopyResource (GetType (), "TemplateControlParsingTest.aspx", "TemplateControlParsingTest.aspx");
+ WebTest.CopyResource (GetType (), "ServerSideControlsInScriptBlock.aspx", "ServerSideControlsInScriptBlock.aspx");
+ WebTest.CopyResource (GetType (), "ServerControlInClientSideComment.aspx", "ServerControlInClientSideComment.aspx");
+ WebTest.CopyResource (GetType (), "UnquotedAngleBrackets.aspx", "UnquotedAngleBrackets.aspx");
+ WebTest.CopyResource (GetType (), "FullTagsInText.aspx", "FullTagsInText.aspx");
+ WebTest.CopyResource (GetType (), "TagsExpressionsAndCommentsInText.aspx", "TagsExpressionsAndCommentsInText.aspx");
#if NET_2_0
WebTest.CopyResource (GetType (), "InvalidPropertyBind1.aspx", "InvalidPropertyBind1.aspx");
WebTest.CopyResource (GetType (), "InvalidPropertyBind2.aspx", "InvalidPropertyBind2.aspx");
@@ -62,9 +68,12 @@ namespace MonoTests.System.Web.Compilation {
WebTest.CopyResource (GetType (), "ValidPropertyBind3.aspx", "ValidPropertyBind3.aspx");
WebTest.CopyResource (GetType (), "ValidPropertyBind4.aspx", "ValidPropertyBind4.aspx");
WebTest.CopyResource (GetType (), "ValidPropertyBind5.aspx", "ValidPropertyBind5.aspx");
+ WebTest.CopyResource (GetType (), "NoBindForMethodsWithBindInName.aspx", "NoBindForMethodsWithBindInName.aspx");
WebTest.CopyResource (GetType (), "ReadWritePropertyControl.ascx", "ReadWritePropertyControl.ascx");
WebTest.CopyResource (GetType (), "ContentPlaceHolderInTemplate.aspx", "ContentPlaceHolderInTemplate.aspx");
WebTest.CopyResource (GetType (), "ContentPlaceHolderInTemplate.master", "ContentPlaceHolderInTemplate.master");
+ WebTest.CopyResource (GetType (), "LinkInHeadWithEmbeddedExpression.aspx", "LinkInHeadWithEmbeddedExpression.aspx");
+ WebTest.CopyResource (GetType (), "ExpressionInListControl.aspx", "ExpressionInListControl.aspx");
#endif
}
@@ -143,7 +152,78 @@ namespace MonoTests.System.Web.Compilation {
{
new WebTest ("ValidPropertyBind5.aspx").Run ();
}
+
+ // bug #493639
+ [Test]
+ public void NoBindForMethodsWithBindInNameTest ()
+ {
+ string pageHtml = new WebTest ("NoBindForMethodsWithBindInName.aspx").Run ();
+ string renderedHtml = HtmlDiff.GetControlFromPageHtml (pageHtml);
+ string originalHtml = "<span id=\"grid_ctl02_lblTest\">Test</span>";
+
+ HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
+ }
+
+ // bug #498637
+ [Test]
+ public void LinkInHeadWithEmbeddedExpression ()
+ {
+ string pageHtml = new WebTest ("LinkInHeadWithEmbeddedExpression.aspx").Run ();
+ string renderedHtml = HtmlDiff.GetControlFromPageHtml (pageHtml);
+ string originalHtml = "<link href=\"Themes/Default/Content/Site.css\" rel=\"stylesheet\" type=\"text/css\" />";
+
+ HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
+ }
+
+ [Test]
+ public void ExpressionInListControl ()
+ {
+ string pageHtml = new WebTest ("ExpressionInListControl.aspx").Run ();
+ string renderedHtml = HtmlDiff.GetControlFromPageHtml (pageHtml);
+ string originalHtml = @"<select name=""DropDown1"" id=""DropDown1"">
+ <option value=""strvalue"">str</option>
+
+</select>";
+ HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
+ }
+
+ [Test (Description="Bug #508888")]
+ public void ServerSideControlsInScriptBlock ()
+ {
+ string pageHtml = new WebTest ("ServerSideControlsInScriptBlock.aspx").Run ();
+ string renderedHtml = HtmlDiff.GetControlFromPageHtml (pageHtml);
+ string originalHtml = @"<script type=""text/javascript"">alert (escape(""reporting/location?report=ViewsByDate&minDate=minDate&maxDate=maxDate""));</script>";
+ HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
+ }
#endif
+
+ [Test (Description="Bug #517656")]
+ public void ServerControlInClientSideComment ()
+ {
+ // We just test if it doesn't throw an exception
+ new WebTest ("ServerControlInClientSideComment.aspx").Run ();
+ }
+
+ [Test]
+ public void UnquotedAngleBrackets ()
+ {
+ // We just test if it doesn't throw an exception
+ new WebTest ("UnquotedAngleBrackets.aspx").Run ();
+ }
+
+ [Test]
+ public void FullTagsInText ()
+ {
+ // We just test if it doesn't throw an exception
+ new WebTest ("FullTagsInText.aspx").Run ();
+ }
+
+ [Test]
+ public void TagsExpressionsAndCommentsInText ()
+ {
+ // We just test if it doesn't throw an exception
+ new WebTest ("TagsExpressionsAndCommentsInText.aspx").Run ();
+ }
[Test]
public void ChildTemplatesTest ()
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
index 4075ff2..2d31993 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
@@ -1,3 +1,11 @@
+2009-03-17 Marek Habersack <mhabersack at novell.com>
+
+ * UnitTest.cs: added a test for equality with Unit.Empty
+
+2009-03-12 Marek Habersack <mhabersack at novell.com>
+
+ * EditCommandColumnTest.cs: ignore two tests, most likely broken.
+
2009-02-10 Marek Habersack <mhabersack at novell.com>
* ImageButtonTest.cs: added test for bug #463939
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/EditCommandColumnTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/EditCommandColumnTest.cs
index 50d7260..1c852b3 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/EditCommandColumnTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/EditCommandColumnTest.cs
@@ -400,6 +400,7 @@ namespace MonoTests.System.Web.UI.WebControls
[Test]
[Category ("NunitWeb")]
+ [Ignore ("Possibly incorrectly constructed test - conflicts with fix for bug #471305")]
public void Validation_ValidatingInvalid () {
WebTest t = new WebTest ();
PageDelegates pd = new PageDelegates ();
@@ -444,6 +445,7 @@ namespace MonoTests.System.Web.UI.WebControls
[Test]
[Category ("NunitWeb")]
+ [Ignore ("Possibly incorrectly constructed test - conflicts with fix for bug #471305")]
public void Validation_ValidationGroupIncluded () {
WebTest t = new WebTest ();
PageDelegates pd = new PageDelegates ();
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitTest.cs
index 298d189..85f70ca 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitTest.cs
@@ -203,6 +203,16 @@ namespace MonoTests.System.Web.UI.WebControls
// Test that its comparing the units and value
Assert.AreEqual (u2 != c2, true, "U5");
}
+
+ [Test]
+ public void UnitEqualityWithEmpty ()
+ {
+ Unit unit = Unit.Parse ("");
+ Assert.AreEqual (Unit.Empty, unit, "A1");
+
+ unit = Unit.Parse ("0px");
+ Assert.IsTrue (unit != Unit.Empty, "B1");
+ }
[Test]
public void UnitImplicit ()
diff --git a/mcs/class/System.Web/Test/System.Web.UI/ChangeLog b/mcs/class/System.Web/Test/System.Web.UI/ChangeLog
index 32e1a6f..b488138 100644
--- a/mcs/class/System.Web/Test/System.Web.UI/ChangeLog
+++ b/mcs/class/System.Web/Test/System.Web.UI/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-24 Marek Habersack <mhabersack at novell.com>
+
+ * PageParserFilterTest.cs: added
+
2009-01-21 Marek Habersack <mhabersack at novell.com>
* XhtmlTextWriterTest.cs: temporarily disabled the
diff --git a/mcs/class/System.Web/Test/System.Web.UI/PageParserFilterTest.cs b/mcs/class/System.Web/Test/System.Web.UI/PageParserFilterTest.cs
new file mode 100644
index 0000000..bf1b8ed
--- /dev/null
+++ b/mcs/class/System.Web/Test/System.Web.UI/PageParserFilterTest.cs
@@ -0,0 +1,100 @@
+//
+// Tests for System.Web.UI.WebControls.TemplateControlTest.cs
+//
+// Author:
+// Marek Habersack <mhabersack at novell.com>
+//
+//
+// Copyright (C) 2009 Novell, Inc (http://novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.IO;
+using System.Drawing;
+using MyWebControl = System.Web.UI.WebControls;
+using System.Collections;
+using MonoTests.SystemWeb.Framework;
+using NUnit.Framework;
+using MonoTests.stand_alone.WebHarness;
+using System.Threading;
+
+namespace MonoTests.System.Web.UI.WebControls
+{
+ class MyPageParserFilter : PageParserFilter
+ {
+ public int GetLine()
+ {
+ return Line;
+ }
+
+ public string GetVirtualPath()
+ {
+ return VirtualPath;
+ }
+ }
+
+ [TestFixture]
+ public class PageParserFilterTests
+ {
+ [Test]
+ public void Defaults ()
+ {
+ var ppf = new MyPageParserFilter ();
+
+ Assert.AreEqual (false, ppf.AllowCode, "#A1");
+ Assert.AreEqual (0, ppf.NumberOfControlsAllowed, "#A2");
+ Assert.AreEqual (0, ppf.NumberOfDirectDependenciesAllowed, "#A3");
+ Assert.AreEqual (0, ppf.TotalNumberOfDependenciesAllowed, "#A4");
+ Assert.AreEqual (false, ppf.AllowBaseType (typeof (Page)), "#A5");
+ Assert.AreEqual (false, ppf.AllowControl (typeof (Page), null), "#A6");
+ Assert.AreEqual (false, ppf.AllowServerSideInclude (String.Empty), "#A7");
+ Assert.AreEqual (false, ppf.AllowVirtualReference (String.Empty, VirtualReferenceType.Master), "#A8");
+ Assert.AreEqual (CompilationMode.Auto, ppf.GetCompilationMode (CompilationMode.Auto), "#A9");
+ Assert.AreEqual (null, ppf.GetNoCompileUserControlType (), "#A10");
+ Assert.AreEqual (false, ppf.ProcessCodeConstruct (CodeConstructType.ExpressionSnippet, String.Empty), "#A11");
+ Assert.AreEqual (false, ppf.ProcessDataBindingAttribute (String.Empty, String.Empty, String.Empty), "#A12");
+ Assert.AreEqual (false, ppf.ProcessEventHookup (String.Empty, String.Empty, String.Empty), "#A13");
+ }
+
+ [Test]
+ [ExpectedException (typeof (NullReferenceException))]
+ public void DefaultsNREX_1 ()
+ {
+ var ppf = new MyPageParserFilter ();
+ ppf.GetLine ();
+ }
+
+ [Test]
+ [ExpectedException (typeof (NullReferenceException))]
+ public void DefaultsNREX_2 ()
+ {
+ var ppf = new MyPageParserFilter ();
+ ppf.GetVirtualPath ();
+ }
+ }
+}
+#endif
diff --git a/mcs/class/System.Web/Test/System.Web/ChangeLog b/mcs/class/System.Web/Test/System.Web/ChangeLog
index cd13155..d12818a 100644
--- a/mcs/class/System.Web/Test/System.Web/ChangeLog
+++ b/mcs/class/System.Web/Test/System.Web/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-28 Marek Habersack <mhabersack at novell.com>
+
+ * HttpUtilityTest.cs: added test for bug #507666
+
2008-07-25 Dean Brettle <dean at brettle.com>
* AppBrowsersTest.cs: Added tests for bug where capabilities
diff --git a/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs b/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs
index fc55cb5..21d199a 100644
--- a/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs
+++ b/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs
@@ -320,6 +320,25 @@ namespace MonoTests.System.Web {
}
}
+ [Test (Description="Bug #507666")]
+ public void UrlDecode_Bug507666 ()
+ {
+ // Get Encoding object.
+ var enc_utf8 = Encoding.UTF8;
+ var enc_sjis = Encoding.GetEncoding(932);
+
+ // Generate equiv. client request query string with url-encoded shift_jis string.
+ var utf8_string = "ç´
è¶"; // it's UTF-8 string
+ var utf8_bin = enc_utf8.GetBytes(utf8_string); // convert to UTF-8 byte[]
+ var sjis_bin = Encoding.Convert(enc_utf8, enc_sjis, utf8_bin); // convert to Shift_jis byte[]
+ var urlenc_string = HttpUtility.UrlEncode(sjis_bin); // equiv. client request query string.
+
+ // Test using UrlDecode only.
+ var decoded_by_web = HttpUtility.UrlDecode(urlenc_string, enc_sjis);
+
+ Assert.AreEqual (utf8_string, decoded_by_web, "#A1");
+ }
+
[Test]
public void Decode1 ()
{
@@ -487,7 +506,7 @@ namespace MonoTests.System.Web {
}
#endif
-
+
#if NET_2_0
[Test]
#if TARGET_JVM
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx
new file mode 100644
index 0000000..ef06fc0
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ExpressionInListControl.aspx
@@ -0,0 +1,16 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head id="Head1" runat="server">
+ <title>Untitled Page</title>
+</head>
+<body>
+ <form id="form1" runat="server">
+ <div>
+ <%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:DropDownList runat="server" id="DropDown1"><asp:ListItem Text="<%$ AppSettings:strvalue %>" Value="strvalue"/></asp:DropDownList><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
+ </div>
+ </form>
+</body>
+</html>
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/FullTagsInText.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/FullTagsInText.aspx
new file mode 100644
index 0000000..2340cb0
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/FullTagsInText.aspx
@@ -0,0 +1,29 @@
+<%@ Page Language="C#" %>
+<script runat="server">
+ void Page_Load (object sender, EventArgs e)
+ {
+ if (lit1.Text != "literal")
+ throw new ApplicationException ("Invalid value of lit1");
+ if (lit2.Text != String.Empty)
+ throw new ApplicationException ("Invalid value of lit2");
+ }
+</script>
+<html><head><title>Tags in text with content</title></head>
+<script language="javascript" type="text/javascript">
+ var one = 1;
+ var two = 2;
+
+ var lit = <asp:Literal id="lit1" runat="server">literal</asp:Literal>
+</script>
+<body>
+<form runat="server">
+<script language="javascript" type="text/javascript">
+ var three = 3;
+ var four = 4;
+ var lit = <asp:Literal id="lit2" runat="server"></asp:Literal>
+
+ alert ("something");
+</script>
+</form>
+</body>
+</html>
\ No newline at end of file
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx
new file mode 100644
index 0000000..d0c109c
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/LinkInHeadWithEmbeddedExpression.aspx
@@ -0,0 +1,8 @@
+<%@ Page Language="C#" %>
+<html>
+<head runat="server"><title>Bug #498637</title>
+<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><link href="<%= Page.ResolveClientUrl("~/Themes/Default/Content/Site.css") %>" rel="stylesheet" type="text/css" /><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
+</head>
+<body>
+</body>
+</html>
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/NoBindForMethodsWithBindInName.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/NoBindForMethodsWithBindInName.aspx
new file mode 100644
index 0000000..0325202
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/NoBindForMethodsWithBindInName.aspx
@@ -0,0 +1,23 @@
+<%@ Page Language="C#" %>
+<script runat="server">
+ protected void Page_Load (object sender, EventArgs a)
+ {
+ grid.DataSource = new string[] {"one"};
+ grid.DataBind ();
+ }
+
+ protected string BindSomeText(object someObj) { return "Test"; }
+</script>
+<html><head><title>Bug 493639</title></head>
+<body>
+<form runat="server">
+ <asp:GridView runat="server" id="grid" AutoGenerateColumns="false">
+ <columns>
+ <asp:TemplateField>
+ <ItemTemplate><%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:Label runat="server" ID="lblTest" Text="<%# BindSomeText(Container.DataItem) %>" /><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %></ItemTemplate>
+ </asp:TemplateField>
+ </columns>
+ </asp:GridView>
+</form>
+</body>
+</html>
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx
new file mode 100644
index 0000000..84d2f5b
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ServerControlInClientSideComment.aspx
@@ -0,0 +1,36 @@
+<%@ Page Language = "C#" %>
+
+<html><head><title>Bug 517656</title><head><body>
+<p>ASP.NET repeater control to follow...</p>
+<asp:Repeater id="censusRepeater" runat="server">
+ <HeaderTemplate />
+ <ItemTemplate>
+ <tr>
+ <td><asp:Label id="idLabel" runat="server" /></td>
+ <td>
+ <asp:TextBox id="birthBox" runat="server" />
+ </td>
+ <!-- We do not ask if you are married
+ <td>
+ <asp:radiobuttonlist id="spouseRadioButtonList" runat="server">
+ <asp:listitem id="Married" runat="server" value="Yes" />
+ <asp:listitem id="Single" runat="server" value="No" />
+ </asp:radiobuttonlist>
+ <asp:Checkbox id="marriedCheckbox" runat="server" />
+ </td>
+ -->
+ <td>
+ <asp:TextBox id="spouseBirthBox" runat="server" />
+ </td>
+ <td>
+ <asp:DropDownList id="childrenDropDownList" runat="server">
+ <asp:listitem>0</asp:listitem>
+ <asp:listitem>1</asp:listitem>
+ <asp:listitem>2+</asp:listitem>
+ </asp:DropDownList>
+ </td>
+ </tr>
+ </ItemTemplate>
+ <FooterTemplate />
+</asp:Repeater>
+</body></html>
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx
new file mode 100644
index 0000000..39d4142
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ServerSideControlsInScriptBlock.aspx
@@ -0,0 +1,20 @@
+<%@ Page Language="C#" %>
+<html><head><title>Bug 508888</title></head>
+<body>
+<form runat="server">
+<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><script type="text/javascript">alert (escape("reporting/location?report=ViewsByDate&minDate=<asp:Literal id="minDate" runat="server"/>&maxDate=<asp:Literal id="maxDate" runat="server" />"));</script><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
+
+<script runat="server">
+
+ void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ minDate.Text = "minDate";
+ maxDate.Text = "maxDate";
+ }
+ }
+
+</script>
+</form>
+</body></html>
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx
new file mode 100644
index 0000000..94516a3
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/TagsExpressionsAndCommentsInText.aspx
@@ -0,0 +1,38 @@
+<%@ Page Language="C#" %>
+<script runat="server">
+ protected string expressionTest;
+
+ void Page_Load (object sender, EventArgs e)
+ {
+ if (SyncPath == null)
+ throw new ApplicationException ("Missing SyncPath");
+ if (newName == null)
+ throw new ApplicationException ("Missing newName");
+ if (newPublishStatus == null)
+ throw new ApplicationException ("Missing newPublishStatus");
+ }
+
+ string SetAndGetExpressionTest (string text)
+ {
+ expressionTest = text;
+ return text;
+ }
+</script>
+<html><head><title>Tags, expressions and comments in text</title></head>
+<body>
+<form runat="server">
+<script type="text/javascript">
+ <!-- some
+ comment
+ here
+ -->
+ parent.top.syncTree('<asp:Literal id="SyncPath" runat="server"></asp:Literal>', '<%= SetAndGetExpressionTest ("test") %>', '<asp:Literal id="newName" runat="server"></asp:Literal>', '<asp:Literal id="newPublishStatus" runat="server"></asp:Literal>');
+ </script>
+
+<%
+if (expressionTest != "test")
+ throw new ApplicationException ("expressionTest has invalid value");
+%>
+</form>
+</body>
+</html>
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/UnquotedAngleBrackets.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/UnquotedAngleBrackets.aspx
new file mode 100644
index 0000000..adfd023
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/UnquotedAngleBrackets.aspx
@@ -0,0 +1,13 @@
+<%@ Page Language="C#" %>
+<html>
+<head><title>unquoted angle brackets</title></head>
+<body>
+<form runat="server">
+<asp:DropDownList runat="server">
+<asp:ListItem Value=">"> > </asp:ListItem>
+<asp:ListItem Value="="> = </asp:ListItem>
+<asp:ListItem Value="<"> < </asp:ListItem>
+</asp:DropDownList>
+</form>
+</body>
+</html>
diff --git a/mcs/class/System.Web/resources/WebUIValidation_2.0.js b/mcs/class/System.Web/resources/WebUIValidation_2.0.js
index 0f30064..085f08d 100644
--- a/mcs/class/System.Web/resources/WebUIValidation_2.0.js
+++ b/mcs/class/System.Web/resources/WebUIValidation_2.0.js
@@ -508,21 +508,18 @@ webForm.RequiredFieldValidatorEvaluateIsValid = function (validator)
webForm.CustomValidatorEvaluateIsValid = function (validator)
{
var ControlToValidate = validator.controltovalidate;
-
- if (!ControlToValidate) {
- webForm.ValidatorSucceeded (validator);
- return true;
- }
-
var evaluationfunc = validator.clientvalidationfunction;
+ var ctrl_value;
- var ctrl_value = webForm.ValidatorTrim (webForm.ValidatorGetValue (ControlToValidate));
-
- if ((ctrl_value.length == 0) && ((typeof(validator.validateemptytext) != "string") || (validator.validateemptytext != "true"))) {
+ if (ControlToValidate) {
+ ctrl_value = webForm.ValidatorTrim (webForm.ValidatorGetValue (ControlToValidate));
+
+ if ((ctrl_value.length == 0) && ((typeof(validator.validateemptytext) != "string") || (validator.validateemptytext != "true"))) {
webForm.ValidatorSucceeded (validator);
return true;
- }
-
+ }
+ } else
+ ctrl_value = "";
var result = true;
if (evaluationfunc && evaluationfunc != "") {
diff --git a/mcs/class/System.XML/System.Xml.XPath/ChangeLog b/mcs/class/System.XML/System.Xml.XPath/ChangeLog
index f713326..d33b559 100644
--- a/mcs/class/System.XML/System.Xml.XPath/ChangeLog
+++ b/mcs/class/System.XML/System.Xml.XPath/ChangeLog
@@ -1,3 +1,10 @@
+2009-06-09 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * XPathExpression.cs: Backport to Mono 2.4 the bug fix
+ for multithreaded applications that use XPath.
+
+ This was the fix for #477049 which also fixes #505678
+
2009-01-20 Atsushi Enomoto <atsushi at ximian.com>
* Expression.cs : give up sortless iterator optimization.
diff --git a/mcs/class/System.XML/System.Xml.XPath/XPathExpression.cs b/mcs/class/System.XML/System.Xml.XPath/XPathExpression.cs
index fb0c32b..c846ad9 100644
--- a/mcs/class/System.XML/System.Xml.XPath/XPathExpression.cs
+++ b/mcs/class/System.XML/System.Xml.XPath/XPathExpression.cs
@@ -95,12 +95,8 @@ namespace System.Xml.XPath
internal static XPathExpression Compile (string xpath,
NSResolver nsmgr, IStaticXsltContext ctx)
{
- XPathExpression x = ExpressionCache.Get (xpath, ctx);
- if (x == null) {
- XPathParser parser = new XPathParser (ctx);
- x = new CompiledExpression (xpath, parser.Compile (xpath));
- ExpressionCache.Set (xpath, ctx, x);
- }
+ XPathParser parser = new XPathParser (ctx);
+ CompiledExpression x = new CompiledExpression (xpath, parser.Compile (xpath));
x.SetContext (nsmgr);
return x;
}
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog b/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
index b284c83..017963a 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-07 Jb Evain <jbevain at novell.com>
+
+ backport of r133710.
+
+ * XElement.cs (Load (XmlReader,LoadOptions)): prevent a NRE if
+ the provided XmlReader doesn't have existing settings.
+ Fixes #501589.
+
2009-02-23 Jb Evain <jbevain at novell.com>
backport of 127784.
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
index d5f65b9..46de86d 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
@@ -389,7 +389,7 @@ namespace System.Xml.Linq
public static XElement Load (XmlReader reader, LoadOptions options)
{
- XmlReaderSettings s = reader.Settings.Clone ();
+ XmlReaderSettings s = reader.Settings != null ? reader.Settings.Clone () : new XmlReaderSettings ();
s.ProhibitDtd = false;
s.IgnoreWhitespace = (options & LoadOptions.PreserveWhitespace) == 0;
using (XmlReader r = XmlReader.Create (reader, s)) {
diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
index 91d9bc7..4f64ccd 100644
--- a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
+++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
@@ -34,6 +34,7 @@ namespace Mono.CSharp
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
+ using System.ComponentModel;
using System.IO;
using System.Text;
using System.Reflection;
@@ -216,6 +217,22 @@ namespace Mono.CSharp
mcsOutput = new StringCollection ();
mcsOutMutex = new Mutex ();
#endif
+
+ string monoPath = Environment.GetEnvironmentVariable ("MONO_PATH");
+ if (monoPath == null)
+ monoPath = String.Empty;
+
+ string privateBinPath = AppDomain.CurrentDomain.SetupInformation.PrivateBinPath;
+ if (privateBinPath != null && privateBinPath.Length > 0)
+ monoPath = String.Format ("{0}:{1}", privateBinPath, monoPath);
+
+ if (monoPath.Length > 0) {
+ StringDictionary dict = mcs.StartInfo.EnvironmentVariables;
+ if (dict.ContainsKey ("MONO_PATH"))
+ dict ["MONO_PATH"] = monoPath;
+ else
+ dict.Add ("MONO_PATH", monoPath);
+ }
mcs.StartInfo.CreateNoWindow=true;
mcs.StartInfo.UseShellExecute=false;
@@ -227,7 +244,16 @@ namespace Mono.CSharp
try {
mcs.Start();
+ } catch (Exception e) {
+ Win32Exception exc = e as Win32Exception;
+ if (exc != null) {
+ throw new SystemException (String.Format ("Error running {0}: {1}", mcs.StartInfo.FileName,
+ Win32Exception.W32ErrorMessage (exc.NativeErrorCode)));
+ }
+ throw;
+ }
+ try {
#if NET_2_0
mcs.BeginOutputReadLine ();
mcs.BeginErrorReadLine ();
@@ -321,6 +347,10 @@ namespace Mono.CSharp
else
args.Append("/target:library ");
+ string privateBinPath = AppDomain.CurrentDomain.SetupInformation.PrivateBinPath;
+ if (privateBinPath != null && privateBinPath.Length > 0)
+ args.AppendFormat ("/lib:\"{0}\" ", privateBinPath);
+
if (options.Win32Resource != null)
args.AppendFormat("/win32res:\"{0}\" ",
options.Win32Resource);
diff --git a/mcs/class/System/Microsoft.CSharp/ChangeLog b/mcs/class/System/Microsoft.CSharp/ChangeLog
index 4bcf61e..c0372ea 100644
--- a/mcs/class/System/Microsoft.CSharp/ChangeLog
+++ b/mcs/class/System/Microsoft.CSharp/ChangeLog
@@ -1,3 +1,14 @@
+2009-04-22 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * CSharpCodeCompiler.cs: better error when there's a problem running
+ the specified exec.
+
+2009-04-17 Marek Habersack <mhabersack at novell.com>
+
+ * CSharpCodeCompiler.cs: pass current application's domain
+ PrivateBinPath to gmcs using its /lib parameter and put the same
+ value in the MONO_PATH environment variable. Fixes bug #493874
+
2008-10-28 Atsushi Enomoto <atsushi at ximian.com>
* CSharpCodeGenerator.cs : escape #pragma checksum argument literal
diff --git a/mcs/class/System/Microsoft.VisualBasic/ChangeLog b/mcs/class/System/Microsoft.VisualBasic/ChangeLog
index f733d95..9bffec8 100644
--- a/mcs/class/System/Microsoft.VisualBasic/ChangeLog
+++ b/mcs/class/System/Microsoft.VisualBasic/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-22 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * VBCodeCompiler.cs: better error when there's a problem running the
+ specified exec.
+
2008-04-30 Gert Driesen <drieseng at users.sourceforge.net>
* VBCodeGenerator.cs: Fixed generated code for abstract properties.
diff --git a/mcs/class/System/Microsoft.VisualBasic/VBCodeCompiler.cs b/mcs/class/System/Microsoft.VisualBasic/VBCodeCompiler.cs
index e3a1ebd..1a41ab3 100644
--- a/mcs/class/System/Microsoft.VisualBasic/VBCodeCompiler.cs
+++ b/mcs/class/System/Microsoft.VisualBasic/VBCodeCompiler.cs
@@ -35,6 +35,7 @@
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
+using System.ComponentModel;
using System.IO;
using System.Text;
using System.Reflection;
@@ -263,6 +264,16 @@ namespace Microsoft.VisualBasic
vbnc.StartInfo.RedirectStandardOutput = true;
try {
vbnc.Start ();
+ } catch (Exception e) {
+ Win32Exception exc = e as Win32Exception;
+ if (exc != null) {
+ throw new SystemException (String.Format ("Error running {0}: {1}", vbnc.StartInfo.FileName,
+ Win32Exception.W32ErrorMessage (exc.NativeErrorCode)));
+ }
+ throw;
+ }
+
+ try {
vbnc_output = vbnc.StandardOutput.ReadToEnd ();
vbnc.WaitForExit ();
} finally {
diff --git a/mcs/class/System/System.Collections.Generic/ChangeLog b/mcs/class/System/System.Collections.Generic/ChangeLog
index ed50dfd..466ff8e 100644
--- a/mcs/class/System/System.Collections.Generic/ChangeLog
+++ b/mcs/class/System/System.Collections.Generic/ChangeLog
@@ -1,3 +1,13 @@
+2009-07-14 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * SortedList.cs: the IComparar.Compare arguments were reversed.
+ Fixes bug #521750. Patch by Kevin Fitzgerald.
+
+2009-05-06 Pia Eriksson <pe at hallerud.se>
+
+ * SortedList.cs: Handle Count == 0 in CopyTo correcly
+ * SortedDictionary.cs: Handle Count == 0 in CopyTo correcly
+
2007-11-15 Roei Erez <roeie at mainsoft.com>
* Stack.cs: Performance improvement in the case where the stack is popped
diff --git a/mcs/class/System/System.Collections.Generic/SortedDictionary.cs b/mcs/class/System/System.Collections.Generic/SortedDictionary.cs
index ad097e4..3f75cf2 100644
--- a/mcs/class/System/System.Collections.Generic/SortedDictionary.cs
+++ b/mcs/class/System/System.Collections.Generic/SortedDictionary.cs
@@ -194,6 +194,8 @@ namespace System.Collections.Generic
public void CopyTo (KeyValuePair<TKey,TValue>[] array, int arrayIndex)
{
+ if (Count == 0)
+ return;
if (array == null)
throw new ArgumentNullException ();
if (arrayIndex < 0 || array.Length <= arrayIndex)
@@ -331,6 +333,8 @@ namespace System.Collections.Generic
void ICollection.CopyTo (Array array, int index)
{
+ if (Count == 0)
+ return;
if (array == null)
throw new ArgumentNullException ();
if (index < 0 || array.Length <= index)
@@ -399,6 +403,8 @@ namespace System.Collections.Generic
public void CopyTo (TValue [] array, int arrayIndex)
{
+ if (Count == 0)
+ return;
if (array == null)
throw new ArgumentNullException ();
if (arrayIndex < 0 || array.Length <= arrayIndex)
@@ -434,6 +440,8 @@ namespace System.Collections.Generic
void ICollection.CopyTo (Array array, int index)
{
+ if (Count == 0)
+ return;
if (array == null)
throw new ArgumentNullException ();
if (index < 0 || array.Length <= index)
@@ -524,6 +532,8 @@ namespace System.Collections.Generic
public void CopyTo (TKey [] array, int arrayIndex)
{
+ if (Count == 0)
+ return;
if (array == null)
throw new ArgumentNullException ();
if (arrayIndex < 0 || array.Length <= arrayIndex)
@@ -554,6 +564,8 @@ namespace System.Collections.Generic
void ICollection.CopyTo (Array array, int index)
{
+ if (Count == 0)
+ return;
if (array == null)
throw new ArgumentNullException ();
if (index < 0 || array.Length <= index)
diff --git a/mcs/class/System/System.Collections.Generic/SortedList.cs b/mcs/class/System/System.Collections.Generic/SortedList.cs
index f78d614..a7f9e0d 100644
--- a/mcs/class/System/System.Collections.Generic/SortedList.cs
+++ b/mcs/class/System/System.Collections.Generic/SortedList.cs
@@ -327,6 +327,9 @@ namespace System.Collections.Generic
void ICollection<KeyValuePair<TKey, TValue>>.CopyTo (KeyValuePair<TKey, TValue>[] array, int arrayIndex)
{
+ if (Count == 0)
+ return;
+
if (null == array)
throw new ArgumentNullException();
@@ -421,6 +424,9 @@ namespace System.Collections.Generic
void ICollection.CopyTo (Array array, int arrayIndex)
{
+ if (Count == 0)
+ return;
+
if (null == array)
throw new ArgumentNullException();
@@ -637,10 +643,10 @@ namespace System.Collections.Generic
while (left <= right) {
int guess = (left + right) >> 1;
- int cmp = comparer.Compare (key, table[guess].Key);
+ int cmp = comparer.Compare (table[guess].Key, key);
if (cmp == 0) return guess;
- if (cmp > 0) left = guess+1;
+ if (cmp < 0) left = guess+1;
else right = guess-1;
}
diff --git a/mcs/class/System/System.ComponentModel/ChangeLog b/mcs/class/System/System.ComponentModel/ChangeLog
index baa5e8b..42f2b70 100644
--- a/mcs/class/System/System.ComponentModel/ChangeLog
+++ b/mcs/class/System/System.ComponentModel/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-22 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Win32Exception.cs: made W32ErrorMessage internal.
+
2009-02-21 Jb Evain <jbevain at novell.com>
* EventHandlerList.cs: fix the 1.1 profile.
diff --git a/mcs/class/System/System.ComponentModel/Win32Exception.cs b/mcs/class/System/System.ComponentModel/Win32Exception.cs
index e05aa27..fb1cff3 100644
--- a/mcs/class/System/System.ComponentModel/Win32Exception.cs
+++ b/mcs/class/System/System.ComponentModel/Win32Exception.cs
@@ -110,6 +110,6 @@ namespace System.ComponentModel
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- static extern string W32ErrorMessage (int error_code);
+ internal static extern string W32ErrorMessage (int error_code);
}
}
diff --git a/mcs/class/System/System.Configuration/ChangeLog b/mcs/class/System/System.Configuration/ChangeLog
index 864801a..d1affb8 100644
--- a/mcs/class/System/System.Configuration/ChangeLog
+++ b/mcs/class/System/System.Configuration/ChangeLog
@@ -1,3 +1,12 @@
+2009-05-10 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * CustomizableFileSettingsProvider.cs: make sure 'values' is
+ initialized in Reset(). Fixes bug #436592.
+
+2009-04-03 Marek Habersack <mhabersack at novell.com>
+
+ * CustomizableFileSettingsProvider.cs: added a way for System.Web
+ to specify path to the current Web.config. Fixes bug #491531
2008-11-20 Gonzalo Paniagua Javier <gonzalo at novell.com>
diff --git a/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs b/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
index 8b4990f..49e6238 100644
--- a/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
+++ b/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
@@ -71,6 +71,17 @@ namespace System.Configuration
internal class CustomizableFileSettingsProvider : SettingsProvider, IApplicationSettingsProvider
{
+ // KLUDGE WARNING.
+ //
+ // This is used from within System.Web to allow mapping of the ExeConfigFilename to
+ // the correct Web.config for the current request. Otherwise web applications will
+ // not be able to access settings from Web.config. The type assigned to this
+ // variable must descend from the ConfigurationFileMap class and its
+ // MachineConfigFilename will be used to set the ExeConfigFilename.
+ //
+ // This is necessary to fix bug #491531
+ private static Type webConfigurationFileMapType;
+
private static string userRoamingPath = "";
private static string userLocalPath = "";
private static string userRoamingPathPrevVersion = "";
@@ -783,12 +794,26 @@ namespace System.Configuration
// current version
exeMapCurrent = new ExeConfigurationFileMap ();
+
// exeMapCurrent.ExeConfigFilename = System.Windows.Forms.Application.ExecutablePath + ".config";
Assembly entry = Assembly.GetEntryAssembly () ?? Assembly.GetExecutingAssembly ();
exeMapCurrent.ExeConfigFilename = entry.Location + ".config";
exeMapCurrent.LocalUserConfigFilename = UserLocalFullPath;
exeMapCurrent.RoamingUserConfigFilename = UserRoamingFullPath;
+ if (webConfigurationFileMapType != null && typeof (ConfigurationFileMap).IsAssignableFrom (webConfigurationFileMapType)) {
+ try {
+ ConfigurationFileMap cfgFileMap = Activator.CreateInstance (webConfigurationFileMapType) as ConfigurationFileMap;
+ if (cfgFileMap != null) {
+ string fpath = cfgFileMap.MachineConfigFilename;
+ if (!String.IsNullOrEmpty (fpath))
+ exeMapCurrent.ExeConfigFilename = fpath;
+ }
+ } catch {
+ // ignore
+ }
+ }
+
// previous version
if ((PrevUserLocalFullPath != "") && (PrevUserRoamingFullPath != ""))
{
@@ -809,7 +834,8 @@ namespace System.Configuration
public void Reset (SettingsContext context)
{
- CreateExeMap ();
+ SettingsPropertyCollection coll = new SettingsPropertyCollection ();
+ GetPropertyValues (context, coll);
foreach (SettingsPropertyValue propertyValue in values) {
propertyValue.PropertyValue = propertyValue.Property.DefaultValue;
propertyValue.IsDirty = true;
diff --git a/mcs/class/System/System.Diagnostics/ChangeLog b/mcs/class/System/System.Diagnostics/ChangeLog
index e2371a7..90bcd49 100644
--- a/mcs/class/System/System.Diagnostics/ChangeLog
+++ b/mcs/class/System/System.Diagnostics/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-28 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * ConsoleTraceListener.cs: add an internal constructor that takes a
+ string argument. Used when 'initializeData' is set.
+ * DiagnosticsConfigurationHandler.cs: try internal constructors when
+ the assembly is System.
+ Fixes bug #498853.
+
2009-01-22 Zoltan Varga <vargaz at gmail.com>
Backport of r124260.
diff --git a/mcs/class/System/System.Diagnostics/ConsoleTraceListener.cs b/mcs/class/System/System.Diagnostics/ConsoleTraceListener.cs
index eb4143a..3c523b2 100644
--- a/mcs/class/System/System.Diagnostics/ConsoleTraceListener.cs
+++ b/mcs/class/System/System.Diagnostics/ConsoleTraceListener.cs
@@ -33,7 +33,10 @@ namespace System.Diagnostics {
public ConsoleTraceListener () : this (false) {}
public ConsoleTraceListener (bool useErrorStream) :
base (useErrorStream ? Console.Error : Console.Out) {}
+
+ internal ConsoleTraceListener (string data) :
+ this (Convert.ToBoolean (data)) {}
}
}
-#endif
\ No newline at end of file
+#endif
diff --git a/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs b/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
index 15988c2..3dd95ad 100644
--- a/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
+++ b/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
@@ -35,6 +35,7 @@ using System;
using System.Collections;
using System.Collections.Specialized;
using System.Configuration;
+using System.Reflection;
using System.Threading;
#if (XML_DEP)
using System.Xml;
@@ -454,7 +455,11 @@ namespace System.Diagnostics
types = Type.EmptyTypes;
}
- System.Reflection.ConstructorInfo ctor = t.GetConstructor (types);
+ BindingFlags flags = BindingFlags.Public | BindingFlags.Instance;
+ if (t.Assembly == GetType ().Assembly)
+ flags |= BindingFlags.NonPublic;
+
+ ConstructorInfo ctor = t.GetConstructor (flags, null, types, null);
if (ctor == null)
throw new ConfigurationException ("Couldn't find constructor for class " + type);
diff --git a/mcs/class/System/System.IO/ChangeLog b/mcs/class/System/System.IO/ChangeLog
index efca2b1..e42bbdf 100644
--- a/mcs/class/System/System.IO/ChangeLog
+++ b/mcs/class/System/System.IO/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-04 Marek Habersack <mhabersack at novell.com>
+
+ * InotifyWatcher.cs: filter pattern should be matched on file name
+ alone, not on the relative path of the file triggering the
+ event. Fixes bug #509998
+
2009-03-11 Gonzalo Paniagua Javier <gonzalo at novell.com>
* InotifyWatcher.cs: don't send events when a directory is created
diff --git a/mcs/class/System/System.IO/InotifyWatcher.cs b/mcs/class/System/System.IO/InotifyWatcher.cs
index e636da2..f58cc43 100644
--- a/mcs/class/System/System.IO/InotifyWatcher.cs
+++ b/mcs/class/System/System.IO/InotifyWatcher.cs
@@ -547,7 +547,7 @@ namespace System.IO {
}
}
- if (filename != data.Directory && !fsw.Pattern.IsMatch (filename)) {
+ if (filename != data.Directory && !fsw.Pattern.IsMatch (Path.GetFileName (filename))) {
continue;
}
diff --git a/mcs/class/System/System.Net.NetworkInformation/ChangeLog b/mcs/class/System/System.Net.NetworkInformation/ChangeLog
index 56b29b0..e68bdd3 100644
--- a/mcs/class/System/System.Net.NetworkInformation/ChangeLog
+++ b/mcs/class/System/System.Net.NetworkInformation/ChangeLog
@@ -1,3 +1,13 @@
+2009-05-03 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Ping.cs: we just need the address(es), not a host entry. This avoids
+ querying the DNS server(s) when the target is an IP address.
+
+2009-03-24 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Ping.cs: MacOS has different arguments for ping.
+ Bug #486904 fixed.
+
2009-01-26 Christian Prochnow <cproch at seculogix.de>
* Ping.cs: ignore ICMP echo request packet in case we ping
diff --git a/mcs/class/System/System.Net.NetworkInformation/Ping.cs b/mcs/class/System/System.Net.NetworkInformation/Ping.cs
index 177e9e1..09b2d8a 100644
--- a/mcs/class/System/System.Net.NetworkInformation/Ping.cs
+++ b/mcs/class/System/System.Net.NetworkInformation/Ping.cs
@@ -161,8 +161,8 @@ namespace System.Net.NetworkInformation {
public PingReply Send (string hostNameOrAddress, int timeout, byte [] buffer, PingOptions options)
{
- IPAddress address = Dns.GetHostEntry (hostNameOrAddress).AddressList [0];
- return Send (address, timeout, buffer, options);
+ IPAddress [] addresses = Dns.GetHostAddresses (hostNameOrAddress);
+ return Send (addresses [0], timeout, buffer, options);
}
static IPAddress GetNonLoopbackIP ()
@@ -477,8 +477,21 @@ namespace System.Net.NetworkInformation {
CultureInfo culture = CultureInfo.InvariantCulture;
StringBuilder args = new StringBuilder ();
uint t = Convert.ToUInt32 (Math.Floor ((timeout + 1000) / 1000.0));
- args.AppendFormat (culture, "-q -n -c {0} -w {1} -t {2} -M ", DefaultCount, t, options.Ttl);
- args.Append (options.DontFragment ? "do " : "dont ");
+#if NET_2_0
+ bool is_mac = ((int) Environment.OSVersion.Platform == 6);
+ if (!is_mac)
+#endif
+ args.AppendFormat (culture, "-q -n -c {0} -w {1} -t {2} -M ", DefaultCount, t, options.Ttl);
+#if NET_2_0
+ else
+ args.AppendFormat (culture, "-q -n -c {0} -t {1} -o -m {2} ", DefaultCount, t, options.Ttl);
+ if (!is_mac)
+#endif
+ args.Append (options.DontFragment ? "do " : "dont ");
+#if NET_2_0
+ else if (options.DontFragment)
+ args.Append ("-D ");
+#endif
args.Append (address.ToString ());
diff --git a/mcs/class/System/System.Net.Sockets/ChangeLog b/mcs/class/System/System.Net.Sockets/ChangeLog
index dcbe4fc..4bc7fab 100644
--- a/mcs/class/System/System.Net.Sockets/ChangeLog
+++ b/mcs/class/System/System.Net.Sockets/ChangeLog
@@ -1,3 +1,32 @@
+2009-05-11 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * TcpClient.cs:
+ * Socket.cs:
+ * UdpClient.cs: use GetHostAddresses() instead of Resolve or
+ GetHostEntry.
+
+2009-05-11 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * UdpClient.cs: if possible, avoid DNS lookups when the host name is
+ an IP address. Related to bug #502866.
+
+2009-04-30 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Socket.cs: return the last error if a connect to multiple addresses
+ fails.
+
+2009-04-21 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Socket.cs: End* methods can only be called once per IAsyncResult.
+ Bug #466031 fixed.
+
+2009-02-17 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Socket.cs: instead of clearing the sockets form the output and then
+ adding them back, we just remove the ones that have not been signaled.
+ Fixes bug #354090 and bug #476138.
+
+
2009-02-17 Gonzalo Paniagua Javier <gonzalo at novell.com>
* Socket.cs: instead of clearing the sockets form the output and then
diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs
index 76f32a0..1cb400a 100644
--- a/mcs/class/System/System.Net.Sockets/Socket.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket.cs
@@ -123,6 +123,7 @@ namespace System.Net.Sockets
internal int error;
SocketOperation operation;
public object ares;
+ public int EndCalled;
public SocketAsyncResult (Socket sock, object state, AsyncCallback callback, SocketOperation operation)
{
@@ -428,10 +429,10 @@ namespace System.Net.Sockets
result.Complete ();
} else if (result.Addresses != null) {
+ int error = (int) SocketError.InProgress; // why?
foreach(IPAddress address in result.Addresses) {
IPEndPoint iep = new IPEndPoint (address, result.Port);
SocketAddress serial = iep.Serialize ();
- int error = 0;
Socket.Connect_internal (result.Sock.socket, serial, out error);
if (error == 0) {
@@ -456,7 +457,7 @@ namespace System.Net.Sockets
}
}
- result.Complete (new SocketException ((int)SocketError.InProgress));
+ result.Complete (new SocketException (error));
} else {
result.Complete (new SocketException ((int)SocketError.AddressNotAvailable));
}
@@ -1671,8 +1672,8 @@ namespace System.Net.Sockets
if (islistening)
throw new InvalidOperationException ();
- IPHostEntry hostent = Dns.GetHostEntry (host);
- return (BeginConnect (hostent.AddressList, port, callback, state));
+ IPAddress [] addresses = Dns.GetHostAddresses (host);
+ return (BeginConnect (addresses, port, callback, state));
}
public IAsyncResult BeginDisconnect (bool reuseSocket,
@@ -2229,8 +2230,8 @@ namespace System.Net.Sockets
public void Connect (string host, int port)
{
- IPHostEntry hostent = Dns.GetHostEntry (host);
- Connect (hostent.AddressList, port);
+ IPAddress [] addresses = Dns.GetHostAddresses (host);
+ Connect (addresses, port);
}
#if NET_2_0
@@ -2327,6 +2328,8 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
+ if (Interlocked.CompareExchange (ref req.EndCalled, 1, 0) == 1)
+ throw InvalidAsyncOp ("EndAccept");
if (!asyncResult.IsCompleted)
asyncResult.AsyncWaitHandle.WaitOne ();
@@ -2350,6 +2353,8 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "result");
+ if (Interlocked.CompareExchange (ref req.EndCalled, 1, 0) == 1)
+ throw InvalidAsyncOp ("EndConnect");
if (!result.IsCompleted)
result.AsyncWaitHandle.WaitOne();
@@ -2369,6 +2374,8 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
+ if (Interlocked.CompareExchange (ref req.EndCalled, 1, 0) == 1)
+ throw InvalidAsyncOp ("EndDisconnect");
if (!asyncResult.IsCompleted)
asyncResult.AsyncWaitHandle.WaitOne ();
@@ -2400,6 +2407,8 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
+ if (Interlocked.CompareExchange (ref req.EndCalled, 1, 0) == 1)
+ throw InvalidAsyncOp ("EndReceive");
if (!asyncResult.IsCompleted)
asyncResult.AsyncWaitHandle.WaitOne ();
@@ -2421,6 +2430,8 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "result");
+ if (Interlocked.CompareExchange (ref req.EndCalled, 1, 0) == 1)
+ throw InvalidAsyncOp ("EndReceiveFrom");
if (!result.IsCompleted)
result.AsyncWaitHandle.WaitOne();
@@ -2449,6 +2460,8 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
+ if (Interlocked.CompareExchange (ref req.EndCalled, 1, 0) == 1)
+ throw InvalidAsyncOp ("EndReceiveMessageFrom");
throw new NotImplementedException ();
}
#endif
@@ -2477,6 +2490,8 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "result");
+ if (Interlocked.CompareExchange (ref req.EndCalled, 1, 0) == 1)
+ throw InvalidAsyncOp ("EndSend");
if (!asyncResult.IsCompleted)
asyncResult.AsyncWaitHandle.WaitOne ();
@@ -2500,10 +2515,17 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
+ if (Interlocked.CompareExchange (ref req.EndCalled, 1, 0) == 1)
+ throw InvalidAsyncOp ("EndSendFile");
throw new NotImplementedException ();
}
#endif
+ Exception InvalidAsyncOp (string method)
+ {
+ return new InvalidOperationException (method + " can only be called once per asynchronous operation");
+ }
+
public int EndSendTo (IAsyncResult result)
{
if (disposed && closed)
@@ -2516,6 +2538,8 @@ namespace System.Net.Sockets
if (req == null)
throw new ArgumentException ("Invalid IAsyncResult", "result");
+ if (Interlocked.CompareExchange (ref req.EndCalled, 1, 0) == 1)
+ throw InvalidAsyncOp ("EndSendTo");
if (!result.IsCompleted)
result.AsyncWaitHandle.WaitOne();
diff --git a/mcs/class/System/System.Net.Sockets/TcpClient.cs b/mcs/class/System/System.Net.Sockets/TcpClient.cs
index 3a6b0e4..21c8ad5 100644
--- a/mcs/class/System/System.Net.Sockets/TcpClient.cs
+++ b/mcs/class/System/System.Net.Sockets/TcpClient.cs
@@ -314,9 +314,8 @@ namespace System.Net.Sockets
public void Connect (string hostname, int port)
{
- IPHostEntry host = Dns.GetHostByName(hostname);
-
- Connect (host.AddressList, port);
+ IPAddress [] addresses = Dns.GetHostAddresses (hostname);
+ Connect (addresses, port);
}
#if NET_2_0
diff --git a/mcs/class/System/System.Net.Sockets/UdpClient.cs b/mcs/class/System/System.Net.Sockets/UdpClient.cs
index 207a467..5102cae 100644
--- a/mcs/class/System/System.Net.Sockets/UdpClient.cs
+++ b/mcs/class/System/System.Net.Sockets/UdpClient.cs
@@ -181,7 +181,7 @@ namespace System.Net.Sockets
if (port < IPEndPoint.MinPort || port > IPEndPoint.MaxPort)
throw new ArgumentOutOfRangeException ("port");
- IPAddress[] addresses = Dns.Resolve (hostname).AddressList;
+ IPAddress[] addresses = Dns.GetHostAddresses (hostname);
for(int i=0; i<addresses.Length; i++) {
try {
this.family = addresses[i].AddressFamily;
@@ -380,7 +380,7 @@ namespace System.Net.Sockets
public int Send (byte [] dgram, int bytes, string hostname, int port)
{
return Send (dgram, bytes,
- new IPEndPoint (Dns.Resolve (hostname).AddressList [0], port));
+ new IPEndPoint (Dns.GetHostAddresses (hostname) [0], port));
}
private byte [] CutArray (byte [] orig, int length)
@@ -449,7 +449,7 @@ namespace System.Net.Sockets
AsyncCallback requestCallback,
object state)
{
- return(BeginSend (datagram, bytes, new IPEndPoint (Dns.Resolve (hostname).AddressList[0], port), requestCallback, state));
+ return(BeginSend (datagram, bytes, new IPEndPoint (Dns.GetHostAddresses (hostname) [0], port), requestCallback, state));
}
public int EndSend (IAsyncResult asyncResult)
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog
index 7c962f4..d03db9e 100644
--- a/mcs/class/System/System.Net/ChangeLog
+++ b/mcs/class/System/System.Net/ChangeLog
@@ -1,3 +1,57 @@
+2009-06-17 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * EndPointListener.cs: call CheckIfRemove() after removing a regular
+ prefix. Fixes bug #513849.
+ * EndPointManager.cs: make sure we use the right lock when one prefix
+ of a collection fails to be added and we need to remove all of the
+ prefixes.
+ Clear the ip_to_endpoints hashtable if there are no more prefixes
+ listening on that address.
+
+2009-06-05 Robert Jordan <robertj at gmx.net>
+
+ * WebClient.cs (UploadValuesCore): Encode POST arguments with UTF-8.
+ Fixes bug #484795.
+
+2009-06-02 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * HttpWebRequest.cs: KeepAlive check not needed.
+ Fixes bug #465613.
+
+2009-06-02 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * HttpConnection.cs: unbind the context after every read for keep-alive
+ connections.
+ Bug #502274 fixed.
+
+2009-05-16 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * HttpWebResponse.cs:
+ * HttpWebRequest.cs: support automatic decompression of the response.
+ Fixes bug #504391.
+
+
+2009-05-11 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Dns.cs: made GetHostAddresses and friends internal for 1.x
+ * EndpointPermission.cs: use GetHostAddresses.
+
+2009-05-10 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * CookieContainer.cs: matching hosts to domain names like MS does.
+ Bug #421827 fixed.
+
+2009-04-06 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * FtpWebRequest.cs: send REST after PASV to avoid some servers
+ forgetting aboout it.
+ Bug #491590 fixed.
+
+2009-03-24 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * FtpWebRequest.cs: we were sending CWD instead of PWD.
+ Bug #486703 fixed.
+
2009-02-23 Gonzalo Paniagua Javier <gonzalo at novell.com>
* WebClient.cs: append the QueryString in DownloadData.
diff --git a/mcs/class/System/System.Net/CookieContainer.cs b/mcs/class/System/System.Net/CookieContainer.cs
index afe2a95..846c0c5 100644
--- a/mcs/class/System/System.Net/CookieContainer.cs
+++ b/mcs/class/System/System.Net/CookieContainer.cs
@@ -251,20 +251,23 @@ namespace System.Net
static bool CheckDomain (string domain, string host)
{
- if (domain != "" && domain [0] != '.')
- return (String.Compare (domain, host, true, CultureInfo.InvariantCulture) == 0);
-
- int dot = host.IndexOf ('.');
- if (dot == -1)
- return (String.Compare (host, domain, true, CultureInfo.InvariantCulture) == 0);
+ if (domain == String.Empty)
+ return false;
- if (dot == 0 && String.Compare ("." + host, domain, true, CultureInfo.InvariantCulture) == 0)
- return true;
-
- if (host.Length < domain.Length)
+ int hlen = host.Length;
+ int dlen = domain.Length;
+ if (hlen < dlen)
return false;
- string subdomain = host.Substring (host.Length - domain.Length);
+ if (hlen == dlen)
+ return (String.Compare (domain, host, true, CultureInfo.InvariantCulture) == 0);
+
+ if (domain [0] != '.') {
+ domain = "." + domain;
+ dlen++;
+ }
+
+ string subdomain = host.Substring (hlen - dlen);
return (String.Compare (subdomain, domain, true, CultureInfo.InvariantCulture) == 0);
}
@@ -280,8 +283,7 @@ namespace System.Net
foreach (Cookie cookie in cookies) {
string domain = cookie.Domain;
- string host = uri.Host;
- if (!CheckDomain (domain, host))
+ if (!CheckDomain (domain, uri.Host))
continue;
if (cookie.Port != "" && cookie.Ports != null && uri.Port != -1) {
diff --git a/mcs/class/System/System.Net/Dns.cs b/mcs/class/System/System.Net/Dns.cs
index 34e8d41..c6e9f1b 100644
--- a/mcs/class/System/System.Net/Dns.cs
+++ b/mcs/class/System/System.Net/Dns.cs
@@ -285,7 +285,11 @@ namespace System.Net {
}
#if NET_2_0
- public static IPHostEntry GetHostEntry (string hostNameOrAddress)
+ public
+#else
+ internal
+#endif
+ static IPHostEntry GetHostEntry (string hostNameOrAddress)
{
if (hostNameOrAddress == null)
throw new ArgumentNullException ("hostNameOrAddress");
@@ -302,7 +306,12 @@ namespace System.Net {
return GetHostByName (hostNameOrAddress);
}
- public static IPHostEntry GetHostEntry (IPAddress address)
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ static IPHostEntry GetHostEntry (IPAddress address)
{
if (address == null)
throw new ArgumentNullException ("address");
@@ -310,7 +319,12 @@ namespace System.Net {
return GetHostByAddressFromString (address.ToString (), false);
}
- public static IPAddress [] GetHostAddresses (string hostNameOrAddress)
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ static IPAddress [] GetHostAddresses (string hostNameOrAddress)
{
if (hostNameOrAddress == null)
throw new ArgumentNullException ("hostNameOrAddress");
@@ -327,7 +341,6 @@ namespace System.Net {
return GetHostEntry (hostNameOrAddress).AddressList;
}
-#endif
#if NET_2_0
[Obsolete ("Use GetHostEntry instead")]
diff --git a/mcs/class/System/System.Net/EndPointListener.cs b/mcs/class/System/System.Net/EndPointListener.cs
index 23aff25..16f4ea0 100644
--- a/mcs/class/System/System.Net/EndPointListener.cs
+++ b/mcs/class/System/System.Net/EndPointListener.cs
@@ -307,6 +307,7 @@ namespace System.Net {
if (prefixes.ContainsKey (prefix)) {
prefixes.Remove (prefix);
+ CheckIfRemove ();
}
}
}
diff --git a/mcs/class/System/System.Net/EndPointManager.cs b/mcs/class/System/System.Net/EndPointManager.cs
index ea33ff9..33c5940 100644
--- a/mcs/class/System/System.Net/EndPointManager.cs
+++ b/mcs/class/System/System.Net/EndPointManager.cs
@@ -52,7 +52,7 @@ namespace System.Net {
}
} catch {
foreach (string prefix in added) {
- RemovePrefixInternal (prefix, listener);
+ RemovePrefix (prefix, listener);
}
throw;
}
@@ -107,6 +107,9 @@ namespace System.Net {
Hashtable p = null;
p = (Hashtable) ip_to_endpoints [ep.Address];
p.Remove (ep.Port);
+ if (p.Count == 0) {
+ ip_to_endpoints.Remove (ep.Address);
+ }
epl.Close ();
}
}
diff --git a/mcs/class/System/System.Net/EndpointPermission.cs b/mcs/class/System/System.Net/EndpointPermission.cs
index 1e0a6f9..80b0fb4 100644
--- a/mcs/class/System/System.Net/EndpointPermission.cs
+++ b/mcs/class/System/System.Net/EndpointPermission.cs
@@ -327,7 +327,7 @@ namespace System.Net
if (isHostname) {
this.hasWildcard = false;
try {
- this.addresses = Dns.GetHostByName (hostname).AddressList;
+ this.addresses = Dns.GetHostAddresses (hostname);
} catch (System.Net.Sockets.SocketException) {
}
} else {
diff --git a/mcs/class/System/System.Net/FtpWebRequest.cs b/mcs/class/System/System.Net/FtpWebRequest.cs
index e25259f..20ae470 100644
--- a/mcs/class/System/System.Net/FtpWebRequest.cs
+++ b/mcs/class/System/System.Net/FtpWebRequest.cs
@@ -635,7 +635,7 @@ namespace System.Net
FtpStatus status;
if (method == WebRequestMethods.Ftp.PrintWorkingDirectory)
- method = ChangeDir;
+ method = "PWD";
if (method == WebRequestMethods.Ftp.Rename)
method = RenameFromCommand;
@@ -719,14 +719,6 @@ namespace System.Net
{
State = RequestState.OpeningData;
- // Handle content offset
- if (offset > 0) {
- FtpStatus status = SendCommand (RestCommand, offset.ToString ());
-
- if (status.StatusCode != FtpStatusCode.FileCommandPending)
- throw CreateExceptionFromResponse (status);
- }
-
OpenDataConnection ();
State = RequestState.TransferInProgress;
@@ -937,6 +929,13 @@ namespace System.Net
Socket s = InitDataConnection ();
+ // Handle content offset
+ if (offset > 0) {
+ status = SendCommand (RestCommand, offset.ToString ());
+ if (status.StatusCode != FtpStatusCode.FileCommandPending)
+ throw CreateExceptionFromResponse (status);
+ }
+
if (method != WebRequestMethods.Ftp.ListDirectory && method != WebRequestMethods.Ftp.ListDirectoryDetails &&
method != WebRequestMethods.Ftp.UploadFileWithUniqueName) {
status = SendCommand (method, file_name);
diff --git a/mcs/class/System/System.Net/HttpConnection.cs b/mcs/class/System/System.Net/HttpConnection.cs
index 56579dc..76df53a 100644
--- a/mcs/class/System/System.Net/HttpConnection.cs
+++ b/mcs/class/System/System.Net/HttpConnection.cs
@@ -302,6 +302,14 @@ namespace System.Net {
SendError (context.ErrorMessage, context.ErrorStatus);
}
+ void Unbind ()
+ {
+ if (context_bound) {
+ epl.UnbindContext (context);
+ context_bound = false;
+ }
+ }
+
public void Close ()
{
if (sock != null) {
@@ -314,6 +322,7 @@ namespace System.Net {
if (chunked && context.Response.ForceCloseChunked == false) {
// Don't close. Keep working.
chunked_uses++;
+ Unbind ();
Init ();
BeginReadRequest ();
return;
@@ -328,14 +337,13 @@ namespace System.Net {
} finally {
s.Close ();
}
+ Unbind ();
} else {
+ Unbind ();
Init ();
BeginReadRequest ();
return;
}
-
- if (context_bound)
- epl.UnbindContext (context);
}
}
}
diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs
index fc840a3..5d410dc 100644
--- a/mcs/class/System/System.Net/HttpWebRequest.cs
+++ b/mcs/class/System/System.Net/HttpWebRequest.cs
@@ -98,6 +98,9 @@ namespace System.Net
object locker = new object ();
bool is_ntlm_auth;
bool finished_reading;
+#if NET_2_0
+ DecompressionMethods auto_decomp;
+#endif
#if NET_1_1
int maxResponseHeadersLength;
static int defaultMaxResponseHeadersLength;
@@ -192,14 +195,14 @@ namespace System.Net
return new NotImplementedException ();
}
- [MonoTODO]
public DecompressionMethods AutomaticDecompression
{
get {
- throw GetMustImplement ();
+ return auto_decomp;
}
set {
- throw GetMustImplement ();
+ CheckRequestStarted ();
+ auto_decomp = value;
}
}
#endif
@@ -741,7 +744,7 @@ namespace System.Net
{
bool send = (method == "PUT" || method == "POST");
if (send) {
- if ((!KeepAlive || (ContentLength == -1 && !SendChunked)) && !AllowWriteStreamBuffering)
+ if (ContentLength == -1 && !SendChunked && !AllowWriteStreamBuffering)
throw new ProtocolViolationException ("Content-Length not set");
}
@@ -1024,6 +1027,15 @@ namespace System.Net
webHeaders.SetInternal ("Cookie", cookieHeader);
}
+#if NET_2_0
+ string accept_encoding = null;
+ if ((auto_decomp & DecompressionMethods.GZip) != 0)
+ accept_encoding = "gzip";
+ if ((auto_decomp & DecompressionMethods.Deflate) != 0)
+ accept_encoding = accept_encoding != null ? "gzip, deflate" : "deflate";
+ if (accept_encoding != null)
+ webHeaders.SetInternal ("Accept-Encoding", accept_encoding);
+#endif
if (!usedPreAuth && preAuthenticate)
DoPreAuthenticate ();
diff --git a/mcs/class/System/System.Net/HttpWebResponse.cs b/mcs/class/System/System.Net/HttpWebResponse.cs
index 33028dd..8eb5b7f 100644
--- a/mcs/class/System/System.Net/HttpWebResponse.cs
+++ b/mcs/class/System/System.Net/HttpWebResponse.cs
@@ -39,6 +39,9 @@ using System.IO;
using System.Net.Sockets;
using System.Runtime.Serialization;
using System.Text;
+#if NET_2_0
+using System.IO.Compression;
+#endif
namespace System.Net
{
@@ -89,6 +92,13 @@ namespace System.Net
this.cookie_container = container;
FillCookies ();
}
+#if NET_2_0
+ string content_encoding = webHeaders ["Content-Encoding"];
+ if (content_encoding == "gzip" && (data.request.AutomaticDecompression & DecompressionMethods.GZip) != 0)
+ stream = new GZipStream (stream, CompressionMode.Decompress);
+ else if (content_encoding == "deflate" && (data.request.AutomaticDecompression & DecompressionMethods.Deflate) != 0)
+ stream = new DeflateStream (stream, CompressionMode.Decompress);
+#endif
}
#if NET_2_0
diff --git a/mcs/class/System/System.Net/WebClient.cs b/mcs/class/System/System.Net/WebClient.cs
index ab04d82..4b46f4c 100644
--- a/mcs/class/System/System.Net/WebClient.cs
+++ b/mcs/class/System/System.Net/WebClient.cs
@@ -741,10 +741,10 @@ namespace System.Net
Stream rqStream = request.GetRequestStream ();
MemoryStream tmpStream = new MemoryStream ();
foreach (string key in data) {
- byte [] bytes = Encoding.ASCII.GetBytes (key);
+ byte [] bytes = Encoding.UTF8.GetBytes (key);
UrlEncodeAndWrite (tmpStream, bytes);
tmpStream.WriteByte ((byte) '=');
- bytes = Encoding.ASCII.GetBytes (data [key]);
+ bytes = Encoding.UTF8.GetBytes (data [key]);
UrlEncodeAndWrite (tmpStream, bytes);
tmpStream.WriteByte ((byte) '&');
}
diff --git a/mcs/class/System/Test/System.Collections.Generic/ChangeLog b/mcs/class/System/Test/System.Collections.Generic/ChangeLog
index 91d200f..f278bb5 100644
--- a/mcs/class/System/Test/System.Collections.Generic/ChangeLog
+++ b/mcs/class/System/Test/System.Collections.Generic/ChangeLog
@@ -1,3 +1,13 @@
+2009-05-06 Pia Eriksson <pe at hallerud.se>
+
+ * SortedListTest.cs: Added test for CopyTo
+ * LinkedListTest.cs: Test for CopyTo extended w. case when Count == 0
+ * LinkedListTest.cs: Test for CopyTo extended w. case when Count == 0
+ * QueueTest.cs: Test for CopyTo extended w. case when Count == 0
+ * StackTest.cs: Test for CopyTo extended w. case when Count == 0
+ * SortedDictionaryTest.cs: Added test for CopyTo on SortedDictionary,
+ SortedDictionary.Keys and SortedDictionary.Values
+
2007-08-20 Jb Evain <jbevain at novell.com>
* SortedListTest.cs: Tests for #82492.
diff --git a/mcs/class/System/Test/System.Collections.Generic/LinkedListTest.cs b/mcs/class/System/Test/System.Collections.Generic/LinkedListTest.cs
index b96e94a..088cdea 100644
--- a/mcs/class/System/Test/System.Collections.Generic/LinkedListTest.cs
+++ b/mcs/class/System/Test/System.Collections.Generic/LinkedListTest.cs
@@ -127,6 +127,10 @@ namespace MonoTests.System.Collections.Generic
intlist.CopyTo (output, 0);
for (int i = 0; i < 3; i++)
Assert.AreEqual (values [i], output [i]);
+
+ LinkedList <int> l = new LinkedList <int> ();
+ values = new int [l.Count];
+ l.CopyTo (values, 0);
}
[Test]
diff --git a/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs b/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs
index e1aaa71..f32f5ad 100644
--- a/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs
+++ b/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs
@@ -110,6 +110,14 @@ namespace MonoTests.System.Collections.Generic {
Assert.AreEqual (10, x [0], "#1");
Assert.AreEqual (1, x [1], "#2");
Assert.AreEqual (2, x [2], "#3");
+
+ z = new Queue <int> ();
+ x = new int [z.Count];
+ z.CopyTo (x, 0);
+
+ ICollection c = new Queue <int> ();
+ x = new int [c.Count];
+ c.CopyTo (x, 0);
}
[Test]
diff --git a/mcs/class/System/Test/System.Collections.Generic/SortedDictionaryTest.cs b/mcs/class/System/Test/System.Collections.Generic/SortedDictionaryTest.cs
index 53a67a4..af38b8d 100644
--- a/mcs/class/System/Test/System.Collections.Generic/SortedDictionaryTest.cs
+++ b/mcs/class/System/Test/System.Collections.Generic/SortedDictionaryTest.cs
@@ -249,6 +249,30 @@ namespace MonoTests.System.Collections.Generic
}
[Test]
+ public void CopyTo ()
+ {
+ SortedDictionary<int,string> d =
+ new SortedDictionary<int,string> ();
+ d.Add (1, "A");
+ KeyValuePair <int, string> [] array =
+ new KeyValuePair <int, string> [d.Count];
+ d.CopyTo (array, 0);
+ Assert.AreEqual (1, array.Length);
+ Assert.AreEqual (1, array [0].Key);
+ Assert.AreEqual ("A", array [0].Value);
+
+ d = new SortedDictionary<int,string> ();
+ array = new KeyValuePair <int, string> [d.Count];
+ d.CopyTo (array, 0);
+ Assert.AreEqual (0, array.Length);
+
+ ICollection c = new SortedDictionary<int,string> ();
+ array = new KeyValuePair <int, string> [c.Count];
+ c.CopyTo (array, 0);
+ Assert.AreEqual (0, array.Length);
+ }
+
+ [Test]
[ExpectedException (typeof (ArgumentNullException))]
public void IDictionaryAddKeyNull ()
{
@@ -311,6 +335,24 @@ namespace MonoTests.System.Collections.Generic
col.Remove (1);
}
+ [Test]
+ public void KeysICollectionCopyTo ()
+ {
+ SortedDictionary<int,string> d = new SortedDictionary<int, string> ();
+ d.Add (1, "A");
+ ICollection<int> col = d.Keys;
+ int[] array = new int [col.Count];
+ col.CopyTo (array, 0);
+ Assert.AreEqual (1, array.Length);
+ Assert.AreEqual (1, array [0]);
+
+ // Bug #497720
+ d = new SortedDictionary<int, string> ();
+ col = d.Keys;
+ array = new int [col.Count];
+ col.CopyTo (array, 0);
+ }
+
[Test]
[ExpectedException (typeof (NotSupportedException))]
public void ValuesICollectionAdd ()
@@ -341,6 +383,23 @@ namespace MonoTests.System.Collections.Generic
col.Remove ("A");
}
+ [Test]
+ public void ValuesICollectionCopyTo ()
+ {
+ SortedDictionary<int,string> d = new SortedDictionary<int,string> ();
+ d.Add (1, "A");
+ ICollection<string> col = d.Values;
+ string[] array = new string [col.Count];
+ col.CopyTo (array, 0);
+ Assert.AreEqual (1, array.Length);
+ Assert.AreEqual ("A", array [0]);
+
+ d = new SortedDictionary<int,string> ();
+ col = d.Values;
+ array = new string [col.Count];
+ col.CopyTo (array, 0);
+ }
+
[Test]
public void KeysGetEnumerator1 ()
{
diff --git a/mcs/class/System/Test/System.Collections.Generic/SortedListTest.cs b/mcs/class/System/Test/System.Collections.Generic/SortedListTest.cs
index 2b43086..d7a30c7 100644
--- a/mcs/class/System/Test/System.Collections.Generic/SortedListTest.cs
+++ b/mcs/class/System/Test/System.Collections.Generic/SortedListTest.cs
@@ -275,6 +275,33 @@ namespace MonoTests.System.Collections.Generic
Assert.AreEqual ("B", values [1]);
Assert.AreEqual ("C", values [2]);
}
+ public void CopyTo ()
+ {
+ ICollection<KeyValuePair<int, string>> col1 =
+ list as ICollection<KeyValuePair<int, string>>;
+ KeyValuePair <int, string> [] array1 =
+ new KeyValuePair <int, string> [col1.Count];
+ col1.CopyTo (array1, 0);
+ Assert.AreEqual (3, array1.Length);
+
+ ICollection col = list as ICollection;
+ array1 = new KeyValuePair <int, string> [col.Count];
+ col.CopyTo (array1, 0);
+ Assert.AreEqual (3, array1.Length);
+
+ ICollection<KeyValuePair<string, int>> col2 =
+ list2 as ICollection<KeyValuePair<string, int>>;
+ KeyValuePair <string, int> [] array2 =
+ new KeyValuePair <string, int> [col2.Count];
+ col2.CopyTo (array2, 0);
+ Assert.AreEqual (0, array2.Length);
+
+ col = list2 as ICollection;
+ array2 = new KeyValuePair <string, int> [col.Count];
+ col.CopyTo (array2, 0);
+ Assert.AreEqual (0, array2.Length);
+ }
+
}
}
diff --git a/mcs/class/System/Test/System.Collections.Generic/StackTest.cs b/mcs/class/System/Test/System.Collections.Generic/StackTest.cs
index 0c79ffd..a20d01e 100644
--- a/mcs/class/System/Test/System.Collections.Generic/StackTest.cs
+++ b/mcs/class/System/Test/System.Collections.Generic/StackTest.cs
@@ -103,6 +103,14 @@ namespace MonoTests.System.Collections.Generic
Assert.AreEqual (10, x [0], "#1");
Assert.AreEqual (2, x [1], "#2");
Assert.AreEqual (1, x [2], "#3");
+
+ z = new Stack <int> ();
+ x = new int [z.Count];
+ z.CopyTo (x, 0);
+
+ ICollection c = new Stack <int> ();
+ x = new int [c.Count];
+ c.CopyTo (x, 0);
}
[Test]
diff --git a/mcs/class/System/Test/System.Net/ChangeLog b/mcs/class/System/Test/System.Net/ChangeLog
index 4834aef..b9e0ecd 100644
--- a/mcs/class/System/Test/System.Net/ChangeLog
+++ b/mcs/class/System/Test/System.Net/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-21 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * DnsTest.cs: new IP for go-mono and fix AsyncResolve test.
+
2009-02-08 Gert Driesen <drieseng at users.sourceforge.net>
* DnsTest.cs: Use Assert syntax, and spaces to tabs. Added tests
diff --git a/mcs/class/System/Test/System.Net/DnsTest.cs b/mcs/class/System/Test/System.Net/DnsTest.cs
index b914a19..3312d5f 100644
--- a/mcs/class/System/Test/System.Net/DnsTest.cs
+++ b/mcs/class/System/Test/System.Net/DnsTest.cs
@@ -29,7 +29,7 @@ namespace MonoTests.System.Net
public class DnsTest
{
private String site1Name = "www.go-mono.com",
- site1Dot = "130.57.21.12",
+ site1Dot = "130.57.21.18",
site2Name = "info.diku.dk",
site2Dot = "130.225.96.4",
noneExistingSite = "www.unlikely.novell.com";
@@ -63,7 +63,7 @@ namespace MonoTests.System.Net
IAsyncResult async = Dns.BeginResolve (site1Dot, null, null);
IPHostEntry entry = Dns.EndResolve (async);
SubTestValidIPHostEntry (entry);
- Assert.AreEqual (site1Dot, entry.HostName);
+ Assert.AreEqual (site1Dot, entry.AddressList [0].ToString ());
}
void ResolveCallback (IAsyncResult ar)
@@ -260,9 +260,11 @@ namespace MonoTests.System.Net
}
[Test]
+/*** Current go-mono.com IP works fine here***
#if ONLY_1_1
[ExpectedException (typeof (SocketException))]
#endif
+********/
public void GetHostByAddressString5 ()
{
Dns.GetHostByAddress (site1Dot);
diff --git a/mcs/class/corlib/ChangeLog b/mcs/class/corlib/ChangeLog
index 8442ea4..b79f3b1 100644
--- a/mcs/class/corlib/ChangeLog
+++ b/mcs/class/corlib/ChangeLog
@@ -1,3 +1,22 @@
+2009-04-25 Miguel de Icaza <miguel at novell.com>
+
+ Backport of r129367
+
+ * Convert.cs (ToType): Control whether this internal function will
+ call an IConvertible.ToType method or not.
+
+ Classes and structs implementing IConvertible in mscorlib (the
+ only callers that can access Convert.ToType) must pass false to
+ avoid a infinite recursion problem and callers from the public
+ Convert API must call it with true.
+
+ This fixes the regression reported in #485377 that was introduced
+ by the fix for #481687.
+
+ * Int16.cs, UInt64.cs, Double.cs, Enum.cs, SByte.cs, UInt16.cs,
+ Byte.cs, Decimal.cs, Int32.cs, String.cs, Int64.cs, Char.cs,
+ Boolean.cs, Single.cs, UInt32.cs: Update the call sites.
+
2008-11-15 Jonathan Pryor <jpryor at novell.com>
* Documentation/en/**: Flush; changes due to mdoc-update
diff --git a/mcs/class/corlib/System.Collections.Generic/ChangeLog b/mcs/class/corlib/System.Collections.Generic/ChangeLog
index 77d7c5f..07e16d1 100644
--- a/mcs/class/corlib/System.Collections.Generic/ChangeLog
+++ b/mcs/class/corlib/System.Collections.Generic/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-02 Jb Evain <jbevain at novell.com>
+
+ backport of r130884 and r130886.
+
+ * Dictionary.cs (ValueCollection.CopyTo): fix for copying to
+ an object array. Based on a patch by Tobias Grimm <mono at e-tobi.net>.
+ Fixes bug #328036.
+
2008-11-14 Jb Evain <jbevain at novell.com>
* Dictionary.cs (ICollection.CopyTo): fix the different possible
diff --git a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs
index 6e41570..1726798 100644
--- a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs
+++ b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs
@@ -960,8 +960,15 @@ namespace System.Collections.Generic {
void ICollection.CopyTo (Array array, int index)
{
+ var target = array as TKey [];
+ if (target != null) {
+ CopyTo (target, index);
+ return;
+ }
+
IList list = array;
CopyToCheck (list, index);
+
for (int i = 0; i < dictionary.touchedSlots; i++) {
if ((dictionary.linkSlots [i].HashCode & HASH_FLAG) != 0)
list [index++] = dictionary.keySlots [i];
@@ -1035,17 +1042,22 @@ namespace System.Collections.Generic {
this.dictionary = dictionary;
}
- public void CopyTo (TValue [] array, int index)
+ void CopyToCheck (IList array, int index)
{
if (array == null)
throw new ArgumentNullException ("array");
if (index < 0)
throw new ArgumentOutOfRangeException ("index");
// we want no exception for index==array.Length && dictionary.Count == 0
- if (index > array.Length)
+ if (index > array.Count)
throw new ArgumentException ("index larger than largest valid index of array");
- if (array.Length - index < dictionary.Count)
+ if (array.Count - index < dictionary.Count)
throw new ArgumentException ("Destination array cannot hold the requested elements!");
+ }
+
+ public void CopyTo (TValue [] array, int index)
+ {
+ CopyToCheck (array, index);
for (int i = 0; i < dictionary.touchedSlots; i++) {
if ((dictionary.linkSlots [i].HashCode & HASH_FLAG) != 0)
@@ -1085,7 +1097,19 @@ namespace System.Collections.Generic {
void ICollection.CopyTo (Array array, int index)
{
- CopyTo ((TValue []) array, index);
+ var target = array as TValue [];
+ if (target != null) {
+ CopyTo (target, index);
+ return;
+ }
+
+ IList list = array;
+ CopyToCheck (list, index);
+
+ for (int i = 0; i < dictionary.touchedSlots; i++) {
+ if ((dictionary.linkSlots [i].HashCode & HASH_FLAG) != 0)
+ list [index++] = dictionary.valueSlots [i];
+ }
}
IEnumerator IEnumerable.GetEnumerator ()
diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog b/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog
index 4efbb6a..9275b85 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-16 Sebastien Pouliot <sebastien at ximian.com>
+
+ * IsolatedStorageFile.cs: Fix thread-safety issue at creation time.
+ [Fix bug #431039]
+ * IsolatedStorageFileStream.cs: Fix missing path check in Verify.
+ [Fix bug #487659]
+ [Backport of SVN r131886]
+
2008-12-23 Sebastien Pouliot <sebastien at ximian.com>
* IsolatedStorageFile.cs: Use Url as the default evidence type when
diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
index e97b218..240e30f 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
@@ -37,6 +37,7 @@ using System.Security.Cryptography;
using System.Security.Permissions;
using System.Security.Policy;
using System.Text;
+using System.Threading;
using Mono.Security.Cryptography;
@@ -56,6 +57,7 @@ namespace System.IO.IsolatedStorage {
private bool _resolved;
private ulong _maxSize;
private Evidence _fullEvidences;
+ private static Mutex mutex = new Mutex ();
public static IEnumerator GetEnumerator (IsolatedStorageScope scope)
{
@@ -392,8 +394,12 @@ namespace System.IO.IsolatedStorage {
// identities have been selected
directory = new DirectoryInfo (root);
if (!directory.Exists) {
- directory.Create ();
- SaveIdentities (root);
+ try {
+ directory.Create ();
+ SaveIdentities (root);
+ }
+ catch (IOException) {
+ }
}
}
@@ -646,10 +652,9 @@ namespace System.IO.IsolatedStorage {
if (!File.Exists (root + ".storage"))
throw new IsolatedStorageException (Locale.GetText ("Missing identities."));
+ BinaryFormatter deformatter = new BinaryFormatter ();
using (FileStream fs = File.OpenRead (root + ".storage")) {
- BinaryFormatter deformatter = new BinaryFormatter ();
Identities identities = (Identities) deformatter.Deserialize (fs);
- fs.Close ();
_applicationIdentity = identities.Application;
_assemblyIdentity = identities.Assembly;
@@ -661,10 +666,15 @@ namespace System.IO.IsolatedStorage {
private void SaveIdentities (string root)
{
Identities identities = new Identities (_applicationIdentity, _assemblyIdentity, _domainIdentity);
- using (FileStream fs = File.OpenWrite (root + ".storage")) {
- BinaryFormatter formatter = new BinaryFormatter ();
- formatter.Serialize (fs, identities);
- fs.Close ();
+ BinaryFormatter formatter = new BinaryFormatter ();
+ mutex.WaitOne ();
+ try {
+ using (FileStream fs = File.Create (root + ".storage")) {
+ formatter.Serialize (fs, identities);
+ }
+ }
+ finally {
+ mutex.ReleaseMutex ();
}
}
}
diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs
index fe5bced..24d640f 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs
@@ -80,6 +80,12 @@ namespace System.IO.IsolatedStorage {
// other directories (provided by 'path') must already exists
string file = Path.Combine (isf.Root, path);
+
+ string full = Path.GetFullPath (file);
+ full = Path.GetFullPath (file);
+ if (!full.StartsWith (isf.Root))
+ throw new IsolatedStorageException ();
+
fi = new FileInfo (file);
if (!fi.Directory.Exists) {
// don't leak the path information for isolated storage
@@ -245,4 +251,4 @@ namespace System.IO.IsolatedStorage {
}
}
}
-#endif
\ No newline at end of file
+#endif
diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog
index 5b71726..8bb5078 100644
--- a/mcs/class/corlib/System.IO/ChangeLog
+++ b/mcs/class/corlib/System.IO/ChangeLog
@@ -1,3 +1,20 @@
+2009-05-05 Miguel de Icaza <miguel at novell.com>
+
+ * Contribution from David Uvalle <david.uvalle at gmail.com> that
+ implements FileInfo.Replace.
+
+2009-04-25 Miguel de Icaza <miguel at novell.com>
+
+ * StreamReader.cs (DataAvailable): New internal function to work
+ around the fact that StreamReaders are now blocking on Peek(), and
+ that our own Console.TermInfoDriver used Peek() as a way of
+ probing if there was data on a stream before to avoid blocking. o
+
+2009-04-24 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * StreamReader.cs: if Peek() needs to block, do it.
+ Fixes bug #496905.
+
2009-02-24 Gonzalo Paniagua Javier <gonzalo at novell.com>
* StringReader.cs: LF followed by CR is 2 lines.
diff --git a/mcs/class/corlib/System.IO/FileInfo.cs b/mcs/class/corlib/System.IO/FileInfo.cs
index 18b88ae..6dc3fe9 100644
--- a/mcs/class/corlib/System.IO/FileInfo.cs
+++ b/mcs/class/corlib/System.IO/FileInfo.cs
@@ -286,7 +286,32 @@ namespace System.IO {
public FileInfo Replace (string destinationFileName,
string destinationBackupFileName)
{
- throw new NotImplementedException ();
+ string destinationFullPath = null;
+ if (!Exists)
+ throw new FileNotFoundException ();
+ if (destinationFileName == null)
+ throw new ArgumentNullException ("destinationFileName");
+ if (destinationFileName.Length == 0)
+ throw new ArgumentException ("An empty file name is not valid.", "destinationFileName");
+
+ destinationFullPath = Path.GetFullPath (destinationFileName);
+
+ if (!File.Exists (destinationFullPath))
+ throw new FileNotFoundException ();
+
+ FileAttributes attrs = File.GetAttributes (destinationFullPath);
+
+ if ( (attrs & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
+ throw new UnauthorizedAccessException ();
+
+ if (destinationBackupFileName != null) {
+ if (destinationBackupFileName.Length == 0)
+ throw new ArgumentException ("An empty file name is not valid.", "destinationBackupFileName");
+ File.Copy (destinationFullPath, Path.GetFullPath (destinationBackupFileName), true);
+ }
+ File.Copy (FullPath, destinationFullPath,true);
+ File.Delete (FullPath);
+ return new FileInfo (destinationFullPath);
}
[ComVisible (false)]
diff --git a/mcs/class/corlib/System.IO/StreamReader.cs b/mcs/class/corlib/System.IO/StreamReader.cs
index 8e7f0e7..0a67ef1 100644
--- a/mcs/class/corlib/System.IO/StreamReader.cs
+++ b/mcs/class/corlib/System.IO/StreamReader.cs
@@ -362,12 +362,21 @@ namespace System.IO {
{
if (base_stream == null)
throw new ObjectDisposedException ("StreamReader", "Cannot read from a closed StreamReader");
- if (pos >= decoded_count && (mayBlock || ReadBuffer () == 0))
+ if (pos >= decoded_count && ReadBuffer () == 0)
return -1;
return decoded_buffer [pos];
}
+ //
+ // Used internally by our console, as it previously depended on Peek() being a
+ // routine that would not block.
+ //
+ internal bool DataAvailable ()
+ {
+ return pos < decoded_count;
+ }
+
public override int Read ()
{
if (base_stream == null)
diff --git a/mcs/class/corlib/System.Reflection/Binder.cs b/mcs/class/corlib/System.Reflection/Binder.cs
index 898d4ad..91f3bf0 100644
--- a/mcs/class/corlib/System.Reflection/Binder.cs
+++ b/mcs/class/corlib/System.Reflection/Binder.cs
@@ -253,6 +253,11 @@ namespace System.Reflection
return true;
}
+#if NET_2_0
+ if (to.IsGenericType && to.GetGenericTypeDefinition () == typeof (Nullable<>) && to.GetGenericArguments ()[0] == from)
+ return true;
+#endif
+
TypeCode fromt = Type.GetTypeCode (from);
TypeCode tot = Type.GetTypeCode (to);
diff --git a/mcs/class/corlib/System.Reflection/ChangeLog b/mcs/class/corlib/System.Reflection/ChangeLog
index dcf56bc..c785740 100644
--- a/mcs/class/corlib/System.Reflection/ChangeLog
+++ b/mcs/class/corlib/System.Reflection/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-11 Zoltan Varga <vargaz at gmail.com>
+
+ Backport of r129069.
+
+ * Binder.cs: Allow conversions from T to T?. Fixes #484294.
+
2008-02-28 Rodrigo Kumpera <rkumpera at novell.com>
* MonoProperty.cs (GetValue): Don't use the delegate optimization for valuetypes.
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Lifetime/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting.Lifetime/ChangeLog
index 59d91b2..161152a 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Lifetime/ChangeLog
+++ b/mcs/class/corlib/System.Runtime.Remoting.Lifetime/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-06 Lluis Sanchez Gual <lluis at novell.com>
+
+ * Lease.cs: Don't use ArrayList.Remove() to remove sponsors because
+ it will end calling Equals, which may crash if the sponsor is not
+ available anymore. Just compare references.
+
2008-04-02 Andreas Nahr <ClassDevelopment at A-SoftTech.com>
* ClientSponsor.cs: Fix parameter names
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Lifetime/Lease.cs b/mcs/class/corlib/System.Runtime.Remoting.Lifetime/Lease.cs
index 48a2f72..484846d 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Lifetime/Lease.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting.Lifetime/Lease.cs
@@ -139,7 +139,15 @@ namespace System.Runtime.Remoting.Lifetime
{
lock (this) {
if (_sponsors == null) return;
- _sponsors.Remove (obj);
+
+ // Don't use ArrayList.Remove() here because it will end calling Equals, which may
+ // crash if the sponsor is not available anymore
+ for (int n=0; n < _sponsors.Count; n++) {
+ if (object.ReferenceEquals (_sponsors [n], obj)) {
+ _sponsors.RemoveAt (n);
+ break;
+ }
+ }
}
}
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Proxies/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting.Proxies/ChangeLog
index e2f1bf6..dbcffd8 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Proxies/ChangeLog
+++ b/mcs/class/corlib/System.Runtime.Remoting.Proxies/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-06 Lluis Sanchez Gual <lluis at novell.com>
+
+ * RealProxy.cs: If async dispatch crashes, don't propagate the
+ exception. The exception will be raised when calling EndInvoke.
+
2008-04-02 Andreas Nahr <ClassDevelopment at A-SoftTech.com>
* ProxyAttribute.cs: Fix parameter names
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs b/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs
index a97ab10..39823ff 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs
@@ -189,13 +189,26 @@ namespace System.Runtime.Remoting.Proxies
if (null == res_msg)
{
- res_msg = (IMethodReturnMessage)rp.Invoke (msg);
-
+ bool failed = false;
+
+ try {
+ res_msg = (IMethodReturnMessage)rp.Invoke (msg);
+ } catch (Exception ex) {
+ failed = true;
+ if (call_type == CallType.BeginInvoke) {
+ // If async dispatch crashes, don't propagate the exception.
+ // The exception will be raised when calling EndInvoke.
+ mMsg.AsyncResult.SyncProcessMessage (new ReturnMessage (ex, msg as IMethodCallMessage));
+ res_msg = new ReturnMessage (null, null, 0, null, msg as IMethodCallMessage);
+ } else
+ throw;
+ }
+
// Note, from begining this code used AsyncResult.IsCompleted for
// checking if it was a remoting or custom proxy, but in some
// cases the remoting proxy finish before the call returns
// causing this method to be called, therefore causing all kind of bugs.
- if ((!is_remproxy) && call_type == CallType.BeginInvoke)
+ if ((!is_remproxy) && call_type == CallType.BeginInvoke && !failed)
{
IMessage asyncMsg = null;
diff --git a/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ChangeLog b/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ChangeLog
index 1353b32..71c4fdb 100644
--- a/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ChangeLog
+++ b/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-29 Zoltan Varga <vargaz at gmail.com>
+
+ * CodeGenerator.cs: Add synchronization as SRE is not thread safe.
+
2008-09-17 Robert Jordan <robertj at gmx.net>>
* ObjectReader.cs (ReadTypeMetadata): Replace the check for
diff --git a/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/CodeGenerator.cs b/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/CodeGenerator.cs
index 4693736..feb8ffa 100644
--- a/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/CodeGenerator.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/CodeGenerator.cs
@@ -41,6 +41,8 @@ namespace System.Runtime.Serialization.Formatters.Binary
internal class CodeGenerator
{
// Code generation
+
+ static object monitor = new object ();
static ModuleBuilder _module;
@@ -54,7 +56,14 @@ namespace System.Runtime.Serialization.Formatters.Binary
_module = myAsmBuilder.DefineDynamicModule("__MetadataTypesModule", false);
}
- static public Type GenerateMetadataType (Type type, StreamingContext context)
+ static public Type GenerateMetadataType (Type type, StreamingContext context) {
+ /* SRE is not thread safe */
+ lock (monitor) {
+ return GenerateMetadataTypeInternal (type, context);
+ }
+ }
+
+ static public Type GenerateMetadataTypeInternal (Type type, StreamingContext context)
{
string name = type.Name + "__TypeMetadata";
string sufix = "";
@@ -253,7 +262,7 @@ namespace System.Runtime.Serialization.Formatters.Binary
ig.Emit (OpCodes.Ldind_Ref);
}
- public static void EmitWriteTypeSpec (ILGenerator gen, Type type, string member)
+ static void EmitWriteTypeSpec (ILGenerator gen, Type type, string member)
{
// WARNING Keep in sync with WriteTypeSpec
diff --git a/mcs/class/corlib/System.Threading/WaitHandle.cs b/mcs/class/corlib/System.Threading/WaitHandle.cs
index 75a1b20..2d7f4f4 100644
--- a/mcs/class/corlib/System.Threading/WaitHandle.cs
+++ b/mcs/class/corlib/System.Threading/WaitHandle.cs
@@ -171,6 +171,19 @@ namespace System.Threading
#if NET_2_0
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
+ public static int WaitAny(WaitHandle[] waitHandles, TimeSpan timeout)
+ {
+ return WaitAny (waitHandles, timeout, false);
+ }
+
+ [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
+ public static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout)
+ {
+ return WaitAny (waitHandles, millisecondsTimeout, false);
+ }
+#endif
+#if NET_2_0
+ [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
#endif
public static int WaitAny(WaitHandle[] waitHandles,
TimeSpan timeout, bool exitContext)
@@ -190,7 +203,6 @@ namespace System.Threading
}
}
- [MonoTODO]
#if NET_2_0
protected
#else
@@ -338,6 +350,11 @@ namespace System.Threading
return WaitOne (millisecondsTimeout, false);
}
+ public virtual bool WaitOne (TimeSpan timeout)
+ {
+ return WaitOne (timeout, false);
+ }
+
public virtual bool WaitOne(TimeSpan timeout, bool exitContext)
{
CheckDisposed ();
diff --git a/mcs/class/corlib/System/AppDomain.cs b/mcs/class/corlib/System/AppDomain.cs
index c82a92d..09e176b 100644
--- a/mcs/class/corlib/System/AppDomain.cs
+++ b/mcs/class/corlib/System/AppDomain.cs
@@ -73,6 +73,9 @@ namespace System {
[ThreadStatic]
static Hashtable assembly_resolve_in_progress;
+ [ThreadStatic]
+ static Hashtable assembly_resolve_in_progress_refonly;
+
// CAS
private Evidence _evidence;
private PermissionSet _granted;
@@ -1109,20 +1112,24 @@ namespace System {
return null;
/* Prevent infinite recursion */
- Hashtable ht = assembly_resolve_in_progress;
- if (ht == null) {
- ht = new Hashtable ();
- assembly_resolve_in_progress = ht;
+ Hashtable ht;
+ if (refonly) {
+ ht = assembly_resolve_in_progress_refonly;
+ if (ht == null) {
+ ht = new Hashtable ();
+ assembly_resolve_in_progress_refonly = ht;
+ }
+ } else {
+ ht = assembly_resolve_in_progress;
+ if (ht == null) {
+ ht = new Hashtable ();
+ assembly_resolve_in_progress = ht;
+ }
}
- Assembly ass = (Assembly) ht [name];
-#if NET_2_0
- if (ass != null && (ass.ReflectionOnly == refonly))
+ string s = (string) ht [name];
+ if (s != null)
return null;
-#else
- if (ass != null)
- return null;
-#endif
ht [name] = name;
try {
Delegate[] invocation_list = del.GetInvocationList ();
diff --git a/mcs/class/corlib/System/Boolean.cs b/mcs/class/corlib/System/Boolean.cs
index bd3edcc..21793eb 100644
--- a/mcs/class/corlib/System/Boolean.cs
+++ b/mcs/class/corlib/System/Boolean.cs
@@ -230,7 +230,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
bool IConvertible.ToBoolean (IFormatProvider provider)
diff --git a/mcs/class/corlib/System/Byte.cs b/mcs/class/corlib/System/Byte.cs
index 76918b7..e85eca6 100644
--- a/mcs/class/corlib/System/Byte.cs
+++ b/mcs/class/corlib/System/Byte.cs
@@ -170,7 +170,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
bool IConvertible.ToBoolean (IFormatProvider provider)
diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog
index 3a691b0..09a6a86 100644
--- a/mcs/class/corlib/System/ChangeLog
+++ b/mcs/class/corlib/System/ChangeLog
@@ -1,9 +1,44 @@
+2009-05-27 Zoltan Varga <vargaz at gmail.com>
+
+ * AppDomain.cs (DoAssemblyResolve): Fix recursion detection. Fixes #507003.
+
+2009-05-14 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Type.cs: (GetInterfaceMap) 'this' can't be an interface itself.
+ Fixed bug #503728.
+
+2009-05-08 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Convert.cs: backport from HEAD.
+
+2009-05-03 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * TermInfoDriver.cs: replace Peek with DataAvailable.
+
+2009-04-29 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Enum.cs: return the value as an enum of the right type.
+
+2009-04-28 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * Enum.cs: avoid exceptions from ToObject and use Try* instead.
+
+2009-04-25 Miguel de Icaza <miguel at novell.com>
+
+ * TermInfoDriver.cs: Use the new StreamReader.DataAvailable to
+ load all the data that was added into the `stdin' stream when we
+ did the `Read'.
+
+2009-03-23 Zoltan Varga <vargaz at gmail.com>
+
+ * String.cs (LastIndexOf): Handle empty strings correctly. Fixes #486234.
+
2009-03-06 Miguel de Icaza <miguel at novell.com>
-
+
* Convert.cs: Apply patch from Tom Hindle that uses
IConvertible.ToType if there are no other possible conversions
defined.
-
+
Fixes: #481687
2009-02-28 Zoltan Varga <vargaz at gmail.com>
diff --git a/mcs/class/corlib/System/Char.cs b/mcs/class/corlib/System/Char.cs
index 4b4f9b7..61e3472 100644
--- a/mcs/class/corlib/System/Char.cs
+++ b/mcs/class/corlib/System/Char.cs
@@ -536,7 +536,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
bool IConvertible.ToBoolean (IFormatProvider provider)
diff --git a/mcs/class/corlib/System/Convert.cs b/mcs/class/corlib/System/Convert.cs
index 4329219..2ade4c9 100644
--- a/mcs/class/corlib/System/Convert.cs
+++ b/mcs/class/corlib/System/Convert.cs
@@ -2471,7 +2471,7 @@ namespace System {
else {
provider = ci.NumberFormat;
}
- return ToType (value, conversionType, provider);
+ return ToType (value, conversionType, provider, true);
}
public static object ChangeType (object value, TypeCode typeCode)
@@ -2485,20 +2485,20 @@ namespace System {
else {
provider = ci.NumberFormat;
}
- return ToType (value, conversionType, provider);
+ return ToType (value, conversionType, provider, true);
}
public static object ChangeType (object value, Type conversionType, IFormatProvider provider)
{
if ((value != null) && (conversionType == null))
throw new ArgumentNullException ("conversionType");
- return ToType (value, conversionType, provider);
+ return ToType (value, conversionType, provider, true);
}
public static object ChangeType (object value, TypeCode typeCode, IFormatProvider provider)
{
Type conversionType = conversionTable [(int)typeCode];
- return ToType (value, conversionType, provider);
+ return ToType (value, conversionType, provider, true);
}
private static bool NotValidBase (int value)
@@ -2825,8 +2825,19 @@ namespace System {
// it as an object. In place for the core data types to use
// when implementing IConvertible. Uses hardcoded indexes in
// the conversionTypes array, so if modify carefully.
- internal static object ToType (object value, Type conversionType,
- IFormatProvider provider)
+
+ //
+ // The `try_target_to_type' boolean indicates if the code
+ // should try to call the IConvertible.ToType method if everything
+ // else fails.
+ //
+ // This should be true for invocations from Convert.cs, and
+ // false from the mscorlib types that implement IConvertible that
+ // all into this internal function.
+ //
+ // This was added to keep the fix for #481687 working and to avoid
+ // the regression that the simple fix introduced (485377)
+ internal static object ToType (object value, Type conversionType, IFormatProvider provider, bool try_target_to_type)
{
if (value == null) {
if ((conversionType != null) && conversionType.IsValueType){
@@ -2906,12 +2917,13 @@ namespace System {
else if (conversionType == conversionTable[18]) // 18 TypeCode.String
return (object) convertValue.ToString (provider);
else {
- return convertValue.ToType (conversionType, provider);
+ if (try_target_to_type)
+ return convertValue.ToType (conversionType, provider);
}
- } else
- // Not in the conversion table
- throw new InvalidCastException ((Locale.GetText (
- "Value is not a convertible object: " + value.GetType().ToString() + " to " + conversionType.FullName)));
+ }
+ // Not in the conversion table
+ throw new InvalidCastException ((Locale.GetText (
+ "Value is not a convertible object: " + value.GetType().ToString() + " to " + conversionType.FullName)));
}
}
}
diff --git a/mcs/class/corlib/System/Decimal.cs b/mcs/class/corlib/System/Decimal.cs
index 4299005..4522dc2 100644
--- a/mcs/class/corlib/System/Decimal.cs
+++ b/mcs/class/corlib/System/Decimal.cs
@@ -1239,7 +1239,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return Convert.ToType (this, type, provider);
+ return Convert.ToType (this, type, provider, false);
}
bool IConvertible.ToBoolean (IFormatProvider provider)
diff --git a/mcs/class/corlib/System/Double.cs b/mcs/class/corlib/System/Double.cs
index 6ecb631..a18e580 100644
--- a/mcs/class/corlib/System/Double.cs
+++ b/mcs/class/corlib/System/Double.cs
@@ -531,7 +531,7 @@ namespace System {
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
bool IConvertible.ToBoolean (IFormatProvider provider)
diff --git a/mcs/class/corlib/System/Enum.cs b/mcs/class/corlib/System/Enum.cs
index ee95a48..64a50f2 100644
--- a/mcs/class/corlib/System/Enum.cs
+++ b/mcs/class/corlib/System/Enum.cs
@@ -186,7 +186,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return Convert.ToType (get_value (), type, provider);
+ return Convert.ToType (get_value (), type, provider, false);
}
#if ONLY_1_1
@@ -429,11 +429,59 @@ namespace System
}
// is 'value' a number?
+#if !NET_2_0
try {
return ToObject (enumType, Convert.ChangeType (value, typeCode));
} catch (FormatException) {
throw new ArgumentException (String.Format ("The requested value '{0}' was not found.", value));
}
+#else
+ switch (typeCode) {
+ case TypeCode.SByte:
+ sbyte sb;
+ if (SByte.TryParse (value, out sb))
+ return ToObject (enumType, sb);
+ break;
+ case TypeCode.Byte:
+ byte b;
+ if (Byte.TryParse (value, out b))
+ return ToObject (enumType, b);
+ break;
+ case TypeCode.Int16:
+ short i16;
+ if (Int16.TryParse (value, out i16))
+ return ToObject (enumType, i16);
+ break;
+ case TypeCode.UInt16:
+ ushort u16;
+ if (UInt16.TryParse (value, out u16))
+ return ToObject (enumType, u16);
+ break;
+ case TypeCode.Int32:
+ int i32;
+ if (Int32.TryParse (value, out i32))
+ return ToObject (enumType, i32);
+ break;
+ case TypeCode.UInt32:
+ uint u32;
+ if (UInt32.TryParse (value, out u32))
+ return ToObject (enumType, u32);
+ break;
+ case TypeCode.Int64:
+ long i64;
+ if (Int64.TryParse (value, out i64))
+ return ToObject (enumType, i64);
+ break;
+ case TypeCode.UInt64:
+ ulong u64;
+ if (UInt64.TryParse (value, out u64))
+ return ToObject (enumType, u64);
+ break;
+ default:
+ break;
+ }
+ throw new ArgumentException (String.Format ("The requested value '{0}' was not found.", value));
+#endif
}
/// <summary>
diff --git a/mcs/class/corlib/System/Int16.cs b/mcs/class/corlib/System/Int16.cs
index 178c90b..81b3789 100644
--- a/mcs/class/corlib/System/Int16.cs
+++ b/mcs/class/corlib/System/Int16.cs
@@ -330,7 +330,7 @@ namespace System {
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
#if ONLY_1_1
diff --git a/mcs/class/corlib/System/Int32.cs b/mcs/class/corlib/System/Int32.cs
index 28f1e7c..302ffbf 100644
--- a/mcs/class/corlib/System/Int32.cs
+++ b/mcs/class/corlib/System/Int32.cs
@@ -714,7 +714,7 @@ namespace System {
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
#if ONLY_1_1
diff --git a/mcs/class/corlib/System/Int64.cs b/mcs/class/corlib/System/Int64.cs
index 1cb6908..968c50b 100644
--- a/mcs/class/corlib/System/Int64.cs
+++ b/mcs/class/corlib/System/Int64.cs
@@ -586,7 +586,7 @@ namespace System {
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
#if ONLY_1_1
diff --git a/mcs/class/corlib/System/SByte.cs b/mcs/class/corlib/System/SByte.cs
index ac6bdf3..4bf6460 100644
--- a/mcs/class/corlib/System/SByte.cs
+++ b/mcs/class/corlib/System/SByte.cs
@@ -326,7 +326,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
ushort IConvertible.ToUInt16 (IFormatProvider provider)
diff --git a/mcs/class/corlib/System/Single.cs b/mcs/class/corlib/System/Single.cs
index 4c178ac..d1ec9ee 100644
--- a/mcs/class/corlib/System/Single.cs
+++ b/mcs/class/corlib/System/Single.cs
@@ -322,7 +322,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
#if ONLY_1_1
diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs
index b1b1ae5..7533f40 100644
--- a/mcs/class/corlib/System/String.cs
+++ b/mcs/class/corlib/System/String.cs
@@ -980,7 +980,10 @@ namespace System
public int LastIndexOf (string value, StringComparison comparisonType)
{
- return LastIndexOf (value, this.Length - 1, this.Length, comparisonType);
+ if (this.Length == 0)
+ return value == String.Empty ? 0 : -1;
+ else
+ return LastIndexOf (value, this.Length - 1, this.Length, comparisonType);
}
public int LastIndexOf (string value, int startIndex, StringComparison comparisonType)
@@ -2424,7 +2427,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return Convert.ToType (this, type, provider);
+ return Convert.ToType (this, type, provider, false);
}
#if ONLY_1_1
diff --git a/mcs/class/corlib/System/TermInfoDriver.cs b/mcs/class/corlib/System/TermInfoDriver.cs
index 55583f9..aefe922 100644
--- a/mcs/class/corlib/System/TermInfoDriver.cs
+++ b/mcs/class/corlib/System/TermInfoDriver.cs
@@ -931,11 +931,11 @@ namespace System {
do {
AddToBuffer (stdin.Read ());
} while (ConsoleDriver.InternalKeyAvailable (0) > 0);
- } else if (stdin.Peek () != -1) {
+ } else if (stdin.DataAvailable ()) {
do {
AddToBuffer (stdin.Read ());
- } while (stdin.Peek () != -1);
- } else {
+ } while (stdin.DataAvailable ());
+ } else {
if ((o = GetKeyFromBuffer (false)) != null)
break;
@@ -959,7 +959,7 @@ namespace System {
bool InputPending ()
{
// check if we've got pending input we can read immediately
- return readpos < writepos || stdin.Peek () != -1;
+ return readpos < writepos || stdin.DataAvailable ();
}
char [] echobuf = null;
diff --git a/mcs/class/corlib/System/Type.cs b/mcs/class/corlib/System/Type.cs
index 135f872..01f137b 100644
--- a/mcs/class/corlib/System/Type.cs
+++ b/mcs/class/corlib/System/Type.cs
@@ -655,6 +655,8 @@ namespace System {
throw new ArgumentNullException ("interfaceType");
if (!interfaceType.IsInterface)
throw new ArgumentException (Locale.GetText ("Argument must be an interface."), "interfaceType");
+ if (IsInterface)
+ throw new ArgumentException ("'this' type cannot be an interface itself");
res.TargetType = this;
res.InterfaceType = interfaceType;
GetInterfaceMapData (this, interfaceType, out res.TargetMethods, out res.InterfaceMethods);
diff --git a/mcs/class/corlib/System/UInt16.cs b/mcs/class/corlib/System/UInt16.cs
index a25961f..5fe885f 100644
--- a/mcs/class/corlib/System/UInt16.cs
+++ b/mcs/class/corlib/System/UInt16.cs
@@ -223,7 +223,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
#if ONLY_1_1
diff --git a/mcs/class/corlib/System/UInt32.cs b/mcs/class/corlib/System/UInt32.cs
index 1e68d45..2624331 100644
--- a/mcs/class/corlib/System/UInt32.cs
+++ b/mcs/class/corlib/System/UInt32.cs
@@ -540,7 +540,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
#if ONLY_1_1
diff --git a/mcs/class/corlib/System/UInt64.cs b/mcs/class/corlib/System/UInt64.cs
index 607a4d1..7d1aaba 100644
--- a/mcs/class/corlib/System/UInt64.cs
+++ b/mcs/class/corlib/System/UInt64.cs
@@ -463,7 +463,7 @@ namespace System
object IConvertible.ToType (Type type, IFormatProvider provider)
{
- return System.Convert.ToType (m_value, type, provider);
+ return System.Convert.ToType (m_value, type, provider, false);
}
#if ONLY_1_1
diff --git a/mcs/class/corlib/Test/System.IO/ChangeLog b/mcs/class/corlib/Test/System.IO/ChangeLog
index 5888035..0a27fd9 100644
--- a/mcs/class/corlib/Test/System.IO/ChangeLog
+++ b/mcs/class/corlib/Test/System.IO/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-24 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * StreamReaderTest.cs: new test. Using Peek() when we did a short read
+ should block if needed.
+
2009-02-24 Gonzalo Paniagua Javier <gonzalo at novell.com>
* StringReaderTest.cs: new test for ReadLine.
diff --git a/mcs/class/corlib/Test/System.IO/StreamReaderTest.cs b/mcs/class/corlib/Test/System.IO/StreamReaderTest.cs
index e1bdbac..34fac19 100644
--- a/mcs/class/corlib/Test/System.IO/StreamReaderTest.cs
+++ b/mcs/class/corlib/Test/System.IO/StreamReaderTest.cs
@@ -766,5 +766,75 @@ public class StreamReaderTest
return 2;
}
}
+
+ [Test]
+ public void PeekWhileBlocking ()
+ {
+ StreamReader reader = new StreamReader (new MyStream ());
+ int c = reader.Read ();
+#if NET_2_0
+ Assert.IsFalse (reader.EndOfStream);
+#endif
+ string str = reader.ReadToEnd ();
+ Assert.AreEqual ("bc", str);
+ }
+}
+
+class MyStream : Stream {
+ int n;
+
+ public override int Read (byte [] buffer, int offset, int size)
+ {
+ if (n == 0) {
+ buffer [offset] = (byte) 'a';
+ n++;
+ return 1;
+ } else if (n == 1) {
+ buffer [offset] = (byte) 'b';
+ buffer [offset + 1] = (byte) 'c';
+ n++;
+ return 2;
+ }
+ return 0;
+ }
+
+ public override bool CanRead {
+ get { return true; }
+ }
+
+ public override bool CanSeek {
+ get { return false; }
+ }
+
+ public override bool CanWrite {
+ get { return false; }
+ }
+
+ public override long Length {
+ get { return 0; }
+ }
+
+ public override long Position {
+ get { return 0; }
+ set { }
+ }
+
+ public override void Flush ()
+ {
+ }
+
+ public override long Seek (long offset, SeekOrigin origin)
+ {
+ return 0;
+ }
+
+ public override void SetLength (long value)
+ {
+ }
+
+ public override void Write (byte[] buffer, int offset, int count)
+ {
+ }
}
+
}
diff --git a/mcs/class/corlib/Test/System.Reflection/ChangeLog b/mcs/class/corlib/Test/System.Reflection/ChangeLog
index 3782bbd..685e6aa 100644
--- a/mcs/class/corlib/Test/System.Reflection/ChangeLog
+++ b/mcs/class/corlib/Test/System.Reflection/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-03 Sebastien Pouliot <sebastien at ximian.com>
+
+ * MethodInfoTest.cs: Add test cases from Joachim Ante for bug
+ #500385.
+ [Backport of r133428]
+
2008-02-02 Rodrigo Kumpera <rkumpera at novell.com>
Backport of r125410.
diff --git a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
index 2ad96e3..34b5bfe 100644
--- a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
@@ -38,6 +38,11 @@ using System.Runtime.CompilerServices;
using System.Collections.Generic;
#endif
+namespace A.B.C {
+ public struct MethodInfoTestStruct {
+ int p;
+ }
+}
namespace MonoTests.System.Reflection
{
[TestFixture]
@@ -232,7 +237,24 @@ namespace MonoTests.System.Reflection
Assert.AreEqual ("Int32* PtrFunc(Int32*)", this.GetType ().GetMethod ("PtrFunc").ToString ());
}
+
#if NET_2_0
+ public struct SimpleStruct
+ {
+ int a;
+ }
+
+ public static unsafe SimpleStruct* PtrFunc2 (SimpleStruct* a, A.B.C.MethodInfoTestStruct *b)
+ {
+ return (SimpleStruct*) 0;
+ }
+
+ [Test]
+ public void ToStringWithPointerSignaturesToNonPrimitiveType ()
+ {
+ Assert.AreEqual ("SimpleStruct* PtrFunc2(SimpleStruct*, A.B.C.MethodInfoTestStruct*)",
+ this.GetType ().GetMethod ("PtrFunc2").ToString ());
+ }
[Test]
public void ToStringGenericMethod ()
{
@@ -255,6 +277,31 @@ namespace MonoTests.System.Reflection
Assert.AreEqual (typeof (GBD_D), typeof (GBD_E).GetMethod ("f").GetBaseDefinition ().DeclaringType);
}
+ class TestInheritedMethodA {
+ private void TestMethod ()
+ {
+ }
+
+ public void TestMethod2 ()
+ {
+ }
+ }
+
+ class TestInheritedMethodB : TestInheritedMethodA {
+ }
+
+ [Test]
+ public void InheritanceTestGetMethodTest ()
+ {
+ MethodInfo inheritedMethod = typeof(TestInheritedMethodB).GetMethod("TestMethod", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
+ MethodInfo baseMethod = typeof(TestInheritedMethodB).GetMethod("TestMethod", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
+ Assert.AreSame (inheritedMethod, baseMethod);
+
+ MethodInfo inheritedMethod2 = typeof(TestInheritedMethodB).GetMethod("TestMethod2", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
+ MethodInfo baseMethod2 = typeof(TestInheritedMethodB).GetMethod("TestMethod2", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
+ Assert.AreSame (inheritedMethod, baseMethod);
+ }
+
#if NET_2_0
#if !TARGET_JVM // MethodBody is not supported for TARGET_JVM
[Test]
diff --git a/mcs/class/corlib/Test/System/ChangeLog b/mcs/class/corlib/Test/System/ChangeLog
index f0e3a78..cadda28 100644
--- a/mcs/class/corlib/Test/System/ChangeLog
+++ b/mcs/class/corlib/Test/System/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-14 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * TypeTest.cs: test for bug #503728
+
2009-01-06 Atsushi Enomoto <atsushi at ximian.com>
* DateTimeTest.cs : added test for parsing no-millisecond time
diff --git a/mcs/class/corlib/Test/System/ConvertTest.cs b/mcs/class/corlib/Test/System/ConvertTest.cs
index 2225815..2b904c5 100644
--- a/mcs/class/corlib/Test/System/ConvertTest.cs
+++ b/mcs/class/corlib/Test/System/ConvertTest.cs
@@ -4596,5 +4596,16 @@ namespace MonoTests.System {
{
Convert.ToUInt64 ("-", 16);
}
+
+ // This is a simple and happy struct.
+ struct Foo {
+ }
+
+ [Test]
+ [ExpectedException (typeof (InvalidCastException))]
+ public void ChangeType_ShouldThrowOnString ()
+ {
+ Foo f = (Foo) Convert.ChangeType ("this-is-a-string", typeof (Foo));
+ }
}
}
diff --git a/mcs/class/corlib/Test/System/TypeTest.cs b/mcs/class/corlib/Test/System/TypeTest.cs
index 1043eeb..73ac08e 100644
--- a/mcs/class/corlib/Test/System/TypeTest.cs
+++ b/mcs/class/corlib/Test/System/TypeTest.cs
@@ -333,6 +333,13 @@ namespace MonoTests.System
}
[Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void GetInterfaceMapOnInterface ()
+ {
+ typeof (IList).GetInterfaceMap (typeof (ICollection));
+ }
+
+ [Test]
public void TestIsSubclassOf ()
{
Assert.IsTrue (typeof (ICloneable).IsSubclassOf (typeof (object)), "#01");
diff --git a/mcs/class/lib/monolite/System.Xml.dll b/mcs/class/lib/monolite/System.Xml.dll
index 7c69541..b4a31f3 100755
Binary files a/mcs/class/lib/monolite/System.Xml.dll and b/mcs/class/lib/monolite/System.Xml.dll differ
diff --git a/mcs/class/lib/monolite/System.dll b/mcs/class/lib/monolite/System.dll
index 6a4b150..59167b7 100755
Binary files a/mcs/class/lib/monolite/System.dll and b/mcs/class/lib/monolite/System.dll differ
diff --git a/mcs/class/lib/monolite/mcs.exe b/mcs/class/lib/monolite/mcs.exe
index f27236d..c8f4635 100755
Binary files a/mcs/class/lib/monolite/mcs.exe and b/mcs/class/lib/monolite/mcs.exe differ
diff --git a/mcs/class/lib/monolite/mscorlib.dll b/mcs/class/lib/monolite/mscorlib.dll
index b8e268e..d8dea3a 100755
Binary files a/mcs/class/lib/monolite/mscorlib.dll and b/mcs/class/lib/monolite/mscorlib.dll differ
diff --git a/mcs/errors/cs1685.cs b/mcs/errors/cs1685.cs
deleted file mode 100644
index 2265e6d..0000000
--- a/mcs/errors/cs1685.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-// CS1685: The type `System.Int32' conflicts with the predefined type `int' and will be ignored
-// Line: 6
-// Compiler options: -warn:1 -warnaserror
-
-namespace System {
- public struct Int32 {
- }
-}
diff --git a/mcs/ilasm/codegen/ChangeLog b/mcs/ilasm/codegen/ChangeLog
index bab6815..40ec870 100644
--- a/mcs/ilasm/codegen/ChangeLog
+++ b/mcs/ilasm/codegen/ChangeLog
@@ -1,3 +1,25 @@
+2009-05-27 Rodrigo Kumpera <rkumpera at novell.com>
+
+ * TypeDef.cs: Add field method_list to preserve definition
+ order of methods when emiting the PE file.
+
+2009-04-20 Ankit Jain <jankit at novell.com>
+
+ Fix bug #494221
+ * MethodDef.cs (BeginLocalsScope): New.
+ (EndLocalsScope): New.
+ (AddLocals):
+ (GetNamedLocal): Support scoping for .locals
+
+2009-04-15 Ankit Jain <jankit at novell.com>
+
+ * MethodDef.cs (GetNamedLocalSlot): Return -1 if local var not found.
+
+2009-03-31 Rodrigo Kumpera <rkumpera at novell.com>
+
+ * MethodDef.cs (WriteCode): Emit labels which use offsets as absolute PEAPI
+ CilLabels.
+
2008-07-02 Ankit Jain <jankit at novell.com>
Fix bug #405383
diff --git a/mcs/ilasm/codegen/MethodDef.cs b/mcs/ilasm/codegen/MethodDef.cs
index c32a219..529a886 100644
--- a/mcs/ilasm/codegen/MethodDef.cs
+++ b/mcs/ilasm/codegen/MethodDef.cs
@@ -39,7 +39,8 @@ namespace Mono.ILASM {
private bool is_resolved;
private bool is_defined;
private ArrayList local_list;
- private Hashtable named_local_table;
+ private ArrayList named_local_tables;
+ private int current_scope_depth;
private bool init_locals;
private int max_stack;
private bool pinvoke_info;
@@ -73,7 +74,9 @@ namespace Mono.ILASM {
labelref_table = new Hashtable ();
label_list = new ArrayList ();
local_list = new ArrayList ();
- named_local_table = new Hashtable ();
+ named_local_tables = new ArrayList ();
+ named_local_tables.Add (new Hashtable ());
+ current_scope_depth = 0;
entry_point = false;
zero_init = false;
@@ -215,10 +218,26 @@ namespace Mono.ILASM {
this.ret_param.AddMarshalInfo (native_type);
}
+ //try/catch scope, used to scope local vars
+ public void BeginLocalsScope ()
+ {
+ current_scope_depth ++;
+ named_local_tables.Add (new Hashtable ());
+ }
+
+ public void EndLocalsScope ()
+ {
+ named_local_tables.RemoveAt (current_scope_depth);
+ current_scope_depth --;
+ }
+
public void AddLocals (ArrayList local_list)
{
int slot_pos = this.local_list.Count;
+ Hashtable current_named_table = null;
+ current_named_table = (Hashtable) named_local_tables [current_scope_depth];
+
foreach (Local local in local_list) {
if (local.Slot == -1) {
local.Slot = slot_pos;
@@ -226,21 +245,33 @@ namespace Mono.ILASM {
slot_pos++;
if (local.Name == null)
continue;
- if(!named_local_table.Contains(local.Name))
- named_local_table.Add (local.Name, local);
- }
+
+ if (!current_named_table.Contains (local.Name))
+ current_named_table.Add (local.Name, local);
+ }
this.local_list.AddRange (local_list);
}
public Local GetNamedLocal (string name)
{
- return (Local) named_local_table[name];
+ Local ret = null;
+ int i = current_scope_depth;
+ while (ret == null && i >= 0) {
+ Hashtable current_named_table = (Hashtable) named_local_tables [i];
+ ret = (Local) current_named_table [name];
+
+ i --;
+ }
+
+ return ret;
}
public int GetNamedLocalSlot (string name)
{
- Local local = (Local) named_local_table[name];
+ Local local = GetNamedLocal (name);
+ if (local == null)
+ return -1;
return local.Slot;
}
@@ -266,7 +297,7 @@ namespace Mono.ILASM {
{
System.IO.MemoryStream str = new System.IO.MemoryStream();
int i = 0;
- int num_locals = named_local_table.Count;
+ int num_locals = ((Hashtable) named_local_tables [current_scope_depth]).Count;
LocalVariableEntry[] locals = new LocalVariableEntry[num_locals];
foreach (Local local in local_list) {
@@ -572,7 +603,7 @@ namespace Mono.ILASM {
foreach (LabelInfo label in label_info) {
if (label.UseOffset) {
- label.Define (new PEAPI.CILLabel (label.Offset));
+ label.Define (new PEAPI.CILLabel (label.Offset, true));
continue;
}
if (label.Pos == previous_pos)
diff --git a/mcs/ilasm/codegen/TypeDef.cs b/mcs/ilasm/codegen/TypeDef.cs
index 1a16eba..0f2525c 100644
--- a/mcs/ilasm/codegen/TypeDef.cs
+++ b/mcs/ilasm/codegen/TypeDef.cs
@@ -27,6 +27,7 @@ namespace Mono.ILASM {
private Hashtable field_table;
private ArrayList field_list;
private Hashtable method_table;
+ private ArrayList method_list;
private ArrayList customattr_list;
private DeclSecurity decl_sec;
private ArrayList event_list;
@@ -61,6 +62,7 @@ namespace Mono.ILASM {
field_list = new ArrayList ();
method_table = new Hashtable ();
+ method_list = new ArrayList ();
size = -1;
pack = -1;
@@ -212,6 +214,7 @@ namespace Mono.ILASM {
Report.Error (methoddef.StartLocation, "Duplicate method declaration: " + methoddef.Signature);
method_table.Add (methoddef.Signature, methoddef);
+ method_list.Add (methoddef);
}
public void BeginEventDef (EventDef event_def)
@@ -419,7 +422,7 @@ namespace Mono.ILASM {
classdef.SetFieldOrder (fielddef_list);
- foreach (MethodDef methoddef in method_table.Values) {
+ foreach (MethodDef methoddef in method_list) {
methoddef.Define (code_gen);
}
diff --git a/mcs/ilasm/parser/ChangeLog b/mcs/ilasm/parser/ChangeLog
index ca5f768..5480e0f 100644
--- a/mcs/ilasm/parser/ChangeLog
+++ b/mcs/ilasm/parser/ChangeLog
@@ -1,3 +1,17 @@
+2009-04-20 Ankit Jain <jankit at novell.com>
+
+ Fix bug #494221.
+ * ILParser.jay (scope_block_begin): Mark begin .locals scope.
+ (scope_block): Mark end .locals scope.
+
+2009-04-15 Ankit Jain <jankit at novell.com>
+
+ * ILParser.jay (instr): Handle unidentified local var id.
+
+2009-03-31 Rodrigo Kumpera <rkumpera at novell.com>
+
+ * ILParser.jay: Fix integer labels in handler blocks.
+
2008-06-02 Ankit Jain <jankit at novell.com>
Part of fix for bug #367114.
diff --git a/mcs/ilasm/parser/ILParser.jay b/mcs/ilasm/parser/ILParser.jay
index e3eb8c3..3224737 100644
--- a/mcs/ilasm/parser/ILParser.jay
+++ b/mcs/ilasm/parser/ILParser.jay
@@ -2245,12 +2245,14 @@ scope_block : scope_block_begin method_decls CLOSE_BRACE
{
$$ = new HandlerBlock ((LabelInfo) $1,
codegen.CurrentMethodDef.AddLabel ());
+ codegen.CurrentMethodDef.EndLocalsScope ();
}
;
scope_block_begin : OPEN_BRACE
{
$$ = codegen.CurrentMethodDef.AddLabel ();
+ codegen.CurrentMethodDef.BeginLocalsScope ();
}
;
@@ -2362,8 +2364,8 @@ handler_block : scope_block
}
| K_HANDLER int32 K_TO int32
{
- LabelInfo from = codegen.CurrentMethodDef.AddLabelRef ((string) $2);
- LabelInfo to = codegen.CurrentMethodDef.AddLabelRef ((string) $4);
+ LabelInfo from = codegen.CurrentMethodDef.AddLabel ((int) $2);
+ LabelInfo to = codegen.CurrentMethodDef.AddLabel ((int) $4);
$$ = new HandlerBlock (from, to);
}
@@ -2382,6 +2384,8 @@ instr : INSTR_NONE
| INSTR_LOCAL id
{
int slot = codegen.CurrentMethodDef.GetNamedLocalSlot ((string) $2);
+ if (slot < 0)
+ Report.Error (String.Format ("Undeclared identifier '{0}'", (string) $2));
codegen.CurrentMethodDef.AddInstr (
new IntInstr ((IntOp) $1, slot, tokenizer.Location));
}
@@ -2407,6 +2411,8 @@ instr : INSTR_NONE
| INSTR_I id
{
int slot = codegen.CurrentMethodDef.GetNamedLocalSlot ((string) $2);
+ if (slot < 0)
+ Report.Error (String.Format ("Undeclared identifier '{0}'", (string) $2));
codegen.CurrentMethodDef.AddInstr (new
IntInstr ((IntOp) $1, slot, tokenizer.Location));
}
diff --git a/mcs/ilasm/scanner/ChangeLog b/mcs/ilasm/scanner/ChangeLog
index 103e7bc..b169b24 100644
--- a/mcs/ilasm/scanner/ChangeLog
+++ b/mcs/ilasm/scanner/ChangeLog
@@ -1,3 +1,15 @@
+2009-04-15 Ankit Jain <jankit at novell.com>
+
+ * StringHelper.cs (startIdChars): New. Set of chars that can start an
+ identifier.
+ (Start): Use startIdChars instead of idchars.
+
+2009-04-08 Ankit Jain <jankit at novell.com>
+
+ Fix bug #487155.
+ * StringHelper.cs: Handle octal values in strings.
+ Patch from Stephen Gennard (stephen at gennard.net)
+
2006-11-09 Ankit Jain <jankit at novell.com>
* ILTables.cs (keywords): Add 'retargetable'.
diff --git a/mcs/ilasm/scanner/StringHelper.cs b/mcs/ilasm/scanner/StringHelper.cs
index e1e13e0..32d0fc6 100644
--- a/mcs/ilasm/scanner/StringHelper.cs
+++ b/mcs/ilasm/scanner/StringHelper.cs
@@ -10,6 +10,7 @@ namespace Mono.ILASM {
/// </summary>
internal class StringHelper : StringHelperBase {
+ private static readonly string startIdChars = "#$@_";
private static readonly string idChars = "_$@?`";
/// <summary>
@@ -27,7 +28,7 @@ namespace Mono.ILASM {
{
mode = Token.UNKNOWN;
- if (Char.IsLetter (ch) || idChars.IndexOf (ch) != -1) {
+ if (Char.IsLetter (ch) || startIdChars.IndexOf (ch) != -1) {
mode = Token.ID;
} else if (ch == '\'') {
mode = Token.SQSTRING;
@@ -78,7 +79,7 @@ namespace Mono.ILASM {
continue;
}
- int escaped = Escape (ch);
+ int escaped = Escape (reader, ch);
if (escaped == -1) {
reader.Unread (ch);
ch = '\\';
@@ -109,12 +110,21 @@ namespace Mono.ILASM {
/// </summary>
/// <param name="ch"></param>
/// <returns></returns>
- public static int Escape (int ch)
+ public static int Escape (ILReader reader, int ch)
{
int res = -1;
if (ch >= '0' && ch <='7') {
- //TODO : octal code
+ StringBuilder octal = new StringBuilder ();
+ octal.Append ((char)ch);
+ int possibleOctalChar = reader.Peek ();
+ if (possibleOctalChar >= '0' && possibleOctalChar <='7') {
+ octal.Append ((char)reader.Read ());
+ possibleOctalChar = reader.Peek ();
+ if (possibleOctalChar >= '0' && possibleOctalChar <='7')
+ octal.Append ((char)reader.Read ());
+ }
+ res = Convert.ToInt32(octal.ToString (), 8);
} else {
int id = "abfnrtv\"'\\".IndexOf ((char)ch);
if (id != -1) {
diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog
index af44194..f269a93 100644
--- a/mcs/mcs/ChangeLog
+++ b/mcs/mcs/ChangeLog
@@ -1,3 +1,47 @@
+2009-05-21 Marek Safar <marek.safar at gmail.com>
+
+ A fix for bug #504667
+ * class.cs: Check for static class using parent container instead of
+ parent type.
+
+2009-04-28 Marek Safar <marek.safar at gmail.com>
+
+ A fix for bug #495112
+ * class.cs (IsUnmanagedType): Handle recursive unmanaged types using
+ local cache.
+
+2009-04-17 Miguel de Icaza <miguel at novell.com>
+
+ * eval.cs: Introduce an entry point that allows for initialization
+ to return a list of the files passed on the command line.
+
+2009-04-13 Marek Safar <marek.safar at gmail.com>
+
+ A fix for bug #493887
+ * statement.cs: Don't skip string multi-section with default or
+ null label when populating string hashtable.
+
+2009-04-11 Marek Safar <marek.safar at gmail.com>
+
+ A fix for bug #492329
+ * expression.cs (New): Workaround broken TypeManager.IsValueType.
+
+2009-04-06 Marek Safar <marek.safar at gmail.com>
+
+ A fix for bug #492329
+ * expression.cs (New): Load variable when assigning type parameter
+ to ref variable.
+
+2009-04-06 Marek Safar <marek.safar at gmail.com>
+
+ A fix for bug #488960
+ * decl.cs: Compare MVAR types using non-null values.
+
+2009-03-23 Marek Safar <marek.safar at gmail.com>
+
+ A fix for bug #487625
+ * namespace.cs: Use a warning for all predefined type conflicts.
+
2009-03-08 Marek Safar <marek.safar at gmail.com>
* class.cs: Use correct common base type for unmanaged delayed
diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs
index 9e7b31d..0fd417e 100644
--- a/mcs/mcs/class.cs
+++ b/mcs/mcs/class.cs
@@ -2914,6 +2914,9 @@ namespace Mono.CSharp {
}
public sealed class Struct : ClassOrStruct {
+
+ bool is_unmanaged, has_unmanaged_check_done;
+
// <summary>
// Modifiers allowed in a struct declaration
// </summary>
@@ -2973,6 +2976,11 @@ namespace Mono.CSharp {
if (requires_delayed_unmanagedtype_check)
return true;
+ if (has_unmanaged_check_done)
+ return is_unmanaged;
+
+ has_unmanaged_check_done = true;
+
foreach (FieldBase f in fields) {
if ((f.ModFlags & Modifiers.STATIC) != 0)
continue;
@@ -2981,6 +2989,7 @@ namespace Mono.CSharp {
// struct S { S* s; }
Type mt = f.MemberType;
if (mt == null) {
+ has_unmanaged_check_done = false;
requires_delayed_unmanagedtype_check = true;
return true;
}
@@ -2997,6 +3006,7 @@ namespace Mono.CSharp {
return false;
}
+ is_unmanaged = true;
return true;
}
@@ -4216,7 +4226,7 @@ namespace Mono.CSharp {
return true;
if (Parameters.HasExtensionMethodType) {
- if (Parent.IsStaticClass && !Parent.IsGeneric) {
+ if (Parent.PartialContainer.IsStaticClass && !Parent.IsGeneric) {
if (!Parent.IsTopLevel)
Report.Error (1109, Location, "`{0}': Extension methods cannot be defined in a nested class",
GetSignatureForError ());
diff --git a/mcs/mcs/decl.cs b/mcs/mcs/decl.cs
index 19b9c4c..92a6b50 100644
--- a/mcs/mcs/decl.cs
+++ b/mcs/mcs/decl.cs
@@ -2693,10 +2693,10 @@ namespace Mono.CSharp {
#if GMCS_SOURCE
if (type_a.IsGenericParameter && type_a.DeclaringMethod != null)
- type_a = null;
+ type_a = typeof (TypeParameter);
if (type_b.IsGenericParameter && type_b.DeclaringMethod != null)
- type_b = null;
+ type_b = typeof (TypeParameter);
#endif
if ((pd.FixedParameters [ii].ModFlags & Parameter.Modifier.ISBYREF) !=
(parameters.FixedParameters [ii].ModFlags & Parameter.Modifier.ISBYREF))
diff --git a/mcs/mcs/eval.cs b/mcs/mcs/eval.cs
index 56a2980..41d98a2 100644
--- a/mcs/mcs/eval.cs
+++ b/mcs/mcs/eval.cs
@@ -66,9 +66,32 @@ namespace Mono.CSharp {
/// </remarks>
public static void Init (string [] args)
{
+ InitAndGetStartupFiles (args);
+ }
+
+
+ /// <summary>
+ /// Optional initialization for the Evaluator.
+ /// </summary>
+ /// <remarks>
+ /// Initializes the Evaluator with the command line
+ /// options that would be processed by the command
+ /// line compiler. Only the first call to
+ /// InitAndGetStartupFiles or Init will work, any future
+ /// invocations are ignored.
+ ///
+ /// You can safely avoid calling this method if your application
+ /// does not need any of the features exposed by the command line
+ /// interface.
+ ///
+ /// This method return an array of strings that contains any
+ /// files that were specified in `args'.
+ /// </remarks>
+ public static string [] InitAndGetStartupFiles (string [] args)
+ {
lock (evaluator_lock){
if (inited)
- return;
+ return new string [0];
RootContext.Version = LanguageVersion.Default;
driver = Driver.Create (args, false);
@@ -76,10 +99,15 @@ namespace Mono.CSharp {
throw new Exception ("Failed to create compiler driver with the given arguments");
driver.ProcessDefaultConfig ();
+ ArrayList startup_files = new ArrayList ();
+ foreach (CompilationUnit file in Location.SourceFiles)
+ startup_files.Add (file.Path);
+
CompilerCallableEntryPoint.Reset ();
Driver.LoadReferences ();
RootContext.EvalMode = true;
inited = true;
+ return (string []) startup_files.ToArray (typeof (string));
}
}
diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs
index d365406..240ebc4 100644
--- a/mcs/mcs/expression.cs
+++ b/mcs/mcs/expression.cs
@@ -5517,7 +5517,7 @@ namespace Mono.CSharp {
temp.AddressOf (ec, AddressOp.Store);
ig.Emit (OpCodes.Initobj, type);
temp.Emit (ec);
- ig.Emit (OpCodes.Br, label_end);
+ ig.Emit (OpCodes.Br_S, label_end);
ig.MarkLabel (label_activator);
@@ -5558,10 +5558,17 @@ namespace Mono.CSharp {
//
public virtual bool Emit (EmitContext ec, IMemoryLocation target)
{
- if (is_type_parameter)
- return DoEmitTypeParameter (ec);
-
- bool is_value_type = TypeManager.IsValueType (type);
+ bool is_value_type = type.IsValueType;
+#if NET_2_0
+ if (!is_value_type && TypeManager.IsGenericParameter (type)) {
+ GenericConstraints constraints = TypeManager.GetTypeParameterConstraints (type);
+ if (constraints == null)
+ is_value_type = false;
+ else
+ is_value_type = constraints.IsValueType;
+ }
+#endif
+
ILGenerator ig = ec.ig;
VariableReference vr = target as VariableReference;
@@ -5570,6 +5577,9 @@ namespace Mono.CSharp {
} else if (vr != null && vr.IsRef) {
vr.EmitLoad (ec);
}
+
+ if (is_type_parameter)
+ return DoEmitTypeParameter (ec);
if (method != null)
method.EmitArguments (ec, Arguments);
diff --git a/mcs/mcs/namespace.cs b/mcs/mcs/namespace.cs
index 4bf0175..4415915 100644
--- a/mcs/mcs/namespace.cs
+++ b/mcs/mcs/namespace.cs
@@ -128,7 +128,11 @@ namespace Mono.CSharp {
Report.SymbolRelatedToPreviousError (found_type);
Report.SymbolRelatedToPreviousError (t);
- Report.Error (433, loc, "The imported type `{0}' is defined multiple times", name);
+ if (loc.IsNull) {
+ Error_AmbiguousPredefinedType (loc, name, found_type);
+ } else {
+ Report.Error (433, loc, "The imported type `{0}' is defined multiple times", name);
+ }
return found_type;
}
@@ -136,6 +140,13 @@ namespace Mono.CSharp {
return found_type;
}
+ protected void Error_AmbiguousPredefinedType (Location loc, string name, Type type)
+ {
+ Report.Warning (1685, 1, loc,
+ "The predefined type `{0}' is ambiguous. Using definition from `{1}'",
+ name, type.Assembly.FullName);
+ }
+
public void RegisterNamespace (Namespace child)
{
if (child != this)
@@ -276,8 +287,7 @@ namespace Mono.CSharp {
Report.SymbolRelatedToPreviousError (found_type);
if (loc.IsNull) {
DeclSpace ds = TypeManager.LookupDeclSpace (t);
- Report.Warning (1685, 1, ds.Location, "The type `{0}' conflicts with the predefined type `{1}' and will be ignored",
- ds.GetSignatureForError (), TypeManager.CSharpName (found_type));
+ Error_AmbiguousPredefinedType (ds.Location, name, found_type);
return found_type;
}
Report.SymbolRelatedToPreviousError (t);
diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs
index d3a1dea..54fdd23 100644
--- a/mcs/mcs/statement.cs
+++ b/mcs/mcs/statement.cs
@@ -3732,11 +3732,10 @@ namespace Mono.CSharp {
Elements.Clear ();
string value = null;
foreach (SwitchSection section in Sections) {
+ int last_count = init.Count;
foreach (SwitchLabel sl in section.Labels) {
- if (sl.Label == null || sl.Converted == SwitchLabel.NullStringCase) {
- value = null;
+ if (sl.Label == null || sl.Converted == SwitchLabel.NullStringCase)
continue;
- }
value = (string) sl.Converted;
ArrayList init_args = new ArrayList (2);
@@ -3745,7 +3744,10 @@ namespace Mono.CSharp {
init.Add (new CollectionElementInitializer (init_args, loc));
}
- if (value == null)
+ //
+ // Don't add empty sections
+ //
+ if (last_count == init.Count)
continue;
Elements.Add (counter, section.Labels [0]);
@@ -3753,7 +3755,7 @@ namespace Mono.CSharp {
}
ArrayList args = new ArrayList (1);
- args.Add (new Argument (new IntConstant (Sections.Count, loc)));
+ args.Add (new Argument (new IntConstant (init.Count, loc)));
Expression initializer = new NewInitialize (string_dictionary_type, args,
new CollectionOrObjectInitializers (init, loc), loc);
diff --git a/mcs/tests/known-issues-gmcs b/mcs/tests/known-issues-gmcs
index 15e21e6..51b91c4 100644
--- a/mcs/tests/known-issues-gmcs
+++ b/mcs/tests/known-issues-gmcs
@@ -8,8 +8,5 @@ test-xml-027.cs
test-539.cs IGNORE # In 2.0 profile, RuntimeCompatilityAttribute is added by default with WrapNonExceptionThrows set to true and conditional compilation symbols are not provided yet.
gtest-230.cs
-gtest-344.cs
gtest-437.cs
-gtest-etree-07.cs
-
diff --git a/mcs/tests/ver-il-gmcs.xml b/mcs/tests/ver-il-gmcs.xml
index 6899bdf..9da41f7 100644
--- a/mcs/tests/ver-il-gmcs.xml
+++ b/mcs/tests/ver-il-gmcs.xml
@@ -1259,7 +1259,7 @@
<size>7</size>
</method>
<method name="T Create()">
- <size>39</size>
+ <size>36</size>
</method>
</type>
<type name="X">
@@ -3282,10 +3282,10 @@
<size>78</size>
</method>
<method name="Polynomial`1[E] Mul(Polynomial`1[E])">
- <size>222</size>
+ <size>219</size>
</method>
<method name="E Eval(E)">
- <size>109</size>
+ <size>106</size>
</method>
</type>
<type name="TestPolynomial">
@@ -3962,7 +3962,7 @@
<test name="gtest-151.cs">
<type name="Test`1[T]">
<method name="Void .ctor()">
- <size>46</size>
+ <size>45</size>
</method>
</type>
<type name="X">
@@ -4011,7 +4011,7 @@
<test name="gtest-153.cs">
<type name="MyClass`1[T]">
<method name="Void .ctor()">
- <size>59</size>
+ <size>56</size>
</method>
</type>
<type name="X">
@@ -4069,7 +4069,7 @@
<test name="gtest-155.cs">
<type name="MyClass`1[T]">
<method name="Void .ctor()">
- <size>59</size>
+ <size>56</size>
</method>
</type>
<type name="X">
@@ -8853,7 +8853,7 @@
<size>7</size>
</method>
<method name="Void Foo()">
- <size>40</size>
+ <size>37</size>
</method>
</type>
<type name="Foo">
@@ -8886,7 +8886,7 @@
<size>7</size>
</method>
<method name="Void Do()">
- <size>53</size>
+ <size>50</size>
</method>
</type>
<type name="Reference">
@@ -9540,12 +9540,12 @@
<method name="Void CopyTo(Bug.xxx*)">
<size>99</size>
</method>
- <method name="Void Convert(Bug.xxx*, System.UInt64*)">
- <size>93</size>
- </method>
<method name="Void Main()">
<size>1</size>
</method>
+ <method name="Void Convert(Bug.xxx*, UInt64*)">
+ <size>93</size>
+ </method>
</type>
</test>
<test name="gtest-354.cs">
@@ -15353,6 +15353,50 @@
</method>
</type>
</test>
+ <test name="gtest-etree-07.cs">
+ <type name="C">
+ <method name="Void .ctor()">
+ <size>7</size>
+ </method>
+ <method name="Void Test()">
+ <size>14</size>
+ </method>
+ <method name="Int32* Foo()">
+ <size>3</size>
+ </method>
+ <method name="Int32 Main()">
+ <size>594</size>
+ </method>
+ </type>
+ <type name="EmptyDelegate">
+ <method name="Void .ctor(Object, IntPtr)">
+ <size>0</size>
+ </method>
+ <method name="Void Invoke()">
+ <size>0</size>
+ </method>
+ <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+ <size>0</size>
+ </method>
+ <method name="Void EndInvoke(IAsyncResult)">
+ <size>0</size>
+ </method>
+ </type>
+ <type name="UnsafeDelegate">
+ <method name="Void .ctor(Object, IntPtr)">
+ <size>0</size>
+ </method>
+ <method name="Int32* Invoke()">
+ <size>0</size>
+ </method>
+ <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)">
+ <size>0</size>
+ </method>
+ <method name="Int32* EndInvoke(IAsyncResult)">
+ <size>0</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-etree-08.cs">
<type name="Foo">
<method name="Void .ctor()">
@@ -25448,9 +25492,6 @@
<method name="Int32 CreateFromString(Int32)">
<size>10</size>
</method>
- <method name="System.Double* GetValue(Double)">
- <size>5</size>
- </method>
<method name="Void Main()">
<size>1</size>
</method>
@@ -25463,6 +25504,11 @@
<size>1</size>
</method>
</type>
+ <type name="C">
+ <method name="Double* GetValue(Double)">
+ <size>5</size>
+ </method>
+ </type>
</test>
<test name="test-319.cs">
<type name="ConstFields">
@@ -25710,15 +25756,15 @@
<method name="Void .ctor()">
<size>7</size>
</method>
- <method name="System.Byte* get_Ptr()">
+ <method name="Void Main()">
+ <size>1</size>
+ </method>
+ <method name="Byte* get_Ptr()">
<size>7</size>
</method>
- <method name="Void set_Ptr(System.Byte*)">
+ <method name="Void set_Ptr(Byte*)">
<size>8</size>
</method>
- <method name="Void Main()">
- <size>1</size>
- </method>
</type>
</test>
<test name="test-332.cs">
@@ -26666,7 +26712,7 @@
<size>7</size>
</method>
<method name="Int32 ParseType(System.String)">
- <size>164</size>
+ <size>168</size>
</method>
<method name="Void Main()">
<size>12</size>
@@ -27584,12 +27630,12 @@
<method name="Void .ctor()">
<size>7</size>
</method>
- <method name="System.Int32* get_v()">
- <size>20</size>
- </method>
<method name="Int32 Main()">
<size>48</size>
</method>
+ <method name="Int32* get_v()">
+ <size>20</size>
+ </method>
</type>
</test>
<test name="test-405.cs">
@@ -27618,10 +27664,10 @@
<method name="Int32 Main(System.String[])">
<size>180</size>
</method>
- <method name="UInt32 DoOp(System.UInt32*)">
+ <method name="UInt32 DoOp(UInt32*)">
<size>11</size>
</method>
- <method name="UInt32 DoOp2(System.UInt32*)">
+ <method name="UInt32 DoOp2(UInt32*)">
<size>10</size>
</method>
</type>
@@ -27940,15 +27986,15 @@
<method name="Void .ctor()">
<size>7</size>
</method>
- <method name="Void lowLevelCall(System.Int32*)">
- <size>1</size>
- </method>
<method name="Void Func(Int32 ByRef)">
<size>13</size>
</method>
<method name="Void Main()">
<size>10</size>
</method>
+ <method name="Void lowLevelCall(Int32*)">
+ <size>1</size>
+ </method>
</type>
</test>
<test name="test-424.cs">
@@ -29383,13 +29429,13 @@
<size>124</size>
</method>
<method name="Void test_76590(System.String)">
- <size>100</size>
+ <size>107</size>
</method>
<method name="Void test_77964()">
<size>37</size>
</method>
<method name="Boolean bug_78860()">
- <size>107</size>
+ <size>114</size>
</method>
<method name="Int32 Main()">
<size>1037</size>
@@ -32904,16 +32950,16 @@
<method name="Int32 Main()">
<size>130</size>
</method>
- <method name="System.Int32* Conversions(Int64)">
+ <method name="Int32* Conversions(Int64)">
<size>3</size>
</method>
- <method name="Int32 CheckAdd(System.Byte*, Int32)">
+ <method name="Int32 CheckAdd(Byte*, Int32)">
<size>14</size>
</method>
- <method name="Int32 CheckSub(System.Int16*, Int32)">
+ <method name="Int32 CheckSub(Int16*, Int32)">
<size>16</size>
</method>
- <method name="Int32 CheckSub2(System.Int16*, Int32)">
+ <method name="Int32 CheckSub2(Int16*, Int32)">
<size>23</size>
</method>
</type>
@@ -33153,7 +33199,7 @@
<method name="Int32 Main()">
<size>8</size>
</method>
- <method name="Int32 Test(System.SByte*)">
+ <method name="Int32 Test(SByte*)">
<size>33</size>
</method>
</type>
@@ -33366,7 +33412,7 @@
<size>7</size>
</method>
<method name="Boolean Test(System.String)">
- <size>137</size>
+ <size>148</size>
</method>
<method name="Int32 Main()">
<size>49</size>
@@ -33467,15 +33513,15 @@
<method name="Void .ctor()">
<size>7</size>
</method>
- <method name="System.Int32* get_Foo()">
- <size>3</size>
- </method>
<method name="S* get_Foo2()">
<size>3</size>
</method>
<method name="Void Main()">
<size>1</size>
</method>
+ <method name="Int32* get_Foo()">
+ <size>3</size>
+ </method>
</type>
</test>
<test name="test-673.cs">
@@ -33795,25 +33841,25 @@
<method name="Void .ctor()">
<size>7</size>
</method>
- <method name="System.Byte* GetFoo()">
- <size>7</size>
+ <method name="Int32 Main()">
+ <size>46</size>
</method>
- <method name="System.Byte* GetFoo2()">
+ <method name="Byte* GetFoo()">
<size>7</size>
</method>
- <method name="Int32 Main()">
- <size>46</size>
+ <method name="Byte* GetFoo2()">
+ <size>7</size>
</method>
</type>
</test>
<test name="test-689.cs">
<type name="Sample">
- <method name="Void Foo(System.Byte*, System.Byte*)">
- <size>46</size>
- </method>
<method name="Void Main()">
<size>3</size>
</method>
+ <method name="Void Foo(Byte*, Byte*)">
+ <size>46</size>
+ </method>
</type>
</test>
<test name="test-69.cs">
@@ -37628,9 +37674,6 @@
<method name="Void .ctor()">
<size>7</size>
</method>
- <method name="System.Int32* GetUnsafeValue()">
- <size>3</size>
- </method>
</type>
<type name="C">
<method name="Void UnsafeTests()">
@@ -37661,6 +37704,11 @@
<size>16</size>
</method>
</type>
+ <type name="UnsafeClass">
+ <method name="Int32* GetUnsafeValue()">
+ <size>3</size>
+ </method>
+ </type>
</test>
<test name="test-anon-71.cs">
<type name="Program">
diff --git a/mcs/tools/csharp/ChangeLog b/mcs/tools/csharp/ChangeLog
index 611cd34..df01cac 100644
--- a/mcs/tools/csharp/ChangeLog
+++ b/mcs/tools/csharp/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-17 Miguel de Icaza <miguel at novell.com>
+
+ * repl.cs: Support executing files that were specified in the
+ command line.
+
2008-12-16 Jb Evain <jbevain at novell.com>
* Makefile: use the monolinker.exe from the profile directory.
diff --git a/mcs/tools/csharp/repl.cs b/mcs/tools/csharp/repl.cs
index e8a9444..75bc3d4 100644
--- a/mcs/tools/csharp/repl.cs
+++ b/mcs/tools/csharp/repl.cs
@@ -25,6 +25,7 @@ using System.Reflection.Emit;
using System.Threading;
using System.Net;
using System.Net.Sockets;
+using System.Collections.Generic;
using Mono.CSharp;
using Mono.Attach;
@@ -36,25 +37,27 @@ namespace Mono {
static int Main (string [] args)
{
if (args.Length > 0 && args [0] == "--attach") {
- new ClientCSharpShell (Int32.Parse (args [1])).Run ();
+ new ClientCSharpShell (Int32.Parse (args [1])).Run (null);
return 0;
} else if (args.Length > 0 && args [0].StartsWith ("--agent:")) {
new CSharpAgent (args [0]);
return 0;
} else {
+ string [] startup_files;
try {
- Evaluator.Init (args);
+ startup_files = Evaluator.InitAndGetStartupFiles (args);
} catch {
return 1;
}
-
- return new CSharpShell ().Run ();
+
+ return new CSharpShell ().Run (startup_files);
}
}
}
public class CSharpShell {
static bool isatty = true;
+ string [] startup_files;
Mono.Terminal.LineEditor editor;
bool dumb;
@@ -132,6 +135,25 @@ namespace Mono {
}
+ void ExecuteSources (IEnumerable<string> sources, bool ignore_errors)
+ {
+ foreach (string file in sources){
+ try {
+ try {
+ using (System.IO.StreamReader r = System.IO.File.OpenText (file)){
+ ReadEvalPrintLoopWith (p => r.ReadLine ());
+ }
+ } catch (FileNotFoundException){
+ Console.Error.WriteLine ("cs2001: Source file `{0}' not found", file);
+ return;
+ }
+ } catch {
+ if (!ignore_errors)
+ throw;
+ }
+ }
+ }
+
protected virtual void LoadStartupFiles ()
{
string dir = Path.Combine (
@@ -140,8 +162,8 @@ namespace Mono {
if (!Directory.Exists (dir))
return;
- ArrayList sources = new ArrayList ();
- ArrayList libraries = new ArrayList ();
+ List<string> sources = new List<string> ();
+ List<string> libraries = new List<string> ();
foreach (string file in System.IO.Directory.GetFiles (dir)){
string l = file.ToLower ();
@@ -152,18 +174,10 @@ namespace Mono {
libraries.Add (file);
}
- foreach (string file in libraries){
+ foreach (string file in libraries)
Evaluator.LoadAssembly (file);
- }
-
- foreach (string file in sources){
- try {
- using (System.IO.StreamReader r = System.IO.File.OpenText (file)){
- ReadEvalPrintLoopWith (p => r.ReadLine ());
- }
- } catch {
- }
- }
+
+ ExecuteSources (sources, true);
}
void ReadEvalPrintLoopWith (ReadLiner readline)
@@ -185,12 +199,20 @@ namespace Mono {
public int ReadEvalPrintLoop ()
{
- InitTerminal ();
+ if (startup_files.Length == 0)
+ InitTerminal ();
InitializeUsing ();
LoadStartupFiles ();
- ReadEvalPrintLoopWith (GetLine);
+
+ //
+ // Interactive or startup files provided?
+ //
+ if (startup_files.Length != 0)
+ ExecuteSources (startup_files, false);
+ else
+ ReadEvalPrintLoopWith (GetLine);
return 0;
}
@@ -333,8 +355,9 @@ namespace Mono {
{
}
- public virtual int Run ()
+ public virtual int Run (string [] startup_files)
{
+ this.startup_files = startup_files;
return ReadEvalPrintLoop ();
}
@@ -403,7 +426,7 @@ namespace Mono {
}
}
- public override int Run ()
+ public override int Run (string [] startup_files)
{
// The difference is that we do not call Evaluator.Init, that is done on the target
return ReadEvalPrintLoop ();
@@ -513,7 +536,7 @@ namespace Mono {
NetworkStream s = client.GetStream ();
interrupt_stream = interrupt_client.GetStream ();
new Thread (InterruptListener).Start ();
-
+
try {
Evaluator.Init (new string [0]);
} catch {
diff --git a/mcs/tools/mdoc/ChangeLog b/mcs/tools/mdoc/ChangeLog
index 103ebc5..bb4e734 100644
--- a/mcs/tools/mdoc/ChangeLog
+++ b/mcs/tools/mdoc/ChangeLog
@@ -1,3 +1,25 @@
+2009-04-09 Jonathan Pryor <jpryor at novell.com>
+
+ * Mono.Documentation/monodocer.cs: Using a single IAssemblyResolver is
+ an improvement, but doesn't fix all problems. In particular, some
+ assemblies will depend upon other assemblies to load (e.g. 3rd party
+ assemblies) but these dependent assemblies shouldn't be documented.
+ Add support for -r:ASSEMBLY and -L:DIRECTORY arguments to allow the
+ user to manually add to the assembly search path so that assemblies
+ can be found. Assemblies added via -r will NOT be documented.
+
+2009-04-08 Jonathan Pryor <jpryor at novell.com>
+
+ * Mono.Documentation/monodocer.cs: Use a single IAssemblyResolver
+ shared amongst all AssemblyDefinitions to resolve assembly/type
+ references with Cecil. Otherwise, if we have deeply nested
+ directories with cross-directory assembly dependencies, then Cecil
+ won't find the necessary assemblies (e.g. b/bin/Debug/b.dll has a
+ type which inherits from a/bin/Debug/a.dll -- here, we'll have two
+ separate AssemblyDefinitions, and when b.dll's AssemblyDefinition
+ tries to resolve types from a.dll, it fails).
+ See: http://lists.ximian.com/pipermail/mono-devel-list/2009-April/031646.html
+
2009-01-05 Jonathan Pryor <jpryor at novell.com>
* Makefile: Fix $(PROGRAM) dependencies so that mdoc.exe is rebuilt
diff --git a/mcs/tools/mdoc/Mono.Documentation/monodocer.cs b/mcs/tools/mdoc/Mono.Documentation/monodocer.cs
index ec6ed01..490a9e9 100644
--- a/mcs/tools/mdoc/Mono.Documentation/monodocer.cs
+++ b/mcs/tools/mdoc/Mono.Documentation/monodocer.cs
@@ -47,6 +47,7 @@ class MDocUpdater : MDocCommand
static string srcPath;
static List<AssemblyDefinition> assemblies;
+ static DefaultAssemblyResolver assemblyResolver = new DefaultAssemblyResolver();
static bool nooverrides = true, delete = false, ignoremembers = false;
static bool pretty = false;
@@ -109,9 +110,16 @@ class MDocUpdater : MDocCommand
{ "i|import=",
"Import documentation from {FILE}.",
v => opts.import = v },
+ { "L|lib=",
+ "Check for assembly references in {DIRECTORY}.",
+ v => assemblyResolver.AddSearchDirectory (v) },
{ "o|out=",
"Root {DIRECTORY} to generate/update documentation.",
v => opts.path = v },
+ { "r=",
+ "Search for dependent assemblies in the directory containing {ASSEMBLY}.\n" +
+ "(Equivalent to '-L `dirname ASSEMBLY`'.)",
+ v => assemblyResolver.AddSearchDirectory (Path.GetDirectoryName (v)) },
{ "since=",
"Manually specify the assembly {VERSION} that new members were added in.",
v => opts.since = v },
@@ -127,6 +135,11 @@ class MDocUpdater : MDocCommand
if (opts.assembly.Count == 0)
base.Error ("No assemblies specified.");
+ foreach (var dir in opts.assembly
+ .Where (a => a.Contains (Path.DirectorySeparatorChar))
+ .Select (a => Path.GetDirectoryName (a)))
+ assemblyResolver.AddSearchDirectory (dir);
+
Run (opts);
opts.name = ""; // remove warning about unused member
}
@@ -231,10 +244,7 @@ class MDocUpdater : MDocCommand
if (assembly == null)
throw new InvalidOperationException("Assembly " + name + " not found.");
- var r = assembly.Resolver as BaseAssemblyResolver;
- if (r != null && name.Contains (Path.DirectorySeparatorChar)) {
- r.AddSearchDirectory (Path.GetDirectoryName (name));
- }
+ assembly.Resolver = assemblyResolver;
return assembly;
}
diff --git a/mcs/tools/mkbundle/ChangeLog b/mcs/tools/mkbundle/ChangeLog
index 59fbf53..e00a96b 100644
--- a/mcs/tools/mkbundle/ChangeLog
+++ b/mcs/tools/mkbundle/ChangeLog
@@ -1,3 +1,10 @@
+2009-03-15 Steven Munroe <munroesj at us.ibm.com>
+
+ This patch is contributed under the terms of the MIT/X11 license
+
+ * mkbundle.cs (WriteSymbol): Use .p2align 5 instead of .align 32
+ to get consistent results on all platforms.
+
2008-02-23 Marek Safar <marek.safar at gmail.com>
* mkbundle.cs: Close resources correctly when something goes wrong.
diff --git a/mcs/tools/mkbundle/mkbundle.cs b/mcs/tools/mkbundle/mkbundle.cs
index 8a63fee..16b17d3 100644
--- a/mcs/tools/mkbundle/mkbundle.cs
+++ b/mcs/tools/mkbundle/mkbundle.cs
@@ -158,7 +158,7 @@ class MakeBundle {
sw.WriteLine (
".globl {0}\n" +
"\t.section .rodata\n" +
- "\t.align 32\n" +
+ "\t.p2align 5\n" +
"\t.type {0}, @object\n" +
"\t.size {0}, {1}\n" +
"{0}:\n",
diff --git a/mcs/tools/xbuild/ChangeLog b/mcs/tools/xbuild/ChangeLog
index f4b0ba8..501cbb2 100644
--- a/mcs/tools/xbuild/ChangeLog
+++ b/mcs/tools/xbuild/ChangeLog
@@ -1,3 +1,162 @@
+2009-06-12 Ankit Jain <jankit at novell.com>
+
+ * xbuild/Microsoft.Common.targets (ProjectDir): Fix typo.
+
+2009-06-12 Ankit Jain <jankit at novell.com>
+
+ * xbuild/Microsoft.Common.targets (IntermediateAssembly): Change to
+ an Item list to match msbuild.
+ * xbuild/Microsoft.CSharp.targets (IntermediateAssembly): Update for
+ above changes.
+
+2009-06-12 Ankit Jain <jankit at novell.com>
+
+ * Parameters.cs (.ctor): Use assembly's location to build
+ path for the default response file.
+
+2009-06-08 Ankit Jain <jankit at novell.com>
+
+ * xbuild/Microsoft.Common.targets: Use ResolveAssemblyReference
+ to find satellite assemblies, dependent assemblies, dependent
+ files, copy local files etc.
+ Add targets to fetch all this info for all referenced projects,
+ and copy them to the target locations. Also, copy the debug (.mdb)
+ files. Honor, "CopyToOutputDirectory" metadata.
+
+2009-06-07 Ankit Jain <jankit at novell.com>
+
+ * Parameters.cs (ProcessProperty): Handle invalid syntax.
+
+2009-06-07 Ankit Jain <jankit at novell.com>
+
+ * SolutionParser.cs (AddGeneralSettings): Don't hardcode the default
+ config/platform. Move to ..
+ (AddDefaultSolutionConfiguration): .. here.
+ (AddCurrentSolutionConfigurationContents): Use the first solution target
+ as the default config/platform or use Debug/anycpu if no config is available.
+
+2009-05-20 Jonathan Chambers <joncham at gmail.com>
+
+ * SolutionParser.cs (ParseSolution): Ignore vcproj projects in solutions
+ and issue warning.
+
+2009-04-27 Ankit Jain <jankit at novell.com>
+
+ * xbuild/Microsoft.VisualBasic.targets: Update to use
+ CreateVisualBasicManifestResourceName task, and fix compiler params.
+
+2009-04-25 Daniel Nauck <dna at mono-project.de>
+
+ Fix bug #484649:
+ * LoggerInfo.cs: fixed the parsing of the /logger: argument as described in
+ http://msdn.microsoft.com/en-us/library/ms164311.aspx
+ Added logger class detection if it's not explicit specified in the argument.
+
+2009-03-19 Ankit Jain <jankit at novell.com>
+
+ Fix bug #484773.
+ * Main.cs (Execute): Check whether the project file exists or not.
+ * Parameters.cs (ParseArguments): Handle absolute paths too.
+
+2009-03-13 Ankit Jain <jankit at novell.com>
+
+ * Main.cs (Execute): Build the project/sln with current directory set to
+ the project file's dir.
+ * SolutionParser.cs (ParseSolution): Project paths are relative to
+ solution directory.
+
+2009-03-06 Ankit Jain <jankit at novell.com>
+
+ Fix bug #481336.
+ * SolutionParser.cs (AddWarningForMissingProjectConfiguration): New.
+ (AddProjectTargets): Emit warning for missing project configurations.
+
+2009-02-26 Ankit Jain <jankit at novell.com>
+
+ * xbuild/Microsoft.CSharp.targets (Csc): Fix "Resources" argument to use
+ ManifestNonResxWithCultureOnDisk instead of ManifestResourceWithNoCultureOnDisk.
+
+2009-02-26 Ankit Jain <jankit at novell.com>
+
+ * xbuild/Microsoft.Common.targets: Make targets extensible. Add
+ before/after hooks.
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * xbuild/Microsoft.Common.targets: Use obj/$(Config) as the default intermediate
+ output path, instead of just obj/
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * xbuild/Microsoft.Common.targets (CopyNonResxEmbeddedResources): New.
+ (GenerateSatelliteAssemblies): Update to use the new ManifestNonResxWithCultureOnDisk
+ instead of NonResxWithCulture.
+ * xbuild/Microsoft.CSharp.targets (Csc): Fix "Resources" argument to use
+ the new on disk file names instead of original filenames.
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * xbuild/Microsoft.Common.targets (GetTargetPath): Add a path separator.
+
+2009-02-25 Ankit Jain <jankit at novell.com>
+
+ * SolutionParser.cs (ParseSolution): Report warning instead of error
+ for unknown global sections.
+
+2009-02-21 Ankit Jain <jankit at novell.com>
+
+ * xbuild/xbuild.rsp: Add descriptive comments.
+
+2009-02-21 Ankit Jain <jankit at novell.com>
+
+ * Parameters.cs (LoadResponseFile): Handle comments.
+
+2009-02-20 Ankit Jain <jankit at novell.com>
+
+ * SolutionParser.cs (ParseSolution): Ignore solution folders.
+
+2009-02-20 Ankit Jain <jankit at novell.com>
+
+ * SolutionParser.cs (ParseSolution): Ignore GlobalSection named
+ 'NestedProjects'.
+
+2009-02-20 Ankit Jain <jankit at novell.com>
+
+ * SolutionParser.cs (ParseProjectConfigurationPlatforms): Report missing
+ project guids as Warnings and not errors. Report every missing guid only
+ once.
+
+2009-02-20 Ankit Jain <jankit at novell.com>
+
+ * SolutionParser.cs (projectRegex): Use '\s' to match whitespace.
+
+2009-02-19 Jonathan Chambers <joncham at gmail.com>
+
+ * xbuild.csproj: Add.
+ * xbuild.sln: Add.
+
+2009-02-13 Jonathan Chambers <joncham at gmail.com>
+
+ * SolutionParser.cs: Make Guid Regex case insensitive.
+ Handle project dependencies. The solution has explicit
+ dependencies, but we have to open projects for implicit
+ dependencies (via ProjectReferences).
+
+2009-02-13 Jonathan Chambers <joncham at gmail.com>
+
+ * Main.cs: Add support for .sln files.
+ * SolutionParser.cs: Class for generating project file
+ from solution file.
+ * xbuild.exe.sources: Added SolutionParser.cs.
+
+2009-02-02 Ankit Jain <jankit at novell.com>
+
+ * Microsoft.CSharp.targets: Add targets to generate resource ids.
+ * Microsoft.Common.targets: Add targets for generating resources,
+ generate and deploy satellite assemblies, resolve project and assembly
+ references. All intermediate build output goes into a 'obj/' dir by
+ default. 'Clean' target enabled.
+
2008-12-12 Ankit Jain <jankit at novell.com>
* Microsoft.CSharp.targets: Add CreateCSharpManifestResourceName task.
diff --git a/mcs/tools/xbuild/LoggerInfo.cs b/mcs/tools/xbuild/LoggerInfo.cs
index f583e77..9e2b05a 100644
--- a/mcs/tools/xbuild/LoggerInfo.cs
+++ b/mcs/tools/xbuild/LoggerInfo.cs
@@ -1,10 +1,11 @@
//
// LoggerInfo.cs: Contains information about logger parameters.
//
-// Author:
-// Marek Sieradzki (marek.sieradzki at gmail.com)
+// Authors:
+// Craig Sutherland (cj.sutherland(at)xtra.co.nz)
+// Daniel Nauck (dna(at)mono-project.de)
//
-// (C) 2005 Marek Sieradzki
+// (C) 2009 Craig Sutherland, Daniel Nauck
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -29,64 +30,142 @@
using System;
using System.Globalization;
+using System.IO;
+using System.Linq;
using System.Reflection;
+using System.Text.RegularExpressions;
using Mono.XBuild.Framework;
-namespace Mono.XBuild.CommandLine {
- internal class LoggerInfo : AssemblyLoadInfo {
-
- string parameters;
-
- public LoggerInfo ()
+namespace Mono.XBuild.CommandLine
+{
+ internal class LoggerInfo : AssemblyLoadInfo
+ {
+ static readonly Regex assemblyInfoRegEx = new Regex(@"(?<assemblyName>[\w\.]+)(,\s?Version=(?<assemblyVersion>\d+\.\d+\.\d+\.\d+))?(,\s?Culture=(?<assemblyCulture>\w+))?(,\s?PublicKeyToken=(?<publicKeyToken>\w+))?",
+ RegexOptions.Compiled | RegexOptions.CultureInvariant);
+
+ string loggerAssemblyName;
+ string loggerType;
+ string loggerArgs;
+
+ string assemblyInfoName;
+ string assemblyInfoVersion;
+ string assemblyInfoCulture;
+ string assemblyInfoPublicKeyToken;
+
+ internal LoggerInfo (string value)
{
+ if (!Parse (value))
+ return;
+
+ if (string.IsNullOrEmpty (loggerType))
+ loggerType = GetLoggerTypeName (loggerAssemblyName);
+
+ if (assemblyInfoName != null)
+ SetAssemblyName (LoadInfoType.AssemblyName, null, assemblyInfoName, assemblyInfoVersion, assemblyInfoCulture, assemblyInfoPublicKeyToken, loggerType);
+
+ else
+ SetAssemblyName (LoadInfoType.AssemblyFilename, loggerAssemblyName, null, null, null, null, loggerType);
+ }
+
+ internal string Parameters {
+ get { return loggerArgs; }
}
-
- public LoggerInfo (string s)
+
+ static string GetLoggerTypeName (string assemblyName)
{
- string version = null;
- string culture = null;
- string name = null;
- string filename = null;
- string loggerClass = null;
-
- string[] temp1 = s.Split (':');
- string[] temp2 = temp1[1].Split (',');
-
- // FIXME: replace all of this with readable code
- loggerClass = temp2 [0];
- if (temp2.Length == 4) {
- name = temp2 [1];
- version = temp2 [2].Split ('=') [1];
- string[] temp3 = temp2 [3].Split (';');
- if (temp3.Length == 1) {
- culture = temp2 [3].Split ('=') [1];
- }
- if (temp3.Length > 1 ) {
- culture = temp3 [0].Split ('=') [1];
- parameters = temp3 [1];
- }
- }
- if (temp2.Length == 2) {
- string[] temp3 = temp2 [1].Split (';');
- if (temp3 [0].EndsWith (".dll")) {
- filename = temp2 [1];
+ Assembly loggerAssembly = null;
+
+ // try to load assembly that contains the logger
+ if (HasAssemblyInfo (assemblyName))
+ loggerAssembly = Assembly.Load (assemblyName);
+ else if (File.Exists (assemblyName))
+ loggerAssembly = Assembly.LoadFile (assemblyName);
+
+ if (loggerAssembly == null)
+ return null;
+
+ // search for a class thats implement ILogger
+ var loggerClass = (from t in loggerAssembly.GetTypes ()
+ where t.IsClass &&
+ t.GetInterface ("Microsoft.Build.Framework.ILogger") != null &&
+ t.IsPublic
+ select t).FirstOrDefault ();
+
+ if (loggerClass != null)
+ return loggerClass.FullName;
+
+ return null;
+ }
+
+ bool Parse (string arg)
+ {
+ // Wipe all the existing values, just in case
+ loggerAssemblyName = null;
+ loggerType = null;
+ loggerArgs = null;
+ assemblyInfoName = null;
+ assemblyInfoVersion = null;
+ assemblyInfoCulture = null;
+ assemblyInfoPublicKeyToken = null;
+
+ if (string.IsNullOrEmpty (arg))
+ return false;
+
+ string [] parts = arg.Split (new char [] {':'}, 2);
+ if (parts.Length != 2)
+ return false;
+
+ if (string.Compare ("/l", parts [0], StringComparison.OrdinalIgnoreCase) != 0 &&
+ string.Compare ("/logger", parts [0], StringComparison.OrdinalIgnoreCase) != 0)
+ return false;
+
+ arg = parts [1];
+
+ // We have a logger arg, now get the various parts
+ parts = arg.Split (new char [] {';'}, 2);
+ string firstPart = parts [0];
+ if (parts.Length > 1)
+ loggerArgs = parts [1];
+
+ // Next see if there is a type name
+ parts = firstPart.Split (new char [] {','}, 2);
+ if (parts.Length == 1) {
+ loggerAssemblyName = firstPart;
+ } else {
+ if (HasAssemblyInfo (parts [1])) {
+ loggerAssemblyName = firstPart;
+ GetAssemblyInfo (loggerAssemblyName);
} else {
- name = temp2 [1];
+ loggerType = parts [0];
+ parts [0] = string.Empty;
+ loggerAssemblyName = string.Join (",", parts).Substring (1).Trim ();
}
- if (temp3.Length > 1)
- parameters = temp3 [1];
}
- if (name != null)
- SetAssemblyName (LoadInfoType.AssemblyName, null, name, version, culture, null,loggerClass);
- else if (filename != null)
- SetAssemblyName (LoadInfoType.AssemblyFilename, filename, null, null, null, null, loggerClass);
+ return true;
}
-
- public string Parameters {
- get { return parameters; }
+
+ static bool HasAssemblyInfo (string part)
+ {
+ var containsInfo = (part.IndexOf ("version=", StringComparison.OrdinalIgnoreCase) >= 0) ||
+ (part.IndexOf ("culture=", StringComparison.OrdinalIgnoreCase) >= 0) ||
+ (part.IndexOf ("publickeytoken=", StringComparison.OrdinalIgnoreCase) >= 0);
+
+ return containsInfo;
+ }
+
+ void GetAssemblyInfo (string assemblyName)
+ {
+ var match = assemblyInfoRegEx.Match (assemblyName);
+
+ if(match == null)
+ return;
+
+ assemblyInfoName = match.Groups ["assemblyName"].Value;
+ assemblyInfoVersion = match.Groups ["assemblyVersion"].Value;
+ assemblyInfoCulture = match.Groups ["assemblyCulture"].Value;
+ assemblyInfoPublicKeyToken = match.Groups ["publicKeyToken"].Value;
}
}
}
-
#endif
diff --git a/mcs/tools/xbuild/Main.cs b/mcs/tools/xbuild/Main.cs
index 4631ae7..dea952d 100644
--- a/mcs/tools/xbuild/Main.cs
+++ b/mcs/tools/xbuild/Main.cs
@@ -35,7 +35,6 @@ using Microsoft.Build.BuildEngine;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Mono.XBuild.Framework;
-using Mono.XBuild.Utilities;
namespace Mono.XBuild.CommandLine {
public class MainClass {
@@ -103,9 +102,23 @@ namespace Mono.XBuild.CommandLine {
project.SchemaFile = parameters.ValidationSchema;
}
- project.Load (parameters.ProjectFile);
+ string projectFile = parameters.ProjectFile;
+ if (!File.Exists (projectFile)) {
+ ErrorUtilities.ReportError (0, String.Format ("Project file '{0}' not found.", projectFile));
+ return;
+ }
+
+ if (projectFile.EndsWith (".sln"))
+ projectFile = GenerateSolutionProject (projectFile);
+
+ project.Load (projectFile);
+ string oldCurrentDirectory = Environment.CurrentDirectory;
+ string dir = Path.GetDirectoryName (projectFile);
+ if (!String.IsNullOrEmpty (dir))
+ Directory.SetCurrentDirectory (dir);
result = engine.BuildProject (project, parameters.Targets, null);
+ Directory.SetCurrentDirectory (oldCurrentDirectory);
}
catch (InvalidProjectFileException ipfe) {
@@ -128,6 +141,17 @@ namespace Mono.XBuild.CommandLine {
}
}
+
+ string GenerateSolutionProject (string solutionFile)
+ {
+ SolutionParser s = new SolutionParser ();
+ Project p = engine.CreateNewProject ();
+ s.ParseSolution (solutionFile, p);
+ string projectFile = solutionFile + ".proj";
+ p.Save (projectFile);
+
+ return projectFile;
+ }
}
}
diff --git a/mcs/tools/xbuild/Parameters.cs b/mcs/tools/xbuild/Parameters.cs
index 4c70400..3596bd9 100644
--- a/mcs/tools/xbuild/Parameters.cs
+++ b/mcs/tools/xbuild/Parameters.cs
@@ -31,6 +31,7 @@ using System;
using System.IO;
using System.Collections;
using System.Text;
+using System.Reflection;
using Microsoft.Build.BuildEngine;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
@@ -68,7 +69,9 @@ namespace Mono.XBuild.CommandLine {
properties = new BuildPropertyGroup ();
targets = new string [0];
- responseFile = Path.Combine (binPath, "xbuild.rsp");
+ responseFile = Path.Combine (
+ Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location),
+ "xbuild.rsp");
}
public void ParseArguments (string[] args)
@@ -97,9 +100,7 @@ namespace Mono.XBuild.CommandLine {
LoadResponseFile (responseFile);
}
foreach (string s in flatArguments) {
- if (s [0] == '/') {
- ParseFlatArgument (s);
- } else
+ if (s [0] != '/' || !ParseFlatArgument (s))
remainingArguments.Add (s);
}
if (remainingArguments.Count == 0) {
@@ -129,6 +130,10 @@ namespace Mono.XBuild.CommandLine {
for (int i = 0; i < t; i++) {
char c = line [i];
+ if (c == '#')
+ // comment, ignore rest of the line
+ break;
+
if (c == '"' || c == '\'') {
char end = c;
@@ -161,7 +166,7 @@ namespace Mono.XBuild.CommandLine {
}
}
- private void ParseFlatArgument (string s)
+ private bool ParseFlatArgument (string s)
{
switch (s) {
case "/help":
@@ -187,24 +192,23 @@ namespace Mono.XBuild.CommandLine {
default:
if (s.StartsWith ("/target:") || s.StartsWith ("/t:")) {
ProcessTarget (s);
- }
- if (s.StartsWith ("/property:") || s.StartsWith ("/p:")) {
- ProcessProperty (s);
- }
- if (s.StartsWith ("/logger:") || s.StartsWith ("/l:")) {
+ } else if (s.StartsWith ("/property:") || s.StartsWith ("/p:")) {
+ if (!ProcessProperty (s))
+ return false;
+ } else if (s.StartsWith ("/logger:") || s.StartsWith ("/l:")) {
ProcessLogger (s);
- }
- if (s.StartsWith ("/verbosity:") || s.StartsWith ("/v:")) {
+ } else if (s.StartsWith ("/verbosity:") || s.StartsWith ("/v:")) {
ProcessVerbosity (s);
- }
- if (s.StartsWith ("/consoleloggerparameters:") || s.StartsWith ("/clp:")) {
+ } else if (s.StartsWith ("/consoleloggerparameters:") || s.StartsWith ("/clp:")) {
ProcessConsoleLoggerParameters (s);
- }
- if (s.StartsWith ("/validate:") || s.StartsWith ("/val:")) {
+ } else if (s.StartsWith ("/validate:") || s.StartsWith ("/val:")) {
ProcessValidate (s);
- }
+ } else
+ return false;
break;
}
+
+ return true;
}
internal void ProcessTarget (string s)
@@ -213,15 +217,28 @@ namespace Mono.XBuild.CommandLine {
targets = temp [1].Split (';');
}
- internal void ProcessProperty (string s)
+ internal bool ProcessProperty (string s)
{
string[] parameter, splittedProperties, property;
parameter = s.Split (':');
+ if (parameter.Length != 2) {
+ ErrorUtilities.ReportError (5, "Property name and value expected as /p:<prop name>=<prop value>");
+ return false;
+ }
+
splittedProperties = parameter [1].Split (';');
foreach (string st in splittedProperties) {
+ if (st.IndexOf ('=') < 0) {
+ ErrorUtilities.ReportError (5,
+ "Invalid syntax. Property name and value expected as " +
+ "<prop name>=[<prop value>]");
+ return false;
+ }
property = st.Split ('=');
- properties.SetProperty (property [0], property [1]);
+ properties.SetProperty (property [0], property.Length == 2 ? property [1] : "");
}
+
+ return true;
}
internal void ProcessLogger (string s)
diff --git a/mcs/tools/xbuild/SolutionParser.cs b/mcs/tools/xbuild/SolutionParser.cs
new file mode 100644
index 0000000..5d7e6c4
--- /dev/null
+++ b/mcs/tools/xbuild/SolutionParser.cs
@@ -0,0 +1,390 @@
+//
+// SolutionParser.cs: Generates a project file from a solution file.
+//
+// Author:
+// Jonathan Chambers (joncham at gmail.com)
+//
+// (C) 2009 Jonathan Chambers
+//
+// 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.
+
+#if NET_2_0
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.IO;
+using Microsoft.Build.BuildEngine;
+
+namespace Mono.XBuild.CommandLine {
+ class ProjectInfo {
+ public string Name;
+ public string FileName;
+
+ public ProjectInfo (string name, string fileName)
+ {
+ Name = name;
+ FileName = fileName;
+ }
+
+ public Dictionary<TargetInfo, TargetInfo> TargetMap = new Dictionary<TargetInfo, TargetInfo> ();
+ public List<Guid> Dependencies = new List<Guid> ();
+ }
+
+ struct TargetInfo {
+ public string Configuration;
+ public string Platform;
+ public bool Build;
+
+ public TargetInfo (string configuration, string platform)
+ : this (configuration, platform, false)
+ {
+ }
+
+ public TargetInfo (string configuration, string platform, bool build)
+ {
+ Configuration = configuration;
+ Platform = platform;
+ Build = build;
+ }
+ }
+
+
+ class SolutionParser {
+ static string[] buildTargets = new string[] { "Build", "Clean", "Rebuild", "Publish" };
+
+ static string guidExpression = "{[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}}";
+
+ static Regex projectRegex = new Regex ("Project\\(\"(" + guidExpression + ")\"\\) = \"(.*?)\", \"(.*?)\", \"(" + guidExpression + ")\"(\\s*?)((\\s*?)ProjectSection\\((.*?)\\) = (.*?)EndProjectSection(\\s*?))*(\\s*?)EndProject?", RegexOptions.Singleline);
+ static Regex projectDependenciesRegex = new Regex ("ProjectSection\\((.*?)\\) = \\w*(.*?)EndProjectSection", RegexOptions.Singleline);
+ static Regex projectDependencyRegex = new Regex ("\\s*(" + guidExpression + ") = (" + guidExpression + ")");
+
+ static Regex globalRegex = new Regex ("Global(.*)EndGlobal", RegexOptions.Singleline);
+ static Regex globalSectionRegex = new Regex ("GlobalSection\\((.*?)\\) = \\w*(.*?)EndGlobalSection", RegexOptions.Singleline);
+
+ static Regex solutionConfigurationRegex = new Regex ("\\s*(.*?)\\|(.*?) = (.*?)\\|(.+)");
+ static Regex projectConfigurationActiveCfgRegex = new Regex ("\\s*(" + guidExpression + ")\\.(.+?)\\|(.+?)\\.ActiveCfg = (.+?)\\|(.+)");
+ static Regex projectConfigurationBuildRegex = new Regex ("\\s*(" + guidExpression + ")\\.(.*?)\\|(.*?)\\.Build\\.0 = (.*?)\\|(.+)");
+
+ static string solutionFolderGuid = "{2150E333-8FDC-42A3-9474-1A3956D46DE8}";
+ static string vcprojGuid = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}";
+
+ public void ParseSolution (string file, Project p)
+ {
+ AddGeneralSettings (file, p);
+
+ StreamReader reader = new StreamReader (file);
+ string line = reader.ReadToEnd ();
+ line = line.Replace ("\r\n", "\n");
+ string solutionDir = Path.GetDirectoryName (file);
+
+ List<TargetInfo> solutionTargets = new List<TargetInfo> ();
+ Dictionary<Guid, ProjectInfo> projectInfos = new Dictionary<Guid, ProjectInfo> ();
+
+ Match m = projectRegex.Match (line);
+ while (m.Success) {
+ ProjectInfo projectInfo = new ProjectInfo (m.Groups[2].Value, m.Groups[3].Value);
+ if (String.Compare (m.Groups [1].Value, solutionFolderGuid,
+ StringComparison.InvariantCultureIgnoreCase) == 0) {
+ // Ignore solution folders
+ m = m.NextMatch ();
+ continue;
+ }
+ if (String.Compare (m.Groups [1].Value, vcprojGuid,
+ StringComparison.InvariantCultureIgnoreCase) == 0) {
+ // Ignore vcproj
+ ErrorUtilities.ReportWarning (0, string.Format("Ignoring vcproj '{0}'.", projectInfo.Name));
+ m = m.NextMatch ();
+ continue;
+ }
+
+ projectInfos.Add (new Guid (m.Groups[4].Value), projectInfo);
+
+ Project currentProject = p.ParentEngine.CreateNewProject ();
+ currentProject.Load (Path.Combine (solutionDir,
+ projectInfo.FileName.Replace ('\\', Path.DirectorySeparatorChar)));
+
+ foreach (BuildItem bi in currentProject.GetEvaluatedItemsByName ("ProjectReference")) {
+ string projectReferenceGuid = bi.GetEvaluatedMetadata ("Project");
+ projectInfo.Dependencies.Add (new Guid (projectReferenceGuid));
+ }
+
+ Match projectSectionMatch = projectDependenciesRegex.Match (m.Groups[6].Value);
+ while (projectSectionMatch.Success) {
+ Match projectDependencyMatch = projectDependencyRegex.Match (projectSectionMatch.Value);
+ while (projectDependencyMatch.Success) {
+ projectInfo.Dependencies.Add (new Guid (projectDependencyMatch.Groups[1].Value));
+ projectDependencyMatch = projectDependencyMatch.NextMatch ();
+ }
+ projectSectionMatch = projectSectionMatch.NextMatch ();
+ }
+ m = m.NextMatch ();
+ }
+
+ Match globalMatch = globalRegex.Match (line);
+ Match globalSectionMatch = globalSectionRegex.Match (globalMatch.Groups[1].Value);
+ while (globalSectionMatch.Success) {
+ string sectionType = globalSectionMatch.Groups[1].Value;
+ switch (sectionType) {
+ case "SolutionConfigurationPlatforms":
+ ParseSolutionConfigurationPlatforms (globalSectionMatch.Groups[2].Value, solutionTargets);
+ break;
+ case "ProjectConfigurationPlatforms":
+ ParseProjectConfigurationPlatforms (globalSectionMatch.Groups[2].Value, projectInfos);
+ break;
+ case "SolutionProperties":
+ ParseSolutionProperties (globalSectionMatch.Groups[2].Value);
+ break;
+ case "NestedProjects":
+ break;
+ default:
+ ErrorUtilities.ReportWarning (0, string.Format("Don't know how to handle GlobalSection {0}, Ignoring.", sectionType));
+ break;
+ }
+ globalSectionMatch = globalSectionMatch.NextMatch ();
+ }
+
+ AddCurrentSolutionConfigurationContents (p, solutionTargets, projectInfos);
+ AddValidateSolutionConfiguration (p);
+ AddProjectTargets (p, solutionTargets, projectInfos);
+ AddSolutionTargets (p, projectInfos);
+
+ }
+
+ void AddGeneralSettings (string solutionFile, Project p)
+ {
+ p.DefaultTargets = "Build";
+ p.InitialTargets = "ValidateSolutionConfiguration";
+ p.AddNewUsingTaskFromAssemblyName ("CreateTemporaryVCProject", "Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
+ p.AddNewUsingTaskFromAssemblyName ("ResolveVCProjectOutput", "Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
+
+ BuildPropertyGroup aspNetConfigurationPropertyGroup = p.AddNewPropertyGroup (true);
+ aspNetConfigurationPropertyGroup.Condition = " ('$(AspNetConfiguration)' == '') ";
+ aspNetConfigurationPropertyGroup.AddNewProperty ("AspNetConfiguration", "$(Configuration)");
+
+ string solutionFilePath = Path.GetFullPath (solutionFile);
+ BuildPropertyGroup solutionPropertyGroup = p.AddNewPropertyGroup (true);
+ solutionPropertyGroup.AddNewProperty ("SolutionDir", Path.GetDirectoryName (solutionFilePath) + Path.DirectorySeparatorChar);
+ solutionPropertyGroup.AddNewProperty ("SolutionExt", Path.GetExtension (solutionFile));
+ solutionPropertyGroup.AddNewProperty ("SolutionFileName", Path.GetFileName (solutionFile));
+ solutionPropertyGroup.AddNewProperty ("SolutionName", Path.GetFileNameWithoutExtension (solutionFile));
+ solutionPropertyGroup.AddNewProperty ("SolutionPath", solutionFilePath);
+ }
+
+ void ParseSolutionConfigurationPlatforms (string section, List<TargetInfo> solutionTargets)
+ {
+ Match solutionConfigurationPlatform = solutionConfigurationRegex.Match (section);
+ while (solutionConfigurationPlatform.Success) {
+ string solutionConfiguration = solutionConfigurationPlatform.Groups[1].Value;
+ string solutionPlatform = solutionConfigurationPlatform.Groups[2].Value;
+ solutionTargets.Add (new TargetInfo (solutionConfiguration, solutionPlatform));
+ solutionConfigurationPlatform = solutionConfigurationPlatform.NextMatch ();
+ }
+ }
+
+ void ParseProjectConfigurationPlatforms (string section, Dictionary<Guid, ProjectInfo> projectInfos)
+ {
+ List<Guid> missingGuids = new List<Guid> ();
+ Match projectConfigurationPlatform = projectConfigurationActiveCfgRegex.Match (section);
+ while (projectConfigurationPlatform.Success) {
+ Guid guid = new Guid (projectConfigurationPlatform.Groups[1].Value);
+ ProjectInfo projectInfo;
+ if (!projectInfos.TryGetValue (guid, out projectInfo)) {
+ if (!missingGuids.Contains (guid)) {
+ ErrorUtilities.ReportWarning (0, string.Format("Failed to find project {0}", guid));
+ missingGuids.Add (guid);
+ }
+ projectConfigurationPlatform = projectConfigurationPlatform.NextMatch ();
+ continue;
+ }
+ string solConf = projectConfigurationPlatform.Groups[2].Value;
+ string solPlat = projectConfigurationPlatform.Groups[3].Value;
+ string projConf = projectConfigurationPlatform.Groups[4].Value;
+ string projPlat = projectConfigurationPlatform.Groups[5].Value;
+ // hack, what are they doing here?
+ if (projPlat == "Any CPU")
+ projPlat = "AnyCPU";
+ projectInfo.TargetMap.Add (new TargetInfo (solConf, solPlat), new TargetInfo (projConf, projPlat));
+ projectConfigurationPlatform = projectConfigurationPlatform.NextMatch ();
+ }
+ Match projectConfigurationPlatformBuild = projectConfigurationBuildRegex.Match (section);
+ while (projectConfigurationPlatformBuild.Success) {
+ Guid guid = new Guid (projectConfigurationPlatformBuild.Groups[1].Value);
+ ProjectInfo projectInfo;
+ if (!projectInfos.TryGetValue (guid, out projectInfo)) {
+ if (!missingGuids.Contains (guid)) {
+ ErrorUtilities.ReportWarning (0, string.Format("Failed to find project {0}", guid));
+ missingGuids.Add (guid);
+ }
+ projectConfigurationPlatformBuild = projectConfigurationPlatformBuild.NextMatch ();
+ continue;
+ }
+ string solConf = projectConfigurationPlatformBuild.Groups[2].Value;
+ string solPlat = projectConfigurationPlatformBuild.Groups[3].Value;
+ string projConf = projectConfigurationPlatformBuild.Groups[4].Value;
+ string projPlat = projectConfigurationPlatformBuild.Groups[5].Value;
+ // hack, what are they doing here?
+ if (projPlat == "Any CPU")
+ projPlat = "AnyCPU";
+ projectInfo.TargetMap[new TargetInfo (solConf, solPlat)] = new TargetInfo (projConf, projPlat, true);
+ projectConfigurationPlatformBuild = projectConfigurationPlatformBuild.NextMatch ();
+ }
+ }
+
+ void ParseSolutionProperties (string section)
+ {
+ }
+
+ void AddCurrentSolutionConfigurationContents (Project p, List<TargetInfo> solutionTargets, Dictionary<Guid, ProjectInfo> projectInfos)
+ {
+ AddDefaultSolutionConfiguration (p,
+ solutionTargets.Count > 0 ?
+ solutionTargets [0] :
+ new TargetInfo ("Debug", "Any CPU"));
+
+ foreach (TargetInfo solutionTarget in solutionTargets) {
+ BuildPropertyGroup platformPropertyGroup = p.AddNewPropertyGroup (false);
+ platformPropertyGroup.Condition = string.Format (
+ " ('$(Configuration)' == '{0}') and ('$(Platform)' == '{1}') ",
+ solutionTarget.Configuration,
+ solutionTarget.Platform
+ );
+
+ string solutionConfigurationContents = "<SolutionConfiguration xmlns=\"\">";
+ foreach (KeyValuePair<Guid, ProjectInfo> projectInfo in projectInfos) {
+ foreach (KeyValuePair<TargetInfo, TargetInfo> targetInfo in projectInfo.Value.TargetMap) {
+ if (solutionTarget.Configuration == targetInfo.Key.Configuration && solutionTarget.Platform == targetInfo.Key.Platform) {
+ solutionConfigurationContents += string.Format ("<ProjectConfiguration Project=\"{0}\">{1}|{2}</ProjectConfiguration>",
+ projectInfo.Key.ToString ("B").ToUpper (), targetInfo.Value.Configuration, targetInfo.Value.Platform);
+ }
+ }
+ }
+ solutionConfigurationContents += "</SolutionConfiguration>";
+
+ platformPropertyGroup.AddNewProperty ("CurrentSolutionConfigurationContents", solutionConfigurationContents);
+ }
+ }
+
+ void AddDefaultSolutionConfiguration (Project p, TargetInfo target)
+ {
+ BuildPropertyGroup configurationPropertyGroup = p.AddNewPropertyGroup (true);
+ configurationPropertyGroup.Condition = " '$(Configuration)' == '' ";
+ configurationPropertyGroup.AddNewProperty ("Configuration", target.Configuration);
+
+ BuildPropertyGroup platformPropertyGroup = p.AddNewPropertyGroup (true);
+ platformPropertyGroup.Condition = " '$(Platform)' == '' ";
+ platformPropertyGroup.AddNewProperty ("Platform", target.Platform);
+ }
+
+ void AddWarningForMissingProjectConfiguration (Target target, string slnConfig, string slnPlatform, string projectName)
+ {
+ BuildTask task = target.AddNewTask ("Warning");
+ task.SetParameterValue ("Text",
+ String.Format ("The project configuration for project '{0}' corresponding " +
+ "to the solution configuration '{1}|{2}' was not found in the solution file.",
+ projectName, slnConfig, slnPlatform));
+ task.Condition = String.Format ("('$(Configuration)' == '{0}') and ('$(Platform)' == '{1}')",
+ slnConfig, slnPlatform);
+
+ }
+
+ void AddValidateSolutionConfiguration (Project p)
+ {
+ Target t = p.Targets.AddNewTarget ("ValidateSolutionConfiguration");
+ BuildTask task = t.AddNewTask ("Error");
+ task.SetParameterValue ("Text", "Invalid solution configuration and platform: \"$(Configuration)|$(Platform)\".");
+ task.Condition = "('$(CurrentSolutionConfigurationContents)' == '') and ('$(SkipInvalidConfigurations)' != 'true')";
+ task = t.AddNewTask ("Warning");
+ task.SetParameterValue ("Text", "Invalid solution configuration and platform: \"$(Configuration)|$(Platform)\".");
+ task.Condition = "('$(CurrentSolutionConfigurationContents)' == '') and ('$(SkipInvalidConfigurations)' == 'true')";
+ task = t.AddNewTask ("Message");
+ task.SetParameterValue ("Text", "Building solution configuration \"$(Configuration)|$(Platform)\".");
+ task.Condition = "'$(CurrentSolutionConfigurationContents)' != ''";
+ }
+
+ void AddProjectTargets (Project p, List<TargetInfo> solutionTargets, Dictionary<Guid, ProjectInfo> projectInfos)
+ {
+ foreach (KeyValuePair<Guid, ProjectInfo> projectInfo in projectInfos) {
+ ProjectInfo project = projectInfo.Value;
+ foreach (string buildTarget in buildTargets) {
+ Target target = p.Targets.AddNewTarget (project.Name + (buildTarget == "Build" ? string.Empty : ":" + buildTarget));
+ target.Condition = "'$(CurrentSolutionConfigurationContents)' != ''";
+ string dependencies = string.Empty;
+ foreach (Guid dependency in project.Dependencies) {
+ ProjectInfo dependentInfo;
+ if (projectInfos.TryGetValue (dependency, out dependentInfo)) {
+ if (dependencies.Length > 0)
+ dependencies += ";";
+ dependencies += dependentInfo.Name;
+ if (buildTarget != "Build")
+ dependencies += ":" + buildTarget;
+ }
+ }
+ if (dependencies != string.Empty)
+ target.DependsOnTargets = dependencies;
+
+ foreach (TargetInfo targetInfo in solutionTargets) {
+ BuildTask task = null;
+ TargetInfo projectTargetInfo;
+ if (!project.TargetMap.TryGetValue (targetInfo, out projectTargetInfo)) {
+ AddWarningForMissingProjectConfiguration (target, targetInfo.Configuration,
+ targetInfo.Platform, project.Name);
+ continue;
+ }
+ if (projectTargetInfo.Build) {
+ task = target.AddNewTask ("MSBuild");
+ task.SetParameterValue ("Projects", project.FileName);
+
+ if (buildTarget != "Build")
+ task.SetParameterValue ("Targets", buildTarget);
+ task.SetParameterValue ("Properties", string.Format ("Configuration={0}; Platform={1}; BuildingSolutionFile=true; CurrentSolutionConfigurationContents=$(CurrentSolutionConfigurationContents); SolutionDir=$(SolutionDir); SolutionExt=$(SolutionExt); SolutionFileName=$(SolutionFileName); SolutionName=$(SolutionName); SolutionPath=$(SolutionPath)", projectTargetInfo.Configuration, projectTargetInfo.Platform));
+ } else {
+ task = target.AddNewTask ("Message");
+ task.SetParameterValue ("Text", string.Format ("Project \"{0}\" is disabled for solution configuration \"{1}|{2}\".", project.Name, targetInfo.Configuration, targetInfo.Platform));
+ }
+ task.Condition = string.Format (" ('$(Configuration)' == '{0}') and ('$(Platform)' == '{1}') ", targetInfo.Configuration, targetInfo.Platform);
+ }
+ }
+ }
+ }
+
+ void AddSolutionTargets (Project p, Dictionary<Guid, ProjectInfo> projectInfos)
+ {
+ foreach (string buildTarget in buildTargets) {
+ Target t = p.Targets.AddNewTarget (buildTarget);
+ t.Condition = "'$(CurrentSolutionConfigurationContents)' != ''";
+ BuildTask task = t.AddNewTask ("CallTarget");
+ string targets = string.Empty;
+ foreach (KeyValuePair<Guid, ProjectInfo> projectInfo in projectInfos) {
+ if (targets.Length > 0)
+ targets += ";";
+ targets += projectInfo.Value.Name;
+ if (buildTarget != "Build")
+ targets += ":" + buildTarget;
+ }
+ task.SetParameterValue ("Targets", targets);
+ task.SetParameterValue ("RunEachTargetSeparately", "true");
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/tools/xbuild/xbuild.exe.sources b/mcs/tools/xbuild/xbuild.exe.sources
index 2709d04..f1544f7 100644
--- a/mcs/tools/xbuild/xbuild.exe.sources
+++ b/mcs/tools/xbuild/xbuild.exe.sources
@@ -6,3 +6,4 @@ ErrorUtilities.cs
LoggerInfo.cs
Main.cs
Parameters.cs
+SolutionParser.cs
diff --git a/mcs/tools/xbuild/xbuild/Microsoft.CSharp.targets b/mcs/tools/xbuild/xbuild/Microsoft.CSharp.targets
index f96b3c7..ded6904 100644
--- a/mcs/tools/xbuild/xbuild/Microsoft.CSharp.targets
+++ b/mcs/tools/xbuild/xbuild/Microsoft.CSharp.targets
@@ -10,6 +10,10 @@
<DebugType Condition=" '$(DebugType)' == 'none' "></DebugType>
</PropertyGroup>
+ <PropertyGroup>
+ <CreateManifestResourceNamesDependsOn></CreateManifestResourceNamesDependsOn>
+ </PropertyGroup>
+
<ItemGroup>
<DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)' != ''"/>
</ItemGroup>
@@ -17,7 +21,7 @@
<Target
Name="CoreCompile"
Inputs="@(Compile)"
- Outputs="$(OutputPath)$(AssemblyName)$(TargetExt)"
+ Outputs="@(IntermediateAssembly)"
>
<Csc
AdditionalLibPaths="$(AdditionalLibPaths)"
@@ -44,7 +48,7 @@
NoLogo="$(NoLogo)"
NoStandardLib="$(NoStdLib)"
Optimize="$(Optimize)"
- OutputAssembly="$(OutputPath)$(AssemblyName)$(TargetExt)"
+ OutputAssembly="@(IntermediateAssembly)"
PdbFile="$(PdbFile)"
Platform="$(PlatformTarget)"
References="@(ResolvedFiles);@(ChildProjectReferences)"
@@ -58,12 +62,32 @@
WarningsAsErrors="$(WarningsAsErrors)"
Win32Icon="$(Win32Icon)"
Win32Resource="$(Win32Resource)"
- />
- <!-- Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)" -->
+ Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)" />
<!-- ToolPath="$(CscToolPath)" -->
</Target>
- <Import Project="Microsoft.Common.targets" />
+ <Target Name="CreateManifestResourceNames">
+ <CreateCSharpManifestResourceName Condition="'@(ResxWithNoCulture)' != ''"
+ ResourceFiles="@(ResxWithNoCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestResourceWithNoCultureName" />
+ </CreateCSharpManifestResourceName>
+
+ <CreateCSharpManifestResourceName Condition="'@(NonResxWithNoCulture)' != ''"
+ ResourceFiles="@(NonResxWithNoCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestNonResxWithNoCulture" />
+ </CreateCSharpManifestResourceName>
+ <CreateCSharpManifestResourceName Condition="'@(ResxWithCulture)' != ''"
+ ResourceFiles="@(ResxWithCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestResourceWithCultureName" />
+ </CreateCSharpManifestResourceName>
+
+ <CreateCSharpManifestResourceName Condition="'@(NonResxWithCulture)' != ''"
+ ResourceFiles="@(NonResxWithCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestNonResxWithCulture" />
+ </CreateCSharpManifestResourceName>
+ </Target>
+
+ <Import Project="Microsoft.Common.targets" />
</Project>
diff --git a/mcs/tools/xbuild/xbuild/Microsoft.Common.targets b/mcs/tools/xbuild/xbuild/Microsoft.Common.targets
index 352e91b..3b9c23f 100644
--- a/mcs/tools/xbuild/xbuild/Microsoft.Common.targets
+++ b/mcs/tools/xbuild/xbuild/Microsoft.Common.targets
@@ -14,43 +14,91 @@
<PropertyGroup>
<AllowUnsafeBlocks Condition="'$(AllowUnsafeBlocks)' == ''">false</AllowUnsafeBlocks>
<AssemblyName Condition="'$(AssemblyName)' == ''">$(RootNamespace)</AssemblyName>
- <!--<OutputPath Condition="'$(OutputPath)' != ''">$(OutputPath)\</OutputPath>-->
+ <OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
<WarningLevel Condition="'$(WarningLevel)' == ''" >2</WarningLevel>
</PropertyGroup>
+ <PropertyGroup>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">obj\</BaseIntermediateOutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(IntermediateOutputPath)' == ''">
+ <IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU'">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
+ <IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU'">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <IntermediateAssembly Include="$(IntermediateOutputPath)$(AssemblyName)$(TargetExt)" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <TargetPath Include="$(OutputPath)" />
+ </ItemGroup>
+
<Target Name="PrepareForBuild">
<Message Importance="High" Text="Configuration: $(Configuration) Platform: $(Platform)"/>
<MakeDir
- Condition="'$(OutputPath)' != ''"
- Directories="$(OutputPath)"
+ Directories="$(OutputPath);$(IntermediateOutputPath)"
/>
+
+ <GetFrameworkPath>
+ <Output TaskParameter="Path" PropertyName="TargetFrameworkPath"/>
+ </GetFrameworkPath>
</Target>
+ <PropertyGroup>
+ <AllowedReferenceAssemblyFileExtensions Condition=" '$(AllowedReferenceAssemblyFileExtensions)' == '' ">
+ .exe;
+ .dll
+ </AllowedReferenceAssemblyFileExtensions>
+
+ <AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
+ .mdb
+ </AllowedReferenceRelatedFileExtensions>
+ </PropertyGroup>
+
<Target Name="ResolveAssemblyReferences">
<ResolveAssemblyReference
Assemblies="@(Reference)"
- SearchPaths=" "
+ AssemblyFiles="@(ChildProjectReferences)"
+ SearchPaths="{CandidateAssemblyFiles};{HintPathFromItem};{TargetFrameworkDirectory};{GAC};{RawFileName};$(OutputPath)"
+ CandidateAssemblyFiles="@(Content);@(None)"
+ TargetFrameworkDirectories="$(TargetFrameworkPath)"
+ AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
+ AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
+ FindDependencies="true"
+ FindSatellites="true"
+ FindRelatedFiles="true"
>
<Output TaskParameter="ResolvedFiles" ItemName="ResolvedFiles"/>
+ <Output TaskParameter="ResolvedDependencyFiles" ItemName="_ResolveAssemblyReferenceResolvedFiles"/>
+ <Output TaskParameter="RelatedFiles" ItemName="_ReferenceRelatedPaths"/>
+ <Output TaskParameter="SatelliteFiles" ItemName="ReferenceSatellitePaths"/>
+ <Output TaskParameter="CopyLocalFiles" ItemName="ReferenceCopyLocalPaths"/>
</ResolveAssemblyReference>
</Target>
<Target
Name="ResolveProjectReferences"
Condition=" '@(ProjectReference)' != ''"
- Inputs="@(ProjectReference)"
- Outputs="@(ChildProjectReferences)"
>
+ <!-- FIXME: don't build if building a .sln, since project ref would already have been built -->
<MSBuild
Projects="@(ProjectReference)"
- Targets="Build"
- RebaseOutputs="true"
+ Targets="GetTargetPath"
>
<Output TaskParameter="TargetOutputs" ItemName="ChildProjectReferences" />
</MSBuild>
</Target>
+ <Target Name = "CopyFilesMarkedCopyLocal">
+ <Copy
+ SourceFiles="@(ReferenceCopyLocalPaths)"
+ DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutputPath)%(DestinationSubDirectory)%(Filename)%(Extension)')"
+ />
+ </Target>
+
<!--
Not needed at the moment
<Target Name="_ComputeNonExistentFileProperty" Condition='false'>
@@ -60,18 +108,255 @@
</Target>
-->
+ <PropertyGroup>
+ <BuildDependsOn>
+ BeforeBuild;
+ CoreBuild;
+ AfterBuild
+ </BuildDependsOn>
+ </PropertyGroup>
+
+ <Target Name="BeforeBuild"/>
+ <Target Name="AfterBuild"/>
+
+ <Target Name="Build" DependsOnTargets="$(BuildDependsOn)" Outputs="$(TargetPath)"/>
+
+ <PropertyGroup>
+ <CoreBuildDependsOn>
+ PrepareForBuild;
+ ResolveProjectReferences;
+ ResolveAssemblyReferences;
+ CopyFilesMarkedCopyLocal;
+ BuildResources;
+ CoreCompile;
+ DeployOutputFiles
+ </CoreBuildDependsOn>
+ </PropertyGroup>
+
<Target
- Name="Build"
- DependsOnTargets="PrepareForBuild;ResolveAssemblyReferences;ResolveProjectReferences;CoreCompile"
+ Name="CoreBuild"
+ DependsOnTargets="$(CoreBuildDependsOn)"
Outputs="$(OutputPath)$(AssemblyName)$(TargetExt)"
/>
-<!--
- Doesn't work because it treats every property in Delete.Files as separate ITaskItem
- <Target Name="Clean">
+ <Target Name="BuildResources"
+ DependsOnTargets="AssignTargetPaths;SplitResourcesByCulture;CreateManifestResourceNames;CopyNonResxEmbeddedResources;GenerateResources;GenerateSatelliteAssemblies">
+ </Target>
+
+ <Target Name="SplitResourcesByCulture" DependsOnTargets="AssignTargetPaths">
+ <AssignCulture Files="@(EmbeddedResourceWithTargetPath)">
+ <Output TaskParameter="AssignedFilesWithNoCulture" ItemName="ResourcesWithNoCulture"/>
+ <Output TaskParameter="AssignedFilesWithCulture" ItemName="ResourcesWithCulture"/>
+ </AssignCulture>
+
+ <CreateItem Include="@(ResourcesWithNoCulture)" Condition="'%(Extension)' == '.resx'">
+ <Output TaskParameter="Include" ItemName="ResxWithNoCulture"/>
+ </CreateItem>
+
+ <CreateItem Include="@(ResourcesWithNoCulture)" Condition="'%(Extension)' != '.resx'">
+ <Output TaskParameter="Include" ItemName="NonResxWithNoCulture"/>
+ </CreateItem>
+
+ <CreateItem Include="@(ResourcesWithCulture)" Condition="'%(Extension)' == '.resx'">
+ <Output TaskParameter="Include" ItemName="ResxWithCulture"/>
+ </CreateItem>
+
+ <CreateItem Include="@(ResourcesWithCulture)" Condition="'%(Extension)' != '.resx'">
+ <Output TaskParameter="Include" ItemName="NonResxWithCulture"/>
+ </CreateItem>
+ </Target>
+
+ <!-- Copy non-resx resources to their manifest resource names, this is what the compiler expects -->
+ <Target Name = "CopyNonResxEmbeddedResources"
+ Condition = "'@(NonResxWithCulture)' != '' or '@(NonResxWithNoCulture)' != '' or '@(ManifestNonResxWithCulture)' != '' or '@(ManifestNonResxWithNoCulture)' != ''">
+
+ <MakeDir Directories="$(IntermediateOutputPath)%(ManifestNonResxWithCulture.Culture)"/>
+ <Copy SourceFiles = "@(NonResxWithCulture)"
+ DestinationFiles = "@(ManifestNonResxWithCulture->'$(IntermediateOutputPath)%(Identity)')">
+ <Output TaskParameter = "DestinationFiles" ItemName = "ManifestNonResxWithCultureOnDisk"/>
+ </Copy>
+
+ <Copy SourceFiles = "@(NonResxWithNoCulture)"
+ DestinationFiles = "@(ManifestNonResxWithNoCulture->'$(IntermediateOutputPath)%(Identity)')">
+ <Output TaskParameter = "DestinationFiles" ItemName = "ManifestNonResxWithNoCultureOnDisk"/>
+ </Copy>
+ </Target>
+
+ <Target Name = "GenerateResources">
+ <GenerateResource
+ Sources = "@(ResxWithNoCulture)"
+ UseSourcePath = "true"
+ OutputResources = "@(ManifestResourceWithNoCultureName->'$(IntermediateOutputPath)%(Identity).resources')"
+ Condition = "'@(ResxWithNoCulture)' != '' ">
+
+ <Output TaskParameter = "OutputResources" ItemName = "ManifestResourceWithNoCulture"/>
+ </GenerateResource>
+
+ <GenerateResource
+ Sources = "@(ResxWithCulture)"
+ UseSourcePath = "true"
+ OutputResources = "@(ManifestResourceWithCultureName->'$(IntermediateOutputPath)%(Identity).resources')"
+ Condition = "'@(ResxWithCulture)' != '' ">
+
+ <Output TaskParameter = "OutputResources" ItemName = "ManifestResourceWithCulture"/>
+ </GenerateResource>
+ </Target>
+
+ <Target Name="GenerateSatelliteAssemblies"
+ Inputs="@(ManifestResourceWithCulture);@(ManifestNonResxWithCultureOnDisk)"
+ Outputs="$(IntermediateOutputPath)%(Culture)\$(AssemblyName).resources.dll" >
+ <!-- @(NonResxWithCulture) - rename files to ManifestNon.. and then use for AL -->
+ <MakeDir Directories = "$(IntermediateOutputPath)%(ManifestResourceWithCulture.Culture)" Condition = "'@(ManifestResourceWithCulture)' != ''" />
+ <MakeDir Directories = "$(IntermediateOutputPath)%(ManifestNonResxWithCultureOnDisk.Culture)" Condition = "'@(ManifestNonResxWithCultureOnDisk)' != ''" />
+
+ <AL
+ Culture = "%(Culture)"
+ EmbedResources = "@(ManifestResourceWithCulture);@(ManifestNonResxWithCultureOnDisk)"
+ OutputAssembly = "$(IntermediateOutputPath)%(Culture)\$(AssemblyName).resources.dll"
+ />
+
+ <CreateItem
+ Include = "$(IntermediateOutputPath)%(Culture)\$(AssemblyName).resources.dll"
+ AdditionalMetadata = "Culture=%(Culture)"
+ Condition = "'@(ManifestResourceWithCulture)' != '' or '@(ManifestNonResxWithCultureOnDisk)' != ''">
+ <Output TaskParameter = "Include" ItemName = "IntermediateSatelliteAssemblies" />
+ </CreateItem>
+ </Target>
+
+ <!-- Assign target paths to files that will need to be copied along with the project -->
+ <Target Name = "AssignTargetPaths">
+ <AssignTargetPath Files="@(None)" RootFolder="$(MSBuildProjectDirectory)">
+ <Output TaskParameter="AssignedFiles" ItemName="NoneWithTargetPath"/>
+ </AssignTargetPath>
+
+ <AssignTargetPath Files="@(Content)" RootFolder="$(MSBuildProjectDirectory)">
+ <Output TaskParameter="AssignedFiles" ItemName="ContentWithTargetPath"/>
+ </AssignTargetPath>
+
+ <AssignTargetPath Files="@(EmbeddedResource)" RootFolder="$(MSBuildProjectDirectory)">
+ <Output TaskParameter="AssignedFiles" ItemName="EmbeddedResourceWithTargetPath"/>
+ </AssignTargetPath>
+ </Target>
+
+ <Target Name="DeployOutputFiles"
+ DependsOnTargets="BuildResources;CoreCompile;_CopyDeployFilesToOutputDirectory">
+
+ <Copy
+ SourceFiles="$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb"
+ Condition="Exists('$(IntermediateOutputPath)$(AssemblyName)$(TargetExt).mdb')"
+ DestinationFolder="$(OutputPath)" />
+
+ <Copy SourceFiles="@(IntermediateAssembly)" DestinationFolder="$(OutputPath)" />
+
+ <Copy
+ SourceFiles = "@(IntermediateSatelliteAssemblies)"
+ DestinationFiles = "@(IntermediateSatelliteAssemblies->'$(OutputPath)\%(Culture)\$(AssemblyName).resources.dll')" />
+ </Target>
+
+ <Target Name="_CopyDeployFilesToOutputDirectory"
+ DependsOnTargets="GetCopyToOutputDirectoryItems;
+ _CopyDeployFilesToOutputDirectoryToOutputDirectoryAlways;
+ CopyDeployFilesToOutputDirectoryPreserveNewest"/>
+
+ <Target Name="CopyDeployFilesToOutputDirectoryPreserveNewest"
+ Condition="'@(ItemsToCopyToOutputDirectoryAlways)' != ''">
+
+ <Copy SourceFiles="@(ItemsToCopyToOutputDirectoryAlways)"
+ DestinationFiles="@(ItemsToCopyToOutputDirectoryAlways->'$(OutputPath)%(TargetPath)')"/>
+ </Target>
+
+ <!-- Copy if newer -->
+ <Target Name="_CopyDeployFilesToOutputDirectoryToOutputDirectoryAlways"
+ Condition="'@(ItemsToCopyToOutputDirectoryPreserveNewest)' != ''"
+ Inputs="@(ItemsToCopyToOutputDirectoryPreserveNewest)"
+ Outputs="@(ItemsToCopyToOutputDirectoryPreserveNewest->'$(OutputPath)%(TargetPath)'">
+
+ <Copy SourceFiles="@(ItemsToCopyToOutputDirectoryAlways)"
+ DestinationFiles="@(ItemsToCopyToOutputDirectoryAlways->'$(OutputPath)%(TargetPath)')"/>
+ </Target>
+
+ <Target Name="GetTargetPath" Outputs="@(TargetPath->'%(FullPath)\$(AssemblyName)$(TargetExt)')"/>
+
+ <Target Name="GetCopyToOutputDirectoryItems"
+ Outputs="@(AllItemsFullPathWithTargetPath)"
+ DependsOnTargets="AssignTargetPaths">
+
+ <!-- FIXME: handle .vcproj -->
+ <MSBuild
+ Projects="@(ProjectReference)"
+ Targets="GetCopyToOutputDirectoryItems"
+ Condition="'@(ProjectReference)' != ''">
+
+ <Output TaskParameter="TargetOutputs" ItemName="AllChildProjectItemsWithTargetPath"/>
+ </MSBuild>
+
+ <!-- Process items from child project. The outputs need to have full path
+ as they'll be used from other projects -->
+
+ <CreateItem
+ Include="@(AllChildProjectItemsWithTargetPath->'%(FullPath)')"
+ Condition="'%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
+
+ <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
+ Condition="'%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
+ Condition="'%(AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+
+ </CreateItem>
+
+ <!-- Process _this_ project's items -->
+
+ <CreateItem
+ Include="@(NoneWithTargetPath->'%(FullPath)')"
+ Condition="'%(NoneWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(NoneWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
+ <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
+ Condition="'%(NoneWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
+ Condition="'%(NoneWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+ </CreateItem>
+
+ <CreateItem
+ Include="@(ContentWithTargetPath->'%(FullPath)')"
+ Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(ContentWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
+ <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
+ Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
+ Condition="'%(ContentWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+ </CreateItem>
+
+ <CreateItem
+ Include="@(EmbeddedResourceWithTargetPath->'%(FullPath)')"
+ Condition="'%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)' == 'Always' or '%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest'">
+ <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryAlways"
+ Condition="'%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)'=='Always'"/>
+ <Output TaskParameter="Include" ItemName="ItemsToCopyToOutputDirectoryPreserveNewest"
+ Condition="'%(EmbeddedResourceWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/>
+ </CreateItem>
+
+ </Target>
+
+ <PropertyGroup>
+ <CleanDependsOn>
+ BeforeClean;
+ CoreClean;
+ AfterClean
+ </CleanDependsOn>
+ </PropertyGroup>
+
+ <!-- FIXME: Include all generated files -->
+ <Target Name="Clean" DependsOnTargets="$(CleanDependsOn)"/>
+
+ <!-- Override in project to run before/after clean tasks -->
+ <Target Name="BeforeClean" />
+ <Target Name="AfterClean" />
+
+ <Target Name="CoreClean">
<Message Text="Trying to delete $(OutputPath)$(AssemblyName)$(TargetExt)"/>
<Delete Files="$(OutputPath)$(AssemblyName)$(TargetExt)" />
</Target>
--->
</Project>
diff --git a/mcs/tools/xbuild/xbuild/Microsoft.VisualBasic.targets b/mcs/tools/xbuild/xbuild/Microsoft.VisualBasic.targets
index 98c880e..2ec9e22 100644
--- a/mcs/tools/xbuild/xbuild/Microsoft.VisualBasic.targets
+++ b/mcs/tools/xbuild/xbuild/Microsoft.VisualBasic.targets
@@ -1,11 +1,15 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-
+ <UsingTask TaskName="Microsoft.Build.Tasks.CreateVisualBasicManifestResourceName" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<PropertyGroup>
<DefaultLanguageSourceExtension>.vb</DefaultLanguageSourceExtension>
<Language>VB</Language>
</PropertyGroup>
<PropertyGroup>
+ <CreateManifestResourceNamesDependsOn></CreateManifestResourceNamesDependsOn>
+ </PropertyGroup>
+
+ <PropertyGroup>
<FinalDefineConstants>CONFIG="$(Configuration)"</FinalDefineConstants>
<FinalDefineConstants Condition=" '$(DefineDebug)' == 'true' ">$(FinalDefineConstants),DEBUG=-1</FinalDefineConstants>
<FinalDefineConstants Condition=" '$(DefineTrace)' == 'true' ">$(FinalDefineConstants),TRACE=-1</FinalDefineConstants>
@@ -28,13 +32,12 @@
<Target
Name="CoreCompile"
Inputs="@(Compile)"
- Outputs="$(OutputPath)$(AssemblyName)$(TargetExt)"
+ Outputs="$(IntermediateAssembly)"
>
-
<Vbc
AdditionalLibPaths="$(AdditionalLibPaths)"
AddModules="@(AddModules)"
- BaseAddress="$(BaseAddress)"
+ BaseAddress="$(BaseAddress)"
CodePage="$(CodePage)"
DebugType="$(DebugType)"
DefineConstants="$(FinalDefineConstants)"
@@ -50,6 +53,7 @@
KeyFile="$(KeyOriginatorFile)"
MainEntryPoint="$(StartupObject)"
NoConfig="true"
+ NoLogo="$(NoLogo)"
NoStandardLib="$(NoStdLib)"
NoWarnings="$(_NoWarnings)"
Optimize="$(Optimize)"
@@ -57,15 +61,13 @@
OptionExplicit="$(OptionExplicit)"
OptionStrict="$(OptionStrict)"
OptionStrictType="$(OptionStrictType)"
- OutputAssembly="$(OutputPath)$(AssemblyName)$(TargetExt)"
+ OutputAssembly="$(IntermediateAssembly)"
Platform="$(PlatformTarget)"
- References="@(ReferencePath)"
+ References="@(ResolvedFiles);@(ChildProjectReferences)"
RemoveIntegerChecks="$(RemoveIntegerChecks)"
+ Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
ResponseFiles="$(CompilerResponseFile)"
- RootNamespace="$(RootNamespace)"
- SdkPath="$(FrameworkPathOverride)"
Sources="@(Compile)"
- TargetCompactFramework="$(TargetCompactFramework)"
TargetType="$(OutputType)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)"
@@ -73,16 +75,33 @@
Verbosity="$(VbcVerbosity)"
WarningsAsErrors="$(WarningsAsErrors)"
WarningsNotAsErrors="$(WarningsNotAsErrors)"
- Win32Icon="$(ApplicationIcon)"
+ Win32Icon="$(Win32Icon)"
Win32Resource="$(Win32Resource)"
- />
+ />
+ <!-- ToolPath="$(CscToolPath)" -->
- <!--
- Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
- ToolPath="$(VbcToolPath)"
+ </Target>
+
+ <Target Name="CreateManifestResourceNames">
+ <CreateVisualBasicManifestResourceName Condition="'@(ResxWithNoCulture)' != ''"
+ ResourceFiles="@(ResxWithNoCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestResourceWithNoCultureName" />
+ </CreateVisualBasicManifestResourceName>
+
+ <CreateVisualBasicManifestResourceName Condition="'@(NonResxWithNoCulture)' != ''"
+ ResourceFiles="@(NonResxWithNoCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestNonResxWithNoCulture" />
+ </CreateVisualBasicManifestResourceName>
- -->
+ <CreateVisualBasicManifestResourceName Condition="'@(ResxWithCulture)' != ''"
+ ResourceFiles="@(ResxWithCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestResourceWithCultureName" />
+ </CreateVisualBasicManifestResourceName>
+ <CreateVisualBasicManifestResourceName Condition="'@(NonResxWithCulture)' != ''"
+ ResourceFiles="@(NonResxWithCulture)" RootNamespace="$(RootNamespace)">
+ <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestNonResxWithCulture" />
+ </CreateVisualBasicManifestResourceName>
</Target>
<Import Project="Microsoft.Common.targets" />
diff --git a/mcs/tools/xbuild/xbuild/xbuild.rsp b/mcs/tools/xbuild/xbuild/xbuild.rsp
index e69de29..9b9ce70 100644
--- a/mcs/tools/xbuild/xbuild/xbuild.rsp
+++ b/mcs/tools/xbuild/xbuild/xbuild.rsp
@@ -0,0 +1,3 @@
+# xbuild command line options specified here will be used
+# by xbuild on every build, unless /noautoresponse is passed
+# on the command line.
diff --git a/mono/Makefile.in b/mono/Makefile.in
index e117155..bba89f4 100644
--- a/mono/Makefile.in
+++ b/mono/Makefile.in
@@ -67,8 +67,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/Makefile.in b/mono/arch/Makefile.in
index 454112e..d825c9e 100644
--- a/mono/arch/Makefile.in
+++ b/mono/arch/Makefile.in
@@ -82,8 +82,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/alpha/Makefile.in b/mono/arch/alpha/Makefile.in
index 9a06a94..376253b 100644
--- a/mono/arch/alpha/Makefile.in
+++ b/mono/arch/alpha/Makefile.in
@@ -77,8 +77,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/amd64/Makefile.in b/mono/arch/amd64/Makefile.in
index ed3defa..c85efb9 100644
--- a/mono/arch/amd64/Makefile.in
+++ b/mono/arch/amd64/Makefile.in
@@ -71,8 +71,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/arm/Makefile.in b/mono/arch/arm/Makefile.in
index ecd873b..57e730e 100644
--- a/mono/arch/arm/Makefile.in
+++ b/mono/arch/arm/Makefile.in
@@ -73,8 +73,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/hppa/Makefile.in b/mono/arch/hppa/Makefile.in
index c480eb2..053e946 100644
--- a/mono/arch/hppa/Makefile.in
+++ b/mono/arch/hppa/Makefile.in
@@ -71,8 +71,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/ia64/Makefile.in b/mono/arch/ia64/Makefile.in
index 899a7cf..72dad0f 100644
--- a/mono/arch/ia64/Makefile.in
+++ b/mono/arch/ia64/Makefile.in
@@ -55,8 +55,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/mips/Makefile.in b/mono/arch/mips/Makefile.in
index be0bdb0..6945481 100644
--- a/mono/arch/mips/Makefile.in
+++ b/mono/arch/mips/Makefile.in
@@ -77,8 +77,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/ppc/Makefile.in b/mono/arch/ppc/Makefile.in
index fca1340..becb14e 100644
--- a/mono/arch/ppc/Makefile.in
+++ b/mono/arch/ppc/Makefile.in
@@ -79,8 +79,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/s390/Makefile.in b/mono/arch/s390/Makefile.in
index 5c83752..1604d45 100644
--- a/mono/arch/s390/Makefile.in
+++ b/mono/arch/s390/Makefile.in
@@ -71,8 +71,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/s390x/Makefile.in b/mono/arch/s390x/Makefile.in
index dcb0091..eeb930b 100644
--- a/mono/arch/s390x/Makefile.in
+++ b/mono/arch/s390x/Makefile.in
@@ -71,8 +71,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/sparc/Makefile.in b/mono/arch/sparc/Makefile.in
index 7e3b447..81ef8ed 100644
--- a/mono/arch/sparc/Makefile.in
+++ b/mono/arch/sparc/Makefile.in
@@ -71,8 +71,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/arch/x86/Makefile.in b/mono/arch/x86/Makefile.in
index fd59900..a40d8cd 100644
--- a/mono/arch/x86/Makefile.in
+++ b/mono/arch/x86/Makefile.in
@@ -73,8 +73,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/benchmark/Makefile.in b/mono/benchmark/Makefile.in
index f620db9..12f2c11 100644
--- a/mono/benchmark/Makefile.in
+++ b/mono/benchmark/Makefile.in
@@ -55,8 +55,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/cil/Makefile.in b/mono/cil/Makefile.in
index a2549e8..4fb5d1c 100644
--- a/mono/cil/Makefile.in
+++ b/mono/cil/Makefile.in
@@ -67,8 +67,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/dis/ChangeLog b/mono/dis/ChangeLog
index db5e556..92fd651 100644
--- a/mono/dis/ChangeLog
+++ b/mono/dis/ChangeLog
@@ -1,3 +1,15 @@
+2009-06-03 Jb Evain <jbevain at novell.com>
+
+ backport of 135337.
+
+ * main.c (dis_code): don't try to locate invalid entry points.
+
+2009-06-03 Jb Evain <jbevain at novell.com>
+
+ backport of r135334.
+
+ * main.c (dis_type): escape namespaces.
+
2009-01-12 Jb Evain <jbevain at novell.com>
* main.c: update reference to METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE
diff --git a/mono/dis/Makefile.in b/mono/dis/Makefile.in
index 47337fe..45679ff 100644
--- a/mono/dis/Makefile.in
+++ b/mono/dis/Makefile.in
@@ -88,8 +88,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/dis/main.c b/mono/dis/main.c
index 3f35c7e..c2ba7f1 100644
--- a/mono/dis/main.c
+++ b/mono/dis/main.c
@@ -718,7 +718,8 @@ dis_code (MonoImage *m, guint32 token, guint32 rva, MonoGenericContainer *contai
}
mh = mono_metadata_parse_mh_full (m, container, ptr);
- if ((entry_point = mono_image_get_entry_point (m)) && mono_metadata_token_index (entry_point)){
+ entry_point = mono_image_get_entry_point (m);
+ if (entry_point && mono_metadata_token_index (entry_point) && mono_metadata_token_table (entry_point) == MONO_TABLE_METHOD) {
loc = mono_metadata_locate_token (m, entry_point);
if (rva == read32 (loc))
fprintf (output, "\t.entrypoint\n");
@@ -1204,8 +1205,12 @@ dis_type (MonoImage *m, int n, int is_nested, int forward)
name = mono_metadata_string_heap (m, cols [MONO_TYPEDEF_NAME]);
nspace = mono_metadata_string_heap (m, cols [MONO_TYPEDEF_NAMESPACE]);
- if (*nspace && !is_nested)
- fprintf (output, ".namespace %s\n{\n", nspace);
+ if (*nspace && !is_nested) {
+ char *esnspace;
+ esnspace = get_escaped_name (nspace);
+ fprintf (output, ".namespace %s\n{\n", esnspace);
+ g_free (esnspace);
+ }
container = mono_metadata_load_generic_params (m, MONO_TOKEN_TYPE_DEF | (n + 1), NULL);
if (container)
diff --git a/mono/interpreter/Makefile.in b/mono/interpreter/Makefile.in
index fe504c2..fe1d040 100644
--- a/mono/interpreter/Makefile.in
+++ b/mono/interpreter/Makefile.in
@@ -101,8 +101,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/io-layer/ChangeLog b/mono/io-layer/ChangeLog
index b4c0efa..1af0208 100644
--- a/mono/io-layer/ChangeLog
+++ b/mono/io-layer/ChangeLog
@@ -1,3 +1,21 @@
+2009-05-28 Mark Probst <mark.probst at gmail.com>
+
+ * collection.c (_wapi_collection_init): If pthread_create() fails,
+ try again with larger and then with no stack size set. Fixes
+ #470336.
+
+ Backport of r134985.
+
+2009-05-05 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * events.c: fix event_signal and namedevent_signal to actually signal
+ the handle.
+
+2009-04-29 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * sockets.c: don't display a warning when connect() fails because the
+ socket was closed in another thread.
+
2009-02-12 Gonzalo Paniagua Javier <gonzalo at novell.com>
* io.c: EXDEV when moving directories fails now without creating a
diff --git a/mono/io-layer/Makefile.in b/mono/io-layer/Makefile.in
index b4059e0..17d5929 100644
--- a/mono/io-layer/Makefile.in
+++ b/mono/io-layer/Makefile.in
@@ -122,8 +122,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/io-layer/collection.c b/mono/io-layer/collection.c
index 2da5505..0f73476 100644
--- a/mono/io-layer/collection.c
+++ b/mono/io-layer/collection.c
@@ -57,21 +57,32 @@ void _wapi_collection_init (void)
{
pthread_attr_t attr;
int ret;
-
- ret = pthread_attr_init (&attr);
- g_assert (ret == 0);
-
+ int set_stacksize = 0;
+
+ retry:
+ ret = pthread_attr_init (&attr);
+ g_assert (ret == 0);
+
#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
+ if (set_stacksize == 0) {
#if defined(__FreeBSD__) || defined(__NetBSD__)
- ret = pthread_attr_setstacksize (&attr, 65536);
+ ret = pthread_attr_setstacksize (&attr, 65536);
#else
- ret = pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+ ret = pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
#endif
- g_assert (ret == 0);
+ g_assert (ret == 0);
+ } else if (set_stacksize == 1) {
+ ret = pthread_attr_setstacksize (&attr, 131072);
+ g_assert (ret == 0);
+ }
#endif
- ret = pthread_create (&collection_thread_id, &attr, collection_thread,
- NULL);
+ ret = pthread_create (&collection_thread_id, &attr, collection_thread,
+ NULL);
+ if (ret != 0 && set_stacksize < 2) {
+ set_stacksize++;
+ goto retry;
+ }
if (ret != 0) {
g_error ("%s: Couldn't create handle collection thread: %s",
__func__, g_strerror (ret));
diff --git a/mono/io-layer/events.c b/mono/io-layer/events.c
index 40687cb..b55e8e7 100644
--- a/mono/io-layer/events.c
+++ b/mono/io-layer/events.c
@@ -96,7 +96,7 @@ static void event_ops_init (void)
static void event_signal(gpointer handle)
{
- ResetEvent(handle);
+ SetEvent(handle);
}
static gboolean event_own (gpointer handle)
@@ -129,7 +129,7 @@ static gboolean event_own (gpointer handle)
static void namedevent_signal (gpointer handle)
{
- ResetEvent (handle);
+ SetEvent (handle);
}
/* NB, always called with the shared handle lock held */
diff --git a/mono/io-layer/sockets.c b/mono/io-layer/sockets.c
index 5474dbd..921fa09 100644
--- a/mono/io-layer/sockets.c
+++ b/mono/io-layer/sockets.c
@@ -332,7 +332,9 @@ int _wapi_connect(guint32 fd, const struct sockaddr *serv_addr,
WAPI_HANDLE_SOCKET,
(gpointer *)&socket_handle);
if (ok == FALSE) {
- g_warning ("%s: error looking up socket handle %p", __func__, handle);
+ /* ECONNRESET means the socket was closed by another thread */
+ if (errnum != WSAECONNRESET)
+ g_warning ("%s: error looking up socket handle %p", __func__, handle);
} else {
socket_handle->saved_error = errnum;
}
diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog
index 2dc214f..4f7a025 100644
--- a/mono/metadata/ChangeLog
+++ b/mono/metadata/ChangeLog
@@ -1,3 +1,206 @@
+2009-06-09 Zoltan Varga <vargaz at gmail.com>
+
+ * metadata.c (free_inflated_method): Call
+ mono_marshal_free_inflated_wrappers (), which was missed earlier.
+
+2009-06-09 Rodrigo Kumpera <rkumpera at novell.com>
+
+ Revert previous commit to threads.c until the race condition
+ is fixed.
+
+2009-06-08 Rodrigo Kumpera <rkumpera at novell.com>
+
+ Backport of 135171.
+
+ * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
+ Check if the thread was interrupted and proccess it straight away.
+ Makes abortion much more responsive.
+
+ Backport of 135170.
+
+ * threads.c (mono_thread_execute_interruption): Use atomic cas with
+ MonoThread::interruption_requested to match it's counterpart.
+
+ Fixes a hang in abort-stress-1 on a 2 core x86.
+
+2009-06-01 Rodrigo Kumpera <rkumpera at novell.com>
+
+ * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
+ of ldind opcode for generic instances so we don't fail for direct wrappers.
+
+ Fixes #508538.
+
+2009-06-04 Zoltan Varga <vargaz at gmail.com>
+
+ * marshal.c metadata.c: Applied patch from Ulrich Weigand
+ <uweigand at de.ibm.com>: Free the wrappers of inflated generic methods when
+ the inflated method is freed. Fixes #508389.
+
+ The code is contributed under the MIT/X11 license.
+
+2009-05-28 Rodrigo Kumpera <rkumpera at novell.com>
+
+ Backport of r134810.
+
+ * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
+ discarded based on their most specific definition so we set the method_slots
+ array before checking if the method is acceptable or not.
+
+ Fixes #506757.
+
+2009-05-25 Rodrigo Kumpera <rkumpera at novell.com>
+
+ Backport of r134723.
+
+ * class.c (mono_class_setup_fields): Don't mark simd types as having
+ 16 bytes alignment as the whole runtime doesn't support.
+
+2009-05-05 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * icall-def.h:
+ * threads-types.h:
+ * threads.c: added internal call for WaitHandle.SignalAndWait.
+
+2009-05-03 Martin Baulig <martin at ximian.com>
+
+ * mono-debug-debugger.c
+ (mono_debugger_check_breakpoints): Check class init handlers even
+ if we don't have any method load handers.
+
+2009-04-30 Zoltan Varga <vargaz at gmail.com>
+
+ * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid
+ returning refonly assemblies if refonly is FALSE. Fixes #499013.
+
+2009-04-28 Zoltan Varga <vargaz at gmail.com>
+
+ * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes
+ part of #498692.
+
+2009-04-23 Tom Hindle <tom_hindle at sil.org>
+
+ * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
+ changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
+
+2009-03-31 Martin Baulig <martin at ximian.com>
+
+ Backport of r130659.
+
+ * mono-debug-debugger.h (MonoDebuggerEvent): Add
+ `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
+ `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
+ (mono_debugger_event_create_appdomain): New function.
+ (mono_debugger_event_unload_appdomain): New function.
+
+ * appdomain.c (mono_domain_create_appdomain_internal): Call
+ mono_debugger_event_create_appdomain().
+
+2009-03-31 Martin Baulig <martin at ximian.com>
+
+ Backport of r130658.
+
+ * mono-debug-debugger.c
+ (mono_debugger_register_class_init_callback): Also register the
+ class init callback if the class is already initialized to make
+ things work with shadow copied assemblies.
+
+2009-04-27 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * assembly.c: assemblies in the GAC should never be shadow-copied.
+
+2009-02-22 Zoltan Varga <vargaz at gmail.com>
+
+ * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
+ the a thread does not suspend within 100ms.
+
+ * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
+ in addition to StopRequested as well.
+
+ * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
+
+ * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
+ search the method_hash before inserting a new entry, to avoid crashes when
+ the same method is inserted multiple times, causing the old
+ MonoDebugMethodInfo structure to be freed by the value dtor function.
+
+2009-04-15 Martin Baulig <martin at ximian.com>
+
+ * debug-mono-symfile.c
+ (mono_debug_symfile_lookup_location): Don't print a warning for
+ unknown extended opcodes if they're within 0x40 and 0x7f.
+
+2009-03-31 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
+ * MaxIOVectorLength enabled, just ignore them.
+ Fixes bug #349688.
+
+2009-01-26 Zoltan Varga <vargaz at gmail.com>
+
+ * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
+ (mono_class_native_size): Use klass->marshal_info->min_align instead of
+ klass->min_align, since klass->min_align contains the managed alignment,
+ while the native alignment can be different, like for longs on x86.
+ Fixes #469135.
+
+ * class-internals.h (MonoMarshalType): Add a min_align field.
+
+2009-03-27 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * appdomain.c:
+ * console-io.[ch]: added new mono_console_init() to make sure that
+ file descriptors 0, 1 and 2 are opened.
+ Bug #489019 fixed.
+
+2009-03-26 Zoltan Varga <vargaz at gmail.com>
+
+ * marshal.c (emit_marshal_object): Generate code to throw an exception
+ instead of throwing it. Fixes #488670.
+
+2009-03-23 Zoltan Varga <vargaz at gmail.com>
+
+ * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
+ methods, return the native function address itself. Fixes
+ #487758.
+
+2009-03-19 Zoltan Varga <vargaz at gmail.com>
+
+ Backport of r129798.
+
+ * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
+
+2009-03-18 Zoltan Varga <vargaz at gmail.com>
+
+ * icall.c: Handle user types in many Type icalls. Fixes #486303.
+
+2009-03-12 Gonzalo Paniagua Javier <gonzalo at novell.com>
+
+ * appdomain.c: if the assembly name is a shadow-copied file, return
+ TRUE from mono_is_shadow_copy_enabled but don't actually do anything
+ in mono_make_shadow_copy.
+ * icall.c: if the assembly name is a shadow-copied file, replace it
+ with the original assembly path.
+
+ Bug #484244 fixed. NUnit tests for corlib can be run without
+ --noshadow now.
+
+2009-03-08 Zoltan Varga <vargaz at gmail.com>
+
+ Backport of r128849 + r128490.
+
+ * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
+ between GCHandles of type WeakTrackResurrection and the objects they
+ point to.
+
+ * gc.c: Partly implement the sematics of GCHandles of type
+ WeakTrackResurrection: these handles should only be cleared after the
+ finalizer of the object they are pointing to has ran.
+
+ * domain-internals.h (struct _MonoDomain): Add a separate lock for the
+ finalize_objects_hash.
+
+ * gc.c: Use the separate lock to access the finalize_objects_hash field.
+
2009-03-10 Zoltan Varga <vargaz at gmail.com>
Backport of r129009.
diff --git a/mono/metadata/Makefile.in b/mono/metadata/Makefile.in
index 572d8c6..c050f0b 100644
--- a/mono/metadata/Makefile.in
+++ b/mono/metadata/Makefile.in
@@ -127,8 +127,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/metadata/appdomain.c b/mono/metadata/appdomain.c
index 399a8be..e3275e1 100644
--- a/mono/metadata/appdomain.c
+++ b/mono/metadata/appdomain.c
@@ -41,8 +41,10 @@
#include <mono/metadata/monitor.h>
#include <mono/metadata/threadpool.h>
#include <mono/metadata/mono-debug.h>
+#include <mono/metadata/mono-debug-debugger.h>
#include <mono/metadata/attach.h>
#include <mono/metadata/file-io.h>
+#include <mono/metadata/console-io.h>
#include <mono/utils/mono-uri.h>
#include <mono/utils/mono-logger.h>
#include <mono/utils/mono-path.h>
@@ -110,6 +112,9 @@ add_assemblies_to_domain (MonoDomain *domain, MonoAssembly *ass, GHashTable *has
static MonoAppDomain *
mono_domain_create_appdomain_internal (char *friendly_name, MonoAppDomainSetup *setup);
+static char *
+get_shadow_assembly_location_base (MonoDomain *domain);
+
static MonoLoadFunc load_function = NULL;
void
@@ -228,6 +233,7 @@ mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb,
mono_network_init ();
+ mono_console_init ();
mono_attach_init ();
/* mscorlib is loaded before we install the load hook */
@@ -412,6 +418,8 @@ mono_domain_create_appdomain_internal (char *friendly_name, MonoAppDomainSetup *
add_assemblies_to_domain (data, mono_defaults.corlib->assembly, NULL);
+ mono_debugger_event_create_appdomain (data, get_shadow_assembly_location_base (data));
+
return ad;
}
@@ -771,7 +779,7 @@ ves_icall_System_AppDomain_GetAssemblies (MonoAppDomain *ad, MonoBoolean refonly
mono_domain_assemblies_lock (domain);
for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
ass = tmp->data;
- if (refonly && !ass->ref_only)
+ if (refonly != ass->ref_only)
continue;
if (ass->corlib_internal)
continue;
@@ -1364,9 +1372,9 @@ mono_is_shadow_copy_enabled (MonoDomain *domain, const gchar *dir_name)
/* Is dir_name a shadow_copy destination already? */
base_dir = get_shadow_assembly_location_base (domain);
- if (strstr (dir_name, base_dir) == dir_name) {
+ if (strstr (dir_name, base_dir)) {
g_free (base_dir);
- return FALSE;
+ return TRUE;
}
g_free (base_dir);
@@ -1398,14 +1406,24 @@ mono_make_shadow_copy (const char *filename)
struct utimbuf utbuf;
char *dir_name = g_path_get_dirname (filename);
MonoDomain *domain = mono_domain_get ();
+ char *shadow_dir;
+
set_domain_search_path (domain);
if (!mono_is_shadow_copy_enabled (domain, dir_name)) {
g_free (dir_name);
return (char *) filename;
}
+ /* Is dir_name a shadow_copy destination already? */
+ shadow_dir = get_shadow_assembly_location_base (domain);
+ if (strstr (dir_name, shadow_dir)) {
+ g_free (shadow_dir);
+ g_free (dir_name);
+ return (char *) filename;
+ }
+ g_free (shadow_dir);
g_free (dir_name);
-
+
shadow = get_shadow_assembly_location (filename);
if (ensure_directory_exists (shadow) == FALSE) {
g_free (shadow);
@@ -2020,6 +2038,8 @@ mono_domain_unload (MonoDomain *domain)
}
}
+ mono_debugger_event_unload_appdomain (domain);
+
mono_domain_set (domain, FALSE);
/* Notify OnDomainUnload listeners */
method = mono_class_get_method_from_name (domain->domain->mbr.obj.vtable->klass, "DoDomainUnload", -1);
@@ -2076,7 +2096,7 @@ mono_domain_unload (MonoDomain *domain)
/* Roll back the state change */
domain->state = MONO_APPDOMAIN_CREATED;
- g_warning (thread_data.failure_reason);
+ g_warning ("%s", thread_data.failure_reason);
ex = mono_get_exception_cannot_unload_appdomain (thread_data.failure_reason);
diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c
index 58d2dca..961e90e 100644
--- a/mono/metadata/assembly.c
+++ b/mono/metadata/assembly.c
@@ -129,6 +129,8 @@ static GSList *loaded_assembly_bindings = NULL;
static MonoAssembly*
mono_assembly_invoke_search_hook_internal (MonoAssemblyName *aname, gboolean refonly, gboolean postload);
+static MonoBoolean
+mono_assembly_is_in_gac (const gchar *filanem);
static gchar*
encode_public_tok (const guchar *token, gint32 len)
@@ -1264,7 +1266,10 @@ mono_assembly_open_full (const char *filename, MonoImageOpenStatus *status, gboo
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY,
"Assembly Loader probing location: '%s'.", fname);
- new_fname = mono_make_shadow_copy (fname);
+
+ new_fname = NULL;
+ if (!mono_assembly_is_in_gac (fname))
+ new_fname = mono_make_shadow_copy (fname);
if (new_fname && new_fname != fname) {
g_free (fname);
fname = new_fname;
@@ -1988,6 +1993,67 @@ mono_assembly_load_with_partial_name (const char *name, MonoImageOpenStatus *sta
return res;
}
+static MonoBoolean
+mono_assembly_is_in_gac (const gchar *filename)
+{
+ const gchar *rootdir;
+ gchar *gp;
+ gchar **paths;
+
+ if (filename == NULL)
+ return FALSE;
+
+ for (paths = extra_gac_paths; paths && *paths; paths++) {
+ if (strstr (*paths, filename) != *paths)
+ continue;
+
+ gp = (gchar *) (filename + strlen (*paths));
+ if (*gp != G_DIR_SEPARATOR)
+ continue;
+ gp++;
+ if (strncmp (gp, "lib", 3))
+ continue;
+ gp += 3;
+ if (*gp != G_DIR_SEPARATOR)
+ continue;
+ gp++;
+ if (strncmp (gp, "mono", 4))
+ continue;
+ gp += 4;
+ if (*gp != G_DIR_SEPARATOR)
+ continue;
+ gp++;
+ if (strncmp (gp, "gac", 3))
+ continue;
+ gp += 3;
+ if (*gp != G_DIR_SEPARATOR)
+ continue;
+
+ return TRUE;
+ }
+
+ rootdir = mono_assembly_getrootdir ();
+ if (strstr (filename, rootdir) != filename)
+ return FALSE;
+
+ gp = (gchar *) (filename + strlen (rootdir));
+ if (*gp != G_DIR_SEPARATOR)
+ return FALSE;
+ gp++;
+ if (strncmp (gp, "mono", 4))
+ return FALSE;
+ gp += 4;
+ if (*gp != G_DIR_SEPARATOR)
+ return FALSE;
+ gp++;
+ if (strncmp (gp, "gac", 3))
+ return FALSE;
+ gp += 3;
+ if (*gp != G_DIR_SEPARATOR)
+ return FALSE;
+ return TRUE;
+}
+
static MonoImage*
mono_assembly_load_publisher_policy (MonoAssemblyName *aname)
{
diff --git a/mono/metadata/class-internals.h b/mono/metadata/class-internals.h
index 1159862..1554b56 100644
--- a/mono/metadata/class-internals.h
+++ b/mono/metadata/class-internals.h
@@ -150,7 +150,7 @@ typedef struct {
} MonoMarshalField;
typedef struct {
- guint32 native_size;
+ guint32 native_size, min_align;
guint32 num_fields;
MonoMethod *ptr_to_str;
MonoMethod *str_to_ptr;
diff --git a/mono/metadata/class.c b/mono/metadata/class.c
index a67f144..47f5598 100644
--- a/mono/metadata/class.c
+++ b/mono/metadata/class.c
@@ -1044,8 +1044,14 @@ mono_class_setup_fields (MonoClass *class)
class->min_align = 1;
}
- if (class->simd_type)
+ /* We can't really enable 16 bytes alignment until the GC supports it.
+ The whole layout/instance size code must be reviewed because we do alignment calculation in terms of the
+ boxed instance, which leads to unexplainable holes at the beginning of an object embedding a simd type.
+ Bug #506144 is an example of this issue.
+
+ if (class->simd_type)
class->min_align = 16;
+ */
/* Get the real size */
explicit_size = mono_metadata_packing_from_typedef (class->image, class->type_token, &packing_size, &real_size);
diff --git a/mono/metadata/console-io.c b/mono/metadata/console-io.c
index 41f1e10..0543f47 100644
--- a/mono/metadata/console-io.c
+++ b/mono/metadata/console-io.c
@@ -12,6 +12,7 @@
#include <glib.h>
#include <stdio.h>
#include <string.h>
+#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#ifdef HAVE_SYS_TIME_H
@@ -64,6 +65,26 @@ static gchar *keypad_xmit_str;
static struct termios mono_attr;
#endif
+#if defined(PLATFORM_WIN32)
+void
+mono_console_init (void)
+{
+}
+#else
+void
+mono_console_init (void)
+{
+ int fd;
+
+ /* Make sure the standard file descriptors are opened */
+ fd = open ("/dev/null", O_RDWR);
+ while (fd >= 0 && fd < 3) {
+ fd = open ("/dev/null", O_RDWR);
+ }
+ close (fd);
+}
+#endif
+
#ifdef PLATFORM_WIN32
MonoBoolean
ves_icall_System_ConsoleDriver_Isatty (HANDLE handle)
diff --git a/mono/metadata/console-io.h b/mono/metadata/console-io.h
index 6376abc..0afd281 100644
--- a/mono/metadata/console-io.h
+++ b/mono/metadata/console-io.h
@@ -18,6 +18,7 @@
G_BEGIN_DECLS
+void mono_console_init (void) MONO_INTERNAL;
MonoBoolean ves_icall_System_ConsoleDriver_Isatty (HANDLE handle) MONO_INTERNAL;
gint32 ves_icall_System_ConsoleDriver_InternalKeyAvailable (gint32 timeout) MONO_INTERNAL;
MonoBoolean ves_icall_System_ConsoleDriver_SetEcho (MonoBoolean echo) MONO_INTERNAL;
diff --git a/mono/metadata/debug-mono-symfile.c b/mono/metadata/debug-mono-symfile.c
index a1490ea..cbe9ab5 100644
--- a/mono/metadata/debug-mono-symfile.c
+++ b/mono/metadata/debug-mono-symfile.c
@@ -258,6 +258,9 @@ mono_debug_symfile_lookup_location (MonoDebugMethodInfo *minfo, guint32 offset)
#define DW_LNE_end_sequence 1
#define DW_LNE_MONO_negate_is_hidden 0x40
+#define DW_LNE_MONO__extensions_start 0x40
+#define DW_LNE_MONO__extensions_end 0x7f
+
if ((symfile = minfo->handle->symfile) == NULL)
return NULL;
@@ -290,6 +293,9 @@ mono_debug_symfile_lookup_location (MonoDebugMethodInfo *minfo, guint32 offset)
break;
} else if (opcode == DW_LNE_MONO_negate_is_hidden) {
;
+ } else if ((opcode >= DW_LNE_MONO__extensions_start) &&
+ (opcode <= DW_LNE_MONO__extensions_end)) {
+ ; // reserved for future extensions
} else {
g_warning ("Unknown extended opcode %x in LNT", opcode);
}
diff --git a/mono/metadata/domain-internals.h b/mono/metadata/domain-internals.h
index aa38f71..4f0fda6 100644
--- a/mono/metadata/domain-internals.h
+++ b/mono/metadata/domain-internals.h
@@ -220,6 +220,12 @@ struct _MonoDomain {
* if the hashtable contains a GC visible reference to them.
*/
GHashTable *finalizable_objects_hash;
+ /* Maps MonoObjects to a GSList of WeakTrackResurrection GCHandles pointing to them */
+ GHashTable *track_resurrection_objects_hash;
+ /* Maps WeakTrackResurrection GCHandles to the MonoObjects they point to */
+ GHashTable *track_resurrection_handles_hash;
+ /* Protects the three hashes above */
+ CRITICAL_SECTION finalizable_objects_hash_lock;
/* Used when accessing 'domain_assemblies' */
CRITICAL_SECTION assemblies_lock;
diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c
index 4b070c5..a2c6235 100644
--- a/mono/metadata/domain.c
+++ b/mono/metadata/domain.c
@@ -1174,10 +1174,12 @@ mono_domain_create (void)
domain->jit_info_table = jit_info_table_new (domain);
domain->jit_info_free_queue = NULL;
domain->finalizable_objects_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
+ domain->track_resurrection_handles_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
InitializeCriticalSection (&domain->lock);
InitializeCriticalSection (&domain->assemblies_lock);
InitializeCriticalSection (&domain->jit_code_hash_lock);
+ InitializeCriticalSection (&domain->finalizable_objects_hash_lock);
domain->method_rgctx_hash = NULL;
@@ -1791,6 +1793,12 @@ mono_domain_assembly_open (MonoDomain *domain, const char *name)
return ass;
}
+static void
+free_slist (gpointer key, gpointer value, gpointer user_data)
+{
+ g_slist_free (value);
+}
+
void
mono_domain_free (MonoDomain *domain, gboolean force)
{
@@ -1898,6 +1906,12 @@ mono_domain_free (MonoDomain *domain, gboolean force)
}
g_hash_table_destroy (domain->finalizable_objects_hash);
domain->finalizable_objects_hash = NULL;
+ if (domain->track_resurrection_objects_hash) {
+ g_hash_table_foreach (domain->track_resurrection_objects_hash, free_slist, NULL);
+ g_hash_table_destroy (domain->track_resurrection_objects_hash);
+ }
+ if (domain->track_resurrection_handles_hash)
+ g_hash_table_destroy (domain->track_resurrection_handles_hash);
if (domain->method_rgctx_hash) {
g_hash_table_destroy (domain->method_rgctx_hash);
domain->method_rgctx_hash = NULL;
@@ -1907,6 +1921,7 @@ mono_domain_free (MonoDomain *domain, gboolean force)
domain->generic_virtual_cases = NULL;
}
+ DeleteCriticalSection (&domain->finalizable_objects_hash_lock);
DeleteCriticalSection (&domain->assemblies_lock);
DeleteCriticalSection (&domain->jit_code_hash_lock);
DeleteCriticalSection (&domain->lock);
diff --git a/mono/metadata/gc.c b/mono/metadata/gc.c
index 87f3935..7ee79e0 100644
--- a/mono/metadata/gc.c
+++ b/mono/metadata/gc.c
@@ -18,6 +18,7 @@
#include <mono/metadata/profiler-private.h>
#include <mono/metadata/domain-internals.h>
#include <mono/metadata/class-internals.h>
+#include <mono/metadata/metadata-internals.h>
#include <mono/metadata/mono-mlist.h>
#include <mono/metadata/threadpool.h>
#include <mono/utils/mono-logger.h>
@@ -66,12 +67,17 @@ static MonoThread *gc_thread;
static void object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*));
+static void mono_gchandle_set_target (guint32 gchandle, MonoObject *obj);
+
#ifndef HAVE_NULL_GC
static HANDLE pending_done_event;
static HANDLE shutdown_event;
static HANDLE thread_started_event;
#endif
+#define domain_finalizers_lock(domain) EnterCriticalSection (&(domain)->finalizable_objects_hash_lock);
+#define domain_finalizers_unlock(domain) LeaveCriticalSection (&(domain)->finalizable_objects_hash_lock);
+
static void
add_thread_to_finalize (MonoThread *thread)
{
@@ -96,23 +102,56 @@ run_finalize (void *obj, void *data)
MonoObject *o2;
#endif
MonoMethod* finalizer = NULL;
+ MonoDomain *domain;
+ GSList *l, *refs = NULL;
+
o = (MonoObject*)((char*)obj + GPOINTER_TO_UINT (data));
if (suspend_finalizers)
return;
+ domain = mono_object_domain (o);
+
#ifndef HAVE_SGEN_GC
- mono_domain_lock (o->vtable->domain);
+ domain_finalizers_lock (domain);
- o2 = g_hash_table_lookup (o->vtable->domain->finalizable_objects_hash, o);
+ o2 = g_hash_table_lookup (domain->finalizable_objects_hash, o);
- mono_domain_unlock (o->vtable->domain);
+ if (domain->track_resurrection_objects_hash) {
+ refs = g_hash_table_lookup (domain->track_resurrection_objects_hash, o);
+
+ if (refs)
+ /*
+ * Since we don't run finalizers again for resurrected objects,
+ * no need to keep these around.
+ */
+ g_hash_table_remove (domain->track_resurrection_objects_hash, o);
+ }
+
+ domain_finalizers_unlock (domain);
if (!o2)
/* Already finalized somehow */
return;
#endif
+ if (refs) {
+ /*
+ * Support for GCHandles of type WeakTrackResurrection:
+ *
+ * Its not exactly clear how these are supposed to work, or how their
+ * semantics can be implemented. We only implement one crucial thing:
+ * these handles are only cleared after the finalizer has ran.
+ */
+ for (l = refs; l; l = l->next) {
+ guint32 gchandle = GPOINTER_TO_UINT (l->data);
+
+ mono_gchandle_set_target (gchandle, o);
+ }
+
+ g_slist_free (refs);
+ }
+
/* make sure the finalizer is not called again if the object is resurrected */
object_register_finalizer (obj, NULL);
@@ -226,14 +265,14 @@ object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*))
*/
return;
- mono_domain_lock (domain);
+ domain_finalizers_lock (domain);
if (callback)
g_hash_table_insert (domain->finalizable_objects_hash, obj, obj);
else
g_hash_table_remove (domain->finalizable_objects_hash, obj);
- mono_domain_unlock (domain);
+ domain_finalizers_unlock (domain);
GC_REGISTER_FINALIZER_NO_ORDER ((char*)obj - offset, callback, GUINT_TO_POINTER (offset), NULL, NULL);
#elif defined(HAVE_SGEN_GC)
@@ -419,8 +458,6 @@ typedef enum {
HANDLE_PINNED
} HandleType;
-static void mono_gchandle_set_target (guint32 gchandle, MonoObject *obj);
-
static HandleType mono_gchandle_get_type (guint32 gchandle);
MonoObject *
@@ -637,6 +674,38 @@ mono_gchandle_new (MonoObject *obj, gboolean pinned)
return alloc_handle (&gc_handles [pinned? HANDLE_PINNED: HANDLE_NORMAL], obj);
}
+/*
+ * LOCKING: Assumes the domain_finalizers lock is held.
+ */
+static void
+add_weak_track_handle (MonoDomain *domain, MonoObject *obj, guint32 gchandle)
+{
+ GSList *refs;
+
+ if (!domain->track_resurrection_objects_hash)
+ domain->track_resurrection_objects_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
+
+ refs = g_hash_table_lookup (domain->track_resurrection_objects_hash, obj);
+ refs = g_slist_prepend (refs, GUINT_TO_POINTER (gchandle));
+ g_hash_table_insert (domain->track_resurrection_objects_hash, obj, refs);
+}
+
+/*
+ * LOCKING: Assumes the domain_finalizers lock is held.
+ */
+static void
+remove_weak_track_handle (MonoDomain *domain, MonoObject *obj, guint32 gchandle)
+{
+ GSList *refs;
+
+ if (!domain->track_resurrection_objects_hash)
+ return;
+
+ refs = g_hash_table_lookup (domain->track_resurrection_objects_hash, obj);
+ refs = g_slist_remove (refs, GUINT_TO_POINTER (gchandle));
+ g_hash_table_insert (domain->track_resurrection_objects_hash, obj, refs);
+}
+
/**
* mono_gchandle_new_weakref:
* @obj: managed object to get a handle for
@@ -659,7 +728,26 @@ mono_gchandle_new (MonoObject *obj, gboolean pinned)
guint32
mono_gchandle_new_weakref (MonoObject *obj, gboolean track_resurrection)
{
- return alloc_handle (&gc_handles [track_resurrection? HANDLE_WEAK_TRACK: HANDLE_WEAK], obj);
+ guint32 handle = alloc_handle (&gc_handles [track_resurrection? HANDLE_WEAK_TRACK: HANDLE_WEAK], obj);
+
+ if (track_resurrection) {
+ MonoDomain *domain = mono_domain_get ();
+
+ domain_finalizers_lock (domain);
+
+ add_weak_track_handle (domain, obj, handle);
+
+ g_hash_table_insert (domain->track_resurrection_handles_hash, GUINT_TO_POINTER (handle), obj);
+
+ domain_finalizers_unlock (domain);
+
+#ifdef HAVE_SGEN_GC
+ // FIXME: The hash table entries need to be remapped during GC
+ g_assert_not_reached ();
+#endif
+ }
+
+ return handle;
}
static HandleType
@@ -710,11 +798,14 @@ mono_gchandle_set_target (guint32 gchandle, MonoObject *obj)
guint slot = gchandle >> 3;
guint type = (gchandle & 7) - 1;
HandleData *handles = &gc_handles [type];
+ MonoObject *old_obj = NULL;
+
if (type > 3)
return;
lock_handles (handles);
if (slot < handles->size && (handles->bitmap [slot / 32] & (1 << (slot % 32)))) {
if (handles->type <= HANDLE_WEAK_TRACK) {
+ old_obj = handles->entries [slot];
if (handles->entries [slot])
mono_gc_weak_link_remove (&handles->entries [slot]);
if (obj)
@@ -727,6 +818,19 @@ mono_gchandle_set_target (guint32 gchandle, MonoObject *obj)
}
/*g_print ("changed entry %d of type %d to object %p (in slot: %p)\n", slot, handles->type, obj, handles->entries [slot]);*/
unlock_handles (handles);
+
+ if (type == HANDLE_WEAK_TRACK) {
+ MonoDomain *domain = mono_domain_get ();
+
+ domain_finalizers_lock (domain);
+
+ if (old_obj)
+ remove_weak_track_handle (domain, old_obj, gchandle);
+ if (obj)
+ add_weak_track_handle (domain, obj, gchandle);
+
+ domain_finalizers_unlock (domain);
+ }
}
/**
@@ -780,6 +884,25 @@ mono_gchandle_free (guint32 gchandle)
HandleData *handles = &gc_handles [type];
if (type > 3)
return;
+ if (type == HANDLE_WEAK_TRACK) {
+ MonoDomain *domain = mono_domain_get ();
+ MonoObject *obj;
+
+ /* Clean our entries in the two hashes in MonoDomain */
+
+ domain_finalizers_lock (domain);
+
+ /* Get the original object this handle pointed to */
+ obj = g_hash_table_lookup (domain->track_resurrection_handles_hash, GUINT_TO_POINTER (gchandle));
+ if (obj) {
+ g_hash_table_remove (domain->track_resurrection_handles_hash, GUINT_TO_POINTER (gchandle));
+
+ remove_weak_track_handle (domain, obj, gchandle);
+ }
+
+ domain_finalizers_unlock (domain);
+ }
+
lock_handles (handles);
if (slot < handles->size && (handles->bitmap [slot / 32] & (1 << (slot % 32)))) {
if (handles->type <= HANDLE_WEAK_TRACK) {
diff --git a/mono/metadata/icall-def.h b/mono/metadata/icall-def.h
index 51708d4..c497862 100644
--- a/mono/metadata/icall-def.h
+++ b/mono/metadata/icall-def.h
@@ -877,9 +877,10 @@ ICALL(THREADP_35, "SetMaxThreads", ves_icall_System_Threading_ThreadPool_SetMaxT
ICALL(THREADP_4, "SetMinThreads", ves_icall_System_Threading_ThreadPool_SetMinThreads)
ICALL_TYPE(WAITH, "System.Threading.WaitHandle", WAITH_1)
-ICALL(WAITH_1, "WaitAll_internal", ves_icall_System_Threading_WaitHandle_WaitAll_internal)
-ICALL(WAITH_2, "WaitAny_internal", ves_icall_System_Threading_WaitHandle_WaitAny_internal)
-ICALL(WAITH_3, "WaitOne_internal", ves_icall_System_Threading_WaitHandle_WaitOne_internal)
+ICALL(WAITH_1, "SignalAndWait_Internal", ves_icall_System_Threading_WaitHandle_SignalAndWait_Internal)
+ICALL(WAITH_2, "WaitAll_internal", ves_icall_System_Threading_WaitHandle_WaitAll_internal)
+ICALL(WAITH_3, "WaitAny_internal", ves_icall_System_Threading_WaitHandle_WaitAny_internal)
+ICALL(WAITH_4, "WaitOne_internal", ves_icall_System_Threading_WaitHandle_WaitOne_internal)
ICALL_TYPE(TYPE, "System.Type", TYPE_1)
ICALL(TYPE_1, "EqualsInternal", ves_icall_System_Type_EqualsInternal)
diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c
index f761325..3298416 100644
--- a/mono/metadata/icall.c
+++ b/mono/metadata/icall.c
@@ -2294,6 +2294,9 @@ ves_icall_Type_get_IsGenericTypeDefinition (MonoReflectionType *type)
MonoClass *klass;
MONO_ARCH_SAVE_REGS;
+ if (!IS_MONOTYPE (type))
+ return FALSE;
+
if (type->type->byref)
return FALSE;
@@ -2369,6 +2372,9 @@ ves_icall_Type_get_IsGenericType (MonoReflectionType *type)
MonoClass *klass;
MONO_ARCH_SAVE_REGS;
+ if (!IS_MONOTYPE (type))
+ return FALSE;
+
if (type->type->byref)
return FALSE;
@@ -2381,6 +2387,9 @@ ves_icall_Type_GetGenericParameterPosition (MonoReflectionType *type)
{
MONO_ARCH_SAVE_REGS;
+ if (!IS_MONOTYPE (type))
+ return -1;
+
if (is_generic_parameter (type->type))
return type->type->data.generic_param->num;
return -1;
@@ -2390,6 +2399,8 @@ static GenericParameterAttributes
ves_icall_Type_GetGenericParameterAttributes (MonoReflectionType *type)
{
MONO_ARCH_SAVE_REGS;
+
+ g_assert (IS_MONOTYPE (type));
g_assert (is_generic_parameter (type->type));
return type->type->data.generic_param->flags;
}
@@ -2405,6 +2416,8 @@ ves_icall_Type_GetGenericParameterConstraints (MonoReflectionType *type)
MONO_ARCH_SAVE_REGS;
+ g_assert (IS_MONOTYPE (type));
+
domain = mono_object_domain (type);
param = type->type->data.generic_param;
for (count = 0, ptr = param->constraints; ptr && *ptr; ptr++, count++)
@@ -3656,6 +3669,7 @@ ves_icall_Type_GetMethodsByName (MonoReflectionType *type, MonoString *name, gui
gpointer iter;
MonoObject *member;
int i, len, match, nslots;
+ /*FIXME, use MonoBitSet*/
guint32 method_slots_default [8];
guint32 *method_slots;
gchar *mname = NULL;
@@ -3705,6 +3719,13 @@ handle_parent:
iter = NULL;
while ((method = mono_class_get_methods (klass, &iter))) {
match = 0;
+ if (method->slot != -1) {
+ g_assert (method->slot < nslots);
+ if (method_slots [method->slot >> 5] & (1 << (method->slot & 0x1f)))
+ continue;
+ method_slots [method->slot >> 5] |= 1 << (method->slot & 0x1f);
+ }
+
if (method->name [0] == '.' && (strcmp (method->name, ".ctor") == 0 || strcmp (method->name, ".cctor") == 0))
continue;
if ((method->flags & METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK) == METHOD_ATTRIBUTE_PUBLIC) {
@@ -3734,12 +3755,6 @@ handle_parent:
}
match = 0;
- if (method->slot != -1) {
- g_assert (method->slot < nslots);
- if (method_slots [method->slot >> 5] & (1 << (method->slot & 0x1f)))
- continue;
- method_slots [method->slot >> 5] |= 1 << (method->slot & 0x1f);
- }
member = (MonoObject*)mono_method_get_object (domain, method, refklass);
@@ -4390,28 +4405,12 @@ ves_icall_System_Reflection_Assembly_InternalGetType (MonoReflectionAssembly *as
return mono_type_get_object (mono_object_domain (assembly), type);
}
-static MonoString *
-ves_icall_System_Reflection_Assembly_get_code_base (MonoReflectionAssembly *assembly, MonoBoolean escaped)
+static gboolean
+replace_shadow_path (MonoDomain *domain, gchar *dirname, gchar **filename)
{
- MonoDomain *domain = mono_object_domain (assembly);
- MonoAssembly *mass = assembly->assembly;
- MonoString *res = NULL;
- gchar *uri;
- gchar *absolute;
gchar *content;
gchar *shadow_ini_file;
gsize len;
- gchar *dirname;
-
- MONO_ARCH_SAVE_REGS;
-
- if (g_path_is_absolute (mass->image->name)) {
- absolute = g_strdup (mass->image->name);
- dirname = g_path_get_dirname (absolute);
- } else {
- absolute = g_build_filename (mass->basedir, mass->image->name, NULL);
- dirname = g_strdup (mass->basedir);
- }
/* Check for shadow-copied assembly */
if (mono_is_shadow_copy_enabled (domain, dirname)) {
@@ -4426,12 +4425,37 @@ ves_icall_System_Reflection_Assembly_get_code_base (MonoReflectionAssembly *asse
}
g_free (shadow_ini_file);
if (content != NULL) {
- g_free (absolute);
- absolute = content;
+ if (*filename)
+ g_free (*filename);
+ *filename = content;
+ return TRUE;
}
}
- g_free (dirname);
+ return FALSE;
+}
+static MonoString *
+ves_icall_System_Reflection_Assembly_get_code_base (MonoReflectionAssembly *assembly, MonoBoolean escaped)
+{
+ MonoDomain *domain = mono_object_domain (assembly);
+ MonoAssembly *mass = assembly->assembly;
+ MonoString *res = NULL;
+ gchar *uri;
+ gchar *absolute;
+ gchar *dirname;
+
+ MONO_ARCH_SAVE_REGS;
+
+ if (g_path_is_absolute (mass->image->name)) {
+ absolute = g_strdup (mass->image->name);
+ dirname = g_path_get_dirname (absolute);
+ } else {
+ absolute = g_build_filename (mass->basedir, mass->image->name, NULL);
+ dirname = g_strdup (mass->basedir);
+ }
+
+ replace_shadow_path (domain, dirname, &absolute);
+ g_free (dirname);
#if PLATFORM_WIN32
{
gint i;
@@ -5227,11 +5251,16 @@ ves_icall_System_Reflection_Assembly_InternalGetAssemblyName (MonoString *fname,
gboolean res;
MonoImage *image;
MonoAssemblyName name;
+ char *dirname
MONO_ARCH_SAVE_REGS;
filename = mono_string_to_utf8 (fname);
+ dirname = g_path_get_dirname (filename);
+ replace_shadow_path (mono_domain_get (), dirname, &filename);
+ g_free (dirname);
+
image = mono_image_open (filename, &status);
if (!image){
diff --git a/mono/metadata/image.c b/mono/metadata/image.c
index fc2900f..13d63a7 100644
--- a/mono/metadata/image.c
+++ b/mono/metadata/image.c
@@ -1252,12 +1252,12 @@ mono_image_fixup_vtable (MonoImage *image)
if (slot_type & VTFIXUP_TYPE_32BIT)
while (slot_count--) {
*((guint32*) slot) = (guint32) mono_marshal_get_vtfixup_ftnptr (image, *((guint32*) slot), slot_type);
- ((guint32*) slot)++;
+ slot = ((guint32*) slot) + 1;
}
else if (slot_type & VTFIXUP_TYPE_64BIT)
while (slot_count--) {
*((guint64*) slot) = (guint64) mono_marshal_get_vtfixup_ftnptr (image, *((guint64*) slot), slot_type);
- ((guint64*) slot)++;
+ slot = ((guint32*) slot) + 1;
}
else
g_assert_not_reached();
diff --git a/mono/metadata/locales.c b/mono/metadata/locales.c
index cb0e614..79fd027 100644
--- a/mono/metadata/locales.c
+++ b/mono/metadata/locales.c
@@ -387,7 +387,7 @@ get_current_locale_name (void)
if ((p = strchr (locale, '.')) != NULL) {
/* assume new locale can't be larger than old one? */
- corrected = malloc (strlen (locale));
+ corrected = g_malloc (strlen (locale));
strncpy (corrected, locale, p - locale);
corrected [p - locale] = 0;
@@ -406,7 +406,7 @@ get_current_locale_name (void)
*/
if (corrected == NULL) {
- corrected = malloc (strlen (locale));
+ corrected = g_malloc (strlen (locale));
strncpy (corrected, locale, p - locale);
corrected [p - locale] = 0;
}
diff --git a/mono/metadata/marshal.c b/mono/metadata/marshal.c
index c02d546..38edd2c 100644
--- a/mono/metadata/marshal.c
+++ b/mono/metadata/marshal.c
@@ -75,6 +75,7 @@ typedef struct _MonoRemotingMethods MonoRemotingMethods;
#define mono_marshal_lock() EnterCriticalSection (&marshal_mutex)
#define mono_marshal_unlock() LeaveCriticalSection (&marshal_mutex)
static CRITICAL_SECTION marshal_mutex;
+static gboolean marshal_mutex_initialized;
/* This mutex protects the various cominterop related caches in MonoImage */
#define mono_cominterop_lock() EnterCriticalSection (&cominterop_mutex)
@@ -600,6 +601,7 @@ mono_marshal_init (void)
module_initialized = TRUE;
InitializeCriticalSection (&marshal_mutex);
InitializeCriticalSection (&cominterop_mutex);
+ marshal_mutex_initialized = TRUE;
last_error_tls_id = TlsAlloc ();
load_type_info_tls_id = TlsAlloc ();
@@ -674,6 +676,7 @@ mono_marshal_cleanup (void)
TlsFree (last_error_tls_id);
DeleteCriticalSection (&marshal_mutex);
DeleteCriticalSection (&cominterop_mutex);
+ marshal_mutex_initialized = FALSE;
}
MonoClass *byte_array_class;
@@ -734,6 +737,18 @@ mono_delegate_to_ftnptr (MonoDelegate *delegate)
method = delegate->method;
+ if (mono_method_signature (method)->pinvoke) {
+ const char *exc_class, *exc_arg;
+ gpointer ftnptr;
+
+ ftnptr = mono_lookup_pinvoke_call (method, &exc_class, &exc_arg);
+ if (!ftnptr) {
+ g_assert (exc_class);
+ mono_raise_exception (mono_exception_from_name_msg (mono_defaults.corlib, "System", exc_class, exc_arg));
+ }
+ return ftnptr;
+ }
+
wrapper = mono_marshal_get_managed_wrapper (method, klass, delegate->target);
delegate->delegate_trampoline = mono_compile_method (wrapper);
@@ -5085,7 +5100,7 @@ handle_enum:
break;
case MONO_TYPE_GENERICINST:
if (!mono_type_generic_inst_is_valuetype (sig->params [i])) {
- mono_mb_emit_byte (mb, CEE_LDIND_I);
+ mono_mb_emit_byte (mb, mono_type_to_ldind (sig->params [i]));
break;
}
@@ -6881,17 +6896,19 @@ emit_marshal_object (EmitMarshalContext *m, int argnum, MonoType *t,
MonoClass *klass = mono_class_from_mono_type (t);
int pos, pos2, loc;
- if (mono_class_from_mono_type (t) == mono_defaults.object_class) {
- mono_raise_exception (mono_get_exception_not_implemented ("Marshalling of type object is not implemented"));
- }
-
switch (action) {
case MARSHAL_ACTION_CONV_IN:
*conv_arg_type = &mono_defaults.int_class->byval_arg;
conv_arg = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
m->orig_conv_args [argnum] = 0;
-
+
+ if (mono_class_from_mono_type (t) == mono_defaults.object_class) {
+ char *msg = g_strdup_printf ("Marshalling of type object is not implemented");
+ mono_mb_emit_exception_marshal_directive (mb, msg);
+ break;
+ }
+
if (klass->delegate) {
if (t->byref) {
if (!(t->attrs & PARAM_ATTRIBUTE_OUT)) {
@@ -8691,7 +8708,7 @@ emit_marshal (EmitMarshalContext *m, int argnum, MonoType *t,
return emit_marshal_com_interface (m, argnum, t, spec, conv_arg, conv_arg_type, action);
#endif
- if (mono_defaults.safehandle_class != NULL &&
+ if (mono_defaults.safehandle_class != NULL && t->data.klass &&
mono_class_is_subclass_of (t->data.klass, mono_defaults.safehandle_class, FALSE))
return emit_marshal_safehandle (m, argnum, t, spec, conv_arg, conv_arg_type, action);
@@ -10924,6 +10941,9 @@ ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal (MonoO
proxy = (MonoComInteropProxy*)((MonoTransparentProxy*)object)->rp;
g_assert (proxy);
+ if (proxy->ref_count == 0)
+ return -1;
+
ref_count = InterlockedDecrement (&proxy->ref_count);
g_assert (ref_count >= 0);
@@ -11619,6 +11639,8 @@ mono_marshal_load_type_info (MonoClass* klass)
info->native_size &= ~(min_align - 1);
}
+ info->min_align = min_align;
+
/* Update the class's blittable info, if the layouts don't match */
if (info->native_size != mono_class_value_size (klass, NULL))
klass->blittable = FALSE;
@@ -11663,7 +11685,7 @@ mono_class_native_size (MonoClass *klass, guint32 *align)
}
if (align)
- *align = klass->min_align;
+ *align = klass->marshal_info->min_align;
return klass->marshal_info->native_size;
}
@@ -12908,3 +12930,82 @@ mono_marshal_free_dynamic_wrappers (MonoMethod *method)
g_hash_table_remove (method->klass->image->runtime_invoke_direct_cache, method);
mono_marshal_unlock ();
}
+
+/*
+ * mono_marshal_free_inflated_wrappers:
+ *
+ * Free wrappers of the inflated method METHOD.
+ */
+
+static gboolean
+signature_method_pair_matches_signature (gpointer key, gpointer value, gpointer user_data)
+{
+ SignatureMethodPair *pair = (SignatureMethodPair*)key;
+ MonoMethodSignature *sig = (MonoMethodSignature*)user_data;
+
+ return mono_metadata_signature_equal (pair->sig, sig);
+}
+
+void
+mono_marshal_free_inflated_wrappers (MonoMethod *method)
+{
+ MonoMethodSignature *sig = method->signature;
+
+ g_assert (method->is_inflated);
+
+ /* Ignore calls occuring late during cleanup. */
+ if (!marshal_mutex_initialized)
+ return;
+
+ mono_marshal_lock ();
+ /*
+ * FIXME: We currently leak the wrappers. Freeing them would be tricky as
+ * they could be shared with other methods ?
+ */
+
+ /*
+ * indexed by MonoMethodSignature
+ */
+ /* FIXME: This could remove unrelated wrappers as well */
+ if (sig && method->klass->image->delegate_begin_invoke_cache)
+ g_hash_table_remove (method->klass->image->delegate_begin_invoke_cache, sig);
+ if (sig && method->klass->image->delegate_end_invoke_cache)
+ g_hash_table_remove (method->klass->image->delegate_end_invoke_cache, sig);
+ if (sig && method->klass->image->delegate_invoke_cache)
+ g_hash_table_remove (method->klass->image->delegate_invoke_cache, sig);
+ if (sig && method->klass->image->runtime_invoke_cache)
+ g_hash_table_remove (method->klass->image->runtime_invoke_cache, sig);
+
+ /*
+ * indexed by SignatureMethodPair
+ */
+ if (sig && method->klass->image->delegate_abstract_invoke_cache)
+ g_hash_table_foreach_remove (method->klass->image->delegate_abstract_invoke_cache,
+ signature_method_pair_matches_signature, (gpointer)sig);
+
+ /*
+ * indexed by MonoMethod pointers
+ */
+ if (method->klass->image->runtime_invoke_direct_cache)
+ g_hash_table_remove (method->klass->image->runtime_invoke_direct_cache, method);
+ if (method->klass->image->managed_wrapper_cache)
+ g_hash_table_remove (method->klass->image->managed_wrapper_cache, method);
+ if (method->klass->image->native_wrapper_cache)
+ g_hash_table_remove (method->klass->image->native_wrapper_cache, method);
+ if (method->klass->image->remoting_invoke_cache)
+ g_hash_table_remove (method->klass->image->remoting_invoke_cache, method);
+ if (method->klass->image->synchronized_cache)
+ g_hash_table_remove (method->klass->image->synchronized_cache, method);
+ if (method->klass->image->unbox_wrapper_cache)
+ g_hash_table_remove (method->klass->image->unbox_wrapper_cache, method);
+ if (method->klass->image->cominterop_invoke_cache)
+ g_hash_table_remove (method->klass->image->cominterop_invoke_cache, method);
+ if (method->klass->image->cominterop_wrapper_cache)
+ g_hash_table_remove (method->klass->image->cominterop_wrapper_cache, method);
+ if (method->klass->image->static_rgctx_invoke_cache)
+ g_hash_table_remove (method->klass->image->static_rgctx_invoke_cache, method);
+ if (method->klass->image->thunk_invoke_cache)
+ g_hash_table_remove (method->klass->image->thunk_invoke_cache, method);
+
+ mono_marshal_unlock ();
+}
diff --git a/mono/metadata/marshal.h b/mono/metadata/marshal.h
index 993f870..3b66fa6 100644
--- a/mono/metadata/marshal.h
+++ b/mono/metadata/marshal.h
@@ -201,6 +201,9 @@ mono_marshal_get_thunk_invoke_wrapper (MonoMethod *method) MONO_INTERNAL;
void
mono_marshal_free_dynamic_wrappers (MonoMethod *method) MONO_INTERNAL;
+void
+mono_marshal_free_inflated_wrappers (MonoMethod *method) MONO_INTERNAL;
+
/* marshaling internal calls */
void *
diff --git a/mono/metadata/metadata.c b/mono/metadata/metadata.c
index 77f22df..101d581 100644
--- a/mono/metadata/metadata.c
+++ b/mono/metadata/metadata.c
@@ -21,6 +21,7 @@
#include "metadata-internals.h"
#include "class-internals.h"
#include "class.h"
+#include "marshal.h"
static gboolean do_mono_metadata_parse_type (MonoType *type, MonoImage *m, MonoGenericContainer *container,
const char *ptr, const char **rptr);
@@ -2245,6 +2246,8 @@ free_inflated_method (MonoMethodInflated *imethod)
int i;
MonoMethod *method = (MonoMethod*)imethod;
+ mono_marshal_free_inflated_wrappers (method);
+
if (method->signature)
mono_metadata_free_inflated_signature (method->signature);
diff --git a/mono/metadata/monitor.c b/mono/metadata/monitor.c
index 022495a..a9aaf6e 100644
--- a/mono/metadata/monitor.c
+++ b/mono/metadata/monitor.c
@@ -592,10 +592,10 @@ retry:
}
} else {
if (ret == WAIT_TIMEOUT || (ret == WAIT_IO_COMPLETION && !allow_interruption)) {
- if (ret == WAIT_IO_COMPLETION && mono_thread_test_state (mono_thread_current (), ThreadState_StopRequested)) {
+ if (ret == WAIT_IO_COMPLETION && (mono_thread_test_state (mono_thread_current (), (ThreadState_StopRequested|ThreadState_SuspendRequested)))) {
/*
- * We have to obey a stop request even if allow_interruption is
- * FALSE to avoid hangs at shutdown.
+ * We have to obey a stop/suspend request even if
+ * allow_interruption is FALSE to avoid hangs at shutdown.
*/
return -1;
}
diff --git a/mono/metadata/mono-debug-debugger.c b/mono/metadata/mono-debug-debugger.c
index c09d007..7aeb24b 100644
--- a/mono/metadata/mono-debug-debugger.c
+++ b/mono/metadata/mono-debug-debugger.c
@@ -11,6 +11,7 @@
#include <mono/metadata/gc-internal.h>
#include <mono/metadata/object-internals.h>
#include <mono/metadata/class-internals.h>
+#include <mono/metadata/domain-internals.h>
#include <mono/metadata/exception.h>
#include <mono/metadata/mono-debug.h>
#include <mono/metadata/mono-debug-debugger.h>
@@ -39,6 +40,14 @@ typedef struct {
gchar *name;
} ClassInitCallback;
+typedef struct {
+ guint32 id;
+ guint32 shadow_path_len;
+ gchar *shadow_path;
+ MonoDomain *domain;
+ MonoAppDomainSetup *setup;
+} AppDomainSetupInfo;
+
static GPtrArray *class_init_callbacks = NULL;
static int initialized = 0;
@@ -79,6 +88,28 @@ mono_debugger_event (MonoDebuggerEvent event, guint64 data, guint64 arg)
}
void
+mono_debugger_event_create_appdomain (MonoDomain *domain, gchar *shadow_path)
+{
+ AppDomainSetupInfo info;
+
+ info.id = mono_domain_get_id (domain);
+ info.shadow_path_len = shadow_path ? strlen (shadow_path) : 0;
+ info.shadow_path = shadow_path;
+
+ info.domain = domain;
+ info.setup = domain->setup;
+
+ mono_debugger_event (MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN, (guint64) (gsize) &info, 0);
+}
+
+void
+mono_debugger_event_unload_appdomain (MonoDomain *domain)
+{
+ mono_debugger_event (MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN,
+ (guint64) (gsize) domain, (guint64) mono_domain_get_id (domain));
+}
+
+void
mono_debugger_cleanup (void)
{
mono_debugger_event (MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE, 0, 0);
@@ -153,33 +184,31 @@ mono_debugger_check_breakpoints (MonoMethod *method, MonoDebugMethodAddress *deb
{
int i;
- if (!method_breakpoints)
- return;
-
if (method->is_inflated)
method = ((MonoMethodInflated *) method)->declaring;
- for (i = 0; i < method_breakpoints->len; i++) {
- MethodBreakpointInfo *info = g_ptr_array_index (method_breakpoints, i);
+ if (method_breakpoints) {
+ for (i = 0; i < method_breakpoints->len; i++) {
+ MethodBreakpointInfo *info = g_ptr_array_index (method_breakpoints, i);
- if (method != info->method)
- continue;
+ if (method != info->method)
+ continue;
- mono_debugger_event (MONO_DEBUGGER_EVENT_JIT_BREAKPOINT,
- (guint64) (gsize) debug_info, info->index);
+ mono_debugger_event (MONO_DEBUGGER_EVENT_JIT_BREAKPOINT,
+ (guint64) (gsize) debug_info, info->index);
+ }
}
- if (!class_init_callbacks)
- return;
-
- for (i = 0; i < class_init_callbacks->len; i++) {
- ClassInitCallback *info = g_ptr_array_index (class_init_callbacks, i);
+ if (class_init_callbacks) {
+ for (i = 0; i < class_init_callbacks->len; i++) {
+ ClassInitCallback *info = g_ptr_array_index (class_init_callbacks, i);
- if ((method->token != info->token) || (method->klass->image != info->image))
- continue;
+ if ((method->token != info->token) || (method->klass->image != info->image))
+ continue;
- mono_debugger_event (MONO_DEBUGGER_EVENT_JIT_BREAKPOINT,
- (guint64) (gsize) debug_info, info->index);
+ mono_debugger_event (MONO_DEBUGGER_EVENT_JIT_BREAKPOINT,
+ (guint64) (gsize) debug_info, info->index);
+ }
}
}
@@ -205,10 +234,6 @@ mono_debugger_register_class_init_callback (MonoImage *image, const gchar *full_
mono_loader_lock ();
klass = mono_class_from_name (image, name_space ? name_space : "", name);
- if (klass && klass->inited && klass->methods) {
- mono_loader_unlock ();
- return klass;
- }
info = g_new0 (ClassInitCallback, 1);
info->image = image;
@@ -222,7 +247,7 @@ mono_debugger_register_class_init_callback (MonoImage *image, const gchar *full_
g_ptr_array_add (class_init_callbacks, info);
mono_loader_unlock ();
- return NULL;
+ return klass;
}
void
diff --git a/mono/metadata/mono-debug-debugger.h b/mono/metadata/mono-debug-debugger.h
index 8320039..6b7f7c8 100644
--- a/mono/metadata/mono-debug-debugger.h
+++ b/mono/metadata/mono-debug-debugger.h
@@ -37,6 +37,8 @@ typedef enum {
MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD,
MONO_DEBUGGER_EVENT_CLASS_INITIALIZED,
MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST,
+ MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN,
+ MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN,
/* Extended per-thread notifications */
MONO_DEBUGGER_EVENT_TRAMPOLINE = 256,
@@ -65,6 +67,12 @@ mono_debugger_class_initialized (MonoClass *klass);
void
mono_debugger_check_interruption (void);
+void
+mono_debugger_event_create_appdomain (MonoDomain *domain, gchar *shadow_path);
+
+void
+mono_debugger_event_unload_appdomain (MonoDomain *domain);
+
MonoDebugMethodAddressList *
mono_debugger_insert_method_breakpoint (MonoMethod *method, guint64 idx);
diff --git a/mono/metadata/object-internals.h b/mono/metadata/object-internals.h
index c229d81..20a5260 100644
--- a/mono/metadata/object-internals.h
+++ b/mono/metadata/object-internals.h
@@ -535,6 +535,8 @@ mono_domain_get_tls_offset (void) MONO_INTERNAL;
/* Reflection and Reflection.Emit support */
+#define IS_MONOTYPE(obj) (!(obj) || (((MonoObject*)(obj))->vtable->klass->image == mono_defaults.corlib && ((MonoReflectionType*)(obj))->type != NULL))
+
/*
* The following structure must match the C# implementation in our corlib.
*/
diff --git a/mono/metadata/socket-io.c b/mono/metadata/socket-io.c
index 423d0b0..a4dab61 100644
--- a/mono/metadata/socket-io.c
+++ b/mono/metadata/socket-io.c
@@ -303,24 +303,22 @@ static gint32 convert_socketflags (gint32 sflags)
flags |= MSG_PEEK;
if (sflags & SocketFlags_DontRoute)
flags |= MSG_DONTROUTE;
-#if 0
+
/* Ignore Partial - see bug 349688. Don't return -1, because
* according to the comment in that bug ms runtime doesn't for
* UDP sockets (this means we will silently ignore it for TCP
* too)
*/
- if (sflags & SocketFlags_Partial)
#ifdef MSG_MORE
+ if (sflags & SocketFlags_Partial)
flags |= MSG_MORE;
-#else
- return -1;
-#endif
#endif
+#if 0
+ /* Don't do anything for MaxIOVectorLength */
if (sflags & SocketFlags_MaxIOVectorLength)
- /* FIXME: Don't know what to do for MaxIOVectorLength query */
return -1;
-
- return (flags ? flags : -1);
+#endif
+ return flags;
}
/*
diff --git a/mono/metadata/threads-types.h b/mono/metadata/threads-types.h
index c635bd5..061101f 100644
--- a/mono/metadata/threads-types.h
+++ b/mono/metadata/threads-types.h
@@ -77,6 +77,7 @@ HANDLE ves_icall_System_Threading_Events_OpenEvent_internal (MonoString *name, g
gboolean ves_icall_System_Threading_WaitHandle_WaitAll_internal(MonoArray *mono_handles, gint32 ms, gboolean exitContext) MONO_INTERNAL;
gint32 ves_icall_System_Threading_WaitHandle_WaitAny_internal(MonoArray *mono_handles, gint32 ms, gboolean exitContext) MONO_INTERNAL;
gboolean ves_icall_System_Threading_WaitHandle_WaitOne_internal(MonoObject *this_obj, HANDLE handle, gint32 ms, gboolean exitContext) MONO_INTERNAL;
+gboolean ves_icall_System_Threading_WaitHandle_SignalAndWait_Internal (HANDLE toSignal, HANDLE toWait, gint32 ms, gboolean exitContext) MONO_INTERNAL;
gint32 ves_icall_System_Threading_Interlocked_Increment_Int(gint32 *location) MONO_INTERNAL;
gint64 ves_icall_System_Threading_Interlocked_Increment_Long(gint64 *location) MONO_INTERNAL;
diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
index 935a8b4..8de9c22 100644
--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c
@@ -1463,6 +1463,28 @@ gboolean ves_icall_System_Threading_WaitHandle_WaitOne_internal(MonoObject *this
return(TRUE);
}
+gboolean
+ves_icall_System_Threading_WaitHandle_SignalAndWait_Internal (HANDLE toSignal, HANDLE toWait, gint32 ms, gboolean exitContext)
+{
+ guint32 ret;
+ MonoThread *thread = mono_thread_current ();
+
+ MONO_ARCH_SAVE_REGS;
+
+ if (ms == -1)
+ ms = INFINITE;
+
+ mono_thread_current_check_pending_interrupt ();
+
+ mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
+
+ ret = SignalObjectAndWait (toSignal, toWait, ms, TRUE);
+
+ mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
+
+ return (!(ret == WAIT_TIMEOUT || ret == WAIT_IO_COMPLETION || ret == WAIT_FAILED));
+}
+
HANDLE ves_icall_System_Threading_Mutex_CreateMutex_internal (MonoBoolean owned, MonoString *name, MonoBoolean *created)
{
HANDLE mutex;
@@ -2824,6 +2846,7 @@ void mono_thread_suspend_all_other_threads (void)
/* Get the suspended events that we'll be waiting for */
for (i = 0; i < wait->num; ++i) {
MonoThread *thread = wait->threads [i];
+ gboolean signal_suspend = FALSE;
if ((thread->tid == self) || mono_gc_is_finalizer_thread (thread)) {
//CloseHandle (wait->handles [i]);
@@ -2835,8 +2858,16 @@ void mono_thread_suspend_all_other_threads (void)
EnterCriticalSection (thread->synch_cs);
+ if (thread->suspended_event == NULL) {
+ thread->suspended_event = CreateEvent (NULL, TRUE, FALSE, NULL);
+ if (thread->suspended_event == NULL) {
+ /* Forget this one and go on to the next */
+ LeaveCriticalSection (thread->synch_cs);
+ continue;
+ }
+ }
+
if ((thread->state & ThreadState_Suspended) != 0 ||
- (thread->state & ThreadState_SuspendRequested) != 0 ||
(thread->state & ThreadState_StopRequested) != 0 ||
(thread->state & ThreadState_Stopped) != 0) {
LeaveCriticalSection (thread->synch_cs);
@@ -2845,26 +2876,22 @@ void mono_thread_suspend_all_other_threads (void)
continue;
}
+ if ((thread->state & ThreadState_SuspendRequested) == 0)
+ signal_suspend = TRUE;
+
+ events [eventidx++] = thread->suspended_event;
+
/* Convert abort requests into suspend requests */
if ((thread->state & ThreadState_AbortRequested) != 0)
thread->state &= ~ThreadState_AbortRequested;
thread->state |= ThreadState_SuspendRequested;
- if (thread->suspended_event == NULL) {
- thread->suspended_event = CreateEvent (NULL, TRUE, FALSE, NULL);
- if (thread->suspended_event == NULL) {
- /* Forget this one and go on to the next */
- LeaveCriticalSection (thread->synch_cs);
- continue;
- }
- }
-
- events [eventidx++] = thread->suspended_event;
LeaveCriticalSection (thread->synch_cs);
/* Signal the thread to suspend */
- signal_thread_state_change (thread);
+ if (signal_suspend)
+ signal_thread_state_change (thread);
}
if (eventidx > 0) {
diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog
index 6fba49d..7a918ea 100644
--- a/mono/mini/ChangeLog
+++ b/mono/mini/ChangeLog
@@ -1,3 +1,195 @@
+2009-06-08 Martin Baulig <martin at ximian.com>
+
+ * debug-mini.c
+ (MonoDebuggerExceptionAction): Moved into debug-mini.h.
+ (_mono_debugger_throw_exception): Don't make this static.
+ (_mono_debugger_unhandled_exception): Likewise.
+ (mono_debugger_handle_exception): Moved to mini-exceptions.c
+
+ * debug-mini.c
+ (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
+ (_mono_debugger_throw_exception): Add function prototype.
+ (_mono_debugger_unhandled_exception): Likewise.
+
+ * mini-exceptions.c
+ (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
+ arg; return the first exception handler if the exception is caught
+ and we're running inside the debugger.
+ (mono_debugger_handle_exception): Moved here from debug-mini.c;
+ improve exception handle inside runtime-invoke, check whether the
+ exception is actually caught in the method being invoked and not
+ by the runtime-invoke-wrapper.
+
+2009-05-26 Zoltan Varga <vargaz at gmail.com>
+
+ * mini-sparc.c (add_outarg_load): Fix the sparc build.
+
+2009-05-25 Rodrigo Kumpera <rkumpera at novell.com>
+
+ Backport of r134713/134715.
+
+ * basic.cs: Add regression test for #506915.
+
+ * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
+ optimization we must check the bb of the first byte of stobj as
+ it's the only one set in cil_offset_to_bb.
+
+ Fixes #506915.
+
+2009-05-21 Rodrigo Kumpera <rkumpera at novell.com>
+
+ Backport of r134536.
+
+ * mini-x86.c (mono_arch_emit_call): The decompose code now supports
+ decomposing 8 bytes structs into a LCALL.
+
+ * mini-x86.c (emit_move_return_value): We no longer push the vtype
+ pointer for where to store the returned regs.
+
+ * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
+ state the concern.
+
+ Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
+
+2009-05-20 Rodrigo Kumpera <rkumpera at novell.com>
+
+ Backport of r134470.
+
+ * local-propagation.c (mono_local_cprop): Avoid local propagation
+ across paired add/sub if the first instruction dest reg is it's
+ source reg. For example:
+
+ int_add_imm R12 <- R12 [1] clobbers: 1
+ int_sub_imm R42 <- R12 [1] clobbers: 1
+
+ The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
+ maintain the math identify.
+
+ Fixes #505375.
+
+2009-04-17 Zoltan Varga <vargaz at gmail.com>
+
+ * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
+ indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
+ (mono_arch_get_vcall_slot): Simplify this.
+
+2009-05-07 Zoltan Varga <vargaz at gmail.com>
+
+ * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
+ for virtual methods too.
+
+2009-06-08 Martin Baulig <martin at ximian.com>
+
+ * debug-mini.c
+ (MonoDebuggerExceptionAction): Moved into debug-mini.h.
+ (_mono_debugger_throw_exception): Don't make this static.
+ (_mono_debugger_unhandled_exception): Likewise.
+ (mono_debugger_handle_exception): Moved to mini-exceptions.c
+
+ * debug-mini.c
+ (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
+ (_mono_debugger_throw_exception): Add function prototype.
+ (_mono_debugger_unhandled_exception): Likewise.
+
+ * mini-exceptions.c
+ (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
+ arg; return the first exception handler if the exception is caught
+ and we're running inside the debugger.
+ (mono_debugger_handle_exception): Moved here from debug-mini.c;
+ improve exception handle inside runtime-invoke, check whether the
+ exception is actually caught in the method being invoked and not
+ by the runtime-invoke-wrapper.
+
+2009-05-06 Zoltan Varga <vargaz at gmail.com>
+
+ Backport of r133651.
+
+ * aot-compiler.c aot-runtime.c: Use our own hash function instead of
+ g_str_hash () which can change.
+
+ * driver.c (mini_regression): Disable optimizations not supported by
+ the cpu. Fixes #500019.
+
+2009-05-05 Zoltan Varga <vargaz at gmail.com>
+
+ * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
+
+2009-05-03 Martin Baulig <martin at ximian.com>
+
+ * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
+ mono_debugger_insert_method_breakpoint() since the class init
+ handler we're inserting at the top of the method already gives us
+ a notification.
+
+2009-04-30 Zoltan Varga <vargaz at gmail.com>
+
+ * aot-compiler.c (asm_writer_emit_writeout): Strip 'mapping symbols'
+ when compiling for ARM.
+
+2009-04-29 Zoltan Varga <vargaz at gmail.com>
+
+ * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
+
+ * mini.c (mini_method_compile): Use TARGET_<ARCH> defines instead of
+ __<arch>__ defines in the JIT code.
+
+ * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in
+ the JIT code.
+
+2009-03-31 Martin Baulig <martin at ximian.com>
+
+ Backport of r130658.
+
+ * debug-debugger.c (debugger_remove_breakpoint): Call
+ mono_debugger_remove_class_init_callback ().
+
+2009-04-22 Zoltan Varga <vargaz at gmail.com>
+
+ * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
+ to prevent asserts in various passes. Fixes #497220.
+
+2009-04-21 Zoltan Varga <vargaz at gmail.com>
+
+ * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
+ a racy assert.
+
+2009-04-16 Zoltan Varga <vargaz at gmail.com>
+
+ * aot-compiler.c (mono_xdebug_init): Fix the DISABLE_AOT build.
+
+2009-04-09 Zoltan Varga <vargaz at gmail.com>
+
+ * mini-arm.h: Error out if VFP support is requested, since its not
+ complete in 2.4.
+
+2009-03-17 Zoltan Varga <vargaz at gmail.com>
+
+ * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
+ a managed object which is later put into a GList. Return its class instead.
+
+ * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
+ stack slots when using sgen.
+
+2009-03-27 Zoltan Varga <vargaz at gmail.com>
+
+ * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
+ return a valuetype. Fixes #487518.
+
+ * iltests.il: Add a test.
+
+2009-03-23 Zoltan Varga <vargaz at gmail.com>
+
+ * aot-runtime.c (decode_method_ref): Fix a warning.
+
+ * unwind.c (mono_unwind_frame): Ditto.
+
+2009-03-19 Zoltan Varga <vargaz at gmail.com>
+
+ Backport of r129824.
+
+ * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
+ the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
+
2009-03-11 Zoltan Varga <vargaz at gmail.com>
* mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am
index 495ae34..0c24ed1 100644
--- a/mono/mini/Makefile.am
+++ b/mono/mini/Makefile.am
@@ -36,7 +36,7 @@ ILASM = $(RUNTIME) $(CLASS)/ilasm.exe
AM_CFLAGS = \
-I$(top_srcdir) \
$(LIBGC_CFLAGS) \
- $(GLIB_CFLAGS)
+ $(GLIB_CFLAGS) \
$(PLATFORM_CFLAGS) $(ARCH_CFLAGS)
if PLATFORM_WIN32
@@ -540,4 +540,4 @@ version.h: Makefile
# Utility target for patching libtool to speed up linking
patch-libtool:
sed -e 's,if (for obj in $$oldobjs,if (for obj in "",g' < ../../libtool > 2; mv 2 ../../libtool
- chmod a+x ../../libtool
\ No newline at end of file
+ chmod a+x ../../libtool
diff --git a/mono/mini/Makefile.in b/mono/mini/Makefile.in
index 342494a..f21e055 100644
--- a/mono/mini/Makefile.in
+++ b/mono/mini/Makefile.in
@@ -243,8 +243,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
@@ -446,7 +444,8 @@ ILASM = $(RUNTIME) $(CLASS)/ilasm.exe
AM_CFLAGS = \
-I$(top_srcdir) \
$(LIBGC_CFLAGS) \
- $(GLIB_CFLAGS)
+ $(GLIB_CFLAGS) \
+ $(PLATFORM_CFLAGS) $(ARCH_CFLAGS)
# The mingw math.h has "extern inline" functions that dont appear in libs, so
# optimisation is required to actually inline them
@@ -1184,7 +1183,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \
uninstall-am uninstall-binPROGRAMS uninstall-libLTLIBRARIES \
uninstall-libmonoincludeHEADERS
- $(PLATFORM_CFLAGS) $(ARCH_CFLAGS)
@PLATFORM_WIN32_TRUE at export HOST_CC
diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c
index 4f5ee07..75fd82f 100644
--- a/mono/mini/aot-compiler.c
+++ b/mono/mini/aot-compiler.c
@@ -131,16 +131,16 @@ typedef struct MonoAotStats {
int jit_time, gen_time, link_time;
} MonoAotStats;
-#if defined(__x86_64__) && !defined(PLATFORM_WIN32)
+#if defined(TARGET_AMD64) && !defined(PLATFORM_WIN32)
#define USE_ELF_WRITER 1
#define USE_ELF_RELA 1
#endif
-#if defined(__i386__) && !defined(PLATFORM_WIN32)
+#if defined(TARGET_X86) && !defined(PLATFORM_WIN32)
#define USE_ELF_WRITER 1
#endif
-#if defined(__arm__) && !defined(__MACH__)
+#if defined(TARGET_ARM) && !defined(__MACH__)
#define USE_ELF_WRITER 1
#endif
@@ -1004,7 +1004,7 @@ resolve_relocations (MonoAotCompile *acfg)
static void
do_reloc (MonoAotCompile *acfg, BinReloc *reloc, guint8 *data, gssize addr)
{
-#ifdef __arm__
+#ifdef TARGET_ARM
/*
* We use the official ARM relocation types, but implement only the stuff actually
* needed by the code we generate.
@@ -1320,11 +1320,11 @@ bin_writer_emit_writeout (MonoAotCompile *acfg)
header.e_ident [i] = 0;
header.e_type = ET_DYN;
-#if defined(__i386__)
+#if defined(TARGET_X86)
header.e_machine = EM_386;
-#elif defined(__x86_64__)
+#elif defined(TARGET_AMD64)
header.e_machine = EM_X86_64;
-#elif defined(__arm__)
+#elif defined(TARGET_ARM)
header.e_machine = EM_ARM;
#else
g_assert_not_reached ();
@@ -1518,7 +1518,7 @@ asm_writer_emit_section_change (MonoAotCompile *acfg, const char *section_name,
fprintf (acfg->fp, "%s\n", ".data");
else
fprintf (acfg->fp, "%s\n", section_name);
-#elif defined(sparc) || defined(__arm__)
+#elif defined(sparc) || defined(TARGET_ARM)
/* For solaris as, GNU as should accept the same */
fprintf (acfg->fp, ".section \"%s\"\n", section_name);
#else
@@ -1544,11 +1544,11 @@ asm_writer_emit_symbol_type (MonoAotCompile *acfg, const char *name, gboolean fu
asm_writer_emit_unset_mode (acfg);
#if defined(__MACH__)
-#elif defined(sparc) || defined(__arm__)
+#elif defined(sparc) || defined(TARGET_ARM)
fprintf (acfg->fp, "\t.type %s,#%s\n", name, stype);
#elif defined(PLATFORM_WIN32)
-#elif defined(__x86_64__) || defined(__i386__)
+#elif defined(TARGET_AMD64) || defined(TARGET_X86)
fprintf (acfg->fp, "\t.type %s,@%s\n", name, stype);
#else
fprintf (acfg->fp, "\t.type %s,@%s\n", name, stype);
@@ -1614,7 +1614,7 @@ static void
asm_writer_emit_alignment (MonoAotCompile *acfg, int size)
{
asm_writer_emit_unset_mode (acfg);
-#if defined(__arm__)
+#if defined(TARGET_ARM)
fprintf (acfg->fp, "\t.align %d\n", ilog2 (size));
#elif defined(__ppc__) && defined(__MACH__)
// the mach-o assembler specifies alignments as powers of 2.
@@ -1631,7 +1631,7 @@ asm_writer_emit_pointer_unaligned (MonoAotCompile *acfg, const char *target)
{
asm_writer_emit_unset_mode (acfg);
asm_writer_emit_alignment (acfg, sizeof (gpointer));
-#if defined(__x86_64__)
+#if defined(TARGET_AMD64)
fprintf (acfg->fp, "\t.quad %s\n", target ? target : "0");
#elif defined(sparc) && SIZEOF_VOID_P == 8
fprintf (acfg->fp, "\t.xword %s\n", target ? target : "0");
@@ -1684,7 +1684,7 @@ asm_writer_emit_int16 (MonoAotCompile *acfg, int value)
if ((acfg->col_count++ % 8) == 0)
#if defined(__MACH__)
fprintf (acfg->fp, "\n\t.short ");
-#elif defined(__arm__)
+#elif defined(TARGET_ARM)
/* FIXME: Use .hword on other archs as well */
fprintf (acfg->fp, "\n\t.hword ");
#else
@@ -1747,7 +1747,7 @@ asm_writer_emit_writeout (MonoAotCompile *acfg)
fclose (acfg->fp);
-#if defined(__x86_64__)
+#if defined(TARGET_AMD64)
#define AS_OPTIONS "--64"
#elif defined(sparc) && SIZEOF_VOID_P == 8
#define AS_OPTIONS "-xarch=v9"
@@ -1805,9 +1805,9 @@ asm_writer_emit_writeout (MonoAotCompile *acfg)
/*
* Need to link using gcc so our ctor function gets called.
*/
- command = g_strdup_printf ("gcc -shared -o %s %s.o", outfile_name, acfg->tmpfname);
+ command = g_strdup_printf ("gcc -shared -o %s %s.o", tmp_outfile_name, acfg->tmpfname);
} else {
- command = g_strdup_printf ("ld -shared -o %s %s.o", outfile_name, acfg->tmpfname);
+ command = g_strdup_printf ("ld -shared -o %s %s.o", tmp_outfile_name, acfg->tmpfname);
}
#endif
printf ("Executing the native linker: %s\n", command);
@@ -1826,6 +1826,22 @@ asm_writer_emit_writeout (MonoAotCompile *acfg)
system (com);
g_free (com);*/
+#if defined(TARGET_ARM) && !defined(__MACH__)
+ /*
+ * gas generates 'mapping symbols' each time code and data is mixed, which
+ * happens a lot in emit_and_reloc_code (), so we need to get rid of them.
+ */
+ command = g_strdup_printf ("strip --strip-symbol=\\$a --strip-symbol=\\$d %s", tmp_outfile_name);
+ printf ("Stripping the binary: %s\n", command);
+ if (system (command) != 0) {
+ g_free (tmp_outfile_name);
+ g_free (outfile_name);
+ g_free (command);
+ g_free (objfile);
+ return 1;
+ }
+#endif
+
rename (tmp_outfile_name, outfile_name);
g_free (tmp_outfile_name);
@@ -2764,8 +2780,7 @@ add_wrappers (MonoAotCompile *acfg)
sig = mono_method_signature (method);
- if (sig->hasthis && (method->klass->marshalbyref || method->klass == mono_defaults.object_class) &&
- !(method->flags & METHOD_ATTRIBUTE_VIRTUAL)) {
+ if (sig->hasthis && (method->klass->marshalbyref || method->klass == mono_defaults.object_class)) {
m = mono_marshal_get_remoting_invoke_with_check (method);
add_method (acfg, m);
@@ -3039,13 +3054,13 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
}
if (direct_call) {
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(TARGET_X86) || defined(TARGET_AMD64)
g_assert (code [i] == 0xe8);
/* Need to make sure this is exactly 5 bytes long */
emit_byte (acfg, '\xe8');
emit_symbol_diff (acfg, direct_call_target, ".", -4);
i += 4;
-#elif defined(__arm__)
+#elif defined(TARGET_ARM)
#ifdef USE_BIN_WRITER
{
guint8 buf [4];
@@ -3069,11 +3084,11 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
got_slot = get_got_offset (acfg, patch_info);
emit_bytes (acfg, code + i, mono_arch_get_patch_offset (code + i));
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
emit_symbol_diff (acfg, "got", ".", (unsigned int) ((got_slot * sizeof (gpointer)) - 4));
-#elif defined(__i386__)
+#elif defined(TARGET_X86)
emit_int32 (acfg, (unsigned int) ((got_slot * sizeof (gpointer))));
-#elif defined(__arm__)
+#elif defined(TARGET_ARM)
emit_symbol_diff (acfg, "got", ".", (unsigned int) ((got_slot * sizeof (gpointer))) - 12);
#else
g_assert_not_reached ();
@@ -3594,7 +3609,7 @@ emit_plt (MonoAotCompile *acfg)
emit_section_change (acfg, ".text", 0);
emit_global (acfg, symbol, TRUE);
-#ifdef __i386__
+#ifdef TARGET_X86
/* This section will be made read-write by the AOT loader */
emit_alignment (acfg, PAGESIZE);
#else
@@ -3604,7 +3619,7 @@ emit_plt (MonoAotCompile *acfg)
for (i = 0; i < acfg->plt_offset; ++i) {
char label [128];
-#if defined(__arm__)
+#if defined(TARGET_ARM)
guint8 buf [256];
guint8 *code;
#endif
@@ -3616,7 +3631,7 @@ emit_plt (MonoAotCompile *acfg)
* The first plt entry is used to transfer code to the AOT loader.
*/
-#if defined(__i386__)
+#if defined(TARGET_X86)
if (i == 0) {
/* It is filled up during loading by the AOT loader. */
emit_zero_bytes (acfg, 16);
@@ -3626,7 +3641,7 @@ emit_plt (MonoAotCompile *acfg)
emit_symbol_diff (acfg, "plt", ".", -4);
emit_int32 (acfg, acfg->plt_got_info_offsets [i]);
}
-#elif defined(__x86_64__)
+#elif defined(TARGET_AMD64)
/*
* We can't emit jumps because they are 32 bits only so they can't be patched.
* So we make indirect calls through GOT entries which are patched by the AOT
@@ -3639,7 +3654,7 @@ emit_plt (MonoAotCompile *acfg)
emit_symbol_diff (acfg, "got", ".", ((acfg->plt_got_offset_base + i) * sizeof (gpointer)) -4);
/* Used by mono_aot_get_plt_info_offset */
emit_int32 (acfg, acfg->plt_got_info_offsets [i]);
-#elif defined(__arm__)
+#elif defined(TARGET_ARM)
/* FIXME:
* - optimize OP_AOTCONST implementation
* - optimize the PLT entries
@@ -3777,7 +3792,7 @@ emit_trampolines (MonoAotCompile *acfg)
code = mono_arch_get_nullified_class_init_trampoline (&code_size);
emit_named_code (acfg, "nullified_class_init_trampoline", code, code_size, acfg->got_offset, NULL);
-#if defined(__x86_64__) && defined(MONO_ARCH_MONITOR_OBJECT_REG)
+#if defined(TARGET_AMD64) && defined(MONO_ARCH_MONITOR_OBJECT_REG)
code = mono_arch_create_monitor_enter_trampoline_full (&code_size, &ji, TRUE);
emit_named_code (acfg, "monitor_enter_trampoline", code, code_size, acfg->got_offset, ji);
code = mono_arch_create_monitor_exit_trampoline_full (&code_size, &ji, TRUE);
@@ -3798,7 +3813,7 @@ emit_trampolines (MonoAotCompile *acfg)
code = mono_arch_get_throw_corlib_exception_full (&code_size, &ji, TRUE);
emit_named_code (acfg, "throw_corlib_exception", code, code_size, acfg->got_offset, ji);
-#if defined(__x86_64__) || defined(__arm__)
+#if defined(TARGET_AMD64) || defined(TARGET_ARM)
for (i = 0; i < 128; ++i) {
int offset;
@@ -3844,7 +3859,7 @@ emit_trampolines (MonoAotCompile *acfg)
* address of the trampoline to get the address of the got slot, and
* loading the argument from the there.
*/
-#if defined(__x86_64__)
+#if defined(TARGET_AMD64)
/* This should be exactly 16 bytes long */
/* It should work together with the generic trampoline code in tramp-amd64.c */
/* call *<offset>(%rip) */
@@ -3855,7 +3870,7 @@ emit_trampolines (MonoAotCompile *acfg)
/* This should be relative to the start of the trampoline */
emit_symbol_diff (acfg, "got", ".", (offset * sizeof (gpointer)) - 4 + 19);
emit_zero_bytes (acfg, 5);
-#elif defined(__arm__)
+#elif defined(TARGET_ARM)
{
guint8 buf [128];
@@ -3906,7 +3921,7 @@ emit_trampolines (MonoAotCompile *acfg)
sprintf (call_target, ".Lm_%x", get_method_index (acfg, cfg->orig_method));
-#if defined(__x86_64__)
+#if defined(TARGET_AMD64)
{
guint8 buf [32];
int this_reg;
@@ -3920,7 +3935,7 @@ emit_trampolines (MonoAotCompile *acfg)
emit_byte (acfg, '\xe9');
emit_symbol_diff (acfg, call_target, ".", -4);
}
-#elif defined(__arm__)
+#elif defined(TARGET_ARM)
{
guint8 buf [128];
int this_pos = 0;
@@ -4549,6 +4564,27 @@ typedef struct HashEntry {
} HashEntry;
/*
+ * mono_aot_str_hash:
+ *
+ * Hash function for strings which we use to hash strings for things which are
+ * saved in the AOT image, since g_str_hash () can change.
+ */
+guint
+mono_aot_str_hash (gconstpointer v1)
+{
+ /* Same as g_str_hash () in glib */
+ char *p = (char *) v1;
+ guint hash = *p;
+
+ while (*p++) {
+ if (*p)
+ hash = (hash << 5) - hash + *p;
+ }
+
+ return hash;
+}
+
+/*
* emit_extra_methods:
*
* Emit methods which are not in the METHOD table, like wrappers.
@@ -4642,7 +4678,7 @@ emit_extra_methods (MonoAotCompile *acfg)
value = get_method_index (acfg, method);
if (method->wrapper_type) {
- hash = g_str_hash (method->name) % table_size;
+ hash = mono_aot_str_hash (method->name) % table_size;
} else {
// FIXME:
hash = 0 % table_size;
@@ -4854,7 +4890,7 @@ emit_class_name_table (MonoAotCompile *acfg)
token = MONO_TOKEN_TYPE_DEF | (i + 1);
klass = mono_class_get (acfg->image, token);
full_name = mono_type_get_name_full (mono_class_get_type (klass), MONO_TYPE_NAME_FORMAT_FULL_NAME);
- hash = g_str_hash (full_name) % table_size;
+ hash = mono_aot_str_hash (full_name) % table_size;
g_free (full_name);
/* FIXME: Allocate from the mempool */
@@ -5129,14 +5165,14 @@ emit_globals (MonoAotCompile *acfg)
#ifdef USE_BIN_WRITER
g_assert_not_reached ();
#else
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
fprintf (acfg->fp, "leaq globals(%%rip), %%rdi\n");
fprintf (acfg->fp, "call mono_aot_register_globals at PLT\n");
fprintf (acfg->fp, "ret\n");
fprintf (acfg->fp, ".section .ctors,\"aw\", at progbits\n");
emit_alignment (acfg, 8);
emit_pointer (acfg, symbol);
-#elif defined(__arm__) && defined(__MACH__)
+#elif defined(TARGET_ARM) && defined(__MACH__)
fprintf (acfg->fp, ".text\n");
fprintf (acfg->fp, ".align 3\n");
@@ -5160,7 +5196,7 @@ emit_globals (MonoAotCompile *acfg)
fprintf (acfg->fp, ".align 2\n");
fprintf (acfg->fp, ".long %s at target1\n", symbol);
-#elif defined(__arm__)
+#elif defined(TARGET_ARM)
/*
* Taken from gcc generated code for:
* static int i;
@@ -5322,7 +5358,7 @@ emit_dwarf_abbrev (MonoAotCompile *acfg, int code, int tag, gboolean has_child,
static void
emit_cie (MonoAotCompile *acfg)
{
-#if defined(__x86_64__)
+#if defined(TARGET_AMD64)
emit_section_change (acfg, ".debug_frame", 0);
emit_alignment (acfg, 8);
@@ -5333,14 +5369,14 @@ emit_cie (MonoAotCompile *acfg)
emit_byte (acfg, 3); /* version */
emit_string (acfg, ""); /* augmention */
emit_sleb128 (acfg, 1); /* code alignment factor */
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
emit_sleb128 (acfg, -8); /* data alignment factor */
emit_uleb128 (acfg, AMD64_RIP);
#else
g_assert_not_reached ();
#endif
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
emit_byte (acfg, DW_CFA_def_cfa);
emit_uleb128 (acfg, mono_hw_reg_to_dwarf_reg (AMD64_RSP));
emit_uleb128 (acfg, 8); /* offset=8 */
@@ -5366,7 +5402,7 @@ static void
emit_fde (MonoAotCompile *acfg, int fde_index, char *start_symbol, char *end_symbol,
guint8 *code, guint32 code_size, GSList *unwind_ops, gboolean use_cie)
{
-#if defined(__x86_64__)
+#if defined(TARGET_AMD64)
char symbol [128];
GSList *l;
guint8 *uw_info;
@@ -5388,7 +5424,7 @@ emit_fde (MonoAotCompile *acfg, int fde_index, char *start_symbol, char *end_sym
}
l = unwind_ops;
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
if (use_cie)
/* Skip the first two ops which are in the CIE */
l = l->next->next;
@@ -5873,7 +5909,7 @@ emit_trampoline_dwarf_info (MonoAotCompile *acfg, const char *tramp_name, char *
static void
emit_dwarf_info (MonoAotCompile *acfg)
{
-#if defined(USE_ELF_WRITER) && defined(__x86_64__)
+#if defined(USE_ELF_WRITER) && defined(TARGET_AMD64)
int i;
char symbol [128], symbol2 [128];
@@ -6247,6 +6283,11 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
}
void
+mono_xdebug_init (void)
+{
+}
+
+void
mono_save_xdebug_info (MonoMethod *method, guint8 *code, guint32 code_size, MonoInst **args, GSList *unwind_info)
{
}
diff --git a/mono/mini/aot-runtime.c b/mono/mini/aot-runtime.c
index 62bafb4..0c53f33 100644
--- a/mono/mini/aot-runtime.c
+++ b/mono/mini/aot-runtime.c
@@ -434,7 +434,7 @@ static MonoImage*
decode_method_ref (MonoAotModule *module, guint32 *token, MonoMethod **method, gboolean *no_aot_trampoline, guint8 *buf, guint8 **endbuf)
{
guint32 image_index, value;
- MonoImage *image;
+ MonoImage *image = NULL;
guint8 *p = buf;
if (method)
@@ -1267,7 +1267,7 @@ mono_aot_get_class_from_name (MonoImage *image, const char *name_space, const ch
full_name = g_strdup_printf ("%s.%s", name_space, name);
}
}
- hash = g_str_hash (full_name) % table_size;
+ hash = mono_aot_str_hash (full_name) % table_size;
if (full_name != full_name_buf)
g_free (full_name);
@@ -2082,7 +2082,7 @@ find_extra_method_in_amodule (MonoAotModule *amodule, MonoMethod *method)
}
if (method->wrapper_type)
- hash = g_str_hash (method->name) % table_size;
+ hash = mono_aot_str_hash (method->name) % table_size;
else
hash = 0 % table_size;
diff --git a/mono/mini/basic.cs b/mono/mini/basic.cs
index 74d1ede..394110d 100644
--- a/mono/mini/basic.cs
+++ b/mono/mini/basic.cs
@@ -1325,4 +1325,32 @@ class Tests {
return 2;
return 0;
}
+
+ //repro for #506915
+ struct Bug506915 { public int val; }
+ static int test_2_ldobj_stobj_optization (string[] args)
+ {
+ int i = 99;
+ var a = new Bug506915 ();
+ var b = new Bug506915 ();
+ if (i.GetHashCode () == 99)
+ i = 44;
+ var array = new Bug506915 [2];
+ array [0].val = 2;
+ array [1] = (i == 0) ? a : array [0];
+
+ return array [1].val;
+ }
+ //repro for #505375
+ public static int test_2_cprop_bug () {
+ int idx = 0;
+ int a = 1;
+ var cmp = System.Collections.Generic.Comparer<int>.Default ;
+ if (cmp.Compare (a, 0) > 0)
+ a = 0;
+ do { idx++; } while (cmp.Compare (idx - 1, a) == 0);
+ return idx;
+ }
+
+
}
diff --git a/mono/mini/debug-debugger.c b/mono/mini/debug-debugger.c
index 052b356..b76d4d5 100644
--- a/mono/mini/debug-debugger.c
+++ b/mono/mini/debug-debugger.c
@@ -308,7 +308,7 @@ debugger_insert_source_breakpoint (guint64 image_argument, guint64 token, guint6
mono_debugger_lock ();
klass = mono_debugger_register_class_init_callback (image, class_name, token, index);
- if (!klass) {
+ if (!klass || !klass->inited || !klass->methods) {
mono_debugger_unlock ();
return 0;
}
@@ -340,7 +340,7 @@ debugger_insert_source_breakpoint (guint64 image_argument, guint64 token, guint6
method = nm;
}
- info = mono_debugger_insert_method_breakpoint (method, index);
+ info = mono_debug_lookup_method_addresses (method);
mono_debugger_unlock ();
return (guint64) (gsize) info;
}
@@ -354,6 +354,7 @@ debugger_remove_breakpoint (guint64 index, G_GNUC_UNUSED guint64 dummy)
{
mono_debugger_lock ();
mono_debugger_remove_method_breakpoint (index);
+ mono_debugger_remove_class_init_callback (index);
mono_debugger_unlock ();
}
diff --git a/mono/mini/debug-mini.c b/mono/mini/debug-mini.c
index d4f5645..46fe06e 100644
--- a/mono/mini/debug-mini.c
+++ b/mono/mini/debug-mini.c
@@ -81,12 +81,6 @@ typedef struct {
guint32 stop_unhandled;
} MonoDebuggerExceptionInfo;
-typedef enum {
- MONO_DEBUGGER_EXCEPTION_ACTION_NONE = 0,
- MONO_DEBUGGER_EXCEPTION_ACTION_STOP = 1,
- MONO_DEBUGGER_EXCEPTION_ACTION_STOP_UNHANDLED = 2
-} MonoDebuggerExceptionAction;
-
MonoDebuggerThreadInfo *mono_debugger_thread_table = NULL;
static inline void
@@ -308,9 +302,6 @@ mono_debug_close_method (MonoCompile *cfg)
mono_debug_add_vg_method (method, jit);
- if (info->breakpoint_id)
- mono_debugger_breakpoint_callback (method, info->breakpoint_id);
-
mono_debugger_check_breakpoints (method, debug_info);
mono_debug_free_method_jit_info (jit);
@@ -890,7 +881,7 @@ find_debugger_thread_info (MonoThread *thread)
}
#endif
-static MonoDebuggerExceptionAction
+MonoDebuggerExceptionAction
_mono_debugger_throw_exception (gpointer addr, gpointer stack, MonoObject *exc)
{
#ifdef MONO_DEBUGGER_SUPPORTED
@@ -955,7 +946,7 @@ _mono_debugger_throw_exception (gpointer addr, gpointer stack, MonoObject *exc)
return MONO_DEBUGGER_EXCEPTION_ACTION_NONE;
}
-static gboolean
+gboolean
_mono_debugger_unhandled_exception (gpointer addr, gpointer stack, MonoObject *exc)
{
#ifdef MONO_DEBUGGER_SUPPORTED
@@ -1039,61 +1030,6 @@ mono_debugger_call_exception_handler (gpointer addr, gpointer stack, MonoObject
#endif
}
-/*
- * mono_debugger_handle_exception:
- *
- * Notify the debugger about exceptions. Returns TRUE if the debugger wants us to stop
- * at the exception and FALSE to resume with the normal exception handling.
- *
- * The arch code is responsible to setup @ctx in a way that MONO_CONTEXT_GET_IP () and
- * MONO_CONTEXT_GET_SP () point to the throw instruction; ie. before executing the
- * `callq throw' instruction.
- */
-gboolean
-mono_debugger_handle_exception (MonoContext *ctx, MonoObject *obj)
-{
- MonoDebuggerExceptionAction action;
-
- if (!mono_debug_using_mono_debugger ())
- return FALSE;
-
- if (!obj) {
- MonoException *ex = mono_get_exception_null_reference ();
- MONO_OBJECT_SETREF (ex, message, mono_string_new (mono_domain_get (), "Object reference not set to an instance of an object"));
- obj = (MonoObject *)ex;
- }
-
- action = _mono_debugger_throw_exception (MONO_CONTEXT_GET_IP (ctx), MONO_CONTEXT_GET_SP (ctx), obj);
-
- if (action == MONO_DEBUGGER_EXCEPTION_ACTION_STOP) {
- /*
- * The debugger wants us to stop on the `throw' instruction.
- * By the time we get here, it already inserted a breakpoint there.
- */
- return TRUE;
- } else if (action == MONO_DEBUGGER_EXCEPTION_ACTION_STOP_UNHANDLED) {
- MonoContext ctx_cp = *ctx;
-
- /*
- * The debugger wants us to stop only if this exception is user-unhandled.
- */
-
- if (!mono_handle_exception (&ctx_cp, obj, MONO_CONTEXT_GET_IP (ctx), TRUE)) {
- /*
- * The exception is user-unhandled - tell the debugger to stop.
- */
- return _mono_debugger_unhandled_exception (MONO_CONTEXT_GET_IP (ctx), MONO_CONTEXT_GET_SP (ctx), obj);
- }
-
- /*
- * The exception is catched somewhere - resume with the normal exception handling and don't
- * stop in the debugger.
- */
- }
-
- return FALSE;
-}
-
#ifdef MONO_DEBUGGER_SUPPORTED
static gchar *
diff --git a/mono/mini/debug-mini.h b/mono/mini/debug-mini.h
index 975df60..73f98c7 100644
--- a/mono/mini/debug-mini.h
+++ b/mono/mini/debug-mini.h
@@ -31,6 +31,22 @@ MonoObject *
mono_debugger_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **exc);
/*
+ * Internal exception API.
+ */
+
+typedef enum {
+ MONO_DEBUGGER_EXCEPTION_ACTION_NONE = 0,
+ MONO_DEBUGGER_EXCEPTION_ACTION_STOP = 1,
+ MONO_DEBUGGER_EXCEPTION_ACTION_STOP_UNHANDLED = 2
+} MonoDebuggerExceptionAction;
+
+MonoDebuggerExceptionAction
+_mono_debugger_throw_exception (gpointer addr, gpointer stack, MonoObject *exc);
+
+gboolean
+_mono_debugger_unhandled_exception (gpointer addr, gpointer stack, MonoObject *exc);
+
+/*
* This is the old breakpoint interface.
* It isn't used by the debugger anymore, but still when using the `--break' command
* line argument.
diff --git a/mono/mini/decompose.c b/mono/mini/decompose.c
index 2d2ae39..1a929ec 100644
--- a/mono/mini/decompose.c
+++ b/mono/mini/decompose.c
@@ -739,14 +739,14 @@ mono_decompose_long_opts (MonoCompile *cfg)
* on x86, and the x86 version might not work on other archs ?
*/
/* FIXME: Move these to mono_arch_decompose_long_opts () */
-#if defined(__i386__)
+#if defined(TARGET_X86)
MONO_EMIT_NEW_UNALU (cfg, OP_INEG, tree->dreg + 1, tree->sreg1 + 1);
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADC_IMM, tree->dreg + 2, tree->sreg1 + 2, 0);
MONO_EMIT_NEW_UNALU (cfg, OP_INEG, tree->dreg + 2, tree->dreg + 2);
#elif defined(__sparc__)
MONO_EMIT_NEW_BIALU (cfg, OP_SUBCC, tree->dreg + 1, 0, tree->sreg1 + 1);
MONO_EMIT_NEW_BIALU (cfg, OP_SBB, tree->dreg + 2, 0, tree->sreg1 + 2);
-#elif defined(__arm__)
+#elif defined(TARGET_ARM)
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ARM_RSBS_IMM, tree->dreg + 1, tree->sreg1 + 1, 0);
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ARM_RSC_IMM, tree->dreg + 2, tree->sreg1 + 2, 0);
#elif defined(__ppc__) || defined(__powerpc__)
@@ -1200,7 +1200,7 @@ mono_decompose_vtype_opts (MonoCompile *cfg)
case 8:
#if SIZEOF_REGISTER == 4
/*
- FIXME It would be nice to fix the operding of OP_CALL to make it possible to use numbering voodoo
+ FIXME Other ABIs might return in different regs than the ones used for LCALL.
FIXME It would be even nicer to be able to leverage the long decompose stuff.
*/
switch (call2->inst.opcode) {
diff --git a/mono/mini/driver.c b/mono/mini/driver.c
index 674cea0..48ca2d9 100644
--- a/mono/mini/driver.c
+++ b/mono/mini/driver.c
@@ -341,6 +341,9 @@ mini_regression (MonoImage *image, int verbose, int *total_run)
TestMethod func;
GTimer *timer = g_timer_new ();
MonoDomain *domain = mono_domain_get ();
+ guint32 exclude = 0;
+
+ mono_arch_cpu_optimizazions (&exclude);
if (mini_stats_fd) {
fprintf (mini_stats_fd, "$stattitle = \'Mono Benchmark Results (various optimizations)\';\n");
@@ -381,7 +384,7 @@ mini_regression (MonoImage *image, int verbose, int *total_run)
for (opt = 0; opt < G_N_ELEMENTS (opt_sets); ++opt) {
double elapsed, comp_time, start_time;
- opt_flags = opt_sets [opt];
+ opt_flags = opt_sets [opt] & ~exclude;
mono_set_defaults (verbose, opt_flags);
n = opt_descr (opt_flags);
g_print ("Test run: image=%s, opts=%s\n", mono_image_get_filename (image), n);
@@ -1120,7 +1123,7 @@ mini_trace_usage (void)
" M:Type:Method Specifies a method\n"
" N:Namespace Specifies a namespace\n"
" T:Type Specifies a type\n"
- " +EXPR Includes expression\n"
+ " EXPR Includes expression\n"
" -EXPR Excludes expression\n"
" EXPR,EXPR Multiple expressions\n"
" disabled Don't print any output until toggled via SIGUSR2\n");
diff --git a/mono/mini/genmdesc.pl b/mono/mini/genmdesc.pl
index 0cd89ef..7febf81 100644
--- a/mono/mini/genmdesc.pl
+++ b/mono/mini/genmdesc.pl
@@ -36,7 +36,18 @@ sub load_opcodes
}
die "$arch arch is not supported.\n" unless $arch_found;
- $cpp .= " -D$arch $srcdir/mini-ops.h|";
+ my $arch_define = $arch;
+ if ($arch =~ "__i386__") {
+ $arch_define = "TARGET_X86";
+ }
+ if ($arch =~ " __x86_64__") {
+ $arch_define = "TARGET_AMD64";
+ }
+ if ($arch =~ "__arm__") {
+ $arch_define = "TARGET_ARM";
+ }
+
+ $cpp .= " -D$arch_define $srcdir/mini-ops.h|";
#print "Running: $cpp\n";
open (OPS, $cpp) || die "Cannot execute cpp: $!";
while (<OPS>) {
diff --git a/mono/mini/iltests.il.in b/mono/mini/iltests.il.in
index bf2d37f..ec00b6d 100644
--- a/mono/mini/iltests.il.in
+++ b/mono/mini/iltests.il.in
@@ -486,10 +486,36 @@ COND: ldloc.0
ret
}
+ .class nested private auto ansi sealed beforefieldinit TailCallStructBig
+ extends [mscorlib]System.ValueType {
+ .field public int32 a
+ .field public int32 b
+ .field public int32 c
+ }
+
+ .method static valuetype Tests/TailCallStructBig tail1_big (valuetype Tests/TailCallStructBig arg) {
+ ldarga 0
+ ldarga 0
+ ldfld int32 Tests/TailCallStructBig::a
+ ldc.i4.1
+ add
+ stfld int32 Tests/TailCallStructBig::a
+ ldarg.0
+ ret
+ }
+
+ .method static valuetype Tests/TailCallStructBig tail2_big (valuetype Tests/TailCallStructBig arg) {
+ ldarg.0
+ tail.
+ call valuetype Tests/TailCallStructBig Tests::tail1_big (valuetype Tests/TailCallStructBig)
+ ret
+ }
+
.method static public int32 test_0_tail_calls () il managed {
.maxstack 16
.locals init (
- valuetype Tests/TailCallStruct arg
+ valuetype Tests/TailCallStruct arg,
+ valuetype Tests/TailCallStructBig arg2
)
ldloca 0
ldc.i4.2
@@ -500,12 +526,23 @@ COND: ldloc.0
ldloc.0
call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
stloc.0
+
+ ldloca 1
+ ldc.i4.2
+ stfld int32 Tests/TailCallStructBig::a
+ ldloc.1
+ call valuetype Tests/TailCallStructBig Tests::tail2_big (valuetype Tests/TailCallStructBig)
+ stloc.1
+
ldloca 0
ldfld int32 Tests/TailCallStruct::a
ldloca 0
ldfld int32 Tests/TailCallStruct::b
add
- ldc.i4 9
+ ldloca 1
+ ldfld int32 Tests/TailCallStructBig::a
+ add
+ ldc.i4 12
sub
ret
}
diff --git a/mono/mini/local-propagation.c b/mono/mini/local-propagation.c
index 363e7b0..0555d81 100644
--- a/mono/mini/local-propagation.c
+++ b/mono/mini/local-propagation.c
@@ -223,7 +223,7 @@ restart:
}
else {
/* Special cases */
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(TARGET_X86) || defined(TARGET_AMD64)
if ((ins->opcode == OP_X86_LEA) && (srcindex == 1)) {
#if SIZEOF_REGISTER == 8
/* FIXME: Use OP_PADD_IMM when the new JIT is done */
@@ -253,10 +253,10 @@ restart:
ins->inst_basereg = def->sreg1;
ins->inst_offset += def->inst_imm;
}
- } else if ((ins->opcode == OP_ISUB_IMM) && (def->opcode == OP_IADD_IMM) && (def->next == ins)) {
+ } else if ((ins->opcode == OP_ISUB_IMM) && (def->opcode == OP_IADD_IMM) && (def->next == ins) && (def->dreg != def->sreg1)) {
ins->sreg1 = def->sreg1;
ins->inst_imm -= def->inst_imm;
- } else if ((ins->opcode == OP_IADD_IMM) && (def->opcode == OP_ISUB_IMM) && (def->next == ins)) {
+ } else if ((ins->opcode == OP_IADD_IMM) && (def->opcode == OP_ISUB_IMM) && (def->next == ins) && (def->dreg != def->sreg1)) {
ins->sreg1 = def->sreg1;
ins->inst_imm -= def->inst_imm;
} else if (ins->opcode == OP_STOREI1_MEMBASE_REG &&
diff --git a/mono/mini/method-to-ir.c b/mono/mini/method-to-ir.c
index 2f363a5..d3e604d 100644
--- a/mono/mini/method-to-ir.c
+++ b/mono/mini/method-to-ir.c
@@ -266,7 +266,7 @@ mono_print_bb (MonoBasicBlock *bb, const char *msg)
} \
} while (0)
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(TARGET_X86) || defined(TARGET_AMD64)
#define EMIT_NEW_X86_LEA(cfg,dest,sr1,sr2,shift,imm) do { \
MONO_INST_NEW (cfg, dest, OP_X86_LEA); \
(dest)->dreg = alloc_preg ((cfg)); \
@@ -3448,7 +3448,7 @@ mini_emit_ldelema_1_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, index2_reg);
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(TARGET_X86) || defined(TARGET_AMD64)
if (size == 1 || size == 2 || size == 4 || size == 8) {
static const int fast_log2 [] = { 1, 0, 1, -1, 2, -1, -1, -1, 3 };
@@ -3581,7 +3581,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
#endif
MONO_EMIT_BOUNDS_CHECK (cfg, args [0]->dreg, MonoString, length, index_reg);
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(TARGET_X86) || defined(TARGET_AMD64)
EMIT_NEW_X86_LEA (cfg, ins, args [0]->dreg, index_reg, 1, G_STRUCT_OFFSET (MonoString, chars));
add_reg = ins->dreg;
/* Avoid a warning */
@@ -4056,6 +4056,7 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
guint32 prev_cil_offset_to_bb_len;
MonoMethod *prev_current_method;
MonoGenericContext *prev_generic_context;
+ gboolean ret_var_set, prev_ret_var_set;
g_assert (cfg->exception_type == MONO_EXCEPTION_NONE);
@@ -4109,9 +4110,12 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
prev_cbb = cfg->cbb;
prev_current_method = cfg->current_method;
prev_generic_context = cfg->generic_context;
+ prev_ret_var_set = cfg->ret_var_set;
costs = mono_method_to_ir (cfg, cmethod, sbblock, ebblock, rvar, dont_inline, sp, real_offset, *ip == CEE_CALLVIRT);
+ ret_var_set = cfg->ret_var_set;
+
cfg->inlined_method = prev_inlined_method;
cfg->real_offset = prev_real_offset;
cfg->cbb_hash = prev_cbb_hash;
@@ -4123,6 +4127,7 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
cfg->arg_types = prev_arg_types;
cfg->current_method = prev_current_method;
cfg->generic_context = prev_generic_context;
+ cfg->ret_var_set = prev_ret_var_set;
if ((costs >= 0 && costs < 60) || inline_allways) {
if (cfg->verbose_level > 2)
@@ -4163,7 +4168,7 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
* If the inlined method contains only a throw, then the ret var is not
* set, so set it to a dummy value.
*/
- if (!cfg->ret_var_set) {
+ if (!ret_var_set) {
static double r8_0 = 0.0;
switch (rvar->type) {
@@ -5085,6 +5090,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
GSList *class_inits = NULL;
gboolean dont_verify, dont_verify_stloc, readonly = FALSE;
int context_used;
+ gboolean init_locals;
/* serialization and xdomain stuff may need access to private fields and methods */
dont_verify = method->klass->image->assembly->corlib_internal? TRUE: FALSE;
@@ -5110,6 +5116,13 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
cfg->cil_start = ip;
end = ip + header->code_size;
mono_jit_stats.cil_code_size += header->code_size;
+ init_locals = header->init_locals;
+
+ /*
+ * Methods without init_locals set could cause asserts in various passes
+ * (#497220).
+ */
+ init_locals = TRUE;
method_definition = method;
while (method_definition->is_inflated) {
@@ -5342,7 +5355,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
}
}
- if ((header->init_locals || (cfg->method == method && (cfg->opt & MONO_OPT_SHARED))) || cfg->compile_aot || security || pinvoke) {
+ if ((init_locals || (cfg->method == method && (cfg->opt & MONO_OPT_SHARED))) || cfg->compile_aot || security || pinvoke) {
/* we use a separate basic block for the initialization code */
NEW_BBLOCK (cfg, init_localsbb);
cfg->bb_init = init_localsbb;
@@ -5516,7 +5529,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
cfg->coverage_info->data [cil_offset].cil_code = ip;
/* TODO: Use an increment here */
-#if defined(__i386__)
+#if defined(TARGET_X86)
MONO_INST_NEW (cfg, ins, OP_STORE_MEM_IMM);
ins->inst_p0 = &(cfg->coverage_info->data [cil_offset].count);
ins->inst_imm = 1;
@@ -5767,7 +5780,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
ip++;
--sp;
-#ifdef __i386__
+#ifdef TARGET_X86
if (sp [0]->type == STACK_R8)
/* we need to pop the value from the x86 FP stack */
MONO_EMIT_NEW_UNALU (cfg, OP_X86_FPOP, -1, sp [0]->dreg);
@@ -5794,7 +5807,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (mono_security_get_mode () == MONO_SECURITY_MODE_CAS)
CHECK_CFG_EXCEPTION;
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
{
MonoMethodSignature *fsig = mono_method_signature (cmethod);
int i, n;
@@ -6158,7 +6171,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
/* FIXME: runtime generic context pointer for jumps? */
/* FIXME: handle this for generic sharing eventually */
if ((ins_flag & MONO_INST_TAILCALL) && !cfg->generic_sharing_context && !vtable_arg && cmethod && (*ip == CEE_CALL) &&
- (mono_metadata_signature_equal (mono_method_signature (method), mono_method_signature (cmethod)))) {
+ (mono_metadata_signature_equal (mono_method_signature (method), mono_method_signature (cmethod))) && !MONO_TYPE_ISSTRUCT (mono_method_signature (cmethod)->ret)) {
MonoCallInst *call;
/* Prevent inlining of methods with tail calls (the call stack would be altered) */
@@ -6169,7 +6182,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
call->method = cmethod;
call->signature = mono_method_signature (cmethod);
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
/* Handle tail calls similarly to calls */
call->inst.opcode = OP_TAILCALL;
call->args = sp;
@@ -6719,7 +6732,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
table->table_size = n;
use_op_switch = FALSE;
-#ifdef __arm__
+#ifdef TARGET_ARM
/* ARM implements SWITCH statements differently */
/* FIXME: Make it use the generic implementation */
if (!cfg->compile_aot)
@@ -7070,7 +7083,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
/* Optimize the ldobj+stobj combination */
/* The reference case ends up being a load+store anyway */
- if (((ip [5] == CEE_STOBJ) && ip_in_bb (cfg, bblock, ip + 9) && read32 (ip + 6) == token) && !generic_class_is_reference_type (cfg, klass)) {
+ if (((ip [5] == CEE_STOBJ) && ip_in_bb (cfg, bblock, ip + 5) && read32 (ip + 6) == token) && !generic_class_is_reference_type (cfg, klass)) {
CHECK_STACK (1);
sp --;
@@ -9211,7 +9224,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
MONO_ADD_INS (cfg->cbb, ins);
cfg->flags |= MONO_CFG_HAS_ALLOCA;
- if (header->init_locals)
+ if (init_locals)
ins->flags |= MONO_INST_INIT;
*sp++ = ins;
@@ -9426,7 +9439,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (cfg->method == method && cfg->got_var)
mono_emit_load_got_addr (cfg);
- if (header->init_locals) {
+ if (init_locals) {
MonoInst *store;
cfg->cbb = init_localsbb;
@@ -9603,13 +9616,13 @@ mono_op_to_op_imm (int opcode)
case OP_STOREI4_MEMBASE_REG:
return OP_STOREI4_MEMBASE_IMM;
-#if defined(__i386__) || defined (__x86_64__)
+#if defined(TARGET_X86) || defined (TARGET_AMD64)
case OP_X86_PUSH:
return OP_X86_PUSH_IMM;
case OP_X86_COMPARE_MEMBASE_REG:
return OP_X86_COMPARE_MEMBASE_IMM;
#endif
-#if defined(__x86_64__)
+#if defined(TARGET_AMD64)
case OP_AMD64_ICOMPARE_MEMBASE_REG:
return OP_AMD64_ICOMPARE_MEMBASE_IMM;
#endif
@@ -9691,7 +9704,7 @@ int
mono_load_membase_to_load_mem (int opcode)
{
// FIXME: Add a MONO_ARCH_HAVE_LOAD_MEM macro
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(TARGET_X86) || defined(TARGET_AMD64)
switch (opcode) {
case OP_LOAD_MEMBASE:
return OP_LOAD_MEM;
@@ -9716,7 +9729,7 @@ mono_load_membase_to_load_mem (int opcode)
static inline int
op_to_op_dest_membase (int store_opcode, int opcode)
{
-#if defined(__i386__)
+#if defined(TARGET_X86)
if (!((store_opcode == OP_STORE_MEMBASE_REG) || (store_opcode == OP_STOREI4_MEMBASE_REG)))
return -1;
@@ -9751,7 +9764,7 @@ op_to_op_dest_membase (int store_opcode, int opcode)
}
#endif
-#if defined(__x86_64__)
+#if defined(TARGET_AMD64)
if (!((store_opcode == OP_STORE_MEMBASE_REG) || (store_opcode == OP_STOREI4_MEMBASE_REG) || (store_opcode == OP_STOREI8_MEMBASE_REG)))
return -1;
@@ -9812,7 +9825,7 @@ op_to_op_dest_membase (int store_opcode, int opcode)
static inline int
op_to_op_store_membase (int store_opcode, int opcode)
{
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(TARGET_X86) || defined(TARGET_AMD64)
switch (opcode) {
case OP_ICEQ:
if (store_opcode == OP_STOREI1_MEMBASE_REG)
@@ -9829,7 +9842,7 @@ op_to_op_store_membase (int store_opcode, int opcode)
static inline int
op_to_op_src1_membase (int load_opcode, int opcode)
{
-#ifdef __i386__
+#ifdef TARGET_X86
/* FIXME: This has sign extension issues */
/*
if ((opcode == OP_ICOMPARE_IMM) && (load_opcode == OP_LOADU1_MEMBASE))
@@ -9851,7 +9864,7 @@ op_to_op_src1_membase (int load_opcode, int opcode)
}
#endif
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
/* FIXME: This has sign extension issues */
/*
if ((opcode == OP_ICOMPARE_IMM) && (load_opcode == OP_LOADU1_MEMBASE))
@@ -9891,7 +9904,7 @@ op_to_op_src1_membase (int load_opcode, int opcode)
static inline int
op_to_op_src2_membase (int load_opcode, int opcode)
{
-#ifdef __i386__
+#ifdef TARGET_X86
if (!((load_opcode == OP_LOAD_MEMBASE) || (load_opcode == OP_LOADI4_MEMBASE) || (load_opcode == OP_LOADU4_MEMBASE)))
return -1;
@@ -9912,7 +9925,7 @@ op_to_op_src2_membase (int load_opcode, int opcode)
}
#endif
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
switch (opcode) {
case OP_ICOMPARE:
if ((load_opcode == OP_LOADI4_MEMBASE) || (load_opcode == OP_LOADU4_MEMBASE))
@@ -10114,7 +10127,7 @@ mono_handle_global_vregs (MonoCompile *cfg)
#if SIZEOF_REGISTER == 8
case STACK_I8:
#endif
-#if !defined(__i386__) && !defined(MONO_ARCH_SOFT_FLOAT)
+#if !defined(TARGET_X86) && !defined(MONO_ARCH_SOFT_FLOAT)
/* Enabling this screws up the fp stack on x86 */
case STACK_R8:
#endif
diff --git a/mono/mini/mini-amd64.c b/mono/mini/mini-amd64.c
index 10ff67c..f5083d1 100644
--- a/mono/mini/mini-amd64.c
+++ b/mono/mini/mini-amd64.c
@@ -1009,7 +1009,7 @@ mono_arch_compute_omit_fp (MonoCompile *cfg)
locals_size += mono_type_size (ins->inst_vtype, &ialign);
}
- if ((cfg->num_varinfo > 10000) || (locals_size >= (1 << 15))) {
+ if ((cfg->num_varinfo > 5000) || (locals_size >= (1 << 15)) || (header->code_size > 110000)) {
/* Avoid hitting the stack_alloc_size < (1 << 16) assertion in emit_epilog () */
cfg->arch.omit_fp = FALSE;
}
diff --git a/mono/mini/mini-arch.h b/mono/mini/mini-arch.h
index 69ba6e8..9abaff9 100644
--- a/mono/mini/mini-arch.h
+++ b/mono/mini/mini-arch.h
@@ -1,9 +1,9 @@
#ifndef __MONO_MINI_ARCH_H__
#define __MONO_MINI_ARCH_H__
-#ifdef __i386__
+#ifdef TARGET_X86
#include "mini-x86.h"
-#elif defined(__x86_64__)
+#elif defined(TARGET_AMD64)
#include "mini-amd64.h"
#elif defined(__mono_ppc__)
#include "mini-ppc.h"
@@ -17,7 +17,7 @@
# endif
#elif defined(__ia64__)
#include "mini-ia64.h"
-#elif defined(__arm__)
+#elif defined(TARGET_ARM)
#include "mini-arm.h"
#elif defined(__alpha__)
#include "mini-alpha.h"
diff --git a/mono/mini/mini-arm.h b/mono/mini/mini-arm.h
index 1229032..308c8fc 100644
--- a/mono/mini/mini-arm.h
+++ b/mono/mini/mini-arm.h
@@ -8,6 +8,10 @@
#define MONO_ARCH_SOFT_FLOAT 1
#endif
+#ifdef ARM_FPU_VFP
+#error "VFP support is not complete, try mono SVN for that."
+#endif
+
#if defined(__ARM_EABI__)
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define ARM_ARCHITECTURE "armel"
diff --git a/mono/mini/mini-codegen.c b/mono/mini/mini-codegen.c
index c8cba88..a51d911 100644
--- a/mono/mini/mini-codegen.c
+++ b/mono/mini/mini-codegen.c
@@ -452,7 +452,7 @@ mono_print_ins_index (int i, MonoInst *ins)
case OP_ICONST:
printf (" [%d]", (int)ins->inst_c0);
break;
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(TARGET_X86) || defined(TARGET_AMD64)
case OP_X86_PUSH_IMM:
#endif
case OP_ICOMPARE_IMM:
@@ -879,7 +879,7 @@ assign_reg (MonoCompile *cfg, MonoRegState *rs, int reg, int hreg, int bank)
else {
g_assert (reg >= MONO_MAX_IREGS);
g_assert (hreg < MONO_MAX_IREGS);
-#ifndef __arm__
+#ifndef TARGET_ARM
/* this seems to trigger a gcc compilation bug sometime (hreg is 0) */
g_assert (! is_global_ireg (hreg));
#endif
@@ -1389,7 +1389,7 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
g_assert (prev_dreg > -1);
g_assert (!is_global_ireg (rs->vassign [prev_dreg]));
mask = regpair_reg2_mask (spec_dest, rs->vassign [prev_dreg]);
-#ifdef __i386__
+#ifdef TARGET_X86
/* bug #80489 */
mask &= ~regmask (X86_ECX);
#endif
diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c
index 6a049b1..dee9316 100644
--- a/mono/mini/mini-exceptions.c
+++ b/mono/mini/mini-exceptions.c
@@ -255,6 +255,7 @@ static gpointer
get_generic_info_from_stack_frame (MonoJitInfo *ji, MonoContext *ctx)
{
MonoGenericJitInfo *gi;
+ gpointer info;
if (!ji->has_generic_jit_info)
return NULL;
@@ -263,10 +264,20 @@ get_generic_info_from_stack_frame (MonoJitInfo *ji, MonoContext *ctx)
return NULL;
if (gi->this_in_reg)
- return mono_arch_context_get_int_reg (ctx, gi->this_reg);
+ info = mono_arch_context_get_int_reg (ctx, gi->this_reg);
else
- return *(gpointer*)(gpointer)((char*)mono_arch_context_get_int_reg (ctx, gi->this_reg) +
- gi->this_offset);
+ info = *(gpointer*)(gpointer)((char*)mono_arch_context_get_int_reg (ctx, gi->this_reg) +
+ gi->this_offset);
+ if (mono_method_get_context (ji->method)->method_inst) {
+ return info;
+ } else if ((ji->method->flags & METHOD_ATTRIBUTE_STATIC) || ji->method->klass->valuetype) {
+ return info;
+ } else {
+ /* Avoid returning a managed object */
+ MonoObject *this_obj = info;
+
+ return this_obj->vtable->klass;
+ }
}
static MonoGenericContext
@@ -289,9 +300,7 @@ get_generic_context_from_stack_frame (MonoJitInfo *ji, gpointer generic_info)
class = vtable->klass;
} else {
- MonoObject *this = generic_info;
-
- class = this->vtable->klass;
+ class = generic_info;
}
if (class->generic_class || class->generic_container)
@@ -841,7 +850,7 @@ get_exception_catch_class (MonoJitExceptionInfo *ei, MonoJitInfo *ji, MonoContex
* the first filter clause which caught the exception.
*/
static gboolean
-mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gpointer original_ip, gboolean test_only, gint32 *out_filter_idx)
+mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gpointer original_ip, gboolean test_only, gint32 *out_filter_idx, MonoJitInfo **out_ji)
{
MonoDomain *domain = mono_domain_get ();
MonoJitInfo *ji, rji;
@@ -910,7 +919,7 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gpointer origina
if (mono_trace_is_enabled ())
g_print ("EXCEPTION handling: %s\n", mono_object_class (obj)->name);
mono_profiler_exception_thrown (obj);
- if (!mono_handle_exception_internal (&ctx_cp, obj, original_ip, TRUE, &first_filter_idx)) {
+ if (!mono_handle_exception_internal (&ctx_cp, obj, original_ip, TRUE, &first_filter_idx, out_ji)) {
if (mono_break_on_exc)
G_BREAKPOINT ();
// FIXME: This runs managed code so it might cause another stack overflow when
@@ -921,6 +930,8 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gpointer origina
if (out_filter_idx)
*out_filter_idx = -1;
+ if (out_ji)
+ *out_ji = NULL;
filter_idx = 0;
initial_ctx = *ctx;
memset (&rji, 0, sizeof (rji));
@@ -1005,12 +1016,14 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gpointer origina
}
if (ei->flags == MONO_EXCEPTION_CLAUSE_FILTER) {
- // mono_debugger_call_exception_handler (ei->data.filter, MONO_CONTEXT_GET_SP (ctx), obj);
if (test_only) {
mono_perfcounters->exceptions_filters++;
+ mono_debugger_call_exception_handler (ei->data.filter, MONO_CONTEXT_GET_SP (ctx), obj);
filtered = call_filter (ctx, ei->data.filter);
if (filtered && out_filter_idx)
*out_filter_idx = filter_idx;
+ if (out_ji)
+ *out_ji = ji;
}
else {
/*
@@ -1101,6 +1114,72 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gpointer origina
g_assert_not_reached ();
}
+/*
+ * mono_debugger_handle_exception:
+ *
+ * Notify the debugger about exceptions. Returns TRUE if the debugger wants us to stop
+ * at the exception and FALSE to resume with the normal exception handling.
+ *
+ * The arch code is responsible to setup @ctx in a way that MONO_CONTEXT_GET_IP () and
+ * MONO_CONTEXT_GET_SP () point to the throw instruction; ie. before executing the
+ * `callq throw' instruction.
+ */
+gboolean
+mono_debugger_handle_exception (MonoContext *ctx, MonoObject *obj)
+{
+ MonoDebuggerExceptionAction action;
+
+ if (!mono_debug_using_mono_debugger ())
+ return FALSE;
+
+ if (!obj) {
+ MonoException *ex = mono_get_exception_null_reference ();
+ MONO_OBJECT_SETREF (ex, message, mono_string_new (mono_domain_get (), "Object reference not set to an instance of an object"));
+ obj = (MonoObject *)ex;
+ }
+
+ action = _mono_debugger_throw_exception (MONO_CONTEXT_GET_IP (ctx), MONO_CONTEXT_GET_SP (ctx), obj);
+
+ if (action == MONO_DEBUGGER_EXCEPTION_ACTION_STOP) {
+ /*
+ * The debugger wants us to stop on the `throw' instruction.
+ * By the time we get here, it already inserted a breakpoint there.
+ */
+ return TRUE;
+ } else if (action == MONO_DEBUGGER_EXCEPTION_ACTION_STOP_UNHANDLED) {
+ MonoContext ctx_cp = *ctx;
+ MonoJitInfo *ji = NULL;
+ gboolean ret;
+
+ /*
+ * The debugger wants us to stop only if this exception is user-unhandled.
+ */
+
+ ret = mono_handle_exception_internal (&ctx_cp, obj, MONO_CONTEXT_GET_IP (ctx), TRUE, NULL, &ji);
+ if (ret && (ji != NULL) && (ji->method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE)) {
+ /*
+ * The exception is handled in a runtime-invoke wrapper, that means that it's unhandled
+ * inside the method being invoked, so we handle it like a user-unhandled exception.
+ */
+ ret = FALSE;
+ }
+
+ if (!ret) {
+ /*
+ * The exception is user-unhandled - tell the debugger to stop.
+ */
+ return _mono_debugger_unhandled_exception (MONO_CONTEXT_GET_IP (ctx), MONO_CONTEXT_GET_SP (ctx), obj);
+ }
+
+ /*
+ * The exception is catched somewhere - resume with the normal exception handling and don't
+ * stop in the debugger.
+ */
+ }
+
+ return FALSE;
+}
+
/**
* mono_debugger_run_finally:
* @start_ctx: saved processor state
@@ -1154,7 +1233,7 @@ mono_handle_exception (MonoContext *ctx, gpointer obj, gpointer original_ip, gbo
{
if (!test_only)
mono_perfcounters->exceptions_thrown++;
- return mono_handle_exception_internal (ctx, obj, original_ip, test_only, NULL);
+ return mono_handle_exception_internal (ctx, obj, original_ip, test_only, NULL, NULL);
}
#ifdef MONO_ARCH_SIGSEGV_ON_ALTSTACK
diff --git a/mono/mini/mini-ops.h b/mono/mini/mini-ops.h
index e1eb611..5db58fb 100644
--- a/mono/mini/mini-ops.h
+++ b/mono/mini/mini-ops.h
@@ -836,7 +836,7 @@ MINI_OP(OP_CMOV_LLE_UN, "cmov_lle_un", IREG, IREG, IREG)
MINI_OP(OP_CMOV_LLT_UN, "cmov_llt_un", IREG, IREG, IREG)
/* Arch specific opcodes */
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(TARGET_X86) || defined(TARGET_AMD64)
MINI_OP(OP_X86_TEST_NULL, "x86_test_null", NONE, NONE, NONE)
MINI_OP(OP_X86_COMPARE_MEMBASE_REG,"x86_compare_membase_reg", NONE, IREG, IREG)
MINI_OP(OP_X86_COMPARE_MEMBASE_IMM,"x86_compare_membase_imm", NONE, IREG, NONE)
@@ -882,7 +882,7 @@ MINI_OP(OP_X86_SETNE_MEMBASE, "x86_setne_membase", NONE, IREG, NONE)
MINI_OP(OP_X86_FXCH, "x86_fxch", NONE, NONE, NONE)
#endif
-#if defined(__x86_64__)
+#if defined(TARGET_AMD64)
MINI_OP(OP_AMD64_TEST_NULL, "amd64_test_null", NONE, NONE, NONE)
MINI_OP(OP_AMD64_SET_XMMREG_R4, "amd64_set_xmmreg_r4", FREG, FREG, NONE)
MINI_OP(OP_AMD64_SET_XMMREG_R8, "amd64_set_xmmreg_r8", FREG, FREG, NONE)
@@ -924,7 +924,7 @@ MINI_OP(OP_PPC_SUBFZE, "ppc_subfze", IREG, IREG, NONE)
MINI_OP(OP_CHECK_FINITE, "ppc_check_finite", NONE, IREG, NONE)
#endif
-#if defined(__arm__)
+#if defined(TARGET_ARM)
MINI_OP(OP_ARM_RSBS_IMM, "arm_rsbs_imm", IREG, IREG, NONE)
MINI_OP(OP_ARM_RSC_IMM, "arm_rsc_imm", IREG, IREG, NONE)
#endif
diff --git a/mono/mini/mini-sparc.c b/mono/mini/mini-sparc.c
index 6a237c0..7ed3251 100644
--- a/mono/mini/mini-sparc.c
+++ b/mono/mini/mini-sparc.c
@@ -1080,11 +1080,9 @@ add_outarg_reg (MonoCompile *cfg, MonoCallInst *call, ArgStorage storage, int re
static void
add_outarg_load (MonoCompile *cfg, MonoCallInst *call, int opcode, int basereg, int offset, int reg)
{
- MonoInst *arg;
int dreg = mono_alloc_ireg (cfg);
- EMIT_NEW_LOAD_MEMBASE (cfg, arg, OP_LOAD_MEMBASE, dreg, sparc_sp, offset);
- MONO_ADD_INS (cfg->cbb, arg);
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, sparc_sp, offset);
mono_call_inst_add_outarg_reg (cfg, call, dreg, reg, FALSE);
}
diff --git a/mono/mini/mini-trampolines.c b/mono/mini/mini-trampolines.c
index b9d9d9c..337662d 100644
--- a/mono/mini/mini-trampolines.c
+++ b/mono/mini/mini-trampolines.c
@@ -516,8 +516,6 @@ mono_class_init_trampoline (gssize *regs, guint8 *code, MonoVTable *vtable, guin
void
mono_generic_class_init_trampoline (gssize *regs, guint8 *code, MonoVTable *vtable, guint8 *tramp)
{
- g_assert (!vtable->initialized);
-
mono_runtime_class_init (vtable);
}
diff --git a/mono/mini/mini-x86.c b/mono/mini/mini-x86.c
index bd4d547..3507dde 100644
--- a/mono/mini/mini-x86.c
+++ b/mono/mini/mini-x86.c
@@ -1068,26 +1068,15 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
}
if (sig->ret && MONO_TYPE_ISSTRUCT (sig->ret)) {
- MonoInst *vtarg;
-
if (cinfo->ret.storage == ArgValuetypeInReg) {
- if (cinfo->ret.pair_storage [0] == ArgInIReg && cinfo->ret.pair_storage [1] == ArgNone) {
- /*
- * Tell the JIT to use a more efficient calling convention: call using
- * OP_CALL, compute the result location after the call, and save the
- * result there.
- */
- call->vret_in_reg = TRUE;
- } else {
- /*
- * The valuetype is in EAX:EDX after the call, needs to be copied to
- * the stack. Save the address here, so the call instruction can
- * access it.
- */
- MONO_INST_NEW (cfg, vtarg, OP_X86_PUSH);
- vtarg->sreg1 = call->vret_var->dreg;
- MONO_ADD_INS (cfg->cbb, vtarg);
- }
+ /*
+ * Tell the JIT to use a more efficient calling convention: call using
+ * OP_CALL, compute the result location after the call, and save the
+ * result there.
+ */
+ call->vret_in_reg = TRUE;
+ if (call->vret_var)
+ NULLIFY_INS (call->vret_var);
}
}
@@ -1802,9 +1791,6 @@ mono_emit_stack_alloc (guchar *code, MonoInst* tree)
static guint8*
emit_move_return_value (MonoCompile *cfg, MonoInst *ins, guint8 *code)
{
- CallInfo *cinfo;
- int quad;
-
/* Move return value to the target register */
switch (ins->opcode) {
case OP_CALL:
@@ -1813,31 +1799,6 @@ emit_move_return_value (MonoCompile *cfg, MonoInst *ins, guint8 *code)
if (ins->dreg != X86_EAX)
x86_mov_reg_reg (code, ins->dreg, X86_EAX, 4);
break;
- case OP_VCALL:
- case OP_VCALL_REG:
- case OP_VCALL_MEMBASE:
- case OP_VCALL2:
- case OP_VCALL2_REG:
- case OP_VCALL2_MEMBASE:
- cinfo = get_call_info (cfg->generic_sharing_context, cfg->mempool, ((MonoCallInst*)ins)->signature, FALSE);
- if (cinfo->ret.storage == ArgValuetypeInReg) {
- /* Pop the destination address from the stack */
- x86_pop_reg (code, X86_ECX);
-
- for (quad = 0; quad < 2; quad ++) {
- switch (cinfo->ret.pair_storage [quad]) {
- case ArgInIReg:
- g_assert (cinfo->ret.pair_regs [quad] != X86_ECX);
- x86_mov_membase_reg (code, X86_ECX, (quad * sizeof (gpointer)), cinfo->ret.pair_regs [quad], sizeof (gpointer));
- break;
- case ArgNone:
- break;
- default:
- g_assert_not_reached ();
- }
- }
- }
- break;
case OP_FCALL: {
MonoCallInst *call = (MonoCallInst*)ins;
if (call->method && !mono_method_signature (call->method)->ret->byref && mono_method_signature (call->method)->ret->type == MONO_TYPE_R4) {
@@ -2684,6 +2645,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_VOIDCALL_MEMBASE:
case OP_CALL_MEMBASE:
call = (MonoCallInst*)ins;
+
+ /*
+ * Emit a few nops to simplify get_vcall_slot ().
+ */
+ x86_nop (code);
+ x86_nop (code);
+ x86_nop (code);
+
x86_call_membase (code, ins->sreg1, ins->inst_offset);
if (call->stack_usage && !CALLCONV_IS_STDCALL (call->signature)) {
if (call->stack_usage == 4)
@@ -5145,68 +5114,37 @@ mono_arch_get_vcall_slot (guint8 *code, gpointer *regs, int *displacement)
*displacement = 0;
- /* go to the start of the call instruction
- *
- * address_byte = (m << 6) | (o << 3) | reg
- * call opcode: 0xff address_byte displacement
- * 0xff m=1,o=2 imm8
- * 0xff m=2,o=2 imm32
- */
code -= 6;
/*
* A given byte sequence can match more than case here, so we have to be
* really careful about the ordering of the cases. Longer sequences
* come first.
- * Some of the rules are only needed because the imm in the mov could
- * match the
- * code [2] == 0xe8 case below.
+ * There are two types of calls:
+ * - direct calls: 0xff address_byte 8/32 bits displacement
+ * - indirect calls: nop nop nop <call>
+ * The nops make sure we don't confuse the instruction preceeding an indirect
+ * call with a direct call.
*/
- if ((code [-2] == 0x8b) && (x86_modrm_mod (code [-1]) == 0x2) && (code [4] == 0xff) && (x86_modrm_reg (code [5]) == 0x2) && (x86_modrm_mod (code [5]) == 0x0)) {
- /*
- * This is an interface call
- * 8b 80 0c e8 ff ff mov 0xffffe80c(%eax),%eax
- * ff 10 call *(%eax)
- */
- reg = x86_modrm_rm (code [5]);
- disp = 0;
-#ifdef MONO_ARCH_HAVE_IMT
- } else if ((code [-2] == 0xba) && (code [3] == 0xff) && (x86_modrm_mod (code [4]) == 1) && (x86_modrm_reg (code [4]) == 2) && ((signed char)code [5] < 0)) {
- /* IMT-based interface calls: with MONO_ARCH_IMT_REG == edx
- * ba 14 f8 28 08 mov $0x828f814,%edx
- * ff 50 fc call *0xfffffffc(%eax)
- */
- reg = code [4] & 0x07;
- disp = (signed char)code [5];
-#endif
- } else if ((code [-2] >= 0xb8) && (code [-2] < 0xb8 + 8) && (code [3] == 0xff) && (x86_modrm_reg (code [4]) == 0x2) && (x86_modrm_mod (code [4]) == 0x1)) {
- /*
- * ba e8 e8 e8 e8 mov $0xe8e8e8e8,%edx
- * ff 50 60 callq *0x60(%eax)
- */
- reg = x86_modrm_rm (code [4]);
- disp = *(gint8*)(code + 5);
- } else if ((code [1] != 0xe8) && (code [3] == 0xff) && ((code [4] & 0x18) == 0x10) && ((code [4] >> 6) == 1)) {
+ if ((code [1] != 0xe8) && (code [3] == 0xff) && ((code [4] & 0x18) == 0x10) && ((code [4] >> 6) == 1)) {
reg = code [4] & 0x07;
disp = (signed char)code [5];
- } else {
- if ((code [0] == 0xff) && ((code [1] & 0x18) == 0x10) && ((code [1] >> 6) == 2)) {
- reg = code [1] & 0x07;
- disp = *((gint32*)(code + 2));
- } else if ((code [1] == 0xe8)) {
- return NULL;
- } else if ((code [4] == 0xff) && (((code [5] >> 6) & 0x3) == 0) && (((code [5] >> 3) & 0x7) == 2)) {
- /*
- * This is a interface call
- * 8b 40 30 mov 0x30(%eax),%eax
- * ff 10 call *(%eax)
- */
- disp = 0;
- reg = code [5] & 0x07;
- }
- else
+ } else if ((code [0] == 0xff) && ((code [1] & 0x18) == 0x10) && ((code [1] >> 6) == 2)) {
+ reg = code [1] & 0x07;
+ disp = *((gint32*)(code + 2));
+ } else if ((code [1] == 0xe8)) {
return NULL;
+ } else if ((code [4] == 0xff) && (((code [5] >> 6) & 0x3) == 0) && (((code [5] >> 3) & 0x7) == 2)) {
+ /*
+ * This is a interface call
+ * 8b 40 30 mov 0x30(%eax),%eax
+ * ff 10 call *(%eax)
+ */
+ disp = 0;
+ reg = code [5] & 0x07;
}
+ else
+ return NULL;
*displacement = disp;
return regs [reg];
diff --git a/mono/mini/mini.c b/mono/mini/mini.c
index 8c2ebf1..e5f9262 100644
--- a/mono/mini/mini.c
+++ b/mono/mini/mini.c
@@ -1413,11 +1413,7 @@ mono_allocate_stack_slots_full2 (MonoCompile *cfg, gboolean backward, guint32 *s
nvtypes ++;
}
break;
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_ARRAY:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_STRING:
+
case MONO_TYPE_PTR:
case MONO_TYPE_I:
case MONO_TYPE_U:
@@ -1425,10 +1421,23 @@ mono_allocate_stack_slots_full2 (MonoCompile *cfg, gboolean backward, guint32 *s
case MONO_TYPE_I4:
#else
case MONO_TYPE_I8:
+#endif
+#ifdef HAVE_SGEN_GC
+ slot_info = &scalar_stack_slots [MONO_TYPE_I];
+ break;
+#else
+ /* Fall through */
+#endif
+
+ case MONO_TYPE_CLASS:
+ case MONO_TYPE_OBJECT:
+ case MONO_TYPE_ARRAY:
+ case MONO_TYPE_SZARRAY:
+ case MONO_TYPE_STRING:
/* Share non-float stack slots of the same size */
slot_info = &scalar_stack_slots [MONO_TYPE_CLASS];
break;
-#endif
+
default:
slot_info = &scalar_stack_slots [t->type];
}
@@ -1677,11 +1686,7 @@ mono_allocate_stack_slots_full (MonoCompile *cfg, gboolean backward, guint32 *st
nvtypes ++;
}
break;
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_ARRAY:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_STRING:
+
case MONO_TYPE_PTR:
case MONO_TYPE_I:
case MONO_TYPE_U:
@@ -1690,9 +1695,22 @@ mono_allocate_stack_slots_full (MonoCompile *cfg, gboolean backward, guint32 *st
#else
case MONO_TYPE_I8:
#endif
+#ifdef HAVE_SGEN_GC
+ slot_info = &scalar_stack_slots [MONO_TYPE_I];
+ break;
+#else
+ /* Fall through */
+#endif
+
+ case MONO_TYPE_CLASS:
+ case MONO_TYPE_OBJECT:
+ case MONO_TYPE_ARRAY:
+ case MONO_TYPE_SZARRAY:
+ case MONO_TYPE_STRING:
/* Share non-float stack slots of the same size */
slot_info = &scalar_stack_slots [MONO_TYPE_CLASS];
break;
+
default:
slot_info = &scalar_stack_slots [t->type];
}
@@ -3583,9 +3601,9 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
gi->this_reg = inst->dreg;
} else {
g_assert (inst->opcode == OP_REGOFFSET);
-#ifdef __i386__
+#ifdef TARGET_X86
g_assert (inst->inst_basereg == X86_EBP);
-#elif defined(__x86_64__)
+#elif defined(TARGET_AMD64)
g_assert (inst->inst_basereg == X86_EBP || inst->inst_basereg == X86_ESP);
#endif
g_assert (inst->inst_offset >= G_MININT32 && inst->inst_offset <= G_MAXINT32);
@@ -5275,7 +5293,7 @@ mini_init (const char *filename, const char *runtime_version)
#endif
mono_profiler_runtime_initialized ();
-
+
MONO_PROBE_VES_INIT_END ();
return domain;
diff --git a/mono/mini/mini.h b/mono/mini/mini.h
index 6679a87..50ce6b7 100644
--- a/mono/mini/mini.h
+++ b/mono/mini/mini.h
@@ -1271,6 +1271,7 @@ gpointer mono_aot_get_lazy_fetch_trampoline (guint32 slot) MONO_INTERNAL;
void mono_aot_register_globals (gpointer *globals);
/* This too */
void mono_aot_register_module (gpointer *aot_info);
+guint mono_aot_str_hash (gconstpointer v1) MONO_INTERNAL;
void mono_xdebug_init (void) MONO_INTERNAL;
void mono_save_xdebug_info (MonoMethod *method, guint8 *code, guint32 code_size, MonoInst **args, GSList *unwind_info) MONO_INTERNAL;
diff --git a/mono/mini/unwind.c b/mono/mini/unwind.c
index 0cd932b..5db3c89 100644
--- a/mono/mini/unwind.c
+++ b/mono/mini/unwind.c
@@ -10,7 +10,7 @@
#include "mini.h"
#include "unwind.h"
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
static int map_hw_reg_to_dwarf_reg [] = { 0, 2, 1, 3, 7, 6, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
#endif
@@ -22,7 +22,7 @@ static int map_hw_reg_to_dwarf_reg [] = { 0, 2, 1, 3, 7, 6, 4, 5, 8, 9, 10, 11,
int
mono_hw_reg_to_dwarf_reg (int reg)
{
-#ifdef __x86_64__
+#ifdef TARGET_AMD64
return map_hw_reg_to_dwarf_reg [reg];
#else
g_assert_not_reached ();
diff --git a/mono/monograph/Makefile.in b/mono/monograph/Makefile.in
index 943c4bb..9073624 100644
--- a/mono/monograph/Makefile.in
+++ b/mono/monograph/Makefile.in
@@ -75,8 +75,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/os/ChangeLog b/mono/os/ChangeLog
index b417824..9d14fbd 100644
--- a/mono/os/ChangeLog
+++ b/mono/os/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-29 Zoltan Varga <vargaz at gmail.com>
+
+ * gc_wrapper.h: Disable thread-local alloc for arm too.
+
2008-01-05 Zoltan Varga <vargaz at gmail.com>
* gc_wrapper.h: Move the REGISTER/UNREGISTER macros to metadata/gc-internal.h.
diff --git a/mono/os/Makefile.in b/mono/os/Makefile.in
index 3bbac1d..ddf9a06 100644
--- a/mono/os/Makefile.in
+++ b/mono/os/Makefile.in
@@ -55,8 +55,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/os/gc_wrapper.h b/mono/os/gc_wrapper.h
index 3d9d1ff..8013008 100644
--- a/mono/os/gc_wrapper.h
+++ b/mono/os/gc_wrapper.h
@@ -24,7 +24,11 @@
# if defined(HAVE_KW_THREAD) && defined(USE_INCLUDED_LIBGC) && !defined(__powerpc__)
/* The local alloc stuff is in pthread_support.c, but solaris uses solaris_threads.c */
/* It is also disabled on solaris/x86 by libgc/configure.in */
-# if !defined(__sparc__) && !defined(__sun)
+ /*
+ * ARM has no definition for some atomic functions in gc_locks.h and
+ * support is also disabled in libgc/configure.in.
+ */
+# if !defined(__sparc__) && !defined(__sun) && !defined(__arm__)
# define GC_REDIRECT_TO_LOCAL
# endif
# endif
diff --git a/mono/profiler/ChangeLog b/mono/profiler/ChangeLog
index bbd0138..ed0d387 100644
--- a/mono/profiler/ChangeLog
+++ b/mono/profiler/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-16 Massimiliano Mantione <massi at ximian.com>
+ * mono-profiler-logging.c: Backport from trunk, make it like r129416:
+ - When checking if an elf file is valid, avoid mapping it in memory
+ until we know it's usable (avoids virtual memory fragmentation issues).
+ - Correctly handle duplicated entries in /proc/self/maps.
+
2009-01-18 Massimiliano Mantione <massi at ximian.com>
* mono-profiler-logging.c: Bug fixing.
- profiler_executable_memory_region_destroy: fixed a cut&paste mistake
diff --git a/mono/profiler/Makefile.in b/mono/profiler/Makefile.in
index 41919e5..bc34d8d 100644
--- a/mono/profiler/Makefile.in
+++ b/mono/profiler/Makefile.in
@@ -105,8 +105,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/profiler/mono-profiler-logging.c b/mono/profiler/mono-profiler-logging.c
index 414adcd..d507f42 100644
--- a/mono/profiler/mono-profiler-logging.c
+++ b/mono/profiler/mono-profiler-logging.c
@@ -1,3 +1,11 @@
+/*
+ * mono-profiler-logging.c: Logging profiler for Mono.
+ *
+ * Author:
+ * Massimiliano Mantione (massi at ximian.com)
+ *
+ * Copyright 2008-2009 Novell, Inc (http://www.novell.com)
+ */
#include <config.h>
#include <mono/metadata/profiler.h>
#include <mono/metadata/class.h>
@@ -2658,19 +2666,35 @@ append_region (ProfilerExecutableMemoryRegions *regions, gpointer *start, gpoint
regions->next_id ++;
}
+static gboolean
+regions_are_equivalent (ProfilerExecutableMemoryRegionData *region1, ProfilerExecutableMemoryRegionData *region2) {
+ if ((region1->start == region2->start) &&
+ (region1->end == region2->end) &&
+ (region1->file_offset == region2->file_offset) &&
+ ! strcmp (region1->file_name, region2->file_name)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+static int
+compare_regions (const void *a1, const void *a2) {
+ ProfilerExecutableMemoryRegionData *r1 = * (ProfilerExecutableMemoryRegionData**) a1;
+ ProfilerExecutableMemoryRegionData *r2 = * (ProfilerExecutableMemoryRegionData**) a2;
+ return (r1->start < r2->start)? -1 : ((r1->start > r2->start)? 1 : 0);
+}
+
static void
restore_old_regions (ProfilerExecutableMemoryRegions *old_regions, ProfilerExecutableMemoryRegions *new_regions) {
int old_i;
int new_i;
- for (old_i = 0; old_i < old_regions->regions_count; old_i++) {
- ProfilerExecutableMemoryRegionData *old_region = old_regions->regions [old_i];
- for (new_i = 0; new_i < new_regions->regions_count; new_i++) {
- ProfilerExecutableMemoryRegionData *new_region = new_regions->regions [new_i];
- if ((old_region->start == new_region->start) &&
- (old_region->end == new_region->end) &&
- (old_region->file_offset == new_region->file_offset) &&
- ! strcmp (old_region->file_name, new_region->file_name)) {
+ for (new_i = 0; new_i < new_regions->regions_count; new_i++) {
+ ProfilerExecutableMemoryRegionData *new_region = new_regions->regions [new_i];
+ for (old_i = 0; old_i < old_regions->regions_count; old_i++) {
+ ProfilerExecutableMemoryRegionData *old_region = old_regions->regions [old_i];
+ if ( regions_are_equivalent (old_region, new_region)) {
new_regions->regions [new_i] = old_region;
old_regions->regions [old_i] = new_region;
@@ -2681,16 +2705,49 @@ restore_old_regions (ProfilerExecutableMemoryRegions *old_regions, ProfilerExecu
}
}
-static int
-compare_regions (const void *a1, const void *a2) {
- ProfilerExecutableMemoryRegionData *r1 = * (ProfilerExecutableMemoryRegionData**) a1;
- ProfilerExecutableMemoryRegionData *r2 = * (ProfilerExecutableMemoryRegionData**) a2;
- return (r1->start < r2->start)? -1 : ((r1->start > r2->start)? 1 : 0);
+static void
+sort_regions (ProfilerExecutableMemoryRegions *regions) {
+ if (regions->regions_count > 1) {
+ int i;
+
+ qsort (regions->regions, regions->regions_count, sizeof (ProfilerExecutableMemoryRegionData *), compare_regions);
+
+ i = 1;
+ while (i < regions->regions_count) {
+ ProfilerExecutableMemoryRegionData *current_region = regions->regions [i];
+ ProfilerExecutableMemoryRegionData *previous_region = regions->regions [i - 1];
+
+ if (regions_are_equivalent (previous_region, current_region)) {
+ int j;
+
+ if (! current_region->is_new) {
+ profiler_executable_memory_region_destroy (previous_region);
+ regions->regions [i - 1] = current_region;
+ } else {
+ profiler_executable_memory_region_destroy (current_region);
+ }
+
+ for (j = i + 1; j < regions->regions_count; j++) {
+ regions->regions [j - 1] = regions->regions [j];
+ }
+
+ regions->regions_count --;
+ } else {
+ i++;
+ }
+ }
+ }
}
static void
-sort_regions (ProfilerExecutableMemoryRegions *regions) {
- qsort (regions->regions, regions->regions_count, sizeof (ProfilerExecutableMemoryRegionData *), compare_regions);
+fix_region_references (ProfilerExecutableMemoryRegions *regions) {
+ int i;
+ for (i = 0; i < regions->regions_count; i++) {
+ ProfilerExecutableMemoryRegionData *region = regions->regions [i];
+ if (region->file_region_reference != NULL) {
+ region->file_region_reference->region = region;
+ }
+ }
}
static void
@@ -2712,6 +2769,62 @@ executable_file_add_region_reference (ProfilerExecutableFile *file, ProfilerExec
}
}
+static gboolean check_elf_header (ElfHeader* header) {
+ guint16 test = 0x0102;
+
+ if ((header->e_ident [EI_MAG0] != 0x7f) || (header->e_ident [EI_MAG1] != 'E') ||
+ (header->e_ident [EI_MAG2] != 'L') || (header->e_ident [EI_MAG3] != 'F')) {
+ return FALSE;
+ }
+
+ if (sizeof (gsize) == 4) {
+ if (header->e_ident [EI_CLASS] != ELF_CLASS_32) {
+ g_warning ("Class is not ELF_CLASS_32 with gsize size %d", (int) sizeof (gsize));
+ return FALSE;
+ }
+ } else if (sizeof (gsize) == 8) {
+ if (header->e_ident [EI_CLASS] != ELF_CLASS_64) {
+ g_warning ("Class is not ELF_CLASS_64 with gsize size %d", (int) sizeof (gsize));
+ return FALSE;
+ }
+ } else {
+ g_warning ("Absurd gsize size %d", (int) sizeof (gsize));
+ return FALSE;
+ }
+
+ if ((*(guint8*)(&test)) == 0x01) {
+ if (header->e_ident [EI_DATA] != ELF_DATA_MSB) {
+ g_warning ("Data is not ELF_DATA_MSB with first test byte 0x01");
+ return FALSE;
+ }
+ } else if ((*(guint8*)(&test)) == 0x02) {
+ if (header->e_ident [EI_DATA] != ELF_DATA_LSB) {
+ g_warning ("Data is not ELF_DATA_LSB with first test byte 0x02");
+ return FALSE;
+ }
+ } else {
+ g_warning ("Absurd test byte value");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean check_elf_file (int fd) {
+ void *header = malloc (sizeof (ElfHeader));
+ ssize_t read_result = read (fd, header, sizeof (ElfHeader));
+ gboolean result;
+
+ if (read_result != sizeof (ElfHeader)) {
+ result = FALSE;
+ } else {
+ result = check_elf_header ((ElfHeader*) header);
+ }
+
+ free (header);
+ return result;
+}
+
static ProfilerExecutableFile*
executable_file_open (ProfilerExecutableMemoryRegionData *region) {
ProfilerExecutableFiles *files = & (profiler->executable_files);
@@ -2721,7 +2834,6 @@ executable_file_open (ProfilerExecutableMemoryRegionData *region) {
file = (ProfilerExecutableFile*) g_hash_table_lookup (files->table, region->file_name);
if (file == NULL) {
- guint16 test = 0x0102;
struct stat stat_buffer;
int symtab_index = 0;
int strtab_index = 0;
@@ -2747,6 +2859,8 @@ executable_file_open (ProfilerExecutableMemoryRegionData *region) {
if (fstat (file->fd, &stat_buffer) != 0) {
//g_warning ("Cannot stat file '%s': '%s'", region->file_name, strerror (errno));
return file;
+ } else if (! check_elf_file (file->fd)) {
+ return file;
} else {
size_t region_length = ((guint8*)region->end) - ((guint8*)region->start);
file->length = stat_buffer.st_size;
@@ -2768,46 +2882,10 @@ executable_file_open (ProfilerExecutableMemoryRegionData *region) {
}
}
+ /* OK, this is a usable elf file, and we mmapped it... */
header = (ElfHeader*) file->data;
-
- if ((header->e_ident [EI_MAG0] != 0x7f) || (header->e_ident [EI_MAG1] != 'E') ||
- (header->e_ident [EI_MAG2] != 'L') || (header->e_ident [EI_MAG3] != 'F')) {
- return file;
- }
-
- if (sizeof (gsize) == 4) {
- if (header->e_ident [EI_CLASS] != ELF_CLASS_32) {
- g_warning ("Class is not ELF_CLASS_32 with gsize size %d", (int) sizeof (gsize));
- return file;
- }
- } else if (sizeof (gsize) == 8) {
- if (header->e_ident [EI_CLASS] != ELF_CLASS_64) {
- g_warning ("Class is not ELF_CLASS_64 with gsize size %d", (int) sizeof (gsize));
- return file;
- }
- } else {
- g_warning ("Absurd gsize size %d", (int) sizeof (gsize));
- return file;
- }
-
- if ((*(guint8*)(&test)) == 0x01) {
- if (header->e_ident [EI_DATA] != ELF_DATA_MSB) {
- g_warning ("Data is not ELF_DATA_MSB with first test byte 0x01");
- return file;
- }
- } else if ((*(guint8*)(&test)) == 0x02) {
- if (header->e_ident [EI_DATA] != ELF_DATA_LSB) {
- g_warning ("Data is not ELF_DATA_LSB with first test byte 0x02");
- return file;
- }
- } else {
- g_warning ("Absurd test byte value");
- return file;
- }
-
- /* OK, this is a usable elf file... */
file->header = header;
- section_headers = file->data + header->e_shoff;
+ section_headers = file->data + file->header->e_shoff;
file->main_string_table = ((const char*) file->data) + (((ElfSection*) (section_headers + (header->e_shentsize * header->e_shstrndx)))->sh_offset);
for (section_index = 0; section_index < header->e_shnum; section_index ++) {
@@ -3287,8 +3365,9 @@ refresh_memory_regions (void) {
LOG_WRITER_THREAD ("Refreshing memory regions...");
scan_process_regions (new_regions);
- restore_old_regions (old_regions, new_regions);
sort_regions (new_regions);
+ restore_old_regions (old_regions, new_regions);
+ fix_region_references (new_regions);
LOG_WRITER_THREAD ("Refreshed memory regions.");
LOG_WRITER_THREAD ("Building symbol tables...");
diff --git a/mono/tests/ChangeLog b/mono/tests/ChangeLog
index 61e7a4a..64dde1b 100644
--- a/mono/tests/ChangeLog
+++ b/mono/tests/ChangeLog
@@ -1,3 +1,23 @@
+2009-06-01 Rodrigo Kumpera <rkumpera at novell.com>
+
+ * bug-508538.cs: New regression test.
+
+2009-03-26 Zoltan Varga <vargaz at gmail.com>
+
+ * pinvoke2.cs: Add a test for #488670.
+
+2009-03-23 Zoltan Varga <vargaz at gmail.com>
+
+ * pinvoke-2.2.cs libtest.c: Add a test for #487758.
+
+2009-03-15 Steven Munroe <munroesj at us.ibm.com>
+
+ Backport of r129461.
+
+ This patch is contributed under the terms of the MIT/X11 license
+
+ * Makefile.am (test_platform): Enable testbundle for ppc.
+
2009-03-09 Mark Probst <mark.probst at gmail.com>
* bug-479763.2.cs: New test.
diff --git a/mono/tests/Makefile.am b/mono/tests/Makefile.am
index 7caeb89..a7f40c1 100644
--- a/mono/tests/Makefile.am
+++ b/mono/tests/Makefile.am
@@ -345,6 +345,7 @@ BASE_TEST_CS_SRC= \
generic-unloading-sub.2.cs \
bug-467456.cs \
appdomain-unload-callback.cs \
+ bug-508538.cs \
bug-472692.2.cs
if AMD64
@@ -471,7 +472,7 @@ EXTRA_DIST=test-driver $(TEST_CS_SRC) $(TEST_IL_SRC) \
# mkbundle works on ppc, but the pkg-config POC doesn't when run with make test
if POWERPC
-test_platform:
+test_platform: testbundle
else
# Can't use mkbundle on win32 since there is no static build there
# Can't run test-unhandled-exception on Windows because of all the debug popups...
diff --git a/mono/tests/Makefile.in b/mono/tests/Makefile.in
index b401f84..0c8d79b 100644
--- a/mono/tests/Makefile.in
+++ b/mono/tests/Makefile.in
@@ -90,8 +90,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
@@ -594,6 +592,7 @@ BASE_TEST_CS_SRC = \
generic-unloading-sub.2.cs \
bug-467456.cs \
appdomain-unload-callback.cs \
+ bug-508538.cs \
bug-472692.2.cs
@AMD64_FALSE@@X86_FALSE at TEST_CS_SRC = $(BASE_TEST_CS_SRC) \
@@ -1103,7 +1102,7 @@ aotcheck: testaot gshared-aot
$(MCS) -r:TestDriver.dll -out:$@ $<
# mkbundle works on ppc, but the pkg-config POC doesn't when run with make test
- at POWERPC_TRUE@test_platform:
+ at POWERPC_TRUE@test_platform: testbundle
# Can't use mkbundle on win32 since there is no static build there
# Can't run test-unhandled-exception on Windows because of all the debug popups...
@PLATFORM_WIN32_TRUE@@POWERPC_FALSE at test_platform:
diff --git a/mono/tests/assemblyresolve/Makefile.in b/mono/tests/assemblyresolve/Makefile.in
index a7aba01..0419049 100644
--- a/mono/tests/assemblyresolve/Makefile.in
+++ b/mono/tests/assemblyresolve/Makefile.in
@@ -55,8 +55,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/tests/bug-508538.cs b/mono/tests/bug-508538.cs
new file mode 100644
index 0000000..f9a7b69
--- /dev/null
+++ b/mono/tests/bug-508538.cs
@@ -0,0 +1,30 @@
+
+using System;
+using System.Reflection;
+
+public class HostExpression {}
+public class OMetaStream<T> {}
+public class OMetaList<T> {}
+
+public class OMetaParser {
+ public virtual bool NameFirst (OMetaStream<char> inputStream, out object result) {
+ result = null;
+ Console.WriteLine ("ok");
+ return true;
+ }
+
+}
+
+public class Driver {
+
+ static int Main () {
+ var f = new OMetaParser ();
+ var m = typeof (OMetaParser).GetMethod ("NameFirst");
+
+ var arg0 = new OMetaStream<char> ();
+ var arg1 = new OMetaList<HostExpression> ();
+
+ bool res = (bool)m.Invoke (f, new object[] { arg0, arg1 });
+ return res ? 0 : 1;
+ }
+}
diff --git a/mono/tests/cas/Makefile.in b/mono/tests/cas/Makefile.in
index 620c392..2247747 100644
--- a/mono/tests/cas/Makefile.in
+++ b/mono/tests/cas/Makefile.in
@@ -67,8 +67,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/tests/cas/assembly/Makefile.in b/mono/tests/cas/assembly/Makefile.in
index 9922066..d9dd05f 100644
--- a/mono/tests/cas/assembly/Makefile.in
+++ b/mono/tests/cas/assembly/Makefile.in
@@ -56,8 +56,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/tests/cas/demand/Makefile.in b/mono/tests/cas/demand/Makefile.in
index 88ed92d..9ad1840 100644
--- a/mono/tests/cas/demand/Makefile.in
+++ b/mono/tests/cas/demand/Makefile.in
@@ -56,8 +56,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/tests/cas/inheritance/Makefile.in b/mono/tests/cas/inheritance/Makefile.in
index 480264d..f72f72e 100644
--- a/mono/tests/cas/inheritance/Makefile.in
+++ b/mono/tests/cas/inheritance/Makefile.in
@@ -56,8 +56,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/tests/cas/linkdemand/Makefile.in b/mono/tests/cas/linkdemand/Makefile.in
index 2df0053..df38166 100644
--- a/mono/tests/cas/linkdemand/Makefile.in
+++ b/mono/tests/cas/linkdemand/Makefile.in
@@ -56,8 +56,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/tests/cas/threads/Makefile.in b/mono/tests/cas/threads/Makefile.in
index c25f750..22922f8 100644
--- a/mono/tests/cas/threads/Makefile.in
+++ b/mono/tests/cas/threads/Makefile.in
@@ -56,8 +56,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/mono/tests/libtest.c b/mono/tests/libtest.c
index 3fd22de..d481d55 100644
--- a/mono/tests/libtest.c
+++ b/mono/tests/libtest.c
@@ -256,6 +256,12 @@ mono_invoke_delegate (SimpleDelegate3 delegate)
return res;
}
+LIBTEST_API int STDCALL
+mono_invoke_simple_delegate (SimpleDelegate d)
+{
+ return d (4);
+}
+
LIBTEST_API int STDCALL
mono_test_marshal_char (short a1)
{
diff --git a/mono/tests/pinvoke-2.2.cs b/mono/tests/pinvoke-2.2.cs
index 039bcda..5b3081e 100644
--- a/mono/tests/pinvoke-2.2.cs
+++ b/mono/tests/pinvoke-2.2.cs
@@ -23,7 +23,7 @@ public class Tests {
return i + j;
}
- static int test_0_marshal_cdecl_delegate () {
+ public static int test_0_marshal_cdecl_delegate () {
CdeclDelegate d = new CdeclDelegate (cdecl_delegate);
return mono_test_marshal_cdecl_delegate (d);
@@ -34,11 +34,35 @@ public class Tests {
delegate int AddDelegate (int i, int j);
- static int test_4_get_delegate_for_function_pointer () {
+ public static int test_4_get_delegate_for_function_pointer () {
IntPtr ptr = mono_test_marshal_return_fnptr ();
AddDelegate d = (AddDelegate)Marshal.GetDelegateForFunctionPointer (ptr, typeof (AddDelegate));
return d (2, 2);
}
+
+ [DllImport ("libtest")]
+ public static extern int mono_return_int (int i);
+
+ [DllImport ("libtest", EntryPoint="not_found")]
+ public static extern int not_found (int i);
+
+ public delegate int SimpleDelegate (int i);
+
+ [DllImport ("libtest")]
+ public static extern int mono_invoke_simple_delegate (SimpleDelegate d);
+
+ public static int test_4_native_function_to_ftnptr () {
+ return mono_invoke_simple_delegate (mono_return_int);
+ }
+
+ public static int test_0_native_function_to_ftnptr_not_found () {
+ try {
+ return mono_invoke_simple_delegate (not_found);
+ } catch (EntryPointNotFoundException) {
+ return 0;
+ }
+ }
+
}
diff --git a/mono/tests/pinvoke2.cs b/mono/tests/pinvoke2.cs
index de7dd4e..f4f33c2 100644
--- a/mono/tests/pinvoke2.cs
+++ b/mono/tests/pinvoke2.cs
@@ -1454,5 +1454,21 @@ public class Tests {
return 1;
}
+
+ /*
+ * Marshalling of type 'object'
+ */
+
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_class")]
+ public static extern SimpleClass mono_test_marshal_object (int i, int j, int k, object ss, int l);
+
+ public static int test_0_marshal_object () {
+ try {
+ mono_test_marshal_object (0, 0, 0, null, 0);
+ return 1;
+ } catch (Exception) {
+ return 0;
+ }
+ }
}
diff --git a/mono/utils/Makefile.in b/mono/utils/Makefile.in
index 1a60c6f..e62a030 100644
--- a/mono/utils/Makefile.in
+++ b/mono/utils/Makefile.in
@@ -101,8 +101,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/msvc/Makefile.in b/msvc/Makefile.in
index d2a12b3..233c726 100644
--- a/msvc/Makefile.in
+++ b/msvc/Makefile.in
@@ -56,8 +56,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/po/Makefile.in b/po/Makefile.in
index d399256..c3a0d1a 100644
--- a/po/Makefile.in
+++ b/po/Makefile.in
@@ -67,8 +67,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo
index 0af84b5..1bf85cd 100644
Binary files a/po/mcs/de.gmo and b/po/mcs/de.gmo differ
diff --git a/po/mcs/de.po b/po/mcs/de.po
index 7d9bf37..82257a6 100644
--- a/po/mcs/de.po
+++ b/po/mcs/de.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
-"POT-Creation-Date: 2009-03-13 14:51+0000\n"
+"POT-Creation-Date: 2009-07-27 16:32+0000\n"
"PO-Revision-Date: 2008-09-26 15:14+0100\n"
"Last-Translator: Daniel Nauck <dna at mono-project.de>\n"
"Language-Team: http://www.mono-project.de\n"
@@ -570,115 +570,115 @@ msgstr ""
msgid "Static class `{0}' cannot implement interfaces"
msgstr ""
-#: ../mcs/mcs/class.cs:3040
+#: ../mcs/mcs/class.cs:3050
#, csharp-format
msgid "`{0}': Structs cannot have instance field initializers"
msgstr "`{0}': Instanzfeldinitialisierungen können nicht in Strukturen sein"
-#: ../mcs/mcs/class.cs:3348
+#: ../mcs/mcs/class.cs:3358
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not an event"
msgstr ""
-#: ../mcs/mcs/class.cs:3350
+#: ../mcs/mcs/class.cs:3360
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not a property"
msgstr ""
-#: ../mcs/mcs/class.cs:3352
+#: ../mcs/mcs/class.cs:3362
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not a method"
msgstr ""
-#: ../mcs/mcs/class.cs:3354
+#: ../mcs/mcs/class.cs:3364
#, csharp-format
msgid "`{0}' is marked as an override but no suitable {1} found to override"
msgstr ""
-#: ../mcs/mcs/class.cs:3400
+#: ../mcs/mcs/class.cs:3410
#, csharp-format
msgid ""
"`{0}': cannot override inherited member `{1}' because it is not marked "
"virtual, abstract or override"
msgstr ""
-#: ../mcs/mcs/class.cs:3409
+#: ../mcs/mcs/class.cs:3419
#, csharp-format
msgid "`{0}': cannot override inherited member `{1}' because it is sealed"
msgstr ""
-#: ../mcs/mcs/class.cs:3427
+#: ../mcs/mcs/class.cs:3437
#, csharp-format
msgid "`{0}': type must be `{1}' to match overridden member `{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3431
+#: ../mcs/mcs/class.cs:3441
#, csharp-format
msgid "`{0}': return type must be `{1}' to match overridden member `{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3453
+#: ../mcs/mcs/class.cs:3463
#, csharp-format
msgid "`{0}' hides inherited abstract member `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3519
+#: ../mcs/mcs/class.cs:3529
#, csharp-format
msgid "A partial method `{0}' cannot explicitly implement an interface"
msgstr ""
-#: ../mcs/mcs/class.cs:3527
+#: ../mcs/mcs/class.cs:3537
#, csharp-format
msgid "The type `{0}' in explicit interface declaration is not an interface"
msgstr ""
-#: ../mcs/mcs/class.cs:3556
+#: ../mcs/mcs/class.cs:3566
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
"indexer `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3560
+#: ../mcs/mcs/class.cs:3570
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
"operator `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3564
+#: ../mcs/mcs/class.cs:3574
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
"method `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3577
+#: ../mcs/mcs/class.cs:3587
#, csharp-format
msgid ""
"`{0}' is marked as an external but has no DllImport attribute. Consider "
"adding a DllImport attribute to specify the external implementation"
msgstr ""
-#: ../mcs/mcs/class.cs:3611
+#: ../mcs/mcs/class.cs:3621
#, csharp-format
msgid ""
"`{0}': cannot change access modifiers when overriding `{1}' inherited member "
"`{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3715
+#: ../mcs/mcs/class.cs:3725
msgid ""
"The DllImport attribute must be specified on a method marked `static' and "
"`extern'"
msgstr ""
-#: ../mcs/mcs/class.cs:3822
+#: ../mcs/mcs/class.cs:3832
#, csharp-format
msgid "`{0}': A partial method parameters cannot use `out' modifier"
msgstr ""
-#: ../mcs/mcs/class.cs:3870
+#: ../mcs/mcs/class.cs:3880
#, csharp-format
msgid ""
"Conditional not valid on `{0}' because it is a constructor, destructor, "
@@ -687,50 +687,50 @@ msgstr ""
"Das Conditional-Attribut ist für `{0}' ungültig, weil dies ein Konstruktor, "
"Destruktor, Operator oder eine explizite Schnittstellenimplementierung ist"
-#: ../mcs/mcs/class.cs:4084
+#: ../mcs/mcs/class.cs:4094
#, csharp-format
msgid "Program `{0}' has more than one entry point defined: `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4115
+#: ../mcs/mcs/class.cs:4125
#, csharp-format
msgid "Conditional not valid on `{0}' because its return type is not void"
msgstr ""
"Das Conditional-Attribut ist für `{0}' ungültig, da der Rückgabetyp nicht "
"leer ist"
-#: ../mcs/mcs/class.cs:4120
+#: ../mcs/mcs/class.cs:4130
#, csharp-format
msgid "Conditional not valid on `{0}' because it is an override method"
msgstr ""
"Das Conditional-Attribut ist für `{0}' ungültig, da es eine überschriebene "
"Funktion ist"
-#: ../mcs/mcs/class.cs:4125
+#: ../mcs/mcs/class.cs:4135
msgid "Conditional not valid on interface members"
msgstr "Das Conditional-Attribut ist für Schnittstellenmember ungültig"
-#: ../mcs/mcs/class.cs:4131
+#: ../mcs/mcs/class.cs:4141
#, csharp-format
msgid "Conditional member `{0}' cannot implement interface member `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4138
+#: ../mcs/mcs/class.cs:4148
#, csharp-format
msgid "Conditional method `{0}' cannot have an out parameter"
msgstr ""
-#: ../mcs/mcs/class.cs:4184
+#: ../mcs/mcs/class.cs:4194
#, csharp-format
msgid "Do not override `{0}'. Use destructor syntax instead"
msgstr ""
-#: ../mcs/mcs/class.cs:4221
+#: ../mcs/mcs/class.cs:4231
#, csharp-format
msgid "`{0}': Extension methods cannot be defined in a nested class"
msgstr ""
-#: ../mcs/mcs/class.cs:4226
+#: ../mcs/mcs/class.cs:4236
#, csharp-format
msgid ""
"`{0}': Extension methods cannot be declared without a reference to System."
@@ -738,319 +738,319 @@ msgid ""
"the first parameter"
msgstr ""
-#: ../mcs/mcs/class.cs:4240
+#: ../mcs/mcs/class.cs:4250
#, csharp-format
msgid "`{0}': Extension methods must be defined in a non-generic static class"
msgstr ""
"`{0}': Erweiterungsmethoden müssen in einer nicht generischen statischen "
"Klasse definiert werden"
-#: ../mcs/mcs/class.cs:4296
+#: ../mcs/mcs/class.cs:4306
#, csharp-format
msgid ""
"A partial method `{0}' implementation is missing a partial method declaration"
msgstr ""
-#: ../mcs/mcs/class.cs:4327
+#: ../mcs/mcs/class.cs:4337
#, csharp-format
msgid "Method or delegate cannot return type `{0}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4412
+#: ../mcs/mcs/class.cs:4422
#, csharp-format
msgid "`{0}': Struct constructors cannot call base constructors"
msgstr ""
-#: ../mcs/mcs/class.cs:4445
+#: ../mcs/mcs/class.cs:4455
#, csharp-format
msgid "Constructor `{0}' cannot call itself"
msgstr ""
-#: ../mcs/mcs/class.cs:4570
+#: ../mcs/mcs/class.cs:4580
#, csharp-format
msgid "`{0}': The static constructor must be parameterless"
msgstr ""
-#: ../mcs/mcs/class.cs:4590
+#: ../mcs/mcs/class.cs:4600
msgid "Structs cannot contain explicit parameterless constructors"
msgstr ""
-#: ../mcs/mcs/class.cs:4642
+#: ../mcs/mcs/class.cs:4652
#, csharp-format
msgid ""
"`{0}': A class with the ComImport attribute cannot have a user-defined "
"constructor"
msgstr ""
-#: ../mcs/mcs/class.cs:4933
+#: ../mcs/mcs/class.cs:4943
#, csharp-format
msgid "`{0}' is an accessor not found in interface member `{1}{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4939
+#: ../mcs/mcs/class.cs:4949
#, csharp-format
msgid ""
"`{0}.{1}' in explicit interface declaration is not a member of interface"
msgstr ""
-#: ../mcs/mcs/class.cs:4946
+#: ../mcs/mcs/class.cs:4956
#, csharp-format
msgid ""
"`{0}' explicit method implementation cannot implement `{1}' because it is an "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:4956
+#: ../mcs/mcs/class.cs:4966
#, csharp-format
msgid "Method `{0}' cannot implement interface accessor `{1}.{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4963
+#: ../mcs/mcs/class.cs:4973
#, csharp-format
msgid ""
"Accessor `{0}' cannot implement interface member `{1}' for type `{2}'. Use "
"an explicit interface implementation"
msgstr ""
-#: ../mcs/mcs/class.cs:4970
+#: ../mcs/mcs/class.cs:4980
#, csharp-format
msgid ""
"Accessor `{0}' must be declared public to implement interface member `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4994
+#: ../mcs/mcs/class.cs:5004
#, csharp-format
msgid ""
"`{0}': the explicit interface implementation cannot introduce the params "
"modifier"
msgstr ""
-#: ../mcs/mcs/class.cs:5280
+#: ../mcs/mcs/class.cs:5290
#, csharp-format
msgid "New virtual member `{0}' is declared in a sealed class `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5295
+#: ../mcs/mcs/class.cs:5305
msgid "Inconsistent accessibility: property type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5300
+#: ../mcs/mcs/class.cs:5310
msgid "Inconsistent accessibility: indexer return type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5306 ../mcs/mcs/class.cs:5311
+#: ../mcs/mcs/class.cs:5316 ../mcs/mcs/class.cs:5321
#: ../mcs/mcs/delegate.cs:220
msgid "Inconsistent accessibility: return type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5316
+#: ../mcs/mcs/class.cs:5326
msgid "Inconsistent accessibility: field type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5326
+#: ../mcs/mcs/class.cs:5336
#, csharp-format
msgid "Field or property cannot be of type `{0}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5384
+#: ../mcs/mcs/class.cs:5394
msgid ""
"The modifier 'abstract' is not valid on fields. Try using a property instead"
msgstr ""
-#: ../mcs/mcs/class.cs:5399
+#: ../mcs/mcs/class.cs:5409
msgid ""
"The FieldOffset attribute can only be placed on members of types marked with "
"the StructLayout(LayoutKind.Explicit)"
msgstr ""
-#: ../mcs/mcs/class.cs:5404
+#: ../mcs/mcs/class.cs:5414
msgid "The FieldOffset attribute is not allowed on static or const fields"
msgstr ""
-#: ../mcs/mcs/class.cs:5411
+#: ../mcs/mcs/class.cs:5421
msgid ""
"Do not use 'System.Runtime.CompilerServices.FixedBuffer' attribute. Use the "
"'fixed' field modifier instead"
msgstr ""
-#: ../mcs/mcs/class.cs:5489
+#: ../mcs/mcs/class.cs:5499
#, csharp-format
msgid ""
"`{0}': Instance field types marked with StructLayout(LayoutKind.Explicit) "
"must have a FieldOffset attribute"
msgstr ""
-#: ../mcs/mcs/class.cs:5498
+#: ../mcs/mcs/class.cs:5508
#, csharp-format
msgid "`{0}': cannot declare variables of static types"
msgstr ""
-#: ../mcs/mcs/class.cs:5613
+#: ../mcs/mcs/class.cs:5623
#, csharp-format
msgid ""
"`{0}': Fixed size buffers type must be one of the following: bool, byte, "
"short, int, long, char, sbyte, ushort, uint, ulong, float or double"
msgstr ""
-#: ../mcs/mcs/class.cs:5640
+#: ../mcs/mcs/class.cs:5650
#, csharp-format
msgid "`{0}': Fixed size buffer fields may only be members of structs"
msgstr ""
-#: ../mcs/mcs/class.cs:5659
+#: ../mcs/mcs/class.cs:5669
#, csharp-format
msgid "`{0}': Fixed size buffers must have a length greater than zero"
msgstr ""
-#: ../mcs/mcs/class.cs:5666
+#: ../mcs/mcs/class.cs:5676
#, csharp-format
msgid ""
"Fixed size buffer `{0}' of length `{1}' and type `{2}' exceeded 2^31 limit"
msgstr ""
-#: ../mcs/mcs/class.cs:5858
+#: ../mcs/mcs/class.cs:5868
#, csharp-format
msgid "Struct member `{0}' of type `{1}' causes a cycle in the struct layout"
msgstr ""
-#: ../mcs/mcs/class.cs:5911
+#: ../mcs/mcs/class.cs:5921
#, csharp-format
msgid "`{0}': A volatile field cannot be of the type `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5916
+#: ../mcs/mcs/class.cs:5926
#, csharp-format
msgid "`{0}': A field cannot be both volatile and readonly"
msgstr ""
-#: ../mcs/mcs/class.cs:6069
+#: ../mcs/mcs/class.cs:6079
#, csharp-format
msgid ""
"Attribute `{0}' is not valid on property or event accessors. It is valid on `"
"{1}' declarations only"
msgstr ""
-#: ../mcs/mcs/class.cs:6169 ../mcs/mcs/decl.cs:2800
+#: ../mcs/mcs/class.cs:6179 ../mcs/mcs/decl.cs:2800
#, csharp-format
msgid "A member `{0}' is already reserved"
msgstr ""
-#: ../mcs/mcs/class.cs:6372
+#: ../mcs/mcs/class.cs:6382
#, csharp-format
msgid "Explicit interface implementation `{0}' is missing accessor `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:6389
+#: ../mcs/mcs/class.cs:6399
#, csharp-format
msgid ""
"`{0}': accessibility modifiers may not be used on accessors in an interface"
msgstr ""
-#: ../mcs/mcs/class.cs:6393
+#: ../mcs/mcs/class.cs:6403
#, csharp-format
msgid "`{0}': abstract properties cannot have private accessors"
msgstr "`{0}': Abstrakte Eigenschaften können keine privaten-Accessoren haben"
-#: ../mcs/mcs/class.cs:6460
+#: ../mcs/mcs/class.cs:6470
#, csharp-format
msgid ""
"The accessibility modifier of the `{0}' accessor must be more restrictive "
"than the modifier of the property or indexer `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:6528
+#: ../mcs/mcs/class.cs:6538
#, csharp-format
msgid ""
"`{0}': Cannot specify accessibility modifiers for both accessors of the "
"property or indexer"
msgstr ""
-#: ../mcs/mcs/class.cs:6536
+#: ../mcs/mcs/class.cs:6546
#, csharp-format
msgid ""
"`{0}': accessibility modifiers on accessors may only be used if the property "
"or indexer has both a get and a set accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6585
+#: ../mcs/mcs/class.cs:6595
#, csharp-format
msgid ""
"`{0}.get': cannot override because `{1}' does not have an overridable get "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6600
+#: ../mcs/mcs/class.cs:6610
#, csharp-format
msgid ""
"`{0}.set': cannot override because `{1}' does not have an overridable set "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6799
+#: ../mcs/mcs/class.cs:6809
#, csharp-format
msgid ""
"Automatically implemented property `{0}' cannot be used inside a type with "
"an explicit StructLayout attribute"
msgstr ""
-#: ../mcs/mcs/class.cs:7153
+#: ../mcs/mcs/class.cs:7163
#, csharp-format
msgid "`{0}': abstract event cannot have an initializer"
msgstr ""
-#: ../mcs/mcs/class.cs:7359
+#: ../mcs/mcs/class.cs:7369
#, csharp-format
msgid "`{0}': event must be of a delegate type"
msgstr ""
-#: ../mcs/mcs/class.cs:7567
+#: ../mcs/mcs/class.cs:7577
msgid ""
"The `IndexerName' attribute is valid only on an indexer that is not an "
"explicit interface member declaration"
msgstr ""
-#: ../mcs/mcs/class.cs:7574
+#: ../mcs/mcs/class.cs:7584
msgid "Cannot set the `IndexerName' attribute on an indexer marked override"
msgstr ""
-#: ../mcs/mcs/class.cs:7771
+#: ../mcs/mcs/class.cs:7781
#, csharp-format
msgid "User-defined operator `{0}' must be declared static and public"
msgstr ""
-#: ../mcs/mcs/class.cs:7801
+#: ../mcs/mcs/class.cs:7811
msgid ""
"User-defined operator cannot take an object of the enclosing type and "
"convert to an object of the enclosing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7812
+#: ../mcs/mcs/class.cs:7822
msgid "User-defined conversion must convert to or from the enclosing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7821
+#: ../mcs/mcs/class.cs:7831
#, csharp-format
msgid ""
"User-defined conversion `{0}' cannot convert to or from an interface type"
msgstr ""
-#: ../mcs/mcs/class.cs:7828
+#: ../mcs/mcs/class.cs:7838
#, csharp-format
msgid "User-defined conversion `{0}' cannot convert to or from a base class"
msgstr ""
-#: ../mcs/mcs/class.cs:7834
+#: ../mcs/mcs/class.cs:7844
#, csharp-format
msgid "User-defined conversion `{0}' cannot convert to or from a derived class"
msgstr ""
-#: ../mcs/mcs/class.cs:7842
+#: ../mcs/mcs/class.cs:7852
msgid ""
"Overloaded shift operator must have the type of the first operand be the "
"containing type, and the type of the second operand must be int"
msgstr ""
-#: ../mcs/mcs/class.cs:7851
+#: ../mcs/mcs/class.cs:7861
msgid ""
"The return type for ++ or -- operator must be the containing type or derived "
"from the containing type"
@@ -1058,19 +1058,19 @@ msgstr ""
"Der Rückgabetyp für die Operatoren ++ und -- muss der enthaltene Typ sein "
"oder vom enthaltenen Typ abgeleitet sein"
-#: ../mcs/mcs/class.cs:7856
+#: ../mcs/mcs/class.cs:7866
msgid "The parameter type for ++ or -- operator must be the containing type"
msgstr "Der Parameter für den ++ oder -- Operator muss der enthaltene Typ sein"
-#: ../mcs/mcs/class.cs:7863
+#: ../mcs/mcs/class.cs:7873
msgid "The parameter type of a unary operator must be the containing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7871
+#: ../mcs/mcs/class.cs:7881
msgid "The return type of operator True or False must be bool"
msgstr ""
-#: ../mcs/mcs/class.cs:7884
+#: ../mcs/mcs/class.cs:7894
msgid "One of the parameters of a binary operator must be the containing type"
msgstr ""
@@ -2051,7 +2051,7 @@ msgstr ""
msgid "Type byte, sbyte, short, ushort, int, uint, long or ulong expected"
msgstr "Typ byte, sbyte, short, ushort, int, uint, long oder ulong erwartet"
-#: ../mcs/mcs/eval.cs:501
+#: ../mcs/mcs/eval.cs:529
msgid "Detection Parsing Error"
msgstr ""
@@ -2199,72 +2199,72 @@ msgstr ""
msgid "Cannot create an instance of the abstract class or interface `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:5761
+#: ../mcs/mcs/expression.cs:5771
msgid "Invalid rank specifier: expected `,' or `]'"
msgstr ""
-#: ../mcs/mcs/expression.cs:5766
+#: ../mcs/mcs/expression.cs:5776
msgid "Cannot create an array with a negative size"
msgstr ""
-#: ../mcs/mcs/expression.cs:5783 ../mcs/mcs/statement.cs:3049
+#: ../mcs/mcs/expression.cs:5793 ../mcs/mcs/statement.cs:3049
msgid "A constant value is expected"
msgstr ""
-#: ../mcs/mcs/expression.cs:5870
+#: ../mcs/mcs/expression.cs:5880
msgid "An expression tree cannot contain a multidimensional array initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:5964
+#: ../mcs/mcs/expression.cs:5974
msgid ""
"Can only use array initializer expressions to assign to array types. Try "
"using a new expression instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:5969
+#: ../mcs/mcs/expression.cs:5979
msgid ""
"An implicitly typed local variable declarator cannot use an array initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:6044
+#: ../mcs/mcs/expression.cs:6054
msgid "New invocation: Can not find a constructor for this argument list"
msgstr ""
-#: ../mcs/mcs/expression.cs:6483
+#: ../mcs/mcs/expression.cs:6493
msgid ""
"The type of an implicitly typed array cannot be inferred from the "
"initializer. Try specifying array type explicitly"
msgstr ""
-#: ../mcs/mcs/expression.cs:6661
+#: ../mcs/mcs/expression.cs:6671
msgid ""
"Anonymous methods inside structs cannot access instance members of `this'. "
"Consider copying `this' to a local variable outside the anonymous method and "
"using the local instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:6728
+#: ../mcs/mcs/expression.cs:6738
msgid "Cannot take the address of `this' because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6730
+#: ../mcs/mcs/expression.cs:6740
msgid "Cannot pass `this' as a ref or out argument because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6732
+#: ../mcs/mcs/expression.cs:6742
msgid "Cannot assign to `this' because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6839
+#: ../mcs/mcs/expression.cs:6849
msgid "An expression tree cannot contain a method with variable arguments"
msgstr ""
-#: ../mcs/mcs/expression.cs:6949
+#: ../mcs/mcs/expression.cs:6959
#, csharp-format
msgid "`{0}': an attribute argument cannot use type parameters"
msgstr ""
-#: ../mcs/mcs/expression.cs:7182
+#: ../mcs/mcs/expression.cs:7192
#, csharp-format
msgid ""
"`{0}' does not have a predefined size, therefore sizeof can only be used in "
@@ -2272,12 +2272,12 @@ msgid ""
"SizeOf)"
msgstr ""
-#: ../mcs/mcs/expression.cs:7237
+#: ../mcs/mcs/expression.cs:7247
#, csharp-format
msgid "Alias `{0}' not found"
msgstr "Alias `{0}' wurde nicht gefunden"
-#: ../mcs/mcs/expression.cs:7248
+#: ../mcs/mcs/expression.cs:7258
#, csharp-format
msgid ""
"Alias `{0}' cannot be used with '::' since it denotes a type. Consider "
@@ -2286,28 +2286,28 @@ msgstr ""
"Der Alias `{0}' kann nicht mit '::' verwendet werden, da der Alias auf einen "
"Typ verweist. Verwenden Sie '.' stattdessen."
-#: ../mcs/mcs/expression.cs:7264
+#: ../mcs/mcs/expression.cs:7274
#, csharp-format
msgid ""
"A namespace alias qualifier `{0}' did not resolve to a namespace or a type"
msgstr ""
-#: ../mcs/mcs/expression.cs:7403
+#: ../mcs/mcs/expression.cs:7413
#, csharp-format
msgid "`{0}': cannot reference a type through an expression; try `{1}' instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:7500
+#: ../mcs/mcs/expression.cs:7510
#, csharp-format
msgid "A nested type cannot be specified through a type parameter `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7568
+#: ../mcs/mcs/expression.cs:7578
#, csharp-format
msgid "The nested type `{0}' does not exist in the type `{1}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7580
+#: ../mcs/mcs/expression.cs:7590
#, csharp-format
msgid ""
"Type `{0}' does not contain a definition for `{1}' and no extension method `"
@@ -2315,100 +2315,100 @@ msgid ""
"assembly reference?)"
msgstr ""
-#: ../mcs/mcs/expression.cs:7798
+#: ../mcs/mcs/expression.cs:7808
msgid "Cannot apply indexing with [] to an expression of type `System.Array'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7904
+#: ../mcs/mcs/expression.cs:7914
#, csharp-format
msgid "Wrong number of indexes `{0}' inside [], expected `{1}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8408
+#: ../mcs/mcs/expression.cs:8418
#, csharp-format
msgid ""
"A property or indexer `{0}' may not be passed as an out or ref parameter"
msgstr ""
-#: ../mcs/mcs/expression.cs:8433
+#: ../mcs/mcs/expression.cs:8443
#, csharp-format
msgid "Cannot apply indexing with [] to an expression of type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8463
+#: ../mcs/mcs/expression.cs:8473
#, csharp-format
msgid "The read only property or indexer `{0}' cannot be assigned to"
msgstr ""
-#: ../mcs/mcs/expression.cs:8471
+#: ../mcs/mcs/expression.cs:8481
#, csharp-format
msgid ""
"The property or indexer `{0}' cannot be used in this context because it "
"lacks a `{1}' accessor"
msgstr ""
-#: ../mcs/mcs/expression.cs:8493
+#: ../mcs/mcs/expression.cs:8503
#, csharp-format
msgid ""
"The property or indexer `{0}' cannot be used in this context because a `{1}' "
"accessor is inaccessible"
msgstr ""
-#: ../mcs/mcs/expression.cs:8956
+#: ../mcs/mcs/expression.cs:8966
#, csharp-format
msgid "Array elements cannot be of type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8962
+#: ../mcs/mcs/expression.cs:8972
#, csharp-format
msgid "Array elements cannot be of static type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:9121
+#: ../mcs/mcs/expression.cs:9131
msgid "Cannot use a negative size with stackalloc"
msgstr ""
-#: ../mcs/mcs/expression.cs:9248
+#: ../mcs/mcs/expression.cs:9258
#, csharp-format
msgid ""
"Member `{0}' cannot be initialized. An object initializer may only be used "
"for fields, or properties"
msgstr ""
-#: ../mcs/mcs/expression.cs:9251
+#: ../mcs/mcs/expression.cs:9261
#, csharp-format
msgid ""
" Static field or property `{0}' cannot be assigned in an object initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:9424
+#: ../mcs/mcs/expression.cs:9434
#, csharp-format
msgid ""
"A field or property `{0}' cannot be initialized with a collection object "
"initializer because type `{1}' does not implement `{2}' interface"
msgstr ""
-#: ../mcs/mcs/expression.cs:9435
+#: ../mcs/mcs/expression.cs:9445
#, csharp-format
msgid "Inconsistent `{0}' member declaration"
msgstr ""
-#: ../mcs/mcs/expression.cs:9443
+#: ../mcs/mcs/expression.cs:9453
#, csharp-format
msgid ""
"An object initializer includes more than one member `{0}' initialization"
msgstr ""
-#: ../mcs/mcs/expression.cs:9460
+#: ../mcs/mcs/expression.cs:9470
#, csharp-format
msgid "Cannot initialize object of type `{0}' with a collection initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:9721
+#: ../mcs/mcs/expression.cs:9731
msgid "Anonymous types cannot be used in this expression"
msgstr ""
-#: ../mcs/mcs/expression.cs:9828
+#: ../mcs/mcs/expression.cs:9838
#, csharp-format
msgid "An anonymous type property `{0}' cannot be initialized with `{1}'"
msgstr ""
@@ -2754,12 +2754,12 @@ msgstr ""
msgid "An assembly `{0}' is used without being referenced"
msgstr ""
-#: ../mcs/mcs/namespace.cs:131
+#: ../mcs/mcs/namespace.cs:134
#, csharp-format
msgid "The imported type `{0}' is defined multiple times"
msgstr ""
-#: ../mcs/mcs/namespace.cs:257
+#: ../mcs/mcs/namespace.cs:268
#, csharp-format
msgid ""
"The type or namespace name `{0}' could not be found in the global namespace "
@@ -2768,7 +2768,7 @@ msgstr ""
"Der Typ oder Namespacename `{0}' konnte im globalen Namesapce nicht gefunden "
"werden. Fehlt ein Assemblyverweis?"
-#: ../mcs/mcs/namespace.cs:378
+#: ../mcs/mcs/namespace.cs:388
#, csharp-format
msgid ""
"The type or namespace name `{0}' does not exist in the namespace `{1}'. Are "
@@ -2777,59 +2777,59 @@ msgstr ""
"Der Typ oder Namespacename `{0}' existiert nicht im Namespace `{1}'. Fehlt "
"ein Assemblyverweis?"
-#: ../mcs/mcs/namespace.cs:385
+#: ../mcs/mcs/namespace.cs:395
#, csharp-format
msgid "Using the generic type `{0}' requires `{1}' type argument(s)"
msgstr ""
-#: ../mcs/mcs/namespace.cs:407
+#: ../mcs/mcs/namespace.cs:417
#, csharp-format
msgid "The non-generic {0} `{1}' cannot be used with the type arguments"
msgstr ""
-#: ../mcs/mcs/namespace.cs:651
+#: ../mcs/mcs/namespace.cs:661
#, csharp-format
msgid ""
"`{0}' is a type not a namespace. A using namespace directive can only be "
"applied to namespaces"
msgstr ""
-#: ../mcs/mcs/namespace.cs:678
+#: ../mcs/mcs/namespace.cs:688
#, csharp-format
msgid "The extern alias `{0}' was not specified in -reference option"
msgstr ""
"Der externe Alias `{0}' wurde nicht in der -reference-Option angegeben."
-#: ../mcs/mcs/namespace.cs:886 ../mcs/mcs/namespace.cs:908
+#: ../mcs/mcs/namespace.cs:896 ../mcs/mcs/namespace.cs:918
msgid ""
"A using clause must precede all other namespace elements except extern alias "
"declarations"
msgstr ""
-#: ../mcs/mcs/namespace.cs:932
+#: ../mcs/mcs/namespace.cs:942
msgid "An extern alias declaration must precede all other elements"
msgstr "Eine externe Aliasdeklaration muss allen anderen Elementen vorangehen"
-#: ../mcs/mcs/namespace.cs:950
+#: ../mcs/mcs/namespace.cs:960
#, csharp-format
msgid "The using alias `{0}' appeared previously in this namespace"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1023
+#: ../mcs/mcs/namespace.cs:1033
#, csharp-format
msgid "`{0}' is an ambiguous reference between `{1}' and `{2}'"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1062
+#: ../mcs/mcs/namespace.cs:1072
#, csharp-format
msgid "Namespace `{0}' contains a definition with same name as alias `{1}'"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1155
+#: ../mcs/mcs/namespace.cs:1165
msgid "You cannot redefine the global extern alias"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1160
+#: ../mcs/mcs/namespace.cs:1170
#, csharp-format
msgid ""
"The type or namespace name `{0}' could not be found. Are you missing a using "
@@ -3055,68 +3055,68 @@ msgstr ""
msgid "A value of an integral type or string expected for switch"
msgstr ""
-#: ../mcs/mcs/statement.cs:4087
+#: ../mcs/mcs/statement.cs:4089
#, csharp-format
msgid "`{0}' is not a reference type as required by the lock statement"
msgstr ""
-#: ../mcs/mcs/statement.cs:4404
+#: ../mcs/mcs/statement.cs:4406
msgid "A fixed statement cannot use an implicitly typed local variable"
msgstr ""
-#: ../mcs/mcs/statement.cs:4414
+#: ../mcs/mcs/statement.cs:4416
msgid "The type of locals declared in a fixed statement must be a pointer type"
msgstr ""
-#: ../mcs/mcs/statement.cs:4438
+#: ../mcs/mcs/statement.cs:4440
msgid ""
"The right hand side of a fixed statement assignment may not be a cast "
"expression"
msgstr ""
-#: ../mcs/mcs/statement.cs:4515
+#: ../mcs/mcs/statement.cs:4517
msgid ""
"You cannot use the fixed statement to take the address of an already fixed "
"expression"
msgstr ""
-#: ../mcs/mcs/statement.cs:4765
+#: ../mcs/mcs/statement.cs:4767
msgid "Try statement already has an empty catch block"
msgstr ""
-#: ../mcs/mcs/statement.cs:4803
+#: ../mcs/mcs/statement.cs:4805
#, csharp-format
msgid ""
"A previous catch clause already catches all exceptions of this or a super "
"type `{0}'"
msgstr ""
-#: ../mcs/mcs/statement.cs:4978 ../mcs/mcs/statement.cs:5093
+#: ../mcs/mcs/statement.cs:4980 ../mcs/mcs/statement.cs:5095
msgid "Internal error: No Dispose method which takes 0 parameters."
msgstr ""
-#: ../mcs/mcs/statement.cs:5050
+#: ../mcs/mcs/statement.cs:5052
#, csharp-format
msgid ""
"`{0}': type used in a using statement must be implicitly convertible to "
"`System.IDisposable'"
msgstr ""
-#: ../mcs/mcs/statement.cs:5490
+#: ../mcs/mcs/statement.cs:5492
#, csharp-format
msgid ""
"foreach statement requires that the return type `{0}' of `{1}' must have a "
"suitable public MoveNext method and public Current property"
msgstr ""
-#: ../mcs/mcs/statement.cs:5575
+#: ../mcs/mcs/statement.cs:5577
#, csharp-format
msgid ""
"foreach statement cannot operate on variables of type `{0}' because it does "
"not contain a definition for `GetEnumerator' or is not accessible"
msgstr ""
-#: ../mcs/mcs/statement.cs:5627
+#: ../mcs/mcs/statement.cs:5629
#, csharp-format
msgid ""
"foreach statement cannot operate on variables of type `{0}' because it "
@@ -3124,11 +3124,11 @@ msgid ""
"implementation"
msgstr ""
-#: ../mcs/mcs/statement.cs:5922
+#: ../mcs/mcs/statement.cs:5924
msgid "Use of null is not valid in this context"
msgstr ""
-#: ../mcs/mcs/statement.cs:5932
+#: ../mcs/mcs/statement.cs:5934
#, csharp-format
msgid "Foreach statement cannot operate on a `{0}'"
msgstr ""
diff --git a/po/mcs/es.gmo b/po/mcs/es.gmo
index a3d0301..b2b6be2 100644
Binary files a/po/mcs/es.gmo and b/po/mcs/es.gmo differ
diff --git a/po/mcs/es.po b/po/mcs/es.po
index cb49882..0a3582b 100644
--- a/po/mcs/es.po
+++ b/po/mcs/es.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mono 2.1\n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
-"POT-Creation-Date: 2009-03-13 14:51+0000\n"
+"POT-Creation-Date: 2009-07-27 16:32+0000\n"
"PO-Revision-Date: 2008-09-19 13:28-0400\n"
"Last-Translator: Miguel de Icaza <miguel at novell.com>\n"
"Language-Team: es <mono-list at lists.ximian.com>\n"
@@ -653,36 +653,36 @@ msgstr ""
msgid "Static class `{0}' cannot implement interfaces"
msgstr "Las clases estáticas no pueden implementar interfaces (`{0}')"
-#: ../mcs/mcs/class.cs:3040
+#: ../mcs/mcs/class.cs:3050
#, csharp-format
msgid "`{0}': Structs cannot have instance field initializers"
msgstr ""
"`{0}': las estructuras no pueden tener inicializadores de campos en "
"instancias"
-#: ../mcs/mcs/class.cs:3348
+#: ../mcs/mcs/class.cs:3358
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not an event"
msgstr "`{0}': no es posible sobreescribir ya que `{1}' no es un evento"
-#: ../mcs/mcs/class.cs:3350
+#: ../mcs/mcs/class.cs:3360
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not a property"
msgstr "`{0}': no es posible sobreescribir `{1}' ya que no es una propiedad"
-#: ../mcs/mcs/class.cs:3352
+#: ../mcs/mcs/class.cs:3362
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not a method"
msgstr "`{0}': no es posible sobreescribir `{1}' ya que no es un método"
-#: ../mcs/mcs/class.cs:3354
+#: ../mcs/mcs/class.cs:3364
#, csharp-format
msgid "`{0}' is marked as an override but no suitable {1} found to override"
msgstr ""
"`{0}' está marcado como una sobreescritura pero no es posible encontrar {1} "
"para usar override"
-#: ../mcs/mcs/class.cs:3400
+#: ../mcs/mcs/class.cs:3410
#, csharp-format
msgid ""
"`{0}': cannot override inherited member `{1}' because it is not marked "
@@ -691,43 +691,43 @@ msgstr ""
"`{0}': no es posible sobreescribir el miembro heredado `{1}' ya que este no "
"está marcado con `virtual', `abstract' u `override'"
-#: ../mcs/mcs/class.cs:3409
+#: ../mcs/mcs/class.cs:3419
#, csharp-format
msgid "`{0}': cannot override inherited member `{1}' because it is sealed"
msgstr ""
"`{0}': no es posible sobreescribir el miembro heredado `{1}' ya que este "
"está sellado"
-#: ../mcs/mcs/class.cs:3427
+#: ../mcs/mcs/class.cs:3437
#, csharp-format
msgid "`{0}': type must be `{1}' to match overridden member `{2}'"
msgstr ""
"`{0}': el tipo debe de ser `{1}' para que corresponda con el miembro "
"sobreescrito `{2}'"
-#: ../mcs/mcs/class.cs:3431
+#: ../mcs/mcs/class.cs:3441
#, csharp-format
msgid "`{0}': return type must be `{1}' to match overridden member `{2}'"
msgstr ""
"`{0}': El tipo de regreso debe de ser `{1}' para qu ecorresponda con el "
"miembro sobreescrito `{2}'"
-#: ../mcs/mcs/class.cs:3453
+#: ../mcs/mcs/class.cs:3463
#, csharp-format
msgid "`{0}' hides inherited abstract member `{1}'"
msgstr "`{0}' esconde el miembro abstracto heredado `{1}'"
-#: ../mcs/mcs/class.cs:3519
+#: ../mcs/mcs/class.cs:3529
#, csharp-format
msgid "A partial method `{0}' cannot explicitly implement an interface"
msgstr ""
-#: ../mcs/mcs/class.cs:3527
+#: ../mcs/mcs/class.cs:3537
#, fuzzy, csharp-format
msgid "The type `{0}' in explicit interface declaration is not an interface"
msgstr "El tipo `{0} en la lista de interfaces no es una interface"
-#: ../mcs/mcs/class.cs:3556
+#: ../mcs/mcs/class.cs:3566
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
@@ -736,7 +736,7 @@ msgstr ""
"Accesibilidad inconsistente: la interface base `{0}' es menos accessible que "
"el indexador `{1}'"
-#: ../mcs/mcs/class.cs:3560
+#: ../mcs/mcs/class.cs:3570
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
@@ -745,87 +745,87 @@ msgstr ""
"Accesibilidad inconsistente: el tipo del parámetro `{0}' es menos accessible "
"que el operador `{1}'"
-#: ../mcs/mcs/class.cs:3564
+#: ../mcs/mcs/class.cs:3574
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
"method `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3577
+#: ../mcs/mcs/class.cs:3587
#, csharp-format
msgid ""
"`{0}' is marked as an external but has no DllImport attribute. Consider "
"adding a DllImport attribute to specify the external implementation"
msgstr ""
-#: ../mcs/mcs/class.cs:3611
+#: ../mcs/mcs/class.cs:3621
#, csharp-format
msgid ""
"`{0}': cannot change access modifiers when overriding `{1}' inherited member "
"`{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3715
+#: ../mcs/mcs/class.cs:3725
msgid ""
"The DllImport attribute must be specified on a method marked `static' and "
"`extern'"
msgstr ""
-#: ../mcs/mcs/class.cs:3822
+#: ../mcs/mcs/class.cs:3832
#, csharp-format
msgid "`{0}': A partial method parameters cannot use `out' modifier"
msgstr ""
-#: ../mcs/mcs/class.cs:3870
+#: ../mcs/mcs/class.cs:3880
#, csharp-format
msgid ""
"Conditional not valid on `{0}' because it is a constructor, destructor, "
"operator or explicit interface implementation"
msgstr ""
-#: ../mcs/mcs/class.cs:4084
+#: ../mcs/mcs/class.cs:4094
#, csharp-format
msgid "Program `{0}' has more than one entry point defined: `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4115
+#: ../mcs/mcs/class.cs:4125
#, csharp-format
msgid "Conditional not valid on `{0}' because its return type is not void"
msgstr ""
-#: ../mcs/mcs/class.cs:4120
+#: ../mcs/mcs/class.cs:4130
#, csharp-format
msgid "Conditional not valid on `{0}' because it is an override method"
msgstr ""
-#: ../mcs/mcs/class.cs:4125
+#: ../mcs/mcs/class.cs:4135
msgid "Conditional not valid on interface members"
msgstr ""
-#: ../mcs/mcs/class.cs:4131
+#: ../mcs/mcs/class.cs:4141
#, csharp-format
msgid "Conditional member `{0}' cannot implement interface member `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4138
+#: ../mcs/mcs/class.cs:4148
#, csharp-format
msgid "Conditional method `{0}' cannot have an out parameter"
msgstr ""
-#: ../mcs/mcs/class.cs:4184
+#: ../mcs/mcs/class.cs:4194
#, fuzzy, csharp-format
msgid "Do not override `{0}'. Use destructor syntax instead"
msgstr ""
"No use `{0}' directamente. Use el modificador de parámetro `this' en su "
"lugar"
-#: ../mcs/mcs/class.cs:4221
+#: ../mcs/mcs/class.cs:4231
#, csharp-format
msgid "`{0}': Extension methods cannot be defined in a nested class"
msgstr ""
-#: ../mcs/mcs/class.cs:4226
+#: ../mcs/mcs/class.cs:4236
#, csharp-format
msgid ""
"`{0}': Extension methods cannot be declared without a reference to System."
@@ -833,335 +833,335 @@ msgid ""
"the first parameter"
msgstr ""
-#: ../mcs/mcs/class.cs:4240
+#: ../mcs/mcs/class.cs:4250
#, csharp-format
msgid "`{0}': Extension methods must be defined in a non-generic static class"
msgstr ""
-#: ../mcs/mcs/class.cs:4296
+#: ../mcs/mcs/class.cs:4306
#, csharp-format
msgid ""
"A partial method `{0}' implementation is missing a partial method declaration"
msgstr ""
-#: ../mcs/mcs/class.cs:4327
+#: ../mcs/mcs/class.cs:4337
#, csharp-format
msgid "Method or delegate cannot return type `{0}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4412
+#: ../mcs/mcs/class.cs:4422
#, csharp-format
msgid "`{0}': Struct constructors cannot call base constructors"
msgstr ""
-#: ../mcs/mcs/class.cs:4445
+#: ../mcs/mcs/class.cs:4455
#, csharp-format
msgid "Constructor `{0}' cannot call itself"
msgstr ""
-#: ../mcs/mcs/class.cs:4570
+#: ../mcs/mcs/class.cs:4580
#, csharp-format
msgid "`{0}': The static constructor must be parameterless"
msgstr ""
-#: ../mcs/mcs/class.cs:4590
+#: ../mcs/mcs/class.cs:4600
msgid "Structs cannot contain explicit parameterless constructors"
msgstr ""
-#: ../mcs/mcs/class.cs:4642
+#: ../mcs/mcs/class.cs:4652
#, csharp-format
msgid ""
"`{0}': A class with the ComImport attribute cannot have a user-defined "
"constructor"
msgstr ""
-#: ../mcs/mcs/class.cs:4933
+#: ../mcs/mcs/class.cs:4943
#, csharp-format
msgid "`{0}' is an accessor not found in interface member `{1}{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4939
+#: ../mcs/mcs/class.cs:4949
#, csharp-format
msgid ""
"`{0}.{1}' in explicit interface declaration is not a member of interface"
msgstr ""
-#: ../mcs/mcs/class.cs:4946
+#: ../mcs/mcs/class.cs:4956
#, csharp-format
msgid ""
"`{0}' explicit method implementation cannot implement `{1}' because it is an "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:4956
+#: ../mcs/mcs/class.cs:4966
#, csharp-format
msgid "Method `{0}' cannot implement interface accessor `{1}.{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4963
+#: ../mcs/mcs/class.cs:4973
#, csharp-format
msgid ""
"Accessor `{0}' cannot implement interface member `{1}' for type `{2}'. Use "
"an explicit interface implementation"
msgstr ""
-#: ../mcs/mcs/class.cs:4970
+#: ../mcs/mcs/class.cs:4980
#, csharp-format
msgid ""
"Accessor `{0}' must be declared public to implement interface member `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4994
+#: ../mcs/mcs/class.cs:5004
#, csharp-format
msgid ""
"`{0}': the explicit interface implementation cannot introduce the params "
"modifier"
msgstr ""
-#: ../mcs/mcs/class.cs:5280
+#: ../mcs/mcs/class.cs:5290
#, csharp-format
msgid "New virtual member `{0}' is declared in a sealed class `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5295
+#: ../mcs/mcs/class.cs:5305
msgid "Inconsistent accessibility: property type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5300
+#: ../mcs/mcs/class.cs:5310
msgid "Inconsistent accessibility: indexer return type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5306 ../mcs/mcs/class.cs:5311
+#: ../mcs/mcs/class.cs:5316 ../mcs/mcs/class.cs:5321
#: ../mcs/mcs/delegate.cs:220
msgid "Inconsistent accessibility: return type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5316
+#: ../mcs/mcs/class.cs:5326
msgid "Inconsistent accessibility: field type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5326
+#: ../mcs/mcs/class.cs:5336
#, csharp-format
msgid "Field or property cannot be of type `{0}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5384
+#: ../mcs/mcs/class.cs:5394
msgid ""
"The modifier 'abstract' is not valid on fields. Try using a property instead"
msgstr ""
-#: ../mcs/mcs/class.cs:5399
+#: ../mcs/mcs/class.cs:5409
msgid ""
"The FieldOffset attribute can only be placed on members of types marked with "
"the StructLayout(LayoutKind.Explicit)"
msgstr ""
-#: ../mcs/mcs/class.cs:5404
+#: ../mcs/mcs/class.cs:5414
msgid "The FieldOffset attribute is not allowed on static or const fields"
msgstr ""
-#: ../mcs/mcs/class.cs:5411
+#: ../mcs/mcs/class.cs:5421
msgid ""
"Do not use 'System.Runtime.CompilerServices.FixedBuffer' attribute. Use the "
"'fixed' field modifier instead"
msgstr ""
-#: ../mcs/mcs/class.cs:5489
+#: ../mcs/mcs/class.cs:5499
#, csharp-format
msgid ""
"`{0}': Instance field types marked with StructLayout(LayoutKind.Explicit) "
"must have a FieldOffset attribute"
msgstr ""
-#: ../mcs/mcs/class.cs:5498
+#: ../mcs/mcs/class.cs:5508
#, csharp-format
msgid "`{0}': cannot declare variables of static types"
msgstr ""
-#: ../mcs/mcs/class.cs:5613
+#: ../mcs/mcs/class.cs:5623
#, csharp-format
msgid ""
"`{0}': Fixed size buffers type must be one of the following: bool, byte, "
"short, int, long, char, sbyte, ushort, uint, ulong, float or double"
msgstr ""
-#: ../mcs/mcs/class.cs:5640
+#: ../mcs/mcs/class.cs:5650
#, csharp-format
msgid "`{0}': Fixed size buffer fields may only be members of structs"
msgstr ""
-#: ../mcs/mcs/class.cs:5659
+#: ../mcs/mcs/class.cs:5669
#, csharp-format
msgid "`{0}': Fixed size buffers must have a length greater than zero"
msgstr ""
-#: ../mcs/mcs/class.cs:5666
+#: ../mcs/mcs/class.cs:5676
#, csharp-format
msgid ""
"Fixed size buffer `{0}' of length `{1}' and type `{2}' exceeded 2^31 limit"
msgstr ""
-#: ../mcs/mcs/class.cs:5858
+#: ../mcs/mcs/class.cs:5868
#, csharp-format
msgid "Struct member `{0}' of type `{1}' causes a cycle in the struct layout"
msgstr ""
-#: ../mcs/mcs/class.cs:5911
+#: ../mcs/mcs/class.cs:5921
#, csharp-format
msgid "`{0}': A volatile field cannot be of the type `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5916
+#: ../mcs/mcs/class.cs:5926
#, csharp-format
msgid "`{0}': A field cannot be both volatile and readonly"
msgstr ""
-#: ../mcs/mcs/class.cs:6069
+#: ../mcs/mcs/class.cs:6079
#, csharp-format
msgid ""
"Attribute `{0}' is not valid on property or event accessors. It is valid on `"
"{1}' declarations only"
msgstr ""
-#: ../mcs/mcs/class.cs:6169 ../mcs/mcs/decl.cs:2800
+#: ../mcs/mcs/class.cs:6179 ../mcs/mcs/decl.cs:2800
#, csharp-format
msgid "A member `{0}' is already reserved"
msgstr ""
-#: ../mcs/mcs/class.cs:6372
+#: ../mcs/mcs/class.cs:6382
#, csharp-format
msgid "Explicit interface implementation `{0}' is missing accessor `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:6389
+#: ../mcs/mcs/class.cs:6399
#, csharp-format
msgid ""
"`{0}': accessibility modifiers may not be used on accessors in an interface"
msgstr ""
-#: ../mcs/mcs/class.cs:6393
+#: ../mcs/mcs/class.cs:6403
#, csharp-format
msgid "`{0}': abstract properties cannot have private accessors"
msgstr ""
-#: ../mcs/mcs/class.cs:6460
+#: ../mcs/mcs/class.cs:6470
#, csharp-format
msgid ""
"The accessibility modifier of the `{0}' accessor must be more restrictive "
"than the modifier of the property or indexer `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:6528
+#: ../mcs/mcs/class.cs:6538
#, csharp-format
msgid ""
"`{0}': Cannot specify accessibility modifiers for both accessors of the "
"property or indexer"
msgstr ""
-#: ../mcs/mcs/class.cs:6536
+#: ../mcs/mcs/class.cs:6546
#, csharp-format
msgid ""
"`{0}': accessibility modifiers on accessors may only be used if the property "
"or indexer has both a get and a set accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6585
+#: ../mcs/mcs/class.cs:6595
#, csharp-format
msgid ""
"`{0}.get': cannot override because `{1}' does not have an overridable get "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6600
+#: ../mcs/mcs/class.cs:6610
#, csharp-format
msgid ""
"`{0}.set': cannot override because `{1}' does not have an overridable set "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6799
+#: ../mcs/mcs/class.cs:6809
#, csharp-format
msgid ""
"Automatically implemented property `{0}' cannot be used inside a type with "
"an explicit StructLayout attribute"
msgstr ""
-#: ../mcs/mcs/class.cs:7153
+#: ../mcs/mcs/class.cs:7163
#, csharp-format
msgid "`{0}': abstract event cannot have an initializer"
msgstr ""
-#: ../mcs/mcs/class.cs:7359
+#: ../mcs/mcs/class.cs:7369
#, csharp-format
msgid "`{0}': event must be of a delegate type"
msgstr ""
-#: ../mcs/mcs/class.cs:7567
+#: ../mcs/mcs/class.cs:7577
msgid ""
"The `IndexerName' attribute is valid only on an indexer that is not an "
"explicit interface member declaration"
msgstr ""
-#: ../mcs/mcs/class.cs:7574
+#: ../mcs/mcs/class.cs:7584
msgid "Cannot set the `IndexerName' attribute on an indexer marked override"
msgstr ""
-#: ../mcs/mcs/class.cs:7771
+#: ../mcs/mcs/class.cs:7781
#, csharp-format
msgid "User-defined operator `{0}' must be declared static and public"
msgstr ""
-#: ../mcs/mcs/class.cs:7801
+#: ../mcs/mcs/class.cs:7811
msgid ""
"User-defined operator cannot take an object of the enclosing type and "
"convert to an object of the enclosing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7812
+#: ../mcs/mcs/class.cs:7822
msgid "User-defined conversion must convert to or from the enclosing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7821
+#: ../mcs/mcs/class.cs:7831
#, csharp-format
msgid ""
"User-defined conversion `{0}' cannot convert to or from an interface type"
msgstr ""
-#: ../mcs/mcs/class.cs:7828
+#: ../mcs/mcs/class.cs:7838
#, csharp-format
msgid "User-defined conversion `{0}' cannot convert to or from a base class"
msgstr ""
-#: ../mcs/mcs/class.cs:7834
+#: ../mcs/mcs/class.cs:7844
#, csharp-format
msgid "User-defined conversion `{0}' cannot convert to or from a derived class"
msgstr ""
-#: ../mcs/mcs/class.cs:7842
+#: ../mcs/mcs/class.cs:7852
msgid ""
"Overloaded shift operator must have the type of the first operand be the "
"containing type, and the type of the second operand must be int"
msgstr ""
-#: ../mcs/mcs/class.cs:7851
+#: ../mcs/mcs/class.cs:7861
msgid ""
"The return type for ++ or -- operator must be the containing type or derived "
"from the containing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7856
+#: ../mcs/mcs/class.cs:7866
msgid "The parameter type for ++ or -- operator must be the containing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7863
+#: ../mcs/mcs/class.cs:7873
msgid "The parameter type of a unary operator must be the containing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7871
+#: ../mcs/mcs/class.cs:7881
msgid "The return type of operator True or False must be bool"
msgstr ""
-#: ../mcs/mcs/class.cs:7884
+#: ../mcs/mcs/class.cs:7894
msgid "One of the parameters of a binary operator must be the containing type"
msgstr ""
@@ -2139,7 +2139,7 @@ msgstr ""
msgid "Type byte, sbyte, short, ushort, int, uint, long or ulong expected"
msgstr ""
-#: ../mcs/mcs/eval.cs:501
+#: ../mcs/mcs/eval.cs:529
msgid "Detection Parsing Error"
msgstr ""
@@ -2287,72 +2287,72 @@ msgstr ""
msgid "Cannot create an instance of the abstract class or interface `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:5761
+#: ../mcs/mcs/expression.cs:5771
msgid "Invalid rank specifier: expected `,' or `]'"
msgstr ""
-#: ../mcs/mcs/expression.cs:5766
+#: ../mcs/mcs/expression.cs:5776
msgid "Cannot create an array with a negative size"
msgstr ""
-#: ../mcs/mcs/expression.cs:5783 ../mcs/mcs/statement.cs:3049
+#: ../mcs/mcs/expression.cs:5793 ../mcs/mcs/statement.cs:3049
msgid "A constant value is expected"
msgstr ""
-#: ../mcs/mcs/expression.cs:5870
+#: ../mcs/mcs/expression.cs:5880
msgid "An expression tree cannot contain a multidimensional array initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:5964
+#: ../mcs/mcs/expression.cs:5974
msgid ""
"Can only use array initializer expressions to assign to array types. Try "
"using a new expression instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:5969
+#: ../mcs/mcs/expression.cs:5979
msgid ""
"An implicitly typed local variable declarator cannot use an array initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:6044
+#: ../mcs/mcs/expression.cs:6054
msgid "New invocation: Can not find a constructor for this argument list"
msgstr ""
-#: ../mcs/mcs/expression.cs:6483
+#: ../mcs/mcs/expression.cs:6493
msgid ""
"The type of an implicitly typed array cannot be inferred from the "
"initializer. Try specifying array type explicitly"
msgstr ""
-#: ../mcs/mcs/expression.cs:6661
+#: ../mcs/mcs/expression.cs:6671
msgid ""
"Anonymous methods inside structs cannot access instance members of `this'. "
"Consider copying `this' to a local variable outside the anonymous method and "
"using the local instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:6728
+#: ../mcs/mcs/expression.cs:6738
msgid "Cannot take the address of `this' because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6730
+#: ../mcs/mcs/expression.cs:6740
msgid "Cannot pass `this' as a ref or out argument because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6732
+#: ../mcs/mcs/expression.cs:6742
msgid "Cannot assign to `this' because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6839
+#: ../mcs/mcs/expression.cs:6849
msgid "An expression tree cannot contain a method with variable arguments"
msgstr ""
-#: ../mcs/mcs/expression.cs:6949
+#: ../mcs/mcs/expression.cs:6959
#, csharp-format
msgid "`{0}': an attribute argument cannot use type parameters"
msgstr ""
-#: ../mcs/mcs/expression.cs:7182
+#: ../mcs/mcs/expression.cs:7192
#, csharp-format
msgid ""
"`{0}' does not have a predefined size, therefore sizeof can only be used in "
@@ -2360,40 +2360,40 @@ msgid ""
"SizeOf)"
msgstr ""
-#: ../mcs/mcs/expression.cs:7237
+#: ../mcs/mcs/expression.cs:7247
#, csharp-format
msgid "Alias `{0}' not found"
msgstr ""
-#: ../mcs/mcs/expression.cs:7248
+#: ../mcs/mcs/expression.cs:7258
#, csharp-format
msgid ""
"Alias `{0}' cannot be used with '::' since it denotes a type. Consider "
"replacing '::' with '.'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7264
+#: ../mcs/mcs/expression.cs:7274
#, csharp-format
msgid ""
"A namespace alias qualifier `{0}' did not resolve to a namespace or a type"
msgstr ""
-#: ../mcs/mcs/expression.cs:7403
+#: ../mcs/mcs/expression.cs:7413
#, csharp-format
msgid "`{0}': cannot reference a type through an expression; try `{1}' instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:7500
+#: ../mcs/mcs/expression.cs:7510
#, csharp-format
msgid "A nested type cannot be specified through a type parameter `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7568
+#: ../mcs/mcs/expression.cs:7578
#, csharp-format
msgid "The nested type `{0}' does not exist in the type `{1}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7580
+#: ../mcs/mcs/expression.cs:7590
#, csharp-format
msgid ""
"Type `{0}' does not contain a definition for `{1}' and no extension method `"
@@ -2401,102 +2401,102 @@ msgid ""
"assembly reference?)"
msgstr ""
-#: ../mcs/mcs/expression.cs:7798
+#: ../mcs/mcs/expression.cs:7808
msgid "Cannot apply indexing with [] to an expression of type `System.Array'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7904
+#: ../mcs/mcs/expression.cs:7914
#, csharp-format
msgid "Wrong number of indexes `{0}' inside [], expected `{1}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8408
+#: ../mcs/mcs/expression.cs:8418
#, csharp-format
msgid ""
"A property or indexer `{0}' may not be passed as an out or ref parameter"
msgstr ""
-#: ../mcs/mcs/expression.cs:8433
+#: ../mcs/mcs/expression.cs:8443
#, csharp-format
msgid "Cannot apply indexing with [] to an expression of type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8463
+#: ../mcs/mcs/expression.cs:8473
#, csharp-format
msgid "The read only property or indexer `{0}' cannot be assigned to"
msgstr ""
-#: ../mcs/mcs/expression.cs:8471
+#: ../mcs/mcs/expression.cs:8481
#, csharp-format
msgid ""
"The property or indexer `{0}' cannot be used in this context because it "
"lacks a `{1}' accessor"
msgstr ""
-#: ../mcs/mcs/expression.cs:8493
+#: ../mcs/mcs/expression.cs:8503
#, csharp-format
msgid ""
"The property or indexer `{0}' cannot be used in this context because a `{1}' "
"accessor is inaccessible"
msgstr ""
-#: ../mcs/mcs/expression.cs:8956
+#: ../mcs/mcs/expression.cs:8966
#, csharp-format
msgid "Array elements cannot be of type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8962
+#: ../mcs/mcs/expression.cs:8972
#, csharp-format
msgid "Array elements cannot be of static type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:9121
+#: ../mcs/mcs/expression.cs:9131
msgid "Cannot use a negative size with stackalloc"
msgstr ""
-#: ../mcs/mcs/expression.cs:9248
+#: ../mcs/mcs/expression.cs:9258
#, csharp-format
msgid ""
"Member `{0}' cannot be initialized. An object initializer may only be used "
"for fields, or properties"
msgstr ""
-#: ../mcs/mcs/expression.cs:9251
+#: ../mcs/mcs/expression.cs:9261
#, csharp-format
msgid ""
" Static field or property `{0}' cannot be assigned in an object initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:9424
+#: ../mcs/mcs/expression.cs:9434
#, csharp-format
msgid ""
"A field or property `{0}' cannot be initialized with a collection object "
"initializer because type `{1}' does not implement `{2}' interface"
msgstr ""
-#: ../mcs/mcs/expression.cs:9435
+#: ../mcs/mcs/expression.cs:9445
#, csharp-format
msgid "Inconsistent `{0}' member declaration"
msgstr ""
-#: ../mcs/mcs/expression.cs:9443
+#: ../mcs/mcs/expression.cs:9453
#, csharp-format
msgid ""
"An object initializer includes more than one member `{0}' initialization"
msgstr ""
-#: ../mcs/mcs/expression.cs:9460
+#: ../mcs/mcs/expression.cs:9470
#, csharp-format
msgid "Cannot initialize object of type `{0}' with a collection initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:9721
+#: ../mcs/mcs/expression.cs:9731
#, fuzzy
msgid "Anonymous types cannot be used in this expression"
msgstr ""
"Los métodos anónimos no pueden ser convertidos a árboles de expresiones"
-#: ../mcs/mcs/expression.cs:9828
+#: ../mcs/mcs/expression.cs:9838
#, csharp-format
msgid "An anonymous type property `{0}' cannot be initialized with `{1}'"
msgstr ""
@@ -2827,77 +2827,77 @@ msgstr ""
msgid "An assembly `{0}' is used without being referenced"
msgstr ""
-#: ../mcs/mcs/namespace.cs:131
+#: ../mcs/mcs/namespace.cs:134
#, csharp-format
msgid "The imported type `{0}' is defined multiple times"
msgstr ""
-#: ../mcs/mcs/namespace.cs:257
+#: ../mcs/mcs/namespace.cs:268
#, csharp-format
msgid ""
"The type or namespace name `{0}' could not be found in the global namespace "
"(are you missing an assembly reference?)"
msgstr ""
-#: ../mcs/mcs/namespace.cs:378
+#: ../mcs/mcs/namespace.cs:388
#, csharp-format
msgid ""
"The type or namespace name `{0}' does not exist in the namespace `{1}'. Are "
"you missing an assembly reference?"
msgstr ""
-#: ../mcs/mcs/namespace.cs:385
+#: ../mcs/mcs/namespace.cs:395
#, csharp-format
msgid "Using the generic type `{0}' requires `{1}' type argument(s)"
msgstr ""
-#: ../mcs/mcs/namespace.cs:407
+#: ../mcs/mcs/namespace.cs:417
#, csharp-format
msgid "The non-generic {0} `{1}' cannot be used with the type arguments"
msgstr ""
-#: ../mcs/mcs/namespace.cs:651
+#: ../mcs/mcs/namespace.cs:661
#, csharp-format
msgid ""
"`{0}' is a type not a namespace. A using namespace directive can only be "
"applied to namespaces"
msgstr ""
-#: ../mcs/mcs/namespace.cs:678
+#: ../mcs/mcs/namespace.cs:688
#, csharp-format
msgid "The extern alias `{0}' was not specified in -reference option"
msgstr ""
-#: ../mcs/mcs/namespace.cs:886 ../mcs/mcs/namespace.cs:908
+#: ../mcs/mcs/namespace.cs:896 ../mcs/mcs/namespace.cs:918
msgid ""
"A using clause must precede all other namespace elements except extern alias "
"declarations"
msgstr ""
-#: ../mcs/mcs/namespace.cs:932
+#: ../mcs/mcs/namespace.cs:942
msgid "An extern alias declaration must precede all other elements"
msgstr ""
-#: ../mcs/mcs/namespace.cs:950
+#: ../mcs/mcs/namespace.cs:960
#, csharp-format
msgid "The using alias `{0}' appeared previously in this namespace"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1023
+#: ../mcs/mcs/namespace.cs:1033
#, csharp-format
msgid "`{0}' is an ambiguous reference between `{1}' and `{2}'"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1062
+#: ../mcs/mcs/namespace.cs:1072
#, csharp-format
msgid "Namespace `{0}' contains a definition with same name as alias `{1}'"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1155
+#: ../mcs/mcs/namespace.cs:1165
msgid "You cannot redefine the global extern alias"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1160
+#: ../mcs/mcs/namespace.cs:1170
#, csharp-format
msgid ""
"The type or namespace name `{0}' could not be found. Are you missing a using "
@@ -3117,68 +3117,68 @@ msgstr ""
msgid "A value of an integral type or string expected for switch"
msgstr ""
-#: ../mcs/mcs/statement.cs:4087
+#: ../mcs/mcs/statement.cs:4089
#, csharp-format
msgid "`{0}' is not a reference type as required by the lock statement"
msgstr ""
-#: ../mcs/mcs/statement.cs:4404
+#: ../mcs/mcs/statement.cs:4406
msgid "A fixed statement cannot use an implicitly typed local variable"
msgstr ""
-#: ../mcs/mcs/statement.cs:4414
+#: ../mcs/mcs/statement.cs:4416
msgid "The type of locals declared in a fixed statement must be a pointer type"
msgstr ""
-#: ../mcs/mcs/statement.cs:4438
+#: ../mcs/mcs/statement.cs:4440
msgid ""
"The right hand side of a fixed statement assignment may not be a cast "
"expression"
msgstr ""
-#: ../mcs/mcs/statement.cs:4515
+#: ../mcs/mcs/statement.cs:4517
msgid ""
"You cannot use the fixed statement to take the address of an already fixed "
"expression"
msgstr ""
-#: ../mcs/mcs/statement.cs:4765
+#: ../mcs/mcs/statement.cs:4767
msgid "Try statement already has an empty catch block"
msgstr ""
-#: ../mcs/mcs/statement.cs:4803
+#: ../mcs/mcs/statement.cs:4805
#, csharp-format
msgid ""
"A previous catch clause already catches all exceptions of this or a super "
"type `{0}'"
msgstr ""
-#: ../mcs/mcs/statement.cs:4978 ../mcs/mcs/statement.cs:5093
+#: ../mcs/mcs/statement.cs:4980 ../mcs/mcs/statement.cs:5095
msgid "Internal error: No Dispose method which takes 0 parameters."
msgstr ""
-#: ../mcs/mcs/statement.cs:5050
+#: ../mcs/mcs/statement.cs:5052
#, csharp-format
msgid ""
"`{0}': type used in a using statement must be implicitly convertible to "
"`System.IDisposable'"
msgstr ""
-#: ../mcs/mcs/statement.cs:5490
+#: ../mcs/mcs/statement.cs:5492
#, csharp-format
msgid ""
"foreach statement requires that the return type `{0}' of `{1}' must have a "
"suitable public MoveNext method and public Current property"
msgstr ""
-#: ../mcs/mcs/statement.cs:5575
+#: ../mcs/mcs/statement.cs:5577
#, csharp-format
msgid ""
"foreach statement cannot operate on variables of type `{0}' because it does "
"not contain a definition for `GetEnumerator' or is not accessible"
msgstr ""
-#: ../mcs/mcs/statement.cs:5627
+#: ../mcs/mcs/statement.cs:5629
#, csharp-format
msgid ""
"foreach statement cannot operate on variables of type `{0}' because it "
@@ -3186,11 +3186,11 @@ msgid ""
"implementation"
msgstr ""
-#: ../mcs/mcs/statement.cs:5922
+#: ../mcs/mcs/statement.cs:5924
msgid "Use of null is not valid in this context"
msgstr ""
-#: ../mcs/mcs/statement.cs:5932
+#: ../mcs/mcs/statement.cs:5934
#, csharp-format
msgid "Foreach statement cannot operate on a `{0}'"
msgstr "El mandato `foreach' no puede operar en un `{0}'"
diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo
index 6bdc636..1fd617f 100644
Binary files a/po/mcs/ja.gmo and b/po/mcs/ja.gmo differ
diff --git a/po/mcs/ja.po b/po/mcs/ja.po
index c80bc5b..ffcc5e5 100644
--- a/po/mcs/ja.po
+++ b/po/mcs/ja.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
-"POT-Creation-Date: 2009-03-13 14:51+0000\n"
+"POT-Creation-Date: 2009-07-27 16:32+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: Atsushi Eno <atsushi at ximian.com>\n"
"Language-Team: \n"
@@ -625,34 +625,34 @@ msgstr ""
msgid "Static class `{0}' cannot implement interfaces"
msgstr "staticã¯ã©ã¹ `{0}' ã¯ã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®è£
ã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:3040
+#: ../mcs/mcs/class.cs:3050
#, csharp-format
msgid "`{0}': Structs cannot have instance field initializers"
msgstr "`{0}': æ§é ä½ã§ã¯ã¤ã³ã¹ã¿ã³ã¹ ãã£ã¼ã«ããåæåã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:3348
+#: ../mcs/mcs/class.cs:3358
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not an event"
msgstr "`{0}': `{1}' ã¯ã¤ãã³ãã§ã¯ãªãããããªã¼ãã¼ã©ã¤ãã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:3350
+#: ../mcs/mcs/class.cs:3360
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not a property"
msgstr "`{0}': `{1}' ã¯ããããã£ã§ã¯ãªãããããªã¼ãã¼ã©ã¤ãã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:3352
+#: ../mcs/mcs/class.cs:3362
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not a method"
msgstr "`{0}': `{1}' ã¯ã¡ã½ããã§ã¯ãªãããããªã¼ãã¼ã©ã¤ãã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:3354
+#: ../mcs/mcs/class.cs:3364
#, csharp-format
msgid "`{0}' is marked as an override but no suitable {1} found to override"
msgstr ""
"`{0}' ã¯overrideã¨ãã¦å®£è¨ããã¦ãã¾ããããªã¼ãã¼ã©ã¤ããã¹ã{1}ãè¦ã¤ããã¾"
"ãã"
-#: ../mcs/mcs/class.cs:3400
+#: ../mcs/mcs/class.cs:3410
#, csharp-format
msgid ""
"`{0}': cannot override inherited member `{1}' because it is not marked "
@@ -661,45 +661,45 @@ msgstr ""
"`{0}': ç¶æ¿ãããã¨ããã¡ã³ã `{1}' ã¯ãvirtual, abstractãããã¯overrideã¨ã"
"ã¦å®£è¨ããã¦ããªãã®ã§ããªã¼ãã¼ã©ã¤ããããã¨ã¯ã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:3409
+#: ../mcs/mcs/class.cs:3419
#, csharp-format
msgid "`{0}': cannot override inherited member `{1}' because it is sealed"
msgstr ""
"`{0}': ç¶æ¿ãããã¨ããã¡ã³ã `{1}' ã¯sealedã§ããããããªã¼ãã¼ã©ã¤ãã§ãã¾"
"ãã"
-#: ../mcs/mcs/class.cs:3427
+#: ../mcs/mcs/class.cs:3437
#, csharp-format
msgid "`{0}': type must be `{1}' to match overridden member `{2}'"
msgstr ""
"`{0}': ãªã¼ãã¼ã©ã¤ããããã¡ã³ã `{2}' ã«é©åããããã«ã¯ãåã `{1}' ã§ãªã"
"ãã°ãªãã¾ãã"
-#: ../mcs/mcs/class.cs:3431
+#: ../mcs/mcs/class.cs:3441
#, csharp-format
msgid "`{0}': return type must be `{1}' to match overridden member `{2}'"
msgstr ""
"`{0}': ãªã¼ãã¼ã©ã¤ããããã¡ã³ã `{2}' ã«é©åããã«ã¯ãæ»ãå¤å㯠`{1}' ã§ãª"
"ããã°ãªãã¾ãã"
-#: ../mcs/mcs/class.cs:3453
+#: ../mcs/mcs/class.cs:3463
#, csharp-format
msgid "`{0}' hides inherited abstract member `{1}'"
msgstr "`{0}' ã¯ç¶æ¿ãããabstractã¡ã³ã `{1}' ãé è½ãã¦ãã¾ãã¾ã"
-#: ../mcs/mcs/class.cs:3519
+#: ../mcs/mcs/class.cs:3529
#, csharp-format
msgid "A partial method `{0}' cannot explicitly implement an interface"
msgstr "é¨åã¡ã½ãã `{0}' ã¯ã¤ã³ã¿ã¼ãã§ã¼ã¹ãæç¤ºçã«å®è£
ã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:3527
+#: ../mcs/mcs/class.cs:3537
#, fuzzy, csharp-format
msgid "The type `{0}' in explicit interface declaration is not an interface"
msgstr ""
"æç¤ºçãªã¤ã³ã¿ã¼ãã§ã¼ã¹å®è£
ã§è¨è¿°ããã `{0}' ã¯ãã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ã¯ããã¾"
"ãã"
-#: ../mcs/mcs/class.cs:3556
+#: ../mcs/mcs/class.cs:3566
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
@@ -708,7 +708,7 @@ msgstr ""
"ä¸è²«æ§ã®ç¡ãã¢ã¯ã»ã¹å¶é: ãã©ã¡ã¼ã¿å `{0}' ã¯ã¤ã³ãã¯ãµ '{1}' ãããã¢ã¯ã»"
"ã¹ãéããã¦ãã¾ã"
-#: ../mcs/mcs/class.cs:3560
+#: ../mcs/mcs/class.cs:3570
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
@@ -717,7 +717,7 @@ msgstr ""
"ä¸è²«æ§ã®ç¡ãã¢ã¯ã»ã¹å¶é: ãã©ã¡ã¼ã¿å `{0}' ã¯æ¼ç®å '{1}' ãããã¢ã¯ã»ã¹ã"
"éããã¦ãã¾ã"
-#: ../mcs/mcs/class.cs:3564
+#: ../mcs/mcs/class.cs:3574
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
@@ -726,7 +726,7 @@ msgstr ""
"ä¸è²«æ§ã®ç¡ãã¢ã¯ã»ã¹å¶é: ãã©ã¡ã¼ã¿å `{0}' ã¯ã¡ã½ãã '{1}' ãããã¢ã¯ã»ã¹"
"ãéããã¦ãã¾ã"
-#: ../mcs/mcs/class.cs:3577
+#: ../mcs/mcs/class.cs:3587
#, csharp-format
msgid ""
"`{0}' is marked as an external but has no DllImport attribute. Consider "
@@ -735,7 +735,7 @@ msgstr ""
"`{0}' ã¯externalã¨ãã¦å®£è¨ããã¦ãã¾ãããDllImport屿§ããã¡ã¾ããã"
"DllImport屿§ã追å ãã¦ãå¤é¨å®è£
ãæå®ããããã«ãã¦ãã ãã"
-#: ../mcs/mcs/class.cs:3611
+#: ../mcs/mcs/class.cs:3621
#, csharp-format
msgid ""
"`{0}': cannot change access modifiers when overriding `{1}' inherited member "
@@ -744,7 +744,7 @@ msgstr ""
"`{0}': `{1}' ã®ç¶æ¿ãããã¡ã³ãã¼ `{2}' ããªã¼ãã¼ã©ã¤ãããã¨ããã¢ã¯ã»ã¹ä¿®"
"飾åã¯å¤æ´ã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:3715
+#: ../mcs/mcs/class.cs:3725
msgid ""
"The DllImport attribute must be specified on a method marked `static' and "
"`extern'"
@@ -752,12 +752,12 @@ msgstr ""
"`static'ãã¤`extern'ã§å®£è¨ãããã¡ã½ããã«ã¯ãDllImport屿§ãæå®ãããªããã°"
"ãªãã¾ãã"
-#: ../mcs/mcs/class.cs:3822
+#: ../mcs/mcs/class.cs:3832
#, csharp-format
msgid "`{0}': A partial method parameters cannot use `out' modifier"
msgstr "`{0}': é¨åã¡ã½ããã®ãã©ã¡ã¼ã¿ã§`out'修飾åã¯ä½¿ç¨ã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:3870
+#: ../mcs/mcs/class.cs:3880
#, csharp-format
msgid ""
"Conditional not valid on `{0}' because it is a constructor, destructor, "
@@ -766,48 +766,48 @@ msgstr ""
"Conditional㯠ã³ã³ã¹ãã©ã¯ã¿ããã¹ãã©ã¯ã¿ãæ¼ç®åã¾ãã¯æç¤ºçãªã¤ã³ã¿ã¼"
"ãã§ã¼ã¹ã®å®è£
ã§ãã `{0}' ã§ã¯ç¡å¹ã§ã"
-#: ../mcs/mcs/class.cs:4084
+#: ../mcs/mcs/class.cs:4094
#, csharp-format
msgid "Program `{0}' has more than one entry point defined: `{1}'"
msgstr "ããã°ã©ã `{0}' ã«ã¯è¤æ°ã®ã¨ã³ããªãã¤ã³ããå®ç¾©ããã¦ãã¾ã: `{1}'"
-#: ../mcs/mcs/class.cs:4115
+#: ../mcs/mcs/class.cs:4125
#, csharp-format
msgid "Conditional not valid on `{0}' because its return type is not void"
msgstr "Conditionalã¯æ»ãå¤åãvoidã§ãªã `{0}' ã§ã¯ç¡å¹ã§ã"
-#: ../mcs/mcs/class.cs:4120
+#: ../mcs/mcs/class.cs:4130
#, csharp-format
msgid "Conditional not valid on `{0}' because it is an override method"
msgstr "Conditionalã¯ãªã¼ãã¼ã©ã¤ãã¡ã½ããã§ãã `{0}' ã§ã¯ç¡å¹ã§ã"
-#: ../mcs/mcs/class.cs:4125
+#: ../mcs/mcs/class.cs:4135
msgid "Conditional not valid on interface members"
msgstr "Conditionalã¯ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¡ã³ãã§ã¯ç¡å¹ã§ã"
-#: ../mcs/mcs/class.cs:4131
+#: ../mcs/mcs/class.cs:4141
#, csharp-format
msgid "Conditional member `{0}' cannot implement interface member `{1}'"
msgstr ""
"Conditionalã¡ã³ã `{0}' ã¯ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¡ã³ã `{1}' ãå®è£
ã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:4138
+#: ../mcs/mcs/class.cs:4148
#, csharp-format
msgid "Conditional method `{0}' cannot have an out parameter"
msgstr "Conditionalã¡ã½ãã `{0}' ã§ã¯outãã©ã¡ã¼ã¿ãæå®ã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:4184
+#: ../mcs/mcs/class.cs:4194
#, fuzzy, csharp-format
msgid "Do not override `{0}'. Use destructor syntax instead"
msgstr ""
"`{0}' ãç´æ¥ä½¿ç¨ããã代ããã«ãã©ã¡ã¼ã¿ä¿®é£¾å `this' ã使ç¨ãã¦ãã ãã"
-#: ../mcs/mcs/class.cs:4221
+#: ../mcs/mcs/class.cs:4231
#, csharp-format
msgid "`{0}': Extension methods cannot be defined in a nested class"
msgstr "`{0}': æ¡å¼µã¡ã½ããã¯ãã¹ãããã¯ã©ã¹ã®ä¸ã§ã¯å®ç¾©ã§ãã¾ãã"
-#: ../mcs/mcs/class.cs:4226
+#: ../mcs/mcs/class.cs:4236
#, csharp-format
msgid ""
"`{0}': Extension methods cannot be declared without a reference to System."
@@ -818,335 +818,335 @@ msgstr ""
"ããã¢ã»ã³ããªåç
§ã追å ããããã¾ãã¯æåã®ãã©ã¡ã¼ã¿ãã `this' 修飾åãå"
"ãé¤ãã¦ãã ããã"
-#: ../mcs/mcs/class.cs:4240
+#: ../mcs/mcs/class.cs:4250
#, csharp-format
msgid "`{0}': Extension methods must be defined in a non-generic static class"
msgstr ""
-#: ../mcs/mcs/class.cs:4296
+#: ../mcs/mcs/class.cs:4306
#, csharp-format
msgid ""
"A partial method `{0}' implementation is missing a partial method declaration"
msgstr ""
-#: ../mcs/mcs/class.cs:4327
+#: ../mcs/mcs/class.cs:4337
#, csharp-format
msgid "Method or delegate cannot return type `{0}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4412
+#: ../mcs/mcs/class.cs:4422
#, csharp-format
msgid "`{0}': Struct constructors cannot call base constructors"
msgstr ""
-#: ../mcs/mcs/class.cs:4445
+#: ../mcs/mcs/class.cs:4455
#, csharp-format
msgid "Constructor `{0}' cannot call itself"
msgstr ""
-#: ../mcs/mcs/class.cs:4570
+#: ../mcs/mcs/class.cs:4580
#, csharp-format
msgid "`{0}': The static constructor must be parameterless"
msgstr ""
-#: ../mcs/mcs/class.cs:4590
+#: ../mcs/mcs/class.cs:4600
msgid "Structs cannot contain explicit parameterless constructors"
msgstr ""
-#: ../mcs/mcs/class.cs:4642
+#: ../mcs/mcs/class.cs:4652
#, csharp-format
msgid ""
"`{0}': A class with the ComImport attribute cannot have a user-defined "
"constructor"
msgstr ""
-#: ../mcs/mcs/class.cs:4933
+#: ../mcs/mcs/class.cs:4943
#, csharp-format
msgid "`{0}' is an accessor not found in interface member `{1}{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4939
+#: ../mcs/mcs/class.cs:4949
#, csharp-format
msgid ""
"`{0}.{1}' in explicit interface declaration is not a member of interface"
msgstr ""
-#: ../mcs/mcs/class.cs:4946
+#: ../mcs/mcs/class.cs:4956
#, csharp-format
msgid ""
"`{0}' explicit method implementation cannot implement `{1}' because it is an "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:4956
+#: ../mcs/mcs/class.cs:4966
#, csharp-format
msgid "Method `{0}' cannot implement interface accessor `{1}.{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4963
+#: ../mcs/mcs/class.cs:4973
#, csharp-format
msgid ""
"Accessor `{0}' cannot implement interface member `{1}' for type `{2}'. Use "
"an explicit interface implementation"
msgstr ""
-#: ../mcs/mcs/class.cs:4970
+#: ../mcs/mcs/class.cs:4980
#, csharp-format
msgid ""
"Accessor `{0}' must be declared public to implement interface member `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4994
+#: ../mcs/mcs/class.cs:5004
#, csharp-format
msgid ""
"`{0}': the explicit interface implementation cannot introduce the params "
"modifier"
msgstr ""
-#: ../mcs/mcs/class.cs:5280
+#: ../mcs/mcs/class.cs:5290
#, csharp-format
msgid "New virtual member `{0}' is declared in a sealed class `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5295
+#: ../mcs/mcs/class.cs:5305
msgid "Inconsistent accessibility: property type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5300
+#: ../mcs/mcs/class.cs:5310
msgid "Inconsistent accessibility: indexer return type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5306 ../mcs/mcs/class.cs:5311
+#: ../mcs/mcs/class.cs:5316 ../mcs/mcs/class.cs:5321
#: ../mcs/mcs/delegate.cs:220
msgid "Inconsistent accessibility: return type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5316
+#: ../mcs/mcs/class.cs:5326
msgid "Inconsistent accessibility: field type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5326
+#: ../mcs/mcs/class.cs:5336
#, csharp-format
msgid "Field or property cannot be of type `{0}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5384
+#: ../mcs/mcs/class.cs:5394
msgid ""
"The modifier 'abstract' is not valid on fields. Try using a property instead"
msgstr ""
-#: ../mcs/mcs/class.cs:5399
+#: ../mcs/mcs/class.cs:5409
msgid ""
"The FieldOffset attribute can only be placed on members of types marked with "
"the StructLayout(LayoutKind.Explicit)"
msgstr ""
-#: ../mcs/mcs/class.cs:5404
+#: ../mcs/mcs/class.cs:5414
msgid "The FieldOffset attribute is not allowed on static or const fields"
msgstr ""
-#: ../mcs/mcs/class.cs:5411
+#: ../mcs/mcs/class.cs:5421
msgid ""
"Do not use 'System.Runtime.CompilerServices.FixedBuffer' attribute. Use the "
"'fixed' field modifier instead"
msgstr ""
-#: ../mcs/mcs/class.cs:5489
+#: ../mcs/mcs/class.cs:5499
#, csharp-format
msgid ""
"`{0}': Instance field types marked with StructLayout(LayoutKind.Explicit) "
"must have a FieldOffset attribute"
msgstr ""
-#: ../mcs/mcs/class.cs:5498
+#: ../mcs/mcs/class.cs:5508
#, csharp-format
msgid "`{0}': cannot declare variables of static types"
msgstr ""
-#: ../mcs/mcs/class.cs:5613
+#: ../mcs/mcs/class.cs:5623
#, csharp-format
msgid ""
"`{0}': Fixed size buffers type must be one of the following: bool, byte, "
"short, int, long, char, sbyte, ushort, uint, ulong, float or double"
msgstr ""
-#: ../mcs/mcs/class.cs:5640
+#: ../mcs/mcs/class.cs:5650
#, csharp-format
msgid "`{0}': Fixed size buffer fields may only be members of structs"
msgstr ""
-#: ../mcs/mcs/class.cs:5659
+#: ../mcs/mcs/class.cs:5669
#, csharp-format
msgid "`{0}': Fixed size buffers must have a length greater than zero"
msgstr ""
-#: ../mcs/mcs/class.cs:5666
+#: ../mcs/mcs/class.cs:5676
#, csharp-format
msgid ""
"Fixed size buffer `{0}' of length `{1}' and type `{2}' exceeded 2^31 limit"
msgstr ""
-#: ../mcs/mcs/class.cs:5858
+#: ../mcs/mcs/class.cs:5868
#, csharp-format
msgid "Struct member `{0}' of type `{1}' causes a cycle in the struct layout"
msgstr ""
-#: ../mcs/mcs/class.cs:5911
+#: ../mcs/mcs/class.cs:5921
#, csharp-format
msgid "`{0}': A volatile field cannot be of the type `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5916
+#: ../mcs/mcs/class.cs:5926
#, csharp-format
msgid "`{0}': A field cannot be both volatile and readonly"
msgstr ""
-#: ../mcs/mcs/class.cs:6069
+#: ../mcs/mcs/class.cs:6079
#, csharp-format
msgid ""
"Attribute `{0}' is not valid on property or event accessors. It is valid on `"
"{1}' declarations only"
msgstr ""
-#: ../mcs/mcs/class.cs:6169 ../mcs/mcs/decl.cs:2800
+#: ../mcs/mcs/class.cs:6179 ../mcs/mcs/decl.cs:2800
#, csharp-format
msgid "A member `{0}' is already reserved"
msgstr ""
-#: ../mcs/mcs/class.cs:6372
+#: ../mcs/mcs/class.cs:6382
#, csharp-format
msgid "Explicit interface implementation `{0}' is missing accessor `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:6389
+#: ../mcs/mcs/class.cs:6399
#, csharp-format
msgid ""
"`{0}': accessibility modifiers may not be used on accessors in an interface"
msgstr ""
-#: ../mcs/mcs/class.cs:6393
+#: ../mcs/mcs/class.cs:6403
#, csharp-format
msgid "`{0}': abstract properties cannot have private accessors"
msgstr ""
-#: ../mcs/mcs/class.cs:6460
+#: ../mcs/mcs/class.cs:6470
#, csharp-format
msgid ""
"The accessibility modifier of the `{0}' accessor must be more restrictive "
"than the modifier of the property or indexer `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:6528
+#: ../mcs/mcs/class.cs:6538
#, csharp-format
msgid ""
"`{0}': Cannot specify accessibility modifiers for both accessors of the "
"property or indexer"
msgstr ""
-#: ../mcs/mcs/class.cs:6536
+#: ../mcs/mcs/class.cs:6546
#, csharp-format
msgid ""
"`{0}': accessibility modifiers on accessors may only be used if the property "
"or indexer has both a get and a set accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6585
+#: ../mcs/mcs/class.cs:6595
#, csharp-format
msgid ""
"`{0}.get': cannot override because `{1}' does not have an overridable get "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6600
+#: ../mcs/mcs/class.cs:6610
#, csharp-format
msgid ""
"`{0}.set': cannot override because `{1}' does not have an overridable set "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6799
+#: ../mcs/mcs/class.cs:6809
#, csharp-format
msgid ""
"Automatically implemented property `{0}' cannot be used inside a type with "
"an explicit StructLayout attribute"
msgstr ""
-#: ../mcs/mcs/class.cs:7153
+#: ../mcs/mcs/class.cs:7163
#, csharp-format
msgid "`{0}': abstract event cannot have an initializer"
msgstr ""
-#: ../mcs/mcs/class.cs:7359
+#: ../mcs/mcs/class.cs:7369
#, csharp-format
msgid "`{0}': event must be of a delegate type"
msgstr ""
-#: ../mcs/mcs/class.cs:7567
+#: ../mcs/mcs/class.cs:7577
msgid ""
"The `IndexerName' attribute is valid only on an indexer that is not an "
"explicit interface member declaration"
msgstr ""
-#: ../mcs/mcs/class.cs:7574
+#: ../mcs/mcs/class.cs:7584
msgid "Cannot set the `IndexerName' attribute on an indexer marked override"
msgstr ""
-#: ../mcs/mcs/class.cs:7771
+#: ../mcs/mcs/class.cs:7781
#, csharp-format
msgid "User-defined operator `{0}' must be declared static and public"
msgstr ""
-#: ../mcs/mcs/class.cs:7801
+#: ../mcs/mcs/class.cs:7811
msgid ""
"User-defined operator cannot take an object of the enclosing type and "
"convert to an object of the enclosing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7812
+#: ../mcs/mcs/class.cs:7822
msgid "User-defined conversion must convert to or from the enclosing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7821
+#: ../mcs/mcs/class.cs:7831
#, csharp-format
msgid ""
"User-defined conversion `{0}' cannot convert to or from an interface type"
msgstr ""
-#: ../mcs/mcs/class.cs:7828
+#: ../mcs/mcs/class.cs:7838
#, csharp-format
msgid "User-defined conversion `{0}' cannot convert to or from a base class"
msgstr ""
-#: ../mcs/mcs/class.cs:7834
+#: ../mcs/mcs/class.cs:7844
#, csharp-format
msgid "User-defined conversion `{0}' cannot convert to or from a derived class"
msgstr ""
-#: ../mcs/mcs/class.cs:7842
+#: ../mcs/mcs/class.cs:7852
msgid ""
"Overloaded shift operator must have the type of the first operand be the "
"containing type, and the type of the second operand must be int"
msgstr ""
-#: ../mcs/mcs/class.cs:7851
+#: ../mcs/mcs/class.cs:7861
msgid ""
"The return type for ++ or -- operator must be the containing type or derived "
"from the containing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7856
+#: ../mcs/mcs/class.cs:7866
msgid "The parameter type for ++ or -- operator must be the containing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7863
+#: ../mcs/mcs/class.cs:7873
msgid "The parameter type of a unary operator must be the containing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7871
+#: ../mcs/mcs/class.cs:7881
msgid "The return type of operator True or False must be bool"
msgstr ""
-#: ../mcs/mcs/class.cs:7884
+#: ../mcs/mcs/class.cs:7894
msgid "One of the parameters of a binary operator must be the containing type"
msgstr ""
@@ -2124,7 +2124,7 @@ msgstr ""
msgid "Type byte, sbyte, short, ushort, int, uint, long or ulong expected"
msgstr ""
-#: ../mcs/mcs/eval.cs:501
+#: ../mcs/mcs/eval.cs:529
msgid "Detection Parsing Error"
msgstr ""
@@ -2272,72 +2272,72 @@ msgstr ""
msgid "Cannot create an instance of the abstract class or interface `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:5761
+#: ../mcs/mcs/expression.cs:5771
msgid "Invalid rank specifier: expected `,' or `]'"
msgstr ""
-#: ../mcs/mcs/expression.cs:5766
+#: ../mcs/mcs/expression.cs:5776
msgid "Cannot create an array with a negative size"
msgstr ""
-#: ../mcs/mcs/expression.cs:5783 ../mcs/mcs/statement.cs:3049
+#: ../mcs/mcs/expression.cs:5793 ../mcs/mcs/statement.cs:3049
msgid "A constant value is expected"
msgstr ""
-#: ../mcs/mcs/expression.cs:5870
+#: ../mcs/mcs/expression.cs:5880
msgid "An expression tree cannot contain a multidimensional array initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:5964
+#: ../mcs/mcs/expression.cs:5974
msgid ""
"Can only use array initializer expressions to assign to array types. Try "
"using a new expression instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:5969
+#: ../mcs/mcs/expression.cs:5979
msgid ""
"An implicitly typed local variable declarator cannot use an array initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:6044
+#: ../mcs/mcs/expression.cs:6054
msgid "New invocation: Can not find a constructor for this argument list"
msgstr ""
-#: ../mcs/mcs/expression.cs:6483
+#: ../mcs/mcs/expression.cs:6493
msgid ""
"The type of an implicitly typed array cannot be inferred from the "
"initializer. Try specifying array type explicitly"
msgstr ""
-#: ../mcs/mcs/expression.cs:6661
+#: ../mcs/mcs/expression.cs:6671
msgid ""
"Anonymous methods inside structs cannot access instance members of `this'. "
"Consider copying `this' to a local variable outside the anonymous method and "
"using the local instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:6728
+#: ../mcs/mcs/expression.cs:6738
msgid "Cannot take the address of `this' because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6730
+#: ../mcs/mcs/expression.cs:6740
msgid "Cannot pass `this' as a ref or out argument because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6732
+#: ../mcs/mcs/expression.cs:6742
msgid "Cannot assign to `this' because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6839
+#: ../mcs/mcs/expression.cs:6849
msgid "An expression tree cannot contain a method with variable arguments"
msgstr ""
-#: ../mcs/mcs/expression.cs:6949
+#: ../mcs/mcs/expression.cs:6959
#, csharp-format
msgid "`{0}': an attribute argument cannot use type parameters"
msgstr ""
-#: ../mcs/mcs/expression.cs:7182
+#: ../mcs/mcs/expression.cs:7192
#, csharp-format
msgid ""
"`{0}' does not have a predefined size, therefore sizeof can only be used in "
@@ -2345,40 +2345,40 @@ msgid ""
"SizeOf)"
msgstr ""
-#: ../mcs/mcs/expression.cs:7237
+#: ../mcs/mcs/expression.cs:7247
#, csharp-format
msgid "Alias `{0}' not found"
msgstr ""
-#: ../mcs/mcs/expression.cs:7248
+#: ../mcs/mcs/expression.cs:7258
#, csharp-format
msgid ""
"Alias `{0}' cannot be used with '::' since it denotes a type. Consider "
"replacing '::' with '.'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7264
+#: ../mcs/mcs/expression.cs:7274
#, csharp-format
msgid ""
"A namespace alias qualifier `{0}' did not resolve to a namespace or a type"
msgstr ""
-#: ../mcs/mcs/expression.cs:7403
+#: ../mcs/mcs/expression.cs:7413
#, csharp-format
msgid "`{0}': cannot reference a type through an expression; try `{1}' instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:7500
+#: ../mcs/mcs/expression.cs:7510
#, csharp-format
msgid "A nested type cannot be specified through a type parameter `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7568
+#: ../mcs/mcs/expression.cs:7578
#, csharp-format
msgid "The nested type `{0}' does not exist in the type `{1}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7580
+#: ../mcs/mcs/expression.cs:7590
#, csharp-format
msgid ""
"Type `{0}' does not contain a definition for `{1}' and no extension method `"
@@ -2386,101 +2386,101 @@ msgid ""
"assembly reference?)"
msgstr ""
-#: ../mcs/mcs/expression.cs:7798
+#: ../mcs/mcs/expression.cs:7808
msgid "Cannot apply indexing with [] to an expression of type `System.Array'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7904
+#: ../mcs/mcs/expression.cs:7914
#, csharp-format
msgid "Wrong number of indexes `{0}' inside [], expected `{1}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8408
+#: ../mcs/mcs/expression.cs:8418
#, csharp-format
msgid ""
"A property or indexer `{0}' may not be passed as an out or ref parameter"
msgstr ""
-#: ../mcs/mcs/expression.cs:8433
+#: ../mcs/mcs/expression.cs:8443
#, csharp-format
msgid "Cannot apply indexing with [] to an expression of type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8463
+#: ../mcs/mcs/expression.cs:8473
#, csharp-format
msgid "The read only property or indexer `{0}' cannot be assigned to"
msgstr ""
-#: ../mcs/mcs/expression.cs:8471
+#: ../mcs/mcs/expression.cs:8481
#, csharp-format
msgid ""
"The property or indexer `{0}' cannot be used in this context because it "
"lacks a `{1}' accessor"
msgstr ""
-#: ../mcs/mcs/expression.cs:8493
+#: ../mcs/mcs/expression.cs:8503
#, csharp-format
msgid ""
"The property or indexer `{0}' cannot be used in this context because a `{1}' "
"accessor is inaccessible"
msgstr ""
-#: ../mcs/mcs/expression.cs:8956
+#: ../mcs/mcs/expression.cs:8966
#, csharp-format
msgid "Array elements cannot be of type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8962
+#: ../mcs/mcs/expression.cs:8972
#, csharp-format
msgid "Array elements cannot be of static type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:9121
+#: ../mcs/mcs/expression.cs:9131
msgid "Cannot use a negative size with stackalloc"
msgstr ""
-#: ../mcs/mcs/expression.cs:9248
+#: ../mcs/mcs/expression.cs:9258
#, csharp-format
msgid ""
"Member `{0}' cannot be initialized. An object initializer may only be used "
"for fields, or properties"
msgstr ""
-#: ../mcs/mcs/expression.cs:9251
+#: ../mcs/mcs/expression.cs:9261
#, csharp-format
msgid ""
" Static field or property `{0}' cannot be assigned in an object initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:9424
+#: ../mcs/mcs/expression.cs:9434
#, csharp-format
msgid ""
"A field or property `{0}' cannot be initialized with a collection object "
"initializer because type `{1}' does not implement `{2}' interface"
msgstr ""
-#: ../mcs/mcs/expression.cs:9435
+#: ../mcs/mcs/expression.cs:9445
#, csharp-format
msgid "Inconsistent `{0}' member declaration"
msgstr ""
-#: ../mcs/mcs/expression.cs:9443
+#: ../mcs/mcs/expression.cs:9453
#, csharp-format
msgid ""
"An object initializer includes more than one member `{0}' initialization"
msgstr ""
-#: ../mcs/mcs/expression.cs:9460
+#: ../mcs/mcs/expression.cs:9470
#, csharp-format
msgid "Cannot initialize object of type `{0}' with a collection initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:9721
+#: ../mcs/mcs/expression.cs:9731
#, fuzzy
msgid "Anonymous types cannot be used in this expression"
msgstr "å¿åã¡ã½ãããå¼ããªã¼ã«å¤æãããã¨ã¯ã§ãã¾ãã"
-#: ../mcs/mcs/expression.cs:9828
+#: ../mcs/mcs/expression.cs:9838
#, csharp-format
msgid "An anonymous type property `{0}' cannot be initialized with `{1}'"
msgstr ""
@@ -2811,77 +2811,77 @@ msgstr ""
msgid "An assembly `{0}' is used without being referenced"
msgstr ""
-#: ../mcs/mcs/namespace.cs:131
+#: ../mcs/mcs/namespace.cs:134
#, csharp-format
msgid "The imported type `{0}' is defined multiple times"
msgstr ""
-#: ../mcs/mcs/namespace.cs:257
+#: ../mcs/mcs/namespace.cs:268
#, csharp-format
msgid ""
"The type or namespace name `{0}' could not be found in the global namespace "
"(are you missing an assembly reference?)"
msgstr ""
-#: ../mcs/mcs/namespace.cs:378
+#: ../mcs/mcs/namespace.cs:388
#, csharp-format
msgid ""
"The type or namespace name `{0}' does not exist in the namespace `{1}'. Are "
"you missing an assembly reference?"
msgstr ""
-#: ../mcs/mcs/namespace.cs:385
+#: ../mcs/mcs/namespace.cs:395
#, csharp-format
msgid "Using the generic type `{0}' requires `{1}' type argument(s)"
msgstr ""
-#: ../mcs/mcs/namespace.cs:407
+#: ../mcs/mcs/namespace.cs:417
#, csharp-format
msgid "The non-generic {0} `{1}' cannot be used with the type arguments"
msgstr ""
-#: ../mcs/mcs/namespace.cs:651
+#: ../mcs/mcs/namespace.cs:661
#, csharp-format
msgid ""
"`{0}' is a type not a namespace. A using namespace directive can only be "
"applied to namespaces"
msgstr ""
-#: ../mcs/mcs/namespace.cs:678
+#: ../mcs/mcs/namespace.cs:688
#, csharp-format
msgid "The extern alias `{0}' was not specified in -reference option"
msgstr ""
-#: ../mcs/mcs/namespace.cs:886 ../mcs/mcs/namespace.cs:908
+#: ../mcs/mcs/namespace.cs:896 ../mcs/mcs/namespace.cs:918
msgid ""
"A using clause must precede all other namespace elements except extern alias "
"declarations"
msgstr ""
-#: ../mcs/mcs/namespace.cs:932
+#: ../mcs/mcs/namespace.cs:942
msgid "An extern alias declaration must precede all other elements"
msgstr ""
-#: ../mcs/mcs/namespace.cs:950
+#: ../mcs/mcs/namespace.cs:960
#, csharp-format
msgid "The using alias `{0}' appeared previously in this namespace"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1023
+#: ../mcs/mcs/namespace.cs:1033
#, csharp-format
msgid "`{0}' is an ambiguous reference between `{1}' and `{2}'"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1062
+#: ../mcs/mcs/namespace.cs:1072
#, csharp-format
msgid "Namespace `{0}' contains a definition with same name as alias `{1}'"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1155
+#: ../mcs/mcs/namespace.cs:1165
msgid "You cannot redefine the global extern alias"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1160
+#: ../mcs/mcs/namespace.cs:1170
#, csharp-format
msgid ""
"The type or namespace name `{0}' could not be found. Are you missing a using "
@@ -3101,68 +3101,68 @@ msgstr ""
msgid "A value of an integral type or string expected for switch"
msgstr ""
-#: ../mcs/mcs/statement.cs:4087
+#: ../mcs/mcs/statement.cs:4089
#, csharp-format
msgid "`{0}' is not a reference type as required by the lock statement"
msgstr ""
-#: ../mcs/mcs/statement.cs:4404
+#: ../mcs/mcs/statement.cs:4406
msgid "A fixed statement cannot use an implicitly typed local variable"
msgstr ""
-#: ../mcs/mcs/statement.cs:4414
+#: ../mcs/mcs/statement.cs:4416
msgid "The type of locals declared in a fixed statement must be a pointer type"
msgstr ""
-#: ../mcs/mcs/statement.cs:4438
+#: ../mcs/mcs/statement.cs:4440
msgid ""
"The right hand side of a fixed statement assignment may not be a cast "
"expression"
msgstr ""
-#: ../mcs/mcs/statement.cs:4515
+#: ../mcs/mcs/statement.cs:4517
msgid ""
"You cannot use the fixed statement to take the address of an already fixed "
"expression"
msgstr ""
-#: ../mcs/mcs/statement.cs:4765
+#: ../mcs/mcs/statement.cs:4767
msgid "Try statement already has an empty catch block"
msgstr ""
-#: ../mcs/mcs/statement.cs:4803
+#: ../mcs/mcs/statement.cs:4805
#, csharp-format
msgid ""
"A previous catch clause already catches all exceptions of this or a super "
"type `{0}'"
msgstr ""
-#: ../mcs/mcs/statement.cs:4978 ../mcs/mcs/statement.cs:5093
+#: ../mcs/mcs/statement.cs:4980 ../mcs/mcs/statement.cs:5095
msgid "Internal error: No Dispose method which takes 0 parameters."
msgstr ""
-#: ../mcs/mcs/statement.cs:5050
+#: ../mcs/mcs/statement.cs:5052
#, csharp-format
msgid ""
"`{0}': type used in a using statement must be implicitly convertible to "
"`System.IDisposable'"
msgstr ""
-#: ../mcs/mcs/statement.cs:5490
+#: ../mcs/mcs/statement.cs:5492
#, csharp-format
msgid ""
"foreach statement requires that the return type `{0}' of `{1}' must have a "
"suitable public MoveNext method and public Current property"
msgstr ""
-#: ../mcs/mcs/statement.cs:5575
+#: ../mcs/mcs/statement.cs:5577
#, csharp-format
msgid ""
"foreach statement cannot operate on variables of type `{0}' because it does "
"not contain a definition for `GetEnumerator' or is not accessible"
msgstr ""
-#: ../mcs/mcs/statement.cs:5627
+#: ../mcs/mcs/statement.cs:5629
#, csharp-format
msgid ""
"foreach statement cannot operate on variables of type `{0}' because it "
@@ -3170,11 +3170,11 @@ msgid ""
"implementation"
msgstr ""
-#: ../mcs/mcs/statement.cs:5922
+#: ../mcs/mcs/statement.cs:5924
msgid "Use of null is not valid in this context"
msgstr ""
-#: ../mcs/mcs/statement.cs:5932
+#: ../mcs/mcs/statement.cs:5934
#, csharp-format
msgid "Foreach statement cannot operate on a `{0}'"
msgstr ""
diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot
index f9687c0..ef64e69 100644
--- a/po/mcs/mcs.pot
+++ b/po/mcs/mcs.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: mono 2.4\n"
+"Project-Id-Version: mono 2.4.2.3\n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
-"POT-Creation-Date: 2009-03-13 14:51+0000\n"
+"POT-Creation-Date: 2009-07-27 16:32+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -571,161 +571,161 @@ msgstr ""
msgid "Static class `{0}' cannot implement interfaces"
msgstr ""
-#: ../mcs/mcs/class.cs:3040
+#: ../mcs/mcs/class.cs:3050
#, csharp-format
msgid "`{0}': Structs cannot have instance field initializers"
msgstr ""
-#: ../mcs/mcs/class.cs:3348
+#: ../mcs/mcs/class.cs:3358
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not an event"
msgstr ""
-#: ../mcs/mcs/class.cs:3350
+#: ../mcs/mcs/class.cs:3360
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not a property"
msgstr ""
-#: ../mcs/mcs/class.cs:3352
+#: ../mcs/mcs/class.cs:3362
#, csharp-format
msgid "`{0}': cannot override because `{1}' is not a method"
msgstr ""
-#: ../mcs/mcs/class.cs:3354
+#: ../mcs/mcs/class.cs:3364
#, csharp-format
msgid "`{0}' is marked as an override but no suitable {1} found to override"
msgstr ""
-#: ../mcs/mcs/class.cs:3400
+#: ../mcs/mcs/class.cs:3410
#, csharp-format
msgid ""
"`{0}': cannot override inherited member `{1}' because it is not marked "
"virtual, abstract or override"
msgstr ""
-#: ../mcs/mcs/class.cs:3409
+#: ../mcs/mcs/class.cs:3419
#, csharp-format
msgid "`{0}': cannot override inherited member `{1}' because it is sealed"
msgstr ""
-#: ../mcs/mcs/class.cs:3427
+#: ../mcs/mcs/class.cs:3437
#, csharp-format
msgid "`{0}': type must be `{1}' to match overridden member `{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3431
+#: ../mcs/mcs/class.cs:3441
#, csharp-format
msgid "`{0}': return type must be `{1}' to match overridden member `{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3453
+#: ../mcs/mcs/class.cs:3463
#, csharp-format
msgid "`{0}' hides inherited abstract member `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3519
+#: ../mcs/mcs/class.cs:3529
#, csharp-format
msgid "A partial method `{0}' cannot explicitly implement an interface"
msgstr ""
-#: ../mcs/mcs/class.cs:3527
+#: ../mcs/mcs/class.cs:3537
#, csharp-format
msgid "The type `{0}' in explicit interface declaration is not an interface"
msgstr ""
-#: ../mcs/mcs/class.cs:3556
+#: ../mcs/mcs/class.cs:3566
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
"indexer `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3560
+#: ../mcs/mcs/class.cs:3570
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
"operator `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3564
+#: ../mcs/mcs/class.cs:3574
#, csharp-format
msgid ""
"Inconsistent accessibility: parameter type `{0}' is less accessible than "
"method `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3577
+#: ../mcs/mcs/class.cs:3587
#, csharp-format
msgid ""
"`{0}' is marked as an external but has no DllImport attribute. Consider "
"adding a DllImport attribute to specify the external implementation"
msgstr ""
-#: ../mcs/mcs/class.cs:3611
+#: ../mcs/mcs/class.cs:3621
#, csharp-format
msgid ""
"`{0}': cannot change access modifiers when overriding `{1}' inherited member "
"`{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:3715
+#: ../mcs/mcs/class.cs:3725
msgid ""
"The DllImport attribute must be specified on a method marked `static' and "
"`extern'"
msgstr ""
-#: ../mcs/mcs/class.cs:3822
+#: ../mcs/mcs/class.cs:3832
#, csharp-format
msgid "`{0}': A partial method parameters cannot use `out' modifier"
msgstr ""
-#: ../mcs/mcs/class.cs:3870
+#: ../mcs/mcs/class.cs:3880
#, csharp-format
msgid ""
"Conditional not valid on `{0}' because it is a constructor, destructor, "
"operator or explicit interface implementation"
msgstr ""
-#: ../mcs/mcs/class.cs:4084
+#: ../mcs/mcs/class.cs:4094
#, csharp-format
msgid "Program `{0}' has more than one entry point defined: `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4115
+#: ../mcs/mcs/class.cs:4125
#, csharp-format
msgid "Conditional not valid on `{0}' because its return type is not void"
msgstr ""
-#: ../mcs/mcs/class.cs:4120
+#: ../mcs/mcs/class.cs:4130
#, csharp-format
msgid "Conditional not valid on `{0}' because it is an override method"
msgstr ""
-#: ../mcs/mcs/class.cs:4125
+#: ../mcs/mcs/class.cs:4135
msgid "Conditional not valid on interface members"
msgstr ""
-#: ../mcs/mcs/class.cs:4131
+#: ../mcs/mcs/class.cs:4141
#, csharp-format
msgid "Conditional member `{0}' cannot implement interface member `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4138
+#: ../mcs/mcs/class.cs:4148
#, csharp-format
msgid "Conditional method `{0}' cannot have an out parameter"
msgstr ""
-#: ../mcs/mcs/class.cs:4184
+#: ../mcs/mcs/class.cs:4194
#, csharp-format
msgid "Do not override `{0}'. Use destructor syntax instead"
msgstr ""
-#: ../mcs/mcs/class.cs:4221
+#: ../mcs/mcs/class.cs:4231
#, csharp-format
msgid "`{0}': Extension methods cannot be defined in a nested class"
msgstr ""
-#: ../mcs/mcs/class.cs:4226
+#: ../mcs/mcs/class.cs:4236
#, csharp-format
msgid ""
"`{0}': Extension methods cannot be declared without a reference to System."
@@ -733,335 +733,335 @@ msgid ""
"the first parameter"
msgstr ""
-#: ../mcs/mcs/class.cs:4240
+#: ../mcs/mcs/class.cs:4250
#, csharp-format
msgid "`{0}': Extension methods must be defined in a non-generic static class"
msgstr ""
-#: ../mcs/mcs/class.cs:4296
+#: ../mcs/mcs/class.cs:4306
#, csharp-format
msgid ""
"A partial method `{0}' implementation is missing a partial method declaration"
msgstr ""
-#: ../mcs/mcs/class.cs:4327
+#: ../mcs/mcs/class.cs:4337
#, csharp-format
msgid "Method or delegate cannot return type `{0}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4412
+#: ../mcs/mcs/class.cs:4422
#, csharp-format
msgid "`{0}': Struct constructors cannot call base constructors"
msgstr ""
-#: ../mcs/mcs/class.cs:4445
+#: ../mcs/mcs/class.cs:4455
#, csharp-format
msgid "Constructor `{0}' cannot call itself"
msgstr ""
-#: ../mcs/mcs/class.cs:4570
+#: ../mcs/mcs/class.cs:4580
#, csharp-format
msgid "`{0}': The static constructor must be parameterless"
msgstr ""
-#: ../mcs/mcs/class.cs:4590
+#: ../mcs/mcs/class.cs:4600
msgid "Structs cannot contain explicit parameterless constructors"
msgstr ""
-#: ../mcs/mcs/class.cs:4642
+#: ../mcs/mcs/class.cs:4652
#, csharp-format
msgid ""
"`{0}': A class with the ComImport attribute cannot have a user-defined "
"constructor"
msgstr ""
-#: ../mcs/mcs/class.cs:4933
+#: ../mcs/mcs/class.cs:4943
#, csharp-format
msgid "`{0}' is an accessor not found in interface member `{1}{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4939
+#: ../mcs/mcs/class.cs:4949
#, csharp-format
msgid ""
"`{0}.{1}' in explicit interface declaration is not a member of interface"
msgstr ""
-#: ../mcs/mcs/class.cs:4946
+#: ../mcs/mcs/class.cs:4956
#, csharp-format
msgid ""
"`{0}' explicit method implementation cannot implement `{1}' because it is an "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:4956
+#: ../mcs/mcs/class.cs:4966
#, csharp-format
msgid "Method `{0}' cannot implement interface accessor `{1}.{2}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4963
+#: ../mcs/mcs/class.cs:4973
#, csharp-format
msgid ""
"Accessor `{0}' cannot implement interface member `{1}' for type `{2}'. Use "
"an explicit interface implementation"
msgstr ""
-#: ../mcs/mcs/class.cs:4970
+#: ../mcs/mcs/class.cs:4980
#, csharp-format
msgid ""
"Accessor `{0}' must be declared public to implement interface member `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:4994
+#: ../mcs/mcs/class.cs:5004
#, csharp-format
msgid ""
"`{0}': the explicit interface implementation cannot introduce the params "
"modifier"
msgstr ""
-#: ../mcs/mcs/class.cs:5280
+#: ../mcs/mcs/class.cs:5290
#, csharp-format
msgid "New virtual member `{0}' is declared in a sealed class `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5295
+#: ../mcs/mcs/class.cs:5305
msgid "Inconsistent accessibility: property type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5300
+#: ../mcs/mcs/class.cs:5310
msgid "Inconsistent accessibility: indexer return type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5306 ../mcs/mcs/class.cs:5311
+#: ../mcs/mcs/class.cs:5316 ../mcs/mcs/class.cs:5321
#: ../mcs/mcs/delegate.cs:220
msgid "Inconsistent accessibility: return type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5316
+#: ../mcs/mcs/class.cs:5326
msgid "Inconsistent accessibility: field type `"
msgstr ""
-#: ../mcs/mcs/class.cs:5326
+#: ../mcs/mcs/class.cs:5336
#, csharp-format
msgid "Field or property cannot be of type `{0}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5384
+#: ../mcs/mcs/class.cs:5394
msgid ""
"The modifier 'abstract' is not valid on fields. Try using a property instead"
msgstr ""
-#: ../mcs/mcs/class.cs:5399
+#: ../mcs/mcs/class.cs:5409
msgid ""
"The FieldOffset attribute can only be placed on members of types marked with "
"the StructLayout(LayoutKind.Explicit)"
msgstr ""
-#: ../mcs/mcs/class.cs:5404
+#: ../mcs/mcs/class.cs:5414
msgid "The FieldOffset attribute is not allowed on static or const fields"
msgstr ""
-#: ../mcs/mcs/class.cs:5411
+#: ../mcs/mcs/class.cs:5421
msgid ""
"Do not use 'System.Runtime.CompilerServices.FixedBuffer' attribute. Use the "
"'fixed' field modifier instead"
msgstr ""
-#: ../mcs/mcs/class.cs:5489
+#: ../mcs/mcs/class.cs:5499
#, csharp-format
msgid ""
"`{0}': Instance field types marked with StructLayout(LayoutKind.Explicit) "
"must have a FieldOffset attribute"
msgstr ""
-#: ../mcs/mcs/class.cs:5498
+#: ../mcs/mcs/class.cs:5508
#, csharp-format
msgid "`{0}': cannot declare variables of static types"
msgstr ""
-#: ../mcs/mcs/class.cs:5613
+#: ../mcs/mcs/class.cs:5623
#, csharp-format
msgid ""
"`{0}': Fixed size buffers type must be one of the following: bool, byte, "
"short, int, long, char, sbyte, ushort, uint, ulong, float or double"
msgstr ""
-#: ../mcs/mcs/class.cs:5640
+#: ../mcs/mcs/class.cs:5650
#, csharp-format
msgid "`{0}': Fixed size buffer fields may only be members of structs"
msgstr ""
-#: ../mcs/mcs/class.cs:5659
+#: ../mcs/mcs/class.cs:5669
#, csharp-format
msgid "`{0}': Fixed size buffers must have a length greater than zero"
msgstr ""
-#: ../mcs/mcs/class.cs:5666
+#: ../mcs/mcs/class.cs:5676
#, csharp-format
msgid ""
"Fixed size buffer `{0}' of length `{1}' and type `{2}' exceeded 2^31 limit"
msgstr ""
-#: ../mcs/mcs/class.cs:5858
+#: ../mcs/mcs/class.cs:5868
#, csharp-format
msgid "Struct member `{0}' of type `{1}' causes a cycle in the struct layout"
msgstr ""
-#: ../mcs/mcs/class.cs:5911
+#: ../mcs/mcs/class.cs:5921
#, csharp-format
msgid "`{0}': A volatile field cannot be of the type `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:5916
+#: ../mcs/mcs/class.cs:5926
#, csharp-format
msgid "`{0}': A field cannot be both volatile and readonly"
msgstr ""
-#: ../mcs/mcs/class.cs:6069
+#: ../mcs/mcs/class.cs:6079
#, csharp-format
msgid ""
"Attribute `{0}' is not valid on property or event accessors. It is valid on `"
"{1}' declarations only"
msgstr ""
-#: ../mcs/mcs/class.cs:6169 ../mcs/mcs/decl.cs:2800
+#: ../mcs/mcs/class.cs:6179 ../mcs/mcs/decl.cs:2800
#, csharp-format
msgid "A member `{0}' is already reserved"
msgstr ""
-#: ../mcs/mcs/class.cs:6372
+#: ../mcs/mcs/class.cs:6382
#, csharp-format
msgid "Explicit interface implementation `{0}' is missing accessor `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:6389
+#: ../mcs/mcs/class.cs:6399
#, csharp-format
msgid ""
"`{0}': accessibility modifiers may not be used on accessors in an interface"
msgstr ""
-#: ../mcs/mcs/class.cs:6393
+#: ../mcs/mcs/class.cs:6403
#, csharp-format
msgid "`{0}': abstract properties cannot have private accessors"
msgstr ""
-#: ../mcs/mcs/class.cs:6460
+#: ../mcs/mcs/class.cs:6470
#, csharp-format
msgid ""
"The accessibility modifier of the `{0}' accessor must be more restrictive "
"than the modifier of the property or indexer `{1}'"
msgstr ""
-#: ../mcs/mcs/class.cs:6528
+#: ../mcs/mcs/class.cs:6538
#, csharp-format
msgid ""
"`{0}': Cannot specify accessibility modifiers for both accessors of the "
"property or indexer"
msgstr ""
-#: ../mcs/mcs/class.cs:6536
+#: ../mcs/mcs/class.cs:6546
#, csharp-format
msgid ""
"`{0}': accessibility modifiers on accessors may only be used if the property "
"or indexer has both a get and a set accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6585
+#: ../mcs/mcs/class.cs:6595
#, csharp-format
msgid ""
"`{0}.get': cannot override because `{1}' does not have an overridable get "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6600
+#: ../mcs/mcs/class.cs:6610
#, csharp-format
msgid ""
"`{0}.set': cannot override because `{1}' does not have an overridable set "
"accessor"
msgstr ""
-#: ../mcs/mcs/class.cs:6799
+#: ../mcs/mcs/class.cs:6809
#, csharp-format
msgid ""
"Automatically implemented property `{0}' cannot be used inside a type with "
"an explicit StructLayout attribute"
msgstr ""
-#: ../mcs/mcs/class.cs:7153
+#: ../mcs/mcs/class.cs:7163
#, csharp-format
msgid "`{0}': abstract event cannot have an initializer"
msgstr ""
-#: ../mcs/mcs/class.cs:7359
+#: ../mcs/mcs/class.cs:7369
#, csharp-format
msgid "`{0}': event must be of a delegate type"
msgstr ""
-#: ../mcs/mcs/class.cs:7567
+#: ../mcs/mcs/class.cs:7577
msgid ""
"The `IndexerName' attribute is valid only on an indexer that is not an "
"explicit interface member declaration"
msgstr ""
-#: ../mcs/mcs/class.cs:7574
+#: ../mcs/mcs/class.cs:7584
msgid "Cannot set the `IndexerName' attribute on an indexer marked override"
msgstr ""
-#: ../mcs/mcs/class.cs:7771
+#: ../mcs/mcs/class.cs:7781
#, csharp-format
msgid "User-defined operator `{0}' must be declared static and public"
msgstr ""
-#: ../mcs/mcs/class.cs:7801
+#: ../mcs/mcs/class.cs:7811
msgid ""
"User-defined operator cannot take an object of the enclosing type and "
"convert to an object of the enclosing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7812
+#: ../mcs/mcs/class.cs:7822
msgid "User-defined conversion must convert to or from the enclosing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7821
+#: ../mcs/mcs/class.cs:7831
#, csharp-format
msgid ""
"User-defined conversion `{0}' cannot convert to or from an interface type"
msgstr ""
-#: ../mcs/mcs/class.cs:7828
+#: ../mcs/mcs/class.cs:7838
#, csharp-format
msgid "User-defined conversion `{0}' cannot convert to or from a base class"
msgstr ""
-#: ../mcs/mcs/class.cs:7834
+#: ../mcs/mcs/class.cs:7844
#, csharp-format
msgid "User-defined conversion `{0}' cannot convert to or from a derived class"
msgstr ""
-#: ../mcs/mcs/class.cs:7842
+#: ../mcs/mcs/class.cs:7852
msgid ""
"Overloaded shift operator must have the type of the first operand be the "
"containing type, and the type of the second operand must be int"
msgstr ""
-#: ../mcs/mcs/class.cs:7851
+#: ../mcs/mcs/class.cs:7861
msgid ""
"The return type for ++ or -- operator must be the containing type or derived "
"from the containing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7856
+#: ../mcs/mcs/class.cs:7866
msgid "The parameter type for ++ or -- operator must be the containing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7863
+#: ../mcs/mcs/class.cs:7873
msgid "The parameter type of a unary operator must be the containing type"
msgstr ""
-#: ../mcs/mcs/class.cs:7871
+#: ../mcs/mcs/class.cs:7881
msgid "The return type of operator True or False must be bool"
msgstr ""
-#: ../mcs/mcs/class.cs:7884
+#: ../mcs/mcs/class.cs:7894
msgid "One of the parameters of a binary operator must be the containing type"
msgstr ""
@@ -2037,7 +2037,7 @@ msgstr ""
msgid "Type byte, sbyte, short, ushort, int, uint, long or ulong expected"
msgstr ""
-#: ../mcs/mcs/eval.cs:501
+#: ../mcs/mcs/eval.cs:529
msgid "Detection Parsing Error"
msgstr ""
@@ -2185,72 +2185,72 @@ msgstr ""
msgid "Cannot create an instance of the abstract class or interface `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:5761
+#: ../mcs/mcs/expression.cs:5771
msgid "Invalid rank specifier: expected `,' or `]'"
msgstr ""
-#: ../mcs/mcs/expression.cs:5766
+#: ../mcs/mcs/expression.cs:5776
msgid "Cannot create an array with a negative size"
msgstr ""
-#: ../mcs/mcs/expression.cs:5783 ../mcs/mcs/statement.cs:3049
+#: ../mcs/mcs/expression.cs:5793 ../mcs/mcs/statement.cs:3049
msgid "A constant value is expected"
msgstr ""
-#: ../mcs/mcs/expression.cs:5870
+#: ../mcs/mcs/expression.cs:5880
msgid "An expression tree cannot contain a multidimensional array initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:5964
+#: ../mcs/mcs/expression.cs:5974
msgid ""
"Can only use array initializer expressions to assign to array types. Try "
"using a new expression instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:5969
+#: ../mcs/mcs/expression.cs:5979
msgid ""
"An implicitly typed local variable declarator cannot use an array initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:6044
+#: ../mcs/mcs/expression.cs:6054
msgid "New invocation: Can not find a constructor for this argument list"
msgstr ""
-#: ../mcs/mcs/expression.cs:6483
+#: ../mcs/mcs/expression.cs:6493
msgid ""
"The type of an implicitly typed array cannot be inferred from the "
"initializer. Try specifying array type explicitly"
msgstr ""
-#: ../mcs/mcs/expression.cs:6661
+#: ../mcs/mcs/expression.cs:6671
msgid ""
"Anonymous methods inside structs cannot access instance members of `this'. "
"Consider copying `this' to a local variable outside the anonymous method and "
"using the local instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:6728
+#: ../mcs/mcs/expression.cs:6738
msgid "Cannot take the address of `this' because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6730
+#: ../mcs/mcs/expression.cs:6740
msgid "Cannot pass `this' as a ref or out argument because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6732
+#: ../mcs/mcs/expression.cs:6742
msgid "Cannot assign to `this' because it is read-only"
msgstr ""
-#: ../mcs/mcs/expression.cs:6839
+#: ../mcs/mcs/expression.cs:6849
msgid "An expression tree cannot contain a method with variable arguments"
msgstr ""
-#: ../mcs/mcs/expression.cs:6949
+#: ../mcs/mcs/expression.cs:6959
#, csharp-format
msgid "`{0}': an attribute argument cannot use type parameters"
msgstr ""
-#: ../mcs/mcs/expression.cs:7182
+#: ../mcs/mcs/expression.cs:7192
#, csharp-format
msgid ""
"`{0}' does not have a predefined size, therefore sizeof can only be used in "
@@ -2258,40 +2258,40 @@ msgid ""
"SizeOf)"
msgstr ""
-#: ../mcs/mcs/expression.cs:7237
+#: ../mcs/mcs/expression.cs:7247
#, csharp-format
msgid "Alias `{0}' not found"
msgstr ""
-#: ../mcs/mcs/expression.cs:7248
+#: ../mcs/mcs/expression.cs:7258
#, csharp-format
msgid ""
"Alias `{0}' cannot be used with '::' since it denotes a type. Consider "
"replacing '::' with '.'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7264
+#: ../mcs/mcs/expression.cs:7274
#, csharp-format
msgid ""
"A namespace alias qualifier `{0}' did not resolve to a namespace or a type"
msgstr ""
-#: ../mcs/mcs/expression.cs:7403
+#: ../mcs/mcs/expression.cs:7413
#, csharp-format
msgid "`{0}': cannot reference a type through an expression; try `{1}' instead"
msgstr ""
-#: ../mcs/mcs/expression.cs:7500
+#: ../mcs/mcs/expression.cs:7510
#, csharp-format
msgid "A nested type cannot be specified through a type parameter `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7568
+#: ../mcs/mcs/expression.cs:7578
#, csharp-format
msgid "The nested type `{0}' does not exist in the type `{1}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7580
+#: ../mcs/mcs/expression.cs:7590
#, csharp-format
msgid ""
"Type `{0}' does not contain a definition for `{1}' and no extension method `"
@@ -2299,100 +2299,100 @@ msgid ""
"assembly reference?)"
msgstr ""
-#: ../mcs/mcs/expression.cs:7798
+#: ../mcs/mcs/expression.cs:7808
msgid "Cannot apply indexing with [] to an expression of type `System.Array'"
msgstr ""
-#: ../mcs/mcs/expression.cs:7904
+#: ../mcs/mcs/expression.cs:7914
#, csharp-format
msgid "Wrong number of indexes `{0}' inside [], expected `{1}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8408
+#: ../mcs/mcs/expression.cs:8418
#, csharp-format
msgid ""
"A property or indexer `{0}' may not be passed as an out or ref parameter"
msgstr ""
-#: ../mcs/mcs/expression.cs:8433
+#: ../mcs/mcs/expression.cs:8443
#, csharp-format
msgid "Cannot apply indexing with [] to an expression of type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8463
+#: ../mcs/mcs/expression.cs:8473
#, csharp-format
msgid "The read only property or indexer `{0}' cannot be assigned to"
msgstr ""
-#: ../mcs/mcs/expression.cs:8471
+#: ../mcs/mcs/expression.cs:8481
#, csharp-format
msgid ""
"The property or indexer `{0}' cannot be used in this context because it "
"lacks a `{1}' accessor"
msgstr ""
-#: ../mcs/mcs/expression.cs:8493
+#: ../mcs/mcs/expression.cs:8503
#, csharp-format
msgid ""
"The property or indexer `{0}' cannot be used in this context because a `{1}' "
"accessor is inaccessible"
msgstr ""
-#: ../mcs/mcs/expression.cs:8956
+#: ../mcs/mcs/expression.cs:8966
#, csharp-format
msgid "Array elements cannot be of type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:8962
+#: ../mcs/mcs/expression.cs:8972
#, csharp-format
msgid "Array elements cannot be of static type `{0}'"
msgstr ""
-#: ../mcs/mcs/expression.cs:9121
+#: ../mcs/mcs/expression.cs:9131
msgid "Cannot use a negative size with stackalloc"
msgstr ""
-#: ../mcs/mcs/expression.cs:9248
+#: ../mcs/mcs/expression.cs:9258
#, csharp-format
msgid ""
"Member `{0}' cannot be initialized. An object initializer may only be used "
"for fields, or properties"
msgstr ""
-#: ../mcs/mcs/expression.cs:9251
+#: ../mcs/mcs/expression.cs:9261
#, csharp-format
msgid ""
" Static field or property `{0}' cannot be assigned in an object initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:9424
+#: ../mcs/mcs/expression.cs:9434
#, csharp-format
msgid ""
"A field or property `{0}' cannot be initialized with a collection object "
"initializer because type `{1}' does not implement `{2}' interface"
msgstr ""
-#: ../mcs/mcs/expression.cs:9435
+#: ../mcs/mcs/expression.cs:9445
#, csharp-format
msgid "Inconsistent `{0}' member declaration"
msgstr ""
-#: ../mcs/mcs/expression.cs:9443
+#: ../mcs/mcs/expression.cs:9453
#, csharp-format
msgid ""
"An object initializer includes more than one member `{0}' initialization"
msgstr ""
-#: ../mcs/mcs/expression.cs:9460
+#: ../mcs/mcs/expression.cs:9470
#, csharp-format
msgid "Cannot initialize object of type `{0}' with a collection initializer"
msgstr ""
-#: ../mcs/mcs/expression.cs:9721
+#: ../mcs/mcs/expression.cs:9731
msgid "Anonymous types cannot be used in this expression"
msgstr ""
-#: ../mcs/mcs/expression.cs:9828
+#: ../mcs/mcs/expression.cs:9838
#, csharp-format
msgid "An anonymous type property `{0}' cannot be initialized with `{1}'"
msgstr ""
@@ -2723,77 +2723,77 @@ msgstr ""
msgid "An assembly `{0}' is used without being referenced"
msgstr ""
-#: ../mcs/mcs/namespace.cs:131
+#: ../mcs/mcs/namespace.cs:134
#, csharp-format
msgid "The imported type `{0}' is defined multiple times"
msgstr ""
-#: ../mcs/mcs/namespace.cs:257
+#: ../mcs/mcs/namespace.cs:268
#, csharp-format
msgid ""
"The type or namespace name `{0}' could not be found in the global namespace "
"(are you missing an assembly reference?)"
msgstr ""
-#: ../mcs/mcs/namespace.cs:378
+#: ../mcs/mcs/namespace.cs:388
#, csharp-format
msgid ""
"The type or namespace name `{0}' does not exist in the namespace `{1}'. Are "
"you missing an assembly reference?"
msgstr ""
-#: ../mcs/mcs/namespace.cs:385
+#: ../mcs/mcs/namespace.cs:395
#, csharp-format
msgid "Using the generic type `{0}' requires `{1}' type argument(s)"
msgstr ""
-#: ../mcs/mcs/namespace.cs:407
+#: ../mcs/mcs/namespace.cs:417
#, csharp-format
msgid "The non-generic {0} `{1}' cannot be used with the type arguments"
msgstr ""
-#: ../mcs/mcs/namespace.cs:651
+#: ../mcs/mcs/namespace.cs:661
#, csharp-format
msgid ""
"`{0}' is a type not a namespace. A using namespace directive can only be "
"applied to namespaces"
msgstr ""
-#: ../mcs/mcs/namespace.cs:678
+#: ../mcs/mcs/namespace.cs:688
#, csharp-format
msgid "The extern alias `{0}' was not specified in -reference option"
msgstr ""
-#: ../mcs/mcs/namespace.cs:886 ../mcs/mcs/namespace.cs:908
+#: ../mcs/mcs/namespace.cs:896 ../mcs/mcs/namespace.cs:918
msgid ""
"A using clause must precede all other namespace elements except extern alias "
"declarations"
msgstr ""
-#: ../mcs/mcs/namespace.cs:932
+#: ../mcs/mcs/namespace.cs:942
msgid "An extern alias declaration must precede all other elements"
msgstr ""
-#: ../mcs/mcs/namespace.cs:950
+#: ../mcs/mcs/namespace.cs:960
#, csharp-format
msgid "The using alias `{0}' appeared previously in this namespace"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1023
+#: ../mcs/mcs/namespace.cs:1033
#, csharp-format
msgid "`{0}' is an ambiguous reference between `{1}' and `{2}'"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1062
+#: ../mcs/mcs/namespace.cs:1072
#, csharp-format
msgid "Namespace `{0}' contains a definition with same name as alias `{1}'"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1155
+#: ../mcs/mcs/namespace.cs:1165
msgid "You cannot redefine the global extern alias"
msgstr ""
-#: ../mcs/mcs/namespace.cs:1160
+#: ../mcs/mcs/namespace.cs:1170
#, csharp-format
msgid ""
"The type or namespace name `{0}' could not be found. Are you missing a using "
@@ -3013,68 +3013,68 @@ msgstr ""
msgid "A value of an integral type or string expected for switch"
msgstr ""
-#: ../mcs/mcs/statement.cs:4087
+#: ../mcs/mcs/statement.cs:4089
#, csharp-format
msgid "`{0}' is not a reference type as required by the lock statement"
msgstr ""
-#: ../mcs/mcs/statement.cs:4404
+#: ../mcs/mcs/statement.cs:4406
msgid "A fixed statement cannot use an implicitly typed local variable"
msgstr ""
-#: ../mcs/mcs/statement.cs:4414
+#: ../mcs/mcs/statement.cs:4416
msgid "The type of locals declared in a fixed statement must be a pointer type"
msgstr ""
-#: ../mcs/mcs/statement.cs:4438
+#: ../mcs/mcs/statement.cs:4440
msgid ""
"The right hand side of a fixed statement assignment may not be a cast "
"expression"
msgstr ""
-#: ../mcs/mcs/statement.cs:4515
+#: ../mcs/mcs/statement.cs:4517
msgid ""
"You cannot use the fixed statement to take the address of an already fixed "
"expression"
msgstr ""
-#: ../mcs/mcs/statement.cs:4765
+#: ../mcs/mcs/statement.cs:4767
msgid "Try statement already has an empty catch block"
msgstr ""
-#: ../mcs/mcs/statement.cs:4803
+#: ../mcs/mcs/statement.cs:4805
#, csharp-format
msgid ""
"A previous catch clause already catches all exceptions of this or a super "
"type `{0}'"
msgstr ""
-#: ../mcs/mcs/statement.cs:4978 ../mcs/mcs/statement.cs:5093
+#: ../mcs/mcs/statement.cs:4980 ../mcs/mcs/statement.cs:5095
msgid "Internal error: No Dispose method which takes 0 parameters."
msgstr ""
-#: ../mcs/mcs/statement.cs:5050
+#: ../mcs/mcs/statement.cs:5052
#, csharp-format
msgid ""
"`{0}': type used in a using statement must be implicitly convertible to "
"`System.IDisposable'"
msgstr ""
-#: ../mcs/mcs/statement.cs:5490
+#: ../mcs/mcs/statement.cs:5492
#, csharp-format
msgid ""
"foreach statement requires that the return type `{0}' of `{1}' must have a "
"suitable public MoveNext method and public Current property"
msgstr ""
-#: ../mcs/mcs/statement.cs:5575
+#: ../mcs/mcs/statement.cs:5577
#, csharp-format
msgid ""
"foreach statement cannot operate on variables of type `{0}' because it does "
"not contain a definition for `GetEnumerator' or is not accessible"
msgstr ""
-#: ../mcs/mcs/statement.cs:5627
+#: ../mcs/mcs/statement.cs:5629
#, csharp-format
msgid ""
"foreach statement cannot operate on variables of type `{0}' because it "
@@ -3082,11 +3082,11 @@ msgid ""
"implementation"
msgstr ""
-#: ../mcs/mcs/statement.cs:5922
+#: ../mcs/mcs/statement.cs:5924
msgid "Use of null is not valid in this context"
msgstr ""
-#: ../mcs/mcs/statement.cs:5932
+#: ../mcs/mcs/statement.cs:5934
#, csharp-format
msgid "Foreach statement cannot operate on a `{0}'"
msgstr ""
diff --git a/runtime/Makefile.in b/runtime/Makefile.in
index 43e6d11..a4df955 100644
--- a/runtime/Makefile.in
+++ b/runtime/Makefile.in
@@ -58,8 +58,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/samples/Makefile.in b/samples/Makefile.in
index 666c688..b6f9374 100644
--- a/samples/Makefile.in
+++ b/samples/Makefile.in
@@ -55,8 +55,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 8cf3339..28c036b 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -61,8 +61,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/scripts/mono-test-install b/scripts/mono-test-install
index 9743e60..362eed4 100755
--- a/scripts/mono-test-install
+++ b/scripts/mono-test-install
@@ -147,3 +147,32 @@ else
echo Failed to compile sample System.Drawing program, your installation is broken
exit 1
fi
+
+cat > $temp_cs <<EOF
+using System;
+using System.Reflection;
+using System.IO;
+
+class Program {
+
+ public static void Main()
+ {
+ object watcher = new FileSystemWatcher()
+ .GetType ()
+ .GetField ("watcher", BindingFlags.NonPublic | BindingFlags.Static)
+ .GetValue (null);
+
+ Console.WriteLine ("Your file system watcher is: {0}",
+ watcher != null
+ ? watcher.GetType ().FullName
+ : "unknown");
+ }
+}
+EOF
+
+if mcs $temp_cs >& /dev/null; then
+ mono $temp_exe
+else
+ echo Failed to compile sample test program, your installation is broken
+ exit 1
+fi
\ No newline at end of file
diff --git a/support/ChangeLog b/support/ChangeLog
index 704b81a..26ec8fc 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-20 Jonathan Pryor <jpryor at novell.com>
+
+ * x-struct-str.c: It's possible for struct members to be NULL, so make
+ sure we don't pass NULL to strlen(3).
+
2009-01-14 Geoff Norton <gnorton at novell.com>
* supportw.c: Use unsigned int instead of uint, as its more portable.
diff --git a/support/Makefile.in b/support/Makefile.in
index ab02fff..8afd34b 100644
--- a/support/Makefile.in
+++ b/support/Makefile.in
@@ -121,8 +121,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/support/x-struct-str.c b/support/x-struct-str.c
index 89d5a61..b71a9cc 100644
--- a/support/x-struct-str.c
+++ b/support/x-struct-str.c
@@ -39,7 +39,8 @@ _mph_copy_structure_strings (
buflen = num_strings;
for (i = 0; i < num_strings; ++i) {
- len[i] = strlen (str_at(from, from_offsets[i]));
+ const char* s = str_at(from, from_offsets[i]);
+ len [i] = s ? strlen (s) : 0;
if (len[i] < INT_MAX - buflen)
buflen += len[i];
else
@@ -64,6 +65,12 @@ _mph_copy_structure_strings (
#ifdef TEST
+/*
+ * To run the tests:
+ * $ gcc -DTEST -I.. `pkg-config --cflags --libs glib-2.0` x-struct-str.c
+ * $ ./a.out
+ */
+
#include <stdio.h>
struct foo {
@@ -105,6 +112,13 @@ main ()
printf ("b.c=%s\n", b.c);
printf ("b.e=%s\n", b.e);
+ f.c = NULL;
+ buf = _mph_copy_structure_strings (&b, bar_offsets,
+ &f, foo_offsets, 3);
+ printf ("b.a=%s\n", b.a);
+ printf ("b.c=%s\n", b.c);
+ printf ("b.e=%s\n", b.e);
+
return 0;
}
#endif
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 166c0b9..8964105 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -67,8 +67,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/tools/locale-builder/Makefile.in b/tools/locale-builder/Makefile.in
index 5850def..e588b1a 100644
--- a/tools/locale-builder/Makefile.in
+++ b/tools/locale-builder/Makefile.in
@@ -55,8 +55,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
diff --git a/web/Makefile.in b/web/Makefile.in
index 52fdd2f..6130a4e 100644
--- a/web/Makefile.in
+++ b/web/Makefile.in
@@ -56,8 +56,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
-BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
BISON = @BISON@
BUILD_EXEEXT = @BUILD_EXEEXT@
BUILD_GLIB_CFLAGS = @BUILD_GLIB_CFLAGS@
--
mono
More information about the Pkg-mono-svn-commits
mailing list