2009-05-26 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Tue, 26 May 2009 07:55:32 +0000 (07:55 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Tue, 26 May 2009 07:55:32 +0000 (07:55 -0000)
* DuplexSessionChannelBase.cs, DuplexChannelBase.cs:
  rename from former to latter.

* System.ServiceModel.dll.sources: cosmetic file renaming.

svn path=/trunk/mcs/; revision=134743

159 files changed:
CMakeLists.txt [new file with mode: 0644]
ChangeLog
Makefile.am
acinclude.m4
configure.in
ikvm-native/CMakeLists.txt [new file with mode: 0644]
libgc/include/private/gcconfig.h
libgc/os_dep.c
man/ChangeLog
man/mono.1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColorDialog.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/FileDialog.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuStrip.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/MessageBox.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintPreviewDialog.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
mcs/class/Mono.Cecil/ChangeLog
mcs/class/Mono.Cecil/Mono.Cecil/ReflectionReader.cs
mcs/class/Mono.Messaging/Test/Mono.Messaging/ChangeLog
mcs/class/Mono.Messaging/Test/Mono.Messaging/QueueReferenceTest.cs
mcs/class/RabbitMQ.Client/ChangeLog
mcs/class/RabbitMQ.Client/docs/specs/Makefile
mcs/class/RabbitMQ.Client/docs/specs/amqp0-8.xml [deleted file]
mcs/class/RabbitMQ.Client/docs/specs/amqp0-9.xml [deleted file]
mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-8.cs
mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-9.cs
mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-qpid-0-8.cs
mcs/class/RabbitMQ.Client/docs/specs/qpid-amqp.0-8.xml [deleted file]
mcs/class/RabbitMQ.Client/src/apigen/Apigen.cs
mcs/class/System.Net/System.Net/ChangeLog
mcs/class/System.Net/System.Net/WebClient_2_1.cs
mcs/class/System.Net/System.Net/WebRequest_2_1.cs
mcs/class/System.Runtime.Remoting/Test/ChangeLog
mcs/class/System.Runtime.Remoting/Test/GenericTest.cs
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/ChangeLog
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/SerializationMap.cs
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/XmlFormatterSerializer.cs
mcs/class/System.Runtime.Serialization/System.Xml/ChangeLog
mcs/class/System.Runtime.Serialization/System.Xml/XmlBinaryDictionaryReader.cs
mcs/class/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncoder.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncoderFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelManagerBase.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexChannelBase.cs [new file with mode: 0644]
mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexSessionChannelBase.cs [deleted file]
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelListener.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MsmqChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MsmqChannelListener.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/PeerChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/PeerChannelListener.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/PeerCustomResolverBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/PeerDuplexChannel.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/PeerOutputChannel.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpChannelListener.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpDuplexSessionChannel.cs
mcs/class/System.ServiceModel/System.ServiceModel.dll.sources
mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
mcs/class/System.ServiceModel/System.ServiceModel/PeerNode.cs
mcs/class/System.ServiceModel/System.ServiceModel/ServiceRuntimeChannel.cs
mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/ChangeLog
mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageEncoderTest.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/ChangeLog
mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/PeerResolverSerializationTest.cs [new file with mode: 0644]
mcs/class/System.Web.Routing/ChangeLog
mcs/class/System.Web.Routing/System.Web.Routing.dll.sources
mcs/class/System.Web.Routing/System.Web.Routing/ChangeLog
mcs/class/System.Web.Routing/System.Web.Routing/PatternParser.cs [new file with mode: 0644]
mcs/class/System.Web.Routing/System.Web.Routing/PatternToken.cs [new file with mode: 0644]
mcs/class/System.Web.Routing/System.Web.Routing/PatternTokenType.cs [new file with mode: 0644]
mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionaryExtensions.cs [new file with mode: 0644]
mcs/class/System.Web.Routing/System.Web.Routing/UrlPattern.cs [deleted file]
mcs/class/System.Web.Routing/System.Web.Routing_test.dll.sources
mcs/class/System.Web.Routing/Test/System.Web.Routing/AssertExtensions.cs [new file with mode: 0644]
mcs/class/System.Web.Routing/Test/System.Web.Routing/ChangeLog
mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteCollectionTest.cs
mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteTest.cs
mcs/class/System.Web.Routing/Test/System.Web.Routing/TestStubTypes.cs
mcs/class/System.XML/Test/System.Xml.Schema/ChangeLog
mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs
mcs/class/System.XML/Test/System.Xml/ChangeLog
mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs
mcs/class/System.XML/Test/XmlFiles/xsd/ChangeLog
mcs/class/System.XML/Test/XmlFiles/xsd/extension-attr-redefine-1.xsd [new file with mode: 0644]
mcs/class/System.XML/Test/XmlFiles/xsd/extension-attr-redefine-2.xsd [new file with mode: 0644]
mcs/class/System.XML/Test/XmlFiles/xsd/extension-attr-redefine-3.xsd [new file with mode: 0644]
mcs/class/System/System.Net.Sockets/ChangeLog
mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
mcs/class/System/System.Net.Sockets/Socket_2_1.cs
mcs/class/corlib/ChangeLog
mcs/class/corlib/System.Collections/ChangeLog
mcs/class/corlib/System.Collections/IStructuralComparable.cs [new file with mode: 0644]
mcs/class/corlib/System.Collections/IStructuralEquatable.cs [new file with mode: 0644]
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
mcs/class/corlib/System.Reflection.Emit/ChangeLog
mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/Funcs.cs [new file with mode: 0644]
mcs/class/corlib/System/Lazy.cs [new file with mode: 0644]
mcs/class/corlib/System/LazyExecutionMode.cs [new file with mode: 0644]
mcs/class/corlib/System/Tuple.cs [new file with mode: 0644]
mcs/class/corlib/System/Tuples.cs [new file with mode: 0644]
mcs/class/corlib/Test/System/ChangeLog
mcs/class/corlib/Test/System/LazyTest.cs [new file with mode: 0644]
mcs/class/corlib/corlib.dll.sources
mcs/class/corlib/corlib_test.dll.sources
mcs/tools/linker/Descriptors/mscorlib.xml
mono/CMakeLists.txt [new file with mode: 0644]
mono/dis/CMakeLists.txt [new file with mode: 0644]
mono/io-layer/CMakeLists.txt [new file with mode: 0644]
mono/io-layer/ChangeLog
mono/io-layer/handles.c
mono/io-layer/sockets.c
mono/io-layer/versioninfo.c
mono/io-layer/wapi_glob.c
mono/io-layer/wthreads.c
mono/metadata/CMakeLists.txt [new file with mode: 0644]
mono/metadata/ChangeLog
mono/metadata/appdomain.c
mono/metadata/class.c
mono/metadata/generic-sharing.c
mono/metadata/icall.c
mono/metadata/image.c
mono/metadata/marshal.c
mono/metadata/metadata-verify.c
mono/metadata/mono-config.c
mono/metadata/object.c
mono/metadata/reflection.c
mono/mini/CMakeLists.txt [new file with mode: 0644]
mono/mini/ChangeLog
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/basic.cs
mono/mini/cpu-x86.md
mono/mini/decompose.c
mono/mini/generics.cs
mono/mini/iltests.il.in
mono/mini/image-writer.c
mono/mini/method-to-ir.c
mono/mini/mini-arm.c
mono/mini/mini-ppc.c
mono/mini/mini-ppc.h
mono/mini/mini-x86.c
mono/mini/objects.cs
mono/mini/tramp-ppc.c
mono/tests/metadata-verifier/Changelog
mono/tests/metadata-verifier/Makefile
mono/tests/metadata-verifier/cli-blob-tests.md [new file with mode: 0644]
mono/tests/metadata-verifier/gen-md-tests.c
mono/utils/CMakeLists.txt [new file with mode: 0644]
mono/utils/ChangeLog
support/CMakeLists.txt [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..3d49ae3
--- /dev/null
@@ -0,0 +1,2983 @@
+cmake_minimum_required(VERSION 2.6.4)
+
+# FIXME: Sanitize the variables, no need for the duplicate am conditionals
+# - It would be nice to rename 'CMakeFiles' to something like '.cmake'
+# - It would be nice to have a per-target VERBOSE setting
+# - or a way to change the setting name to 'V' and the output to CC <src>
+#   to be similar to the current build output
+
+# We use lowercase commands as advocated by the kde cmake coding style
+
+include(CheckIncludeFile)
+include(CheckCSourceCompiles)
+
+# Implementation of AC_CHECK_HEADERS
+# In addition, it also records the list of variables in the variable 
+# 'autoheader_vars', and for each variable, a documentation string in the
+# variable ${var}_doc
+function(ac_check_headers headers)
+  foreach (header ${ARGV})
+       string(TOUPPER ${header} header_var)
+       string(REPLACE "." "_" header_var ${header_var})
+       string(REPLACE "/" "_" header_var ${header_var})
+       set(header_var "HAVE_${header_var}")
+       check_include_file (${header} ${header_var})
+       set("${header_var}_doc" "Define to 1 if you have the <${header}> header file." PARENT_SCOPE)
+       if (${header_var})
+         set("${header_var}_defined" "1" PARENT_SCOPE)
+       endif()
+       set("${header_var}_val" "1" PARENT_SCOPE)
+       set (autoheader_vars ${autoheader_vars} ${header_var})
+  endforeach()
+  set (autoheader_vars ${autoheader_vars} PARENT_SCOPE)
+endfunction()
+
+function(ac_check_funcs funcs)
+  foreach (func ${ARGV})
+       string(TOUPPER ${func} var)
+       set(var "HAVE_${var}")
+       set(${var})
+       check_function_exists (${func} ${var})
+       set("${var}_doc" "Define to 1 if you have the '${func}' function." PARENT_SCOPE)
+       if (${var})
+         set("${var}_defined" "1" PARENT_SCOPE)
+         set(${var} yes PARENT_SCOPE)
+       endif()
+       set("${var}_val" "1" PARENT_SCOPE)
+       set (autoheader_vars ${autoheader_vars} ${var})
+  endforeach()
+  set (autoheader_vars ${autoheader_vars} PARENT_SCOPE)
+endfunction()
+
+# Implementation of AC_DEFINE
+function(ac_define varname value doc)
+  if (${varname} MATCHES ",")
+       message(FATAL_ERROR ",")
+  endif()
+  set("${varname}_doc" ${doc} PARENT_SCOPE)
+  set("${varname}_defined" 1 PARENT_SCOPE)
+  set("${varname}_val" ${value} PARENT_SCOPE)
+  set (autoheader_vars ${autoheader_vars} ${varname} PARENT_SCOPE)
+endfunction()
+
+# Implementation of AC_DEFINE_UNQUOTED
+function(ac_define_unquoted varname value doc)
+  if (${varname} MATCHES ",")
+       message(FATAL_ERROR ",")
+  endif()
+  set("${varname}_doc" ${doc} PARENT_SCOPE)
+  set("${varname}_defined" 1 PARENT_SCOPE)
+  set("${varname}_val" \"${value}\" PARENT_SCOPE)
+  set (autoheader_vars ${autoheader_vars} ${varname} PARENT_SCOPE)
+endfunction()
+
+Include(CheckTypeSize)
+
+# Implementation of AC_CHECK_SIZEOF
+# FIXME: cross compiling
+function(ac_check_sizeof type)
+  check_type_size(${type} size)
+  if (HAVE_size STREQUAL "TRUE")
+  else()
+       message(FATAL_ERROR "Type ${type} not found.")
+  endif()
+  string(TOUPPER "SIZEOF_${type}" varname)
+  string(REPLACE " " "_" varname ${varname})
+  string(REPLACE "*" "P" varname ${varname})
+
+  set("${varname}_doc" "The size of '${type}' as computed by sizeof" PARENT_SCOPE)
+  set("${varname}_defined" 1 PARENT_SCOPE)
+  set("${varname}_val" ${size} PARENT_SCOPE)
+  set (autoheader_vars ${autoheader_vars} ${varname} PARENT_SCOPE)
+endfunction()
+
+# Implementation of autoheader
+function(AUTOHEADER filename variables)
+  set(tmp_filename "${filename}.tmp")
+  file(WRITE ${tmp_filename} "")
+  foreach(var ${${variables}})
+       file(APPEND ${tmp_filename} "\n/* ${${var}_doc} */\n")
+       if(${${var}_defined})
+         file(APPEND ${tmp_filename} "#define ${var} ${${var}_val}\n")
+       else()
+         file(APPEND ${tmp_filename} "/* #undef ${var} */\n")
+       endif()
+  endforeach()
+  # FIXME: This is unix specific
+  execute_process(COMMAND diff ${filename} ${filename}.tmp RESULT_VARIABLE diff_res OUTPUT_QUIET)
+  if (NOT diff_res STREQUAL 0)
+       message(STATUS "generating ${filename}.")
+       execute_process(COMMAND mv ${filename}.tmp ${filename})
+  else()
+       message(STATUS "${filename} is unchanged.")
+  endif()
+endfunction()
+
+function(ac_msg_checking)
+  message(STATUS "checking ${ARGV}...")
+  set(last_msg_checking ${ARGV} PARENT_SCOPE)
+endfunction()
+
+function(ac_msg_result)
+  message(STATUS "checking ${last_msg_checking}... ${ARGV}")
+endfunction()
+
+function(ac_msg_error)
+  message(FATAL_ERROR "${ARGV}")
+endfunction()
+
+function(ac_msg_warn)
+  message(STATUS "WARNING: ${ARGV}")
+endfunction()
+
+# The lines commented out using ### are the stuff from configure.in which still 
+# need to be ported to cmake
+# The svn revision of the configure.in used is r132691
+
+ac_define_unquoted(VERSION 2.5 "Version number of package")
+###
+###set(API_VER 1.0)
+###AC_SUBST(API_VER)
+###
+###AC_PROG_LN_S
+###
+#### In case of cygwin, override LN_S, irrespective of what it determines.
+#### The build uses cygwin, but the actual runtime doesn't.
+###case $host_os in
+###*cygwin* ) set(LN_S 'cp -p';;)
+###esac
+###
+###
+
+#
+# These variables are the CPPFLAGS/CFLAGS passed to libgc's configure
+# libgc should inherit the original CFLAGS/CPPFLAGS passed to configure, i.e. -O0
+#
+set(CPPFLAGS_FOR_LIBGC ${CPPFLAGS})
+set(CFLAGS_FOR_LIBGC ${CFLAGS})
+
+#
+# These are the flags that need to be stored in the mono.pc file for 
+# compiling code that will embed Mono
+#
+set(libmono_cflags "")
+set(libmono_ldflags "")
+
+###AC_SUBST(libmono_cflags)
+###AC_SUBST(libmono_ldflags)
+###
+#### Variable to have relocatable .pc files (lib, or lib64)
+###set(reloc_libdir `basename ${libdir}`)
+###AC_SUBST(reloc_libdir)
+
+# if linker handles the version script
+set(no_version_script no)
+
+# Set to yes if Unix sockets cannot be created in an anonymous namespace
+set(need_link_unlink no)
+
+#
+# Platform support
+#
+
+# Obtain the GNU style target
+# From GetTargetTriple.cmake in LLVM
+function( get_target_triple var )
+  if( MSVC )
+    set( ${var} "i686-pc-win32" PARENT_SCOPE )
+  else( MSVC )
+    set(config_guess config.guess)
+    execute_process(COMMAND sh ${config_guess}
+      RESULT_VARIABLE TT_RV
+      OUTPUT_VARIABLE TT_OUT
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if( NOT TT_RV EQUAL 0 )
+      message(FATAL_ERROR "Failed to execute ${config_guess}")
+    endif( NOT TT_RV EQUAL 0 )
+    set( ${var} ${TT_OUT} PARENT_SCOPE )
+  endif( MSVC )
+endfunction( get_target_triple var )
+
+get_target_triple(host)
+
+message(STATUS "checking host platform characteristics...")
+
+set(libgc_threads no)
+set(has_dtrace no)
+set(parallel_mark yes)
+
+if(host MATCHES .*-.*-linux.*)
+  set(platform_win32 no)
+  set(CPPFLAGS "${CPPFLAGS} -DHAVE_CONFIG_H -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP")
+  set(libmono_cflags "-D_REENTRANT")
+  set(libmono_ldflags "-lpthread")
+  set(libdl "-ldl")
+  set(libgc_threads pthreads)
+  set(AOT_SUPPORTED "yes")
+  set(use_sigposix yes)
+else()
+  message(FATAL_ERROR "The cmake build doesn't yet support host '${host}'.")
+endif()
+
+#### Thread configuration inspired by sleepycat's db
+###case "$host" in
+###    *-*-mingw*|*-*-cygwin*)
+###            set(platform_win32 yes)
+###            ac_define(PLATFORM_WIN32,1,[Platform is Win32])
+###            ac_define(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
+###            ac_define(PLATFORM_NO_SYMLINKS,1,[This platform does not support symlinks])
+###            if test "x$cross_compiling" = "xno"; then
+###                    set(CC "gcc -mno-cygwin -g")
+###                    # So libgc configure gets -mno-cygwin
+###                    export CC
+###            fi
+###            set(HOST_CC "gcc")
+###            # Windows 2000 is required that includes Internet Explorer 5.01
+###            set(CPPFLAGS "$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024")
+###            set(libmono_cflags "-mno-cygwin -mms-bitfields -mwindows")
+###            set(libmono_ldflags "-mno-cygwin -mms-bitfields -mwindows")
+###            set(libdl )
+###            set(libgc_threads win32)
+###            set(gc_default included)
+###            set(with_sigaltstack no)
+###            set(LN_S cp)
+###            # This forces libgc to use the DllMain based thread registration code on win32
+###            set(libgc_configure_args "$libgc_configure_args --enable-win32-dllmain=yes")
+###            ;;
+###    *-*-*netbsd*)
+###            set(platform_win32 no)
+###            set(CPPFLAGS "$CPPFLAGS -D_REENTRANT -DGC_NETBSD_THREADS -D_GNU_SOURCE")
+###            set(libmono_cflags "-D_REENTRANT")
+###            set(LDFLAGS "$LDFLAGS -pthread")
+###            set(CPPFLAGS "$CPPFLAGS -DPLATFORM_BSD")
+###            set(libmono_ldflags "-pthread")
+###            set(need_link_unlink yes)
+###            set(libdl "-ldl")
+###            set(libgc_threads pthreads)
+###            set(with_sigaltstack no)
+###            set(use_sigposix yes)
+###            ;;
+###    *-*-*freebsd*)
+###            set(platform_win32 no)
+###            if test "x$PTHREAD_CFLAGS" = "x"; then
+###                    set(CPPFLAGS "$CPPFLAGS -DGC_FREEBSD_THREADS")
+###                    set(libmono_cflags )
+###            else
+###                    set(CPPFLAGS "$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS")
+###                    set(libmono_cflags "$PTHREAD_CFLAGS")
+###            fi
+###            if test "x$PTHREAD_LIBS" = "x"; then
+###                    set(LDFLAGS "$LDFLAGS -pthread")
+###                    set(libmono_ldflags "-pthread")
+###            else
+###                    set(LDFLAGS "$LDFLAGS $PTHREAD_LIBS")
+###                    set(libmono_ldflags "$PTHREAD_LIBS")
+###            fi
+###            set(CPPFLAGS "$CPPFLAGS -DPLATFORM_BSD")
+###            set(need_link_unlink yes)
+###            ac_define(PTHREAD_POINTER_ID, 1, [pthread is a pointer])
+###            set(libdl )
+###            set(libgc_threads pthreads)
+###            # This doesn't seem to work as of 7.0 on amd64
+###            set(with_sigaltstack no)
+#### TLS is only partially implemented on -CURRENT (compiler support
+#### but NOT library support)
+####
+###            set(with_tls pthread)
+###            set(use_sigposix yes)
+###            ;;
+###    *-*-*openbsd*)
+###            set(platform_win32 no)
+###            set(CPPFLAGS "$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS -DPLATFORM_BSD")
+###            set(libmono_cflags "-D_THREAD_SAFE")
+###            set(LDFLAGS "$LDFLAGS -pthread")
+###            set(libmono_ldflags "-pthread")
+###            set(need_link_unlink yes)
+###            ac_define(PTHREAD_POINTER_ID)
+###            set(libdl )
+###            set(libgc_threads pthreads)
+###            set(use_sigposix yes)
+###            ;;
+###    *-*-linux*)
+###            set(platform_win32 no)
+###            set(CPPFLAGS "$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP")
+###            set(libmono_cflags "-D_REENTRANT")
+###            set(libmono_ldflags "-lpthread")
+###            set(libdl "-ldl")
+###            set(libgc_threads pthreads)
+###            set(AOT_SUPPORTED "yes")
+###            set(use_sigposix yes)
+###            ;;
+###    *-*-hpux*)
+###            set(platform_win32 no)
+###            set(CPPFLAGS "$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT")
+###            # +ESdbgasm only valid on bundled cc on RISC
+###            # silently ignored for ia64
+###            if test $GCC != "yes"; then
+###                    set(CFLAGS "$CFLAGS +ESdbgasm")
+###                    # Arrange for run-time dereferencing of null
+###                    # pointers to produce a SIGSEGV signal.
+###                    set(LDFLAGS "$LDFLAGS -z")
+###            fi
+###            set(CFLAGS "$CFLAGS +ESdbgasm")
+###            set(LDFLAGS "$LDFLAGS -z")
+###            set(libmono_cflags "-D_REENTRANT")
+###            set(libmono_ldflags "-lpthread")
+###            set(libgc_threads pthreads)
+###            set(need_link_unlink yes)
+###            set(use_sigposix yes)
+###            ;;
+###    *-*-solaris*)
+###            set(platform_win32 no)
+###            set(CPPFLAGS "$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DPLATFORM_SOLARIS")
+###            set(need_link_unlink yes)
+###            set(libmono_cflags "-D_REENTRANT")
+###            set(libgc_threads pthreads)
+###            # This doesn't seem to work on solaris/x86, but the configure test runs
+###            set(with_tls pthread)
+###            set(has_dtrace yes)
+###            set(use_sigposix yes)
+###            ;;
+###    *-*-darwin*)
+###            set(parallel_mark "Disabled_Currently_Hangs_On_MacOSX")
+###            set(platform_win32 no)
+###            set(platform_darwin yes)
+###            set(CPPFLAGS "$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP")
+###            set(CPPFLAGS "$CPPFLAGS -DGetCurrentProcess=MonoGetCurrentProcess -DGetCurrentThread=MonoGetCurrentThread -DCreateEvent=MonoCreateEvent")
+###            set(libmono_cflags "-D_THREAD_SAFE")
+###            set(LDFLAGS "$LDFLAGS -pthread")
+###            set(libmono_ldflags "-pthread")
+###            set(need_link_unlink yes)
+###            ac_define(PTHREAD_POINTER_ID)
+###            ac_define(USE_MACH_SEMA, 1, [...])
+###            set(no_version_script yes)
+###            set(libdl )
+###            set(libgc_threads pthreads)
+###            set(has_dtrace yes)
+###            if test "x$cross_compiling" = "xyes"; then
+###                    set(has_broken_apple_cpp yes)
+###            fi
+###            ;;
+###    *)
+###            AC_MSG_WARN([*** Please add $host to configure.in checks!])
+###            set(platform_win32 no)
+###            set(libdl "-ldl")
+###            ;;
+###esac
+###AC_MSG_RESULT(ok)
+###
+###if test x$need_link_unlink = xyes; then
+###   ac_define(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace])
+###fi
+###
+
+if(use_sigposix)
+  set(PLATFORM_SIGPOSIX 1)
+endif()
+if(platform_win32)
+  set(PLATFORM_WIN32 yes)
+endif()
+if(${target_os} MATCHES "*linux*")
+  set(PLATFORM_LINUX yes)
+endif()
+if(platform_darwin)
+  set(PLATFORM_DARWIN yes)
+endif()
+
+include(CMakeDetermineASM-ATTCompiler)
+
+find_program(BISON NAMES bison)
+
+if(BISON STREQUAL "BISON-NOTFOUND")
+  message(FATAL_ERROR "You need to install bison")
+else()
+  message(STATUS "Found bison: ${BISON}")
+endif()
+
+###AC_PROG_INSTALL
+###AC_PROG_AWK
+#### We should use AM_PROG_AS, but it's not available on automake/aclocal 1.4
+###: ${set(CCAS '$(CC)'})
+#### Set ASFLAGS if not already set.
+###: ${set(CCASFLAGS '$(CFLAGS)'})
+###AC_SUBST(CCAS)
+###AC_SUBST(CCASFLAGS)
+###
+#### may require a specific autoconf version
+#### AC_PROG_CC_FOR_BUILD
+#### CC_FOR_BUILD not automatically detected
+###set(CC_FOR_BUILD $CC)
+###set(CFLAGS_FOR_BUILD $CFLAGS)
+###set(BUILD_EXEEXT )
+###if test "x$cross_compiling" = "xyes"; then
+###    set(CC_FOR_BUILD cc)
+###    set(CFLAGS_FOR_BUILD )
+###    set(BUILD_EXEEXT "")
+###fi
+###AC_SUBST(CC_FOR_BUILD)
+###AC_SUBST(CFLAGS_FOR_BUILD)
+###AC_SUBST(HOST_CC)
+###AC_SUBST(BUILD_EXEEXT)
+###
+###AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
+###AM_CONDITIONAL(USE_BATCH_FILES, [test x$platform_win32 = xyes -a x$cross_compiling = xyes])
+###
+#### Set STDC_HEADERS
+###AC_HEADER_STDC
+###AC_LIBTOOL_WIN32_DLL
+#### This causes monodis to not link correctly
+####AC_DISABLE_FAST_INSTALL
+###set(export_ldflags `(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`)
+###AC_SUBST(export_ldflags)
+###
+#### Test whenever ld supports -version-script
+###AC_PROG_LD
+###AC_PROG_LD_GNU
+###if test "x$lt_cv_prog_gnu_ld" = "xno"; then
+###   set(no_version_script yes)
+###fi
+###
+###AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
+###
+
+ac_check_headers(unistd.h stdint.h sys/types.h)
+ac_check_headers(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h)
+ac_check_headers(sys/user.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h)
+
+ac_check_headers(zlib.h)
+set(have_zlib ${HAVE_ZLIB_H})
+if(have_zlib)
+  set(compiles)
+  check_c_source_compiles("
+#include <zlib.h>
+void main () {
+#if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1230)
+}
+#else
+#error No good zlib found
+#endif
+" compiles)
+  if(compiles)
+       ac_msg_result("Using system zlib")
+       set(zlib_msg "system zlib")
+  set(HAVE_ZLIB yes)
+  else()
+       ac_msg_result("Using embedded zlib")
+       set(have_zlib no)
+       set(zlib_msg "bundled zlib")
+  endif()
+endif()
+
+if(have_zlib)
+  set(HAVE_ZLIB yes)
+endif()
+ac_define(HAVE_ZLIB 1 "Have system zlib")
+
+# for mono/metadata/debug-symfile.c
+ac_check_headers(elf.h)
+
+# for support
+ac_check_headers(poll.h)
+ac_check_headers(sys/poll.h)
+ac_check_headers(sys/wait.h)
+ac_check_headers(grp.h)
+ac_check_headers(syslog.h)
+
+# for mono/dis
+ac_check_headers(wchar.h)
+ac_check_headers(ieeefp.h)
+
+# Check whenever using GCC
+include(CheckCSourceCompiles)
+include(CheckCCompilerFlag)
+check_c_source_compiles("
+#ifdef __GNUC__
+#else
+#error 1
+#endif
+void main () {}
+" GCC)
+
+ac_msg_checking("for isinf")
+set(compiles)
+check_c_source_compiles("
+#include <math.h>
+void main () {
+int f = isinf (1);
+}
+" compiles)
+if(compiles)
+  ac_msg_result(yes)
+  ac_define(HAVE_ISINF 1 "isinf available")
+else()
+  ac_msg_result(no)
+endif()
+
+# not 64 bit clean in cross-compile
+ac_check_sizeof("void *" 4)
+
+set(WARN '')
+
+if(GCC)
+  set(WARN "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings")
+  # The runtime code does not respect ANSI C strict aliasing rules
+  set(CFLAGS "${CFLAGS} -fno-strict-aliasing")
+  CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement" HAS_WDECL_AFTER_STATEMENT)
+  if(HAS_WDECL_AFTER_STATEMENT)
+       set(WARN "${WARN} -Wdeclaration-after-statement")
+  endif()
+else()
+       # The Sun Forte compiler complains about inline functions that access static variables
+       # so disable all inlining.
+###    case "$host" in
+###    *-*-solaris*)
+###            set(CFLAGS "$CFLAGS -Dinline=")
+###            ;;
+###    esac
+###fi
+endif()
+
+set(CFLAGS "${CFLAGS} -g ${WARN}")
+
+###set(CFLAGS_FOR_LIBGC "$CFLAGS_FOR_LIBGC -g")
+###
+
+set(srcdir ${CMAKE_SOURCE_DIR})
+set(top_srcdir ${CMAKE_SOURCE_DIR})
+
+# FIXME:
+set(top_builddir ${CMAKE_BINARY_DIR})
+
+# Where's the 'mcs' source tree?
+if(EXISTS ${srcdir}/mcs)
+  set(mcsdir mcs)
+else()
+  set(mcsdir ../mcs)
+endif()
+
+#
+# A sanity check to catch cases where the package was unpacked
+# with an ancient tar program (Solaris)
+#
+ac_msg_checking("integrity of package")
+if(EXISTS ${srcdir}/${mcsdir}/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs)
+  ac_msg_result(ok)
+else()
+  set(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})
+endif()
+
+set(mcs_topdir ${top_srcdir}/${mcsdir})
+set(mcs_topdir_from_srcdir ${top_builddir}/${mcsdir})
+###
+##### Maybe should also disable if mcsdir is invalid.  Let's punt the issue for now.
+###AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno && test x$enable_mcs_build != xno])
+###
+###AC_SUBST([mcs_topdir])
+###AC_SUBST([mcs_topdir_from_srcdir])
+###
+#### Where's the 'olive' source tree?
+###if test -d $srcdir/olive; then
+###  set(olivedir olive)
+###else
+###  set(olivedir ../olive)
+###fi
+###
+###if test -d $srcdir/$olivedir; then
+###set(olive_topdir '$(top_srcdir)/'$olivedir)
+###fi
+###
+#### gettext: prepare the translation directories. 
+#### we do not configure the full gettext, as we consume it dynamically from C#
+###AM_PO_SUBDIRS
+###
+###if test "x$USE_NLS" = "xyes"; then
+###   AC_CHECK_PROG(HAVE_MSGFMT, msgfmt,yes,no)
+###
+###   if test "x$HAVE_MSGFMT" = "xno"; then
+###      ac_msg_error([msgfmt not found. You need to install the 'gettext' package, or pass --enable-set(nls no to configure.]))
+###   fi
+###fi
+###
+set(libgdiplus installed CACHE STRING "=installed|sibling|<path> Override the libgdiplus used for System.Drawing tests (defaults to installed)")
+set(with_libgdiplus ${libgdiplus})
+
+###case $with_libgdiplus in
+###no|installed) set(libgdiplus_loc  ;;)
+###yes|sibling) set(libgdiplus_loc `cd ../libgdiplus && pwd`/src/libgdiplus.la ;;)
+###/*) set(libgdiplus_loc $with_libgdiplus ;;)
+###*) set(libgdiplus_loc `pwd`/$with_libgdiplus ;;)
+###esac
+###AC_SUBST([libgdiplus_loc])
+###
+###
+###set(pkg_config_path )
+###set(crosspkgdir, [  --with-set(crosspkgdir /path/to/pkg-config/dir      Change pkg-config dir to custom dir],)
+###    if test x$with_crosspkgdir = "x"; then
+###            if test -s $PKG_CONFIG_PATH; then
+###                    set(pkg_config_path $PKG_CONFIG_PATH)
+###            fi
+###    else
+###            set(pkg_config_path $with_crosspkgdir)
+###            set(PKG_CONFIG_PATH $pkg_config_path)
+###            export PKG_CONFIG_PATH
+###    fi
+###)
+###
+###set([glib],
+###    [  --with-set(glib embedded|system    Choose glib API: system or embedded (default to system)],)
+###    [], [set(with_glib system]))
+###
+###set(eglib_dir )
+###
+
+include(FindPkgConfig)
+
+# FIXME:
+set(with_glib "system")
+if (${with_glib} STREQUAL "system")
+  ###  if test "x$cross_compiling" = "xyes"; then
+  ###    set(pkg_config_path "$PKG_CONFIG_PATH")
+  ###    unset PKG_CONFIG_PATH
+  ###  fi
+  PKG_CHECK_MODULES(GLIB2 REQUIRED glib-2.0 gthread-2.0)
+  set(BUILD_GLIB_CFLAGS ${GLIB2_CFLAGS})
+  set(BUILD_GLIB_LIBS ${GLIB2_LIBRARIES})
+
+  ###  if test "x$cross_compiling" = "xyes"; then
+  ###    set(PKG_CONFIG_PATH $pkg_config_path)
+  ###    export PKG_CONFIG_PATH
+  ###  fi
+  ###  
+  ## Versions of dependencies
+  set(GLIB_REQUIRED_VERSION 2.4.0)
+
+  PKG_CHECK_MODULES(GLIB2 REQUIRED glib-2.0 >= ${GLIB_REQUIRED_VERSION} gthread-2.0)
+  set(GLIB_CFLAGS ${GLIB2_CFLAGS})
+  set(GLIB_LIBS ${GLIB2_LIBRARIES})
+  PKG_CHECK_MODULES(GMODULE REQUIRED gmodule-2.0)
+  set(GMODULE_CFLAGS ${GMODULE_CFLAGS})
+  set(GMODULE_LIBS ${GMODULE_LIBRARIES})
+endif()
+
+###case $with_glib in
+###embedded) 
+###  set(GLIB_CFLAGS '-I$(top_srcdir)/eglib/src -I$(top_builddir)/eglib/src')
+###  set(GLIB_LIBS '-L$(top_builddir)/eglib/src -leglib -lm')
+###  set(BUILD_GLIB_CFLAGS "$GLIB_CFLAGS")
+###  set(BUILD_GLIB_LIBS "$GLIB_LIBS")
+###  set(GMODULE_CFLAGS "$GLIB_CFLAGS")
+###  set(GMODULE_LIBS "$GLIB_LIBS")
+###  set(eglib_dir eglib)
+###  AC_CONFIG_SUBDIRS(eglib)
+###  ;;
+###*)
+###  ac_msg_error([Invalid argument to --with-glib.])
+###esac
+if(with_glib STREQUAL "embedded")
+  set(EGLIB_BUILD yes)
+endif()
+###  
+###AC_SUBST(GLIB_CFLAGS)
+###AC_SUBST(GLIB_LIBS)
+###AC_SUBST(GMODULE_CFLAGS)
+###AC_SUBST(GMODULE_LIBS)
+###AC_SUBST(BUILD_GLIB_CFLAGS)
+###AC_SUBST(BUILD_GLIB_LIBS)
+###AC_SUBST(eglib_dir)
+###
+###if test x$cross_compiling$platform_win32 = xnoyes; then
+###   ac_msg_checking(for cygwin glib2-dev package)
+###   if [ cygcheck --f /usr/lib/libglib-2.0.dll.a | grep -q glib2-devel ]; then
+###      ac_msg_result(found)
+###      ac_msg_error([Mono cannot be built with the cygwin glib2-devel package installed, because that package doesn't work with -mno-cygwin. Please uninstall it then re-run configure.])
+###   else
+###      ac_msg_result(not found, ok)
+###   fi
+###
+###   ac_msg_checking(for broken gwin32.h)
+###   set(glib_include `$PKG_CONFIG --cflags-only-I glib-2.0 | sed -e 's/ -I.*//g' | sed -e 's/-I//g'`)
+###   if test -f $glib_include/glib/gwin32.h; then
+###      if [ grep ftruncate $glib_include/glib/gwin32.h | grep -q define ]; then
+###             ac_msg_result(failed)
+###             set(hashmark '#')
+###             ac_msg_error([Your version of gwin32.h is broken and will cause compilation errors when building mono. Please fix it by deleting the line: '$hashmark   define ftruncate...' from '$glib_include/glib/gwin32.h' then re-run configure.])
+###      fi
+###   fi
+###   ac_msg_result(ok)
+###fi
+
+# Enable support for fast thread-local storage
+# Some systems have broken support, so we allow to disable it.
+set(tls __thread CACHE STRING "Select Thread Local Storage implementation. Possible values are '__thread_' and 'pthread' (defaults to __thread)")
+set(with_tls ${tls})
+
+# Enable support for using sigaltstack for SIGSEGV and stack overflow handling
+# This does not work on some platforms (bug #55253)
+set(sigaltstack yes CACHE BOOL "Enable/disable support for sigaltstack (defaults to yes)")
+set(with_sigaltstack ${sigaltstack})
+
+set(static_mono yes CACHE BOOL "Link mono statically to libmono (faster) (defaults to yes)")
+set(with_static_mono ${static_mono})
+###
+###if test "x$enable_static" = "xno"; then
+###   set(with_static_mono no)
+###fi
+###
+###if test "x$platform_win32" = "xyes"; then
+###   # Boehm GC requires the runtime to be in its own dll
+###   set(with_static_mono no)
+###fi
+###
+if(with_static_mono)
+  set(STATIC_MONO yes)
+endif()
+###AC_ARG_ENABLE(mcs-build, [  --disable-mcs-build disable the build of the mcs directory], set(try_mcs_build $enableval, enable_mcs_build=yes))
+###
+###set(xen_opt,   [  --with-set(xen_opt yes,no          Enable Xen-specific behaviour (defaults to yes)],[],[with_xen_opt=yes]))
+###if test "x$with_xen_opt" = "xyes"; then
+###    ac_define(MONO_XEN_OPT, 1, [Xen-specific behaviour])
+###    set(ORIG_CFLAGS $CFLAGS)
+###    set(CFLAGS "$CFLAGS -mno-tls-direct-seg-refs")
+###    ac_msg_checking(for -mno-tls-direct-seg-refs option to gcc)
+###    AC_TRY_COMPILE([], [
+###                                       void main () { }
+###    ], [
+###       ac_msg_result(yes)
+###       # Pass it to libgc as well
+###       set(CFLAGS_FOR_LIBGC "$CFLAGS_FOR_LIBGC -mno-tls-direct-seg-refs")
+###    ], [
+###       ac_msg_result(no)
+###       set(CFLAGS $ORIG_CFLAGS)
+###    ])
+###fi
+
+set (quiet-build yes CACHE BOOL "Enable quiet runtime build (on by default)")
+
+set(DISABLED_FEATURES none)
+
+###AC_ARG_ENABLE(minimal, [  --enable-set(minimal LIST      drop support for LIST subsystems.)
+###     LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
+###     reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd.],
+###[
+###    for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
+###            eval "mono_feature_disable_$set(feature 'yes'")
+###            AC_MSG_NOTICE([Disabled support for feature: $feature])
+###    done
+###    set(DISABLED_FEATURES $enable_minimal)
+###    set(disabled "Disabled:    $enable_minimal")
+###],[])
+###
+ac_define_unquoted(DISABLED_FEATURES "${DISABLED_FEATURES}" "String of disabled features")
+###
+###if test "x$mono_feature_disable_aot" = "xyes"; then
+###    ac_define(DISABLE_AOT, 1, [Disable AOT support])
+###fi
+###
+###if test "x$mono_feature_disable_profiler" = "xyes"; then
+###    ac_define(DISABLE_PROFILER, 1, [Disable default profiler support])
+###fi
+###AM_CONDITIONAL(DISABLE_PROFILER, test x$mono_feature_disable_profiler = xyes)
+###
+###if test "x$mono_feature_disable_decimal" = "xyes"; then
+###    ac_define(DISABLE_DECIMAL, 1, [Disable System.Decimal support])
+###fi
+###
+###if test "x$mono_feature_disable_pinvoke" = "xyes"; then
+###    ac_define(DISABLE_PINVOKE, 1, [Disable P/Invoke support])
+###fi
+###
+###if test "x$mono_feature_disable_debug" = "xyes"; then
+###    ac_define(DISABLE_DEBUG, 1, [Disable runtime debugging support])
+###fi
+###
+###if test "x$mono_feature_disable_reflection_emit" = "xyes"; then
+###    ac_define(DISABLE_REFLECTION_EMIT, 1, [Disable reflection emit support])
+###    set(mono_feature_disable_reflection_emit_save yes)
+###fi
+###
+###if test "x$mono_feature_disable_reflection_emit_save" = "xyes"; then
+###    ac_define(DISABLE_REFLECTION_EMIT_SAVE, 1, [Disable assembly saving support in reflection emit])
+###fi
+###
+###if test "x$mono_feature_disable_large_code" = "xyes"; then
+###    ac_define(DISABLE_LARGE_CODE, 1, [Disable support for huge assemblies])
+###fi
+###
+###if test "x$mono_feature_disable_logging" = "xyes"; then
+###    ac_define(DISABLE_LOGGING, 1, [Disable support debug logging])
+###fi
+###
+###if test "x$mono_feature_disable_com" = "xyes"; then
+###    ac_define(DISABLE_COM, 1, [Disable COM support])
+###fi
+###
+###if test "x$mono_feature_disable_ssa" = "xyes"; then
+###    ac_define(DISABLE_SSA, 1, [Disable advanced SSA JIT optimizations])
+###fi
+###
+###if test "x$mono_feature_disable_generics" = "xyes"; then
+###    ac_define(DISABLE_GENERICS, 1, [Disable generics support])
+###fi
+###
+###if test "x$mono_feature_disable_attach" = "xyes"; then
+###    ac_define(DISABLE_ATTACH, 1, [Disable agent attach support])
+###fi
+###
+###if test "x$mono_feature_disable_jit" = "xyes"; then
+###    ac_define(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode will be supported by the runtime.])
+###fi
+###
+###AM_CONDITIONAL(DISABLE_JIT, test x$mono_feature_disable_jit = xyes)
+###
+###if test "x$mono_feature_disable_simd" = "xyes"; then
+###    ac_define(DISABLE_SIMD, 1, [Disable SIMD intrinsics related optimizations.])
+###fi
+###
+###ac_msg_checking(for visibility __attribute__)
+###AC_TRY_COMPILE([], [
+###   void __attribute__ ((visibility ("hidden"))) doit (void) {}
+###   void main () { doit (); }
+###], [
+###   set(have_visibility_hidden yes)
+###   ac_msg_result(yes)
+###], [
+###   set(have_visibility_hidden no)
+###   ac_msg_result(no)
+###])
+###
+
+#
+# libgc checks
+#
+
+set(gc_headers no)
+set(gc included)
+set(use_included_gc no)
+set(libgc_configure_args)
+set(gc_default included)
+
+set(gc ${gc_default} CACHE STRING "The GC library to use (defaults to included)")
+set(with_gc ${gc})
+
+# FIXME:
+set(enable_parallel_mark yes)
+###AC_ARG_ENABLE(parallel-mark, [  --enable-parallel-mark     Enables GC Parallel Marking], set(enable_parallel_mark $enableval, enable_parallel_mark=$parallel_mark))
+###if test x$enable_parallel_mark = xyes; then
+###    set(libgc_configure_args "$libgc_configure_args --enable-parallel-mark")
+###fi
+###
+set(LIBGC_CFLAGS )
+set(LIBGC_LIBS )
+set(LIBGC_STATIC_LIBS )
+set(libgc_dir )
+
+if (gc STREQUAL included)
+  set(found_boehm yes)
+  set(gc_headers yes)
+  set(use_included_gc yes)
+  set(libgc_dir libgc)
+
+  set(LIBGC_CFLAGS '-I${top_srcdir}/libgc/include')
+  set(LIBGC_LIBS '${top_builddir}/libgc/libmonogc.la')
+  set(LIBGC_STATIC_LIBS '${top_builddir}/libgc/libmonogc-static.la')
+
+  ac_define(HAVE_BOEHM_GC 1 "Have Boehm GC")
+###  AC_SUBST(HAVE_BOEHM_GC)
+
+  ac_define(HAVE_GC_H 1 "Have gc.h")
+  ac_define(USE_INCLUDED_LIBGC 1 "Use included libgc")
+
+  # The included libgc contains GCJ support
+  ac_define(HAVE_GC_GCJ_MALLOC 1 "Have GC_gcj_malloc")
+  ac_define(HAVE_GC_ENABLE 1 "Have GC_enable")
+  if (enable_parallel_mark STREQUAL yes)
+       ac_define_unquoted(USED_GC_NAME "Included Boehm (with typed GC and Parallel Mark)" "GC description")
+  else()
+       ac_define_unquoted(USED_GC_NAME "Included Boehm (with typed GC)" "GC description")
+  endif()
+endif()
+  
+###case "x$gc" in
+###    xboehm|xbohem|xyes)
+###            ac_check_headers(gc.h gc/gc.h, set(gc_headers yes))
+###            AC_CHECK_LIB(gc, GC_malloc, set(found_boehm "yes",,$libdl))
+###
+###            if test "x$found_boehm" != "xyes"; then
+###                    ac_msg_error("GC requested but libgc not found! Install libgc or run configure with --with-set(gc none."))
+###            fi
+###            if test "x$gc_headers" != "xyes"; then
+###                    ac_msg_error("GC requested but header files not found! You may need to install them by hand.")
+###            fi
+###
+###            ac_define(HAVE_BOEHM_GC, 1, [Have Boehm GC])
+###            AC_SUBST(HAVE_BOEHM_GC)
+###            set(LIBGC_LIBS "-lgc $libdl")
+###            set(LIBGC_STATIC_LIBS "$LIBGC_LIBS")
+###
+###            # ac_check_funcs does not work for some reason...
+###            AC_CHECK_LIB(gc, GC_gcj_malloc, set(found_gcj_malloc "yes",,$libdl))
+###            if test "x$found_gcj_malloc" = "xyes"; then
+###                    ac_define(HAVE_GC_GCJ_MALLOC, 1, [Have GC_gcj_malloc])
+###                    ac_define_unquoted(USED_GC_NAME, "System Boehm (with typed GC)", [GC description])
+###            else
+###                    ac_define_unquoted(USED_GC_NAME, "System Boehm (no typed GC)", [GC description])
+###            fi
+###            AC_CHECK_LIB(gc, GC_enable, set(found_gc_enable "yes",,$libdl))
+###            if test "x$found_gc_enable" = "xyes"; then
+###                    ac_define(HAVE_GC_ENABLE, 1, [Have 'GC_enable'])
+###            fi
+###            ;;
+###
+###    xincluded)
+###            set(found_boehm yes)
+###            set(gc_headers yes)
+###            set(use_included_gc yes)
+###            set(libgc_dir libgc)
+###
+###            set(LIBGC_CFLAGS '-I$(top_srcdir)/libgc/include')
+###            set(LIBGC_LIBS '$(top_builddir)/libgc/libmonogc.la')
+###            set(LIBGC_STATIC_LIBS '$(top_builddir)/libgc/libmonogc-static.la')
+###
+###            ac_define(HAVE_BOEHM_GC, 1, [Have Boehm GC])
+###            AC_SUBST(HAVE_BOEHM_GC)
+###
+###            ac_define(HAVE_GC_H, 1, [Have gc.h])
+###            ac_define(USE_INCLUDED_LIBGC, 1, [Use included libgc])
+###
+###            # The included libgc contains GCJ support
+###            ac_define(HAVE_GC_GCJ_MALLOC, 1, [Have GC_gcj_malloc])
+###            ac_define(HAVE_GC_ENABLE, 1, [Have GC_enable])
+###            if test x$enable_parallel_mark = xyes; then
+###                    ac_define_unquoted(USED_GC_NAME, "Included Boehm (with typed GC and Parallel Mark)", [GC description])
+###            else
+###                    ac_define_unquoted(USED_GC_NAME, "Included Boehm (with typed GC)", [GC description])
+###            fi
+###            ;;
+###
+###    xsgen)
+###            set(found_boehm no)
+###            set(gc_headers no)
+###            set(use_included_gc no)
+###            ac_define(HAVE_SGEN_GC,1,[Using the simple generational GC.])
+###            ac_define(HAVE_MOVING_COLLECTOR,1,[The GC can move objects.])
+###            ac_define(HAVE_WRITE_BARRIERS,1,[The GC needs write barriers.])
+###            ac_define_unquoted(USED_GC_NAME, "Simple generational", [GC description])
+###            ;;
+###
+###    xnone)
+###            AC_MSG_WARN("Compiling mono without GC.")
+###            ac_define_unquoted(USED_GC_NAME, "none", [GC description])
+###            ac_define(HAVE_NULL_GC,1,[No GC support.])
+###            ;;
+###    *)
+###            ac_msg_error([Invalid argument to --with-gc.])
+###            ;;
+###esac
+###
+###set(large-heap, [  --with-large-set(heap yes,no       Enable support for GC heaps larger than 3GB (defaults to no)], [large_heap=$withval], [large_heap=no]))
+###if test "x$large_heap" = "xyes"; then
+###   echo "FOO"
+###   set(CPPFLAGS "$CPPFLAGS -DLARGE_CONFIG")
+###fi
+###
+###AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
+###AC_SUBST(LIBGC_CFLAGS)
+###AC_SUBST(LIBGC_LIBS)
+###AC_SUBST(LIBGC_STATIC_LIBS)
+###AC_SUBST(libgc_dir)
+###
+#
+# End of libgc checks
+#
+
+include(CheckFunctionExists)
+include(CheckLibraryExists)
+
+if(platform_win32 STREQUAL no)
+
+###
+       # hires monotonic clock support
+###    AC_SEARCH_LIBS(clock_gettime, rt)
+
+  check_function_exists (dlopen dlopen_found)
+  if (dlopen_found)
+       set(DL_LIB "")
+  else()
+       check_library_exists (-ldl dlopen "" libdl_found)
+       if (libdl_found)
+         set(DL_LIB "-ldl")
+       else()
+         set(dl_support no)
+       endif()
+  endif()
+
+  if (dl_support STREQUAL no)
+       # FIXME:
+       ###             AC_MSG_WARN([No dynamic loading support available])
+  else()
+       set(LIBS ${LIBS} ${DL_LIB})
+       ac_define(HAVE_DL_LOADER 1 "dlopen-based dynamic loader available")
+       
+###            # from glib's configure.in
+###            AC_CACHE_CHECK([for preceeding underscore in symbols],
+###                    mono_cv_uscore,[
+###                    AC_TRY_RUN([#include <dlfcn.h>
+###                    int mono_underscore_test (void) { return 42; }
+###                    int main() {
+###                      void *f1 = (void*)0, *f2 = (void*)0, *handle;
+###                      handle = dlopen ((void*)0, 0);
+###                      if (handle) {
+###                        f1 = dlsym (handle, "mono_underscore_test");
+###                        f2 = dlsym (handle, "_mono_underscore_test");
+###                      } return (!f2 || f1);
+###                    }],
+###                            [set(mono_cv_uscore yes],)
+###                            [set(mono_cv_uscore no],)
+###                    [])
+###            ])
+###            if test "x$mono_cv_uscore" = "xyes"; then
+###                    set(MONO_DL_NEED_USCORE 1)
+###            else
+###                    set(MONO_DL_NEED_USCORE 0)
+###            fi
+###            AC_SUBST(MONO_DL_NEED_USCORE)
+###            AC_CHECK_FUNC(dlerror)
+    endif()
+
+       # ******************************************************************
+       # *** Checks for the IKVM JNI interface library                  ***
+       # ******************************************************************
+       set(ikvm-native yes CACHE BOOL "Build the IKVM JNI interface library (defaults to yes)")
+       set(with_ikvm_native ${ikvm-native})
+       set(ikvm_native_dir )
+       if(with_ikvm_native)
+         set(ikvm_native_dir ikvm-native)
+         set(jdk_headers_found "IKVM Native")
+       endif()
+
+       ac_check_headers(execinfo.h)
+
+       ac_check_funcs(getgrgid_r)
+       ac_check_funcs(getgrnam_r)
+       ac_check_funcs(getpwnam_r)
+       ac_check_funcs(getpwuid_r)
+       ac_check_funcs(getresuid)
+       ac_check_funcs(setresuid)
+       ac_check_funcs(kqueue)
+       ac_check_funcs(backtrace_symbols)
+       ac_check_funcs(mkstemp)
+       ac_check_funcs(mmap)
+       ac_check_funcs(madvise)
+       ac_check_funcs(getrusage)
+       ac_check_funcs(getpriority)
+       ac_check_funcs(setpriority)
+
+       ac_check_funcs(sched_setaffinity)
+
+       # ******************************************************************
+       # *** Check for large file support                               ***
+       # *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
+       # ******************************************************************
+###    
+       # Check that off_t can represent 2**63 - 1 correctly, working around
+       # potential compiler bugs.  Defines LARGE_FILE_SUPPORT, adds $1 to
+       # CPPFLAGS and sets $large_offt to yes if the test succeeds
+###    set(large_offt no)
+###    AC_DEFUN([LARGE_FILES], [
+###            set(large_CPPFLAGS $CPPFLAGS)
+###            set(CPPFLAGS "$CPPFLAGS $1")
+###            AC_TRY_RUN([
+###                    #include <sys/types.h>
+###
+###                    #define BIG_OFF_T (((off_t)1<<62)-1+((off_t)1<<62))
+###
+###                    int main(void) {
+###                            int set(big_off_t ((BIG_OFF_T%2147483629==721) &&)
+###                                           (BIG_OFF_T%set(2147483647 =1));)
+###                            if(big_off_t) {
+###                                    exit(0);
+###                            } else {
+###                                    exit(1);
+###                            }
+###                    }
+###            ], [
+###                    ac_msg_result(ok)
+###                    ac_define(HAVE_LARGE_FILE_SUPPORT, 1, [Have large file support])
+###                    set(large_CPPFLAGS "$large_CPPFLAGS $1")
+###                    set(large_offt yes)
+###            ], [
+###                    ac_msg_result(no)
+###            ], "")
+###            set(CPPFLAGS $large_CPPFLAGS)
+###    ])
+###
+###    ac_msg_checking(if off_t is 64 bits wide)
+###    LARGE_FILES("")
+###    if test $large_offt = no; then
+###            ac_msg_checking(if set(_FILE_OFFSET_BITS 64 gives 64 bit off_t))
+###            LARGE_FILES("-set(D_FILE_OFFSET_BITS 64"))
+###    fi
+###    if test $large_offt = no; then
+###            AC_MSG_WARN([No 64 bit file size support available])
+###    fi
+###    
+       # *****************************
+       # *** Checks for libsocket  ***
+       # *****************************
+###    AC_CHECK_LIB(socket, socket, set(LIBS "$LIBS -lsocket"))
+###
+       # *******************************
+       # *** Checks for MSG_NOSIGNAL ***
+       # *******************************
+###    ac_msg_checking(for MSG_NOSIGNAL)
+###    AC_TRY_COMPILE([#include <sys/socket.h>], [
+###            int f = MSG_NOSIGNAL;
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_MSG_NOSIGNAL, 1, [Have MSG_NOSIGNAL])
+###    ], [
+###            # We'll have to use signals
+###            ac_msg_result(no)
+###    ])
+###
+       # *****************************
+       # *** Checks for SOL_IP     ***
+       # *****************************
+###    ac_msg_checking(for SOL_IP)
+###    AC_TRY_COMPILE([#include <netdb.h>], [
+###            int level = SOL_IP;
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_SOL_IP, 1, [Have SOL_IP])
+###    ], [
+###            # We'll have to use getprotobyname
+###            ac_msg_result(no)
+###    ])
+###
+       # *****************************
+       # *** Checks for SOL_IPV6     ***
+       # *****************************
+###    ac_msg_checking(for SOL_IPV6)
+###    AC_TRY_COMPILE([#include <netdb.h>], [
+###            int level = SOL_IPV6;
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_SOL_IPV6, 1, [Have SOL_IPV6])
+###    ], [
+###            # We'll have to use getprotobyname
+###            ac_msg_result(no)
+###    ])
+###
+       # *****************************
+       # *** Checks for SOL_TCP    ***
+       # *****************************
+###    ac_msg_checking(for SOL_TCP)
+###    AC_TRY_COMPILE([#include <netdb.h>], [
+###            int level = SOL_TCP;
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_SOL_TCP, 1, [Have SOL_TCP])
+###    ], [
+###            # We'll have to use getprotobyname
+###            ac_msg_result(no)
+###    ])
+###
+       # *****************************
+       # *** Checks for IP_PKTINFO ***
+       # *****************************
+###    ac_msg_checking(for IP_PKTINFO)
+###    AC_TRY_COMPILE([#include <netdb.h>], [
+###            int level = IP_PKTINFO;
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_IP_PKTINFO, 1, [Have IP_PKTINFO])
+###    ], [
+###            ac_msg_result(no)
+###    ])
+###
+       # *****************************
+       # *** Checks for IPV6_PKTINFO ***
+       # *****************************
+###    ac_msg_checking(for IPV6_PKTINFO)
+###    AC_TRY_COMPILE([#include <netdb.h>], [
+###            int level = IPV6_PKTINFO;
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_IPV6_PKTINFO, 1, [Have IPV6_PKTINFO])
+###    ], [
+###            ac_msg_result(no)
+###    ])
+###
+       # **********************************
+       # *** Checks for IP_DONTFRAGMENT ***
+       # **********************************
+###    ac_msg_checking(for IP_DONTFRAGMENT)
+###    AC_TRY_COMPILE([#include <netdb.h>], [
+###            int level = IP_DONTFRAGMENT;
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_IP_DONTFRAGMENT, 1, [Have IP_DONTFRAGMENT])
+###    ], [
+###            ac_msg_result(no)
+###    ])
+###
+       # **********************************
+       # *** Checks for IP_MTU_DISCOVER ***
+       # **********************************
+###    ac_msg_checking(for IP_MTU_DISCOVER)
+###    AC_TRY_COMPILE([#include <netdb.h>], [
+###            int level = IP_MTU_DISCOVER;
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_IP_MTU_DISCOVER, 1, [Have IP_MTU_DISCOVER])
+###    ], [
+###            ac_msg_result(no)
+###    ])
+###
+###    # *********************************
+       # *** Check for struct ip_mreqn ***
+       # *********************************
+###    ac_msg_checking(for struct ip_mreqn)
+###    AC_TRY_COMPILE([#include <netinet/in.h>], [
+###            struct ip_mreqn mreq;
+###            mreq.imr_address.s_addr = 0;
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_STRUCT_IP_MREQN, 1, [Have struct ip_mreqn])
+###    ], [
+###            # We'll just have to try and use struct ip_mreq
+###            ac_msg_result(no)
+###            ac_msg_checking(for struct ip_mreq)
+###            AC_TRY_COMPILE([#include <netinet/in.h>], [
+###                    struct ip_mreq mreq;
+###                    mreq.imr_interface.s_addr = 0;
+###            ], [
+###                    # Yes, we have it...
+###                    ac_msg_result(yes)
+###                    ac_define(HAVE_STRUCT_IP_MREQ, 1, [Have struct ip_mreq])
+###            ], [
+###                    # No multicast support
+###                    ac_msg_result(no)
+###            ])
+###    ])
+###    
+       # **********************************
+       # *** Check for gethostbyname2_r ***
+       # **********************************
+###    ac_msg_checking(for gethostbyname2_r)
+###            AC_TRY_LINK([#include <netdb.h>], [
+###            gethostbyname2_r(NULL,0,NULL,NULL,0,NULL,NULL);
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_GETHOSTBYNAME2_R, 1, [Have gethostbyname2_r])
+###    ], [
+###            ac_msg_result(no)
+###    ])
+###
+       # *****************************
+       # *** Checks for libnsl     ***
+       # *****************************
+###    AC_CHECK_FUNC(gethostbyaddr, , AC_CHECK_LIB(nsl, gethostbyaddr, set(LIBS "$LIBS -lnsl")))
+
+ac_check_funcs(inet_pton inet_aton)
+
+# ***********************************************
+# *** Checks for size of sockaddr_un.sun_path ***
+# ***********************************************
+# FIXME: cache
+ac_msg_checking("size of sockaddr_un.sun_path")
+
+FILE(WRITE "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.c"
+"
+                       #include <sys/types.h>
+                       #include <stdio.h>
+                       #include <sys/un.h>
+
+                       int main(void) {
+                               struct sockaddr_un sock_un;
+                               printf(\"%d\\n\", sizeof(sock_un.sun_path));
+                               exit(0);
+                       }
+")
+
+TRY_RUN(run_res run_compiled
+  ${CMAKE_BINARY_DIR}
+  ${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp/conftest.c
+  RUN_OUTPUT_VARIABLE output)
+
+set(mono_cv_sizeof_sunpath 0)
+if(run_compiled)
+  if (run_res EQUAL 0)
+       string(REGEX MATCH "[0-9]+" mono_cv_sizeof_sunpath ${output})
+  endif()
+endif()
+
+ac_msg_result(${mono_cv_sizeof_sunpath})
+ac_define(MONO_SIZEOF_SUNPATH ${mono_cv_sizeof_sunpath} "Sizeof sock_un.sun_path")
+###
+       # *************************************
+       # *** Checks for zero length arrays ***
+       # *************************************
+###    ac_msg_checking(whether $CC supports zero length arrays)
+###    AC_TRY_COMPILE([
+###                struct s {
+###                        int  length;
+###                        char data [0];
+###                };
+###        ], [], [
+###            ac_msg_result(yes)
+###            ac_define_unquoted(MONO_ZERO_ARRAY_LENGTH, 0, [Length of zero length arrays])
+###    ], [
+###            ac_msg_result(no)
+###            ac_define_unquoted(MONO_ZERO_ARRAY_LENGTH, 1, [Length of zero length arrays])
+###    ])
+###
+       # *****************************
+       # *** Checks for libxnet    ***
+       # *****************************
+###    case "${host}" in
+###            *solaris* )
+###                    ac_msg_checking(for Solaris XPG4 support)
+###                    if test -f /usr/lib/libxnet.so; then
+###                            set(CPPFLAGS "$CPPFLAGS -D_XOPEN_SOURCE=500")
+###                            set(CPPFLAGS "$CPPFLAGS -D__EXTENSIONS__")
+###                            set(CPPFLAGS "$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED=1")
+###                            set(LIBS "$LIBS -lxnet")
+###                            ac_msg_result(yes)
+###                    else
+###                            ac_msg_result(no)
+###                    fi
+###
+###                    if test "$GCC" = "yes"; then
+###                            set(CFLAGS "$CFLAGS -Wno-char-subscripts")
+###                    fi
+###                    ;;
+###    esac
+###
+       # *****************************
+       # *** Checks for libpthread ***
+       # *****************************
+# on FreeBSD -STABLE, the pthreads functions all reside in libc_r
+# and libpthread does not exist
+#
+###    case "${host}" in
+###            *-*-*freebsd*)
+###                    AC_CHECK_LIB(pthread, main, set(LIBS "$LIBS -pthread"))
+###            ;;
+###            *)
+###                    AC_CHECK_LIB(pthread, main, set(LIBS "$LIBS -lpthread"))
+###            ;;
+###    esac
+ac_check_headers(pthread.h)
+###    ac_check_funcs(pthread_mutex_timedlock)
+###    ac_check_funcs(pthread_getattr_np pthread_attr_get_np)
+###    ac_msg_checking(for PTHREAD_MUTEX_RECURSIVE)
+###    AC_TRY_COMPILE([ #include <pthread.h>], [
+###            pthread_mutexattr_t attr;
+###            pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+###    ], [
+###            ac_msg_result(ok)
+###    ], [
+###            ac_msg_result(no)
+###            AC_MSG_WARN(Using mono_mutex_t for recursive mutexes)
+###            ac_define(USE_MONO_MUTEX, 1, [Use mono_mutex_t])
+###    ])
+###    ac_check_funcs(pthread_attr_setstacksize)
+###    ac_check_funcs(pthread_attr_getstack)
+###    ac_check_funcs(pthread_get_stacksize_np pthread_get_stackaddr_np)
+###
+       # ***********************************
+       # *** Checks for working __thread ***
+       # ***********************************
+###    ac_msg_checking(for working __thread)
+###    if test "x$with_tls" != "x__thread"; then
+###            ac_msg_result(disabled)
+###    else
+###            AC_TRY_RUN([
+###                    #include <pthread.h>
+###                    __thread int i;
+###                    static int res1, res2;
+###
+###                    void thread_main (void *arg)
+###                    {
+###                            i = arg;
+###                            sleep (1);
+###                            if (arg == 1)
+###                                    res1 = (i == arg);
+###                            else
+###                                    res2 = (i == arg);
+###                    }
+###
+###                    int main () {
+###                            pthread_t t1, t2;
+###
+###                            i = 5;
+###
+###                            pthread_create (&t1, NULL, thread_main, 1);
+###                            pthread_create (&t2, NULL, thread_main, 2);
+###
+###                            pthread_join (t1, NULL);
+###                            pthread_join (t2, NULL);
+###
+###                            return !(res1 + res2 == 2);
+###                    }
+###            ], [
+###                            ac_msg_result(yes)
+###            ], [
+###                            ac_msg_result(no)
+###                            set(with_tls pthread)
+###            ])
+###    fi
+###
+       # **************************************
+       # *** Checks for working sigaltstack ***
+       # **************************************
+###    ac_msg_checking(for working sigaltstack)
+###    if test "x$with_sigaltstack" != "xyes"; then
+###            ac_msg_result(disabled)
+###    else
+###            AC_TRY_RUN([
+###                    #include <stdio.h>
+###                    #include <stdlib.h>
+###                    #include <unistd.h>
+###                    #include <signal.h>
+###                    #include <pthread.h>
+###                    #include <sys/wait.h>
+###                    #if defined(__FreeBSD__) || defined(__NetBSD__)
+###                    #define SA_STACK SA_ONSTACK
+###                    #endif
+###                    static void
+###                    sigsegv_signal_handler (int _dummy, siginfo_t *info, void *context)
+###                    {
+###                            exit (0);
+###                    }
+###
+###                    static void *
+###                    loop (void *ignored)
+###                    {
+###                            char *ptr = NULL;
+###
+###                            *ptr = 0;
+###                            return NULL;
+###                    }
+###
+###                    static void
+###                    child ()
+###                    {
+###                            struct sigaction sa;
+###                            struct sigaltstack sas;
+###                            pthread_t id;
+###                            pthread_attr_t attr;
+###
+###                            sa.sa_sigaction = sigsegv_signal_handler;
+###                            sigemptyset (&sa.sa_mask);
+###                            sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
+###                            if (sigaction (SIGSEGV, &sa, NULL) == -1) {
+###                                    perror ("sigaction");
+###                                    return;
+###                            }
+###
+###                            sas.ss_sp = malloc (SIGSTKSZ);
+###                            sas.ss_size = SIGSTKSZ;
+###                            sas.ss_flags = 0;
+###                            if (sigaltstack (&sas, NULL) == -1) {
+###                                    perror ("sigaltstack");
+###                                    return;
+###                            }
+###
+###                            pthread_attr_init (&attr);
+###                            if (pthread_create(&id, &attr, loop, &attr) != 0) {
+###                                    printf ("pthread_create\n");
+###                                    return;
+###                            }
+###
+###                            sleep (100);
+###                    }
+###
+###                    int
+###                    main ()
+###                    {
+###                            pid_t son;
+###                            int status;
+###                            int i;
+###
+###                            son = fork ();
+###                            if (son == -1) {
+###                                    return 1;
+###                            }
+###
+###                            if (son == 0) {
+###                                    child ();
+###                                    return 0;
+###                            }
+###
+###                            for (i = 0; i < 3; ++i) {
+###                                    sleep (1);
+###                                    waitpid (son, &status, WNOHANG);
+###                                    if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
+###                                            return 0;
+###                            }
+###
+###                            kill (son, SIGKILL);
+###                            return 1;
+###                    }
+###
+###            ], [
+###                            ac_msg_result(yes)
+###                            ac_define(HAVE_WORKING_SIGALTSTACK, 1, [Have a working sigaltstack])
+###            ], [
+###                            set(with_sigaltstack no)
+###                            ac_msg_result(no)
+###            ])
+###    fi
+###
+       # ********************************
+       # *** Checks for semaphore lib ***
+       # ********************************
+       # 'Real Time' functions on Solaris
+       # posix4 on Solaris 2.6
+       # pthread (first!) on Linux
+###    AC_SEARCH_LIBS(sem_init, pthread rt posix4) 
+       check_library_exists(pthread shm_open "" HAVE_SHM_OPEN1)
+       if(HAVE_SHM_OPEN1)
+         # FIXME:
+       else()
+         check_library_exists(rt shm_open "" HAVE_SHM_OPEN2)
+         if(HAVE_SHM_OPEN2)
+               set(LIBS ${LIBS} -lrt)
+               set(CMAKE_REQUIRED_LIBRARIES rt)
+               ac_check_funcs(shm_open)
+               set(CMAKE_REQUIRED_LIBRARIES)
+         else()
+               # FIXME: posix4
+         endif()
+       endif()
+
+       # ********************************
+       # *** Checks for timezone stuff **
+       # ********************************
+###    AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
+###            AC_TRY_COMPILE([
+###                    #include <time.h>
+###                    ], [
+###                    struct tm tm;
+###                    tm.tm_gmtoff = 1;
+###                    ], set(ac_cv_struct_tm_gmtoff yes, ac_cv_struct_tm_gmtoff=no)))
+###    if test $ac_cv_struct_tm_gmtoff = yes; then
+###            ac_define(HAVE_TM_GMTOFF, 1, [Have tm_gmtoff])
+###    else
+###            AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
+###                    AC_TRY_COMPILE([
+###                            #include <time.h>
+###                    ], [
+###                            timezone = 1;
+###                    ], set(ac_cv_var_timezone yes, ac_cv_var_timezone=no)))
+###            if test $ac_cv_var_timezone = yes; then
+###                    ac_define(HAVE_TIMEZONE, 1, [Have timezone variable])
+###            else
+###                    AC_ERROR(unable to find a way to determine timezone)
+###            fi
+###    fi
+###
+# *********************************
+# *** Checks for math functions ***
+# *********************************
+set(LIBS ${LIBS} -lm)
+###    if test "x$has_broken_apple_cpp" != "xyes"; then
+###            ac_check_funcs(finite, , ac_msg_checking(for finite in math.h)
+###                    AC_TRY_LINK([#include <math.h>], 
+###                    [ finite(0.0); ], 
+###                    ac_define(HAVE_FINITE, 1, [Have finite]) ac_msg_result(yes),
+###                    ac_msg_result(no)))
+###    fi
+###        ac_check_funcs(isfinite, , ac_msg_checking(for isfinite in math.h)
+###                AC_TRY_LINK([#include <math.h>], 
+###                [ isfinite(0.0); ], 
+###                ac_define(HAVE_ISFINITE, 1, [Have isfinite]) ac_msg_result(yes),
+###                ac_msg_result(no)))
+###
+# ****************************************************************
+# *** Checks for working poll() (macosx defines it but doesn't ***
+# *** have it in the library (duh))                            ***
+# ****************************************************************
+###    ac_check_funcs(poll)
+###
+# *************************
+# *** Check for signbit ***
+# *************************
+###    ac_msg_checking(for signbit)
+###    AC_TRY_LINK([#include <math.h>], [
+###            int s = signbit(1.0);
+###    ], [
+###            ac_msg_result(yes)
+###            ac_define(HAVE_SIGNBIT, 1, [Have signbit])
+###    ], [
+###            ac_msg_result(no)
+###    ]) 
+###
+# **********************************
+# *** epoll                       ***
+# **********************************
+ac_check_headers(sys/epoll.h)
+set(haveepoll no)
+###    ac_check_funcs(epoll_ctl, [set(haveepoll yes], ))
+###    if test "x$haveepoll" = "xyes" -a "x$ac_cv_header_sys_epoll_h" = "xyes" ; then
+###            ac_define(HAVE_EPOLL, 1, [epoll supported])
+###    fi
+###
+# ******************************
+# *** Checks for SIOCGIFCONF ***
+# ******************************
+ac_check_headers(sys/ioctl.h)
+ac_check_headers(net/if.h)
+###    ac_msg_checking(for ifreq)
+###    AC_TRY_COMPILE([
+###            #include <stdio.h>
+###            #include <sys/ioctl.h>
+###            #include <net/if.h>
+###            ], [
+###            struct ifconf ifc;
+###            struct ifreq *ifr;
+###            void *x;
+###            ifc.ifc_len = 0;
+###            ifc.ifc_buf = NULL;
+###            x = (void *) &ifr->ifr_addr;
+###            ],[
+###                    ac_msg_result(yes)
+###                    ac_define(HAVE_SIOCGIFCONF, 1, [Can get interface list])
+###            ], [
+###                    ac_msg_result(no)
+###            ])
+# **********************************
+# ***     Checks for sin_len     ***
+# **********************************
+###    ac_msg_checking(for sockaddr_in.sin_len)
+###    AC_TRY_COMPILE([
+###            #include <netinet/in.h>
+###            ], [
+###            struct sockaddr_in saddr;
+###            saddr.sin_len = sizeof (saddr);
+###            ],[
+###                    ac_msg_result(yes)
+###                    ac_define(HAVE_SOCKADDR_IN_SIN_LEN, 1, [sockaddr_in has sin_len])
+###            ], [
+###                    ac_msg_result(no)
+###            ])      
+# **********************************
+# ***    Checks for sin6_len     ***
+# **********************************
+###    ac_msg_checking(for sockaddr_in6.sin6_len)
+###    AC_TRY_COMPILE([
+###            #include <netinet/in.h>
+###            ], [
+###            struct sockaddr_in6 saddr6;
+###            saddr6.sin6_len = sizeof (saddr6);
+###            ],[
+###                    ac_msg_result(yes)
+###                    ac_define(HAVE_SOCKADDR_IN6_SIN_LEN, 1, [sockaddr_in6 has sin6_len])
+###            ], [
+###                    ac_msg_result(no)
+###            ])      
+# **********************************
+# *** Checks for MonoPosixHelper ***
+# **********************************
+ac_check_headers(checklist.h)
+ac_check_headers(fstab.h)
+ac_check_headers(attr/xattr.h)
+ac_check_headers(sys/extattr.h)
+ac_check_headers(sys/sendfile.h)
+ac_check_headers(sys/statvfs.h)
+ac_check_headers(sys/statfs.h)
+ac_check_headers(sys/vfstab.h)
+ac_check_headers(sys/xattr.h)
+ac_check_headers(sys/mman.h)
+ac_check_headers(sys/param.h)
+ac_check_headers(sys/mount.h)
+###    ac_check_funcs(getdomainname)
+###    ac_check_funcs(setdomainname)
+###    ac_check_funcs(fgetgrent)
+###    ac_check_funcs(fgetpwent)
+###    ac_check_funcs(fgetpwent)
+###    ac_check_funcs(getfsstat)
+###    ac_check_funcs(lutimes)
+###    ac_check_funcs(mremap)
+###    ac_check_funcs(remap_file_pages)
+###    ac_check_funcs(posix_fadvise)
+###    ac_check_funcs(posix_fallocate)
+###    ac_check_funcs(posix_madvise)
+###    ac_check_funcs(vsnprintf)
+###    ac_check_funcs(sendfile)
+###    ac_check_funcs(sethostid)
+###    ac_check_funcs(statfs)
+###    ac_check_funcs(fstatfs)
+###    ac_check_funcs(statvfs)
+###    ac_check_funcs(fstatvfs)
+###    ac_check_funcs(stime)
+###    ac_check_funcs(strerror_r)
+###    ac_check_funcs(ttyname_r)
+ac_check_sizeof(size_t)
+###    AC_CHECK_TYPES([blksize_t], [ac_define(HAVE_BLKSIZE_T)], , 
+###            [#include <sys/types.h>
+###             #include <sys/stat.h>
+###             #include <unistd.h>])
+###    AC_CHECK_TYPES([blkcnt_t], [ac_define(HAVE_BLKCNT_T)], ,
+###            [#include <sys/types.h>
+###             #include <sys/stat.h>
+###             #include <unistd.h>])
+###    AC_CHECK_TYPES([suseconds_t], [ac_define(HAVE_SUSECONDS_T)], ,
+###            [#include <sys/time.h>])
+###    AC_CHECK_TYPES([struct flock], [ac_define(HAVE_STRUCT_FLOCK)], ,
+###            [#include <unistd.h>
+###             #include <fcntl.h>])
+###    AC_CHECK_TYPES([struct pollfd], [ac_define(HAVE_STRUCT_POLLFD)], ,
+###            [#include <sys/poll.h>])
+###    AC_CHECK_TYPES([struct stat], [ac_define(HAVE_STRUCT_STAT)], ,
+###            [#include <sys/types.h>
+###             #include <sys/stat.h>
+###             #include <unistd.h>])
+###    AC_CHECK_TYPES([struct timespec], [ac_define(HAVE_STRUCT_TIMESPEC)], ,
+###            [#include <time.h>])
+###    AC_CHECK_TYPES([struct timeval], [ac_define(HAVE_STRUCT_TIMEVAL)], ,
+###            [#include <sys/time.h>
+###             #include <sys/types.h>
+###             #include <utime.h>])
+###    AC_CHECK_TYPES([struct timezone], [ac_define(HAVE_STRUCT_TIMEZONE)], ,
+###            [#include <sys/time.h>])
+###    AC_CHECK_TYPES([struct utimbuf], [ac_define(HAVE_STRUCT_UTIMBUF)], ,
+###            [#include <sys/types.h>
+###             #include <utime.h>])
+###    AC_CHECK_MEMBERS(
+###            [struct dirent.d_off, struct dirent.d_reclen, struct dirent.d_type],,, 
+###            [#include <sys/types.h>
+###             #include <dirent.h>])
+###
+# Favour xattr through glibc, but use libattr if we have to
+###    AC_CHECK_FUNC(lsetxattr, ,
+###            AC_CHECK_LIB(attr, lsetxattr, set(XATTR_LIB "-lattr",))
+###    )
+###    AC_SUBST(XATTR_LIB)
+###
+# kinfo_proc.kp_proc works on darwin but fails on other simil-bsds
+###    AC_CHECK_MEMBERS(
+###            [struct kinfo_proc.kp_proc],,, 
+###            [#include <sys/types.h>
+###             #include <sys/sysctl.h>
+###             #include <sys/proc.h>
+###             ])
+###
+# *********************************
+# *** Checks for Windows compilation ***
+# *********************************
+ac_check_headers(sys/time.h)
+ac_check_headers(sys/param.h)
+ac_check_headers(dirent.h)
+
+# *********************************
+# *** Check for Console 2.0 I/O ***
+# *********************************
+ac_check_headers(curses.h)
+ac_check_headers(term.h)
+###    ac_check_headers([term.h], [], [],
+###    [#if HAVE_CURSES_H
+###     #include <curses.h>
+###     #endif
+###    ])
+ac_check_headers(termios.h)
+###
+# * This is provided in io-layer, but on windows it's only available
+# * on xp+
+###    ac_define(HAVE_GETPROCESSID, 1, [Define if GetProcessId is available])
+###else
+###    set(jdk_headers_found no)
+###    AC_CHECK_LIB(ws2_32, main, set(LIBS "$LIBS -lws2_32", AC_ERROR(bad mingw install?)))
+###    AC_CHECK_LIB(psapi, main, set(LIBS "$LIBS -lpsapi", AC_ERROR(bad mingw install?)))
+###    AC_CHECK_LIB(ole32, main, set(LIBS "$LIBS -lole32", AC_ERROR(bad mingw install?)))
+###    AC_CHECK_LIB(winmm, main, set(LIBS "$LIBS -lwinmm", AC_ERROR(bad mingw install?)))
+###    AC_CHECK_LIB(oleaut32, main, set(LIBS "$LIBS -loleaut32", AC_ERROR(bad mingw install?)))
+###    AC_CHECK_LIB(advapi32, main, set(LIBS "$LIBS -ladvapi32", AC_ERROR(bad mingw install?)))
+###    AC_CHECK_LIB(version, main, set(LIBS "$LIBS -lversion", AC_ERROR(bad mingw install?)))
+###
+# *********************************
+# *** Check for struct ip_mreqn ***
+# *********************************
+###    ac_msg_checking(for struct ip_mreqn)
+###    AC_TRY_COMPILE([#include <ws2tcpip.h>], [
+###            struct ip_mreqn mreq;
+###            mreq.imr_address.s_addr = 0;
+###    ], [
+###            # Yes, we have it...
+###            ac_msg_result(yes)
+###            ac_define(HAVE_STRUCT_IP_MREQN)
+###    ], [
+###            # We'll just have to try and use struct ip_mreq
+###            ac_msg_result(no)
+###            ac_msg_checking(for struct ip_mreq)
+###            AC_TRY_COMPILE([#include <ws2tcpip.h>], [
+###                    struct ip_mreq mreq;
+###                    mreq.imr_interface.s_addr = 0;
+###            ], [
+###                    # Yes, we have it...
+###                    ac_msg_result(yes)
+###                    ac_define(HAVE_STRUCT_IP_MREQ)
+###            ], [
+###                    # No multicast support
+###                    ac_msg_result(no)
+###            ])
+###    ])
+###    ac_check_funcs(GetProcessId)
+###fi
+###
+endif()
+
+# socklen_t check
+ac_msg_checking("for socklen_t")
+check_c_source_compiles("
+#include <sys/types.h>
+#include <sys/socket.h>
+void main () { 
+  socklen_t foo; 
+}" HAVE_SOCKLEN_T)
+if(HAVE_SOCKLEN_T)
+  ac_define(HAVE_SOCKLEN_T 1 "Have socklen_t")
+  ac_msg_result(yes)
+else()
+  ac_msg_result(no)
+endif()
+
+###ac_msg_checking(for array element initalizer support)
+###AC_TRY_COMPILE([#include <sys/socket.h>], [
+###    const int array[] = {[1] = 2,};
+###], [
+# Yes, we have it...
+###    ac_msg_result(yes)
+###    ac_define(HAVE_ARRAY_ELEM_INIT,1,[Supports C99 array initialization])
+###], [
+# We'll have to use signals
+###    ac_msg_result(no)
+###])
+###
+ac_check_funcs(trunc)
+if(NOT HAVE_TRUNC)
+  ac_msg_checking("for trunc in math.h")
+  # Simply calling trunc (0.0) is no good since gcc will optimize the call away
+  set(compiles)
+  check_c_source_compiles("
+#include <math.h>
+void main () {
+static void *p = &trunc;
+}
+" compiles)
+  if (compiles)
+       ac_define(HAVE_TRUNC 1 "")
+       ac_msg_result(yes)
+  else()
+       ac_msg_result(no)
+  endif()
+endif()
+
+###if test "x$ac_cv_truncl" != "xyes"; then
+###   AC_CHECK_LIB(sunmath, aintl, [ ac_define(HAVE_AINTL, 1, [Has the 'aintl' function]) set(LIBS "$LIBS -lsunmath"]))
+###fi
+
+ac_check_funcs(round)
+ac_check_funcs(rint)
+
+# ****************************
+# *** Look for /dev/random ***
+# ****************************
+
+###ac_msg_checking([if usage of random device is requested])
+###AC_ARG_ENABLE(dev-random,
+###[  --disable-dev-random    disable the use of the random device (enabled by default)],
+###set(try_dev_random $enableval, try_dev_random=yes))
+
+###ac_msg_result($try_dev_random)
+
+###case "{$target}" in
+###    *-openbsd*)
+###    set(NAME_DEV_RANDOM "/dev/srandom")
+###    ;;
+
+# Win32 does not have /dev/random, they have their own method...
+
+###    *-*-mingw*|*-*-cygwin*)
+###    set(ac_cv_have_dev_random no)
+###    ;;
+
+# Everywhere else, it's /dev/random
+
+###    *)
+###    set(NAME_DEV_RANDOM "/dev/random")
+###    ;;
+###esac
+
+###ac_define_unquoted(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM", [Name of /dev/random])
+
+# Now check if the device actually exists
+
+###if test "x$try_dev_random" = "xyes"; then
+###    AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
+###    [if test -r "$NAME_DEV_RANDOM" ; then
+###        set(ac_cv_have_dev_random yes; else ac_cv_have_dev_random=no; fi]))
+###    if test "x$ac_cv_have_dev_random" = "xyes"; then
+###        ac_define(HAVE_CRYPT_RNG, 1, [Have /dev/random])
+###    fi
+###else
+###    ac_msg_checking(for random device)
+###    set(ac_cv_have_dev_random no)
+###    ac_msg_result(has been disabled)
+###fi
+
+###if test "x$platform_win32" = "xyes"; then
+###    ac_define(HAVE_CRYPT_RNG)
+###fi
+
+###if test "x$ac_cv_have_dev_random" = "xno" \
+###    && test "x$platform_win32" = "xno"; then
+###    AC_MSG_WARN([[
+###***
+###*** A system-provided entropy source was not found on this system.
+###*** Because of this, the System.Security.Cryptography random number generator
+###*** will throw a NotImplemented exception.
+###***
+###*** If you are seeing this message, and you know your system DOES have an
+###*** entropy collection in place, please contact <crichton@gimp.org> and
+###*** provide information about the system and how to access the random device.
+###***
+###*** Otherwise you can install either egd or prngd and set the environment
+###*** variable MONO_EGD_SOCKET to point to the daemon's socket to use that.
+###***]])
+###fi
+### 
+###ac_msg_checking([if inter-process shared handles are requested])
+###AC_ARG_ENABLE(shared-handles, [  --disable-shared-handles disable inter-process shared handles], set(try_shared_handles $enableval, try_shared_handles=yes))
+###ac_msg_result($try_shared_handles)
+###if test "x$try_shared_handles" != "xyes"; then
+###    ac_define(DISABLE_SHARED_HANDLES, 1, [Disable inter-process shared handles])
+###    AC_SUBST(DISABLE_SHARED_HANDLES)
+###fi
+
+###if test x$gc = xsgen; then
+###   if test x$with_tls != x__thread; then
+###      ac_msg_error([The SGEN garbage collector depends on a working __thread implementation, and either --with-set(thread pthread was passed to configure, or the configure test for __thread failed.]))
+###   fi
+###fi
+
+###AC_ARG_ENABLE(nunit-tests, [  --enable-nunit-tests  Run the nunit tests of the class library on 'make check'])
+###AM_CONDITIONAL(ENABLE_NUNIT_TESTS, [test x$enable_nunit_tests = xyes])
+
+ac_msg_checking("if big-arrays are to be enabled")
+set(big-arrays no CACHE STRING "Enable the allocation and indexing of arrays greater than Int32.MaxValue]")
+set(enable_big_arrays ${big-arrays})
+###if test "x$enable_big_arrays" = "xyes" ; then
+###    if  test "x$ac_cv_sizeof_void_p" = "x8"; then
+###    ac_define(MONO_BIG_ARRAYS,1,[Enable the allocation and indexing of arrays greater than Int32.MaxValue])
+###    else
+###        ac_msg_error([The allocation and indexing of arrays greater than Int32.MaxValue is not supported on this platform.])
+###    fi
+###fi
+###ac_msg_result($enable_big_arrays)
+
+# **************
+# *** DTRACE ***
+# **************
+
+set(dtrace ${has_dtrace} CACHE BOOL "Enable DTrace probes")
+set(enable_dtrace ${dtrace})
+
+###if test "x$enable_dtrace" = "xyes"; then
+###   if test "x$has_dtrace" = "xno"; then
+###      ac_msg_error([DTrace probes are not supported on this platform.])
+###   fi
+###   AC_PATH_PROG(DTRACE, [dtrace], [no], [$PATH:/usr/sbin])
+###   if test "x$DTRACE" = "xno"; then
+###      ac_msg_result([dtrace utility not found, dtrace support disabled.])
+###      set(enable_dtrace no)
+###   fi
+###fi
+
+set(dtrace_g no)
+###if test "x$enable_dtrace" = "xyes"; then
+###    ac_define(ENABLE_DTRACE, 1, [Enable DTrace probes])
+###    set(DTRACEFLAGS )
+###    if test "x$ac_cv_sizeof_void_p" = "x8"; then
+###            case "$host" in
+###                    powerpc-*-darwin*)
+###                    set(DTRACEFLAGS "-arch ppc64")
+###                    ;;
+###                    i*86-*-darwin*)
+###                    set(DTRACEFLAGS "-arch x86_64")
+###                    ;;
+###                    *)
+###                    set(DTRACEFLAGS -64)
+###                    ;;
+###            esac
+###    else
+###            case "$host" in
+###                    powerpc-*-darwin*)
+###                    set(DTRACEFLAGS "-arch ppc")
+###                    ;;
+###                    i*86-*-darwin*)
+###                    set(DTRACEFLAGS "-arch i386")
+###                    ;;
+###                    *)
+###                    set(DTRACEFLAGS -32)
+###                    ;;
+###            esac
+###    fi
+###    AC_SUBST(DTRACEFLAGS)
+###    case "$host" in
+###            *-*-solaris*)
+###            set(dtrace_g yes)
+###            ;;
+###    esac
+###    ac_check_headers([sys/sdt.h])
+###fi
+###AM_CONDITIONAL(ENABLE_DTRACE, [test x$enable_dtrace = xyes])
+###AM_CONDITIONAL(DTRACE_G_REQUIRED, [test x$dtrace_g = xyes])
+
+# **************
+# ***  LLVM  ***
+# **************
+
+set(llvm no CACHE BOOL "Enable the experimental LLVM back-end")
+set(enable_llvm ${llvm})
+
+###if test "x$enable_llvm" = "xyes"; then
+###   AC_PATH_PROG(LLVM_CONFIG, llvm-config, no)
+###   if test "x$LLVM_CONFIG" = "xno"; then
+###      ac_msg_error([llvm-config not found.])
+###   fi
+
+###   set(LLVM_CXXFLAGS `$LLVM_CONFIG --cflags`)
+###   set(LLVM_LDFLAGS `$LLVM_CONFIG --ldflags`)
+###   set(LLVM_LIBS `$LLVM_CONFIG --libs core engine`)
+###   set(LLVM_LIBS "$LLVM_LDFLAGS $LLVM_LIBS -lstdc++")
+
+###   AC_SUBST(LLVM_CXXFLAGS)
+###   AC_SUBST(LLVM_LIBS)
+###   ac_define(ENABLE_LLVM, 1, [Enable the LLVM back end])
+###fi
+
+if(enable_llvm)
+  set(ENABLE_LLVM yes)
+endif()
+
+#
+# Architecture-specific checks
+#
+set(TARGET "unknown")
+set(ACCESS_UNALIGNED "yes")
+
+set(JIT_SUPPORTED no)
+set(INTERP_SUPPORTED no)
+set(LIBC "libc.so.6")
+set(INTL "libc.so.6")
+set(SQLITE "libsqlite.so.0")
+set(SQLITE3 "libsqlite3.so.0")
+set(X11 "libX11.so")
+
+set(sizeof_register "SIZEOF_VOID_P")
+
+set(jit_wanted false)
+set(interp_wanted false)
+
+if(host MATCHES "(x86_64-.*-.*)|(amd64-.*-.*)")
+  set(TARGET AMD64)
+  set(arch_target amd64)
+  set(JIT_SUPPORTED yes)
+  set(jit_wanted true)
+elseif(host MATCHES "arm.*-linux.*")
+  set(TARGET ARM)
+  set(arch_target arm)
+  set(ACCESS_UNALIGNED no)
+  set(JIT_SUPPORTED yes)
+  set(jit_wanted true)
+else()
+  message(FATAL_ERROR "Host ${host} not yet supported by the cmake build.")
+endif()
+
+# FIXME: Define the others as well
+if (${TARGET} STREQUAL "X86")
+  ac_define(TARGET_X86 1 [...])
+elseif (${TARGET} STREQUAL "AMD64")
+  ac_define(TARGET_AMD64 1 [...])
+elseif (${TARGET} STREQUAL "ARM")
+  ac_define(TARGET_ARM 1 [...])
+endif()
+
+###case "$host" in
+#      mips-sgi-irix5.* | mips-sgi-irix6.*)
+#              set(TARGET MIPS;)
+#              set(ACCESS_UNALIGNED "no")
+#              ;;
+###    mips*)
+###            set(TARGET MIPS;)
+###            set(arch_target mips;)
+###            set(ACCESS_UNALIGNED "no")
+###            set(JIT_SUPPORTED yes)
+###            set(jit_wanted true)
+
+###            ac_msg_checking(for mips n32)
+###            AC_TRY_COMPILE([], [
+###            void main () {
+###            #if _MIPS_SIM != _ABIN32
+###            #error Not mips n32
+###            #endif
+###            }
+###            ],[
+###            ac_msg_result(yes)
+###            set(sizeof_register 8)
+###            ],[
+###            ac_msg_result(no)
+###            ])
+###            ;;
+###    i*86-*-*)
+###            set(TARGET X86;)
+###            set(arch_target x86;)
+###            set(JIT_SUPPORTED yes)
+###            set(jit_wanted true)
+###            case $host_os in
+###              solaris*)
+###                    set(LIBC "libc.so")
+###                    set(INTL "libintl.so")
+###                    if test "x$ac_cv_sizeof_void_p" = "x8"; then
+###                            set(TARGET AMD64)
+###                            set(arch_target amd64)
+###                    fi
+
+###                    # On solaris 10 x86, gcc prints a warning saying 'visibility attribute not supported on this configuration; ignored', but linking fails. A test case:
+###                    # int astruct __attribute__ ((visibility ("hidden")));
+###                    # void foo ()
+###                    # {
+###                    #       void *p = &astruct;
+###                    # }
+###                    # gcc -fPIC --shared -o libfoo.so foo.c
+###                    # yields:
+###                    # foo.c:6: warning: visibility attribute not supported in this configuration; ignored
+###                    # ld: fatal: relocation error: R_386_GOTOFF: file /var/tmp//ccxYR96k.o: symbol astruct: relocation must bind locally
+###                    set(have_visibility_hidden no)
+
+###            esac
+###            ;;
+###    ia64-*-*)
+###            set(TARGET IA64)
+###            set(arch_target ia64)
+###            set(ACCESS_UNALIGNED "no")
+###            set(JIT_SUPPORTED yes)
+###            set(jit_wanted true)
+###            set(LIBC "libc.so.6.1")
+###            set(INTL "libc.so.6.1")
+###            AC_CHECK_LIB(unwind, _U_dyn_register, [], [ac_msg_error(library libunwind not found)])
+###            set(libmono_ldflags "-lunwind")
+###            ;;
+###    sparc*-*-*)
+###            if test "x$ac_cv_sizeof_void_p" = "x8"; then
+###               set(TARGET SPARC64)
+###            else
+###                    set(TARGET SPARC)
+###            fi
+###            set(arch_target sparc;)
+###            set(JIT_SUPPORTED yes)
+###            set(ACCESS_UNALIGNED "no")
+###            case $host_os in
+###              linux*) ;;
+###              *)
+###                    set(LIBC "libc.so")
+###                    set(INTL "libintl.so")
+###            esac
+###            set(jit_wanted true)
+###            if test x"$GCC" = xyes; then
+###                    # We don't support v8 cpus
+###                    set(CFLAGS "$CFLAGS -Wno-cast-align -mcpu=v9")
+###            fi
+###            if test x"$AR" = xfalse; then
+###                    ac_msg_error([The required utility 'ar' is not found in your PATH. Usually it can be found in /usr/ccs/bin.])
+###            fi
+###            ;;
+###       alpha*-*-linux* | alpha*-*-osf*)
+###            set(TARGET ALPHA;)
+###            set(ACCESS_UNALIGNED "no")
+###            set(JIT_SUPPORTED yes)
+###            set(jit_wanted true)
+###            set(arch_target alpha;)
+###            set(CFLAGS "$CFLAGS -mieee -O0")
+###            case $host_os in
+###              linux*)
+###                    set(LIBC "libc.so.6.1")
+###                    set(INTL "libc.so.6.1")
+###            esac
+###           ;;
+###    *-*-mingw*|*-*-cygwin*)
+###            # When this is enabled, it leads to very strange crashes at runtime (gcc-3.4.4)
+###            set(have_visibility_hidden no)
+###            set(INTL "intl")
+###            ;;
+###    hppa2.0w-hp-hpux11.00 | hppa64-hp-hpux11.00)
+###            set(TARGET HPPA;)
+###            set(arch_target hppa; )
+###            set(LIBC "libc.sl")
+###            set(ACCESS_UNALIGNED "no")
+###            set(INTERP_SUPPORTED yes)
+###            set(interp_wanted true)
+###            ;;
+###    hppa*linux*)
+###            set(TARGET HPPA;)
+###            ac_define(MONO_ARCH_REGPARMS,1,[Architecture uses registers for Parameters])
+###            set(arch_target hppa; )
+###            set(ACCESS_UNALIGNED "no")
+###            set(JIT_SUPPORTED yes)
+###            set(jit_wanted true)
+###            ;;
+###    macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
+###        powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* )
+###            if test "x$ac_cv_sizeof_void_p" = "x8"; then
+###                    set(TARGET POWERPC64;)
+###                    set(CPPFLAGS "$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__")
+###                    set(CFLAGS "$CFLAGS -mminimal-toc")
+###            else
+###                    set(TARGET POWERPC;)
+###                    set(CPPFLAGS "$CPPFLAGS -D__mono_ppc__")
+###            fi
+###            ac_define(MONO_ARCH_REGPARMS,1,[Architecture uses registers for Parameters])
+###            set(arch_target ppc;)
+###            set(JIT_SUPPORTED yes)
+###            set(jit_wanted true)
+###            ;;
+###    arm*-darwin*)
+###            set(TARGET ARM;)
+###            set(arch_target arm;)
+###            set(ACCESS_UNALIGNED "no")
+###            set(JIT_SUPPORTED yes)
+###            set(CPPFLAGS "$CPPFLAGS -DARM_FPU_NONE=1")
+###            set(jit_wanted true)
+###            ;;
+###    s390-*-linux*)
+###            set(TARGET S390;)
+###            ac_define(MONO_ARCH_REGPARMS,1,[Architecture uses registers for Parameters])
+###            set(arch_target s390;)
+###            set(ACCESS_UNALIGNED "no")
+###            set(JIT_SUPPORTED yes)
+###            set(jit_wanted true)
+###            # Required CFLAGS for s390[x].  USE_STRING_INLINES is automatic with gcc 4.1
+###            set(CFLAGS "$CFLAGS -mbackchain -D__USE_STRING_INLINES")
+###            ;;
+###    s390x-*-linux*)
+###            set(TARGET S390x;)
+###            ac_define(MONO_ARCH_REGPARMS,1,[Architecture uses registers for Parameters])
+###            set(arch_target s390x;)
+###            set(ACCESS_UNALIGNED "no")
+###            set(JIT_SUPPORTED yes)
+###            set(jit_wanted true)
+###            set(CFLAGS "$CFLAGS -mbackchain -D__USE_STRING_INLINES")
+###            ;;
+###esac
+
+if (${sizeof_register} STREQUAL "4")
+   ac_define(SIZEOF_REGISTER 4 "size of machine integer registers")
+elseif (${sizeof_register} STREQUAL "8")
+   ac_define(SIZEOF_REGISTER 8 "size of machine integer registers")
+else()
+   ac_define(SIZEOF_REGISTER SIZEOF_VOID_P "size of machine integer registers")
+endif()
+
+###if (${have_visibility_hidden" = "xyes"; then
+###   ac_define(HAVE_VISIBILITY_HIDDEN, 1, [Support for the visibility ("hidden") attribute])
+###fi
+
+###set(jit, [  --with-set(jit yes,no              If you want to build scripts that default to the JIT (defaults to no)],[)
+###    if test x$withval = xyes; then
+###       set(jit_wanted true)
+###    else
+###       set(jit_wanted false)
+###    fi
+###])
+
+###set(interp, [  --with-set(interp yes,no           If you want to build scripts that default to the interpreter (defaults to no)],[)
+###    if test x$withval = xyes; then
+###       set(interp_wanted true)
+###    else
+###       set(interp_wanted false)
+###    fi
+###])
+
+set(USEJIT no)
+if(JIT_SUPPORTED)
+  if (jit_wanted)
+       set(USEJIT yes)
+       set(jit_status "Building and using the JIT")
+  else()
+       if (interp_wanted)
+         set(jit_status "Building the JIT, defaulting to the interpreter")
+       else()
+         message(FATAL_ERROR "No JIT or interpreter support available or selected.")
+       endif()
+  endif()
+else()
+       if (interp_wanted)
+         set(jit_status "interpreter")
+       else()
+         message(FATAL_ERROR "No JIT or interpreter support available or selected.")
+       endif()
+endif()  
+set(USE_JIT ${USEJIT})
+
+set(libsuffix ".so")
+
+###case "$host" in
+###     *-*-darwin*)
+###    set(libsuffix ".dylib")
+###    set(LIBC "libc.dylib")
+###    set(INTL "libintl.dylib")
+###    set(SQLITE "libsqlite.0.dylib")
+###    set(SQLITE3 "libsqlite3.0.dylib")
+###    set(X11 "libX11.dylib")
+###    ;;
+###     *-*-*netbsd*)
+###    set(LIBC "libc.so.12")
+###    set(INTL "libintl.so.0")
+###    ;;
+###    *-*-*freebsd*)
+###            set(LIBC "libc.so")
+###    set(INTL "libintl.so")
+###    ;;
+###    *-*-*openbsd*)
+###            set(LIBC "libc.so")
+###    set(INTL "libintl.so")
+###    ;;
+###    *-*-*linux*)
+###    AC_PATH_X
+###    ac_msg_checking(for the soname of libX11.so)
+###    for i in $x_libraries /usr/lib /usr/lib64; do
+###            for r in 4 5 6; do
+###                    if test -f $i/libX11.so.$r; then
+###                            set(X11 libX11.so.$r)
+###                            ac_msg_result($X11)
+###                    fi
+###            done
+###    done
+###    
+###    if (${X11" = "xlibX11.so"; then
+###            AC_MSG_WARN([Could not find X development libs. Do you have the -devel package installed? WinForms may not work...]);
+###    fi
+###    ;;
+###esac
+
+
+###AC_SUBST(libsuffix)
+
+ac_check_headers(valgrind/memcheck.h)
+if(${TARGET} STREQUAL "AMD64" OR ${TARGET} STREQUAL "X86")
+  if(with_tls STREQUAL __thread)
+               #
+               # On some linux distributions, TLS works in executables, but linking 
+               # against a shared library containing TLS fails with:
+               # undefined reference to `__tls_get_addr'
+               #
+###            rm -f conftest.c conftest.so conftest
+###            echo "static __thread int foo; void main () { foo = 5; }" > conftest.c
+###            $CC -fPIC --shared -o conftest.so conftest.c > /dev/null 2>&1
+###            $CC -o conftest conftest.so > /dev/null 2>&1
+###            if test ! -f conftest; then
+###               AC_MSG_WARN([Disabling usage of __thread.]);
+###               set(with_tls pthread)
+###            fi
+###            rm -f conftest.c conftest.so conftest
+  endif()
+endif()
+
+set(mono_debugger_supported no)
+if(${TARGET} STREQUAL "AMD64" OR ${TARGET} STREQUAL "X86")
+  if(use_included_gc)
+       if (host MATCHES ".*-.*-.*linux.*")
+         set(mono_debugger_supported yes)
+       endif()
+  endif()
+endif()
+
+ac_msg_checking("if the Mono Debugger is supported on this platform")
+if(mono_debugger_supported)
+  ac_define(MONO_DEBUGGER_SUPPORTED 1 "The Mono Debugger is supported on this platform")
+endif()
+ac_msg_result(${mono_debugger_supported})
+if(mono_debugger_supported)
+  set(MONO_DEBUGGER_SUPPORTED yes)
+endif()
+
+if (with_tls STREQUAL "__thread")
+  ac_define(HAVE_KW_THREAD 1 "Have __thread keyword")
+  ac_define(USE_COMPILER_TLS 1 "Use __thread for TLS access")
+# Pass the information to libgc
+###    set(CPPFLAGS "$CPPFLAGS -DUSE_COMPILER_TLS")
+###    ac_msg_checking(if the tls_model attribute is supported)
+###    AC_TRY_COMPILE([static __thread int foo __attribute__((tls_model("initial-exec")));], [
+###            ], [
+###                    ac_msg_result(yes)
+###                    ac_define(HAVE_TLS_MODEL_ATTR, 1, [tld_model available])
+###            ], [
+###                    ac_msg_result(no)
+###    ])
+###fi
+
+endif()
+
+# ******************************************
+# *** Check to see what FPU is available ***
+# ******************************************
+# FIXME: Don't do this if cross-compiling
+if(${TARGET} STREQUAL "ARM")
+  ac_msg_checking("which FPU to use")
+  set(CMAKE_REQUIRED_FLAGS "-mfloat-abi=softfp -mfpu=vfp")
+  set(compiles_fpu_vfp)
+  check_c_source_compiles("
+void main () {
+               __asm__ (\"faddd   d7, d6, d7\");
+}
+" compiles_fpu_vfp)
+  set(compiles_fpu_fpa)
+  set(cmake_required_flags)
+  check_c_source_compiles("
+void main () {
+               __asm__ (\"ldfd f0, [r0]\");
+}
+" compiles_fpu_fpa)
+  if(compiles_fpu_vfp)
+       set(fpu VFP)
+  elseif(compiles_fpu_fpa)
+       set(fpu FPA)
+  else()
+       set(fpu NONE)
+  endif()
+  ac_msg_result(${fpu})
+  set(CPPFLAGS "${CPPFLAGS} -DARM_FPU_${fpu}=1")
+  set(fpu)
+endif()
+
+if(${TARGET} STREQUAL "unknown")
+       set(CPPFLAGS ${CPPFLAGS} -DNO_PORT)
+       ac_msg_warn("mono has not been ported to ${host}: some things may not work.")
+endif()
+
+if(NOT ACCESS_UNALIGNED)
+  set(CPPFLAGS "${CPPFLAGS} -DNO_UNALIGNED_ACCESS")
+endif()
+
+###case "x$gc" in
+###    xincluded)
+###            # Pass CPPFLAGS to libgc configure
+###            # We should use a separate variable for this to avoid passing useless and
+###            # potentially problematic defines to libgc (like -set(D_FILE_OFFSET_BITS 64))
+###            # This should be executed late so we pick up the final version of CPPFLAGS
+###            # The problem with this approach, is that during a reconfigure, the main
+###            # configure scripts gets invoked with these arguments, so we use separate
+###            # variables understood by libgc's configure to pass CPPFLAGS and CFLAGS.
+###            set(LIBGC_CPPFLAGS $CPPFLAGS)
+###            if test x$TARGET = xSPARC -o x$TARGET = xSPARC64; then
+###                    set(LIBGC_CPPFLAGS `echo $LIBGC_CPPFLAGS | sed -e 's/-D_FILE_OFFSET_BITS=64//g'`)
+###            fi
+###            set(ac_configure_args "$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args \"CPPFLAGS_FOR_LIBGC=$LIBGC_CPPFLAGS\" \"CFLAGS_FOR_LIBGC=$CFLAGS_FOR_LIBGC\"")
+###            AC_CONFIG_SUBDIRS(libgc)
+###            ;;
+###esac
+
+set(preview yes CACHE BOOL "If you want to install the 2.0 FX preview (defaults to yes)")
+set(PREVIEW ${preview})
+set(moonlight yes CACHE BOOL "If you want to build the Moonlight 2.1 assemblies (defaults to yes)")
+set(MOONLIGHT ${moonlight})
+set(OPROFILE no)
+set(oprofile no CACHE STRING "<oprofile install dir> or 'no' to disable oprofile support (defaults to no)")
+if (NOT oprofile STREQUAL no)
+###    if test x$with_oprofile != xno; then
+###        set(oprofile_include $with_oprofile/include)
+###        if test ! -f $oprofile_include/opagent.h; then
+###              ac_msg_error([oprofile include file not found at $oprofile_include/opagent.h])
+###            fi
+###        set(OPROFILE yes)
+###            set(OPROFILE_CFLAGS "-I$oprofile_include")
+###        set(OPROFILE_LIBS "-L$with_oprofile/lib/oprofile -lopagent")
+###        ac_define(HAVE_OPROFILE,1,[Have oprofile support])
+###    fi
+###])
+
+endif()
+set(MALLOC_MEMPOOLS no)
+set(malloc_mempools no CACHE STRING "Use malloc for each single mempool allocation (only for runtime debugging, defaults to no)")
+###    if test x$with_malloc_mempools = xyes; then
+###            set(MALLOC_MEMPOOLS yes)
+###            ac_define(USE_MALLOC_FOR_MEMPOOLS,1,[Use malloc for each single mempool allocation])
+###    fi
+###])
+
+
+set(DISABLE_MCS_DOCS no)
+set(mcs_docs yes CACHE STRING "If you want to build the documentation under mcs (defaults to yes)")
+if(NOT mcs_docs)
+  set(DISABLE_MCS_DOCS yes)
+endif()
+if(OPROFILE)
+  set(HAVE_OPROFILE yes)
+endif()
+###AC_SUBST(OPROFILE_CFLAGS)
+###AC_SUBST(OPROFILE_LIBS)
+
+###set(libmono_ldflags "$libmono_ldflags $LIBS")
+
+if(PREVIEW)
+  set(INSTALL_2_0 yes)
+endif()
+if(MOONLIGHT)
+  set(INSTALL_2_1 yes)
+endif()
+
+###AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
+###AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
+# Define a variable for the target
+set(${TARGET} 1)
+
+if (interp_wanted)
+  set(INTERP_SUPPORTED yes)
+endif()
+if (gc STREQUAL "included")
+  set(INCLUDED_LIBGC yes)
+endif()
+
+###AC_SUBST(LIBC)
+###AC_SUBST(INTL)
+###AC_SUBST(SQLITE)
+###AC_SUBST(SQLITE3)
+###AC_SUBST(X11)
+ac_define_unquoted(ARCHITECTURE "${arch_target}" "The architecture this is running on")
+###AC_SUBST(arch_target)
+###AC_SUBST(CFLAGS)
+###AC_SUBST(CPPFLAGS)
+###AC_SUBST(LDFLAGS)
+
+set(mono_build_root ${CMAKE_BINARY_DIR})
+
+if (USEJIT)
+  set(mono_runtime mono/mini/mono)
+else()
+  set(mono_runtime mono/interpreter/mint)
+endif()
+
+set(mono_cfg_root ${mono_build_root}/runtime)
+if (platform_win32)
+###if test x$platform_win32 = xyes; then
+###  if (${cross_compiling" = "xno"; then
+###    set(mono_cfg_dir `cygpath -w -a $mono_cfg_root`\\etc)
+###  else
+###    set(mono_cfg_dir `echo $mono_cfg_root | tr '/' '\\\'`\\etc)
+###  fi
+else()
+  set(mono_cfg_dir ${mono_cfg_root}/etc)
+endif()
+
+function(ac_config_files file)
+  configure_file("${file}.in" ${file} @ONLY)
+endfunction()
+ac_config_files("po/mcs/Makefile.in")
+
+ac_config_files("runtime/mono-wrapper")
+ac_config_files("runtime/monodis-wrapper")
+execute_process (COMMAND chmod a+x runtime/mono-wrapper runtime/monodis-wrapper)
+
+###AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
+###[   set(depth ../../../..)
+###    case $srcdir in
+###    [[\\/$]]* | ?:[[\\/]]* ) set(reldir $srcdir ;;)
+###    .) set(reldir $depth ;;)
+###    *) set(reldir $depth/$srcdir ;;)
+###    esac
+###    $ac_aux_dir/install-sh -d runtime/etc/mono/1.0
+###    cd runtime/etc/mono/1.0
+###    rm -f machine.config
+###    $LN_S $reldir/data/net_1_1/machine.config machine.config
+###    cd $depth
+###],[set(LN_S '$LN_S']))
+
+###AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config],
+###[   set(depth ../../../..)
+###    case $srcdir in
+###    [[\\/$]]* | ?:[[\\/]]* ) set(reldir $srcdir ;;)
+###    .) set(reldir $depth ;;)
+###    *) set(reldir $depth/$srcdir ;;)
+###    esac
+###    $ac_aux_dir/install-sh -d runtime/etc/mono/2.0
+###    cd runtime/etc/mono/2.0
+###    rm -f machine.config
+###    $LN_S $reldir/data/net_2_0/machine.config machine.config
+###    cd $depth
+###],[set(LN_S '$LN_S']))
+
+###AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/web.config],
+###[   set(depth ../../../..)
+###    case $srcdir in
+###    [[\\/$]]* | ?:[[\\/]]* ) set(reldir $srcdir ;;)
+###    .) set(reldir $depth ;;)
+###    *) set(reldir $depth/$srcdir ;;)
+###    esac
+###    $ac_aux_dir/install-sh -d runtime/etc/mono/2.0
+###    cd runtime/etc/mono/2.0
+###    rm -f web.config
+###    $LN_S $reldir/data/net_2_0/web.config web.config
+###    cd $depth
+###],[set(LN_S '$LN_S']))
+
+###AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini],
+###[   set(depth ../../..)
+###    case $srcdir in
+###    [[\\/$]]* | ?:[[\\/]]* ) set(reldir $srcdir ;;)
+###    .) set(reldir $depth ;;)
+###    *) set(reldir $depth/$srcdir ;;)
+###    esac
+###    $ac_aux_dir/install-sh -d runtime/etc/mono/
+###    cd runtime/etc/mono/
+###    rm -f browscap.ini
+###    $LN_S $reldir/data/browscap.ini browscap.ini
+###    cd $depth
+###],[set(LN_S '$LN_S']))
+
+###AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser],
+###[   set(depth ../../../../..)
+###    case $srcdir in
+###    [[\\/$]]* | ?:[[\\/]]* ) set(reldir $srcdir ;;)
+###    .) set(reldir $depth ;;)
+###    *) set(reldir $depth/$srcdir ;;)
+###    esac
+###    $ac_aux_dir/install-sh -d runtime/etc/mono/2.0/Browsers/
+###    cd runtime/etc/mono/2.0/Browsers
+###    rm -f Compat.browser
+###    $LN_S $reldir/data/net_2_0/Browsers/Compat.browser Compat.browser
+###    cd $depth
+###],[set(LN_S '$LN_S']))
+
+###if test x$enable_quiet_build = xyes; then
+###   AC_CONFIG_COMMANDS([quiet], [for i in `find mono libgc support -name Makefile.in | sed -e 's/Makefile.in/Makefile/g'`; do if test -f $i; then $srcdir/scripts/patch-quiet.sh $i; fi; done], [set(shell $SHELL]))
+###   AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/$echo "copying selected/$show "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
+###fi
+
+
+autoheader("config.h" autoheader_vars)
+
+set(SUBDIRS po ${libgc_dir} ${eglib_dir} mono ${ikvm_native_dir} support data runtime scripts man samples web msvc docs)
+
+foreach(dir ${SUBDIRS})
+  add_subdirectory(${dir})
+endforeach()
+
+###AC_OUTPUT([
+###mono-uninstalled.pc
+###scripts/mono-find-provides
+###scripts/mono-find-requires
+###mono/Makefile
+###mono/utils/Makefile
+###mono/metadata/Makefile
+###mono/dis/Makefile
+###mono/cil/Makefile
+###mono/arch/Makefile
+###mono/arch/x86/Makefile
+###mono/arch/amd64/Makefile
+###mono/arch/hppa/Makefile
+###mono/arch/ppc/Makefile
+###mono/arch/sparc/Makefile
+###mono/arch/s390/Makefile
+###mono/arch/s390x/Makefile
+###mono/arch/arm/Makefile
+###mono/arch/alpha/Makefile
+###mono/arch/ia64/Makefile
+###mono/arch/mips/Makefile
+###mono/interpreter/Makefile
+###mono/tests/Makefile
+###mono/tests/tests-config
+###mono/tests/assemblyresolve/Makefile
+###mono/tests/cas/Makefile
+###mono/tests/cas/assembly/Makefile
+###mono/tests/cas/demand/Makefile
+###mono/tests/cas/inheritance/Makefile
+###mono/tests/cas/linkdemand/Makefile
+###mono/tests/cas/threads/Makefile
+###mono/benchmark/Makefile
+###mono/monograph/Makefile
+###mono/io-layer/Makefile
+###mono/mini/Makefile
+###mono/profiler/Makefile
+###ikvm-native/Makefile
+###scripts/Makefile
+###man/Makefile
+###web/Makefile
+###docs/Makefile
+###data/Makefile
+###data/net_1_1/Makefile
+###data/net_2_0/Makefile
+###data/net_2_0/Browsers/Makefile
+###data/mint.pc
+###data/mono.pc
+###data/mono-cairo.pc
+###data/mono-nunit.pc
+###data/mono-options.pc
+###data/mono-lineeditor.pc
+###data/monodoc.pc
+###data/mono.web.pc
+###data/dotnet.pc
+###data/dotnet35.pc
+###data/wcf.pc
+###data/cecil.pc
+###data/system.web.extensions_1.0.pc
+###data/system.web.extensions.design_1.0.pc
+###data/system.web.mvc.pc
+###samples/Makefile
+###support/Makefile
+###data/config
+###tools/Makefile
+###tools/locale-builder/Makefile
+###runtime/Makefile
+###msvc/Makefile
+###po/Makefile
+###])
+
+###if test x$platform_win32 = xyes; then
+###   # Get rid of 'cyg' prefixes in library names
+###   sed -e "s/\/cyg\//\/\//" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
+###   # libtool seems to inherit -mno-cygwin from our CFLAGS, and uses it to compile its executable
+###   # wrapper scripts which use exec(). gcc has no problem compiling+linking this, but the resulting
+###   # executable doesn't work...
+###   sed -e "s,-mno-cygwin,,g" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
+###fi
+
+###(
+###  case $prefix in
+###  NONE) set(prefix $ac_default_prefix ;;)
+###  esac
+###  case $exec_prefix in
+###  NONE) set(exec_prefix '${prefix}' ;;)
+###  esac
+
+###  test -w $srcdir/$mcsdir/build || chmod +w $srcdir/$mcsdir/build
+
+###  #
+###  # If we are cross compiling, we don't build in the mcs/ tree.  Let us not clobber
+###  # any existing config.make.  This allows people to share the same source tree
+###  # with different build directories, one native and one cross
+###  #
+###  if test x$cross_compiling = xno && test x$enable_mcs_build != xno; then
+###    echo "set(prefix $prefix" > $srcdir/$mcsdir/build/config.make)
+###    echo "set(exec_prefix $exec_prefix" >> $srcdir/$mcsdir/build/config.make)
+###    echo "set(sysconfdir $sysconfdir" >> $srcdir/$mcsdir/build/config.make)
+###    echo 'set(mono_libdir ${exec_prefix}/lib' >> $srcdir/$mcsdir/build/config.make)
+###    echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$mcsdir/build/config.make
+###    echo 'IL_FLAGS = /debug' >> $srcdir/$mcsdir/build/config.make
+###    echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$mcsdir/build/config.make
+###    echo "ILDISASM = $mono_build_root/runtime/monodis-wrapper" >> $srcdir/$mcsdir/build/config.make
+###    case $INSTALL in
+###    [[\\/$]]* | ?:[[\\/]]* ) set(mcs_INSTALL $INSTALL ;;)
+###    *) set(mcs_INSTALL $mono_build_root/$INSTALL ;;)
+###    esac
+
+###    echo "INSTALL = $mcs_INSTALL" >> $srcdir/$mcsdir/build/config.make
+
+###    export VERSION
+###    [set(myver $($AWK 'BEGIN {)
+###      split (ENVIRON["VERSION"] ".0.0.0", vsplit, ".")
+###      if(length(vsplit [1]) > 4) {
+###        split (substr(ENVIRON["VERSION"], 0, 4) "." substr(ENVIRON["VERSION"], 5) ".0.0", vsplit, ".")
+###      }
+###      print vsplit [1] "." vsplit [2] "." vsplit [3] "." vsplit [4]
+###    }')]
+
+###    echo "MONO_VERSION = $myver" >> $srcdir/$mcsdir/build/config.make
+###  fi
+
+###  if test x$platform_darwin = xyes; then
+###    echo "PLATFORM = darwin" >> $srcdir/$mcsdir/build/config.make
+###  fi
+
+###  if test x$TARGET = xAMD64 -a x$platform_win32 = xno -a "x$AOT_SUPPORTED" = "xyes"; then
+###     echo "ENABLE_AOT = 1" >> $srcdir/$mcsdir/build/config.make
+###  fi
+
+###  # if we have an olive folder, override the default settings
+###  if test -d $olivedir; then
+
+###    test -w $srcdir/$olivedir/build || chmod +w $srcdir/$olivedir/build
+
+###    if test x$cross_compiling = xno && test x$enable_olive_build != xno; then
+###      echo "set(prefix $prefix" > $srcdir/$olivedir/build/config.make)
+###      echo "set(exec_prefix $exec_prefix" >> $srcdir/$olivedir/build/config.make)
+###      echo 'set(mono_libdir ${exec_prefix}/lib' >> $srcdir/$olivedir/build/config.make)
+###      echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$olivedir/build/config.make
+###      echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$olivedir/build/config.make
+###      echo "MONO_VERSION = $myver" >> $srcdir/$olivedir/build/config.make
+###      if test x$with_moonlight = xyes; then
+###        echo "WITH_MOONLIGHT = yes" >> $srcdir/$olivedir/build/config.make
+###      fi
+###    fi
+###  fi
+
+###  if test x$DISABLE_MCS_DOCS = xyes; then
+###    echo "DISABLE_MCS_DOCS = yes" >> $srcdir/$mcsdir/build/config.make
+###  fi
+###)
+
+if(NOT libgdiplus_loc)
+  set(libgdiplus_msg "assumed to be installed")
+else()
+  set(libgdiplus_msg ${libgdiplus_loc})
+endif()
+
+message(STATUS
+"
+        mcs source:    ${mcs_topdir}
+        olive source:  ${olive_topdir}
+
+       GC:            ${gc}
+       TLS:           ${with_tls}
+       SIGALTSTACK:   ${with_sigaltstack}
+       Engine:        ${jit_status}
+       2.0 Beta:      ${PREVIEW}
+       2.1 Alpha:     ${MOONLIGHT}
+       JNI support:   ${jdk_headers_found}
+       libgdiplus:    ${libgdiplus_msg}
+       zlib:          ${zlib_msg}
+       oprofile:      ${OPROFILE}
+       BigArrays:     ${enable_big_arrays}
+       DTrace:        ${enable_dtrace}
+       Parallel Mark: ${enable_parallel_mark}
+       LLVM Back End: ${enable_llvm}
+       ${disabled}
+
+")
+
+if(NOT with_static_mono)
+  if(NOT platform_win32)
+       ac_msg_warn("Turning off static Mono is a risk, you might run into unexpected bugs")
+  endif()
+endif()
+
+if(gc STREQUAL sgen)
+message("
+ IMPORTANT:
+ IMPORTANT: You have selected an experimental, work-in-progress 
+ IMPORTANT: GC engine.  This GC engine is currently not supported
+ IMPORTANT: and is not yet ready for use.  
+ IMPORTANT:
+ IMPORTANT: There are known problems with it, use at your own risk.
+ IMPORTANT:
+")
+endif()
+
+if(enable_llvm)
+message("
+ IMPORTANT:
+ IMPORTANT: The LLVM Back End is experimental and does not work yet.
+ IMPORTANT:
+")
+endif()
+
+# Makefile.am
+
+###    -rm -fr $(mcslib)/monolite-*
+###    -mkdir -p $(mcslib)
+###    test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
+###    test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
+###    cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
+###    cd $(mcslib) && mv -f monolite-* monolite
+
+
+#### Keep in sync with SUBDIRS
+##### 'tools' is not normally built
+###DIST_SUBDIRS = po libgc $(eglib_dir) mono ikvm-native support data runtime scripts man samples web tools msvc docs
+
+###EXTRA_DIST= nls.m4 po.m4 progtest.m4 mono-uninstalled.pc.in build-mingw32.sh LICENSE mkinstalldirs
+
+###DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
+
+#### Distribute the 'mcs' tree too
+###dist-hook:
+###    test -d $(distdir)/mcs || mkdir $(distdir)/mcs
+###    d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) PROFILE=net_1_1 distdir=$$d dist-recursive
+###    d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) PROFILE=net_2_0 distdir=$$d dist-recursive
+
+###pkgconfigdir = $(libdir)/pkgconfig
+###noinst_DATA = mono-uninstalled.pc
+###DISTCLEANFILES= mono-uninstalled.pc
+
+###.PHONY: get-monolite-latest mcs-do-compiler-tests compiler-tests bootstrap-world
+
+#### building with monolite
+set(mcslib ${mcs_topdir}/class/lib)
+set(monolite ${mcslib}/monolite)
+set(monolite_url http://mono.ximian.com/daily/monolite-latest.tar.gz)
+add_custom_target(get-monolite-latest
+COMMAND        -rm -fr ${mcslib}/monolite-*
+COMMAND        -mkdir -p ${mcslib}
+COMMAND        test ! -d ${monolite} || test ! -d ${monolite}.old || rm -fr ${monolite}.old
+COMMAND        test ! -d ${monolite} || mv -f ${monolite} ${monolite}.old
+COMMAND        cd ${mcslib} && { (wget -O- ${monolite_url} || curl ${monolite_url}) | gzip -d | tar xf - \; }
+COMMAND        cd ${mcslib} && mv -f monolite-* monolite
+)
+
+###compiler-tests: mcs-do-clean
+###    $(MAKE) all
+###    $(MAKE) mcs-do-compiler-tests
+
+###compiler-tests-net_2_0:
+###    -rm -f $(mcs_topdir)/build/common/Consts.cs.save
+###    -mv -f $(mcs_topdir)/build/common/Consts.cs $(mcs_topdir)/build/common/Consts.cs.save
+###    cd $(mcs_topdir) && $(MAKE) PROFILE=net_2_0_bootstrap clean
+###    cd $(mcs_topdir) && $(MAKE) PROFILE=net_2_0 clean
+###    -mv -f $(mcs_topdir)/build/common/Consts.cs.save $(mcs_topdir)/build/common/Consts.cs
+###    $(MAKE) all
+###    $(MAKE) build_profiles=net_2_0 mcs-do-compiler-tests
+
+###bootstrap-world: compiler-tests
+###    $(MAKE) install
+
+###bootstrap-world-net_2_0: compiler-tests-net_2_0
+###    $(MAKE) install
+
+#### internal targets
+###mcs-do-clean:
+###    cd runtime && $(MAKE) clean-local
+###    cd mono/tests && $(MAKE) clean
+###mcs-do-compiler-tests:
+###    cd runtime && $(MAKE) test_select='TEST_SUBDIRS="tests errors"' check-local
+###    cd mono/tests && $(MAKE) check
+
+###win32getdeps:
+###    wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
+###    wget http://www.go-mono.com/archive/glib-2.0.4-20020703.zip 
+###    wget http://www.go-mono.com/archive/glib-dev-2.0.4-20020703.zip 
+###    wget http://www.go-mono.com/archive/libiconv-1.7.zip 
+###    wget http://www.go-mono.com/archive/libiconv-dev-1.7.zip 
+###    wget http://www.go-mono.com/archive/libintl-0.10.40-20020101.zip
+###    unzip -n -d / pkgconfig-0.11-20020310.zip
+###    unzip -n -d / glib-2.0.4-20020703.zip
+###    unzip -n -d / glib-dev-2.0.4-20020703.zip
+###    unzip -n -d / libiconv-1.7.zip
+###    unzip -n -d / libiconv-dev-1.7.zip
+###    unzip -n -d / libintl-0.10.40-20020101.zip
+
+###win32setup:
+###    makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
+
+###bootstrap: all
+###    @echo "*** 'make bootstrap' is obsolete.  Just run 'make' to perform a combined mono+mcs build"
+###    exit 1
+
+###patch-quiet:
+###    find mono -name Makefile -exec scripts/patch-quiet.sh {} \;
+###    find libgc -name Makefile -exec scripts/patch-quiet.sh {} \;
+
+###update-csproj:
+###    (cd $(mcs_topdir)/build/csproj && gmcs genproj.cs) && (cd runtime; make V=1 extra_targets=csproj-local)
index ad3496fc745f50924435697335a3534d40bea44e..09b6a0b8d6582c994d59ddf3a8c74780eea760a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2009-05-26  Zoltan Varga  <vargaz@gmail.com>
+
+       * CMakeLists.txt: implement arm fpu detection, add vfp detection as
+       well.
+       
+       * CMakeLists.txt: Add arm support.
+
+2009-05-24  Miguel de Icaza  <miguel@novell.com>
+
+       * Disable mono/docs build if we disabled the mcs build.
+
+2009-05-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * */CMakeLists.txt: Add beginnings of a cmake based build system.
+
+2009-05-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * acinclude.m4 (dolt_supported): Enable dolt on sparc linux.
+
 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
 
        * configure.in: Add TARGET_POWERPC/POWERPC64 defines.
index bc6fe2c54205b3d4d47f17c8a3527e83f48a9cd3..b1463817dfdfb756729da687b58b7b3340e4c19e 100644 (file)
@@ -1,7 +1,7 @@
 AUTOMAKE_OPTIONS = foreign
 ACLOCAL_AMFLAGS = -I .
 
-SUBDIRS = po $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) support data runtime scripts man samples web msvc docs
+SUBDIRS = po $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) support data runtime scripts man samples web msvc $(docs_dir)
 
 # Keep in sync with SUBDIRS
 ## 'tools' is not normally built
index 66a3bd748f637d18a564948886708969a3613ea4..b31512c46f576519073e0ad909a289f50c7641e0 100644 (file)
@@ -23,7 +23,7 @@ if test x$GCC != xyes; then
 fi
 case $host in
 i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
-|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*)
+|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*)
     pic_options='-fPIC'
     ;;
 i?86-apple-darwin*)
index 18b3c2f8973178c5a62a6870235fe2f6ee770352..ede58922a07de8c6c27f3f0a58b4da144bfe82a6 100644 (file)
@@ -2291,6 +2291,17 @@ AC_ARG_WITH(mcs_docs,[  --with-mcs-docs=yes,no         If you want to build the
        fi
 ])
 
+dnl
+dnl Consistency settings
+dnl
+if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
+   DISABLE_MCS_DOCS=yes
+   docs_dir=""
+else
+   docs_dir=docs
+fi
+AC_SUBST(docs_dir)
+
 AM_CONDITIONAL(HAVE_OPROFILE, test x$OPROFILE = xyes)
 AC_SUBST(OPROFILE_CFLAGS)
 AC_SUBST(OPROFILE_LIBS)
@@ -2514,13 +2525,6 @@ 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 ;;
@@ -2602,6 +2606,7 @@ echo "
         olive source:  $olive_topdir
 
        GC:            $gc
+       GLIB:          $with_glib
        TLS:           $with_tls
        SIGALTSTACK:   $with_sigaltstack
        Engine:        $jit_status
diff --git a/ikvm-native/CMakeLists.txt b/ikvm-native/CMakeLists.txt
new file mode 100644 (file)
index 0000000..74c6a1a
--- /dev/null
@@ -0,0 +1,4 @@
+
+ADD_DEFINITIONS(${GMODULE_CFLAGS})
+ADD_LIBRARY(ikvm_native SHARED jni.c os.c jni.h)
+TARGET_LINK_LIBRARIES(ikvm_native ${GMODULE_LIBS})
\ No newline at end of file
index 58bbb525917de1f9943d73db8120e6f9e8094832..66137857ba86f5e300c5c6c0a40967b996e36146 100644 (file)
 #       define ALIGNMENT 4\r
         extern int _end [];\r
 //       extern int _dso_handle[];\r
-               extern int __bss;\r
+               extern int __bss_start;\r
 \r
 #       define DATAEND (_end)\r
-#       define DATASTART (__bss)\r
-#       define HEURISTIC2\r
+#       define DATASTART (__bss_start)\r
+#       define STACKBOTTOM ((ptr_t) ps3_get_stack_bottom ())
 #       define USE_GENERIC_PUSHREGS\r
 #   endif\r
 \r
index 5017bdc5e8aa1492f194d93e9fbd43acfbe2e59b..7e4e567df177b52cb026e94e40061ca681ea7845 100644 (file)
@@ -1514,7 +1514,7 @@ void GC_register_data_segments()
 
 # if !defined(OS2) && !defined(PCR) && !defined(AMIGA) \
        && !defined(MSWIN32) && !defined(MSWINCE) \
-       && !defined(MACOS) && !defined(DOS4GW)
+       && !defined(MACOS) && !defined(DOS4GW) && !defined(SN_TARGET_PS3)
 
 # ifdef SUNOS4
     extern caddr_t sbrk();
index b042b8e56124922ba58e0b226b709ca9947fde9d..5e950e123f6290a0d7332bce1117e0d320e54fc6 100644 (file)
@@ -286,3 +286,7 @@ Mon Jan 22 11:15:26 CET 2007 Paolo Molaro <lupus@ximian.com>
        * mono-shlib-cop.1: Document another BUG/design issue that it doesn't check
          for; formatting/style changes.
 
+2009-05-22  Michael Barker  <mike@middlesoft.co.uk>
+
+       * man.1: Added documentation for MONO_MESSAGING_PROVIDER environment
+       variable.
index 6d4b05c9a0613d9259394225e79e44cff9733b9d..563b73ac012f31b2ccd8e0e15afc495f5085be82 100644 (file)
@@ -1360,6 +1360,16 @@ Both files are read by System.Web on application startup, if they are found at t
 above locations. If you don't want the mapping to be performed you can set this
 variable in your environment before starting the application and no action will
 be taken.
+.TP
+\fBMONO_MESSAGING_PROVIDER\fR
+Mono supports a plugin model for its implementation of System.Messaging making
+it possible to support a variety of messaging implementations (e.g. AMQP, ActiveMQ).
+To specify which messaging implementation is to be used the evironement variable
+needs to be set to the full class name for the provider.  E.g. to use the RabbitMQ based
+AMQP implementation the variable should be set to:
+
+.nf
+Mono.Messaging.RabbitMQ.RabbitMQMessagingProvider,Mono.Messaging.RabbitMQ
 .SH ENVIRONMENT VARIABLES FOR DEBUGGING
 .TP
 \fBMONO_ASPNET_NODELETE\fR
index cab3e7e66c29634100cf677836daaa9782a00a9f..d78bb25052eebfd67f7727b75041e9f68c66c73f 100644 (file)
@@ -1,3 +1,41 @@
+2009-05-25  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ColorDialog.cs: Actually add the help button to the form, so it can
+       be visible.
+       Fixes #478555.
+
+2009-05-25  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * PrintPreviewDialog.cs: Don't use Dock.Fill for the
+       PrintPreviewControl, since it will be hidden in the top by our
+       toolbar. Use manual location and anchoring instead.
+       Fixes #474889.
+
+2009-05-25  Carlos Alberto Cortez <calberto.cortez@gmail.com> 
+
+       * FileDialog.cs: When saving the size of the dialog, use the
+       ClientSize instead of Size, so we have always the same size for the
+       form. Patch by Alex Shulgin.
+       Fixes #503064.
+
+2009-05-25  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * MessageBox.cs: When showing the dialog call XplatUI.AudibleAlert to
+       show a beep, similar to what .net does. 
+       Fixes #473725.
+
+2009-05-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ContainerControl.cs:
+       * MenuStrip.cs
+       * ToolStrip.cs: Implicit mnemonic processing should happen for every
+       ToolStrip child, not only for MenuStrip, so we are going to do that in
+       ToolStrip.ProcessMnemonic, where we already had that exactly
+       functionality, but we are only just checking that either this instance
+       is a ToolStripDropDownMenu instance or Alt has been pressed. Finally
+       remove the extra code, since we are not going to use it now.
+       Fixes the remaining bits of #503663.
+
 2009-05-21  Neville Gao  <nevillegao@gmail.com>
 
        * ContextMenu.cs: Cleaned up UIA properties.
index 50d703ea047dcde1fdc74b6a38396b48ba36cd6c..448343259bcc8705cc6364d6e6efa94af7dbab19 100644 (file)
@@ -263,6 +263,7 @@ namespace System.Windows.Forms {
                        form.Controls.Add (okButton);
                        form.Controls.Add (cancelButton);
                        form.Controls.Add (addColoursButton);
+                       form.Controls.Add (helpButton);
                        
                        form.Controls.Add (baseColorControl);
                        form.Controls.Add (colorMatrixControl);
index 1f03c350474e70b5558b80e1c1b27b9a9ae129dc..20a9425d41da1f448c7e3870dc8541734e28bc77 100644 (file)
@@ -651,16 +651,8 @@ namespace System.Windows.Forms {
                        wrapped = false;
                        c = active_control;
 
-#if NET_2_0
-                       System.Collections.Generic.List<MenuStrip> strips = new System.Collections.Generic.List<MenuStrip> ();
-#endif
-
                        do {
                                c = GetNextControl(c, true);
-#if NET_2_0
-                               if (c is MenuStrip)
-                                       strips.Add ((MenuStrip)c);
-#endif
                                if (c != null) {
                                        // This is stupid. I want to be able to call c.ProcessMnemonic directly
                                        if (c.ProcessControlMnemonic(charCode)) {
@@ -675,14 +667,6 @@ namespace System.Windows.Forms {
                                }
                        } while (c != active_control);
 
-#if NET_2_0
-                       // No one has an explicit mnemonic for this key.
-                       // Let MenuStrips have a chance at implicit mnemonics.
-                       foreach (MenuStrip ms in strips)
-                               if (ms.ProcessImplicitMnemonic (charCode))
-                                       return true;
-#endif
-
                        return false;
                }
 
index 9a799e895b4948821f0a81a9c803e14a3a3e965c..ad36c708ca85d2c3302cf07e2c06a4f4e80b57c7 100644 (file)
@@ -1300,8 +1300,8 @@ namespace System.Windows.Forms
                
                private void WriteConfigValues ()
                {
-                       MWFConfig.SetValue (filedialog_string, width_string, form.Width);
-                       MWFConfig.SetValue (filedialog_string, height_string, form.Height);
+                       MWFConfig.SetValue (filedialog_string, width_string, form.ClientSize.Width);
+                       MWFConfig.SetValue (filedialog_string, height_string, form.ClientSize.Height);
                        MWFConfig.SetValue (filedialog_string, x_string, form.Location.X);
                        MWFConfig.SetValue (filedialog_string, y_string, form.Location.Y);
                        
index 986ed2b8acc8929593e085c9169bae00a4153a0f..27a71c0ae70f0dca3a0deceb95b153f7a6913507 100644 (file)
@@ -310,18 +310,6 @@ namespace System.Windows.Forms
                        return false;
                }
 
-               internal bool ProcessImplicitMnemonic (char charCode)
-               {
-                       string code = Char.ToUpper (charCode).ToString ();
-                       
-                       // If any item's text starts with our letter, it gets the message
-                       foreach (ToolStripItem tsi in this.Items)
-                               if (tsi.Enabled && tsi.Visible && !string.IsNullOrEmpty (tsi.Text) && tsi.Text.ToUpper ().StartsWith (code))
-                                       return tsi.ProcessMnemonic (charCode);
-                                       
-                       return false;
-               }
-               
                private void ReorderMdiMenu ()
                {
                        ToolStripItem[] loopitems = new ToolStripItem[this.mdi_window_list_item.DropDownItems.Count];
index 2daaec57c68b79241d3b821647efdaba67e4490d..3c1e25dbab1f2174ae5132c22266a8a2161e1896 100644 (file)
@@ -190,6 +190,7 @@ namespace System.Windows.Forms
                                if (Owner != null)
                                        TopMost = Owner.TopMost;
                                        
+                               XplatUI.AudibleAlert ();
                                this.ShowDialog ();
 
                                return this.DialogResult;
index 813fddc5ac3ed3721798dede454f32caca1b721e..e16e0606b9d913721973a4b64d89d5db3de27743 100644 (file)
@@ -64,7 +64,8 @@ namespace System.Windows.Forms {
 
                        print_preview = new PrintPreviewControl();
                        print_preview.Location = new Point (0, toolbar.Location.Y + toolbar.Size.Height);
-                       print_preview.Dock = DockStyle.Fill;
+                       print_preview.Size = new Size (ClientSize.Width, ClientSize.Height - toolbar.Bottom);
+                       print_preview.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
                        Controls.Add (print_preview);
                        print_preview.Show ();
                }
index 7f7c0486d9a19ed0d656d71f8ba5306f9d66f556..fd6500af68ce3900d8aa4dc977fa125b3e256e7f 100644 (file)
@@ -1135,7 +1135,7 @@ namespace System.Windows.Forms
                        string code = Char.ToUpper (charCode).ToString ();
                        
                        // If any item's text starts with our letter, it gets the message
-                       if (this is ToolStripDropDownMenu)
+                       if ((Control.ModifierKeys & Keys.Alt) != 0 || this is ToolStripDropDownMenu)
                                foreach (ToolStripItem tsi in this.Items)
                                        if (tsi.Enabled && tsi.Visible && !string.IsNullOrEmpty (tsi.Text) && tsi.Text.ToUpper ().StartsWith (code) && !(tsi is ToolStripControlHost))
                                                return tsi.ProcessMnemonic (charCode);
index 0520b8df3012f666131002a826d35b8e501b300a..6ac69f817c437c14a7ed4ec362e8f1e148f22360 100644 (file)
@@ -1,3 +1,7 @@
+2009-05-21  Jb Evain  <jbevain@novell.com>
+
+       * Mono.Cecil/ReflectionReader.cs: add support for type forwarders.
+
 2009-05-19  Jb Evain  <jbevain@novell.com>
 
        * Mono.Cecil/TargetRuntime.cs
index a4d08602df7de22db14fa79e12af810ae7c27792..fe6d3c1946823b5f80a17b158a3160f36988e5c1 100644 (file)
@@ -815,15 +815,12 @@ namespace Mono.Cecil {
 
                        for (int i = 0; i < etTable.Rows.Count; i++) {
                                ExportedTypeRow etRow = etTable [i];
-                               if (etRow.Implementation.TokenType != TokenType.File)
-                                       continue;
 
-                               string name = m_root.Streams.StringsHeap [etRow.TypeName];
-                               string ns = m_root.Streams.StringsHeap [etRow.TypeNamespace];
-                               if (ns.Length == 0)
-                                       buffer [i] = m_module.TypeReferences [name];
-                               else
-                                       buffer [i] = m_module.TypeReferences [string.Concat (ns, '.', name)];
+                               buffer [i] = new TypeDefinition (
+                                       m_root.Streams.StringsHeap [etRow.TypeName],
+                                       m_root.Streams.StringsHeap [etRow.TypeNamespace],
+                                       etRow.Flags);
+                               buffer [i].AttachToScope (GetExportedTypeScope (etRow.Implementation));
                        }
 
                        for (int i = 0; i < etTable.Rows.Count; i++) {
@@ -831,9 +828,10 @@ namespace Mono.Cecil {
                                if (etRow.Implementation.TokenType != TokenType.ExportedType)
                                        continue;
 
+                               TypeReference exported = buffer [i];
                                TypeReference owner = buffer [etRow.Implementation.RID - 1];
-                               string name = m_root.Streams.StringsHeap [etRow.TypeName];
-                               buffer [i] = m_module.TypeReferences [string.Concat (owner.FullName, '/', name)];
+                               exported.DeclaringType = owner;
+                               exported.AttachToScope (owner.Scope);
                        }
 
                        for (int i = 0; i < buffer.Length; i++) {
@@ -843,6 +841,21 @@ namespace Mono.Cecil {
                        }
                }
 
+               IMetadataScope GetExportedTypeScope (MetadataToken scope)
+               {
+                       int index = (int) scope.RID - 1;
+                       switch (scope.TokenType) {
+                       case TokenType.AssemblyRef:
+                               return Module.AssemblyReferences [index];
+                       case TokenType.File:
+                               return Module.ModuleReferences [index];
+                       case TokenType.ExportedType:
+                               return null; // resolved later
+                       default:
+                               throw new NotSupportedException ();
+                       }
+               }
+
                static object GetFixedArgValue (CustomAttrib.FixedArg fa)
                {
                        if (fa.SzArray) {
index 175549385572c13081c4d5ebe0fde1951b596297..6a6b2a04b2dcfad7f2df2f143079fe083679012b 100644 (file)
@@ -5,4 +5,8 @@
 
 2009-05-19  Michael Barker  <mike@middlesoft.co.uk>
 
-       * MessageBaseTest.cs: Used reflection to create Message Object
\ No newline at end of file
+       * MessageBaseTest.cs: Used reflection to create Message Object
+       
+2009-05-23  Michael Barker  <mike@middlesoft.co.uk>
+
+       * QueueReferenceTest.cs: Incorrect namespace for test
\ No newline at end of file
index 442ad73ccff5cf2a402adb1e17257f2ce0dd1cca..8f207d71da749274cb8f4f2be754849de117b145 100644 (file)
@@ -34,7 +34,7 @@ using System.Text.RegularExpressions;
 using Mono.Messaging;
 using NUnit.Framework;
 
-namespace MonoTests.Mono.Messsaging
+namespace MonoTests.Mono.Messaging
 {
        [TestFixture]
        public class QueueReferenceTest
index 4dfdb797ff674b20768256c2d2c1a5072f6a8024..a81ee3eb04a3da82441033f3e4720642a8f278e6 100644 (file)
@@ -1,3 +1,12 @@
+2009-05-25  Michael Barker  <mike@middlesoft.co.uk>
+
+    * Removed amqp spec files and modified generated code to fix licensing 
+    issues.
+
+2009-05-21  Michael Barker  <mike@middlesoft.co.uk>
+
+       * Updated to version 1.5.3 of the RabbitMQ libraries.
+
 2008-12-09  Atsushi Enomoto  <atsushi@ximian.com>
 
        * Makefile: those paths are all wrong!
@@ -38,7 +47,3 @@
        Patch by Michael Barker (patches are on bug #432471). Imported
        RabbitMQ.Client assembly from RabbitMQ project.
        http://www.rabbitmq.com/
-
-2009-05-21  Michael Barker  <mike@middlesoft.co.uk>
-
-       Updated to version 1.5.3 of the RabbitMQ libraries.
index f5c7f91e4cb6000c27df23056546558a4697cb9f..db16399db0605a8f9d459b02479f535995a1d7a5 100644 (file)
@@ -6,13 +6,22 @@ all-local: autogenerated-api-0-9.cs autogenerated-api-0-8.cs autogenerated-api-q
 
 copy:
        cp ../../../lib/net_2_0/apigen-bootstrap.dll ../../src/apigen/.
+
+amqp0-9.xml:
+       cp ${RABBITMQ_CLIENT_HOME}/docs/specs/$@ .
        
 autogenerated-api-0-9.cs: amqp0-9.xml
        mono ../../src/apigen/RabbitMQ.Client.Apigen.exe /n:v0_9 "/apiName:AMQP_0_9" $^ $@
 
+amqp0-8.xml:
+       cp ${RABBITMQ_CLIENT_HOME}/docs/specs/$@ .
+       
 autogenerated-api-0-8.cs: amqp0-8.xml
        mono ../../src/apigen/RabbitMQ.Client.Apigen.exe /n:v0_8 "/apiName:AMQP_0_8" $^ $@
        
+qpid-amqp.0-8.xml:
+       cp ${RABBITMQ_CLIENT_HOME}/docs/specs/$@ .
+
 autogenerated-api-qpid-0-8.cs: qpid-amqp.0-8.xml
        mono ../../src/apigen/RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $^ $@
 
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/amqp0-8.xml b/mcs/class/RabbitMQ.Client/docs/specs/amqp0-8.xml
deleted file mode 100644 (file)
index 326ce99..0000000
+++ /dev/null
@@ -1,3962 +0,0 @@
-<?xml version="1.0"?>
-<!-- WARNING: Modified from the official 0-8 specification XML by
-     the addition of queue.unbind, queue.unbind-ok -->
-<!--
-Copyright Notice
-================
-© Copyright JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc.,
-iMatix Corporation, IONA� Technologies, Red Hat, Inc.,
-TWIST Process Innovations, and 29West Inc. 2006. All rights reserved.
-
-License
-=======
-JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc., iMatix 
-Corporation, IONA� Technologies, Red Hat, Inc., TWIST Process Innovations, and 
-29West Inc. (collectively, the "Authors") each hereby grants to you a worldwide,
-perpetual, royalty-free, nontransferable, nonexclusive license to
-(i) copy, display, and implement the Advanced Messaging Queue Protocol
-("AMQP") Specification and (ii) the Licensed Claims that are held by
-the Authors, all for the purpose of implementing the Advanced Messaging
-Queue Protocol Specification. Your license and any rights under this
-Agreement will terminate immediately without notice from
-any Author if you bring any claim, suit, demand, or action related to
-the Advanced Messaging Queue Protocol Specification against any Author.
-Upon termination, you shall destroy all copies of the Advanced Messaging
-Queue Protocol Specification in your possession or control.
-
-As used hereunder, "Licensed Claims" means those claims of a patent or
-patent application, throughout the world, excluding design patents and
-design registrations, owned or controlled, or that can be sublicensed
-without fee and in compliance with the requirements of this
-Agreement, by an Author or its affiliates now or at any
-future time and which would necessarily be infringed by implementation
-of the Advanced Messaging Queue Protocol Specification. A claim is
-necessarily infringed hereunder only when it is not possible to avoid
-infringing it because there is no plausible non-infringing alternative
-for implementing the required portions of the Advanced Messaging Queue
-Protocol Specification. Notwithstanding the foregoing, Licensed Claims
-shall not include any claims other than as set forth above even if
-contained in the same patent as Licensed Claims; or that read solely
-on any implementations of any portion of the Advanced Messaging Queue
-Protocol Specification that are not required by the Advanced Messaging
-Queue Protocol Specification, or that, if licensed, would require a
-payment of royalties by the licensor to unaffiliated third parties.
-Moreover, Licensed Claims shall not include (i) any enabling technologies
-that may be necessary to make or use any Licensed Product but are not
-themselves expressly set forth in the Advanced Messaging Queue Protocol
-Specification (e.g., semiconductor manufacturing technology, compiler
-technology, object oriented technology, networking technology, operating
-system technology, and the like); or (ii) the implementation of other
-published standards developed elsewhere and merely referred to in the
-body of the Advanced Messaging Queue Protocol Specification, or
-(iii) any Licensed Product and any combinations thereof the purpose or
-function of which is not required for compliance with the Advanced
-Messaging Queue Protocol Specification. For purposes of this definition,
-the Advanced Messaging Queue Protocol Specification shall be deemed to
-include both architectural and interconnection requirements essential
-for interoperability and may also include supporting source code artifacts
-where such architectural, interconnection requirements and source code
-artifacts are expressly identified as being required or documentation to
-achieve compliance with the Advanced Messaging Queue Protocol Specification.
-
-As used hereunder, "Licensed Products" means only those specific portions
-of products (hardware, software or combinations thereof) that implement
-and are compliant with all relevant portions of the Advanced Messaging
-Queue Protocol Specification.
-
-The following disclaimers, which you hereby also acknowledge as to any
-use you may make of the Advanced Messaging Queue Protocol Specification:
-
-THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS,"
-AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
-IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
-CONTENTS OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE
-SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF THE ADVANCED
-MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD PARTY 
-PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
-INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
-USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED MESSAGING QUEUE
-PROTOCOL SPECIFICATION.
-
-The name and trademarks of the Authors may NOT be used in any manner,
-including advertising or publicity pertaining to the Advanced Messaging
-Queue Protocol Specification or its contents without specific, written
-prior permission. Title to copyright in the Advanced Messaging Queue
-Protocol Specification will at all times remain with the Authors.
-
-No other rights are granted by implication, estoppel or otherwise.
-
-Upon termination of your license or rights under this Agreement, you
-shall destroy all copies of the Advanced Messaging Queue Protocol
-Specification in your possession or control.
-
-Trademarks
-==========
-"JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the
-Octagon Symbol are trademarks of JPMorgan Chase & Co.
-
-IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
-
-IONA, IONA Technologies, and the IONA logos are trademarks of IONA
-Technologies PLC and/or its subsidiaries.
-
-LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered
-trademarks of Red Hat, Inc. in the US and other countries.
-
-Java, all Java-based trademarks and OpenOffice.org are trademarks of
-Sun Microsystems, Inc. in the United States, other countries, or both.
-
-Other company, product, or service names may be trademarks or service
-marks of others.
-
-Links to full AMQP specification:
-=================================
-http://www.envoytech.org/spec/amq/
-http://www.iona.com/opensource/amqp/
-http://www.redhat.com/solutions/specifications/amqp/
-http://www.twiststandards.org/tiki-index.php?page=AMQ
-http://www.imatix.com/amqp
-
--->
-
-<amqp major="8" minor="0" port="5672" comment="AMQ protocol 0.80">
-    AMQ Protocol 0.80
-<!--
-======================================================
-==       CONSTANTS
-======================================================
--->
-  <constant name="frame method" value="1"/>
-  <constant name="frame header" value="2"/>
-  <constant name="frame body" value="3"/>
-  <constant name="frame oob method" value="4"/>
-  <constant name="frame oob header" value="5"/>
-  <constant name="frame oob body" value="6"/>
-  <constant name="frame trace" value="7"/>
-  <constant name="frame heartbeat" value="8"/>
-  <constant name="frame min size" value="4096"/>
-  <constant name="frame end" value="206"/>
-  <constant name="reply success" value="200">
-  Indicates that the method completed successfully. This reply code is
-  reserved for future use - the current protocol design does not use
-  positive confirmation and reply codes are sent only in case of an
-  error.
-</constant>
-  <constant name="not delivered" value="310" class="soft error">
-  The client asked for a specific message that is no longer available.
-  The message was delivered to another client, or was purged from the
-  queue for some other reason.
-</constant>
-  <constant name="content too large" value="311" class="soft error">
-  The client attempted to transfer content larger than the server
-  could accept at the present time.  The client may retry at a later
-  time.
-</constant>
-  <constant name="connection forced" value="320" class="hard error">
-  An operator intervened to close the connection for some reason.
-  The client may retry at some later date.
-</constant>
-  <constant name="invalid path" value="402" class="hard error">
-  The client tried to work with an unknown virtual host or cluster.
-</constant>
-  <constant name="access refused" value="403" class="soft error">
-  The client attempted to work with a server entity to which it has
-  no  due to security settings.
-</constant>
-  <constant name="not found" value="404" class="soft error">
-  The client attempted to work with a server entity that does not exist.
-</constant>
-  <constant name="resource locked" value="405" class="soft error">
-  The client attempted to work with a server entity to which it has
-  no access because another client is working with it.
-</constant>
-  <constant name="frame error" value="501" class="hard error">
-  The client sent a malformed frame that the server could not decode.
-  This strongly implies a programming error in the client.
-</constant>
-  <constant name="syntax error" value="502" class="hard error">
-  The client sent a frame that contained illegal values for one or more
-  fields.  This strongly implies a programming error in the client.
-</constant>
-  <constant name="command invalid" value="503" class="hard error">
-  The client sent an invalid sequence of frames, attempting to perform
-  an operation that was considered invalid by the server. This usually
-  implies a programming error in the client.
-</constant>
-  <constant name="channel error" value="504" class="hard error">
-  The client attempted to work with a channel that had not been
-  correctly opened.  This most likely indicates a fault in the client
-  layer.
-</constant>
-  <constant name="resource error" value="506" class="hard error">
-  The server could not complete the method because it lacked sufficient
-  resources. This may be due to the client creating too many of some
-  type of entity.
-</constant>
-  <constant name="not allowed" value="530" class="hard error">
-  The client tried to work with some entity in a manner that is
-  prohibited by the server, due to security settings or by some other
-  criteria.
-</constant>
-  <constant name="not implemented" value="540" class="hard error">
-  The client tried to use functionality that is not implemented in the
-  server.
-</constant>
-  <constant name="internal error" value="541" class="hard error">
-  The server could not complete the method because of an internal error.
-  The server may require intervention by an operator in order to resume
-  normal operations.
-</constant>
-  <!--
-======================================================
-==       DOMAIN TYPES
-======================================================
--->
-  <domain name="access ticket" type="short">
-    access ticket granted by server
-    <doc>
-    An access ticket granted by the server for a certain set of access
-    rights within a specific realm. Access tickets are valid within the
-    channel where they were created, and expire when the channel closes.
-    </doc>
-    <assert check="ne" value="0"/>
-  </domain>
-  <domain name="class id" type="short"/>
-  <domain name="consumer tag" type="shortstr">
-    consumer tag
-    <doc>
-      Identifier for the consumer, valid within the current connection.
-    </doc>
-    <rule implement="MUST">
-      The consumer tag is valid only within the channel from which the
-      consumer was created. I.e. a client MUST NOT create a consumer in
-      one channel and then use it in another.
-    </rule>
-  </domain>
-  <domain name="delivery tag" type="longlong">
-    server-assigned delivery tag
-    <doc>
-      The server-assigned and channel-specific delivery tag
-    </doc>
-    <rule implement="MUST">
-      The delivery tag is valid only within the channel from which the
-      message was received.  I.e. a client MUST NOT receive a message on
-      one channel and then acknowledge it on another.
-    </rule>
-    <rule implement="MUST">
-      The server MUST NOT use a zero value for delivery tags.  Zero is
-      reserved for client use, meaning "all messages so far received".
-    </rule>
-  </domain>
-  <domain name="exchange name" type="shortstr">
-    exchange name
-    <doc>
-      The exchange name is a client-selected string that identifies
-      the exchange for publish methods.  Exchange names may consist
-      of any mixture of digits, letters, and underscores.  Exchange
-      names are scoped by the virtual host.
-    </doc>
-    <assert check="length" value="127"/>
-  </domain>
-  <domain name="known hosts" type="shortstr">
-list of known hosts
-<doc>
-Specifies the list of equivalent or alternative hosts that the server
-knows about, which will normally include the current server itself.
-Clients can cache this information and use it when reconnecting to a
-server after a failure.
-</doc>
-    <rule implement="MAY">
-The server MAY leave this field empty if it knows of no other
-hosts than itself.
-</rule>
-  </domain>
-  <domain name="method id" type="short"/>
-  <domain name="no ack" type="bit">
-    no acknowledgement needed
-    <doc>
-      If this field is set the server does not expect acknowledgments
-      for messages.  That is, when a message is delivered to the client
-      the server automatically and silently acknowledges it on behalf
-      of the client.  This functionality increases performance but at
-      the cost of reliability.  Messages can get lost if a client dies
-      before it can deliver them to the application.
-    </doc>
-  </domain>
-  <domain name="no local" type="bit">
-    do not deliver own messages
-    <doc>
-    If the no-local field is set the server will not send messages to
-    the client that published them.
-    </doc>
-  </domain>
-  <domain name="path" type="shortstr">
-    <doc>
-  Must start with a slash "/" and continue with path names
-  separated by slashes. A path name consists of any combination
-  of at least one of [A-Za-z0-9] plus zero or more of [.-_+!=:].
-</doc>
-    <assert check="notnull"/>
-    <assert check="syntax" rule="path"/>
-    <assert check="length" value="127"/>
-  </domain>
-  <domain name="peer properties" type="table">
-    <doc>
-This string provides a set of peer properties, used for
-identification, debugging, and general information.
-</doc>
-    <rule implement="SHOULD">
-The properties SHOULD contain these fields:
-"product", giving the name of the peer product, "version", giving
-the name of the peer version, "platform", giving the name of the
-operating system, "copyright", if appropriate, and "information",
-giving other general information.
-</rule>
-  </domain>
-  <domain name="queue name" type="shortstr">
-    queue name
-    <doc>
-    The queue name identifies the queue within the vhost.  Queue
-    names may consist of any mixture of digits, letters, and
-    underscores.
-    </doc>
-    <assert check="length" value="127"/>
-  </domain>
-  <domain name="redelivered" type="bit">
-    message is being redelivered
-    <doc>
-      This indicates that the message has been previously delivered to
-      this or another client.
-    </doc>
-    <rule implement="SHOULD">
-      The server SHOULD try to signal redelivered messages when it can.
-      When redelivering a message that was not successfully acknowledged,
-      the server SHOULD deliver it to the original client if possible.
-    </rule>
-    <rule implement="MUST">
-      The client MUST NOT rely on the redelivered field but MUST take it
-      as a hint that the message may already have been processed.  A
-      fully robust client must be able to track duplicate received messages
-      on non-transacted, and locally-transacted channels.
-    </rule>
-  </domain>
-  <domain name="reply code" type="short">
-reply code from server
-<doc>
-  The reply code. The AMQ reply codes are defined in AMQ RFC 011.
-</doc>
-    <assert check="notnull"/>
-  </domain>
-  <domain name="reply text" type="shortstr">
-localised reply text
-<doc>
-  The localised reply text.  This text can be logged as an aid to
-  resolving issues.
-</doc>
-    <assert check="notnull"/>
-  </domain>
-  <class name="connection" handler="connection" index="10">
-    <!--
-======================================================
-==       CONNECTION
-======================================================
--->
-  work with socket connections
-<doc>
-  The connection class provides methods for a client to establish a
-  network connection to a server, and for both peers to operate the
-  connection thereafter.
-</doc>
-    <doc name="grammar">
-    connection          = open-connection *use-connection close-connection
-    open-connection     = C:protocol-header
-                          S:START C:START-OK
-                          *challenge
-                          S:TUNE C:TUNE-OK
-                          C:OPEN S:OPEN-OK | S:REDIRECT
-    challenge           = S:SECURE C:SECURE-OK
-    use-connection      = *channel
-    close-connection    = C:CLOSE S:CLOSE-OK
-                        / S:CLOSE C:CLOSE-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="MUST"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="start" synchronous="1" index="10">
-  start connection negotiation
-  <doc>
-    This method starts the connection negotiation process by telling
-    the client the protocol version that the server proposes, along
-    with a list of security mechanisms which the client can use for
-    authentication.
-  </doc>
-      <rule implement="MUST">
-    If the client cannot handle the protocol version suggested by the
-    server it MUST close the socket connection.
-  </rule>
-      <rule implement="MUST">
-    The server MUST provide a protocol version that is lower than or
-    equal to that requested by the client in the protocol header. If
-    the server cannot support the specified protocol it MUST NOT send
-    this method, but MUST close the socket connection.
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <response name="start-ok"/>
-      <field name="version major" type="octet">
-    protocol major version
-    <doc>
-      The protocol major version that the server agrees to use, which
-      cannot be higher than the client's major version.
-    </doc>
-      </field>
-      <field name="version minor" type="octet">
-    protocol major version
-    <doc>
-      The protocol minor version that the server agrees to use, which
-      cannot be higher than the client's minor version.
-    </doc>
-      </field>
-      <field name="server properties" domain="peer properties">
-    server properties
-  </field>
-      <field name="mechanisms" type="longstr">
-    available security mechanisms
-    <doc>
-      A list of the security mechanisms that the server supports, delimited
-      by spaces.  Currently ASL supports these mechanisms: PLAIN.
-    </doc>
-        <see name="security mechanisms"/>
-        <assert check="notnull"/>
-      </field>
-      <field name="locales" type="longstr">
-    available message locales
-    <doc>
-      A list of the message locales that the server supports, delimited
-      by spaces.  The locale defines the language in which the server
-      will send reply texts.
-    </doc>
-        <rule implement="MUST">
-      All servers MUST support at least the en_US locale.
-    </rule>
-        <assert check="notnull"/>
-      </field>
-    </method>
-    <method name="start-ok" synchronous="1" index="11">
-  select security mechanism and locale
-  <doc>
-    This method selects a SASL security mechanism. ASL uses SASL
-    (RFC2222) to negotiate authentication and encryption.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <field name="client properties" domain="peer properties">
-    client properties
-  </field>
-      <field name="mechanism" type="shortstr">
-    selected security mechanism
-    <doc>
-      A single security mechanisms selected by the client, which must be
-      one of those specified by the server.
-    </doc>
-        <rule implement="SHOULD">
-      The client SHOULD authenticate using the highest-level security
-      profile it can handle from the list provided by the server.
-    </rule>
-        <rule implement="MUST">
-    The mechanism field MUST contain one of the security mechanisms
-    proposed by the server in the Start method. If it doesn't, the
-    server MUST close the socket.
-    </rule>
-        <assert check="notnull"/>
-      </field>
-      <field name="response" type="longstr">
-    security response data
-    <doc>
-      A block of opaque data passed to the security mechanism. The contents
-      of this data are defined by the SASL security mechanism.  For the
-      PLAIN security mechanism this is defined as a field table holding
-      two fields, LOGIN and PASSWORD.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-      <field name="locale" type="shortstr">
-    selected message locale
-    <doc>
-      A single message local selected by the client, which must be one
-      of those specified by the server.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="secure" synchronous="1" index="20">
-  security mechanism challenge
-  <doc>
-    The SASL protocol works by exchanging challenges and responses until
-    both peers have received sufficient information to authenticate each
-    other.  This method challenges the client to provide more information.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <response name="secure-ok"/>
-      <field name="challenge" type="longstr">
-    security challenge data
-    <doc>
-      Challenge information, a block of opaque binary data passed to
-      the security mechanism.
-    </doc>
-        <see name="security mechanisms"/>
-      </field>
-    </method>
-    <method name="secure-ok" synchronous="1" index="21">
-  security mechanism response
-  <doc>
-    This method attempts to authenticate, passing a block of SASL data
-    for the security mechanism at the server side.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <field name="response" type="longstr">
-    security response data
-    <doc>
-      A block of opaque data passed to the security mechanism.  The contents
-      of this data are defined by the SASL security mechanism.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="tune" synchronous="1" index="30">
-  propose connection tuning parameters
-  <doc>
-    This method proposes a set of connection configuration values
-    to the client.  The client can accept and/or adjust these.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <response name="tune-ok"/>
-      <field name="channel max" type="short">
-    proposed maximum channels
-    <doc>
-      The maximum total number of channels that the server allows
-      per connection. Zero means that the server does not impose a
-      fixed limit, but the number of allowed channels may be limited
-      by available server resources.
-    </doc>
-      </field>
-      <field name="frame max" type="long">
-    proposed maximum frame size
-    <doc>
-      The largest frame size that the server proposes for the
-      connection. The client can negotiate a lower value.  Zero means
-      that the server does not impose any specific limit but may reject
-      very large frames if it cannot allocate resources for them.
-    </doc>
-        <rule implement="MUST">
-      Until the frame-max has been negotiated, both peers MUST accept
-      frames of up to 4096 octets large. The minimum non-zero value for
-      the frame-max field is 4096.
-    </rule>
-      </field>
-      <field name="heartbeat" type="short">
-    desired heartbeat delay
-    <doc>
-      The delay, in seconds, of the connection heartbeat that the server
-      wants.  Zero means the server does not want a heartbeat.
-    </doc>
-      </field>
-    </method>
-    <method name="tune-ok" synchronous="1" index="31">
-  negotiate connection tuning parameters
-  <doc>
-    This method sends the client's connection tuning parameters to the
-    server. Certain fields are negotiated, others provide capability
-    information.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <field name="channel max" type="short">
-    negotiated maximum channels
-    <doc>
-      The maximum total number of channels that the client will use
-      per connection.  May not be higher than the value specified by
-      the server.
-    </doc>
-        <rule implement="MAY">
-      The server MAY ignore the channel-max value or MAY use it for
-      tuning its resource allocation.
-    </rule>
-        <assert check="notnull"/>
-        <assert check="le" method="tune" field="channel max"/>
-      </field>
-      <field name="frame max" type="long">
-    negotiated maximum frame size
-    <doc>
-      The largest frame size that the client and server will use for
-      the connection.  Zero means that the client does not impose any
-      specific limit but may reject very large frames if it cannot
-      allocate resources for them.  Note that the frame-max limit
-      applies principally to content frames, where large contents
-      can be broken into frames of arbitrary size.
-    </doc>
-        <rule implement="MUST">
-      Until the frame-max has been negotiated, both peers must accept
-      frames of up to 4096 octets large. The minimum non-zero value for
-      the frame-max field is 4096.
-    </rule>
-      </field>
-      <field name="heartbeat" type="short">
-    desired heartbeat delay
-    <doc>
-      The delay, in seconds, of the connection heartbeat that the client
-      wants. Zero means the client does not want a heartbeat.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="open" synchronous="1" index="40">
-  open connection to virtual host
-  <doc>
-    This method opens a connection to a virtual host, which is a
-    collection of resources, and acts to separate multiple application
-    domains within a server.
-  </doc>
-      <rule implement="MUST">
-    The client MUST open the context before doing any work on the
-    connection.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="open-ok"/>
-      <response name="redirect"/>
-      <field name="virtual host" domain="path">
-    virtual host name
-    <assert check="regexp" value="^[a-zA-Z0-9/-_]+$"/>
-        <doc>
-      The name of the virtual host to work with.
-    </doc>
-        <rule implement="MUST">
-      If the server supports multiple virtual hosts, it MUST enforce a
-      full separation of exchanges, queues, and all associated entities
-      per virtual host. An application, connected to a specific virtual
-      host, MUST NOT be able to access resources of another virtual host.
-    </rule>
-        <rule implement="SHOULD">
-      The server SHOULD verify that the client has permission to access
-      the specified virtual host.
-    </rule>
-        <rule implement="MAY">
-      The server MAY configure arbitrary limits per virtual host, such
-      as the number of each type of entity that may be used, per
-      connection and/or in total.
-    </rule>
-      </field>
-      <field name="capabilities" type="shortstr">
-    required capabilities
-    <doc>
-      The client may specify a number of capability names, delimited by
-      spaces.  The server can use this string to how to process the
-      client's connection request.
-    </doc>
-      </field>
-      <field name="insist" type="bit">
-    insist on connecting to server
-    <doc>
-      In a configuration with multiple load-sharing servers, the server
-      may respond to a Connection.Open method with a Connection.Redirect.
-      The insist option tells the server that the client is insisting on
-      a connection to the specified server.
-    </doc>
-        <rule implement="SHOULD">
-      When the client uses the insist option, the server SHOULD accept
-      the client connection unless it is technically unable to do so.
-    </rule>
-      </field>
-    </method>
-    <method name="open-ok" synchronous="1" index="41">
-  signal that the connection is ready
-  <doc>
-    This method signals to the client that the connection is ready for
-    use.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <field name="known hosts" domain="known hosts"/>
-    </method>
-    <method name="redirect" synchronous="1" index="50">
-  asks the client to use a different server
-  <doc>
-    This method redirects the client to another server, based on the
-    requested virtual host and/or capabilities.
-  </doc>
-      <rule implement="SHOULD">
-    When getting the Connection.Redirect method, the client SHOULD
-    reconnect to the host specified, and if that host is not present,
-    to any of the hosts specified in the known-hosts list.
-  </rule>
-      <chassis name="client" implement="MAY"/>
-      <field name="host" type="shortstr">
-    server to connect to
-    <doc>
-      Specifies the server to connect to.  This is an IP address or a
-      DNS name, optionally followed by a colon and a port number. If
-      no port number is specified, the client should use the default
-      port number for the protocol.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-      <field name="known hosts" domain="known hosts"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="close" synchronous="1" index="60">
-  request a connection close
-  <doc>
-    This method indicates that the sender wants to close the connection.
-    This may be due to internal conditions (e.g. a forced shut-down) or
-    due to an error handling a specific method, i.e. an exception.  When
-    a close is due to an exception, the sender provides the class and
-    method id of the method which caused the exception.
-  </doc>
-      <rule implement="MUST">
-    After sending this method any received method except the Close-OK
-    method MUST be discarded.
-  </rule>
-      <rule implement="MAY">
-    The peer sending this method MAY use a counter or timeout to
-    detect failure of the other peer to respond correctly with
-    the Close-OK method.
-  </rule>
-      <rule implement="MUST">
-    When a server receives the Close method from a client it MUST
-    delete all server-side resources associated with the client's
-    context.  A client CANNOT reconnect to a context after sending
-    or receiving a Close method.
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="close-ok"/>
-      <field name="reply code" domain="reply code"/>
-      <field name="reply text" domain="reply text"/>
-      <field name="class id" domain="class id">
-    failing method class
-    <doc>
-      When the close is provoked by a method exception, this is the
-      class of the method.
-    </doc>
-      </field>
-      <field name="method id" domain="class id">
-    failing method ID
-    <doc>
-      When the close is provoked by a method exception, this is the
-      ID of the method.
-    </doc>
-      </field>
-    </method>
-    <method name="close-ok" synchronous="1" index="61">
-  confirm a connection close
-  <doc>
-    This method confirms a Connection.Close method and tells the
-    recipient that it is safe to release resources for the connection
-    and close the socket.
-  </doc>
-      <rule implement="SHOULD">
-    A peer that detects a socket closure without having received a
-    Close-Ok handshake method SHOULD log the error.
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-    </method>
-  </class>
-  <class name="channel" handler="channel" index="20">
-    <!--
-======================================================
-==       CHANNEL
-======================================================
--->
-  work with channels
-<doc>
-  The channel class provides methods for a client to establish a virtual
-  connection - a channel - to a server and for both peers to operate the
-  virtual connection thereafter.
-</doc>
-    <doc name="grammar">
-    channel             = open-channel *use-channel close-channel
-    open-channel        = C:OPEN S:OPEN-OK
-    use-channel         = C:FLOW S:FLOW-OK
-                        / S:FLOW C:FLOW-OK
-                        / S:ALERT
-                        / functional-class
-    close-channel       = C:CLOSE S:CLOSE-OK
-                        / S:CLOSE C:CLOSE-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="MUST"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="open" synchronous="1" index="10">
-  open a channel for use
-  <doc>
-    This method opens a virtual connection (a channel).
-  </doc>
-      <rule implement="MUST">
-    This method MUST NOT be called when the channel is already open.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="open-ok"/>
-      <field name="out of band" type="shortstr">
-    out-of-band settings
-    <doc>
-      Configures out-of-band transfers on this channel.  The syntax and
-      meaning of this field will be formally defined at a later date.
-    </doc>
-        <assert check="null"/>
-      </field>
-    </method>
-    <method name="open-ok" synchronous="1" index="11">
-  signal that the channel is ready
-  <doc>
-    This method signals to the client that the channel is ready for use.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="flow" synchronous="1" index="20">
-  enable/disable flow from peer
-  <doc>
-    This method asks the peer to pause or restart the flow of content
-    data. This is a simple flow-control mechanism that a peer can use
-    to avoid oveflowing its queues or otherwise finding itself receiving
-    more messages than it can process.  Note that this method is not
-    intended for window control.  The peer that receives a request to
-    stop sending content should finish sending the current content, if
-    any, and then wait until it receives a Flow restart method.
-  </doc>
-      <rule implement="MAY">
-    When a new channel is opened, it is active.  Some applications
-    assume that channels are inactive until started.  To emulate this
-    behaviour a client MAY open the channel, then pause it.
-  </rule>
-      <rule implement="SHOULD">
-    When sending content data in multiple frames, a peer SHOULD monitor
-    the channel for incoming methods and respond to a Channel.Flow as
-    rapidly as possible.
-  </rule>
-      <rule implement="MAY">
-    A peer MAY use the Channel.Flow method to throttle incoming content
-    data for internal reasons, for example, when exchangeing data over a
-    slower connection.
-  </rule>
-      <rule implement="MAY">
-    The peer that requests a Channel.Flow method MAY disconnect and/or
-    ban a peer that does not respect the request.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <chassis name="client" implement="MUST"/>
-      <response name="flow-ok"/>
-      <field name="active" type="bit">
-    start/stop content frames
-    <doc>
-      If 1, the peer starts sending content frames.  If 0, the peer
-      stops sending content frames.
-    </doc>
-      </field>
-    </method>
-    <method name="flow-ok" index="21">
-  confirm a flow method
-  <doc>
-    Confirms to the peer that a flow command was received and processed.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <chassis name="client" implement="MUST"/>
-      <field name="active" type="bit">
-    current flow setting
-    <doc>
-      Confirms the setting of the processed flow method: 1 means the
-      peer will start sending or continue to send content frames; 0
-      means it will not.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="alert" index="30">
-  send a non-fatal warning message
-  <doc>
-    This method allows the server to send a non-fatal warning to the
-    client.  This is used for methods that are normally asynchronous
-    and thus do not have confirmations, and for which the server may
-    detect errors that need to be reported.  Fatal errors are handled
-    as channel or connection exceptions; non-fatal errors are sent
-    through this method.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <field name="reply code" domain="reply code"/>
-      <field name="reply text" domain="reply text"/>
-      <field name="details" type="table">
-    detailed information for warning
-    <doc>
-      A set of fields that provide more information about the
-      problem.  The meaning of these fields are defined on a
-      per-reply-code basis (TO BE DEFINED).
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="close" synchronous="1" index="40">
-  request a channel close
-  <doc>
-    This method indicates that the sender wants to close the channel.
-    This may be due to internal conditions (e.g. a forced shut-down) or
-    due to an error handling a specific method, i.e. an exception.  When
-    a close is due to an exception, the sender provides the class and
-    method id of the method which caused the exception.
-  </doc>
-      <rule implement="MUST">
-    After sending this method any received method except
-    Channel.Close-OK MUST be discarded.
-  </rule>
-      <rule implement="MAY">
-    The peer sending this method MAY use a counter or timeout to detect
-    failure of the other peer to respond correctly with Channel.Close-OK..
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="close-ok"/>
-      <field name="reply code" domain="reply code"/>
-      <field name="reply text" domain="reply text"/>
-      <field name="class id" domain="class id">
-    failing method class
-    <doc>
-      When the close is provoked by a method exception, this is the
-      class of the method.
-    </doc>
-      </field>
-      <field name="method id" domain="method id">
-    failing method ID
-    <doc>
-      When the close is provoked by a method exception, this is the
-      ID of the method.
-    </doc>
-      </field>
-    </method>
-    <method name="close-ok" synchronous="1" index="41">
-  confirm a channel close
-  <doc>
-    This method confirms a Channel.Close method and tells the recipient
-    that it is safe to release resources for the channel and close the
-    socket.
-  </doc>
-      <rule implement="SHOULD">
-    A peer that detects a socket closure without having received a
-    Channel.Close-Ok handshake method SHOULD log the error.
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-    </method>
-  </class>
-  <class name="access" handler="connection" index="30">
-    <!--
-======================================================
-==      ACCESS CONTROL
-======================================================
--->
-  work with access tickets
-<doc>
-  The protocol control access to server resources using access tickets.
-  A client must explicitly request access tickets before doing work.
-  An access ticket grants a client the right to use a specific set of
-  resources - called a "realm" - in specific ways.
-</doc>
-    <doc name="grammar">
-    access              = C:REQUEST S:REQUEST-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="MUST"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="request" synchronous="1" index="10">
-  request an access ticket
-  <doc>
-    This method requests an access ticket for an access realm.
-    The server responds by granting the access ticket.  If the
-    client does not have access rights to the requested realm
-    this causes a connection exception.  Access tickets are a
-    per-channel resource.
-  </doc>
-      <rule implement="MUST">
-    The realm name MUST start with either "/data" (for application
-    resources) or "/admin" (for server administration resources).
-    If the realm starts with any other path, the server MUST raise
-    a connection exception with reply code 403 (access refused).
-  </rule>
-      <rule implement="MUST">
-    The server MUST implement the /data realm and MAY implement the
-    /admin realm.  The mapping of resources to realms is not
-    defined in the protocol - this is a server-side configuration
-    issue.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="request-ok"/>
-      <field name="realm" domain="path">
-    name of requested realm
-    <rule implement="MUST">
-      If the specified realm is not known to the server, the server
-      must raise a channel exception with reply code 402 (invalid
-      path).
-    </rule>
-      </field>
-      <field name="exclusive" type="bit">
-    request exclusive access
-    <doc>
-      Request exclusive access to the realm. If the server cannot grant
-      this - because there are other active tickets for the realm - it
-      raises a channel exception.
-    </doc>
-      </field>
-      <field name="passive" type="bit">
-    request passive access
-    <doc>
-      Request message passive access to the specified access realm.
-      Passive access lets a client get information about resources in
-      the realm but not to make any changes to them.
-    </doc>
-      </field>
-      <field name="active" type="bit">
-    request active access
-    <doc>
-      Request message active access to the specified access realm.
-      Acvtive access lets a client get create and delete resources in
-      the realm.
-    </doc>
-      </field>
-      <field name="write" type="bit">
-    request write access
-    <doc>
-      Request write access to the specified access realm.  Write access
-      lets a client publish messages to all exchanges in the realm.
-    </doc>
-      </field>
-      <field name="read" type="bit">
-    request read access
-    <doc>
-      Request read access to the specified access realm.  Read access
-      lets a client consume messages from queues in the realm.
-    </doc>
-      </field>
-    </method>
-    <method name="request-ok" synchronous="1" index="11">
-  grant access to server resources
-  <doc>
-    This method provides the client with an access ticket. The access
-    ticket is valid within the current channel and for the lifespan of
-    the channel.
-  </doc>
-      <rule implement="MUST">
-    The client MUST NOT use access tickets except within the same
-    channel as originally granted.
-  </rule>
-      <rule implement="MUST">
-    The server MUST isolate access tickets per channel and treat an
-    attempt by a client to mix these as a connection exception.
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <field name="ticket" domain="access ticket"/>
-    </method>
-  </class>
-  <class name="exchange" handler="channel" index="40">
-    <!--
-======================================================
-==       EXCHANGES (or "routers", if you prefer)
-==       (Or matchers, plugins, extensions, agents,... Routing is just one of
-==        the many fun things an exchange can do.)
-======================================================
--->
-  work with exchanges
-<doc>
-  Exchanges match and distribute messages across queues.  Exchanges can be
-  configured in the server or created at runtime.
-</doc>
-    <doc name="grammar">
-    exchange            = C:DECLARE  S:DECLARE-OK
-                        / C:DELETE   S:DELETE-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="MUST"/>
-    <rule implement="MUST">
-      <test>amq_exchange_19</test>
-  The server MUST implement the direct and fanout exchange types, and
-  predeclare the corresponding exchanges named amq.direct and amq.fanout
-  in each virtual host. The server MUST also predeclare a direct
-  exchange to act as the default exchange for content Publish methods
-  and for default queue bindings.
-</rule>
-    <rule implement="SHOULD">
-      <test>amq_exchange_20</test>
-  The server SHOULD implement the topic exchange type, and predeclare
-  the corresponding exchange named amq.topic in each virtual host.
-</rule>
-    <rule implement="MAY">
-      <test>amq_exchange_21</test>
-  The server MAY implement the system exchange type, and predeclare the
-  corresponding exchanges named amq.system in each virtual host. If the
-  client attempts to bind a queue to the system exchange, the server
-  MUST raise a connection exception with reply code 507 (not allowed).
-</rule>
-    <rule implement="MUST">
-      <test>amq_exchange_22</test>
-  The default exchange MUST be defined as internal, and be inaccessible
-  to the client except by specifying an empty exchange name in a content
-  Publish method. That is, the server MUST NOT let clients make explicit
-  bindings to this exchange.
-</rule>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="declare" synchronous="1" index="10">
-  declare exchange, create if needed
-  <doc>
-    This method creates an exchange if it does not already exist, and if the
-    exchange exists, verifies that it is of the correct and expected class.
-  </doc>
-      <rule implement="SHOULD">
-        <test>amq_exchange_23</test>
-    The server SHOULD support a minimum of 16 exchanges per virtual host
-    and ideally, impose no limit except as defined by available resources.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="declare-ok"/>
-      <field name="ticket" domain="access ticket">
-        <doc>
-      When a client defines a new exchange, this belongs to the access realm
-      of the ticket used.  All further work done with that exchange must be
-      done with an access ticket for the same realm.
-    </doc>
-        <rule implement="MUST">
-      The client MUST provide a valid access ticket giving "active" access
-      to the realm in which the exchange exists or will be created, or
-      "passive" access if the if-exists flag is set.
-    </rule>
-      </field>
-      <field name="exchange" domain="exchange name">
-        <rule implement="MUST">
-          <test>amq_exchange_15</test>
-      Exchange names starting with "amq." are reserved for predeclared
-      and standardised exchanges.  If the client attempts to create an
-      exchange starting with "amq.", the server MUST raise a channel
-      exception with reply code 403 (access refused).
-    </rule>
-        <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
-      </field>
-      <field name="type" type="shortstr">
-    exchange type
-    <doc>
-      Each exchange belongs to one of a set of exchange types implemented
-      by the server.  The exchange types define the functionality of the
-      exchange - i.e. how messages are routed through it.  It is not valid
-      or meaningful to attempt to change the type of an existing exchange.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_exchange_16</test>
-      If the exchange already exists with a different type, the server
-      MUST raise a connection exception with a reply code 507 (not allowed).
-    </rule>
-        <rule implement="MUST">
-          <test>amq_exchange_18</test>
-      If the server does not support the requested exchange type it MUST
-      raise a connection exception with a reply code 503 (command invalid).
-    </rule>
-        <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
-      </field>
-      <field name="passive" type="bit">
-    do not create exchange
-    <doc>
-    If set, the server will not create the exchange.  The client can use
-    this to check whether an exchange exists without modifying the server
-    state.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_exchange_05</test>
-      If set, and the exchange does not already exist, the server MUST
-      raise a channel exception with reply code 404 (not found).
-    </rule>
-      </field>
-      <field name="durable" type="bit">
-    request a durable exchange
-    <doc>
-      If set when creating a new exchange, the exchange will be marked as
-      durable.  Durable exchanges remain active when a server restarts.
-      Non-durable exchanges (transient exchanges) are purged if/when a
-      server restarts.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_exchange_24</test>
-      The server MUST support both durable and transient exchanges.
-    </rule>
-        <rule implement="MUST">
-      The server MUST ignore the durable field if the exchange already
-      exists.
-    </rule>
-      </field>
-      <field name="auto delete" type="bit">
-    auto-delete when unused
-    <doc>
-      If set, the exchange is deleted when all queues have finished
-      using it.
-    </doc>
-        <rule implement="SHOULD">
-          <test>amq_exchange_02</test>
-      The server SHOULD allow for a reasonable delay between the point
-      when it determines that an exchange is not being used (or no longer
-      used), and the point when it deletes the exchange.  At the least it
-      must allow a client to create an exchange and then bind a queue to
-      it, with a small but non-zero delay between these two actions.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_exchange_25</test>
-      The server MUST ignore the auto-delete field if the exchange already
-      exists.
-    </rule>
-      </field>
-      <field name="internal" type="bit">
-    create internal exchange
-    <doc>
-      If set, the exchange may not be used directly by publishers, but
-      only when bound to other exchanges. Internal exchanges are used to
-      construct wiring that is not visible to applications.
-    </doc>
-      </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-
-      <field name="arguments" type="table">
-    arguments for declaration
-    <doc>
-      A set of arguments for the declaration. The syntax and semantics
-      of these arguments depends on the server implementation.  This
-      field is ignored if passive is 1.
-    </doc>
-      </field>
-    </method>
-    <method name="declare-ok" synchronous="1" index="11">
-  confirms an exchange declaration
-  <doc>
-    This method confirms a Declare method and confirms the name of the
-    exchange, essential for automatically-named exchanges.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="delete" synchronous="1" index="20">
-  delete an exchange
-  <doc>
-    This method deletes an exchange.  When an exchange is deleted all queue
-    bindings on the exchange are cancelled.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <response name="delete-ok"/>
-      <field name="ticket" domain="access ticket">
-        <rule implement="MUST">
-      The client MUST provide a valid access ticket giving "active"
-      access rights to the exchange's access realm.
-    </rule>
-      </field>
-      <field name="exchange" domain="exchange name">
-        <rule implement="MUST">
-          <test>amq_exchange_11</test>
-      The exchange MUST exist. Attempting to delete a non-existing exchange
-      causes a channel exception.
-    </rule>
-        <assert check="notnull"/>
-      </field>
-      <field name="if unused" type="bit">
-    delete only if unused
-    <doc>
-      If set, the server will only delete the exchange if it has no queue
-      bindings. If the exchange has queue bindings the server does not
-      delete it but raises a channel exception instead.
-    </doc>
-        <rule implement="SHOULD">
-          <test>amq_exchange_12</test>
-      If set, the server SHOULD delete the exchange but only if it has
-      no queue bindings.
-    </rule>
-        <rule implement="SHOULD">
-          <test>amq_exchange_13</test>
-      If set, the server SHOULD raise a channel exception if the exchange is in
-      use.
-    </rule>
-      </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-
-    </method>
-    <method name="delete-ok" synchronous="1" index="21">
-  confirm deletion of an exchange
-  <doc>
-    This method confirms the deletion of an exchange.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-  </class>
-  <class name="queue" handler="channel" index="50">
-    <!--
-======================================================
-==       QUEUES
-======================================================
--->
-  work with queues
-
-<doc>
-  Queues store and forward messages.  Queues can be configured in the server
-  or created at runtime.  Queues must be attached to at least one exchange
-  in order to receive messages from publishers.
-</doc>
-    <doc name="grammar">
-    queue               = C:DECLARE  S:DECLARE-OK
-                        / C:BIND     S:BIND-OK
-                        / C:PURGE    S:PURGE-OK
-                        / C:DELETE   S:DELETE-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="MUST"/>
-    <rule implement="MUST">
-      <test>amq_queue_33</test>
-  A server MUST allow any content class to be sent to any queue, in any
-  mix, and queue and delivery these content classes independently. Note
-  that all methods that fetch content off queues are specific to a given
-  content class.
-</rule>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="declare" synchronous="1" index="10">
-  declare queue, create if needed
-  <doc>
-    This method creates or checks a queue.  When creating a new queue
-    the client can specify various properties that control the durability
-    of the queue and its contents, and the level of sharing for the queue.
-  </doc>
-      <rule implement="MUST">
-        <test>amq_queue_34</test>
-    The server MUST create a default binding for a newly-created queue
-    to the default exchange, which is an exchange of type 'direct'.
-  </rule>
-      <rule implement="SHOULD">
-        <test>amq_queue_35</test>
-    The server SHOULD support a minimum of 256 queues per virtual host
-    and ideally, impose no limit except as defined by available resources.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="declare-ok"/>
-      <field name="ticket" domain="access ticket">
-        <doc>
-      When a client defines a new queue, this belongs to the access realm
-      of the ticket used.  All further work done with that queue must be
-      done with an access ticket for the same realm.
-    </doc>
-        <doc>
-      The client provides a valid access ticket giving "active" access
-      to the realm in which the queue exists or will be created, or
-      "passive" access if the if-exists flag is set.
-    </doc>
-      </field>
-      <field name="queue" domain="queue name">
-        <rule implement="MAY">
-          <test>amq_queue_10</test>
-      The queue name MAY be empty, in which case the server MUST create
-      a new queue with a unique generated name and return this to the
-      client in the Declare-Ok method.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_queue_32</test>
-      Queue names starting with "amq." are reserved for predeclared and
-      standardised server queues.  If the queue name starts with "amq."
-      and the passive option is zero, the server MUST raise a connection
-      exception with reply code 403 (access refused).
-    </rule>
-        <assert check="regexp" value="^[a-zA-Z0-9-_.:]*$"/>
-      </field>
-      <field name="passive" type="bit">
-    do not create queue
-    <doc>
-    If set, the server will not create the queue.  The client can use
-    this to check whether a queue exists without modifying the server
-    state.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_queue_05</test>
-      If set, and the queue does not already exist, the server MUST
-      respond with a reply code 404 (not found) and raise a channel
-      exception.
-    </rule>
-      </field>
-      <field name="durable" type="bit">
-    request a durable queue
-    <doc>
-      If set when creating a new queue, the queue will be marked as
-      durable.  Durable queues remain active when a server restarts.
-      Non-durable queues (transient queues) are purged if/when a
-      server restarts.  Note that durable queues do not necessarily
-      hold persistent messages, although it does not make sense to
-      send persistent messages to a transient queue.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_queue_03</test>
-      The server MUST recreate the durable queue after a restart.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_queue_36</test>
-      The server MUST support both durable and transient queues.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_queue_37</test>
-      The server MUST ignore the durable field if the queue already
-      exists.
-    </rule>
-      </field>
-      <field name="exclusive" type="bit">
-    request an exclusive queue
-    <doc>
-      Exclusive queues may only be consumed from by the current connection.
-      Setting the 'exclusive' flag always implies 'auto-delete'.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_queue_38</test>
-      The server MUST support both exclusive (private) and non-exclusive
-      (shared) queues.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_queue_04</test>
-      The server MUST raise a channel exception if 'exclusive' is specified
-      and the queue already exists and is owned by a different connection.
-    </rule>
-      </field>
-      <field name="auto delete" type="bit">
-    auto-delete queue when unused
-    <doc>
-      If set, the queue is deleted when all consumers have finished
-      using it. Last consumer can be cancelled either explicitly or because
-      its channel is closed. If there was no consumer ever on the queue, it
-      won't be deleted.
-    </doc>
-        <rule implement="SHOULD">
-          <test>amq_queue_02</test>
-      The server SHOULD allow for a reasonable delay between the point
-      when it determines that a queue is not being used (or no longer
-      used), and the point when it deletes the queue.  At the least it
-      must allow a client to create a queue and then create a consumer
-      to read from it, with a small but non-zero delay between these
-      two actions.  The server should equally allow for clients that may
-      be disconnected prematurely, and wish to re-consume from the same
-      queue without losing messages.  We would recommend a configurable
-      timeout, with a suitable default value being one minute.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_queue_31</test>
-      The server MUST ignore the auto-delete field if the queue already
-      exists.
-    </rule>
-      </field>
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-
-      <field name="arguments" type="table">
-    arguments for declaration
-    <doc>
-      A set of arguments for the declaration. The syntax and semantics
-      of these arguments depends on the server implementation.  This
-      field is ignored if passive is 1.
-    </doc>
-      </field>
-    </method>
-    <method name="declare-ok" synchronous="1" index="11">
-  confirms a queue definition
-  <doc>
-    This method confirms a Declare method and confirms the name of the
-    queue, essential for automatically-named queues.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <field name="queue" domain="queue name">
-        <doc>
-      Reports the name of the queue. If the server generated a queue
-      name, this field contains that name.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-      <field name="message count" type="long">
-    number of messages in queue
-    <doc>
-      Reports the number of messages in the queue, which will be zero
-      for newly-created queues.
-    </doc>
-      </field>
-      <field name="consumer count" type="long">
-    number of consumers
-    <doc>
-      Reports the number of active consumers for the queue. Note that
-      consumers can suspend activity (Channel.Flow) in which case they
-      do not appear in this count.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="bind" synchronous="1" index="20">
-  bind queue to an exchange
-  <doc>
-    This method binds a queue to an exchange.  Until a queue is
-    bound it will not receive any messages.  In a classic messaging
-    model, store-and-forward queues are bound to a dest exchange
-    and subscription queues are bound to a dest_wild exchange.
-  </doc>
-      <rule implement="MUST">
-        <test>amq_queue_25</test>
-    A server MUST allow ignore duplicate bindings - that is, two or
-    more bind methods for a specific queue, with identical arguments
-    - without treating these as an error.
-  </rule>
-      <rule implement="MUST">
-        <test>amq_queue_39</test>
-    If a bind fails, the server MUST raise a connection exception.
-  </rule>
-      <rule implement="MUST">
-        <test>amq_queue_12</test>
-    The server MUST NOT allow a durable queue to bind to a transient
-    exchange. If the client attempts this the server MUST raise a
-    channel exception.
-  </rule>
-      <rule implement="SHOULD">
-        <test>amq_queue_13</test>
-    Bindings for durable queues are automatically durable and the
-    server SHOULD restore such bindings after a server restart.
-  </rule>
-      <rule implement="MUST">
-        <test>amq_queue_17</test>
-    If the client attempts to an exchange that was declared as internal,
-    the server MUST raise a connection exception with reply code 530
-    (not allowed).
-  </rule>
-      <rule implement="SHOULD">
-        <test>amq_queue_40</test>
-    The server SHOULD support at least 4 bindings per queue, and
-    ideally, impose no limit except as defined by available resources.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="bind-ok"/>
-      <field name="ticket" domain="access ticket">
-        <doc>
-      The client provides a valid access ticket giving "active"
-      access rights to the queue's access realm.
-    </doc>
-      </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to bind.  If the queue name is
-      empty, refers to the current queue for the channel, which is
-      the last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue
-      name in this method is empty, the server MUST raise a connection
-      exception with reply code 530 (not allowed).
-    </doc>
-    <doc name = "rule" test = "amq_queue_26">
-      If the queue does not exist the server MUST raise a channel exception
-      with reply code 404 (not found).
-    </doc>
-  </field>
-
-  <field name="exchange" domain="exchange name">
-          The name of the exchange to bind to.
-          <rule implement="MUST">
-          <test>amq_queue_14</test>
-      If the exchange does not exist the server MUST raise a channel
-      exception with reply code 404 (not found).
-    </rule>
-      </field>
-      <field name="routing key" type="shortstr">
-     message routing key
-    <doc>
-      Specifies the routing key for the binding.  The routing key is
-      used for routing messages depending on the exchange configuration.
-      Not all exchanges use a routing key - refer to the specific
-      exchange documentation.  If the routing key is empty and the queue
-      name is empty, the routing key will be the current queue for the
-      channel, which is the last declared queue.
-    </doc>
-  </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-
-  <field name="arguments" type="table">
-    arguments for binding
-    <doc>
-      A set of arguments for the binding.  The syntax and semantics of
-      these arguments depends on the exchange class.
-    </doc>
-      </field>
-    </method>
-    <method name="bind-ok" synchronous="1" index="21">
-  confirm bind successful
-  <doc>
-    This method confirms that the bind was successful.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-
-    <!-- Unofficial additions to the 0-8 protocol, lifted from the 0-9
-         protocol specification: queue.unbind, queue.unbind-ok -->
-
-    <method name = "unbind" synchronous = "1" index = "50" label = "unbind a queue from an exchange">
-      <doc>This method unbinds a queue from an exchange.</doc>
-      <rule name = "01">
-        <doc>If a unbind fails, the server MUST raise a connection exception.</doc>
-      </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="unbind-ok"/>
-
-      <field name = "ticket" domain = "access ticket">
-        <doc>
-          The client provides a valid access ticket giving "active"
-          access rights to the queue's access realm.
-        </doc>
-      </field>
-
-      <field name = "queue" domain = "queue name">
-        <doc>Specifies the name of the queue to unbind.</doc>
-        <rule name = "02">
-          <doc>
-            If the queue does not exist the server MUST raise a channel exception
-            with reply code 404 (not found).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "exchange" domain = "exchange name">
-        <doc>The name of the exchange to unbind from.</doc>
-        <rule name = "03">
-          <doc>
-            If the exchange does not exist the server MUST raise a channel
-            exception with reply code 404 (not found).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "routing key" domain = "shortstr" label = "routing key of binding">
-        <doc>Specifies the routing key of the binding to unbind.</doc>
-      </field>
-
-      <field name = "arguments" domain = "table" label = "arguments of binding">
-        <doc>Specifies the arguments of the binding to unbind.</doc>
-      </field>
-    </method>
-
-    <method name = "unbind-ok" synchronous = "1" index = "51" label = "confirm unbind successful">
-      <doc>This method confirms that the unbind was successful.</doc>
-      <chassis name = "client" implement = "MUST"/>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="purge" synchronous="1" index="30">
-  purge a queue
-  <doc>
-    This method removes all messages from a queue.  It does not cancel
-    consumers.  Purged messages are deleted without any formal "undo"
-    mechanism.
-  </doc>
-      <rule implement="MUST">
-        <test>amq_queue_15</test>
-    A call to purge MUST result in an empty queue.
-  </rule>
-      <rule implement="MUST">
-        <test>amq_queue_41</test>
-    On transacted channels the server MUST not purge messages that have
-    already been sent to a client but not yet acknowledged.
-  </rule>
-      <rule implement="MAY">
-        <test>amq_queue_42</test>
-    The server MAY implement a purge queue or log that allows system
-    administrators to recover accidentally-purged messages.  The server
-    SHOULD NOT keep purged messages in the same storage spaces as the
-    live messages since the volumes of purged messages may get very
-    large.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="purge-ok"/>
-      <field name="ticket" domain="access ticket">
-        <doc>
-      The access ticket must be for the access realm that holds the
-      queue.
-    </doc>
-        <rule implement="MUST">
-      The client MUST provide a valid access ticket giving "read" access
-      rights to the queue's access realm.  Note that purging a queue is
-      equivalent to reading all messages and discarding them.
-    </rule>
-      </field>
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to purge.  If the queue name is
-      empty, refers to the current queue for the channel, which is
-      the last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue
-      name in this method is empty, the server MUST raise a connection
-      exception with reply code 530 (not allowed).
-    </doc>
-    <doc name = "rule" test = "amq_queue_16">
-      The queue must exist. Attempting to purge a non-existing queue
-      causes a channel exception.
-    </doc>
-  </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-    </method>
-    <method name="purge-ok" synchronous="1" index="31">
-  confirms a queue purge
-  <doc>
-    This method confirms the purge of a queue.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <field name="message count" type="long">
-    number of messages purged
-    <doc>
-      Reports the number of messages purged.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="delete" synchronous="1" index="40">
-  delete a queue
-  <doc>
-    This method deletes a queue.  When a queue is deleted any pending
-    messages are sent to a dead-letter queue if this is defined in the
-    server configuration, and all consumers on the queue are cancelled.
-  </doc>
-      <rule implement="SHOULD">
-        <test>amq_queue_43</test>
-    The server SHOULD use a dead-letter queue to hold messages that
-    were pending on a deleted queue, and MAY provide facilities for
-    a system administrator to move these messages back to an active
-    queue.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="delete-ok"/>
-      <field name="ticket" domain="access ticket">
-        <doc>
-      The client provides a valid access ticket giving "active"
-      access rights to the queue's access realm.
-    </doc>
-      </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to delete. If the queue name is
-      empty, refers to the current queue for the channel, which is the
-      last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue
-      name in this method is empty, the server MUST raise a connection
-      exception with reply code 530 (not allowed).
-    </doc>
-    <doc name = "rule" test = "amq_queue_21">
-      The queue must exist. Attempting to delete a non-existing queue
-      causes a channel exception.
-    </doc>
-  </field>
-
-      <field name="if unused" type="bit">
-    delete only if unused
-    <doc>
-      If set, the server will only delete the queue if it has no
-      consumers. If the queue has consumers the server does does not
-      delete it but raises a channel exception instead.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_queue_29</test>
-          <test>amq_queue_30</test>
-      The server MUST respect the if-unused flag when deleting a queue.
-    </rule>
-      </field>
-      <field name="if empty" type="bit">
-    delete only if empty
-       <test>amq_queue_27</test>
-        <doc>
-      If set, the server will only delete the queue if it has no
-      messages. If the queue is not empty the server raises a channel
-      exception.
-    </doc>
-      </field>
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-    </method>
-
-    <method name="delete-ok" synchronous="1" index="41">
-  confirm deletion of a queue
-  <doc>
-    This method confirms the deletion of a queue.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <field name="message count" type="long">
-    number of messages purged
-    <doc>
-      Reports the number of messages purged.
-    </doc>
-      </field>
-    </method>
-  </class>
-  <class name="basic" handler="channel" index="60">
-    <!--
-======================================================
-==       BASIC MIDDLEWARE
-======================================================
--->
-  work with basic content
-<doc>
-  The Basic class provides methods that support an industry-standard
-  messaging model.
-</doc>
-
-<doc name = "grammar">
-    basic               = C:QOS S:QOS-OK
-                        / C:CONSUME S:CONSUME-OK
-                        / C:CANCEL S:CANCEL-OK
-                        / C:PUBLISH content
-                        / S:RETURN content
-                        / S:DELIVER content
-                        / C:GET ( S:GET-OK content / S:GET-EMPTY )
-                        / C:ACK
-                        / C:REJECT
-</doc>
-
-<chassis name = "server" implement = "MUST" />
-<chassis name = "client" implement = "MAY"  />
-
-<doc name = "rule" test = "amq_basic_08">
-  The server SHOULD respect the persistent property of basic messages
-  and SHOULD make a best-effort to hold persistent basic messages on a
-  reliable storage mechanism.
-</doc>
-<doc name = "rule" test = "amq_basic_09">
-  The server MUST NOT discard a persistent basic message in case of a
-  queue overflow. The server MAY use the Channel.Flow method to slow
-  or stop a basic message publisher when necessary.
-</doc>
-<doc name = "rule" test = "amq_basic_10">
-  The server MAY overflow non-persistent basic messages to persistent
-  storage and MAY discard or dead-letter non-persistent basic messages
-  on a priority basis if the queue size exceeds some configured limit.
-</doc>
-<doc name = "rule" test = "amq_basic_11">
-  The server MUST implement at least 2 priority levels for basic
-  messages, where priorities 0-4 and 5-9 are treated as two distinct
-  levels. The server MAY implement up to 10 priority levels.
-</doc>
-<doc name = "rule" test = "amq_basic_12">
-  The server MUST deliver messages of the same priority in order
-  irrespective of their individual persistence.
-</doc>
-<doc name = "rule" test = "amq_basic_13">
-  The server MUST support both automatic and explicit acknowledgements
-  on Basic content.
-</doc>
-
-<!--  These are the properties for a Basic content  -->
-
-<field name = "content type" type = "shortstr">
-    MIME content type
-</field>
-<field name = "content encoding" type = "shortstr">
-    MIME content encoding
-</field>
-<field name = "headers" type = "table">
-    Message header field table
-</field>
-<field name = "delivery mode" type = "octet">
-    Non-persistent (1) or persistent (2)
-</field>
-<field name = "priority" type = "octet">
-    The message priority, 0 to 9
-</field>
-<field name = "correlation id" type = "shortstr">
-    The application correlation identifier
-</field>
-<field name = "reply to" type = "shortstr">
-    The destination to reply to
-</field>
-<field name = "expiration" type = "shortstr">
-    Message expiration specification
-</field>
-<field name = "message id" type = "shortstr">
-    The application message identifier
-</field>
-<field name = "timestamp" type = "timestamp">
-    The message timestamp
-</field>
-<field name = "type" type = "shortstr">
-    The message type name
-</field>
-<field name = "user id" type = "shortstr">
-    The creating user id
-</field>
-<field name = "app id" type = "shortstr">
-    The creating application id
-</field>
-<field name = "cluster id" type = "shortstr">
-    Intra-cluster routing identifier
-</field>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "qos" synchronous = "1" index = "10">
-  specify quality of service
-  <doc>
-    This method requests a specific quality of service.  The QoS can
-    be specified for the current channel or for all channels on the
-    connection.  The particular properties and semantics of a qos method
-    always depend on the content class semantics.  Though the qos method
-    could in principle apply to both peers, it is currently meaningful
-    only for the server.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "qos-ok" />
-
-  <field name = "prefetch size" type = "long">
-    prefetch window in octets
-    <doc>
-      The client can request that messages be sent in advance so that
-      when the client finishes processing a message, the following
-      message is already held locally, rather than needing to be sent
-      down the channel.  Prefetching gives a performance improvement.
-      This field specifies the prefetch window size in octets.  The
-      server will send a message in advance if it is equal to or
-      smaller in size than the available prefetch size (and also falls
-      into other prefetch limits). May be set to zero, meaning "no
-      specific limit", although other prefetch limits may still apply.
-      The prefetch-size is ignored if the no-ack option is set.
-    </doc>
-    <doc name = "rule" test = "amq_basic_17">
-      The server MUST ignore this setting when the client is not
-      processing any messages - i.e. the prefetch size does not limit
-      the transfer of single messages to a client, only the sending in
-      advance of more messages while the client still has one or more
-      unacknowledged messages.
-   </doc>
-  </field>
-
-  <field name = "prefetch count" type = "short">
-    prefetch window in messages
-    <doc>
-      Specifies a prefetch window in terms of whole messages.  This
-      field may be used in combination with the prefetch-size field;
-      a message will only be sent in advance if both prefetch windows
-      (and those at the channel and connection level) allow it.
-      The prefetch-count is ignored if the no-ack option is set.
-    </doc>
-    <doc name = "rule" test = "amq_basic_18">
-      The server MAY send less data in advance than allowed by the
-      client's specified prefetch windows but it MUST NOT send more.
-    </doc>
-  </field>
-
-  <field name = "global" type = "bit">
-    apply to entire connection
-    <doc>
-      By default the QoS settings apply to the current channel only.  If
-      this field is set, they are applied to the entire connection.
-    </doc>
-  </field>
-</method>
-
-<method name = "qos-ok" synchronous = "1" index = "11">
-  confirm the requested qos
-  <doc>
-    This method tells the client that the requested QoS levels could
-    be handled by the server.  The requested QoS applies to all active
-    consumers until a new QoS is defined.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "consume" synchronous = "1" index = "20">
-  start a queue consumer
-  <doc>
-    This method asks the server to start a "consumer", which is a
-    transient request for messages from a specific queue. Consumers
-    last as long as the channel they were created on, or until the
-    client cancels them.
-  </doc>
-  <doc name = "rule" test = "amq_basic_01">
-    The server SHOULD support at least 16 consumers per queue, unless
-    the queue was declared as private, and ideally, impose no limit
-    except as defined by available resources.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "consume-ok" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "read" access
-      rights to the realm for the queue.
-    </doc>
-  </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to consume from.  If the queue name
-      is null, refers to the current queue for the channel, which is the
-      last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue name
-      in this method is empty, the server MUST raise a connection exception
-      with reply code 530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Specifies the identifier for the consumer. The consumer tag is
-      local to a connection, so two clients can use the same consumer
-      tags. If this field is empty the server will generate a unique
-      tag.
-    </doc>
-    <doc name = "rule" test = "todo">
-      The tag MUST NOT refer to an existing consumer. If the client
-      attempts to create two consumers with the same non-empty tag
-      the server MUST raise a connection exception with reply code
-      530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "no local" domain = "no local" />
-
-  <field name = "no ack" domain = "no ack" />
-
-  <field name = "exclusive" type = "bit">
-    request exclusive access
-    <doc>
-      Request exclusive consumer access, meaning only this consumer can
-      access the queue.
-    </doc>
-    <doc name = "rule" test = "amq_basic_02">
-      If the server cannot grant exclusive access to the queue when asked,
-      - because there are other consumers active - it MUST raise a channel
-      exception with return code 403 (access refused).
-    </doc>
-  </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-<method name = "consume-ok" synchronous = "1" index = "21">
-  confirm a new consumer
-  <doc>
-    The server provides the client with a consumer tag, which is used
-    by the client for methods called on the consumer at a later stage.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Holds the consumer tag specified by the client or provided by
-      the server.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "cancel" synchronous = "1" index = "30">
-  end a queue consumer
-  <doc test = "amq_basic_04">
-    This method cancels a consumer. This does not affect already
-    delivered messages, but it does mean the server will not send any
-    more messages for that consumer.  The client may receive an
-    abitrary number of messages in between sending the cancel method
-    and receiving the cancel-ok reply.
-  </doc>
-  <doc name = "rule" test = "todo">
-    If the queue no longer exists when the client sends a cancel command,
-    or the consumer has been cancelled for other reasons, this command
-    has no effect.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "cancel-ok" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-<method name = "cancel-ok" synchronous = "1" index = "31">
-  confirm a cancelled consumer
-  <doc>
-    This method confirms that the cancellation was completed.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "publish" content = "1" index = "40">
-  publish a message
-  <doc>
-    This method publishes a message to a specific exchange. The message
-    will be routed to queues as defined by the exchange configuration
-    and distributed to any active consumers when the transaction, if any,
-    is committed.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "write"
-      access rights to the access realm for the exchange.
-    </doc>
-  </field>
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange to publish to.  The exchange
-      name can be empty, meaning the default exchange.  If the exchange
-      name is specified, and that exchange does not exist, the server
-      will raise a channel exception.
-    </doc>
-    <doc name = "rule" test = "amq_basic_06">
-      The server MUST accept a blank exchange name to mean the default
-      exchange.
-    </doc>
-    <doc name = "rule" test = "amq_basic_14">
-      If the exchange was declared as an internal exchange, the server
-      MUST raise a channel exception with a reply code 403 (access
-      refused).
-    </doc>
-    <doc name = "rule" test = "amq_basic_15">
-      The exchange MAY refuse basic content in which case it MUST raise
-      a channel exception with reply code 540 (not implemented).
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key for the message.  The routing key is
-      used for routing messages depending on the exchange configuration.
-    </doc>
-  </field>
-
-  <field name = "mandatory" type = "bit">
-    indicate mandatory routing
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue.  If this flag is set, the server will return an
-      unroutable message with a Return method.  If this flag is zero, the
-      server silently drops the message.
-    </doc>
-    <doc name = "rule" test = "amq_basic_07">
-      The server SHOULD implement the mandatory flag.
-    </doc>
-  </field>
-
-  <field name = "immediate" type = "bit">
-    request immediate delivery
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue consumer immediately.  If this flag is set, the
-      server will return an undeliverable message with a Return method.
-      If this flag is zero, the server will queue the message, but with
-      no guarantee that it will ever be consumed.
-    </doc>
-    <doc name = "rule" test = "amq_basic_16">
-      The server SHOULD implement the immediate flag.
-    </doc>
-  </field>
-</method>
-
-<method name = "return" content = "1" index = "50">
-  return a failed message
-  <doc>
-    This method returns an undeliverable message that was published
-    with the "immediate" flag set, or an unroutable message published
-    with the "mandatory" flag set. The reply code and text provide
-    information about the reason that the message was undeliverable.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "reply code" domain = "reply code" />
-  <field name = "reply text" domain = "reply text" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was
-      originally published to.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "deliver" content = "1" index = "60">
-  notify the client of a consumer message
-  <doc>
-    This method delivers a message to the client, via a consumer.  In
-    the asynchronous message delivery model, the client starts a
-    consumer using the Consume method, then the server responds with
-    Deliver methods as and when messages arrive for that consumer.
-  </doc>
-  <doc name = "rule" test = "amq_basic_19">
-    The server SHOULD track the number of times a message has been
-    delivered to clients and when a message is redelivered a certain
-    number of times - e.g. 5 times - without being acknowledged, the
-    server SHOULD consider the message to be unprocessable (possibly
-    causing client applications to abort), and move the message to a
-    dead letter queue.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "redelivered" domain = "redelivered" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was
-      originally published to.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "get" synchronous = "1" index = "70">
-  direct access to a queue
-  <doc>
-    This method provides a direct access to the messages in a queue
-    using a synchronous dialogue that is designed for specific types of
-    application where synchronous functionality is more important than
-    performance.
-  </doc>
-  <response name = "get-ok" />
-  <response name = "get-empty" />
-  <chassis name = "server" implement = "MUST" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "read"
-      access rights to the realm for the queue.
-    </doc>
-  </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to consume from.  If the queue name
-      is null, refers to the current queue for the channel, which is the
-      last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue name
-      in this method is empty, the server MUST raise a connection exception
-      with reply code 530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "no ack" domain = "no ack" />
-</method>
-
-<method name = "get-ok" synchronous = "1" content = "1" index = "71">
-  provide client with a message
-  <doc>
-    This method delivers a message to the client following a get
-    method.  A message delivered by 'get-ok' must be acknowledged
-    unless the no-ack option was set in the get method.
-  </doc>
-  <chassis name = "client" implement = "MAY" />
-
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "redelivered"  domain = "redelivered"  />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was originally
-      published to.  If empty, the message was published to the default
-      exchange.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>
-  </field>
-
-  <field name = "message count" type = "long" >
-    number of messages pending
-    <doc>
-      This field reports the number of messages pending on the queue,
-      excluding the message being delivered.  Note that this figure is
-      indicative, not reliable, and can change arbitrarily as messages
-      are added to the queue and removed by other clients.
-    </doc>
-  </field>
-</method>
-
-
-<method name = "get-empty" synchronous = "1" index = "72">
-  indicate no messages available
-  <doc>
-    This method tells the client that the queue has no messages
-    available for the client.
-  </doc>
-  <chassis name = "client" implement = "MAY" />
-
-  <field name = "cluster id" type = "shortstr">
-     Cluster id
-    <doc>
-      For use by cluster applications, should not be used by
-      client applications.
-    </doc>
-  </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "ack" index = "80">
-  acknowledge one or more messages
-  <doc>
-    This method acknowledges one or more messages delivered via the
-    Deliver or Get-Ok methods.  The client can ask to confirm a
-    single message or a set of messages up to and including a specific
-    message.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "multiple" type = "bit">
-    acknowledge multiple messages
-    <doc>
-      If set to 1, the delivery tag is treated as "up to and including",
-      so that the client can acknowledge multiple messages with a single
-      method.  If set to zero, the delivery tag refers to a single
-      message.  If the multiple field is 1, and the delivery tag is zero,
-      tells the server to acknowledge all outstanding mesages.
-    </doc>
-    <doc name = "rule" test = "amq_basic_20">
-      The server MUST validate that a non-zero delivery-tag refers to an
-      delivered message, and raise a channel exception if this is not the
-      case.
-    </doc>
-  </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "reject" index = "90">
-  reject an incoming message
-  <doc>
-    This method allows a client to reject a message.  It can be used to
-    interrupt and cancel large incoming messages, or return untreatable
-    messages to their original queue.
-  </doc>
-  <doc name = "rule" test = "amq_basic_21">
-    The server SHOULD be capable of accepting and process the Reject
-    method while sending message content with a Deliver or Get-Ok
-    method.  I.e. the server should read and process incoming methods
-    while sending output frames.  To cancel a partially-send content,
-    the server sends a content body frame of size 1 (i.e. with no data
-    except the frame-end octet).
-  </doc>
-  <doc name = "rule" test = "amq_basic_22">
-    The server SHOULD interpret this method as meaning that the client
-    is unable to process the message at this time.
-  </doc>
-  <doc name = "rule">
-    A client MUST NOT use this method as a means of selecting messages
-    to process.  A rejected message MAY be discarded or dead-lettered,
-    not necessarily passed to another client.
-  </doc>      
-  <chassis name = "server" implement = "MUST" />
-    
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "requeue" type = "bit">
-    requeue the message
-    <doc>
-      If this field is zero, the message will be discarded.  If this bit
-      is 1, the server will attempt to requeue the message.
-    </doc>
-    <doc name = "rule" test = "amq_basic_23">
-      The server MUST NOT deliver the message to the same client within
-      the context of the current channel.  The recommended strategy is
-      to attempt to deliver the message to an alternative consumer, and
-      if that is not possible, to move the message to a dead-letter
-      queue.  The server MAY use more sophisticated tracking to hold
-      the message on the queue and redeliver it to the same client at
-      a later stage.
-    </doc>
-  </field>
-</method>
-
-<method name = "recover" index = "100">
-  redeliver unacknowledged messages. This method is only allowed on non-transacted channels.
-  <doc>
-    This method asks the broker to redeliver all unacknowledged messages on a
-    specifieid channel. Zero or more messages may be redelivered.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-
-  <field name = "requeue" type = "bit">
-    requeue the message
-    <doc>
-      If this field is zero, the message will be redelivered to the original recipient.  If this bit
-      is 1, the server will attempt to requeue the message, potentially then delivering it to an
-      alternative subscriber.
-    </doc>
-  </field>
-
-    <doc name="rule">
-      The server MUST set the redelivered flag on all messages that are resent.
-    </doc>
-    <doc name="rule">
-    The server MUST raise a channel exception if this is called on a transacted channel.
-    </doc>
-</method>
-
-
-</class>
-
-
-  <class name="file" handler="channel" index="70">
-    <!--
-======================================================
-==      FILE TRANSFER
-======================================================
--->
-  work with file content
-<doc>
-  The file class provides methods that support reliable file transfer.
-  File messages have a specific set of properties that are required for
-  interoperability with file transfer applications. File messages and
-  acknowledgements are subject to channel transactions.  Note that the
-  file class does not provide message browsing methods; these are not
-  compatible with the staging model.  Applications that need browsable
-  file transfer should use Basic content and the Basic class.
-</doc>
-
-<doc name = "grammar">
-    file                = C:QOS S:QOS-OK
-                        / C:CONSUME S:CONSUME-OK
-                        / C:CANCEL S:CANCEL-OK
-                        / C:OPEN S:OPEN-OK C:STAGE content
-                        / S:OPEN C:OPEN-OK S:STAGE content
-                        / C:PUBLISH
-                        / S:DELIVER
-                        / S:RETURN
-                        / C:ACK
-                        / C:REJECT
-</doc>
-
-<chassis name = "server" implement = "MAY" />
-<chassis name = "client" implement = "MAY" />
-
-<doc name = "rule">
-  The server MUST make a best-effort to hold file messages on a
-  reliable storage mechanism.
-</doc>
-<doc name = "rule">
-  The server MUST NOT discard a file message in case of a queue
-  overflow. The server MUST use the Channel.Flow method to slow or stop
-  a file message publisher when necessary.
-</doc>
-<doc name = "rule">
-  The server MUST implement at least 2 priority levels for file
-  messages, where priorities 0-4 and 5-9 are treated as two distinct
-  levels. The server MAY implement up to 10 priority levels.
-</doc>
-<doc name = "rule">
-  The server MUST support both automatic and explicit acknowledgements
-  on file content.
-</doc>
-
-<!--  These are the properties for a File content  -->
-
-<field name = "content type" type = "shortstr">
-    MIME content type
-</field>
-<field name = "content encoding" type = "shortstr">
-    MIME content encoding
-</field>
-<field name = "headers" type = "table">
-    Message header field table
-</field>
-<field name = "priority" type = "octet">
-    The message priority, 0 to 9
-</field>
-<field name = "reply to" type = "shortstr">
-    The destination to reply to
-</field>
-<field name = "message id" type = "shortstr">
-    The application message identifier
-</field>
-<field name = "filename" type = "shortstr">
-    The message filename
-</field>
-<field name = "timestamp" type = "timestamp">
-    The message timestamp
-</field>
-<field name = "cluster id" type = "shortstr">
-    Intra-cluster routing identifier
-</field>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "qos" synchronous = "1" index = "10">
-  specify quality of service
-  <doc>
-    This method requests a specific quality of service.  The QoS can
-    be specified for the current channel or for all channels on the
-    connection.  The particular properties and semantics of a qos method
-    always depend on the content class semantics.  Though the qos method
-    could in principle apply to both peers, it is currently meaningful
-    only for the server.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "qos-ok" />
-
-  <field name = "prefetch size" type = "long">
-    prefetch window in octets
-    <doc>
-      The client can request that messages be sent in advance so that
-      when the client finishes processing a message, the following
-      message is already held locally, rather than needing to be sent
-      down the channel.  Prefetching gives a performance improvement.
-      This field specifies the prefetch window size in octets. May be
-      set to zero, meaning "no specific limit".  Note that other
-      prefetch limits may still apply. The prefetch-size is ignored
-      if the no-ack option is set.
-    </doc>
-  </field>
-
-  <field name = "prefetch count" type = "short">
-    prefetch window in messages
-    <doc>
-      Specifies a prefetch window in terms of whole messages.  This
-      is compatible with some file API implementations.  This field
-      may be used in combination with the prefetch-size field; a
-      message will only be sent in advance if both prefetch windows
-      (and those at the channel and connection level) allow it.
-      The prefetch-count is ignored if the no-ack option is set.
-    </doc>
-    <doc name = "rule">
-      The server MAY send less data in advance than allowed by the
-      client's specified prefetch windows but it MUST NOT send more.
-    </doc>
-  </field>
-
-  <field name = "global" type = "bit">
-    apply to entire connection
-    <doc>
-      By default the QoS settings apply to the current channel only.  If
-      this field is set, they are applied to the entire connection.
-    </doc>
-  </field>
-</method>
-
-<method name = "qos-ok" synchronous = "1" index = "11">
-  confirm the requested qos
-  <doc>
-    This method tells the client that the requested QoS levels could
-    be handled by the server.  The requested QoS applies to all active
-    consumers until a new QoS is defined.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "consume" synchronous = "1" index = "20">
-  start a queue consumer
-  <doc>
-    This method asks the server to start a "consumer", which is a
-    transient request for messages from a specific queue. Consumers
-    last as long as the channel they were created on, or until the
-    client cancels them.
-  </doc>
-  <doc name = "rule">
-    The server SHOULD support at least 16 consumers per queue, unless
-    the queue was declared as private, and ideally, impose no limit
-    except as defined by available resources.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "consume-ok" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "read" access
-      rights to the realm for the queue.
-    </doc>
-  </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to consume from.  If the queue name
-      is null, refers to the current queue for the channel, which is the
-      last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue name
-      in this method is empty, the server MUST raise a connection exception
-      with reply code 530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Specifies the identifier for the consumer. The consumer tag is
-      local to a connection, so two clients can use the same consumer
-      tags. If this field is empty the server will generate a unique
-      tag.
-    </doc>
-    <doc name = "rule" test = "todo">
-      The tag MUST NOT refer to an existing consumer. If the client
-      attempts to create two consumers with the same non-empty tag
-      the server MUST raise a connection exception with reply code
-      530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "no local" domain = "no local" />
-
-  <field name = "no ack" domain = "no ack" />
-
-  <field name = "exclusive" type = "bit">
-    request exclusive access
-    <doc>
-      Request exclusive consumer access, meaning only this consumer can
-      access the queue.
-    </doc>
-    <doc name = "rule" test = "amq_file_00">
-      If the server cannot grant exclusive access to the queue when asked,
-      - because there are other consumers active - it MUST raise a channel
-      exception with return code 405 (resource locked).
-    </doc>
-  </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-<method name = "consume-ok" synchronous = "1" index = "21">
-  confirm a new consumer
-  <doc>
-    This method provides the client with a consumer tag which it MUST
-    use in methods that work with the consumer.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Holds the consumer tag specified by the client or provided by
-      the server.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "cancel" synchronous = "1" index = "30">
-  end a queue consumer
-  <doc>
-    This method cancels a consumer. This does not affect already
-    delivered messages, but it does mean the server will not send any
-    more messages for that consumer.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "cancel-ok" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-<method name = "cancel-ok" synchronous = "1" index = "31">
-  confirm a cancelled consumer
-  <doc>
-    This method confirms that the cancellation was completed.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "open" synchronous = "1" index = "40">
-  request to start staging
-  <doc>
-    This method requests permission to start staging a message.  Staging
-    means sending the message into a temporary area at the recipient end
-    and then delivering the message by referring to this temporary area.
-    Staging is how the protocol handles partial file transfers - if a
-    message is partially staged and the connection breaks, the next time
-    the sender starts to stage it, it can restart from where it left off.
-  </doc>
-  <response name = "open-ok" />
-  <chassis name = "server" implement = "MUST" />
-  <chassis name = "client" implement = "MUST" />
-  
-  <field name = "identifier" type = "shortstr">
-    staging identifier
-    <doc>
-      This is the staging identifier. This is an arbitrary string chosen
-      by the sender.  For staging to work correctly the sender must use
-      the same staging identifier when staging the same message a second
-      time after recovery from a failure.  A good choice for the staging
-      identifier would be the SHA1 hash of the message properties data
-      (including the original filename, revised time, etc.).
-    </doc>
-  </field>
-
-  <field name = "content size" type = "longlong">
-    message content size
-    <doc>
-      The size of the content in octets.  The recipient may use this
-      information to allocate or check available space in advance, to
-      avoid "disk full" errors during staging of very large messages.
-    </doc>
-    <doc name = "rule">
-      The sender MUST accurately fill the content-size field.
-      Zero-length content is permitted.
-    </doc>
-  </field>
-</method>
-
-<method name = "open-ok" synchronous = "1" index = "41">
-  confirm staging ready
-  <doc>
-    This method confirms that the recipient is ready to accept staged
-    data.  If the message was already partially-staged at a previous
-    time the recipient will report the number of octets already staged.
-  </doc>
-  <response name = "stage" />
-  <chassis name = "server" implement = "MUST" />
-  <chassis name = "client" implement = "MUST" />
-  
-  <field name = "staged size" type = "longlong">
-    already staged amount
-    <doc>
-      The amount of previously-staged content in octets.  For a new
-      message this will be zero.
-    </doc>
-    <doc name = "rule">
-      The sender MUST start sending data from this octet offset in the
-      message, counting from zero.
-    </doc>
-    <doc name = "rule">
-      The recipient MAY decide how long to hold partially-staged content
-      and MAY implement staging by always discarding partially-staged
-      content.  However if it uses the file content type it MUST support
-      the staging methods.
-    </doc>
-  </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "stage" content = "1" index = "50">
-  stage message content
-  <doc>
-    This method stages the message, sending the message content to the
-    recipient from the octet offset specified in the Open-Ok method.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <chassis name = "client" implement = "MUST" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "publish" index = "60">
-  publish a message
-  <doc>
-    This method publishes a staged file message to a specific exchange.
-    The file message will be routed to queues as defined by the exchange
-    configuration and distributed to any active consumers when the
-    transaction, if any, is committed.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "write"
-      access rights to the access realm for the exchange.
-    </doc>
-  </field>
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange to publish to.  The exchange
-      name can be empty, meaning the default exchange.  If the exchange
-      name is specified, and that exchange does not exist, the server
-      will raise a channel exception.
-    </doc>
-    <doc name = "rule">
-      The server MUST accept a blank exchange name to mean the default
-      exchange.
-    </doc>
-    <doc name = "rule">
-      If the exchange was declared as an internal exchange, the server
-      MUST respond with a reply code 403 (access refused) and raise a
-      channel exception.
-    </doc>
-    <doc name = "rule">
-      The exchange MAY refuse file content in which case it MUST respond
-      with a reply code 540 (not implemented) and raise a channel
-      exception.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key for the message.  The routing key is
-      used for routing messages depending on the exchange configuration.
-    </doc>
-  </field>
-
-  <field name = "mandatory" type = "bit">
-    indicate mandatory routing
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue.  If this flag is set, the server will return an
-      unroutable message with a Return method.  If this flag is zero, the
-      server silently drops the message.
-    </doc>
-    <doc name = "rule" test = "amq_file_00">
-      The server SHOULD implement the mandatory flag.
-    </doc>
-  </field>
-
-  <field name = "immediate" type = "bit">
-    request immediate delivery
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue consumer immediately.  If this flag is set, the
-      server will return an undeliverable message with a Return method.
-      If this flag is zero, the server will queue the message, but with
-      no guarantee that it will ever be consumed.
-    </doc>
-    <doc name = "rule" test = "amq_file_00">
-      The server SHOULD implement the immediate flag.
-    </doc>
-  </field>
-
-  <field name = "identifier" type = "shortstr">
-    staging identifier
-    <doc>
-      This is the staging identifier of the message to publish.  The
-      message must have been staged.  Note that a client can send the
-      Publish method asynchronously without waiting for staging to
-      finish.
-    </doc>
-  </field>
-</method>
-
-<method name = "return" content = "1" index = "70">
-  return a failed message
-  <doc>
-    This method returns an undeliverable message that was published
-    with the "immediate" flag set, or an unroutable message published
-    with the "mandatory" flag set. The reply code and text provide
-    information about the reason that the message was undeliverable.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "reply code" domain = "reply code" />
-  <field name = "reply text" domain = "reply text" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was
-      originally published to.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "deliver" index = "80">
-  notify the client of a consumer message
-  <doc>
-    This method delivers a staged file message to the client, via a
-    consumer. In the asynchronous message delivery model, the client
-    starts a consumer using the Consume method, then the server
-    responds with Deliver methods as and when messages arrive for
-    that consumer.
-  </doc>
-  <doc name = "rule">
-    The server SHOULD track the number of times a message has been
-    delivered to clients and when a message is redelivered a certain
-    number of times - e.g. 5 times - without being acknowledged, the
-    server SHOULD consider the message to be unprocessable (possibly
-    causing client applications to abort), and move the message to a
-    dead letter queue.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "redelivered" domain = "redelivered" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was originally
-      published to.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>
-  </field>
-
-  <field name = "identifier" type = "shortstr">
-    staging identifier
-    <doc>
-      This is the staging identifier of the message to deliver.  The
-      message must have been staged.  Note that a server can send the
-      Deliver method asynchronously without waiting for staging to
-      finish.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "ack" index = "90">
-  acknowledge one or more messages
-  <doc>
-    This method acknowledges one or more messages delivered via the
-    Deliver method.  The client can ask to confirm a single message or
-    a set of messages up to and including a specific message.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <field name = "delivery tag" domain = "delivery tag" />
-      
-  <field name = "multiple" type = "bit">
-    acknowledge multiple messages
-    <doc>
-      If set to 1, the delivery tag is treated as "up to and including",
-      so that the client can acknowledge multiple messages with a single
-      method.  If set to zero, the delivery tag refers to a single
-      message.  If the multiple field is 1, and the delivery tag is zero,
-      tells the server to acknowledge all outstanding mesages.
-    </doc>
-    <doc name = "rule">
-      The server MUST validate that a non-zero delivery-tag refers to an
-      delivered message, and raise a channel exception if this is not the
-      case.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "reject" index = "100">
-  reject an incoming message
-  <doc>
-    This method allows a client to reject a message.  It can be used to
-    return untreatable messages to their original queue.  Note that file
-    content is staged before delivery, so the client will not use this
-    method to interrupt delivery of a large message.
-  </doc>
-  <doc name = "rule">
-    The server SHOULD interpret this method as meaning that the client
-    is unable to process the message at this time.
-  </doc>
-  <doc name = "rule">
-    A client MUST NOT use this method as a means of selecting messages
-    to process.  A rejected message MAY be discarded or dead-lettered,
-    not necessarily passed to another client.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-    
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "requeue" type = "bit">
-    requeue the message
-    <doc>
-      If this field is zero, the message will be discarded.  If this bit
-      is 1, the server will attempt to requeue the message.
-    </doc>
-    <doc name = "rule">
-      The server MUST NOT deliver the message to the same client within
-      the context of the current channel.  The recommended strategy is
-      to attempt to deliver the message to an alternative consumer, and
-      if that is not possible, to move the message to a dead-letter
-      queue.  The server MAY use more sophisticated tracking to hold
-      the message on the queue and redeliver it to the same client at
-      a later stage.
-    </doc>
-  </field>
-</method>
-
-</class>
-
-  <class name="stream" handler="channel" index="80">
-    <!--
-======================================================
-==       STREAMING
-======================================================
--->
-  work with streaming content
-
-<doc>
-  The stream class provides methods that support multimedia streaming.
-  The stream class uses the following semantics: one message is one
-  packet of data; delivery is unacknowleged and unreliable; the consumer
-  can specify quality of service parameters that the server can try to
-  adhere to; lower-priority messages may be discarded in favour of high
-  priority messages.
-</doc>
-
-<doc name = "grammar">
-    stream              = C:QOS S:QOS-OK
-                        / C:CONSUME S:CONSUME-OK
-                        / C:CANCEL S:CANCEL-OK
-                        / C:PUBLISH content
-                        / S:RETURN
-                        / S:DELIVER content
-</doc>
-
-<chassis name = "server" implement = "MAY" />
-<chassis name = "client" implement = "MAY" />
-
-<doc name = "rule">
-  The server SHOULD discard stream messages on a priority basis if
-  the queue size exceeds some configured limit.
-</doc>
-<doc name = "rule">
-  The server MUST implement at least 2 priority levels for stream
-  messages, where priorities 0-4 and 5-9 are treated as two distinct
-  levels. The server MAY implement up to 10 priority levels.
-</doc>
-<doc name = "rule">
-  The server MUST implement automatic acknowledgements on stream
-  content.  That is, as soon as a message is delivered to a client
-  via a Deliver method, the server must remove it from the queue.
-</doc>
-
-
-<!--  These are the properties for a Stream content  -->
-
-<field name = "content type" type = "shortstr">
-    MIME content type
-</field>
-<field name = "content encoding" type = "shortstr">
-    MIME content encoding
-</field>
-<field name = "headers" type = "table">
-    Message header field table
-</field>
-<field name = "priority" type = "octet">
-    The message priority, 0 to 9
-</field>
-<field name = "timestamp" type = "timestamp">
-    The message timestamp
-</field>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "qos" synchronous = "1" index = "10">
-  specify quality of service
-  <doc>
-    This method requests a specific quality of service.  The QoS can
-    be specified for the current channel or for all channels on the
-    connection.  The particular properties and semantics of a qos method
-    always depend on the content class semantics.  Though the qos method
-    could in principle apply to both peers, it is currently meaningful
-    only for the server.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "qos-ok" />
-
-  <field name = "prefetch size" type = "long">
-    prefetch window in octets
-    <doc>
-      The client can request that messages be sent in advance so that
-      when the client finishes processing a message, the following
-      message is already held locally, rather than needing to be sent
-      down the channel.  Prefetching gives a performance improvement.
-      This field specifies the prefetch window size in octets. May be
-      set to zero, meaning "no specific limit".  Note that other
-      prefetch limits may still apply.
-    </doc>
-  </field>
-
-  <field name = "prefetch count" type = "short">
-    prefetch window in messages
-    <doc>
-      Specifies a prefetch window in terms of whole messages.  This
-      field may be used in combination with the prefetch-size field;
-      a message will only be sent in advance if both prefetch windows
-      (and those at the channel and connection level) allow it.
-    </doc>
-  </field>
-
-  <field name = "consume rate" type = "long">
-    transfer rate in octets/second
-    <doc>
-      Specifies a desired transfer rate in octets per second. This is
-      usually determined by the application that uses the streaming
-      data.  A value of zero means "no limit", i.e. as rapidly as
-      possible.
-    </doc>
-    <doc name = "rule">
-      The server MAY ignore the prefetch values and consume rates,
-      depending on the type of stream and the ability of the server
-      to queue and/or reply it.  The server MAY drop low-priority
-      messages in favour of high-priority messages.
-    </doc>
-  </field>
-
-  <field name = "global" type = "bit">
-    apply to entire connection
-    <doc>
-      By default the QoS settings apply to the current channel only.  If
-      this field is set, they are applied to the entire connection.
-    </doc>
-  </field>
-</method>
-
-<method name = "qos-ok" synchronous = "1" index = "11">
-  confirm the requested qos
-  <doc>
-    This method tells the client that the requested QoS levels could
-    be handled by the server.  The requested QoS applies to all active
-    consumers until a new QoS is defined.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "consume" synchronous = "1" index = "20">
-  start a queue consumer
-  <doc>
-    This method asks the server to start a "consumer", which is a
-    transient request for messages from a specific queue. Consumers
-    last as long as the channel they were created on, or until the
-    client cancels them.
-  </doc>
-  <doc name = "rule">
-    The server SHOULD support at least 16 consumers per queue, unless
-    the queue was declared as private, and ideally, impose no limit
-    except as defined by available resources.
-  </doc>
-  <doc name = "rule">
-    Streaming applications SHOULD use different channels to select
-    different streaming resolutions. AMQP makes no provision for
-    filtering and/or transforming streams except on the basis of
-    priority-based selective delivery of individual messages.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "consume-ok" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "read" access
-      rights to the realm for the queue.
-    </doc>
-  </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to consume from.  If the queue name
-      is null, refers to the current queue for the channel, which is the
-      last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue name
-      in this method is empty, the server MUST raise a connection exception
-      with reply code 530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Specifies the identifier for the consumer. The consumer tag is
-      local to a connection, so two clients can use the same consumer
-      tags. If this field is empty the server will generate a unique
-      tag.
-    </doc>
-    <doc name = "rule" test = "todo">
-      The tag MUST NOT refer to an existing consumer. If the client
-      attempts to create two consumers with the same non-empty tag
-      the server MUST raise a connection exception with reply code
-      530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "no local" domain = "no local" />
-
-  <field name = "exclusive" type = "bit">
-    request exclusive access
-    <doc>
-      Request exclusive consumer access, meaning only this consumer can
-      access the queue.
-    </doc>
-    <doc name = "rule" test = "amq_file_00">
-      If the server cannot grant exclusive access to the queue when asked,
-      - because there are other consumers active - it MUST raise a channel
-      exception with return code 405 (resource locked).
-    </doc>
-  </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-
-<method name = "consume-ok" synchronous = "1" index = "21">
-  confirm a new consumer
-  <doc>
-    This method provides the client with a consumer tag which it may
-    use in methods that work with the consumer.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Holds the consumer tag specified by the client or provided by
-      the server.
-    </doc>
-  </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "cancel" synchronous = "1" index = "30">
-  end a queue consumer
-  <doc>
-    This method cancels a consumer.  Since message delivery is
-    asynchronous the client may continue to receive messages for
-    a short while after canceling a consumer.  It may process or
-    discard these as appropriate.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "cancel-ok" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-<method name = "cancel-ok" synchronous = "1" index = "31">
-  confirm a cancelled consumer
-  <doc>
-    This method confirms that the cancellation was completed.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "publish" content = "1" index = "40">
-  publish a message
-  <doc>
-    This method publishes a message to a specific exchange. The message
-    will be routed to queues as defined by the exchange configuration
-    and distributed to any active consumers as appropriate.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "write"
-      access rights to the access realm for the exchange.
-    </doc>
-  </field>
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange to publish to.  The exchange
-      name can be empty, meaning the default exchange.  If the exchange
-      name is specified, and that exchange does not exist, the server
-      will raise a channel exception.
-    </doc>
-    <doc name = "rule">
-      The server MUST accept a blank exchange name to mean the default
-      exchange.
-    </doc>
-    <doc name = "rule">
-      If the exchange was declared as an internal exchange, the server
-      MUST respond with a reply code 403 (access refused) and raise a
-      channel exception.
-    </doc>
-    <doc name = "rule">
-      The exchange MAY refuse stream content in which case it MUST
-      respond with a reply code 540 (not implemented) and raise a
-      channel exception.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key for the message.  The routing key is
-      used for routing messages depending on the exchange configuration.
-    </doc>
-  </field>
-
-  <field name = "mandatory" type = "bit">
-    indicate mandatory routing
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue.  If this flag is set, the server will return an
-      unroutable message with a Return method.  If this flag is zero, the
-      server silently drops the message.
-    </doc>
-    <doc name = "rule" test = "amq_stream_00">
-      The server SHOULD implement the mandatory flag.
-    </doc>
-  </field>
-
-  <field name = "immediate" type = "bit">
-    request immediate delivery
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue consumer immediately.  If this flag is set, the
-      server will return an undeliverable message with a Return method.
-      If this flag is zero, the server will queue the message, but with
-      no guarantee that it will ever be consumed.
-    </doc>
-    <doc name = "rule" test = "amq_stream_00">
-      The server SHOULD implement the immediate flag.
-    </doc>
-  </field>
-</method>
-
-<method name = "return" content = "1" index = "50">
-  return a failed message
-  <doc>
-    This method returns an undeliverable message that was published
-    with the "immediate" flag set, or an unroutable message published
-    with the "mandatory" flag set. The reply code and text provide
-    information about the reason that the message was undeliverable.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "reply code" domain = "reply code" />
-  <field name = "reply text" domain = "reply text" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was
-      originally published to.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>     
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "deliver" content = "1" index = "60">
-  notify the client of a consumer message
-  <doc>
-    This method delivers a message to the client, via a consumer.  In
-    the asynchronous message delivery model, the client starts a
-    consumer using the Consume method, then the server responds with
-    Deliver methods as and when messages arrive for that consumer.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was originally
-      published to.
-    </doc>
-  </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue that the message came from. Note
-      that a single channel can start many consumers on different
-      queues.
-    </doc>
-    <assert check = "notnull" />
-  </field>
-</method>
-  </class>
-
-  <class name="tx" handler="channel" index="90">
-    <!--
-======================================================
-==       TRANSACTIONS
-======================================================
--->
-  work with standard transactions
-
-<doc>
-  Standard transactions provide so-called "1.5 phase commit".  We can
-  ensure that work is never lost, but there is a chance of confirmations
-  being lost, so that messages may be resent.  Applications that use
-  standard transactions must be able to detect and ignore duplicate
-  messages.
-</doc>
-    <rule implement="SHOULD">
-  An client using standard transactions SHOULD be able to track all
-  messages received within a reasonable period, and thus detect and
-  reject duplicates of the same message. It SHOULD NOT pass these to
-  the application layer.
-</rule>
-    <doc name="grammar">
-    tx                  = C:SELECT S:SELECT-OK
-                        / C:COMMIT S:COMMIT-OK
-                        / C:ROLLBACK S:ROLLBACK-OK
-</doc>
-    <chassis name="server" implement="SHOULD"/>
-    <chassis name="client" implement="MAY"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="select" synchronous="1" index="10">
-select standard transaction mode
-  <doc>
-    This method sets the channel to use standard transactions.  The
-    client must use this method at least once on a channel before
-    using the Commit or Rollback methods.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <response name="select-ok"/>
-    </method>
-    <method name="select-ok" synchronous="1" index="11">
-confirm transaction mode
-  <doc>
-    This method confirms to the client that the channel was successfully
-    set to use standard transactions.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="commit" synchronous="1" index="20">
-commit the current transaction
-  <doc>
-    This method commits all messages published and acknowledged in
-    the current transaction.  A new transaction starts immediately
-    after a commit.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <response name="commit-ok"/>
-    </method>
-    <method name="commit-ok" synchronous="1" index="21">
-confirm a successful commit
-  <doc>
-    This method confirms to the client that the commit succeeded.
-    Note that if a commit fails, the server raises a channel exception.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="rollback" synchronous="1" index="30">
-abandon the current transaction
-  <doc>
-    This method abandons all messages published and acknowledged in
-    the current transaction.  A new transaction starts immediately
-    after a rollback.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <response name="rollback-ok"/>
-    </method>
-    <method name="rollback-ok" synchronous="1" index="31">
-confirm a successful rollback
-  <doc>
-    This method confirms to the client that the rollback succeeded.
-    Note that if an rollback fails, the server raises a channel exception.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-  </class>
-  <class name="dtx" handler="channel" index="100">
-    <!--
-======================================================
-==       DISTRIBUTED TRANSACTIONS
-======================================================
--->
-  work with distributed transactions
-
-<doc>
-  Distributed transactions provide so-called "2-phase commit".    The
-  AMQP distributed transaction model supports the X-Open XA
-  architecture and other distributed transaction implementations.
-  The Dtx class assumes that the server has a private communications
-  channel (not AMQP) to a distributed transaction coordinator.
-</doc>
-    <doc name="grammar">
-    dtx                 = C:SELECT S:SELECT-OK
-                          C:START S:START-OK
-</doc>
-    <chassis name="server" implement="MAY"/>
-    <chassis name="client" implement="MAY"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="select" synchronous="1" index="10">
-select standard transaction mode
-  <doc>
-    This method sets the channel to use distributed transactions.  The
-    client must use this method at least once on a channel before
-    using the Start method.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <response name="select-ok"/>
-    </method>
-    <method name="select-ok" synchronous="1" index="11">
-confirm transaction mode
-  <doc>
-    This method confirms to the client that the channel was successfully
-    set to use distributed transactions.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="start" synchronous="1" index="20">
-  start a new distributed transaction
-  <doc>
-    This method starts a new distributed transaction.  This must be
-    the first method on a new channel that uses the distributed
-    transaction mode, before any methods that publish or consume
-    messages.
-  </doc>
-      <chassis name="server" implement="MAY"/>
-      <response name="start-ok"/>
-      <field name="dtx identifier" type="shortstr">
-    transaction identifier
-    <doc>
-      The distributed transaction key. This identifies the transaction
-      so that the AMQP server can coordinate with the distributed
-      transaction coordinator.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-    </method>
-    <method name="start-ok" synchronous="1" index="21">
-  confirm the start of a new distributed transaction
-  <doc>
-    This method confirms to the client that the transaction started.
-    Note that if a start fails, the server raises a channel exception.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-  </class>
-  <class name="tunnel" handler="tunnel" index="110">
-    <!--
-======================================================
-==       TUNNEL
-======================================================
--->
-  methods for protocol tunneling.
-
-<doc>
-  The tunnel methods are used to send blocks of binary data - which
-  can be serialised AMQP methods or other protocol frames - between
-  AMQP peers.
-</doc>
-    <doc name="grammar">
-    tunnel              = C:REQUEST
-                        / S:REQUEST
-</doc>
-    <chassis name="server" implement="MAY"/>
-    <chassis name="client" implement="MAY"/>
-    <field name="headers" type="table">
-    Message header field table
-</field>
-    <field name="proxy name" type="shortstr">
-    The identity of the tunnelling proxy
-</field>
-    <field name="data name" type="shortstr">
-    The name or type of the message being tunnelled
-</field>
-    <field name="durable" type="octet">
-    The message durability indicator
-</field>
-    <field name="broadcast" type="octet">
-    The message broadcast mode
-</field>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="request" content="1" index="10">
-  sends a tunnelled method
-  <doc>
-    This method tunnels a block of binary data, which can be an
-    encoded AMQP method or other data.  The binary data is sent
-    as the content for the Tunnel.Request method.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <field name="meta data" type="table">
-    meta data for the tunnelled block
-    <doc>
-    This field table holds arbitrary meta-data that the sender needs
-    to pass to the recipient.
-    </doc>
-      </field>
-    </method>
-  </class>
-  <class name="test" handler="channel" index="120">
-    <!--
-======================================================
-==       TEST - CHECK FUNCTIONAL CAPABILITIES OF AN IMPLEMENTATION
-======================================================
--->
-  test functional primitives of the implementation
-
-<doc>
-  The test class provides methods for a peer to test the basic
-  operational correctness of another peer. The test methods are
-  intended to ensure that all peers respect at least the basic
-  elements of the protocol, such as frame and content organisation
-  and field types. We assume that a specially-designed peer, a
-  "monitor client" would perform such tests.
-</doc>
-    <doc name="grammar">
-    test                = C:INTEGER S:INTEGER-OK
-                        / S:INTEGER C:INTEGER-OK
-                        / C:STRING S:STRING-OK
-                        / S:STRING C:STRING-OK
-                        / C:TABLE S:TABLE-OK
-                        / S:TABLE C:TABLE-OK
-                        / C:CONTENT S:CONTENT-OK
-                        / S:CONTENT C:CONTENT-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="SHOULD"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="integer" synchronous="1" index="10">
-  test integer handling
-  <doc>
-    This method tests the peer's capability to correctly marshal integer
-    data.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="integer-ok"/>
-      <field name="integer 1" type="octet">
-    octet test value
-    <doc>
-      An octet integer test value.
-    </doc>
-      </field>
-      <field name="integer 2" type="short">
-    short test value
-    <doc>
-      A short integer test value.
-    </doc>
-      </field>
-      <field name="integer 3" type="long">
-    long test value
-    <doc>
-      A long integer test value.
-    </doc>
-      </field>
-      <field name="integer 4" type="longlong">
-    long-long test value
-    <doc>
-      A long long integer test value.
-    </doc>
-      </field>
-      <field name="operation" type="octet">
-    operation to test
-    <doc>
-      The client must execute this operation on the provided integer
-      test fields and return the result.
-    </doc>
-        <assert check="enum">
-          <value name="add">return sum of test values</value>
-          <value name="min">return lowest of test values</value>
-          <value name="max">return highest of test values</value>
-        </assert>
-      </field>
-    </method>
-    <method name="integer-ok" synchronous="1" index="11">
-  report integer test result
-  <doc>
-    This method reports the result of an Integer method.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <field name="result" type="longlong">
-    result value
-    <doc>
-      The result of the tested operation.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="string" synchronous="1" index="20">
-  test string handling
-  <doc>
-    This method tests the peer's capability to correctly marshal string
-    data.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="string-ok"/>
-      <field name="string 1" type="shortstr">
-    short string test value
-    <doc>
-      An short string test value.
-    </doc>
-      </field>
-      <field name="string 2" type="longstr">
-    long string test value
-    <doc>
-      A long string test value.
-    </doc>
-      </field>
-      <field name="operation" type="octet">
-    operation to test
-    <doc>
-      The client must execute this operation on the provided string
-      test fields and return the result.
-    </doc>
-        <assert check="enum">
-          <value name="add">return concatentation of test strings</value>
-          <value name="min">return shortest of test strings</value>
-          <value name="max">return longest of test strings</value>
-        </assert>
-      </field>
-    </method>
-    <method name="string-ok" synchronous="1" index="21">
-  report string test result
-  <doc>
-    This method reports the result of a String method.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <field name="result" type="longstr">
-    result value
-    <doc>
-      The result of the tested operation.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="table" synchronous="1" index="30">
-  test field table handling
-  <doc>
-    This method tests the peer's capability to correctly marshal field
-    table data.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="table-ok"/>
-      <field name="table" type="table">
-    field table of test values
-    <doc>
-      A field table of test values.
-    </doc>
-      </field>
-      <field name="integer op" type="octet">
-    operation to test on integers
-    <doc>
-      The client must execute this operation on the provided field
-      table integer values and return the result.
-    </doc>
-        <assert check="enum">
-          <value name="add">return sum of numeric field values</value>
-          <value name="min">return min of numeric field values</value>
-          <value name="max">return max of numeric field values</value>
-        </assert>
-      </field>
-      <field name="string op" type="octet">
-    operation to test on strings
-    <doc>
-      The client must execute this operation on the provided field
-      table string values and return the result.
-    </doc>
-        <assert check="enum">
-          <value name="add">return concatenation of string field values</value>
-          <value name="min">return shortest of string field values</value>
-          <value name="max">return longest of string field values</value>
-        </assert>
-      </field>
-    </method>
-    <method name="table-ok" synchronous="1" index="31">
-  report table test result
-  <doc>
-    This method reports the result of a Table method.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <field name="integer result" type="longlong">
-    integer result value
-    <doc>
-      The result of the tested integer operation.
-    </doc>
-      </field>
-      <field name="string result" type="longstr">
-    string result value
-    <doc>
-      The result of the tested string operation.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="content" synchronous="1" content="1" index="40">
-  test content handling
-  <doc>
-    This method tests the peer's capability to correctly marshal content.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="content-ok"/>
-    </method>
-    <method name="content-ok" synchronous="1" content="1" index="41">
-  report content test result
-  <doc>
-    This method reports the result of a Content method.  It contains the
-    content checksum and echoes the original content as provided.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <field name="content checksum" type="long">
-    content hash
-    <doc>
-      The 32-bit checksum of the content, calculated by adding the
-      content into a 32-bit accumulator.
-    </doc>
-      </field>
-    </method>
-  </class>
-</amqp>
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/amqp0-9.xml b/mcs/class/RabbitMQ.Client/docs/specs/amqp0-9.xml
deleted file mode 100644 (file)
index 9d1b488..0000000
+++ /dev/null
@@ -1,5185 +0,0 @@
-<?xml version = "1.0"?>
-
-<!--
-    EDITORS: (PH)   Pieter Hintjens <ph@imatix.com>
-    (KvdR) Kim van der Riet <kim.vdriet@redhat.com>
-
-    These editors have been assigned by the AMQP working group.
-    Please do not edit/commit this file without consulting with
-    one of the above editors.
-    ========================================================
-
-    TODOs
-        - see TODO comments in the text
--->
-
-<!--
-    Copyright Notice
-    ================
-    (c) Copyright JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc.,
-    iMatix Corporation, IONA\ufffd Technologies, Red Hat, Inc.,
-    TWIST Process Innovations, and 29West Inc. 2006. All rights reserved.
-    
-    License
-    =======
-    JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc., iMatix 
-    Corporation, IONA Technologies, Red Hat, Inc., TWIST Process Innovations, and 
-    29West Inc. (collectively, the "Authors") each hereby grants to you a worldwide,
-    perpetual, royalty-free, nontransferable, nonexclusive license to
-    (i) copy, display, distribute and implement the Advanced Messaging Queue Protocol
-    ("AMQP") Specification and (ii) the Licensed Claims that are held by
-    the Authors, all for the purpose of implementing the Advanced Messaging
-    Queue Protocol Specification. Your license and any rights under this
-    Agreement will terminate immediately without notice from
-    any Author if you bring any claim, suit, demand, or action related to
-    the Advanced Messaging Queue Protocol Specification against any Author.
-    Upon termination, you shall destroy all copies of the Advanced Messaging
-    Queue Protocol Specification in your possession or control.
-
-    As used hereunder, "Licensed Claims" means those claims of a patent or
-    patent application, throughout the world, excluding design patents and
-    design registrations, owned or controlled, or that can be sublicensed
-    without fee and in compliance with the requirements of this
-    Agreement, by an Author or its affiliates now or at any
-    future time and which would necessarily be infringed by implementation
-    of the Advanced Messaging Queue Protocol Specification. A claim is
-    necessarily infringed hereunder only when it is not possible to avoid
-    infringing it because there is no plausible non-infringing alternative
-    for implementing the required portions of the Advanced Messaging Queue
-    Protocol Specification. Notwithstanding the foregoing, Licensed Claims
-    shall not include any claims other than as set forth above even if
-    contained in the same patent as Licensed Claims; or that read solely
-    on any implementations of any portion of the Advanced Messaging Queue
-    Protocol Specification that are not required by the Advanced Messaging
-    Queue Protocol Specification, or that, if licensed, would require a
-    payment of royalties by the licensor to unaffiliated third parties.
-    Moreover, Licensed Claims shall not include (i) any enabling technologies
-    that may be necessary to make or use any Licensed Product but are not
-    themselves expressly set forth in the Advanced Messaging Queue Protocol
-    Specification (e.g., semiconductor manufacturing technology, compiler
-    technology, object oriented technology, networking technology, operating
-    system technology, and the like); or (ii) the implementation of other
-    published standards developed elsewhere and merely referred to in the
-    body of the Advanced Messaging Queue Protocol Specification, or
-    (iii) any Licensed Product and any combinations thereof the purpose or
-    function of which is not required for compliance with the Advanced
-    Messaging Queue Protocol Specification. For purposes of this definition,
-    the Advanced Messaging Queue Protocol Specification shall be deemed to
-    include both architectural and interconnection requirements essential
-    for interoperability and may also include supporting source code artifacts
-    where such architectural, interconnection requirements and source code
-    artifacts are expressly identified as being required or documentation to
-    achieve compliance with the Advanced Messaging Queue Protocol Specification.
-    
-    As used hereunder, "Licensed Products" means only those specific portions
-    of products (hardware, software or combinations thereof) that implement
-    and are compliant with all relevant portions of the Advanced Messaging
-    Queue Protocol Specification.
-    
-    The following disclaimers, which you hereby also acknowledge as to any
-    use you may make of the Advanced Messaging Queue Protocol Specification:
-    
-    THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS,"
-    AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
-    IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
-    FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
-    CONTENTS OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE
-    SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF THE ADVANCED
-    MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD PARTY 
-    PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-    
-    THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
-    INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
-    USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED MESSAGING QUEUE
-    PROTOCOL SPECIFICATION.
-    
-    The name and trademarks of the Authors may NOT be used in any manner,
-    including advertising or publicity pertaining to the Advanced Messaging
-    Queue Protocol Specification or its contents without specific, written
-    prior permission. Title to copyright in the Advanced Messaging Queue
-    Protocol Specification will at all times remain with the Authors.
-    
-    No other rights are granted by implication, estoppel or otherwise.
-    
-    Upon termination of your license or rights under this Agreement, you
-    shall destroy all copies of the Advanced Messaging Queue Protocol
-    Specification in your possession or control.
-    
-    Trademarks
-    ==========
-    "JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the
-    Octagon Symbol are trademarks of JPMorgan Chase & Co.
-    
-    IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
-    
-    IONA, IONA Technologies, and the IONA logos are trademarks of IONA
-    Technologies PLC and/or its subsidiaries.
-    
-    LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered
-    trademarks of Red Hat, Inc. in the US and other countries.
-    
-    Java, all Java-based trademarks and OpenOffice.org are trademarks of
-    Sun Microsystems, Inc. in the United States, other countries, or both.
-    
-    Other company, product, or service names may be trademarks or service
-    marks of others.
-    
-    Links to full AMQP specification:
-    =================================
-    http://www.envoytech.org/spec/amq/
-    http://www.iona.com/opensource/amqp/
-    http://www.redhat.com/solutions/specifications/amqp/
-    http://www.twiststandards.org/tiki-index.php?page=AMQ
-    http://www.imatix.com/amqp
--->
-
-<!--
-    <!DOCTYPE amqp SYSTEM "amqp.dtd">
--->
-
-<!-- XML Notes
-
-    We use entities to indicate repetition; attributes to indicate properties.
-
-    We use the 'name' attribute as an identifier, usually within the context
-    of the surrounding entities.
-
-    We use spaces to seperate words in names, so that we can print names in
-    their natural form depending on the context - underlines for source code,
-    hyphens for written text, etc.
-
-    We do not enforce any particular validation mechanism but we support all
-    mechanisms.  The protocol definition conforms to a formal grammar that is
-    published seperately in several technologies.
-
- -->
-
-<amqp major = "0" minor = "9" port = "5672" comment = "AMQ Protocol version 0-9">
-  <!--
-      ======================================================
-      ==       CONSTANTS
-      ======================================================
-  -->
-  <!-- Frame types -->
-  <constant name = "frame-method"     value = "1" />
-  <constant name = "frame-header"     value = "2" />
-  <constant name = "frame-body"       value = "3" />
-  <constant name = "frame-oob-method" value = "4" />
-  <constant name = "frame-oob-header" value = "5" />
-  <constant name = "frame-oob-body"   value = "6" />
-  <constant name = "frame-trace"      value = "7" />
-  <constant name = "frame-heartbeat"  value = "8" />
-
-  <!-- Protocol constants -->
-  <constant name = "frame-min-size"   value = "4096" />
-  <constant name = "frame-end"        value = "206" />
-
-  <!-- Reply codes -->
-  <constant name = "reply-success" value = "200">
-    <doc>
-      Indicates that the method completed successfully. This reply code is
-      reserved for future use - the current protocol design does not use positive
-      confirmation and reply codes are sent only in case of an error.
-    </doc>
-  </constant>
-
-  <constant name = "not-delivered" value = "310" class = "soft-error">
-    <doc>
-      The client asked for a specific message that is no longer available.
-      The message was delivered to another client, or was purged from the queue
-      for some other reason.
-    </doc>
-  </constant>
-
-  <constant name = "content-too-large" value = "311" class = "soft-error">
-    <doc>
-      The client attempted to transfer content larger than the server could accept
-      at the present time. The client may retry at a later time.
-    </doc>
-  </constant>
-
-  <constant name = "no-route" value = "312" class = "soft-error">
-    <doc>
-      When the exchange cannot route the result of a .Publish, most likely due
-      to an invalid routing key. Only when the mandatory flag is set.
-    </doc>
-  </constant>
-
-  <constant name = "no-consumers" value = "313" class = "soft-error">
-    <doc>
-      When the exchange cannot deliver to a consumer when the immediate flag is
-      set. As a result of pending data on the queue or the absence of any
-      consumers of the queue.
-    </doc>
-  </constant>
-
-  <constant name = "connection-forced" value = "320" class = "hard-error">
-    <doc>
-      An operator intervened to close the connection for some reason. The client
-      may retry at some later date.
-    </doc>
-  </constant>
-
-  <constant name = "invalid-path" value = "402" class = "hard-error">
-    <doc>
-      The client tried to work with an unknown virtual host.
-    </doc>
-  </constant>
-
-  <constant name = "access-refused" value = "403" class = "soft-error">
-    <doc>
-      The client attempted to work with a server entity to which it has no
-      access due to security settings.
-    </doc>
-  </constant>
-
-  <constant name = "not-found" value = "404" class = "soft-error">
-    <doc>The client attempted to work with a server entity that does not exist.</doc>
-  </constant>
-
-  <constant name = "resource-locked" value = "405" class = "soft-error">
-    <doc>
-      The client attempted to work with a server entity to which it has no
-      access because another client is working with it.
-    </doc>
-  </constant>
-
-  <constant name = "precondition-failed" value = "406" class = "soft-error">
-    <doc>
-      The client requested a method that was not allowed because some precondition
-      failed.
-    </doc>
-  </constant>
-
-  <constant name = "frame-error" value = "501" class = "hard-error">
-    <doc>
-      The client sent a malformed frame that the server could not decode. This
-      strongly implies a programming error in the client.
-    </doc>
-  </constant>
-
-  <constant name = "syntax-error" value = "502" class = "hard-error">
-    <doc>
-      The client sent a frame that contained illegal values for one or more
-      fields. This strongly implies a programming error in the client.
-    </doc>
-  </constant>
-
-  <constant name = "command-invalid" value = "503" class = "hard-error">
-    <doc>
-      The client sent an invalid sequence of frames, attempting to perform an
-      operation that was considered invalid by the server. This usually implies
-      a programming error in the client.
-    </doc>
-  </constant>
-
-  <constant name = "channel-error" value = "504" class = "hard-error">
-    <doc>
-      The client attempted to work with a channel that had not been correctly
-      opened. This most likely indicates a fault in the client layer.
-    </doc>
-  </constant>
-
-  <constant name = "resource-error" value = "506" class = "hard-error">
-    <doc>
-      The server could not complete the method because it lacked sufficient
-      resources. This may be due to the client creating too many of some type
-      of entity.
-    </doc>
-  </constant>
-
-  <constant name = "not-allowed" value = "530" class = "hard-error">
-    <doc>
-      The client tried to work with some entity in a manner that is prohibited
-      by the server, due to security settings or by some other criteria.
-    </doc>
-  </constant>
-
-  <constant name = "not-implemented" value = "540" class = "hard-error">
-    <doc>
-      The client tried to use functionality that is not implemented in the
-      server.
-    </doc>
-  </constant>
-
-  <constant name = "internal-error" value = "541" class = "hard-error">
-    <doc>
-      The server could not complete the method because of an internal error.
-      The server may require intervention by an operator in order to resume
-      normal operations.
-    </doc>
-  </constant>
-
-  <!--
-      ======================================================
-      ==       DOMAIN TYPES
-      ======================================================
-  -->
-
-  <domain name = "access-ticket" type = "short" label = "access ticket granted by server">
-    <doc>
-      An access ticket granted by the server for a certain set of access rights
-      within a specific realm. Access tickets are valid within the channel where
-      they were created, and expire when the channel closes.
-    </doc>
-    <assert check = "ne" value = "0" />
-  </domain>
-
-  <domain name = "class-id" type = "short" />
-
-  <domain name = "consumer-tag" type = "shortstr" label = "consumer tag">
-    <doc>
-      Identifier for the consumer, valid within the current connection.
-    </doc>
-  </domain>
-
-  <domain name = "delivery-tag" type = "longlong" label = "server-assigned delivery tag">
-    <doc>
-      The server-assigned and channel-specific delivery tag
-    </doc>
-    <rule name = "channel-local">
-      <doc>
-        The delivery tag is valid only within the channel from which the message was
-        received. I.e. a client MUST NOT receive a message on one channel and then
-        acknowledge it on another.
-      </doc>
-    </rule>
-    <rule name = "non-zero">
-      <doc>
-        The server MUST NOT use a zero value for delivery tags. Zero is reserved
-        for client use, meaning "all messages so far received".
-      </doc>
-    </rule>
-  </domain>
-
-  <domain name = "exchange-name" type = "shortstr" label = "exchange name">
-    <doc>
-      The exchange name is a client-selected string that identifies the exchange for publish
-      methods. Exchange names may consist of any mixture of digits, letters, and underscores.
-      Exchange names are scoped by the virtual host.
-    </doc>
-    <assert check = "length" value = "127" />
-  </domain>
-
-  <domain name = "known-hosts" type = "shortstr" label = "list of known hosts">
-    <doc>
-      Specifies the list of equivalent or alternative hosts that the server knows about,
-      which will normally include the current server itself. Clients can cache this
-      information and use it when reconnecting to a server after a failure.  This field
-      may be empty.
-    </doc>
-  </domain>
-
-  <domain name = "method-id" type = "short" />
-
-  <domain name = "no-ack" type = "bit" label = "no acknowledgement needed">
-    <doc>
-      If this field is set the server does not expect acknowledgements for
-      messages. That is, when a message is delivered to the client the server
-      automatically and silently acknowledges it on behalf of the client. This
-      functionality increases performance but at the cost of reliability.
-      Messages can get lost if a client dies before it can deliver them to the
-      application.
-    </doc>
-  </domain>
-
-  <domain name = "no-local" type = "bit" label = "do not deliver own messages">
-    <doc>
-      If the no-local field is set the server will not send messages to the connection that
-      published them.
-    </doc>
-  </domain>
-
-  <domain name = "path" type = "shortstr">
-    <doc>
-      Must start with a slash "/" and continue with path names separated by slashes. A path
-      name consists of any combination of at least one of [A-Za-z0-9] plus zero or more of
-      [.-_+!=:].
-    </doc>
-
-    <assert check = "notnull" />
-    <assert check = "syntax" rule = "path" />
-    <assert check = "length" value = "127" />
-  </domain>
-
-  <domain name = "peer-properties" type = "table">
-    <doc>
-      This string provides a set of peer properties, used for identification, debugging, and
-      general information.
-    </doc>
-  </domain>
-
-  <domain name = "queue-name" type = "shortstr" label = "queue name">
-    <doc>
-      The queue name identifies the queue within the vhost. Queue names may consist of any
-      mixture of digits, letters, and underscores.
-    </doc>
-    <assert check = "length" value = "127" />
-  </domain>
-
-  <domain name = "redelivered" type = "bit" label = "message is being redelivered">
-    <doc>
-      This indicates that the message has been previously delivered to this or
-      another client.
-    </doc>
-    <rule name = "implementation">
-      <doc>
-        The server SHOULD try to signal redelivered messages when it can. When
-        redelivering a message that was not successfully acknowledged, the server
-        SHOULD deliver it to the original client if possible.
-      </doc>
-      <doc type = "scenario">
-        Create a shared queue and publish a message to the queue.  Consume the
-        message using explicit acknowledgements, but do not acknowledge the
-        message.  Close the connection, reconnect, and consume from the queue
-        again.  The message should arrive with the redelivered flag set.
-      </doc>
-    </rule>
-    <rule name = "hinting">
-      <doc>
-        The client MUST NOT rely on the redelivered field but should take it as a
-        hint that the message may already have been processed. A fully robust
-        client must be able to track duplicate received messages on non-transacted,
-        and locally-transacted channels.
-      </doc>
-    </rule>
-  </domain>
-
-  <domain name = "reply-code" type = "short" label = "reply code from server">
-    <doc>
-      The reply code. The AMQ reply codes are defined as constants at the start
-      of this formal specification.
-    </doc>
-    <assert check = "notnull" />
-  </domain>
-
-  <domain name = "reply-text" type = "shortstr" label = "localised reply text">
-    <doc>
-      The localised reply text. This text can be logged as an aid to resolving
-      issues.
-    </doc>
-    <assert check = "notnull" />
-  </domain>
-
-  <domain name = "channel-id" type = "longstr" label = "unique identifier for a channel" />
-
-  <!-- Domains for the message class -->
-  <domain name = "duration" type = "longlong" label = "duration in milliseconds" />
-  <domain name = "offset" type = "longlong" label = "offset into a message body" />
-  <domain name = "reference" type = "longstr" label = "pointer to a message body" />
-  <domain name = "destination" type = "shortstr" label = "destination for a message">
-    <doc>
-      Specifies the destination to which the message is to be
-      transferred. The destination can be empty, meaning the
-      default exchange or consumer.
-    </doc>
-  </domain>
-  <domain name = "reject-code" type = "short" label = "reject code for transfer">
-    <rule name = "01">
-      <doc>
-        The reject code must be one of 0 (generic) or 1 (immediate
-        delivery was attempted but failed).
-      </doc>
-    </rule>
-  </domain>
-  <domain name = "reject-text" type = "shortstr" label = "informational text for message reject"/>
-  <domain name = "security-token" type = "longstr" label = "security token">
-    <doc>
-      Used for authentication, replay prevention, and encrypted bodies.
-    </doc>
-  </domain>
-
-  <!-- Elementary domains -->
-  <domain name = "bit"        type = "bit"       label = "single bit" />
-  <domain name = "octet"      type = "octet"     label = "single octet" />
-  <domain name = "short"      type = "short"     label = "16-bit integer" />
-  <domain name = "long"       type = "long"      label = "32-bit integer" />
-  <domain name = "longlong"   type = "longlong"  label = "64-bit integer" />
-  <domain name = "shortstr"   type = "shortstr"  label = "short string" />
-  <domain name = "longstr"    type = "longstr"   label = "long string" />
-  <domain name = "timestamp"  type = "timestamp" label = "64-bit timestamp" />
-  <domain name = "table"      type = "table"     label = "field table" />
-
-  <!-- ==  CONNECTION  ======================================================= -->
-
-  <!-- TODO 0.81 - the 'handler' attribute of methods needs to be reviewed, and if
-       no current implementations use it, removed. /PH 2006/07/20
-       -->
-
-  <class name = "connection" handler = "connection" index = "10" label = "work with socket connections">
-    <doc>
-      The connection class provides methods for a client to establish a network connection to
-      a server, and for both peers to operate the connection thereafter.
-    </doc>
-
-    <doc type = "grammar">
-      connection          = open-connection *use-connection close-connection
-      open-connection     = C:protocol-header
-                            S:START C:START-OK
-                            *challenge
-                            S:TUNE C:TUNE-OK
-                            C:OPEN S:OPEN-OK | S:REDIRECT
-      challenge           = S:SECURE C:SECURE-OK
-      use-connection      = *channel
-      close-connection    = C:CLOSE S:CLOSE-OK
-                          / S:CLOSE C:CLOSE-OK
-    </doc>
-
-    <chassis name = "server" implement = "MUST" />
-    <chassis name = "client" implement = "MUST" />
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "start" synchronous = "1" index = "10" label = "start connection negotiation">
-      <doc>
-        This method starts the connection negotiation process by telling the client the
-        protocol version that the server proposes, along with a list of security mechanisms
-        which the client can use for authentication.
-      </doc>
-
-      <rule name = "protocol-name">
-        <doc>
-          If the server cannot support the protocol specified in the protocol header,
-          it MUST close the socket connection without sending any response method.
-        </doc>
-        <doc type = "scenario">
-          The client sends a protocol header containing an invalid protocol name.
-          The server must respond by closing the connection.
-        </doc>
-      </rule>
-      <rule name = "server-support">
-        <doc>
-          The server MUST provide a protocol version that is lower than or equal to
-          that requested by the client in the protocol header.
-        </doc>
-        <doc type = "scenario">
-          The client requests a protocol version that is higher than any valid
-          implementation, e.g. 9.0.  The server must respond with a current
-          protocol version, e.g. 1.0.
-        </doc>
-      </rule>
-      <rule name = "client-support">
-        <doc>
-          If the client cannot handle the protocol version suggested by the server
-          it MUST close the socket connection.
-        </doc>
-        <doc type = "scenario">
-          The server sends a protocol version that is lower than any valid
-          implementation, e.g. 0.1.  The client must respond by closing the
-          connection.
-        </doc>
-      </rule>
-
-      <chassis name = "client" implement = "MUST" />
-      <response name = "start-ok" />
-
-      <field name = "version-major" domain = "octet" label = "protocol major version">
-        <doc>
-          The protocol version, major component, as transmitted in the AMQP protocol
-          header. This, combined with the protocol minor component fully describe the
-          protocol version, which is written in the format major-minor. Hence, with
-          major=1, minor=3, the protocol version would be "1-3".
-        </doc>
-      </field>
-
-      <field name = "version-minor" domain = "octet" label = "protocol minor version">
-        <doc>
-          The protocol version, minor component, as transmitted in the AMQP protocol
-          header. This, combined with the protocol major component fully describe the
-          protocol version, which is written in the format major-minor. Hence, with
-          major=1, minor=3, the protocol version would be "1-3".
-        </doc>
-      </field>
-
-      <field name = "server-properties" domain = "peer-properties" label = "server properties">
-        <rule name = "required-fields">
-          <doc>
-            The properties SHOULD contain at least these fields: "host", specifying the
-            server host name or address, "product", giving the name of the server product,
-            "version", giving the name of the server version, "platform", giving the name
-            of the operating system, "copyright", if appropriate, and "information", giving
-            other general information.
-          </doc>
-          <doc type = "scenario">
-            Client connects to server and inspects the server properties. It checks for
-            the presence of the required fields.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "mechanisms" domain = "longstr" label = "available security mechanisms">
-        <doc>
-          A list of the security mechanisms that the server supports, delimited by spaces.
-        </doc>
-        <assert check = "notnull" />
-      </field>
-
-      <field name = "locales" domain = "longstr" label = "available message locales">
-        <doc>
-          A list of the message locales that the server supports, delimited by spaces. The
-          locale defines the language in which the server will send reply texts.
-        </doc>
-        <rule name = "required-support">
-          <doc>
-            The server MUST support at least the en_US locale.
-          </doc>
-          <doc type = "scenario">
-            Client connects to server and inspects the locales field. It checks for
-            the presence of the required locale(s).
-          </doc>
-        </rule>
-        <assert check = "notnull" />
-      </field>
-    </method>
-
-    <method name = "start-ok" synchronous = "1" index = "11"
-      label = "select security mechanism and locale">
-      <doc>
-        This method selects a SASL security mechanism.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "client-properties" domain = "peer-properties" label = "client properties">
-        <rule name = "required-fields">
-          <!-- This rule is not testable from the client side -->
-          <doc>
-            The properties SHOULD contain at least these fields: "product", giving the name
-            of the client product, "version", giving the name of the client version, "platform",
-            giving the name of the operating system, "copyright", if appropriate, and
-            "information", giving other general information.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "mechanism" domain = "shortstr" label = "selected security mechanism">
-        <doc>
-          A single security mechanisms selected by the client, which must be one of those
-          specified by the server.
-        </doc>
-        <rule name = "security">
-          <doc>
-            The client SHOULD authenticate using the highest-level security profile it
-            can handle from the list provided by the server.
-          </doc>
-        </rule>
-        <rule name = "validity">
-          <doc>
-            If the mechanism field does not contain one of the security mechanisms
-            proposed by the server in the Start method, the server MUST close the
-            connection without sending any further data.
-          </doc>
-          <doc type = "scenario">
-            Client connects to server and sends an invalid security mechanism. The
-            server must respond by closing the connection (a socket close, with no
-            connection close negotiation).
-          </doc>
-        </rule>
-        <assert check = "notnull" />
-      </field>
-
-      <field name = "response" domain = "longstr" label = "security response data">
-        <doc>
-          A block of opaque data passed to the security mechanism. The contents of this
-          data are defined by the SASL security mechanism.
-        </doc>
-        <assert check = "notnull" />
-      </field>
-
-      <field name = "locale" domain = "shortstr" label = "selected message locale">
-        <doc>
-          A single message locale selected by the client, which must be one of those
-          specified by the server.
-        </doc>
-        <assert check = "notnull" />
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "secure" synchronous = "1" index = "20" label = "security mechanism challenge">
-      <doc>
-        The SASL protocol works by exchanging challenges and responses until both peers have
-        received sufficient information to authenticate each other. This method challenges
-        the client to provide more information.
-      </doc>
-
-      <chassis name = "client" implement = "MUST" />
-      <response name = "secure-ok" />
-
-      <field name = "challenge" domain = "longstr" label = "security challenge data">
-        <doc>
-          Challenge information, a block of opaque binary data passed to the security
-          mechanism.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "secure-ok" synchronous = "1" index = "21" label = "security mechanism response">
-      <doc>
-        This method attempts to authenticate, passing a block of SASL data for the security
-        mechanism at the server side.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "response" domain = "longstr" label = "security response data">
-        <doc>
-          A block of opaque data passed to the security mechanism. The contents of this
-          data are defined by the SASL security mechanism.
-        </doc>
-        <assert check = "notnull" />
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "tune" synchronous = "1" index = "30"
-      label = "propose connection tuning parameters">
-      <doc>
-        This method proposes a set of connection configuration values to the client. The
-        client can accept and/or adjust these.
-      </doc>
-
-      <chassis name = "client" implement = "MUST" />
-
-      <response name = "tune-ok" />
-
-      <field name = "channel-max" domain = "short" label = "proposed maximum channels">
-        <doc>
-          The maximum total number of channels that the server allows per connection. Zero
-          means that the server does not impose a fixed limit, but the number of allowed
-          channels may be limited by available server resources.
-        </doc>
-      </field>
-
-      <field name = "frame-max" domain = "long" label = "proposed maximum frame size">
-        <doc>
-          The largest frame size that the server proposes for the connection. The client
-          can negotiate a lower value. Zero means that the server does not impose any
-          specific limit but may reject very large frames if it cannot allocate resources
-          for them.
-        </doc>
-        <rule name = "minimum">
-          <doc>
-            Until the frame-max has been negotiated, both peers MUST accept frames of up
-            to frame-min-size octets large, and the minimum negotiated value for frame-max
-            is also frame-min-size.
-          </doc>
-          <doc type = "scenario">
-            Client connects to server and sends a large properties field, creating a frame
-            of frame-min-size octets.  The server must accept this frame.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "heartbeat" domain = "short" label = "desired heartbeat delay">
-        <!-- TODO 0.82 - the heartbeat negotiation mechanism was changed during
-             implementation because the model documented here does not actually
-             work properly.  The best model we found is that the server proposes
-             a heartbeat value to the client; the client can reply with zero, meaning
-             'do not use heartbeats (as documented here), or can propose its own
-             heartbeat value, which the server should then accept.  This is different
-             from the model here which is disconnected - e.g. each side requests a
-             heartbeat independently.  Basically a connection is heartbeated in
-             both ways, or not at all, depending on whether both peers support
-             heartbeating or not, and the heartbeat value should itself be chosen
-             by the client so that remote links can get a higher value.  Also, the
-             actual heartbeat mechanism needs documentation, and is as follows: so
-             long as there is activity on a connection - in or out - both peers
-             assume the connection is active.  When there is no activity, each peer
-             must send heartbeat frames.  When no heartbeat frame is received after
-             N cycles (where N is at least 2), the connection can be considered to
-             have died. /PH 2006/07/19
-             -->
-        <doc>
-          The delay, in seconds, of the connection heartbeat that the server wants.
-          Zero means the server does not want a heartbeat.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "tune-ok" synchronous = "1" index = "31"
-      label = "negotiate connection tuning parameters">
-      <doc>
-        This method sends the client's connection tuning parameters to the server.
-        Certain fields are negotiated, others provide capability information.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "channel-max" domain = "short" label = "negotiated maximum channels">
-        <doc>
-          The maximum total number of channels that the client will use per connection.
-        </doc>
-        <rule name = "upper-limit">
-          <doc>
-            If the client specifies a channel max that is higher than the value provided
-            by the server, the server MUST close the connection without attempting a
-            negotiated close.  The server may report the error in some fashion to assist
-            implementors.
-          </doc>
-        </rule>
-        <assert check = "notnull" />
-        <assert check = "le" method = "tune" field = "channel-max" />
-      </field>
-
-      <field name = "frame-max" domain = "long" label = "negotiated maximum frame size">
-        <doc>
-          The largest frame size that the client and server will use for the connection.
-          Zero means that the client does not impose any specific limit but may reject
-          very large frames if it cannot allocate resources for them. Note that the
-          frame-max limit applies principally to content frames, where large contents can
-          be broken into frames of arbitrary size.
-        </doc>
-        <rule name = "minimum">
-          <doc>
-            Until the frame-max has been negotiated, both peers MUST accept frames of up
-            to frame-min-size octets large, and the minimum negotiated value for frame-max
-            is also frame-min-size.
-          </doc>
-        </rule>
-        <rule name = "upper-limit">
-          <doc>
-            If the client specifies a frame max that is higher than the value provided
-            by the server, the server MUST close the connection without attempting a
-            negotiated close. The server may report the error in some fashion to assist
-            implementors.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "heartbeat" domain = "short" label = "desired heartbeat delay">
-        <doc>
-          The delay, in seconds, of the connection heartbeat that the client wants. Zero
-          means the client does not want a heartbeat.
-        </doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "open" synchronous = "1" index = "40" label = "open connection to virtual host">
-      <doc>
-        This method opens a connection to a virtual host, which is a collection of
-        resources, and acts to separate multiple application domains within a server.
-        The server may apply arbitrary limits per virtual host, such as the number
-        of each type of entity that may be used, per connection and/or in total.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "open-ok" />
-      <response name = "redirect" />
-
-      <field name = "virtual-host" domain = "path" label = "virtual host name">
-        <!-- TODO 0.82 - the entire vhost model needs review. This concept was
-             prompted by the HTTP vhost concept but does not fit very well into
-             AMQP.  Currently we use the vhost as a "cluster identifier" which is
-             inaccurate usage. /PH 2006/07/19
-             -->
-        <assert check = "regexp" value = "^[a-zA-Z0-9/-_]+$" />
-        <doc>
-          The name of the virtual host to work with.
-        </doc>
-        <rule name = "separation">
-          <doc>
-            If the server supports multiple virtual hosts, it MUST enforce a full
-            separation of exchanges, queues, and all associated entities per virtual
-            host. An application, connected to a specific virtual host, MUST NOT be able
-            to access resources of another virtual host.
-          </doc>
-        </rule>
-        <rule name = "security">
-          <doc>
-            The server SHOULD verify that the client has permission to access the
-            specified virtual host.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "capabilities" domain = "shortstr" label = "required capabilities">
-        <doc>
-          The client can specify zero or more capability names, delimited by spaces.
-          The server can use this string to how to process the client's connection
-          request.
-        </doc>
-      </field>
-
-      <field name = "insist" domain = "bit" label = "insist on connecting to server">
-        <doc>
-          In a configuration with multiple collaborating servers, the server may respond
-          to a Connection.Open method with a Connection.Redirect. The insist option tells
-          the server that the client is insisting on a connection to the specified server.
-        </doc>
-        <rule name = "behaviour">
-          <doc>
-            When the client uses the insist option, the server MUST NOT respond with a
-            Connection.Redirect method.  If it cannot accept the client's connection
-            request it should respond by closing the connection with a suitable reply
-            code.
-          </doc>
-        </rule>
-      </field>
-    </method>
-
-    <method name = "open-ok" synchronous = "1" index = "41" label = "signal that connection is ready">
-      <doc>
-        This method signals to the client that the connection is ready for use.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-      <field name = "known-hosts" domain = "known-hosts" />
-    </method>
-
-    <method name = "redirect" synchronous = "1" index = "42" label = "redirects client to other server">
-      <doc>
-        This method redirects the client to another server, based on the requested virtual
-        host and/or capabilities.
-      </doc>
-      <rule name = "usage">
-        <doc>
-          When getting the Connection.Redirect method, the client SHOULD reconnect to
-          the host specified, and if that host is not present, to any of the hosts
-          specified in the known-hosts list.
-        </doc>
-      </rule>
-      <chassis name = "client" implement = "MUST" />
-      <field name = "host" domain = "shortstr" label = "server to connect to">
-        <doc>
-          Specifies the server to connect to. This is an IP address or a DNS name,
-          optionally followed by a colon and a port number. If no port number is
-          specified, the client should use the default port number for the protocol.
-        </doc>
-        <assert check = "notnull" />
-      </field>
-      <field name = "known-hosts" domain = "known-hosts" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "close" synchronous = "1" index = "50" label = "request a connection close">
-      <doc>
-        This method indicates that the sender wants to close the connection. This may be
-        due to internal conditions (e.g. a forced shut-down) or due to an error handling
-        a specific method, i.e. an exception. When a close is due to an exception, the
-        sender provides the class and method id of the method which caused the exception.
-      </doc>
-      <!-- TODO: the connection close mechanism needs to be reviewed from the ODF
-           documentation and better expressed as rules here. /PH 2006/07/20
-           -->
-      <rule name = "stability">
-        <doc>
-          After sending this method any received method except the Close-OK method MUST
-          be discarded.
-        </doc>
-      </rule>
-
-      <chassis name = "client" implement = "MUST" />
-      <chassis name = "server" implement = "MUST" />
-      <response name = "close-ok" />
-
-      <field name = "reply-code" domain = "reply-code" />
-      <field name = "reply-text" domain = "reply-text" />
-
-      <field name = "class-id" domain = "class-id" label = "failing method class">
-        <doc>
-          When the close is provoked by a method exception, this is the class of the
-          method.
-        </doc>
-      </field>
-
-      <field name = "method-id" domain = "method-id" label = "failing method ID">
-        <doc>
-          When the close is provoked by a method exception, this is the ID of the method.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "close-ok" synchronous = "1" index = "51" label = "confirm a connection close">
-      <doc>
-        This method confirms a Connection.Close method and tells the recipient that it is
-        safe to release resources for the connection and close the socket.
-      </doc>
-      <rule name = "reporting">
-        <doc>
-          A peer that detects a socket closure without having received a Close-Ok
-          handshake method SHOULD log the error.
-        </doc>
-      </rule>
-      <chassis name = "client" implement = "MUST" />
-      <chassis name = "server" implement = "MUST" />
-    </method>
-  </class>
-
-  <!-- ==  CHANNEL  ========================================================== -->
-
-  <class name = "channel" handler = "channel" index = "20" label = "work with channels">
-    <doc>
-      The channel class provides methods for a client to establish a channel to a
-      server and for both peers to operate the channel thereafter.
-    </doc>
-
-    <doc type = "grammar">
-      channel             = open-channel *use-channel close-channel
-      open-channel        = C:OPEN S:OPEN-OK
-                          / C:RESUME S:OK
-      use-channel         = C:FLOW S:FLOW-OK
-                          / S:FLOW C:FLOW-OK
-                          / S:PING C:OK
-                          / C:PONG S:OK
-                          / C:PING S:OK
-                          / S:PONG C:OK
-                          / functional-class
-      close-channel       = C:CLOSE S:CLOSE-OK
-                          / S:CLOSE C:CLOSE-OK
-    </doc>
-
-    <chassis name = "server" implement = "MUST" />
-    <chassis name = "client" implement = "MUST" />
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "open" synchronous = "1" index = "10" label = "open a channel for use">
-      <doc>
-        This method opens a channel to the server.
-      </doc>
-      <rule name = "state" on-failure = "channel-error">
-        <doc>
-          The client MUST NOT use this method on an already-opened channel.
-        </doc>
-        <doc type = "scenario">
-          Client opens a channel and then reopens the same channel.
-        </doc>
-      </rule>
-      <chassis name = "server" implement = "MUST" />
-      <response name = "open-ok" />
-      <field name = "out-of-band" domain = "shortstr" label = "out-of-band settings">
-        <doc>
-          Configures out-of-band transfers on this channel. The syntax and meaning of this
-          field will be formally defined at a later date.
-        </doc>
-        <assert check = "null" />
-      </field>
-    </method>
-
-    <method name = "open-ok" synchronous = "1" index = "11" label = "signal that the channel is ready">
-      <doc>
-        This method signals to the client that the channel is ready for use.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-      <field name = "channel-id" domain = "channel-id" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "flow" synchronous = "1" index = "20" label = "enable/disable flow from peer">
-      <doc>
-        This method asks the peer to pause or restart the flow of content data. This is a
-        simple flow-control mechanism that a peer can use to avoid overflowing its queues or
-        otherwise finding itself receiving more messages than it can process. Note that this
-        method is not intended for window control. The peer that receives a disable flow
-        method should finish sending the current content frame, if any, then pause.
-      </doc>
-
-      <rule name = "initial-state">
-        <doc>
-          When a new channel is opened, it is active (flow is active). Some applications
-          assume that channels are inactive until started. To emulate this behaviour a
-          client MAY open the channel, then pause it.
-        </doc>
-      </rule>
-
-      <rule name = "bidirectional">
-        <doc>
-          When sending content frames, a peer SHOULD monitor the channel for incoming
-          methods and respond to a Channel.Flow as rapidly as possible.
-        </doc>
-      </rule>
-
-      <rule name = "throttling">
-        <doc>
-          A peer MAY use the Channel.Flow method to throttle incoming content data for
-          internal reasons, for example, when exchanging data over a slower connection.
-        </doc>
-      </rule>
-
-      <rule name = "expected-behaviour">
-        <doc>
-          The peer that requests a Channel.Flow method MAY disconnect and/or ban a peer
-          that does not respect the request.  This is to prevent badly-behaved clients
-          from overwhelming a broker.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-
-      <response name = "flow-ok" />
-
-      <field name = "active" domain = "bit" label = "start/stop content frames">
-        <doc>
-          If 1, the peer starts sending content frames. If 0, the peer stops sending
-          content frames.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "flow-ok" index = "21" label = "confirm a flow method">
-      <doc>
-        Confirms to the peer that a flow command was received and processed.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-      <field name = "active" domain = "bit" label = "current flow setting">
-        <doc>
-          Confirms the setting of the processed flow method: 1 means the peer will start
-          sending or continue to send content frames; 0 means it will not.
-        </doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "close" synchronous = "1" index = "40" label = "request a channel close">
-      <doc>
-        This method indicates that the sender wants to close the channel. This may be due to
-        internal conditions (e.g. a forced shut-down) or due to an error handling a specific
-        method, i.e. an exception. When a close is due to an exception, the sender provides
-        the class and method id of the method which caused the exception.
-      </doc>
-
-      <!-- TODO: the channel close behaviour needs to be reviewed from the ODF
-           documentation and better expressed as rules here. /PH 2006/07/20
-           -->
-      <rule name = "stability">
-        <doc>
-          After sending this method any received method except the Close-OK method MUST
-          be discarded.
-        </doc>
-      </rule>
-
-      <chassis name = "client" implement = "MUST" />
-      <chassis name = "server" implement = "MUST" />
-      <response name = "close-ok" />
-
-      <field name = "reply-code" domain = "reply-code" />
-      <field name = "reply-text" domain = "reply-text" />
-
-      <field name = "class-id" domain = "class-id" label = "failing method class">
-        <doc>
-          When the close is provoked by a method exception, this is the class of the
-          method.
-        </doc>
-      </field>
-
-      <field name = "method-id" domain = "method-id" label = "failing method ID">
-        <doc>
-          When the close is provoked by a method exception, this is the ID of the method.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "close-ok" synchronous = "1" index = "41" label = "confirm a channel close">
-      <doc>
-        This method confirms a Channel.Close method and tells the recipient that it is safe
-        to release resources for the channel.
-      </doc>
-      <rule name = "reporting">
-        <doc>
-          A peer that detects a socket closure without having received a Channel.Close-Ok
-          handshake method SHOULD log the error.
-        </doc>
-      </rule>
-      <chassis name = "client" implement = "MUST" />
-      <chassis name = "server" implement = "MUST" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "resume" index = "50" label = "resume an interrupted channel">
-      <doc>
-        This method resume a previously interrupted channel.
-      </doc>
-      <response name = "ok" />
-      <chassis name = "server" implement = "MAY" />
-      <field name = "channel-id" domain = "channel-id" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "ping" index = "60" label = "[WORK IN PROGRESS] initiates a pong">
-      <doc>
-        [WORK IN PROGRESS] Request that the recipient issue a pong request.
-      </doc>
-      <response name = "ok" />
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-    </method>
-
-    <method name = "pong" index = "70" label = "[WORK IN PROGRESS] issued after receiving a ping">
-      <doc>
-        [WORK IN PROGRESS] Issued after a ping request is received. Note that this is a
-        request issued after receiving a ping, not a response to
-        receiving a ping.
-      </doc>
-      <response name = "ok" />
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-    </method>
-
-    <method name = "ok" index = "80" label = "[WORK IN PROGRESS] signals normal completion">
-      <doc>
-        [WORK IN PROGRESS] Signals normal completion of a method.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-    </method>
-  </class>
-
-  <!-- ==  ACCESS  =========================================================== -->
-
-  <!-- TODO 0.82 - this class must be implemented by two teams before we can
-       consider it matured.
-    -->
-
-  <class name = "access" handler = "connection" index = "30" label = "work with access tickets">
-    <doc>
-      The protocol control access to server resources using access tickets. A
-      client must explicitly request access tickets before doing work. An access
-      ticket grants a client the right to use a specific set of resources -
-      called a "realm" - in specific ways.
-    </doc>
-
-    <doc type = "grammar">
-      access              = C:REQUEST S:REQUEST-OK
-    </doc>
-
-    <chassis name = "server" implement = "MUST" />
-    <chassis name = "client" implement = "MUST" />
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "request" synchronous = "1" index = "10" label = "request an access ticket">
-      <doc>
-        This method requests an access ticket for an access realm. The server
-        responds by granting the access ticket. If the client does not have
-        access rights to the requested realm this causes a connection exception.
-        Access tickets are a per-channel resource.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "request-ok" />
-
-      <field name = "realm" domain = "shortstr" label = "name of requested realm">
-        <doc>
-          Specifies the name of the realm to which the client is requesting access.
-          The realm is a configured server-side object that collects a set of
-          resources (exchanges, queues, etc.).  If the channel has already requested
-          an access ticket onto this realm, the previous ticket is destroyed and a
-          new ticket is created with the requested access rights, if allowed.
-        </doc>
-        <rule name = "validity" on-failure = "access-refused">
-          <doc>
-            The client MUST specify a realm that is known to the server.  The server
-            makes an identical response for undefined realms as it does for realms
-            that are defined but inaccessible to this client.
-          </doc>
-          <doc type = "scenario">
-            Client specifies an undefined realm.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "exclusive" domain = "bit" label = "request exclusive access">
-        <doc>
-          Request exclusive access to the realm, meaning that this will be the only
-          channel that uses the realm's resources.
-        </doc>
-        <rule name = "validity" on-failure = "access-refused">
-          <doc>
-            The client MAY NOT request exclusive access to a realm that has active
-            access tickets, unless the same channel already had the only access
-            ticket onto that realm.
-          </doc>
-          <doc type = "scenario">
-            Client opens two channels and requests exclusive access to the same realm.
-          </doc>
-        </rule>
-      </field>
-      <field name = "passive" domain = "bit" label = "request passive access">
-        <doc>
-          Request message passive access to the specified access realm. Passive
-          access lets a client get information about resources in the realm but
-          not to make any changes to them.
-        </doc>
-      </field>
-      <field name = "active" domain = "bit" label = "request active access">
-        <doc>
-          Request message active access to the specified access realm. Active access lets
-          a client get create and delete resources in the realm.
-        </doc>
-      </field>
-      <field name = "write" domain = "bit" label = "request write access">
-        <doc>
-          Request write access to the specified access realm. Write access lets a client
-          publish messages to all exchanges in the realm.
-        </doc>
-      </field>
-      <field name = "read" domain = "bit" label = "request read access">
-        <doc>
-          Request read access to the specified access realm. Read access lets a client
-          consume messages from queues in the realm.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "request-ok" synchronous = "1" index = "11" label = "grant access to server resources">
-      <doc>
-        This method provides the client with an access ticket. The access ticket is valid
-        within the current channel and for the lifespan of the channel.
-      </doc>
-      <rule name = "per-channel" on-failure = "not-allowed">
-        <doc>
-          The client MUST NOT use access tickets except within the same channel as
-          originally granted.
-        </doc>
-        <doc type = "scenario">
-          Client opens two channels, requests a ticket on one channel, and then
-          tries to use that ticket in a second channel.
-        </doc>
-      </rule>
-      <chassis name = "client" implement = "MUST" />
-      <field name = "ticket" domain = "access-ticket" />
-    </method>
-  </class>
-
-  <!-- ==  EXCHANGE  ========================================================= -->
-
-  <class name = "exchange" handler = "channel" index = "40" label = "work with exchanges">
-    <doc>
-      Exchanges match and distribute messages across queues. Exchanges can be configured in
-      the server or created at runtime.
-    </doc>
-
-    <doc type = "grammar">
-      exchange            = C:DECLARE  S:DECLARE-OK
-                          / C:DELETE   S:DELETE-OK
-    </doc>
-
-    <chassis name = "server" implement = "MUST" />
-    <chassis name = "client" implement = "MUST" />
-
-    <rule name = "required-types">
-      <doc>
-        The server MUST implement these standard exchange types: fanout, direct.
-      </doc>
-      <doc type = "scenario">
-        Client attempts to declare an exchange with each of these standard types.
-      </doc>
-    </rule>
-    <rule name = "recommended-types">
-      <doc>
-        The server SHOULD implement these standard exchange types: topic, headers.
-      </doc>
-      <doc type = "scenario">
-        Client attempts to declare an exchange with each of these standard types.
-      </doc>
-    </rule>
-    <rule name = "required-instances">
-      <doc>
-        The server MUST, in each virtual host, pre-declare an exchange instance
-        for each standard exchange type that it implements, where the name of the
-        exchange instance, if defined, is "amq." followed by the exchange type name.
-      </doc>
-      <doc>
-        The server MUST, in each virtual host, pre-declare at least two direct
-        exchange instances: one named "amq.direct", the other with no public name
-        that serves as a default  exchange for Publish methods.
-      </doc>
-      <doc type = "scenario">
-        Client creates a temporary queue and attempts to bind to each required
-        exchange instance ("amq.fanout", "amq.direct", "amq.topic", and "amq.headers"
-        if those types are defined).
-      </doc>
-    </rule>
-    <rule name = "default-exchange">
-      <doc>
-        The server MUST pre-declare a direct exchange with no public name to act as
-        the default exchange for content Publish methods and for default queue bindings.
-      </doc>
-      <doc type = "scenario">
-        Client checks that the default exchange is active by specifying a queue
-        binding with no exchange name, and publishing a message with a suitable
-        routing key but without specifying the exchange name, then ensuring that
-        the message arrives in the queue correctly.
-      </doc>
-    </rule>
-    <rule name = "default-access">
-      <doc>
-        The server MUST NOT allow clients to access the default exchange except
-        by specifying an empty exchange name in the Queue.Bind and content Publish
-        methods.
-      </doc>
-    </rule>
-    <rule name = "extensions">
-      <doc>
-        The server MAY implement other exchange types as wanted.
-      </doc>
-    </rule>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "declare" synchronous = "1" index = "10" label = "verify exchange exists, create if needed">
-      <doc>
-        This method creates an exchange if it does not already exist, and if the exchange
-        exists, verifies that it is of the correct and expected class.
-      </doc>
-      <rule name = "minimum">
-        <doc>
-          The server SHOULD support a minimum of 16 exchanges per virtual host and
-          ideally, impose no limit except as defined by available resources.
-        </doc>
-        <doc type = "scenario">
-          The client creates as many exchanges as it can until the server reports
-          an error; the number of exchanges successfully created must be at least
-          sixteen.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "declare-ok" />
-
-      <field name = "ticket" domain = "access-ticket">
-        <doc>
-          When a client defines a new exchange, this belongs to the access realm of the
-          ticket used. All further work done with that exchange must be done with an
-          access ticket for the same realm.
-        </doc>
-        <rule name = "validity" on-failure = "access-refused">
-          <doc>
-            The client MUST provide a valid access ticket giving "active" access to
-            the realm in which the exchange exists or will be created, or "passive"
-            access if the if-exists flag is set.
-          </doc>
-          <doc type = "scenario">
-            Client creates access ticket with wrong access rights and attempts to use
-            in this method.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "exchange" domain = "exchange-name">
-        <rule name = "reserved" on-failure = "access-refused">
-          <doc>
-            Exchange names starting with "amq." are reserved for pre-declared and
-            standardised exchanges. The client MUST NOT attempt to create an exchange
-            starting with "amq.".
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-        <assert check = "regexp" value = "^[a-zA-Z0-9-_.:]+$" />
-      </field>
-
-      <field name = "type" domain = "shortstr" label = "exchange type">
-        <doc>
-          Each exchange belongs to one of a set of exchange types implemented by the
-          server. The exchange types define the functionality of the exchange - i.e. how
-          messages are routed through it. It is not valid or meaningful to attempt to
-          change the type of an existing exchange.
-        </doc>
-        <rule name = "typed" on-failure = "not-allowed">
-          <doc>
-            Exchanges cannot be redeclared with different types.  The client MUST not
-            attempt to redeclare an existing exchange with a different type than used
-            in the original Exchange.Declare method.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-        <rule name = "support" on-failure = "command-invalid">
-          <doc>
-            The client MUST NOT attempt to create an exchange with a type that the
-            server does not support.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-        <assert check = "regexp" value = "^[a-zA-Z0-9-_.:]+$" />
-      </field>
-
-      <field name = "passive" domain = "bit" label = "do not create exchange">
-        <doc>
-          If set, the server will not create the exchange. The client can use this to
-          check whether an exchange exists without modifying the server state.
-        </doc>
-        <rule name = "not-found">
-          <doc>
-            If set, and the exchange does not already exist, the server MUST raise a
-            channel exception with reply code 404 (not found).
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "durable" domain = "bit" label = "request a durable exchange">
-        <doc>
-          If set when creating a new exchange, the exchange will be marked as durable.
-          Durable exchanges remain active when a server restarts. Non-durable exchanges
-          (transient exchanges) are purged if/when a server restarts.
-        </doc>
-        <rule name = "support">
-          <doc>
-            The server MUST support both durable and transient exchanges.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-        <rule name = "sticky">
-          <doc>
-            The server MUST ignore the durable field if the exchange already exists.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-
-      <!-- TODO 0.82 - clarify how this works; there is no way to cancel a binding
-           except by deleting a queue.
-         -->
-      <field name = "auto-delete" domain = "bit" label = "auto-delete when unused">
-        <doc>
-          If set, the exchange is deleted when all queues have finished using it.
-        </doc>
-        <rule name = "sticky">
-          <doc>
-            The server MUST ignore the auto-delete field if the exchange already
-            exists.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "internal" domain = "bit" label = "create internal exchange">
-        <doc>
-          If set, the exchange may not be used directly by publishers, but only when bound
-          to other exchanges. Internal exchanges are used to construct wiring that is not
-          visible to applications.
-        </doc>
-      </field>
-
-      <field name = "nowait" domain = "bit" label = "do not send reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-
-      <field name = "arguments" domain = "table" label = "arguments for declaration">
-        <doc>
-          A set of arguments for the declaration. The syntax and semantics of these
-          arguments depends on the server implementation. This field is ignored if passive
-          is 1.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "declare-ok" synchronous = "1" index = "11" label = "confirm exchange declaration">
-      <doc>
-        This method confirms a Declare method and confirms the name of the exchange,
-        essential for automatically-named exchanges.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "delete" synchronous = "1" index = "20" label = "delete an exchange">
-      <doc>
-        This method deletes an exchange. When an exchange is deleted all queue bindings on
-        the exchange are cancelled.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "delete-ok" />
-
-      <field name = "ticket" domain = "access-ticket">
-        <rule name = "validity" on-failure = "access-refused">
-          <doc>
-            The client MUST provide a valid access ticket giving "active" access
-            rights to the exchange's access realm.
-          </doc>
-          <doc type = "scenario">
-            Client creates access ticket with wrong access rights and attempts to use
-            in this method.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "exchange" domain = "exchange-name">
-        <rule name = "exists" on-failure = "not-found">
-          <doc>
-            The client MUST NOT attempt to delete an exchange that does not exist.
-          </doc>
-        </rule>
-        <assert check = "notnull" />
-      </field>
-
-      <!-- TODO 0.82 - discuss whether this option is useful or not.  I don't have
-           any real use case for it. /PH 2006-07-23.
-         -->
-      <field name = "if-unused" domain = "bit" label = "delete only if unused">
-        <doc>
-          If set, the server will only delete the exchange if it has no queue bindings. If
-          the exchange has queue bindings the server does not delete it but raises a
-          channel exception instead.
-        </doc>
-      </field>
-
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "delete-ok" synchronous = "1" index = "21"
-      label = "confirm deletion of an exchange">
-      <doc>This method confirms the deletion of an exchange.</doc>
-      <chassis name = "client" implement = "MUST" />
-    </method>
-  </class>
-
-  <!-- ==  QUEUE  ============================================================ -->
-
-  <class name = "queue" handler = "channel" index = "50" label = "work with queues">
-    <doc>
-      Queues store and forward messages. Queues can be configured in the server or created at
-      runtime. Queues must be attached to at least one exchange in order to receive messages
-      from publishers.
-    </doc>
-
-    <doc type = "grammar">
-      queue               = C:DECLARE  S:DECLARE-OK
-                          / C:BIND     S:BIND-OK
-                          / C:PURGE    S:PURGE-OK
-                          / C:DELETE   S:DELETE-OK
-    </doc>
-
-    <chassis name = "server" implement = "MUST" />
-    <chassis name = "client" implement = "MUST" />
-
-    <rule name = "any-content">
-      <doc>
-        A server MUST allow any content class to be sent to any queue, in any mix, and
-        queue and deliver these content classes independently. Note that all methods
-        that fetch content off queues are specific to a given content class.
-      </doc>
-      <doc type = "scenario">
-        Client creates an exchange of each standard type and several queues that
-        it binds to each exchange. It must then successfully send each of the standard
-        content types to each of the available queues.
-      </doc>
-    </rule>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "declare" synchronous = "1" index = "10" label = "declare queue, create if needed">
-      <doc>
-        This method creates or checks a queue. When creating a new queue the client can
-        specify various properties that control the durability of the queue and its
-        contents, and the level of sharing for the queue.
-      </doc>
-
-      <rule name = "default-binding">
-        <doc>
-          The server MUST create a default binding for a newly-created queue to the
-          default exchange, which is an exchange of type 'direct' and use the queue
-          name as the routing key.
-        </doc>
-        <doc type = "scenario">
-          Client creates a new queue, and then without explicitly binding it to an
-          exchange, attempts to send a message through the default exchange binding,
-          i.e. publish a message to the empty exchange, with the queue name as routing
-          key.
-        </doc>
-      </rule>
-
-      <!-- Rule test name: was "amq_queue_35" -->
-      <rule name = "minimum-queues">
-        <doc>
-          The server SHOULD support a minimum of 256 queues per virtual host and ideally,
-          impose no limit except as defined by available resources.
-        </doc>
-        <doc type = "scenario">
-          Client attempts to create as many queues as it can until the server reports
-          an error.  The resulting count must at least be 256.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "declare-ok" />
-
-      <field name = "ticket" domain = "access-ticket">
-        <doc>
-          When a client defines a new queue, this belongs to the access realm of the
-          ticket used. All further work done with that queue must be done with an access
-          ticket for the same realm.
-        </doc>
-        <rule name = "validity" on-failure = "access-refused">
-          <doc>
-            The client MUST provide a valid access ticket giving "active" access to
-            the realm in which the queue exists or will be created.
-          </doc>
-          <doc type = "scenario">
-            Client creates access ticket with wrong access rights and attempts to use
-            in this method.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "queue" domain = "queue-name">
-        <rule name = "default-name">
-          <doc>
-            The queue name MAY be empty, in which case the server MUST create a new
-            queue with a unique generated name and return this to the client in the
-            Declare-Ok method.
-          </doc>
-          <doc type = "scenario">
-            Client attempts to create several queues with an empty name. The client then
-            verifies that the server-assigned names are unique and different.
-          </doc>
-        </rule>
-        <rule name = "reserved-prefix" on-failure = "not-allowed">
-          <doc>
-            Queue names starting with "amq." are reserved for pre-declared and
-            standardised server queues. A client MAY NOT attempt to declare a queue with a
-            name  that starts with "amq." and the passive option set to zero.
-          </doc>
-          <doc type = "scenario">
-            A client attempts to create a queue with a name starting with "amq." and with
-            the passive option set to zero.
-          </doc>
-        </rule>
-        <assert check = "regexp" value = "^[a-zA-Z0-9-_.:]*$" />
-      </field>
-
-      <field name = "passive" domain = "bit" label = "do not create queue">
-        <doc>
-          If set, the server will not create the queue. This field allows the client
-          to assert the presence of a queue without modifying the server state.
-        </doc>
-        <rule name = "passive" on-failure = "not-found">
-          <doc>
-            The client MAY ask the server to assert that a queue exists without
-            creating the queue if not.  If the queue does not exist, the server
-            treats this as a failure.
-          </doc>
-          <doc type = "scenario">
-            Client declares an existing queue with the passive option and expects
-            the server to respond with a declare-ok. Client then attempts to declare
-            a non-existent queue with the passive option, and the server must close
-            the channel with the correct reply-code.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "durable" domain = "bit" label = "request a durable queue">
-        <doc>
-          If set when creating a new queue, the queue will be marked as durable. Durable
-          queues remain active when a server restarts. Non-durable queues (transient
-          queues) are purged if/when a server restarts. Note that durable queues do not
-          necessarily hold persistent messages, although it does not make sense to send
-          persistent messages to a transient queue.
-        </doc>
-        <!-- Rule test name: was "amq_queue_03" -->
-        <rule name = "persistence">
-          <doc>The server MUST recreate the durable queue after a restart.</doc>
-
-          <!-- TODO: use 'client does something' rather than 'a client does something'. -->
-          <doc type = "scenario">
-            A client creates a durable queue. The server is then restarted. The client
-            then attempts to send a message to the queue. The message should be successfully
-            delivered.
-          </doc>
-        </rule>
-        <!-- Rule test name: was "amq_queue_36" -->
-        <rule name = "types">
-          <doc>The server MUST support both durable and transient queues.</doc>
-          <doc type = "scenario">
-            A client creates two named queues, one durable and one transient.
-          </doc>
-        </rule>
-        <!-- Rule test name: was "amq_queue_37" -->    
-        <rule name = "pre-existence">
-          <doc>The server MUST ignore the durable field if the queue already exists.</doc>
-          <doc type = "scenario">
-            A client creates two named queues, one durable and one transient. The client
-            then attempts to declare the two queues using the same names again, but reversing
-            the value of the durable flag in each case. Verify that the queues still exist
-            with the original durable flag values.
-            <!-- TODO: but how? -->
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "exclusive" domain = "bit" label = "request an exclusive queue">
-        <doc>
-          Exclusive queues may only be consumed from by the current connection. Setting
-          the 'exclusive' flag always implies 'auto-delete'.
-        </doc>
-
-        <!-- Rule test name: was "amq_queue_38" -->
-        <rule name = "types">
-          <doc>
-            The server MUST support both exclusive (private) and non-exclusive (shared)
-            queues.
-          </doc>
-          <doc type = "scenario">
-            A client creates two named queues, one exclusive and one non-exclusive.
-          </doc>
-        </rule>
-
-        <!-- Rule test name: was "amq_queue_04" -->    
-        <rule name = "02" on-failure = "channel-error">
-          <doc>
-            The client MAY NOT attempt to declare any existing and exclusive queue
-            on multiple connections.
-          </doc>
-          <doc type = "scenario">
-            A client declares an exclusive named queue. A second client on a different
-            connection attempts to declare a queue of the same name.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "auto-delete" domain = "bit" label = "auto-delete queue when unused">
-        <doc>
-          If set, the queue is deleted when all consumers have finished using it. Last
-          consumer can be cancelled either explicitly or because its channel is closed. If
-          there was no consumer ever on the queue, it won't be deleted.
-        </doc>
-
-        <!-- Rule test name: was "amq_queue_31" -->
-        <rule name = "pre-existence">
-          <doc>
-            The server MUST ignore the auto-delete field if the queue already exists.
-          </doc>
-          <doc type = "scenario">
-            A client creates two named queues, one as auto-delete and one explicit-delete.
-            The client then attempts to declare the two queues using the same names again,
-            but reversing the value of the auto-delete field in each case. Verify that the
-            queues still exist with the original auto-delete flag values.
-            <!-- TODO: but how? -->
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-
-      <field name = "arguments" domain = "table" label = "arguments for declaration">
-        <doc>
-          A set of arguments for the declaration. The syntax and semantics of these
-          arguments depends on the server implementation. This field is ignored if passive
-          is 1.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "declare-ok" synchronous = "1" index = "11" label = "confirms a queue definition">
-      <doc>
-        This method confirms a Declare method and confirms the name of the queue, essential
-        for automatically-named queues.
-      </doc>
-      
-      <chassis name = "client" implement = "MUST" />
-      
-      <field name = "queue" domain = "queue-name">
-        <doc>
-          Reports the name of the queue. If the server generated a queue name, this field
-          contains that name.
-        </doc>
-        <assert check = "notnull" />
-      </field>
-
-      <field name = "message-count" domain = "long" label = "number of messages in queue">
-        <doc>
-          Reports the number of messages in the queue, which will be zero for
-          newly-created queues.
-        </doc>
-      </field>
-      
-      <field name = "consumer-count" domain = "long" label = "number of consumers">
-        <doc>
-          Reports the number of active consumers for the queue. Note that consumers can
-          suspend activity (Channel.Flow) in which case they do not appear in this count.
-        </doc>
-      </field>
-    </method>
-    
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "bind" synchronous = "1" index = "20" label = "bind queue to an exchange">
-      <doc>
-        This method binds a queue to an exchange. Until a queue is bound it will not receive
-        any messages. In a classic messaging model, store-and-forward queues are bound to a
-        direct exchange and subscription queues are bound to a topic exchange.
-      </doc>
-
-      <!-- Rule test name: was "amq_queue_25" -->
-      <rule name = "duplicates">
-        <doc>
-          A server MUST allow ignore duplicate bindings - that is, two or more bind
-          methods for a specific queue, with identical arguments - without treating these
-          as an error.
-        </doc>
-        <doc type = "scenario">
-          A client binds a named queue to an exchange. The client then repeats the bind
-          (with identical arguments).
-        </doc>
-      </rule>
-
-      <!-- Rule test name: was "amq_queue_39" -->
-      <rule name = "failure">
-        <!--
-        TODO: Find correct on-failure code. The on-failure code returned should depend on why the bind
-        failed. Assuming that failures owing to bad parameters are covered in the rules relating
-        to those parameters, the only remaining reason for a failure would be the lack of
-        server resorces or some internal error - such as too many queues open. Would these
-        cases qualify as "resource error" 506 or "internal error" 541?
-        -->
-        <doc>If a bind fails, the server MUST raise a connection exception.</doc>
-        <doc type = "scenario">
-          TODO
-        </doc>
-      </rule>
-
-      <!-- Rule test name: was "amq_queue_12" -->
-      <rule name = "transient-exchange" on-failure = "not-allowed">
-        <doc>
-          The server MUST NOT allow a durable queue to bind to a transient exchange.
-        </doc>
-        <doc type = "scenario">
-          A client creates a transient exchange. The client then declares a named durable
-          queue and then attempts to bind the transient exchange to the durable queue.
-        </doc>
-      </rule>
-
-      <!-- Rule test name: was "amq_queue_13" -->
-      <rule name = "durable-exchange">
-        <doc>
-          Bindings for durable queues are automatically durable and the server SHOULD
-          restore such bindings after a server restart.
-        </doc>
-        <doc type = "scenario">
-          A server creates a named durable queue and binds it to a durable exchange. The
-          server is restarted. The client then attempts to use the queue/exchange combination.
-        </doc>
-      </rule>
-
-      <!-- Rule test name: was "amq_queue_17" -->
-      <rule name = "internal-exchange">
-        <doc>
-          If the client attempts to bind to an exchange that was declared as internal, the server
-          MUST raise a connection exception with reply code 530 (not allowed).
-        </doc>
-        <doc type = "scenario">
-          A client attempts to bind a named queue to an internal exchange.
-        </doc>
-      </rule>
-
-      <!-- Rule test name: was "amq_queue_40" -->
-      <rule name = "binding-count">
-        <doc>
-          The server SHOULD support at least 4 bindings per queue, and ideally, impose no
-          limit except as defined by available resources.
-        </doc>
-        <doc type = "scenario">
-          A client creates a named queue and attempts to bind it to 4 different non-internal
-          exchanges.
-        </doc>
-      </rule>
-      
-      <chassis name = "server" implement = "MUST" />
-
-      <response name = "bind-ok" />
-      
-      <field name = "ticket" domain = "access-ticket">
-        <doc>
-          The client provides a valid access ticket giving "active" access rights to the
-          queue's access realm.
-        </doc>
-      </field>
-      
-      <field name = "queue" domain = "queue-name">
-        <doc>
-          Specifies the name of the queue to bind. If the queue name is empty, refers to
-          the current queue for the channel, which is the last declared queue.
-        </doc>
-        
-        <rule name = "empty-queue" on-failure = "not-allowed">
-          <doc>
-            A client MUST NOT be allowed to bind a non-existent and unnamed queue (i.e.
-            empty queue name) to an exchange.
-          </doc>
-          <doc type = "scenario">
-            A client attempts to bind with an unnamed (empty) queue name to an exchange.
-          </doc>
-        </rule>
-        
-        <!-- Rule test name: was "amq_queue_26" -->    
-        <rule name = "queue-existence" on-failure = "not-found">
-          <doc>
-            A client MUST NOT be allowed to bind a non-existent queue (i.e. not previously
-            declared) to an exchange.
-          </doc>
-          <doc type = "scenario">
-            A client attempts to bind an undeclared queue name to an exchange.
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "exchange" domain = "exchange-name" label = "name of the exchange to bind to">
-        <!-- Rule test name: was "amq_queue_14" -->    
-        <rule name = "exchange-existence" on-failure = "not-found">
-          <doc>
-            A client MUST NOT be allowed to bind a queue to a non-existent exchange.
-          </doc>
-          <doc type = "scenario">
-            A client attempts to bind an named queue to a undeclared exchange.
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "routing-key" domain = "shortstr" label = "message routing key">
-        <doc>
-          Specifies the routing key for the binding. The routing key is used for routing
-          messages depending on the exchange configuration. Not all exchanges use a
-          routing key - refer to the specific exchange documentation.  If the queue name
-          is empty, the server uses the last queue declared on the channel.  If the
-          routing key is also empty, the server uses this queue name for the routing
-          key as well.  If the queue name is provided but the routing key is empty, the
-          server does the binding with that empty routing key.  The meaning of empty
-          routing keys depends on the exchange implementation.
-        </doc>
-        <rule name = "direct-exchange-key-matching">
-          <doc>
-            If a message queue binds to a direct exchange using routing key K and a
-            publisher sends the exchange a message with routing key R, then the message
-            MUST be passed to the message queue if K = R.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-      
-      <field name = "arguments" domain = "table" label = "arguments for binding">
-        <doc>
-          A set of arguments for the binding. The syntax and semantics of these arguments
-          depends on the exchange class.
-        </doc>
-      </field>
-    </method>
-    
-    <method name = "bind-ok" synchronous = "1" index = "21" label = "confirm bind successful">
-      <doc>This method confirms that the bind was successful.</doc>
-      
-      <chassis name = "client" implement = "MUST" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "unbind" synchronous = "1" index = "50" label = "unbind a queue from an exchange">
-      <doc>This method unbinds a queue from an exchange.</doc>
-      <rule name = "01">
-        <doc>If a unbind fails, the server MUST raise a connection exception.</doc>
-      </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="unbind-ok"/>
-
-      <field name = "ticket" domain = "access-ticket">
-        <doc>
-          The client provides a valid access ticket giving "active"
-          access rights to the queue's access realm.
-        </doc>
-      </field>
-
-      <field name = "queue" domain = "queue-name">
-        <doc>Specifies the name of the queue to unbind.</doc>
-        <rule name = "02">
-          <doc>
-            If the queue does not exist the server MUST raise a channel exception
-            with reply code 404 (not found).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "exchange" domain = "exchange-name">
-        <doc>The name of the exchange to unbind from.</doc>
-        <rule name = "03">
-          <doc>
-            If the exchange does not exist the server MUST raise a channel
-            exception with reply code 404 (not found).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "routing-key" domain = "shortstr" label = "routing key of binding">
-        <doc>Specifies the routing key of the binding to unbind.</doc>
-      </field>
-
-      <field name = "arguments" domain = "table" label = "arguments of binding">
-        <doc>Specifies the arguments of the binding to unbind.</doc>
-      </field>
-    </method>
-
-    <method name = "unbind-ok" synchronous = "1" index = "51" label = "confirm unbind successful">
-      <doc>This method confirms that the unbind was successful.</doc>
-      <chassis name = "client" implement = "MUST"/>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "purge" synchronous = "1" index = "30" label = "purge a queue">
-      <doc>
-        This method removes all messages from a queue. It does not cancel consumers. Purged
-        messages are deleted without any formal "undo" mechanism.
-      </doc>
-      
-      <!-- Rule test name: was "amq_queue_15" -->    
-      <rule name = "01">
-        <doc>A call to purge MUST result in an empty queue.</doc>
-      </rule>
-      
-      <!-- Rule test name: was "amq_queue_41" -->
-      <rule name = "02">
-        <doc>
-          On transacted channels the server MUST not purge messages that have already been
-          sent to a client but not yet acknowledged.
-        </doc>
-      </rule>
-      
-      <!-- TODO: Rule split? -->
-      
-      <!-- Rule test name: was "amq_queue_42" -->    
-      <rule name = "03">
-        <doc>
-          The server MAY implement a purge queue or log that allows system administrators
-          to recover accidentally-purged messages. The server SHOULD NOT keep purged
-          messages in the same storage spaces as the live messages since the volumes of
-          purged messages may get very large.
-        </doc>
-      </rule>
-      
-      <chassis name = "server" implement = "MUST" />
-      
-      <response name = "purge-ok" />
-      
-      <field name = "ticket" domain = "access-ticket">
-        <doc>The access ticket must be for the access realm that holds the queue.</doc>
-        
-        <rule name = "01">
-          <doc>
-            The client MUST provide a valid access ticket giving "read" access rights to
-            the queue's access realm. Note that purging a queue is equivalent to reading
-            all messages and discarding them.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "queue" domain = "queue-name">
-        <doc>
-          Specifies the name of the queue to purge. If the queue name is empty, refers to
-          the current queue for the channel, which is the last declared queue.
-        </doc>
-        
-        <rule name = "01">
-          <doc>
-            If the client did not previously declare a queue, and the queue name in this
-            method is empty, the server MUST raise a connection exception with reply
-            code 530 (not allowed).
-          </doc>
-        </rule>
-        
-        <!-- TODO Rule split? -->
-        
-        <!-- Rule test name: was "amq_queue_16" -->    
-        <rule name = "02">
-          <doc>
-            The queue MUST exist. Attempting to purge a non-existing queue MUST cause a
-            channel exception.
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "purge-ok" synchronous = "1" index = "31" label = "confirms a queue purge">
-      <doc>This method confirms the purge of a queue.</doc>
-
-      <chassis name = "client" implement = "MUST" />
-
-      <field name = "message-count" domain = "long" label = "number of messages purged">
-        <doc>Reports the number of messages purged.</doc>
-      </field>
-    </method>
-    
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "delete" synchronous = "1" index = "40" label = "delete a queue">
-      <doc>
-        This method deletes a queue. When a queue is deleted any pending messages are sent
-        to a dead-letter queue if this is defined in the server configuration, and all
-        consumers on the queue are cancelled.
-      </doc>
-
-      <!-- TODO: Rule split? -->
-
-      <!-- Rule test name: was "amq_queue_43" -->
-      <rule name = "01">
-        <doc>
-          The server SHOULD use a dead-letter queue to hold messages that were pending on
-          a deleted queue, and MAY provide facilities for a system administrator to move
-          these messages back to an active queue.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-
-      <response name = "delete-ok" />
-      
-      <field name = "ticket" domain = "access-ticket">
-        <doc>
-          The client provides a valid access ticket giving "active" access rights to the
-          queue's access realm.
-        </doc>
-      </field>
-      
-      <field name = "queue" domain = "queue-name">
-        <doc>
-          Specifies the name of the queue to delete. If the queue name is empty, refers to
-          the current queue for the channel, which is the last declared queue.
-        </doc>
-        
-        <rule name = "01">
-          <doc>
-            If the client did not previously declare a queue, and the queue name in this
-            method is empty, the server MUST raise a connection exception with reply
-            code 530 (not allowed).
-          </doc>
-        </rule>
-
-        <!-- Rule test name: was "amq_queue_21" -->
-        <rule name = "02">
-          <doc>
-            The queue must exist. If the client attempts to delete a non-existing queue
-            the server MUST raise a channel exception with reply code 404 (not found).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "if-unused" domain = "bit" label = "delete only if unused">
-        <doc>
-          If set, the server will only delete the queue if it has no consumers. If the
-          queue has consumers the server does does not delete it but raises a channel
-          exception instead.
-        </doc>
-
-        <!-- Rule test name: was "amq_queue_29" and "amq_queue_30" -->
-        <rule name = "01">
-          <doc>The server MUST respect the if-unused flag when deleting a queue.</doc>
-        </rule>
-      </field>
-
-      <field name = "if-empty" domain = "bit" label = "delete only if empty">
-        <doc>
-          If set, the server will only delete the queue if it has no messages.
-        </doc>
-        <rule name = "01">
-          <doc>
-          If the queue is not empty the server MUST raise a channel exception with
-          reply code 406 (precondition failed).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "delete-ok" synchronous = "1" index = "41" label = "confirm deletion of a queue">
-      <doc>This method confirms the deletion of a queue.</doc>
-      
-      <chassis name = "client" implement = "MUST" />
-      
-      <field name = "message-count" domain = "long" label = "number of messages purged">
-        <doc>Reports the number of messages purged.</doc>
-      </field>
-    </method>
-  </class>
-
-  <!-- ==  BASIC  ============================================================ -->
-
-  <class name = "basic" handler = "channel" index = "60" label = "work with basic content">
-    <doc>
-      The Basic class provides methods that support an industry-standard messaging model.
-    </doc>
-
-    <doc type = "grammar">
-      basic               = C:QOS S:QOS-OK
-                          / C:CONSUME S:CONSUME-OK
-                          / C:CANCEL S:CANCEL-OK
-                          / C:PUBLISH content
-                          / S:RETURN content
-                          / S:DELIVER content
-                          / C:GET ( S:GET-OK content / S:GET-EMPTY )
-                          / C:ACK
-                          / C:REJECT
-    </doc>
-
-    <chassis name = "server" implement = "MUST" />
-    <chassis name = "client" implement = "MAY" />
-
-    <!-- Rule test name: was "amq_basic_08" -->
-    <rule name = "01">
-      <doc>
-        The server SHOULD respect the persistent property of basic messages and
-        SHOULD make a best-effort to hold persistent basic messages on a reliable
-        storage mechanism.
-      </doc>
-      <doc type = "scenario">
-        Send a persistent message to queue, stop server, restart server and then
-        verify whether message is still present.  Assumes that queues are durable.
-        Persistence without durable queues makes no sense.
-      </doc>
-    </rule>
-
-    <!-- Rule test name: was "amq_basic_09" -->
-    <rule name = "02">
-      <doc>
-        The server MUST NOT discard a persistent basic message in case of a queue
-        overflow.
-      </doc>
-      <doc type = "scenario">
-        Create a queue overflow situation with persistent messages and verify that
-        messages do not get lost (presumably the server will write them to disk).
-      </doc>
-    </rule>
-
-    <rule name = "03">
-      <doc>
-        The server MAY use the Channel.Flow method to slow or stop a basic message
-        publisher when necessary.
-      </doc>
-      <doc type = "scenario">
-        Create a queue overflow situation with non-persistent messages and verify
-        whether the server responds with Channel.Flow or not. Repeat with persistent
-        messages.
-      </doc>
-    </rule>
-
-    <!-- Rule test name: was "amq_basic_10" -->
-    <rule name = "04">
-      <doc>
-        The server MAY overflow non-persistent basic messages to persistent
-        storage.
-      </doc>
-      <!-- Test scenario: untestable -->
-    </rule>
-
-    <rule name = "05">
-      <doc>
-        The server MAY discard or dead-letter non-persistent basic messages on a
-        priority basis if the queue size exceeds some configured limit.
-      </doc>
-      <!-- Test scenario: untestable -->
-    </rule>
-
-    <!-- Rule test name: was "amq_basic_11" -->
-    <rule name = "06">
-      <doc>
-        The server MUST implement at least 2 priority levels for basic messages,
-        where priorities 0-4 and 5-9 are treated as two distinct levels.
-      </doc>
-      <doc type = "scenario">
-        Send a number of priority 0 messages to a queue. Send one priority 9
-        message.  Consume messages from the queue and verify that the first message
-        received was priority 9.
-      </doc>
-    </rule>
-
-    <rule name = "07">
-      <doc>
-        The server MAY implement up to 10 priority levels.
-      </doc>
-      <doc type = "scenario">
-        Send a number of messages with mixed priorities to a queue, so that all
-        priority values from 0 to 9 are exercised. A good scenario would be ten
-        messages in low-to-high priority.  Consume from queue and verify how many
-        priority levels emerge.
-      </doc>
-    </rule>
-
-    <!-- Rule test name: was "amq_basic_12" -->
-    <rule name = "08">
-      <doc>
-        The server MUST deliver messages of the same priority in order irrespective of
-        their individual persistence.
-      </doc>
-      <doc type = "scenario">
-        Send a set of messages with the same priority but different persistence
-        settings to a queue.  Consume and verify that messages arrive in same order
-        as originally published.
-      </doc>
-    </rule>
-
-    <!-- Rule test name: was "amq_basic_13" -->
-    <rule name = "09">
-      <doc>
-        The server MUST support automatic acknowledgements on Basic content, i.e.
-        consumers with the no-ack field set to FALSE.
-      </doc>
-      <doc type = "scenario">
-        Create a queue and a consumer using automatic acknowledgements.  Publish
-        a set of messages to the queue.  Consume the messages and verify that all
-        messages are received.
-      </doc>
-    </rule>
-
-    <rule name = "10">
-      <doc>
-        The server MUST support explicit acknowledgements on Basic content, i.e.
-        consumers with the no-ack field set to TRUE.
-      </doc>
-      <doc type = "scenario">
-        Create a queue and a consumer using explicit acknowledgements.  Publish a
-        set of messages to the queue.  Consume the messages but acknowledge only
-        half of them.  Disconnect and reconnect, and consume from the queue.
-        Verify that the remaining messages are received.
-      </doc>
-    </rule>
-
-    <!--  These are the properties for a Basic content  -->
-
-    <field name = "content-type"    domain = "shortstr"   label = "MIME content type" />
-    <field name = "content-encoding" domain = "shortstr"  label = "MIME content encoding" />
-    <field name = "headers"         domain = "table"      label = "message header field table" />
-    <field name = "delivery-mode"   domain = "octet"      label = "non-persistent (1) or persistent (2)" />
-    <field name = "priority"        domain = "octet"      label = "message priority, 0 to 9" />
-    <field name = "correlation-id"  domain = "shortstr"   label = "application correlation identifier" />
-    <field name = "reply-to"        domain = "shortstr"   label = "destination to reply to" />
-    <field name = "expiration"      domain = "shortstr"   label = "message expiration specification" />
-    <field name = "message-id"      domain = "shortstr"   label = "application message identifier" />
-    <field name = "timestamp"       domain = "timestamp"  label = "message timestamp" />
-    <field name = "type"            domain = "shortstr"   label = "message type name" />
-    <field name = "user-id"         domain = "shortstr"   label = "creating user id" />
-    <field name = "app-id"          domain = "shortstr"   label = "creating application id" />
-    <!-- This field is deprecated pending review -->
-    <field name = "cluster-id"      domain = "shortstr"   label = "intra-cluster routing identifier" />
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "qos" synchronous = "1" index = "10" label = "specify quality of service">
-      <doc>
-        This method requests a specific quality of service. The QoS can be specified for the
-        current channel or for all channels on the connection. The particular properties and
-        semantics of a qos method always depend on the content class semantics. Though the
-        qos method could in principle apply to both peers, it is currently meaningful only
-        for the server.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "qos-ok" />
-
-      <field name = "prefetch-size" domain = "long" label = "prefetch window in octets">
-        <doc>
-          The client can request that messages be sent in advance so that when the client
-          finishes processing a message, the following message is already held locally,
-          rather than needing to be sent down the channel. Prefetching gives a performance
-          improvement. This field specifies the prefetch window size in octets. The server
-          will send a message in advance if it is equal to or smaller in size than the
-          available prefetch size (and also falls into other prefetch limits). May be set
-          to zero, meaning "no specific limit", although other prefetch limits may still
-          apply. The prefetch-size is ignored if the no-ack option is set.
-        </doc>
-        <!-- Rule test name: was "amq_basic_17" -->
-        <rule name = "01">
-          <doc>
-            The server MUST ignore this setting when the client is not processing any
-            messages - i.e. the prefetch size does not limit the transfer of single
-            messages to a client, only the sending in advance of more messages while
-            the client still has one or more unacknowledged messages.
-          </doc>
-          <doc type = "scenario">
-            Define a QoS prefetch-size limit and send a single message that exceeds
-            that limit.  Verify that the message arrives correctly.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "prefetch-count" domain = "short" label = "prefetch window in messages">
-        <doc>
-          Specifies a prefetch window in terms of whole messages. This field may be used
-          in combination with the prefetch-size field; a message will only be sent in
-          advance if both prefetch windows (and those at the channel and connection level)
-          allow it. The prefetch-count is ignored if the no-ack option is set.
-        </doc>
-        <!-- Rule test name: was "amq_basic_18" -->
-        <rule name = "01">
-          <doc>
-            The server may send less data in advance than allowed by the client's
-            specified prefetch windows but it MUST NOT send more.
-          </doc>
-          <doc type = "scenario">
-            Define a QoS prefetch-size limit and a prefetch-count limit greater than
-            one.  Send multiple messages that exceed the prefetch size.  Verify that
-            no more than one message arrives at once.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "global" domain = "bit" label = "apply to entire connection">
-        <doc>
-          By default the QoS settings apply to the current channel only. If this field is
-          set, they are applied to the entire connection.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "qos-ok" synchronous = "1" index = "11" label = "confirm the requested qos">
-      <doc>
-        This method tells the client that the requested QoS levels could be handled by the
-        server. The requested QoS applies to all active consumers until a new QoS is
-        defined.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "consume" synchronous = "1" index = "20" label = "start a queue consumer">
-      <doc>
-        This method asks the server to start a "consumer", which is a transient request for
-        messages from a specific queue. Consumers last as long as the channel they were
-        created on, or until the client cancels them.
-      </doc>
-
-      <!-- Rule test name: was "amq_basic_01" -->
-      <rule name = "01">
-        <doc>
-          The server SHOULD support at least 16 consumers per queue, and ideally, impose
-          no limit except as defined by available resources.
-        </doc>
-        <doc type = "scenario">
-          Create a queue and create consumers on that queue until the server closes the
-          connection. Verify that the number of consumers created was at least sixteen
-          and report the total number.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "consume-ok" />
-
-      <field name = "ticket" domain = "access-ticket">
-        <rule name = "01" on-failure = "access-refused">
-          <doc>
-            The client MUST provide a valid access ticket giving "read" access rights to
-            the realm for the queue.
-          </doc>
-          <doc type = "scenario">
-            Attempt to create a consumer with an invalid (non-zero) access ticket.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "queue" domain = "queue-name">
-        <doc>
-          Specifies the name of the queue to consume from. If the queue name is null,
-          refers to the current queue for the channel, which is the last declared queue.
-        </doc>
-        <rule name = "01" on-failure = "not-allowed">
-          <doc>
-            If the queue name is empty the client MUST have previously declared a
-            queue using this channel.
-          </doc>
-          <doc type = "scenario">
-            Attempt to create a consumer with an empty queue name and no previously
-            declared queue on the channel.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "consumer-tag" domain = "consumer-tag">
-        <doc>
-          Specifies the identifier for the consumer. The consumer tag is local to a
-          connection, so two clients can use the same consumer tags. If this field is
-          empty the server will generate a unique tag.
-        </doc>
-        <rule name = "01" on-failure = "not-allowed">
-          <doc>
-            The client MUST NOT specify a tag that refers to an existing consumer.
-          </doc>
-          <doc type = "scenario">
-            Attempt to create two consumers with the same non-empty tag.
-          </doc>
-        </rule>
-        <rule name = "02" on-failure = "not-allowed">
-          <doc>
-            The consumer tag is valid only within the channel from which the
-            consumer was created. I.e. a client MUST NOT create a consumer in one
-            channel and then use it in another.
-          </doc>
-          <doc type = "scenario">
-            Attempt to create a consumer in one channel, then use in another channel,
-            in which consumers have also been created (to test that the server uses
-            unique consumer tags).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "no-local" domain = "no-local" />
-
-      <field name = "no-ack" domain = "no-ack" />
-
-      <field name = "exclusive" domain = "bit" label = "request exclusive access">
-        <doc>
-          Request exclusive consumer access, meaning only this consumer can access the
-          queue.
-        </doc>
-        <!-- Rule test name: was "amq_basic_02" -->
-        <rule name = "01" on-failure = "access-refused">
-          <doc>
-            The client MAY NOT gain exclusive access to a queue that already has
-            active consumers.
-          </doc>
-          <doc type = "scenario">
-            Open two connections to a server, and in one connection create a shared
-            (non-exclusive) queue and then consume from the queue.  In the second
-            connection attempt to consume from the same queue using the exclusive
-            option.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise
-          a channel or connection exception.
-        </doc>
-      </field>
-      
-      <field name = "filter" domain = "table" label = "arguments for consuming">
-       <doc>
-          A set of filters for the consume. The syntax and semantics
-                 of these filters depends on the providers implementation.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "consume-ok" synchronous = "1" index = "21" label = "confirm a new consumer">
-      <doc>
-        The server provides the client with a consumer tag, which is used by the client
-        for methods called on the consumer at a later stage.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-      <field name = "consumer-tag" domain = "consumer-tag">
-        <doc>
-          Holds the consumer tag specified by the client or provided by the server.
-        </doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "cancel" synchronous = "1" index = "30" label = "end a queue consumer">
-      <doc>
-        This method cancels a consumer. This does not affect already delivered
-        messages, but it does mean the server will not send any more messages for
-        that consumer. The client may receive an arbitrary number of messages in
-        between sending the cancel method and receiving the cancel-ok reply.
-      </doc>
-
-      <rule name = "01">
-        <doc>
-          If the queue does not exist the server MUST ignore the cancel method, so
-          long as the consumer tag is valid for that channel.
-        </doc>
-        <doc type = "scenario">
-          TODO.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "cancel-ok" />
-
-      <field name = "consumer-tag" domain = "consumer-tag" />
-
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "cancel-ok" synchronous = "1" index = "31" label = "confirm a cancelled consumer">
-      <doc>
-        This method confirms that the cancellation was completed.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-      <field name = "consumer-tag" domain = "consumer-tag" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "publish" content = "1" index = "40" label = "publish a message">
-      <doc>
-        This method publishes a message to a specific exchange. The message will be routed
-        to queues as defined by the exchange configuration and distributed to any active
-        consumers when the transaction, if any, is committed.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "ticket" domain = "access-ticket">
-        <rule name = "01">
-          <doc>
-            The client MUST provide a valid access ticket giving "write" access rights
-            to the access realm for the exchange.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "exchange" domain = "exchange-name">
-        <doc>
-          Specifies the name of the exchange to publish to. The exchange name can be
-          empty, meaning the default exchange. If the exchange name is specified, and that
-          exchange does not exist, the server will raise a channel exception.
-        </doc>
-
-        <!-- Rule test name: was "amq_basic_06" -->
-        <rule name = "01">
-          <doc>
-            The server MUST accept a blank exchange name to mean the default exchange.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-
-        <!-- Rule test name: was "amq_basic_14" -->
-        <rule name = "02">
-          <doc>
-            If the exchange was declared as an internal exchange, the server MUST raise
-            a channel exception with a reply code 403 (access refused).
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-
-        <!-- Rule test name: was "amq_basic_15" -->
-        <rule name = "03">
-          <doc>
-            The exchange MAY refuse basic content in which case it MUST raise a channel
-            exception with reply code 540 (not implemented).
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "routing-key" domain = "shortstr" label = "Message routing key">
-        <doc>
-          Specifies the routing key for the message. The routing key is used for routing
-          messages depending on the exchange configuration.
-        </doc>
-      </field>
-
-      <field name = "mandatory" domain = "bit" label = "indicate mandatory routing">
-        <doc>
-          This flag tells the server how to react if the message cannot be routed to a
-          queue. If this flag is set, the server will return an unroutable message with a
-          Return method. If this flag is zero, the server silently drops the message.
-        </doc>
-        <!-- Rule test name: was "amq_basic_07" -->
-        <rule name = "01">
-          <doc>
-            The server SHOULD implement the mandatory flag.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "immediate" domain = "bit" label = "request immediate delivery">
-        <doc>
-          This flag tells the server how to react if the message cannot be routed to a
-          queue consumer immediately. If this flag is set, the server will return an
-          undeliverable message with a Return method. If this flag is zero, the server
-          will queue the message, but with no guarantee that it will ever be consumed.
-        </doc>
-        <!-- Rule test name: was "amq_basic_16" -->
-        <rule name = "01">
-          <doc>
-            The server SHOULD implement the immediate flag.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-    </method>
-
-    <method name = "return" content = "1" index = "50" label = "return a failed message">
-      <doc>
-        This method returns an undeliverable message that was published with the "immediate"
-        flag set, or an unroutable message published with the "mandatory" flag set. The
-        reply code and text provide information about the reason that the message was
-        undeliverable.
-      </doc>
-
-      <chassis name = "client" implement = "MUST" />
-
-      <field name = "reply-code" domain = "reply-code" />
-
-      <field name = "reply-text" domain = "reply-text" />
-
-      <field name = "exchange" domain = "exchange-name">
-        <doc>
-          Specifies the name of the exchange that the message was originally published to.
-        </doc>
-      </field>
-
-      <field name = "routing-key" domain = "shortstr" label = "Message routing key">
-        <doc>
-          Specifies the routing key name specified when the message was published.
-        </doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "deliver" content = "1" index = "60"
-      label = "notify the client of a consumer message">
-      <doc>
-        This method delivers a message to the client, via a consumer. In the asynchronous
-        message delivery model, the client starts a consumer using the Consume method, then
-        the server responds with Deliver methods as and when messages arrive for that
-        consumer.
-      </doc>
-
-      <!-- Rule test name: was "amq_basic_19" -->
-      <rule name = "01">
-        <!-- TODO: Rule split? -->
-        <doc>
-          The server SHOULD track the number of times a message has been delivered to
-          clients and when a message is redelivered a certain number of times - e.g. 5
-          times - without being acknowledged, the server SHOULD consider the message to be
-          unprocessable (possibly causing client applications to abort), and move the
-          message to a dead letter queue.
-        </doc>
-        <doc type = "scenario">
-          TODO.
-        </doc>
-      </rule>
-
-      <chassis name = "client" implement = "MUST" />
-
-      <field name = "consumer-tag" domain = "consumer-tag" />
-
-      <field name = "delivery-tag" domain = "delivery-tag" />
-
-      <field name = "redelivered" domain = "redelivered" />
-
-      <field name = "exchange" domain = "exchange-name">
-        <doc>
-          Specifies the name of the exchange that the message was originally published to.
-        </doc>
-      </field>
-
-      <field name = "routing-key" domain = "shortstr" label = "Message routing key">
-        <doc>Specifies the routing key name specified when the message was published.</doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "get" synchronous = "1" index = "70" label = "direct access to a queue">
-      <doc>
-        This method provides a direct access to the messages in a queue using a synchronous
-        dialogue that is designed for specific types of application where synchronous
-        functionality is more important than performance.
-      </doc>
-
-      <response name = "get-ok" />
-      <response name = "get-empty" />
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "ticket" domain = "access-ticket">
-        <rule name = "01">
-          <doc>
-            The client MUST provide a valid access ticket giving "read" access rights to
-            the realm for the queue.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "queue" domain = "queue-name">
-        <doc>
-          Specifies the name of the queue to consume from. If the queue name is null,
-          refers to the current queue for the channel, which is the last declared queue.
-        </doc>
-        <rule name = "01">
-          <doc>
-            If the client did not previously declare a queue, and the queue name in this
-            method is empty, the server MUST raise a connection exception with reply
-            code 530 (not allowed).
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "no-ack" domain = "no-ack" />
-    </method>
-
-    <method name = "get-ok" synchronous = "1" content = "1" index = "71"
-      label = "provide client with a message">
-      <doc>
-        This method delivers a message to the client following a get method. A message
-        delivered by 'get-ok' must be acknowledged unless the no-ack option was set in the
-        get method.
-      </doc>
-
-      <chassis name = "client" implement = "MAY" />
-
-      <field name = "delivery-tag" domain = "delivery-tag" />
-
-      <field name = "redelivered" domain = "redelivered" />
-
-      <field name = "exchange" domain = "exchange-name">
-        <doc>
-          Specifies the name of the exchange that the message was originally published to.
-          If empty, the message was published to the default exchange.
-        </doc>
-      </field>
-
-      <field name = "routing-key" domain = "shortstr" label = "Message routing key">
-        <doc>Specifies the routing key name specified when the message was published.</doc>
-      </field>
-
-      <field name = "message-count" domain = "long" label = "number of messages pending">
-        <doc>
-          This field reports the number of messages pending on the queue, excluding the
-          message being delivered. Note that this figure is indicative, not reliable, and
-          can change arbitrarily as messages are added to the queue and removed by other
-          clients.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "get-empty" synchronous = "1" index = "72"
-      label = "indicate no messages available">
-      <doc>
-        This method tells the client that the queue has no messages available for the
-        client.
-      </doc>
-
-      <chassis name = "client" implement = "MAY" />
-
-      <!-- This field is deprecated pending review -->
-      <field name = "cluster-id" domain = "shortstr" label = "Cluster id">
-        <doc>
-          For use by cluster applications, should not be used by client applications.
-        </doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "ack" index = "80" label = "acknowledge one or more messages">
-      <doc>
-        This method acknowledges one or more messages delivered via the Deliver or Get-Ok
-        methods. The client can ask to confirm a single message or a set of messages up to
-        and including a specific message.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "delivery-tag" domain = "delivery-tag" />
-
-      <field name = "multiple" domain = "bit" label = "acknowledge multiple messages">
-        <doc>
-          If set to 1, the delivery tag is treated as "up to and including", so that the
-          client can acknowledge multiple messages with a single method. If set to zero,
-          the delivery tag refers to a single message. If the multiple field is 1, and the
-          delivery tag is zero, tells the server to acknowledge all outstanding messages.
-        </doc>
-
-        <!-- Rule test name: was "amq_basic_20" -->
-        <rule name = "01">
-          <doc>
-            The server MUST validate that a non-zero delivery-tag refers to an delivered
-            message, and raise a channel exception if this is not the case.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "reject" index = "90" label = "reject an incoming message">
-      <doc>
-        This method allows a client to reject a message. It can be used to interrupt and
-        cancel large incoming messages, or return untreatable messages to their original
-        queue.
-      </doc>
-
-      <!-- Rule test name: was "amq_basic_21" -->
-      <rule name = "01">
-        <doc>
-          The server SHOULD be capable of accepting and process the Reject method while
-          sending message content with a Deliver or Get-Ok method. I.e. the server should
-          read and process incoming methods while sending output frames. To cancel a
-          partially-send content, the server sends a content body frame of size 1 (i.e.
-          with no data except the frame-end octet).
-        </doc>
-      </rule>
-
-      <!-- Rule test name: was "amq_basic_22" -->
-      <rule name = "02">
-        <doc>
-          The server SHOULD interpret this method as meaning that the client is unable to
-          process the message at this time.
-        </doc>
-        <doc type = "scenario">
-          TODO.
-        </doc>
-      </rule>
-
-      <rule name = "03">
-        <!-- TODO: Rule split? -->
-        <doc>
-          A client MUST NOT use this method as a means of selecting messages to process. A
-          rejected message MAY be discarded or dead-lettered, not necessarily passed to
-          another client.
-        </doc>
-        <doc type = "scenario">
-          TODO.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "delivery-tag" domain = "delivery-tag" />
-
-      <field name = "requeue" domain = "bit" label = "requeue the message">
-        <doc>
-          If this field is zero, the message will be discarded. If this bit is 1, the
-          server will attempt to requeue the message.
-        </doc>
-
-        <!-- Rule test name: was "amq_basic_23" -->
-        <rule name = "01">
-          <!-- TODO: Rule split? -->
-          <doc>
-            The server MUST NOT deliver the message to the same client within the
-            context of the current channel. The recommended strategy is to attempt to
-            deliver the message to an alternative consumer, and if that is not possible,
-            to move the message to a dead-letter queue. The server MAY use more
-            sophisticated tracking to hold the message on the queue and redeliver it to
-            the same client at a later stage.
-          </doc>
-          <doc type = "scenario">
-            TODO.
-          </doc>
-        </rule>
-      </field>
-    </method>
-
-    <method name = "recover" index = "100" label = "redeliver unacknowledged messages">
-      <doc>
-        This method asks the broker to redeliver all unacknowledged messages on a specified
-        channel. Zero or more messages may be redelivered. This method is only allowed on
-        non-transacted channels.
-      </doc>
-
-      <rule name = "01">
-        <doc>
-          The server MUST set the redelivered flag on all messages that are resent.
-        </doc>
-        <doc type = "scenario">
-          TODO.
-        </doc>
-      </rule>
-
-      <rule name = "02">
-        <doc>
-          The server MUST raise a channel exception if this is called on a transacted
-          channel.
-        </doc>
-        <doc type = "scenario">
-          TODO.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "requeue" domain = "bit" label = "requeue the message">
-        <doc>
-          If this field is zero, the message will be redelivered to the original
-          recipient. If this bit is 1, the server will attempt to requeue the message,
-          potentially then delivering it to an alternative subscriber.
-        </doc>
-      </field>
-    </method>
-  </class>
-
-  <!-- ==  FILE  ============================================================= -->
-
-  <class name = "file" handler = "channel" index = "70" label = "work with file content">
-    <doc>
-      The file class provides methods that support reliable file transfer. File
-      messages have a specific set of properties that are required for interoperability
-      with file transfer applications. File messages and acknowledgements are subject to
-      channel transactions. Note that the file class does not provide message browsing
-      methods; these are not compatible with the staging model. Applications that need
-      browsable file transfer should use Basic content and the Basic class.
-    </doc>
-
-    <doc type = "grammar">
-      file                = C:QOS S:QOS-OK
-                          / C:CONSUME S:CONSUME-OK
-                          / C:CANCEL S:CANCEL-OK
-                          / C:OPEN S:OPEN-OK C:STAGE content
-                          / S:OPEN C:OPEN-OK S:STAGE content
-                          / C:PUBLISH
-                          / S:DELIVER
-                          / S:RETURN
-                          / C:ACK
-                          / C:REJECT
-    </doc>
-
-    <chassis name = "server" implement = "MAY" />
-    <chassis name = "client" implement = "MAY" />
-
-    <rule name = "01">
-      <doc>
-        The server MUST make a best-effort to hold file messages on a reliable storage
-        mechanism.
-      </doc>
-    </rule>
-
-    <!-- TODO Rule implement attr inverse? -->
-
-    <!-- TODO: Rule split? -->
-
-    <rule name = "02">
-      <doc>
-        The server MUST NOT discard a file message in case of a queue overflow. The server
-        MUST use the Channel.Flow method to slow or stop a file message publisher when
-        necessary.
-      </doc>
-    </rule>
-
-    <!-- TODO: Rule split? -->
-
-    <rule name = "03">
-      <doc>
-        The server MUST implement at least 2 priority levels for file messages, where
-        priorities 0-4 and 5-9 are treated as two distinct levels. The server MAY implement
-        up to 10 priority levels.
-      </doc>
-    </rule>
-    
-    <rule name = "04">
-      <doc>
-        The server MUST support both automatic and explicit acknowledgements on file
-        content.
-      </doc>
-    </rule>
-    
-    <!--  These are the properties for a File content  -->
-
-    <field name = "content-type"    domain = "shortstr"   label = "MIME content type" />
-    <field name = "content-encoding" domain = "shortstr"  label = "MIME content encoding" />
-    <field name = "headers"         domain = "table"      label = "message header field table" />
-    <field name = "priority"        domain = "octet"      label = "message priority, 0 to 9" />
-    <field name = "reply-to"        domain = "shortstr"   label = "destination to reply to" />
-    <field name = "message-id"      domain = "shortstr"   label = "application message identifier" />
-    <field name = "filename"        domain = "shortstr"   label = "message filename" />
-    <field name = "timestamp"       domain = "timestamp"  label = "message timestamp" />
-    <!-- This field is deprecated pending review -->
-    <field name = "cluster-id"      domain = "shortstr"   label = "intra-cluster routing identifier" />
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "qos" synchronous = "1" index = "10" label = "specify quality of service">
-      <doc>
-        This method requests a specific quality of service. The QoS can be specified for the
-        current channel or for all channels on the connection. The particular properties and
-        semantics of a qos method always depend on the content class semantics. Though the
-        qos method could in principle apply to both peers, it is currently meaningful only
-        for the server.
-      </doc>
-      
-      <chassis name = "server" implement = "MUST" />
-      
-      <response name = "qos-ok" />
-      
-      <field name = "prefetch-size" domain = "long" label = "prefetch window in octets">
-        <doc>
-          The client can request that messages be sent in advance so that when the client
-          finishes processing a message, the following message is already held locally,
-          rather than needing to be sent down the channel. Prefetching gives a performance
-          improvement. This field specifies the prefetch window size in octets. May be set
-          to zero, meaning "no specific limit". Note that other prefetch limits may still
-          apply. The prefetch-size is ignored if the no-ack option is set.
-        </doc>
-      </field>
-      
-      <field name = "prefetch-count" domain = "short" label = "prefetch window in messages">
-        <doc>
-          Specifies a prefetch window in terms of whole messages. This is compatible with
-          some file API implementations. This field may be used in combination with the
-          prefetch-size field; a message will only be sent in advance if both prefetch
-          windows (and those at the channel and connection level) allow it. The
-          prefetch-count is ignored if the no-ack option is set.
-        </doc>
-        
-        <rule name = "01">
-          <!-- TODO: Rule split? -->
-          <doc>
-            The server MAY send less data in advance than allowed by the client's
-            specified prefetch windows but it MUST NOT send more.
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "global" domain = "bit" label = "apply to entire connection">
-        <doc>
-          By default the QoS settings apply to the current channel only. If this field is
-          set, they are applied to the entire connection.
-        </doc>
-      </field>
-    </method>
-    
-    <method name = "qos-ok" synchronous = "1" index = "11" label = "confirm the requested qos">
-      <doc>
-        This method tells the client that the requested QoS levels could be handled by the
-        server. The requested QoS applies to all active consumers until a new QoS is
-        defined.
-      </doc>
-      
-      <chassis name = "client" implement = "MUST" />
-    </method>
-    
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "consume" synchronous = "1" index = "20" label = "start a queue consumer">
-      <doc>
-        This method asks the server to start a "consumer", which is a transient request for
-        messages from a specific queue. Consumers last as long as the channel they were
-        created on, or until the client cancels them.
-      </doc>
-      
-      <rule name = "01">
-        <doc>
-          The server SHOULD support at least 16 consumers per queue, unless the queue was
-          declared as private, and ideally, impose no limit except as defined by available
-          resources.
-        </doc>
-      </rule>
-      
-      <chassis name = "server" implement = "MUST" />
-      
-      <response name = "consume-ok" />
-      
-      <field name = "ticket" domain = "access-ticket">
-        <rule name = "01">
-          <doc>
-            The client MUST provide a valid access ticket giving "read" access rights to
-            the realm for the queue.
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "queue" domain = "queue-name">
-        <doc>
-          Specifies the name of the queue to consume from. If the queue name is null,
-          refers to the current queue for the channel, which is the last declared queue.
-        </doc>
-        
-        <rule name = "01">
-          <doc>
-            If the client did not previously declare a queue, and the queue name in this
-            method is empty, the server MUST raise a connection exception with reply
-            code 530 (not allowed).
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "consumer-tag" domain = "consumer-tag">
-        <doc>
-          Specifies the identifier for the consumer. The consumer tag is local to a
-          connection, so two clients can use the same consumer tags. If this field is
-          empty the server will generate a unique tag.
-        </doc>
-        
-        <rule name = "01">
-          <!-- TODO: Rule split? -->
-          <doc>
-            The tag MUST NOT refer to an existing consumer. If the client attempts to
-            create two consumers with the same non-empty tag the server MUST raise a
-            connection exception with reply code 530 (not allowed).
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "no-local" domain = "no-local" />
-      
-      <field name = "no-ack" domain = "no-ack" />
-      
-      <field name = "exclusive" domain = "bit" label = "request exclusive access">
-        <doc>
-          Request exclusive consumer access, meaning only this consumer can access the
-          queue.
-        </doc>
-
-        <!-- Rule test name: was "amq_file_00" -->    
-        <rule name = "01">
-          <doc>
-            If the server cannot grant exclusive access to the queue when asked, -
-            because there are other consumers active - it MUST raise a channel exception
-            with return code 405 (resource locked).
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-      
-      <field name = "filter" domain = "table" label = "arguments for consuming">
-       <doc>
-          A set of filters for the consume. The syntax and semantics
-                 of these filters depends on the providers implementation.
-        </doc>
-      </field>
-    </method>
-    
-    <method name = "consume-ok" synchronous = "1" index = "21" label = "confirm a new consumer">
-      <doc>
-        This method provides the client with a consumer tag which it MUST use in methods
-        that work with the consumer.
-      </doc>
-      
-      <chassis name = "client" implement = "MUST" />
-      
-      <field name = "consumer-tag" domain = "consumer-tag">
-        <doc>Holds the consumer tag specified by the client or provided by the server.</doc>
-      </field>
-    </method>
-    
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "cancel" synchronous = "1" index = "30" label = "end a queue consumer">
-      <doc>
-        This method cancels a consumer. This does not affect already delivered messages, but
-        it does mean the server will not send any more messages for that consumer.
-      </doc>
-
-      <response name = "cancel-ok" />
-
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "consumer-tag" domain = "consumer-tag" />
-
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "cancel-ok" synchronous = "1" index = "31" label = "confirm a cancelled consumer">
-      <doc>This method confirms that the cancellation was completed.</doc>
-
-      <chassis name = "client" implement = "MUST" />
-
-      <field name = "consumer-tag" domain = "consumer-tag" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "open" synchronous = "1" index = "40" label = "request to start staging">
-      <doc>
-        This method requests permission to start staging a message. Staging means sending
-        the message into a temporary area at the recipient end and then delivering the
-        message by referring to this temporary area. Staging is how the protocol handles
-        partial file transfers - if a message is partially staged and the connection breaks,
-        the next time the sender starts to stage it, it can restart from where it left off.
-      </doc>
-
-      <response name = "open-ok" />
-
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-
-      <field name = "identifier" domain = "shortstr" label = "staging identifier">
-        <doc>
-          This is the staging identifier. This is an arbitrary string chosen by the
-          sender. For staging to work correctly the sender must use the same staging
-          identifier when staging the same message a second time after recovery from a
-          failure. A good choice for the staging identifier would be the SHA1 hash of the
-          message properties data (including the original filename, revised time, etc.).
-        </doc>
-      </field>
-      
-      <field name = "content-size" domain = "longlong" label = "message content size">
-        <doc>
-          The size of the content in octets. The recipient may use this information to
-          allocate or check available space in advance, to avoid "disk full" errors during
-          staging of very large messages.
-        </doc>
-        
-        <rule name = "01">
-          <doc>
-            The sender MUST accurately fill the content-size field. Zero-length content
-            is permitted.
-          </doc>
-        </rule>
-      </field>
-    </method>
-    
-    <method name = "open-ok" synchronous = "1" index = "41" label = "confirm staging ready">
-      <doc>
-        This method confirms that the recipient is ready to accept staged data. If the
-        message was already partially-staged at a previous time the recipient will report
-        the number of octets already staged.
-      </doc>
-      
-      <response name = "stage" />
-      
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-
-      <field name = "staged-size" domain = "longlong" label = "already staged amount">
-        <doc>
-          The amount of previously-staged content in octets. For a new message this will
-          be zero.
-        </doc>
-        
-        <rule name = "01">
-          <doc>
-            The sender MUST start sending data from this octet offset in the message,
-            counting from zero.
-          </doc>
-        </rule>
-        
-        <rule name = "02">
-          <!-- TODO: Rule split? -->
-          <doc>
-            The recipient MAY decide how long to hold partially-staged content and MAY
-            implement staging by always discarding partially-staged content. However if
-            it uses the file content type it MUST support the staging methods.
-          </doc>
-        </rule>
-      </field>
-    </method>
-    
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "stage" content = "1" index = "50" label = "stage message content">
-      <doc>
-        This method stages the message, sending the message content to the recipient from
-        the octet offset specified in the Open-Ok method.
-      </doc>
-      
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-    </method>
-    
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "publish" index = "60" label = "publish a message">
-      <doc>
-        This method publishes a staged file message to a specific exchange. The file message
-        will be routed to queues as defined by the exchange configuration and distributed to
-        any active consumers when the transaction, if any, is committed.
-      </doc>
-      
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "ticket" domain = "access-ticket">
-        <rule name = "01">
-          <doc>
-            The client MUST provide a valid access ticket giving "write" access rights
-            to the access realm for the exchange.
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "exchange" domain = "exchange-name">
-        <doc>
-          Specifies the name of the exchange to publish to. The exchange name can be
-          empty, meaning the default exchange. If the exchange name is specified, and that
-          exchange does not exist, the server will raise a channel exception.
-        </doc>
-        
-        <rule name = "01">
-          <doc>
-            The server MUST accept a blank exchange name to mean the default exchange.
-          </doc>
-        </rule>
-        
-        <rule name = "02">
-          <doc>
-            If the exchange was declared as an internal exchange, the server MUST
-            respond with a reply code 403 (access refused) and raise a channel
-            exception.
-          </doc>
-        </rule>
-        
-        <!-- TODO: Rule split? -->
-        
-        <rule name = "03">
-          <doc>
-            The exchange MAY refuse file content in which case it MUST respond with a
-            reply code 540 (not implemented) and raise a channel exception.
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "routing-key" domain = "shortstr" label = "Message routing key">
-        <doc>
-          Specifies the routing key for the message. The routing key is used for routing
-          messages depending on the exchange configuration.
-        </doc>
-      </field>
-      
-      <field name = "mandatory" domain = "bit" label = "indicate mandatory routing">
-        <doc>
-          This flag tells the server how to react if the message cannot be routed to a
-          queue. If this flag is set, the server will return an unroutable message with a
-          Return method. If this flag is zero, the server silently drops the message.
-        </doc>
-        
-        <!-- Rule test name: was "amq_file_00" -->    
-        <rule name = "01">
-          <doc>The server SHOULD implement the mandatory flag.</doc>
-        </rule>
-      </field>
-      
-      <field name = "immediate" domain = "bit" label = "request immediate delivery">
-        <doc>
-          This flag tells the server how to react if the message cannot be routed to a
-          queue consumer immediately. If this flag is set, the server will return an
-          undeliverable message with a Return method. If this flag is zero, the server
-          will queue the message, but with no guarantee that it will ever be consumed.
-        </doc>
-                
-        <!-- Rule test name: was "amq_file_00" -->    
-        <rule name = "01">
-          <doc>The server SHOULD implement the immediate flag.</doc>
-        </rule>
-      </field>
-      
-      <field name = "identifier" domain = "shortstr" label = "staging identifier">
-        <doc>
-          This is the staging identifier of the message to publish. The message must have
-          been staged. Note that a client can send the Publish method asynchronously
-          without waiting for staging to finish.
-        </doc>
-      </field>
-    </method>
-    
-    <method name = "return" content = "1" index = "70" label = "return a failed message">
-      <doc>
-        This method returns an undeliverable message that was published with the "immediate"
-        flag set, or an unroutable message published with the "mandatory" flag set. The
-        reply code and text provide information about the reason that the message was
-        undeliverable.
-      </doc>
-      
-      <chassis name = "client" implement = "MUST" />
-      
-      <field name = "reply-code" domain = "reply-code" />
-      
-      <field name = "reply-text" domain = "reply-text" />
-      
-      <field name = "exchange" domain = "exchange-name">
-        <doc>
-          Specifies the name of the exchange that the message was originally published to.
-        </doc>
-      </field>
-
-      <field name = "routing-key" domain = "shortstr" label = "Message routing key">
-        <doc>Specifies the routing key name specified when the message was published.</doc>
-      </field>
-    </method>
-    
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "deliver" index = "80" label = "notify the client of a consumer message">
-      <doc>
-        This method delivers a staged file message to the client, via a consumer. In the
-        asynchronous message delivery model, the client starts a consumer using the Consume
-        method, then the server responds with Deliver methods as and when messages arrive
-        for that consumer.
-      </doc>
-      
-      <rule name = "01">
-        <!-- TODO: Rule split? -->
-        <doc>
-          The server SHOULD track the number of times a message has been delivered to
-          clients and when a message is redelivered a certain number of times - e.g. 5
-          times - without being acknowledged, the server SHOULD consider the message to be
-          unprocessable (possibly causing client applications to abort), and move the
-          message to a dead letter queue.
-        </doc>
-      </rule>
-      
-      <chassis name = "client" implement = "MUST" />
-      
-      <field name = "consumer-tag" domain = "consumer-tag" />
-      
-      <field name = "delivery-tag" domain = "delivery-tag" />
-      
-      <field name = "redelivered" domain = "redelivered" />
-      
-      <field name = "exchange" domain = "exchange-name">
-        <doc>
-          Specifies the name of the exchange that the message was originally published to.
-        </doc>
-      </field>
-      
-      <field name = "routing-key" domain = "shortstr" label = "Message routing key">
-        <doc>Specifies the routing key name specified when the message was published.</doc>
-      </field>
-      
-      <field name = "identifier" domain = "shortstr" label = "staging identifier">
-        <doc>
-          This is the staging identifier of the message to deliver. The message must have
-          been staged. Note that a server can send the Deliver method asynchronously
-          without waiting for staging to finish.
-        </doc>
-      </field>
-    </method>
-    
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "ack" index = "90" label = "acknowledge one or more messages">
-      <doc>
-        This method acknowledges one or more messages delivered via the Deliver method. The
-        client can ask to confirm a single message or a set of messages up to and including
-        a specific message.
-      </doc>
-      
-      <chassis name = "server" implement = "MUST" />
-      
-      <field name = "delivery-tag" domain = "delivery-tag" />
-      
-      <field name = "multiple" domain = "bit" label = "acknowledge multiple messages">
-        <doc>
-          If set to 1, the delivery tag is treated as "up to and including", so that the
-          client can acknowledge multiple messages with a single method. If set to zero,
-          the delivery tag refers to a single message. If the multiple field is 1, and the
-          delivery tag is zero, tells the server to acknowledge all outstanding messages.
-        </doc>
-        
-        <rule name = "01">
-          <doc>
-            The server MUST validate that a non-zero delivery-tag refers to an delivered
-            message, and raise a channel exception if this is not the case.
-          </doc>
-        </rule>
-      </field>
-    </method>
-    
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "reject" index = "100" label = "reject an incoming message">
-      <doc>
-        This method allows a client to reject a message. It can be used to return
-        untreatable messages to their original queue. Note that file content is staged
-        before delivery, so the client will not use this method to interrupt delivery of a
-        large message.
-      </doc>
-      
-      <rule name = "01">
-        <doc>
-          The server SHOULD interpret this method as meaning that the client is unable to
-          process the message at this time.
-        </doc>
-      </rule>
-      
-      <!-- TODO: Rule split? -->
-      
-      <rule name = "02">
-        <doc>
-          A client MUST NOT use this method as a means of selecting messages to process. A
-          rejected message MAY be discarded or dead-lettered, not necessarily passed to
-          another client.
-        </doc>
-      </rule>
-      
-      <chassis name = "server" implement = "MUST" />
-      
-      <field name = "delivery-tag" domain = "delivery-tag" />
-      
-      <field name = "requeue" domain = "bit" label = "requeue the message">
-        <doc>
-          If this field is zero, the message will be discarded. If this bit is 1, the
-          server will attempt to requeue the message.
-        </doc>
-        
-        <rule name = "01">
-          <!-- TODO: Rule split? -->
-          <doc>
-            The server MUST NOT deliver the message to the same client within the
-            context of the current channel. The recommended strategy is to attempt to
-            deliver the message to an alternative consumer, and if that is not possible,
-            to move the message to a dead-letter queue. The server MAY use more
-            sophisticated tracking to hold the message on the queue and redeliver it to
-            the same client at a later stage.
-          </doc>
-        </rule>
-      </field>
-    </method>
-  </class>
-
-  <!-- ==  STREAM  =========================================================== -->
-
-  <class name = "stream" handler = "channel" index = "80" label = "work with streaming content">
-    <doc>
-      The stream class provides methods that support multimedia streaming. The stream class
-      uses the following semantics: one message is one packet of data; delivery is
-      unacknowledged and unreliable; the consumer can specify quality of service parameters
-      that the server can try to adhere to; lower-priority messages may be discarded in favour
-      of high priority messages.
-    </doc>
-    
-    <doc type = "grammar">
-      stream              = C:QOS S:QOS-OK
-                          / C:CONSUME S:CONSUME-OK
-                          / C:CANCEL S:CANCEL-OK
-                          / C:PUBLISH content
-                          / S:RETURN
-                          / S:DELIVER content
-    </doc>
-
-    <chassis name = "server" implement = "MAY" />
-    <chassis name = "client" implement = "MAY" />
-
-    <rule name = "01">
-      <doc>
-        The server SHOULD discard stream messages on a priority basis if the queue size
-        exceeds some configured limit.
-      </doc>
-    </rule>
-    
-    <rule name = "02">
-      <!-- TODO: Rule split? -->
-      <doc>
-        The server MUST implement at least 2 priority levels for stream messages, where
-        priorities 0-4 and 5-9 are treated as two distinct levels. The server MAY implement
-        up to 10 priority levels.
-      </doc>
-    </rule>
-    
-    <rule name = "03">
-      <doc>
-        The server MUST implement automatic acknowledgements on stream content. That is, as
-        soon as a message is delivered to a client via a Deliver method, the server must
-        remove it from the queue.
-      </doc>
-    </rule>
-    
-    <!--  These are the properties for a Stream content  -->
-
-    <field name = "content-type"    domain = "shortstr"   label = "MIME content type" />
-    <field name = "content-encoding" domain = "shortstr"  label = "MIME content encoding" />
-    <field name = "headers"         domain = "table"      label = "message header field table" />
-    <field name = "priority"        domain = "octet"      label = "message priority, 0 to 9" />
-    <field name = "timestamp"       domain = "timestamp"  label = "message timestamp" />
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "qos" synchronous = "1" index = "10" label = "specify quality of service">
-      <doc>
-        This method requests a specific quality of service. The QoS can be specified for the
-        current channel or for all channels on the connection. The particular properties and
-        semantics of a qos method always depend on the content class semantics. Though the
-        qos method could in principle apply to both peers, it is currently meaningful only
-        for the server.
-      </doc>
-      
-      <chassis name = "server" implement = "MUST" />
-      
-      <response name = "qos-ok" />
-      
-      <field name = "prefetch-size" domain = "long" label = "prefetch window in octets">
-        <doc>
-          The client can request that messages be sent in advance so that when the client
-          finishes processing a message, the following message is already held locally,
-          rather than needing to be sent down the channel. Prefetching gives a performance
-          improvement. This field specifies the prefetch window size in octets. May be set
-          to zero, meaning "no specific limit". Note that other prefetch limits may still
-          apply.
-        </doc>
-      </field>
-      
-      <field name = "prefetch-count" domain = "short" label = "prefetch window in messages">
-        <doc>
-          Specifies a prefetch window in terms of whole messages. This field may be used
-          in combination with the prefetch-size field; a message will only be sent in
-          advance if both prefetch windows (and those at the channel and connection level)
-          allow it.
-        </doc>
-      </field>
-      
-      <field name = "consume-rate" domain = "long" label = "transfer rate in octets/second">
-        <doc>
-          Specifies a desired transfer rate in octets per second. This is usually
-          determined by the application that uses the streaming data. A value of zero
-          means "no limit", i.e. as rapidly as possible.
-        </doc>
-
-        <rule name = "01">
-          <!-- TODO: Rule split? -->
-          <doc>
-            The server MAY ignore the prefetch values and consume rates, depending on
-            the type of stream and the ability of the server to queue and/or reply it.
-            The server MAY drop low-priority messages in favour of high-priority
-            messages.
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "global" domain = "bit" label = "apply to entire connection">
-        <doc>
-          By default the QoS settings apply to the current channel only. If this field is
-          set, they are applied to the entire connection.
-        </doc>
-      </field>
-    </method>
-    
-    <method name = "qos-ok" synchronous = "1" index = "11" label = "confirm the requested qos">
-      <doc>
-        This method tells the client that the requested QoS levels could be handled by the
-        server. The requested QoS applies to all active consumers until a new QoS is
-        defined.
-      </doc>
-      
-      <chassis name = "client" implement = "MUST" />
-    </method>
-    
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <method name = "consume" synchronous = "1" index = "20" label = "start a queue consumer">
-      <doc>
-        This method asks the server to start a "consumer", which is a transient request for
-        messages from a specific queue. Consumers last as long as the channel they were
-        created on, or until the client cancels them.
-      </doc>
-
-      <rule name = "01">
-        <doc>
-          The server SHOULD support at least 16 consumers per queue, unless the queue was
-          declared as private, and ideally, impose no limit except as defined by available
-          resources.
-        </doc>
-      </rule>
-
-      <rule name = "02">
-        <doc>
-          Streaming applications SHOULD use different channels to select different
-          streaming resolutions. AMQP makes no provision for filtering and/or transforming
-          streams except on the basis of priority-based selective delivery of individual
-          messages.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "consume-ok" />
-
-      <field name = "ticket" domain = "access-ticket">
-        <rule name = "01">
-          <doc>
-            The client MUST provide a valid access ticket giving "read" access rights to
-            the realm for the queue.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "queue" domain = "queue-name">
-        <doc>
-          Specifies the name of the queue to consume from. If the queue name is null,
-          refers to the current queue for the channel, which is the last declared queue.
-        </doc>
-
-        <rule name = "01">
-          <doc>
-            If the client did not previously declare a queue, and the queue name in this
-            method is empty, the server MUST raise a connection exception with reply
-            code 530 (not allowed).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "consumer-tag" domain = "consumer-tag">
-        <doc>
-          Specifies the identifier for the consumer. The consumer tag is local to a
-          connection, so two clients can use the same consumer tags. If this field is
-          empty the server will generate a unique tag.
-        </doc>
-
-        <rule name = "01">
-          <!-- TODO: Rule split? -->
-          <doc>
-            The tag MUST NOT refer to an existing consumer. If the client attempts to
-            create two consumers with the same non-empty tag the server MUST raise a
-            connection exception with reply code 530 (not allowed).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "no-local" domain = "no-local" />
-
-      <field name = "exclusive" domain = "bit" label = "request exclusive access">
-        <doc>
-          Request exclusive consumer access, meaning only this consumer can access the
-          queue.
-        </doc>
-
-
-        <!-- Rule test name: was "amq_file_00" -->    
-        <rule name = "01">
-          <doc>
-            If the server cannot grant exclusive access to the queue when asked, -
-            because there are other consumers active - it MUST raise a channel exception
-            with return code 405 (resource locked).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-      
-      <field name = "filter" domain = "table" label = "arguments for consuming">
-       <doc>
-          A set of filters for the consume. The syntax and semantics
-                 of these filters depends on the providers implementation.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "consume-ok" synchronous = "1" index = "21" label = "confirm a new consumer">
-      <doc>
-        This method provides the client with a consumer tag which it may use in methods that
-        work with the consumer.
-      </doc>
-
-      <chassis name = "client" implement = "MUST" />
-
-      <field name = "consumer-tag" domain = "consumer-tag">
-        <doc>Holds the consumer tag specified by the client or provided by the server.</doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "cancel" synchronous = "1" index = "30" label = "end a queue consumer">
-      <doc>
-        This method cancels a consumer. Since message delivery is asynchronous the client
-        may continue to receive messages for a short while after cancelling a consumer. It
-        may process or discard these as appropriate.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-
-      <response name = "cancel-ok" />
-
-      <field name = "consumer-tag" domain = "consumer-tag" />
-
-      <field name = "nowait" domain = "bit" label = "do not send a reply method">
-        <doc>
-          If set, the server will not respond to the method. The client should not wait
-          for a reply method. If the server could not complete the method it will raise a
-          channel or connection exception.
-        </doc>
-      </field>
-    </method>
-
-    <method name = "cancel-ok" synchronous = "1" index = "31" label = "confirm a cancelled consumer">
-      <doc>This method confirms that the cancellation was completed.</doc>
-
-      <chassis name = "client" implement = "MUST" />
-
-      <field name = "consumer-tag" domain = "consumer-tag" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "publish" content = "1" index = "40" label = "publish a message">
-      <doc>
-        This method publishes a message to a specific exchange. The message will be routed
-        to queues as defined by the exchange configuration and distributed to any active
-        consumers as appropriate.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "ticket" domain = "access-ticket">
-        <rule name = "01">
-          <doc>
-            The client MUST provide a valid access ticket giving "write" access rights
-            to the access realm for the exchange.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "exchange" domain = "exchange-name">
-        <doc>
-          Specifies the name of the exchange to publish to. The exchange name can be
-          empty, meaning the default exchange. If the exchange name is specified, and that
-          exchange does not exist, the server will raise a channel exception.
-        </doc>
-
-        <rule name = "01">
-          <doc>
-            The server MUST accept a blank exchange name to mean the default exchange.
-          </doc>
-        </rule>
-
-        <rule name = "02">
-          <doc>
-            If the exchange was declared as an internal exchange, the server MUST
-            respond with a reply code 403 (access refused) and raise a channel
-            exception.
-          </doc>
-        </rule>
-
-        <rule name = "03">
-          <doc>
-            The exchange MAY refuse stream content in which case it MUST respond with a
-            reply code 540 (not implemented) and raise a channel exception.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "routing-key" domain = "shortstr" label = "Message routing key">
-        <doc>
-          Specifies the routing key for the message. The routing key is used for routing
-          messages depending on the exchange configuration.
-        </doc>
-      </field>
-
-      <field name = "mandatory" domain = "bit" label = "indicate mandatory routing">
-        <doc>
-          This flag tells the server how to react if the message cannot be routed to a
-          queue. If this flag is set, the server will return an unroutable message with a
-          Return method. If this flag is zero, the server silently drops the message.
-        </doc>
-
-        <!-- Rule test name: was "amq_stream_00" -->    
-        <rule name = "01">
-          <doc>The server SHOULD implement the mandatory flag.</doc>
-        </rule>
-      </field>
-
-      <field name = "immediate" domain = "bit" label = "request immediate delivery">
-        <doc>
-          This flag tells the server how to react if the message cannot be routed to a
-          queue consumer immediately. If this flag is set, the server will return an
-          undeliverable message with a Return method. If this flag is zero, the server
-          will queue the message, but with no guarantee that it will ever be consumed.
-        </doc>
-
-        <!-- Rule test name: was "amq_stream_00" -->    
-        <rule name = "01">
-          <doc>The server SHOULD implement the immediate flag.</doc>
-        </rule>
-      </field>
-    </method>
-
-    <method name = "return" content = "1" index = "50" label = "return a failed message">
-      <doc>
-        This method returns an undeliverable message that was published with the "immediate"
-        flag set, or an unroutable message published with the "mandatory" flag set. The
-        reply code and text provide information about the reason that the message was
-        undeliverable.
-      </doc>
-
-      <chassis name = "client" implement = "MUST" />
-
-      <field name = "reply-code" domain = "reply-code" />
-
-      <field name = "reply-text" domain = "reply-text" />
-
-      <field name = "exchange" domain = "exchange-name">
-        <doc>
-          Specifies the name of the exchange that the message was originally published to.
-        </doc>
-      </field>
-
-      <field name = "routing-key" domain = "shortstr" label = "Message routing key">
-        <doc>Specifies the routing key name specified when the message was published.</doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "deliver" content = "1" index = "60"
-      label = "notify the client of a consumer message">
-      <doc>
-        This method delivers a message to the client, via a consumer. In the asynchronous
-        message delivery model, the client starts a consumer using the Consume method, then
-        the server responds with Deliver methods as and when messages arrive for that
-        consumer.
-      </doc>
-
-      <chassis name = "client" implement = "MUST" />
-
-      <field name = "consumer-tag" domain = "consumer-tag" />
-
-      <field name = "delivery-tag" domain = "delivery-tag" />
-
-      <field name = "exchange" domain = "exchange-name">
-        <doc>
-          Specifies the name of the exchange that the message was originally published to.
-        </doc>
-      </field>
-
-      <field name = "queue" domain = "queue-name">
-        <doc>
-          Specifies the name of the queue that the message came from. Note that a single
-          channel can start many consumers on different queues.
-        </doc>
-        <assert check = "notnull" />
-      </field>
-    </method>
-  </class>
-
-  <!-- ==  TX  =============================================================== -->
-
-  <class name = "tx" handler = "channel" index = "90" label = "work with standard transactions">
-    <doc>
-      Standard transactions provide so-called "1.5 phase commit". We can ensure that work is
-      never lost, but there is a chance of confirmations being lost, so that messages may be
-      resent. Applications that use standard transactions must be able to detect and ignore
-      duplicate messages.
-    </doc>
-
-    <!-- TODO: Rule split? -->
-
-    <rule name = "01">
-      <doc>
-        An client using standard transactions SHOULD be able to track all messages received
-        within a reasonable period, and thus detect and reject duplicates of the same
-        message. It SHOULD NOT pass these to the application layer.
-      </doc>
-    </rule>
-
-    <doc type = "grammar">
-      tx                  = C:SELECT S:SELECT-OK
-                          / C:COMMIT S:COMMIT-OK
-                          / C:ROLLBACK S:ROLLBACK-OK
-    </doc>
-
-    <chassis name = "server" implement = "SHOULD" />
-    <chassis name = "client" implement = "MAY" />
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "select" synchronous = "1" index = "10" label = "select standard transaction mode">
-      <doc>
-        This method sets the channel to use standard transactions. The client must use this
-        method at least once on a channel before using the Commit or Rollback methods.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <response name = "select-ok" />
-    </method>
-
-    <method name = "select-ok" synchronous = "1" index = "11" label = "confirm transaction mode">
-      <doc>
-        This method confirms to the client that the channel was successfully set to use
-        standard transactions.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "commit" synchronous = "1" index = "20" label = "commit the current transaction">
-      <doc>
-        This method commits all messages published and acknowledged in the current
-        transaction. A new transaction starts immediately after a commit.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <response name = "commit-ok" />
-    </method>
-
-    <method name = "commit-ok" synchronous = "1" index = "21" label = "confirm a successful commit">
-      <doc>
-        This method confirms to the client that the commit succeeded. Note that if a commit
-        fails, the server raises a channel exception.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "rollback" synchronous = "1" index = "30"
-      label = "abandon the current transaction">
-      <doc>
-        This method abandons all messages published and acknowledged in the current
-        transaction. A new transaction starts immediately after a rollback.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <response name = "rollback-ok" />
-    </method>
-
-    <method name = "rollback-ok" synchronous = "1" index = "31" label = "confirm successful rollback">
-      <doc>
-        This method confirms to the client that the rollback succeeded. Note that if an
-        rollback fails, the server raises a channel exception.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-    </method>
-  </class>
-
-  <!-- ==  DTX  ============================================================== -->
-
-  <class name = "dtx" handler = "channel" index = "100" label = "work with distributed transactions">
-    <doc>
-      Distributed transactions provide so-called "2-phase commit". The AMQP distributed
-      transaction model supports the X-Open XA architecture and other distributed transaction
-      implementations. The Dtx class assumes that the server has a private communications
-      channel (not AMQP) to a distributed transaction coordinator.
-    </doc>
-    
-    <doc type = "grammar">
-      dtx                 = C:SELECT S:SELECT-OK
-                            C:START S:START-OK
-    </doc>
-
-    <chassis name = "server" implement = "MAY" />
-    <chassis name = "client" implement = "MAY" />
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "select" synchronous = "1" index = "10" label = "select standard transaction mode">
-      <doc>
-        This method sets the channel to use distributed transactions. The client must use
-        this method at least once on a channel before using the Start method.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <response name = "select-ok" />
-    </method>
-
-    <method name = "select-ok" synchronous = "1" index = "11" label = "confirm transaction mode">
-      <doc>
-        This method confirms to the client that the channel was successfully set to use
-        distributed transactions.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "start" synchronous = "1" index = "20"
-      label = "start a new distributed transaction">
-      <doc>
-        This method starts a new distributed transaction. This must be the first method on a
-        new channel that uses the distributed transaction mode, before any methods that
-        publish or consume messages.
-      </doc>
-      <chassis name = "server" implement = "MAY" />
-      <response name = "start-ok" />
-      <field name = "dtx-identifier" domain = "shortstr" label = "transaction identifier">
-        <doc>
-          The distributed transaction key. This identifies the transaction so that the
-          AMQP server can coordinate with the distributed transaction coordinator.
-        </doc>
-        <assert check = "notnull" />
-      </field>
-    </method>
-
-    <method name = "start-ok" synchronous = "1" index = "21"
-      label = "confirm the start of a new distributed transaction">
-      <doc>
-        This method confirms to the client that the transaction started. Note that if a
-        start fails, the server raises a channel exception.
-      </doc>
-      <chassis name = "client" implement = "MUST" />
-    </method>
-  </class>
-
-  <!-- ==  TUNNEL  =========================================================== -->
-
-  <class name = "tunnel" handler = "tunnel" index = "110" label = "methods for protocol tunnelling">
-    <doc>
-      The tunnel methods are used to send blocks of binary data - which can be serialised AMQP
-      methods or other protocol frames - between AMQP peers.
-    </doc>
-
-    <doc type = "grammar">
-      tunnel              = C:REQUEST
-                          / S:REQUEST
-    </doc>
-
-    <chassis name = "server" implement = "MAY" />
-    <chassis name = "client" implement = "MAY" />
-
-    <field name = "headers"     domain = "table"      label = "message header field table" />
-    <field name = "proxy-name"  domain = "shortstr"   label = "identity of tunnelling proxy" />
-    <field name = "data-name"   domain = "shortstr"   label = "name or type of message being tunnelled" />
-    <field name = "durable"     domain = "octet"      label = "message durability indicator" />
-    <field name = "broadcast"   domain = "octet"      label = "message broadcast mode" />
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "request" content = "1" index = "10" label = "sends a tunnelled method">
-      <doc>
-        This method tunnels a block of binary data, which can be an encoded
-        AMQP method or other data. The binary data is sent as the content for
-        the Tunnel.Request method.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <field name = "meta-data" domain = "table" label = "meta data for the tunnelled block">
-        <doc>
-          This field table holds arbitrary meta-data that the sender needs to
-          pass to the recipient.
-        </doc>
-      </field>
-    </method>
-  </class>
-
-  <!-- == MESSAGE ============================================================ -->
-
-  <class name = "message" index = "120" handler = "channel" label = "[WORK IN PROGRESS] message transfer">
-    <doc>
-      [WORK IN PROGRESS] The message class provides methods that support an industry-standard messaging model.
-    </doc>
-
-    <doc type = "grammar">
-      message             = C:QOS S:OK
-                          / C:CONSUME S:OK
-                          / C:CANCEL S:OK
-                          / C:TRANSFER ( S:OK / S:REJECT )
-                          / S:TRANSFER ( C:OK / C:REJECT )
-                          / C:GET ( S:OK / S:EMPTY )
-                          / C:RECOVER S:OK
-                          / C:OPEN S:OK
-                          / S:OPEN C:OK
-                          / C:APPEND S:OK
-                          / S:APPEND C:OK
-                          / C:CLOSE S:OK
-                          / S:CLOSE C:OK
-                          / C:CHECKPOINT S:OK
-                          / S:CHECKPOINT C:OK
-                          / C:RESUME S:OFFSET
-                          / S:RESUME C:OFFSET
-    </doc>
-
-    <chassis name = "server" implement = "MUST" />
-    <chassis name = "client" implement = "MUST" />
-
-    <rule name = "01">
-      <doc>
-        The server SHOULD respect the persistent property of messages
-        and SHOULD make a best-effort to hold persistent mess ages on
-        a reliable storage mechanism.
-      </doc>
-      <doc type = "scenario">
-        Send a persistent message to queue, stop server, restart
-        server and then verify whether message is still present.
-        Assumes that queues are durable. Persistence without durable
-        queues makes no sense.
-      </doc>
-    </rule>
-
-    <rule name = "02">
-      <doc>
-        The server MUST NOT discard a persistent message in case of a
-        queue overflow.
-      </doc>
-      <doc type = "scenario">
-        Create a queue overflow situation with persistent messages and
-        verify that messages do not get lost (presumably the server
-        will write them to disk).
-      </doc>
-    </rule>
-
-    <rule name = "03">
-      <doc>
-        The server MAY use the Channel.Flow method to slow or stop a
-        message publisher when necessary.
-      </doc>
-      <doc type = "scenario">
-        Create a queue overflow situation with non-persistent messages
-        and verify whether the server responds with Channel.Flow or
-        not. Repeat with persistent messages.
-      </doc>
-    </rule>
-
-    <rule name = "04">
-      <doc>
-        The server MAY overflow non-persistent messages to persistent
-        storage.
-      </doc>
-    </rule>
-
-    <rule name = "05">
-      <doc>
-        The server MAY discard or dead-letter non-persistent messages
-        on a priority basis if the queue size exceeds some configured
-        limit.
-      </doc>
-    </rule>
-
-    <rule name = "06">
-      <doc>
-        The server MUST implement at least 2 priority levels for
-        messages, where priorities 0-4 and 5-9 are treated as two
-        distinct levels.
-      </doc>
-      <doc type = "scenario">
-        Send a number of priority 0 messages to a queue. Send one
-        priority 9 message. Consume messages from the queue and verify
-        that the first message received was priority 9.
-      </doc>
-    </rule>
-
-    <rule name = "07">
-      <doc>
-        The server MAY implement up to 10 priority levels.
-      </doc>
-      <doc type = "scenario">
-        Send a number of messages with mixed priorities to a queue, so
-        that all priority values from 0 to 9 are exercised. A good
-        scenario would be ten messages in low-to-high priority.
-        Consume from queue and verify how many priority levels emerge.
-      </doc>
-    </rule>
-
-    <rule name = "08">
-      <doc>
-        The server MUST deliver messages of the same priority in order
-        irrespective of their individual persistence.
-      </doc>
-      <doc type = "scenario">
-        Send a set of messages with the same priority but different
-        persistence settings to a queue. Consume and verify that
-        messages arrive in same order as originally published.
-      </doc>
-    </rule>
-
-    <rule name = "09">
-      <doc>
-        The server MUST support automatic acknowledgements on
-        messages, i.e. consumers with the no-ack field set to FALSE.
-      </doc>
-      <doc type = "scenario">
-        Create a queue and a consumer using automatic
-        acknowledgements. Publish a set of messages to the queue.
-        Consume the messages and verify that all messages are
-        received.
-      </doc>
-    </rule>
-
-    <rule name = "10">
-      <doc>
-        The server MUST support explicit acknowledgements on messages,
-        i.e. consumers with the no-ack field set to TRUE.
-      </doc>
-      <doc type = "scenario">
-        Create a queue and a consumer using explicit acknowledgements.
-        Publish a set of messages to the queue. Consume the messages
-        but acknowledge only half of them. Disconnect and reconnect,
-        and consume from the queue. Verify that the remaining messages
-        are received.
-      </doc>
-    </rule>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "transfer" index = "10" label = "[WORK IN PROGRESS] transfer a message">
-      <doc>
-        [WORK IN PROGRESS] This method transfers a message between two peers. When a
-        client uses this method to publish a message to a broker, the
-        destination identifies a specific exchange. The message will
-        then be routed to queues as defined by the exchange
-        configuration and distributed to any active consumers when the
-        transaction, if any, is committed.
-
-        In the asynchronous message delivery model, the client starts
-        a consumer using the Consume method and passing in a
-        destination, then the broker responds with transfer methods to
-        the specified destination as and when messages arrive for that
-        consumer.
-
-        If synchronous message delivery is required, the client may
-        issue a get request which on success causes a single message
-        to be transferred to the specified destination.
-
-        Message acknowledgement is signalled by the return result of
-        this method.
-      </doc>
-
-      <rule name = "01">
-        <doc>
-          The recipient MUST NOT return ok before the message has been
-          processed as defined by the QoS settings.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-      <response name = "ok" />
-      <response name = "reject" />
-
-      <field name = "ticket"      domain = "access-ticket">
-        <rule name = "01">
-          <doc>
-            The client MUST provide a valid access ticket giving "write" access rights
-            to the access realm for the exchange.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "destination" domain = "destination">
-        <doc>
-          Specifies the destination to which the message is to be
-          transferred. The destination can be empty, meaning the
-          default exchange or consumer. If the destination is
-          specified, and that exchange or consumer does not exist, the
-          peer must raise a channel exception.
-        </doc>
-
-        <rule name = "01">
-          <doc>
-            The server MUST accept a blank destination to mean the
-            default exchange.
-          </doc>
-        </rule>
-
-        <rule name = "02">
-          <doc>
-            If the destination refers to an internal exchange, the
-            server MUST raise a channel exception with a reply code
-            403 (access refused).
-          </doc>
-        </rule>
-
-        <rule name = "03">
-          <doc>
-            A destination MAY refuse message content in which case it
-            MUST raise a channel exception with reply code 540 (not
-            implemented).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "redelivered" domain = "redelivered" />
-
-      <field name = "immediate"   domain = "bit"         label = "request immediate delivery">
-        <doc>
-          This flag tells the server how to react if the message
-          cannot be routed to a queue consumer immediately. If this
-          flag is set, the server will reject the message. If this
-          flag is zero, the server will queue the message, but with no
-          guarantee that it will ever be consumed.
-        </doc>
-        <rule name = "01">
-          <doc>
-            The server SHOULD implement the immediate flag.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "ttl"         domain = "duration"    label = "time to live">
-        <doc>
-          If this is set to a non zero value then a message expiration
-          time will be computed based on the current time plus this
-          value. Messages that live longer than their expiration time
-          will be discarded (or dead lettered).
-        </doc>
-        <rule name = "01">
-          <doc>
-            If a message is transfered between brokers before delivery
-            to a final consumer the ttl should be decremented before
-            peer to peer transfer and both timestamp and expiration
-            should be cleared.
-          </doc>
-        </rule>
-      </field>
-
-      <!-- begin headers -->
-      <field name = "priority"            domain = "octet"         label = "message priority, 0 to 9" />
-      <field name = "timestamp"           domain = "timestamp"     label = "message timestamp">
-        <doc>
-          Set on arrival by the broker.
-        </doc>
-      </field>
-      <field name = "delivery-mode"       domain = "octet"         label = "non-persistent (1) or persistent (2)" />
-      <field name = "expiration"          domain = "timestamp"     label = "message expiration time">
-        <doc>
-          The expiration header assigned by the broker. After
-          receiving the message the broker sets expiration to the sum
-          of the ttl specified in the publish method and the current
-          time. (ttl = expiration - timestamp)
-        </doc>
-      </field>
-      <field name = "exchange"            domain = "exchange-name" label = "originating exchange" />
-      <field name = "routing-key"         domain = "shortstr"      label = "message routing key" />
-      <field name = "message-id"          domain = "shortstr"      label = "application message identifier" />
-      <field name = "correlation-id"      domain = "shortstr"      label = "application correlation identifier" />
-      <field name = "reply-to"            domain = "shortstr"      label = "destination to reply to" />
-      <field name = "content-type"        domain = "shortstr"      label = "MIME content type" />
-      <field name = "content-encoding"    domain = "shortstr"      label = "MIME content encoding" />
-      <field name = "user-id"             domain = "shortstr"      label = "creating user id" />
-      <field name = "app-id"              domain = "shortstr"      label = "creating application id" />
-      <field name = "transaction-id"      domain = "shortstr"      label = "distributed transaction id" />
-      <field name = "security-token"      domain = "security-token" />
-      <field name = "application-headers" domain = "table"         label = "application specific headers table" />
-      <!-- end headers -->
-
-      <field name = "body" domain = "content" label = "message body" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "consume" index = "20" label = "[WORK IN PROGRESS] start a queue consumer">
-      <doc>
-        [WORK IN PROGRESS] This method asks the server to start a "consumer", which is a transient request for
-        messages from a specific queue. Consumers last as long as the channel they were
-        created on, or until the client cancels them.
-      </doc>
-
-      <rule name = "01">
-        <doc>
-          The server SHOULD support at least 16 consumers per queue, and ideally, impose
-          no limit except as defined by available resources.
-        </doc>
-        <doc type = "scenario">
-          Create a queue and create consumers on that queue until the server closes the
-          connection. Verify that the number of consumers created was at least sixteen
-          and report the total number.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "ok" />
-
-      <field name = "ticket"      domain = "access-ticket">
-        <rule name = "01" on-failure = "access-refused">
-          <doc>
-            The client MUST provide a valid access ticket giving "read" access rights to
-            the realm for the queue.
-          </doc>
-          <doc type = "scenario">
-            Attempt to create a consumer with an invalid (non-zero) access ticket.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "queue"       domain = "queue-name">
-        <doc>
-          Specifies the name of the queue to consume from. If the queue name is null,
-          refers to the current queue for the channel, which is the last declared queue.
-        </doc>
-        <rule name = "01" on-failure = "not-allowed">
-          <doc>
-            If the queue name is empty the client MUST have previously declared a
-            queue using this channel.
-          </doc>
-          <doc type = "scenario">
-            Attempt to create a consumer with an empty queue name and no previously
-            declared queue on the channel.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "destination" domain = "destination" label = "incoming message destination">
-        <doc>
-          Specifies the destination for the consumer. The destination is local to a
-          connection, so two clients can use the same destination.
-        </doc>
-        <rule name = "01" on-failure = "not-allowed">
-          <doc>
-            The client MUST NOT specify a destination that refers to an existing consumer.
-          </doc>
-          <doc type = "scenario">
-            Attempt to create two consumers with the same non-empty destination.
-          </doc>
-        </rule>
-        <rule name = "02" on-failure = "not-allowed">
-          <doc>
-            The destination is valid only within the channel from which the
-            consumer was created. I.e. a client MUST NOT create a consumer in one
-            channel and then use it in another.
-          </doc>
-          <doc type = "scenario">
-            Attempt to create a consumer in one channel, then use in another channel,
-            in which consumers have also been created (to test that the server uses
-            unique destinations).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "no-local"    domain = "no-local" />
-
-      <field name = "no-ack"      domain = "no-ack" />
-
-      <field name = "exclusive"   domain = "bit"         label = "request exclusive access">
-        <doc>
-          Request exclusive consumer access, meaning only this consumer can access the
-          queue.
-        </doc>
-
-        <rule name = "01" on-failure = "access-refused">
-          <doc>
-            The client MAY NOT gain exclusive access to a queue that already has
-            active consumers.
-          </doc>
-          <doc type = "scenario">
-            Open two connections to a server, and in one connection create a shared
-            (non-exclusive) queue and then consume from the queue.  In the second
-            connection attempt to consume from the same queue using the exclusive
-            option.
-          </doc>
-        </rule>
-      </field>
-      
-      <field name = "filter" domain = "table" label = "arguments for consuming">
-       <doc>
-          A set of filters for the consume. The syntax and semantics
-                 of these filters depends on the providers implementation.
-        </doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "cancel" index = "30" label = "[WORK IN PROGRESS] end a queue consumer">
-      <doc>
-        [WORK IN PROGRESS] This method cancels a consumer. This does not affect already delivered
-        messages, but it does mean the server will not send any more messages for
-        that consumer. The client may receive an arbitrary number of messages in
-        between sending the cancel method and receiving the cancel-ok reply.
-      </doc>
-
-      <rule name = "01">
-        <doc>
-          If the queue does not exist the server MUST ignore the cancel method, so
-          long as the consumer tag is valid for that channel.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "ok" />
-
-      <field name = "destination" domain = "destination"/>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "get" index = "40" label = "[WORK IN PROGRESS] direct access to a queue">
-      <doc>
-        [WORK IN PROGRESS] This method provides a direct access to the messages in a queue using a synchronous
-        dialogue that is designed for specific types of application where synchronous
-        functionality is more important than performance.
-      </doc>
-
-      <response name = "ok" />
-      <response name = "empty" />
-      <chassis name = "server" implement = "MUST" />
-
-      <field name = "ticket" domain = "access-ticket">
-        <rule name = "01">
-          <doc>
-            The client MUST provide a valid access ticket giving "read" access rights to
-            the realm for the queue.
-          </doc>
-        </rule>
-      </field>
-      <field name = "queue" domain = "queue-name">
-        <doc>
-          Specifies the name of the queue to consume from. If the queue name is null,
-          refers to the current queue for the channel, which is the last declared queue.
-        </doc>
-        <rule name = "01">
-          <doc>
-            If the client did not previously declare a queue, and the queue name in this
-            method is empty, the server MUST raise a connection exception with reply
-            code 530 (not allowed).
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "destination" domain = "destination">
-        <doc>
-          On normal completion of the get request (i.e. a response of
-          ok). A message will be transferred to the supplied destination.
-        </doc>
-      </field>
-
-      <field name = "no-ack" domain = "no-ack" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "recover" index = "50" label = "[WORK IN PROGRESS] redeliver unacknowledged messages">
-      <doc>
-        [WORK IN PROGRESS] This method asks the broker to redeliver all unacknowledged
-        messages on a specified channel. Zero or more messages may be
-        redelivered. This method is only allowed on non-transacted
-        channels.
-      </doc>
-
-      <rule name = "01">
-        <doc>
-          The server MUST set the redelivered flag on all messages
-          that are resent.
-        </doc>
-      </rule>
-
-      <rule name = "02">
-        <doc>
-          The server MUST raise a channel exception if this is called
-          on a transacted channel.
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "ok" />
-
-      <field name = "requeue" domain = "bit" label = "requeue the message">
-        <doc>
-          If this field is zero, the message will be redelivered to
-          the original recipient. If this bit is 1, the server will
-          attempt to requeue the message, potentially then delivering
-          it to an alternative subscriber.
-        </doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "open" index = "60" label = "[WORK IN PROGRESS] create a reference to an empty message body">
-      <doc>
-        [WORK IN PROGRESS] This method creates a reference. A references provides a means
-        to send a message body into a temporary area at the recipient
-        end and then deliver the message by referring to this
-        temporary area. This is how the protocol handles large message
-        transfers.
-
-        The scope of a ref is defined to be between calls to
-        open (or resume) and close. Between these points it is valid
-        for a ref to be used from any content data type, and so the
-        receiver must hold onto its contents. Should the channel be
-        closed when a ref is still in scope, the receiver may discard
-        its contents (unless it is checkpointed). A ref that is in
-        scope is considered open.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-      <response name = "ok" />
-
-      <field name = "reference" domain = "reference">
-        <rule name = "01">
-          <doc>
-            The recipient MUST generate an error if the reference is
-            currently open (in scope).
-          </doc>
-        </rule>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "close" index = "70" label = "[WORK IN PROGRESS] close a reference">
-      <doc>
-        [WORK IN PROGRESS] This method signals the recipient that no more data will be
-        appended to the reference.
-      </doc>
-
-      <rule name = "01">
-        <doc>
-          A recipient CANNOT acknowledge a message until its reference
-          is closed (not in scope).
-        </doc>
-      </rule>
-
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-
-      <response name = "ok" />
-      <field name = "reference" domain = "reference" label = "target reference">
-        <rule name = "01">
-          <doc>
-            The recipient MUST generate an error if the reference was
-            not previously open (in scope).
-          </doc>
-        </rule>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "append" index = "80" label = "[WORK IN PROGRESS] append to a reference">
-      <doc>
-        [WORK IN PROGRESS] This method appends data to a reference.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-      <response name = "ok" />
-
-      <field name = "reference" domain = "reference" label = "target reference">
-        <rule name = "01">
-          <doc>
-            The recipient MUST generate an error if the reference is
-            not open (not in scope).
-          </doc>
-        </rule>
-      </field>
-      <field name = "bytes"     domain = "longstr"   label = "data to append" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "checkpoint" index = "90" label = "[WORK IN PROGRESS] checkpoint a message body">
-      <doc>
-        [WORK IN PROGRESS] This method provides a means to checkpoint large message
-        transfer. The sender may ask the recipient to checkpoint the
-        contents of a reference using the supplied identifier. The
-        sender may then resume the transfer at a later point. It is at
-        the discretion of the recipient how much data to save with the
-        checkpoint, and the sender MUST honour the offset returned by
-        the resume method.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-      <response name = "ok" />
-
-      <field name = "reference"  domain = "reference" label = "target reference">
-        <rule name = "01">
-          <doc>
-            The recipient MUST generate an error if the reference is
-            not open (not in scope).
-          </doc>
-        </rule>
-      </field>
-      <field name = "identifier" domain = "shortstr"  label = "checkpoint identifier">
-        <doc>
-          This is the checkpoint identifier. This is an arbitrary
-          string chosen by the sender. For checkpointing to work
-          correctly the sender must use the same checkpoint identifier
-          when resuming the message. A good choice for the checkpoint
-          identifier would be the SHA1 hash of the message properties
-          data (including the original filename, revised time, etc.).
-        </doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "resume" index = "100" label = "[WORK IN PROGRESS] open and resume a checkpointed message">
-      <doc>
-        [WORK IN PROGRESS] This method resumes a reference from the last checkpoint. A
-        reference is considered to be open (in scope) after a resume
-        even though it will not have been opened via the open method
-        during this session.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-      <response name = "offset" />
-
-      <field name = "reference"  domain = "reference" label = "target reference">
-        <rule name = "01">
-          <doc>
-            The recipient MUST generate an error if the reference is
-            currently open (in scope).
-          </doc>
-        </rule>
-      </field>
-      <field name = "identifier" domain = "shortstr"  label = "checkpoint identifier" />
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-    <method name = "qos" index = "110" label = "[WORK IN PROGRESS] specify quality of service">
-      <doc>
-        [WORK IN PROGRESS] This method requests a specific quality of service. The QoS can be specified for the
-        current channel or for all channels on the connection. The particular properties and
-        semantics of a qos method always depend on the content class semantics. Though the
-        qos method could in principle apply to both peers, it is currently meaningful only
-        for the server.
-      </doc>
-
-      <chassis name = "server" implement = "MUST" />
-      <response name = "ok" />
-
-      <field name = "prefetch-size" domain = "long" label = "prefetch window in octets">
-        <doc>
-          The client can request that messages be sent in advance so that when the client
-          finishes processing a message, the following message is already held locally,
-          rather than needing to be sent down the channel. Prefetching gives a performance
-          improvement. This field specifies the prefetch window size in octets. The server
-          will send a message in advance if it is equal to or smaller in size than the
-          available prefetch size (and also falls into other prefetch limits). May be set
-          to zero, meaning "no specific limit", although other prefetch limits may still
-          apply. The prefetch-size is ignored if the no-ack option is set.
-        </doc>
-        <rule name = "01">
-          <doc>
-            The server MUST ignore this setting when the client is not processing any
-            messages - i.e. the prefetch size does not limit the transfer of single
-            messages to a client, only the sending in advance of more messages while
-            the client still has one or more unacknowledged messages.
-          </doc>
-          <doc type = "scenario">
-            Define a QoS prefetch-size limit and send a single message that exceeds
-            that limit.  Verify that the message arrives correctly.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "prefetch-count" domain = "short" label = "prefetch window in messages">
-        <doc>
-          Specifies a prefetch window in terms of whole messages. This field may be used
-          in combination with the prefetch-size field; a message will only be sent in
-          advance if both prefetch windows (and those at the channel and connection level)
-          allow it. The prefetch-count is ignored if the no-ack option is set.
-        </doc>
-        <rule name = "01">
-          <doc>
-            The server may send less data in advance than allowed by the client's
-            specified prefetch windows but it MUST NOT send more.
-          </doc>
-          <doc type = "scenario">
-            Define a QoS prefetch-size limit and a prefetch-count limit greater than
-            one.  Send multiple messages that exceed the prefetch size.  Verify that
-            no more than one message arrives at once.
-          </doc>
-        </rule>
-      </field>
-
-      <field name = "global" domain = "bit" label = "apply to entire connection">
-        <doc>
-          By default the QoS settings apply to the current channel only. If this field is
-          set, they are applied to the entire connection.
-        </doc>
-      </field>
-    </method>
-
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <!-- === Responses === -->
-    
-    <method name = "ok" index = "500" label = "[WORK IN PROGRESS] normal completion">
-      <doc>
-        [WORK IN PROGRESS] Signals the normal completion of a method.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-    </method>
-
-    <method name = "empty" index = "510" label = "[WORK IN PROGRESS] empty queue">
-      <doc>
-        [WORK IN PROGRESS] Signals that a queue does not contain any messages.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-    </method>
-
-    <method name = "reject" index = "520" label = "[WORK IN PROGRESS] reject a message">
-      <doc>
-        [WORK IN PROGRESS] This response rejects a message. A message may be rejected for
-        a number of reasons.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-      <field name = "code" domain = "reject-code" />
-      <field name = "text" domain = "reject-text" />
-    </method>
-
-    <method name = "offset" index = "530" label = "[WORK IN PROGRESS] return an offset">
-      <doc>
-        [WORK IN PROGRESS] Returns the data offset into a reference body.
-      </doc>
-      <chassis name = "server" implement = "MUST" />
-      <chassis name = "client" implement = "MUST" />
-      <field name = "value" domain = "offset" label = "offset into a reference body" />
-    </method>
-
-  </class>
-
-</amqp>
index 19dbf65a94ab8079a915866a4c1a9e4522ab5af1..00fcac5f60a15763b1fc24dad73366b89854331c 100644 (file)
@@ -620,2272 +620,492 @@ namespace RabbitMQ.Client.Framing.v0_8 {
     public const int InternalError = 541;
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.start".</summary>
-  /// <remarks>
-  /// 
-  ///     This method starts the connection negotiation process by telling
-  ///     the client the protocol version that the server proposes, along
-  ///     with a list of security mechanisms which the client can use for
-  ///     authentication.
-  ///   
-  /// </remarks>
   public interface IConnectionStart: IMethod {
-    /// <summary>
-    /// 
-    ///       The protocol major version that the server agrees to use, which
-    ///       cannot be higher than the client's major version.
-    ///     
-    /// </summary>
     byte VersionMajor { get; }
-    /// <summary>
-    /// 
-    ///       The protocol minor version that the server agrees to use, which
-    ///       cannot be higher than the client's minor version.
-    ///     
-    /// </summary>
     byte VersionMinor { get; }
-    // (no documentation)
     System.Collections.IDictionary ServerProperties { get; }
-    /// <summary>
-    /// 
-    ///       A list of the security mechanisms that the server supports, delimited
-    ///       by spaces.  Currently ASL supports these mechanisms: PLAIN.
-    ///     
-    /// </summary>
     byte[] Mechanisms { get; }
-    /// <summary>
-    /// 
-    ///       A list of the message locales that the server supports, delimited
-    ///       by spaces.  The locale defines the language in which the server
-    ///       will send reply texts.
-    ///     
-    /// </summary>
     byte[] Locales { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.start-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method selects a SASL security mechanism. ASL uses SASL
-  ///     (RFC2222) to negotiate authentication and encryption.
-  ///   
-  /// </remarks>
   public interface IConnectionStartOk: IMethod {
-    // (no documentation)
     System.Collections.IDictionary ClientProperties { get; }
-    /// <summary>
-    /// 
-    ///       A single security mechanisms selected by the client, which must be
-    ///       one of those specified by the server.
-    ///     
-    /// </summary>
     string Mechanism { get; }
-    /// <summary>
-    /// 
-    ///       A block of opaque data passed to the security mechanism. The contents
-    ///       of this data are defined by the SASL security mechanism.  For the
-    ///       PLAIN security mechanism this is defined as a field table holding
-    ///       two fields, LOGIN and PASSWORD.
-    ///     
-    /// </summary>
     byte[] Response { get; }
-    /// <summary>
-    /// 
-    ///       A single message local selected by the client, which must be one
-    ///       of those specified by the server.
-    ///     
-    /// </summary>
     string Locale { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.secure".</summary>
-  /// <remarks>
-  /// 
-  ///     The SASL protocol works by exchanging challenges and responses until
-  ///     both peers have received sufficient information to authenticate each
-  ///     other.  This method challenges the client to provide more information.
-  ///   
-  /// </remarks>
   public interface IConnectionSecure: IMethod {
-    /// <summary>
-    /// 
-    ///       Challenge information, a block of opaque binary data passed to
-    ///       the security mechanism.
-    ///     
-    /// </summary>
     byte[] Challenge { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.secure-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method attempts to authenticate, passing a block of SASL data
-  ///     for the security mechanism at the server side.
-  ///   
-  /// </remarks>
   public interface IConnectionSecureOk: IMethod {
-    /// <summary>
-    /// 
-    ///       A block of opaque data passed to the security mechanism.  The contents
-    ///       of this data are defined by the SASL security mechanism.
-    ///     
-    /// </summary>
     byte[] Response { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.tune".</summary>
-  /// <remarks>
-  /// 
-  ///     This method proposes a set of connection configuration values
-  ///     to the client.  The client can accept and/or adjust these.
-  ///   
-  /// </remarks>
   public interface IConnectionTune: IMethod {
-    /// <summary>
-    /// 
-    ///       The maximum total number of channels that the server allows
-    ///       per connection. Zero means that the server does not impose a
-    ///       fixed limit, but the number of allowed channels may be limited
-    ///       by available server resources.
-    ///     
-    /// </summary>
     ushort ChannelMax { get; }
-    /// <summary>
-    /// 
-    ///       The largest frame size that the server proposes for the
-    ///       connection. The client can negotiate a lower value.  Zero means
-    ///       that the server does not impose any specific limit but may reject
-    ///       very large frames if it cannot allocate resources for them.
-    ///     
-    /// </summary>
     uint FrameMax { get; }
-    /// <summary>
-    /// 
-    ///       The delay, in seconds, of the connection heartbeat that the server
-    ///       wants.  Zero means the server does not want a heartbeat.
-    ///     
-    /// </summary>
     ushort Heartbeat { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.tune-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method sends the client's connection tuning parameters to the
-  ///     server. Certain fields are negotiated, others provide capability
-  ///     information.
-  ///   
-  /// </remarks>
   public interface IConnectionTuneOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The maximum total number of channels that the client will use
-    ///       per connection.  May not be higher than the value specified by
-    ///       the server.
-    ///     
-    /// </summary>
     ushort ChannelMax { get; }
-    /// <summary>
-    /// 
-    ///       The largest frame size that the client and server will use for
-    ///       the connection.  Zero means that the client does not impose any
-    ///       specific limit but may reject very large frames if it cannot
-    ///       allocate resources for them.  Note that the frame-max limit
-    ///       applies principally to content frames, where large contents
-    ///       can be broken into frames of arbitrary size.
-    ///     
-    /// </summary>
     uint FrameMax { get; }
-    /// <summary>
-    /// 
-    ///       The delay, in seconds, of the connection heartbeat that the client
-    ///       wants. Zero means the client does not want a heartbeat.
-    ///     
-    /// </summary>
     ushort Heartbeat { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.open".</summary>
-  /// <remarks>
-  /// 
-  ///     This method opens a connection to a virtual host, which is a
-  ///     collection of resources, and acts to separate multiple application
-  ///     domains within a server.
-  ///   
-  /// </remarks>
   public interface IConnectionOpen: IMethod {
-    /// <summary>
-    /// 
-    ///       The name of the virtual host to work with.
-    ///     
-    /// </summary>
     string VirtualHost { get; }
-    /// <summary>
-    /// 
-    ///       The client may specify a number of capability names, delimited by
-    ///       spaces.  The server can use this string to how to process the
-    ///       client's connection request.
-    ///     
-    /// </summary>
     string Capabilities { get; }
-    /// <summary>
-    /// 
-    ///       In a configuration with multiple load-sharing servers, the server
-    ///       may respond to a Connection.Open method with a Connection.Redirect.
-    ///       The insist option tells the server that the client is insisting on
-    ///       a connection to the specified server.
-    ///     
-    /// </summary>
     bool Insist { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.open-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method signals to the client that the connection is ready for
-  ///     use.
-  ///   
-  /// </remarks>
   public interface IConnectionOpenOk: IMethod {
-    // (no documentation)
     string KnownHosts { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.redirect".</summary>
-  /// <remarks>
-  /// 
-  ///     This method redirects the client to another server, based on the
-  ///     requested virtual host and/or capabilities.
-  ///   
-  /// </remarks>
   public interface IConnectionRedirect: IMethod {
-    /// <summary>
-    /// 
-    ///       Specifies the server to connect to.  This is an IP address or a
-    ///       DNS name, optionally followed by a colon and a port number. If
-    ///       no port number is specified, the client should use the default
-    ///       port number for the protocol.
-    ///     
-    /// </summary>
     string Host { get; }
-    // (no documentation)
     string KnownHosts { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.close".</summary>
-  /// <remarks>
-  /// 
-  ///     This method indicates that the sender wants to close the connection.
-  ///     This may be due to internal conditions (e.g. a forced shut-down) or
-  ///     due to an error handling a specific method, i.e. an exception.  When
-  ///     a close is due to an exception, the sender provides the class and
-  ///     method id of the method which caused the exception.
-  ///   
-  /// </remarks>
   public interface IConnectionClose: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       When the close is provoked by a method exception, this is the
-    ///       class of the method.
-    ///     
-    /// </summary>
     ushort ClassId { get; }
-    /// <summary>
-    /// 
-    ///       When the close is provoked by a method exception, this is the
-    ///       ID of the method.
-    ///     
-    /// </summary>
     ushort MethodId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.close-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms a Connection.Close method and tells the
-  ///     recipient that it is safe to release resources for the connection
-  ///     and close the socket.
-  ///   
-  /// </remarks>
   public interface IConnectionCloseOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.open".</summary>
-  /// <remarks>
-  /// 
-  ///     This method opens a virtual connection (a channel).
-  ///   
-  /// </remarks>
   public interface IChannelOpen: IMethod {
-    /// <summary>
-    /// 
-    ///       Configures out-of-band transfers on this channel.  The syntax and
-    ///       meaning of this field will be formally defined at a later date.
-    ///     
-    /// </summary>
     string OutOfBand { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.open-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method signals to the client that the channel is ready for use.
-  ///   
-  /// </remarks>
   public interface IChannelOpenOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.flow".</summary>
-  /// <remarks>
-  /// 
-  ///     This method asks the peer to pause or restart the flow of content
-  ///     data. This is a simple flow-control mechanism that a peer can use
-  ///     to avoid oveflowing its queues or otherwise finding itself receiving
-  ///     more messages than it can process.  Note that this method is not
-  ///     intended for window control.  The peer that receives a request to
-  ///     stop sending content should finish sending the current content, if
-  ///     any, and then wait until it receives a Flow restart method.
-  ///   
-  /// </remarks>
   public interface IChannelFlow: IMethod {
-    /// <summary>
-    /// 
-    ///       If 1, the peer starts sending content frames.  If 0, the peer
-    ///       stops sending content frames.
-    ///     
-    /// </summary>
     bool Active { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.flow-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     Confirms to the peer that a flow command was received and processed.
-  ///   
-  /// </remarks>
   public interface IChannelFlowOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Confirms the setting of the processed flow method: 1 means the
-    ///       peer will start sending or continue to send content frames; 0
-    ///       means it will not.
-    ///     
-    /// </summary>
     bool Active { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.alert".</summary>
-  /// <remarks>
-  /// 
-  ///     This method allows the server to send a non-fatal warning to the
-  ///     client.  This is used for methods that are normally asynchronous
-  ///     and thus do not have confirmations, and for which the server may
-  ///     detect errors that need to be reported.  Fatal errors are handled
-  ///     as channel or connection exceptions; non-fatal errors are sent
-  ///     through this method.
-  ///   
-  /// </remarks>
   public interface IChannelAlert: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       A set of fields that provide more information about the
-    ///       problem.  The meaning of these fields are defined on a
-    ///       per-reply-code basis (TO BE DEFINED).
-    ///     
-    /// </summary>
     System.Collections.IDictionary Details { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.close".</summary>
-  /// <remarks>
-  /// 
-  ///     This method indicates that the sender wants to close the channel.
-  ///     This may be due to internal conditions (e.g. a forced shut-down) or
-  ///     due to an error handling a specific method, i.e. an exception.  When
-  ///     a close is due to an exception, the sender provides the class and
-  ///     method id of the method which caused the exception.
-  ///   
-  /// </remarks>
   public interface IChannelClose: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       When the close is provoked by a method exception, this is the
-    ///       class of the method.
-    ///     
-    /// </summary>
     ushort ClassId { get; }
-    /// <summary>
-    /// 
-    ///       When the close is provoked by a method exception, this is the
-    ///       ID of the method.
-    ///     
-    /// </summary>
     ushort MethodId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.close-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms a Channel.Close method and tells the recipient
-  ///     that it is safe to release resources for the channel and close the
-  ///     socket.
-  ///   
-  /// </remarks>
   public interface IChannelCloseOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "access.request".</summary>
-  /// <remarks>
-  /// 
-  ///     This method requests an access ticket for an access realm.
-  ///     The server responds by granting the access ticket.  If the
-  ///     client does not have access rights to the requested realm
-  ///     this causes a connection exception.  Access tickets are a
-  ///     per-channel resource.
-  ///   
-  /// </remarks>
   public interface IAccessRequest: IMethod {
-    // (no documentation)
     string Realm { get; }
-    /// <summary>
-    /// 
-    ///       Request exclusive access to the realm. If the server cannot grant
-    ///       this - because there are other active tickets for the realm - it
-    ///       raises a channel exception.
-    ///     
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///       Request message passive access to the specified access realm.
-    ///       Passive access lets a client get information about resources in
-    ///       the realm but not to make any changes to them.
-    ///     
-    /// </summary>
     bool Passive { get; }
-    /// <summary>
-    /// 
-    ///       Request message active access to the specified access realm.
-    ///       Acvtive access lets a client get create and delete resources in
-    ///       the realm.
-    ///     
-    /// </summary>
     bool Active { get; }
-    /// <summary>
-    /// 
-    ///       Request write access to the specified access realm.  Write access
-    ///       lets a client publish messages to all exchanges in the realm.
-    ///     
-    /// </summary>
     bool Write { get; }
-    /// <summary>
-    /// 
-    ///       Request read access to the specified access realm.  Read access
-    ///       lets a client consume messages from queues in the realm.
-    ///     
-    /// </summary>
     bool Read { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "access.request-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method provides the client with an access ticket. The access
-  ///     ticket is valid within the current channel and for the lifespan of
-  ///     the channel.
-  ///   
-  /// </remarks>
   public interface IAccessRequestOk: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.declare".</summary>
-  /// <remarks>
-  /// 
-  ///     This method creates an exchange if it does not already exist, and if the
-  ///     exchange exists, verifies that it is of the correct and expected class.
-  ///   
-  /// </remarks>
   public interface IExchangeDeclare: IMethod {
-    /// <summary>
-    /// 
-    ///       When a client defines a new exchange, this belongs to the access realm
-    ///       of the ticket used.  All further work done with that exchange must be
-    ///       done with an access ticket for the same realm.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    // (no documentation)
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Each exchange belongs to one of a set of exchange types implemented
-    ///       by the server.  The exchange types define the functionality of the
-    ///       exchange - i.e. how messages are routed through it.  It is not valid
-    ///       or meaningful to attempt to change the type of an existing exchange.
-    ///     
-    /// </summary>
     string Type { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not create the exchange.  The client can use
-    ///     this to check whether an exchange exists without modifying the server
-    ///     state.
-    ///     
-    /// </summary>
     bool Passive { get; }
-    /// <summary>
-    /// 
-    ///       If set when creating a new exchange, the exchange will be marked as
-    ///       durable.  Durable exchanges remain active when a server restarts.
-    ///       Non-durable exchanges (transient exchanges) are purged if/when a
-    ///       server restarts.
-    ///     
-    /// </summary>
     bool Durable { get; }
-    /// <summary>
-    /// 
-    ///       If set, the exchange is deleted when all queues have finished
-    ///       using it.
-    ///     
-    /// </summary>
     bool AutoDelete { get; }
-    /// <summary>
-    /// 
-    ///       If set, the exchange may not be used directly by publishers, but
-    ///       only when bound to other exchanges. Internal exchanges are used to
-    ///       construct wiring that is not visible to applications.
-    ///     
-    /// </summary>
     bool Internal { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///       A set of arguments for the declaration. The syntax and semantics
-    ///       of these arguments depends on the server implementation.  This
-    ///       field is ignored if passive is 1.
-    ///     
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.declare-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms a Declare method and confirms the name of the
-  ///     exchange, essential for automatically-named exchanges.
-  ///   
-  /// </remarks>
   public interface IExchangeDeclareOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.delete".</summary>
-  /// <remarks>
-  /// 
-  ///     This method deletes an exchange.  When an exchange is deleted all queue
-  ///     bindings on the exchange are cancelled.
-  ///   
-  /// </remarks>
   public interface IExchangeDelete: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    // (no documentation)
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       If set, the server will only delete the exchange if it has no queue
-    ///       bindings. If the exchange has queue bindings the server does not
-    ///       delete it but raises a channel exception instead.
-    ///     
-    /// </summary>
     bool IfUnused { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.delete-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms the deletion of an exchange.
-  ///   
-  /// </remarks>
   public interface IExchangeDeleteOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.declare".</summary>
-  /// <remarks>
-  /// 
-  ///     This method creates or checks a queue.  When creating a new queue
-  ///     the client can specify various properties that control the durability
-  ///     of the queue and its contents, and the level of sharing for the queue.
-  ///   
-  /// </remarks>
   public interface IQueueDeclare: IMethod {
-    /// <summary>
-    /// 
-    ///       When a client defines a new queue, this belongs to the access realm
-    ///       of the ticket used.  All further work done with that queue must be
-    ///       done with an access ticket for the same realm.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    // (no documentation)
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not create the queue.  The client can use
-    ///     this to check whether a queue exists without modifying the server
-    ///     state.
-    ///     
-    /// </summary>
     bool Passive { get; }
-    /// <summary>
-    /// 
-    ///       If set when creating a new queue, the queue will be marked as
-    ///       durable.  Durable queues remain active when a server restarts.
-    ///       Non-durable queues (transient queues) are purged if/when a
-    ///       server restarts.  Note that durable queues do not necessarily
-    ///       hold persistent messages, although it does not make sense to
-    ///       send persistent messages to a transient queue.
-    ///     
-    /// </summary>
     bool Durable { get; }
-    /// <summary>
-    /// 
-    ///       Exclusive queues may only be consumed from by the current connection.
-    ///       Setting the 'exclusive' flag always implies 'auto-delete'.
-    ///     
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///       If set, the queue is deleted when all consumers have finished
-    ///       using it. Last consumer can be cancelled either explicitly or because
-    ///       its channel is closed. If there was no consumer ever on the queue, it
-    ///       won't be deleted.
-    ///     
-    /// </summary>
     bool AutoDelete { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///       A set of arguments for the declaration. The syntax and semantics
-    ///       of these arguments depends on the server implementation.  This
-    ///       field is ignored if passive is 1.
-    ///     
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.declare-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms a Declare method and confirms the name of the
-  ///     queue, essential for automatically-named queues.
-  ///   
-  /// </remarks>
   public interface IQueueDeclareOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Reports the name of the queue. If the server generated a queue
-    ///       name, this field contains that name.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///       Reports the number of messages in the queue, which will be zero
-    ///       for newly-created queues.
-    ///     
-    /// </summary>
     uint MessageCount { get; }
-    /// <summary>
-    /// 
-    ///       Reports the number of active consumers for the queue. Note that
-    ///       consumers can suspend activity (Channel.Flow) in which case they
-    ///       do not appear in this count.
-    ///     
-    /// </summary>
     uint ConsumerCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.bind".</summary>
-  /// <remarks>
-  /// 
-  ///     This method binds a queue to an exchange.  Until a queue is
-  ///     bound it will not receive any messages.  In a classic messaging
-  ///     model, store-and-forward queues are bound to a dest exchange
-  ///     and subscription queues are bound to a dest_wild exchange.
-  ///   
-  /// </remarks>
   public interface IQueueBind: IMethod {
-    /// <summary>
-    /// 
-    ///       The client provides a valid access ticket giving "active"
-    ///       access rights to the queue's access realm.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to bind.  If the queue name is
-    ///       empty, refers to the current queue for the channel, which is
-    ///       the last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    // (no documentation)
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key for the binding.  The routing key is
-    ///       used for routing messages depending on the exchange configuration.
-    ///       Not all exchanges use a routing key - refer to the specific
-    ///       exchange documentation.  If the routing key is empty and the queue
-    ///       name is empty, the routing key will be the current queue for the
-    ///       channel, which is the last declared queue.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///       A set of arguments for the binding.  The syntax and semantics of
-    ///       these arguments depends on the exchange class.
-    ///     
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.bind-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms that the bind was successful.
-  ///   
-  /// </remarks>
   public interface IQueueBindOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.unbind".</summary>
-  /// <remarks>
-  /// This method unbinds a queue from an exchange.
-  /// </remarks>
   public interface IQueueUnbind: IMethod {
-    /// <summary>
-    /// 
-    ///           The client provides a valid access ticket giving "active"
-    ///           access rights to the queue's access realm.
-    ///         
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// Specifies the name of the queue to unbind.
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// The name of the exchange to unbind from.
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// Specifies the routing key of the binding to unbind.
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// Specifies the arguments of the binding to unbind.
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.unbind-ok".</summary>
-  /// <remarks>
-  /// This method confirms that the unbind was successful.
-  /// </remarks>
   public interface IQueueUnbindOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.purge".</summary>
-  /// <remarks>
-  /// 
-  ///     This method removes all messages from a queue.  It does not cancel
-  ///     consumers.  Purged messages are deleted without any formal "undo"
-  ///     mechanism.
-  ///   
-  /// </remarks>
   public interface IQueuePurge: IMethod {
-    /// <summary>
-    /// 
-    ///       The access ticket must be for the access realm that holds the
-    ///       queue.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to purge.  If the queue name is
-    ///       empty, refers to the current queue for the channel, which is
-    ///       the last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.purge-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms the purge of a queue.
-  ///   
-  /// </remarks>
   public interface IQueuePurgeOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Reports the number of messages purged.
-    ///     
-    /// </summary>
     uint MessageCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.delete".</summary>
-  /// <remarks>
-  /// 
-  ///     This method deletes a queue.  When a queue is deleted any pending
-  ///     messages are sent to a dead-letter queue if this is defined in the
-  ///     server configuration, and all consumers on the queue are cancelled.
-  ///   
-  /// </remarks>
   public interface IQueueDelete: IMethod {
-    /// <summary>
-    /// 
-    ///       The client provides a valid access ticket giving "active"
-    ///       access rights to the queue's access realm.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to delete. If the queue name is
-    ///       empty, refers to the current queue for the channel, which is the
-    ///       last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///       If set, the server will only delete the queue if it has no
-    ///       consumers. If the queue has consumers the server does does not
-    ///       delete it but raises a channel exception instead.
-    ///     
-    /// </summary>
     bool IfUnused { get; }
-    /// <summary>
-    /// 
-    ///       If set, the server will only delete the queue if it has no
-    ///       messages. If the queue is not empty the server raises a channel
-    ///       exception.
-    ///     
-    /// </summary>
     bool IfEmpty { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.delete-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms the deletion of a queue.
-  ///   
-  /// </remarks>
   public interface IQueueDeleteOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Reports the number of messages purged.
-    ///     
-    /// </summary>
     uint MessageCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.qos".</summary>
-  /// <remarks>
-  /// 
-  ///     This method requests a specific quality of service.  The QoS can
-  ///     be specified for the current channel or for all channels on the
-  ///     connection.  The particular properties and semantics of a qos method
-  ///     always depend on the content class semantics.  Though the qos method
-  ///     could in principle apply to both peers, it is currently meaningful
-  ///     only for the server.
-  ///   
-  /// </remarks>
   public interface IBasicQos: IMethod {
-    /// <summary>
-    /// 
-    ///       The client can request that messages be sent in advance so that
-    ///       when the client finishes processing a message, the following
-    ///       message is already held locally, rather than needing to be sent
-    ///       down the channel.  Prefetching gives a performance improvement.
-    ///       This field specifies the prefetch window size in octets.  The
-    ///       server will send a message in advance if it is equal to or
-    ///       smaller in size than the available prefetch size (and also falls
-    ///       into other prefetch limits). May be set to zero, meaning "no
-    ///       specific limit", although other prefetch limits may still apply.
-    ///       The prefetch-size is ignored if the no-ack option is set.
-    ///     
-    /// </summary>
     uint PrefetchSize { get; }
-    /// <summary>
-    /// 
-    ///       Specifies a prefetch window in terms of whole messages.  This
-    ///       field may be used in combination with the prefetch-size field;
-    ///       a message will only be sent in advance if both prefetch windows
-    ///       (and those at the channel and connection level) allow it.
-    ///       The prefetch-count is ignored if the no-ack option is set.
-    ///     
-    /// </summary>
     ushort PrefetchCount { get; }
-    /// <summary>
-    /// 
-    ///       By default the QoS settings apply to the current channel only.  If
-    ///       this field is set, they are applied to the entire connection.
-    ///     
-    /// </summary>
     bool Global { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.qos-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tells the client that the requested QoS levels could
-  ///     be handled by the server.  The requested QoS applies to all active
-  ///     consumers until a new QoS is defined.
-  ///   
-  /// </remarks>
   public interface IBasicQosOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.consume".</summary>
-  /// <remarks>
-  /// 
-  ///     This method asks the server to start a "consumer", which is a
-  ///     transient request for messages from a specific queue. Consumers
-  ///     last as long as the channel they were created on, or until the
-  ///     client cancels them.
-  ///   
-  /// </remarks>
   public interface IBasicConsume: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "read" access
-    ///       rights to the realm for the queue.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to consume from.  If the queue name
-    ///       is null, refers to the current queue for the channel, which is the
-    ///       last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the identifier for the consumer. The consumer tag is
-    ///       local to a connection, so two clients can use the same consumer
-    ///       tags. If this field is empty the server will generate a unique
-    ///       tag.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
-    // (no documentation)
     bool NoLocal { get; }
-    // (no documentation)
     bool NoAck { get; }
-    /// <summary>
-    /// 
-    ///       Request exclusive consumer access, meaning only this consumer can
-    ///       access the queue.
-    ///     
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.consume-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     The server provides the client with a consumer tag, which is used
-  ///     by the client for methods called on the consumer at a later stage.
-  ///   
-  /// </remarks>
   public interface IBasicConsumeOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Holds the consumer tag specified by the client or provided by
-    ///       the server.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.cancel".</summary>
-  /// <remarks>
-  /// 
-  ///     This method cancels a consumer. This does not affect already
-  ///     delivered messages, but it does mean the server will not send any
-  ///     more messages for that consumer.  The client may receive an
-  ///     abitrary number of messages in between sending the cancel method
-  ///     and receiving the cancel-ok reply.
-  ///   
-  /// </remarks>
   public interface IBasicCancel: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.cancel-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms that the cancellation was completed.
-  ///   
-  /// </remarks>
   public interface IBasicCancelOk: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.publish".</summary>
-  /// <remarks>
-  /// 
-  ///     This method publishes a message to a specific exchange. The message
-  ///     will be routed to queues as defined by the exchange configuration
-  ///     and distributed to any active consumers when the transaction, if any,
-  ///     is committed.
-  ///   
-  /// </remarks>
   public interface IBasicPublish: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "write"
-    ///       access rights to the access realm for the exchange.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange to publish to.  The exchange
-    ///       name can be empty, meaning the default exchange.  If the exchange
-    ///       name is specified, and that exchange does not exist, the server
-    ///       will raise a channel exception.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key for the message.  The routing key is
-    ///       used for routing messages depending on the exchange configuration.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue.  If this flag is set, the server will return an
-    ///       unroutable message with a Return method.  If this flag is zero, the
-    ///       server silently drops the message.
-    ///     
-    /// </summary>
     bool Mandatory { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue consumer immediately.  If this flag is set, the
-    ///       server will return an undeliverable message with a Return method.
-    ///       If this flag is zero, the server will queue the message, but with
-    ///       no guarantee that it will ever be consumed.
-    ///     
-    /// </summary>
     bool Immediate { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.return".</summary>
-  /// <remarks>
-  /// 
-  ///     This method returns an undeliverable message that was published
-  ///     with the "immediate" flag set, or an unroutable message published
-  ///     with the "mandatory" flag set. The reply code and text provide
-  ///     information about the reason that the message was undeliverable.
-  ///   
-  /// </remarks>
   public interface IBasicReturn: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was
-    ///       originally published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.deliver".</summary>
-  /// <remarks>
-  /// 
-  ///     This method delivers a message to the client, via a consumer.  In
-  ///     the asynchronous message delivery model, the client starts a
-  ///     consumer using the Consume method, then the server responds with
-  ///     Deliver methods as and when messages arrive for that consumer.
-  ///   
-  /// </remarks>
   public interface IBasicDeliver: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    // (no documentation)
     ulong DeliveryTag { get; }
-    // (no documentation)
     bool Redelivered { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was
-    ///       originally published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.get".</summary>
-  /// <remarks>
-  /// 
-  ///     This method provides a direct access to the messages in a queue
-  ///     using a synchronous dialogue that is designed for specific types of
-  ///     application where synchronous functionality is more important than
-  ///     performance.
-  ///   
-  /// </remarks>
   public interface IBasicGet: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "read"
-    ///       access rights to the realm for the queue.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to consume from.  If the queue name
-    ///       is null, refers to the current queue for the channel, which is the
-    ///       last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    // (no documentation)
     bool NoAck { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.get-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method delivers a message to the client following a get
-  ///     method.  A message delivered by 'get-ok' must be acknowledged
-  ///     unless the no-ack option was set in the get method.
-  ///   
-  /// </remarks>
   public interface IBasicGetOk: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    // (no documentation)
     bool Redelivered { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was originally
-    ///       published to.  If empty, the message was published to the default
-    ///       exchange.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///       This field reports the number of messages pending on the queue,
-    ///       excluding the message being delivered.  Note that this figure is
-    ///       indicative, not reliable, and can change arbitrarily as messages
-    ///       are added to the queue and removed by other clients.
-    ///     
-    /// </summary>
     uint MessageCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.get-empty".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tells the client that the queue has no messages
-  ///     available for the client.
-  ///   
-  /// </remarks>
   public interface IBasicGetEmpty: IMethod {
-    /// <summary>
-    /// 
-    ///       For use by cluster applications, should not be used by
-    ///       client applications.
-    ///     
-    /// </summary>
     string ClusterId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.ack".</summary>
-  /// <remarks>
-  /// 
-  ///     This method acknowledges one or more messages delivered via the
-  ///     Deliver or Get-Ok methods.  The client can ask to confirm a
-  ///     single message or a set of messages up to and including a specific
-  ///     message.
-  ///   
-  /// </remarks>
   public interface IBasicAck: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///       If set to 1, the delivery tag is treated as "up to and including",
-    ///       so that the client can acknowledge multiple messages with a single
-    ///       method.  If set to zero, the delivery tag refers to a single
-    ///       message.  If the multiple field is 1, and the delivery tag is zero,
-    ///       tells the server to acknowledge all outstanding mesages.
-    ///     
-    /// </summary>
     bool Multiple { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.reject".</summary>
-  /// <remarks>
-  /// 
-  ///     This method allows a client to reject a message.  It can be used to
-  ///     interrupt and cancel large incoming messages, or return untreatable
-  ///     messages to their original queue.
-  ///   
-  /// </remarks>
   public interface IBasicReject: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///       If this field is zero, the message will be discarded.  If this bit
-    ///       is 1, the server will attempt to requeue the message.
-    ///     
-    /// </summary>
     bool Requeue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.recover".</summary>
-  /// <remarks>
-  /// 
-  ///     This method asks the broker to redeliver all unacknowledged messages on a
-  ///     specifieid channel. Zero or more messages may be redelivered.
-  ///   
-  /// </remarks>
   public interface IBasicRecover: IMethod {
-    /// <summary>
-    /// 
-    ///       If this field is zero, the message will be redelivered to the original recipient.  If this bit
-    ///       is 1, the server will attempt to requeue the message, potentially then delivering it to an
-    ///       alternative subscriber.
-    ///     
-    /// </summary>
     bool Requeue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.qos".</summary>
-  /// <remarks>
-  /// 
-  ///     This method requests a specific quality of service.  The QoS can
-  ///     be specified for the current channel or for all channels on the
-  ///     connection.  The particular properties and semantics of a qos method
-  ///     always depend on the content class semantics.  Though the qos method
-  ///     could in principle apply to both peers, it is currently meaningful
-  ///     only for the server.
-  ///   
-  /// </remarks>
   public interface IFileQos: IMethod {
-    /// <summary>
-    /// 
-    ///       The client can request that messages be sent in advance so that
-    ///       when the client finishes processing a message, the following
-    ///       message is already held locally, rather than needing to be sent
-    ///       down the channel.  Prefetching gives a performance improvement.
-    ///       This field specifies the prefetch window size in octets. May be
-    ///       set to zero, meaning "no specific limit".  Note that other
-    ///       prefetch limits may still apply. The prefetch-size is ignored
-    ///       if the no-ack option is set.
-    ///     
-    /// </summary>
     uint PrefetchSize { get; }
-    /// <summary>
-    /// 
-    ///       Specifies a prefetch window in terms of whole messages.  This
-    ///       is compatible with some file API implementations.  This field
-    ///       may be used in combination with the prefetch-size field; a
-    ///       message will only be sent in advance if both prefetch windows
-    ///       (and those at the channel and connection level) allow it.
-    ///       The prefetch-count is ignored if the no-ack option is set.
-    ///     
-    /// </summary>
     ushort PrefetchCount { get; }
-    /// <summary>
-    /// 
-    ///       By default the QoS settings apply to the current channel only.  If
-    ///       this field is set, they are applied to the entire connection.
-    ///     
-    /// </summary>
     bool Global { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.qos-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tells the client that the requested QoS levels could
-  ///     be handled by the server.  The requested QoS applies to all active
-  ///     consumers until a new QoS is defined.
-  ///   
-  /// </remarks>
   public interface IFileQosOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "file.consume".</summary>
-  /// <remarks>
-  /// 
-  ///     This method asks the server to start a "consumer", which is a
-  ///     transient request for messages from a specific queue. Consumers
-  ///     last as long as the channel they were created on, or until the
-  ///     client cancels them.
-  ///   
-  /// </remarks>
   public interface IFileConsume: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "read" access
-    ///       rights to the realm for the queue.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to consume from.  If the queue name
-    ///       is null, refers to the current queue for the channel, which is the
-    ///       last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the identifier for the consumer. The consumer tag is
-    ///       local to a connection, so two clients can use the same consumer
-    ///       tags. If this field is empty the server will generate a unique
-    ///       tag.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
-    // (no documentation)
     bool NoLocal { get; }
-    // (no documentation)
     bool NoAck { get; }
-    /// <summary>
-    /// 
-    ///       Request exclusive consumer access, meaning only this consumer can
-    ///       access the queue.
-    ///     
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.consume-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method provides the client with a consumer tag which it MUST
-  ///     use in methods that work with the consumer.
-  ///   
-  /// </remarks>
   public interface IFileConsumeOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Holds the consumer tag specified by the client or provided by
-    ///       the server.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.cancel".</summary>
-  /// <remarks>
-  /// 
-  ///     This method cancels a consumer. This does not affect already
-  ///     delivered messages, but it does mean the server will not send any
-  ///     more messages for that consumer.
-  ///   
-  /// </remarks>
   public interface IFileCancel: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.cancel-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms that the cancellation was completed.
-  ///   
-  /// </remarks>
   public interface IFileCancelOk: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.open".</summary>
-  /// <remarks>
-  /// 
-  ///     This method requests permission to start staging a message.  Staging
-  ///     means sending the message into a temporary area at the recipient end
-  ///     and then delivering the message by referring to this temporary area.
-  ///     Staging is how the protocol handles partial file transfers - if a
-  ///     message is partially staged and the connection breaks, the next time
-  ///     the sender starts to stage it, it can restart from where it left off.
-  ///   
-  /// </remarks>
   public interface IFileOpen: IMethod {
-    /// <summary>
-    /// 
-    ///       This is the staging identifier. This is an arbitrary string chosen
-    ///       by the sender.  For staging to work correctly the sender must use
-    ///       the same staging identifier when staging the same message a second
-    ///       time after recovery from a failure.  A good choice for the staging
-    ///       identifier would be the SHA1 hash of the message properties data
-    ///       (including the original filename, revised time, etc.).
-    ///     
-    /// </summary>
     string Identifier { get; }
-    /// <summary>
-    /// 
-    ///       The size of the content in octets.  The recipient may use this
-    ///       information to allocate or check available space in advance, to
-    ///       avoid "disk full" errors during staging of very large messages.
-    ///     
-    /// </summary>
     ulong ContentSize { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.open-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms that the recipient is ready to accept staged
-  ///     data.  If the message was already partially-staged at a previous
-  ///     time the recipient will report the number of octets already staged.
-  ///   
-  /// </remarks>
   public interface IFileOpenOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The amount of previously-staged content in octets.  For a new
-    ///       message this will be zero.
-    ///     
-    /// </summary>
     ulong StagedSize { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.stage".</summary>
-  /// <remarks>
-  /// 
-  ///     This method stages the message, sending the message content to the
-  ///     recipient from the octet offset specified in the Open-Ok method.
-  ///   
-  /// </remarks>
   public interface IFileStage: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "file.publish".</summary>
-  /// <remarks>
-  /// 
-  ///     This method publishes a staged file message to a specific exchange.
-  ///     The file message will be routed to queues as defined by the exchange
-  ///     configuration and distributed to any active consumers when the
-  ///     transaction, if any, is committed.
-  ///   
-  /// </remarks>
   public interface IFilePublish: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "write"
-    ///       access rights to the access realm for the exchange.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange to publish to.  The exchange
-    ///       name can be empty, meaning the default exchange.  If the exchange
-    ///       name is specified, and that exchange does not exist, the server
-    ///       will raise a channel exception.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key for the message.  The routing key is
-    ///       used for routing messages depending on the exchange configuration.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue.  If this flag is set, the server will return an
-    ///       unroutable message with a Return method.  If this flag is zero, the
-    ///       server silently drops the message.
-    ///     
-    /// </summary>
     bool Mandatory { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue consumer immediately.  If this flag is set, the
-    ///       server will return an undeliverable message with a Return method.
-    ///       If this flag is zero, the server will queue the message, but with
-    ///       no guarantee that it will ever be consumed.
-    ///     
-    /// </summary>
     bool Immediate { get; }
-    /// <summary>
-    /// 
-    ///       This is the staging identifier of the message to publish.  The
-    ///       message must have been staged.  Note that a client can send the
-    ///       Publish method asynchronously without waiting for staging to
-    ///       finish.
-    ///     
-    /// </summary>
     string Identifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.return".</summary>
-  /// <remarks>
-  /// 
-  ///     This method returns an undeliverable message that was published
-  ///     with the "immediate" flag set, or an unroutable message published
-  ///     with the "mandatory" flag set. The reply code and text provide
-  ///     information about the reason that the message was undeliverable.
-  ///   
-  /// </remarks>
   public interface IFileReturn: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was
-    ///       originally published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.deliver".</summary>
-  /// <remarks>
-  /// 
-  ///     This method delivers a staged file message to the client, via a
-  ///     consumer. In the asynchronous message delivery model, the client
-  ///     starts a consumer using the Consume method, then the server
-  ///     responds with Deliver methods as and when messages arrive for
-  ///     that consumer.
-  ///   
-  /// </remarks>
   public interface IFileDeliver: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    // (no documentation)
     ulong DeliveryTag { get; }
-    // (no documentation)
     bool Redelivered { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was originally
-    ///       published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///       This is the staging identifier of the message to deliver.  The
-    ///       message must have been staged.  Note that a server can send the
-    ///       Deliver method asynchronously without waiting for staging to
-    ///       finish.
-    ///     
-    /// </summary>
     string Identifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.ack".</summary>
-  /// <remarks>
-  /// 
-  ///     This method acknowledges one or more messages delivered via the
-  ///     Deliver method.  The client can ask to confirm a single message or
-  ///     a set of messages up to and including a specific message.
-  ///   
-  /// </remarks>
   public interface IFileAck: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///       If set to 1, the delivery tag is treated as "up to and including",
-    ///       so that the client can acknowledge multiple messages with a single
-    ///       method.  If set to zero, the delivery tag refers to a single
-    ///       message.  If the multiple field is 1, and the delivery tag is zero,
-    ///       tells the server to acknowledge all outstanding mesages.
-    ///     
-    /// </summary>
     bool Multiple { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.reject".</summary>
-  /// <remarks>
-  /// 
-  ///     This method allows a client to reject a message.  It can be used to
-  ///     return untreatable messages to their original queue.  Note that file
-  ///     content is staged before delivery, so the client will not use this
-  ///     method to interrupt delivery of a large message.
-  ///   
-  /// </remarks>
   public interface IFileReject: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///       If this field is zero, the message will be discarded.  If this bit
-    ///       is 1, the server will attempt to requeue the message.
-    ///     
-    /// </summary>
     bool Requeue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.qos".</summary>
-  /// <remarks>
-  /// 
-  ///     This method requests a specific quality of service.  The QoS can
-  ///     be specified for the current channel or for all channels on the
-  ///     connection.  The particular properties and semantics of a qos method
-  ///     always depend on the content class semantics.  Though the qos method
-  ///     could in principle apply to both peers, it is currently meaningful
-  ///     only for the server.
-  ///   
-  /// </remarks>
   public interface IStreamQos: IMethod {
-    /// <summary>
-    /// 
-    ///       The client can request that messages be sent in advance so that
-    ///       when the client finishes processing a message, the following
-    ///       message is already held locally, rather than needing to be sent
-    ///       down the channel.  Prefetching gives a performance improvement.
-    ///       This field specifies the prefetch window size in octets. May be
-    ///       set to zero, meaning "no specific limit".  Note that other
-    ///       prefetch limits may still apply.
-    ///     
-    /// </summary>
     uint PrefetchSize { get; }
-    /// <summary>
-    /// 
-    ///       Specifies a prefetch window in terms of whole messages.  This
-    ///       field may be used in combination with the prefetch-size field;
-    ///       a message will only be sent in advance if both prefetch windows
-    ///       (and those at the channel and connection level) allow it.
-    ///     
-    /// </summary>
     ushort PrefetchCount { get; }
-    /// <summary>
-    /// 
-    ///       Specifies a desired transfer rate in octets per second. This is
-    ///       usually determined by the application that uses the streaming
-    ///       data.  A value of zero means "no limit", i.e. as rapidly as
-    ///       possible.
-    ///     
-    /// </summary>
     uint ConsumeRate { get; }
-    /// <summary>
-    /// 
-    ///       By default the QoS settings apply to the current channel only.  If
-    ///       this field is set, they are applied to the entire connection.
-    ///     
-    /// </summary>
     bool Global { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.qos-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tells the client that the requested QoS levels could
-  ///     be handled by the server.  The requested QoS applies to all active
-  ///     consumers until a new QoS is defined.
-  ///   
-  /// </remarks>
   public interface IStreamQosOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.consume".</summary>
-  /// <remarks>
-  /// 
-  ///     This method asks the server to start a "consumer", which is a
-  ///     transient request for messages from a specific queue. Consumers
-  ///     last as long as the channel they were created on, or until the
-  ///     client cancels them.
-  ///   
-  /// </remarks>
   public interface IStreamConsume: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "read" access
-    ///       rights to the realm for the queue.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to consume from.  If the queue name
-    ///       is null, refers to the current queue for the channel, which is the
-    ///       last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the identifier for the consumer. The consumer tag is
-    ///       local to a connection, so two clients can use the same consumer
-    ///       tags. If this field is empty the server will generate a unique
-    ///       tag.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
-    // (no documentation)
     bool NoLocal { get; }
-    /// <summary>
-    /// 
-    ///       Request exclusive consumer access, meaning only this consumer can
-    ///       access the queue.
-    ///     
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.consume-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method provides the client with a consumer tag which it may
-  ///     use in methods that work with the consumer.
-  ///   
-  /// </remarks>
   public interface IStreamConsumeOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Holds the consumer tag specified by the client or provided by
-    ///       the server.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.cancel".</summary>
-  /// <remarks>
-  /// 
-  ///     This method cancels a consumer.  Since message delivery is
-  ///     asynchronous the client may continue to receive messages for
-  ///     a short while after canceling a consumer.  It may process or
-  ///     discard these as appropriate.
-  ///   
-  /// </remarks>
   public interface IStreamCancel: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.cancel-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms that the cancellation was completed.
-  ///   
-  /// </remarks>
   public interface IStreamCancelOk: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.publish".</summary>
-  /// <remarks>
-  /// 
-  ///     This method publishes a message to a specific exchange. The message
-  ///     will be routed to queues as defined by the exchange configuration
-  ///     and distributed to any active consumers as appropriate.
-  ///   
-  /// </remarks>
   public interface IStreamPublish: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "write"
-    ///       access rights to the access realm for the exchange.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange to publish to.  The exchange
-    ///       name can be empty, meaning the default exchange.  If the exchange
-    ///       name is specified, and that exchange does not exist, the server
-    ///       will raise a channel exception.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key for the message.  The routing key is
-    ///       used for routing messages depending on the exchange configuration.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue.  If this flag is set, the server will return an
-    ///       unroutable message with a Return method.  If this flag is zero, the
-    ///       server silently drops the message.
-    ///     
-    /// </summary>
     bool Mandatory { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue consumer immediately.  If this flag is set, the
-    ///       server will return an undeliverable message with a Return method.
-    ///       If this flag is zero, the server will queue the message, but with
-    ///       no guarantee that it will ever be consumed.
-    ///     
-    /// </summary>
     bool Immediate { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.return".</summary>
-  /// <remarks>
-  /// 
-  ///     This method returns an undeliverable message that was published
-  ///     with the "immediate" flag set, or an unroutable message published
-  ///     with the "mandatory" flag set. The reply code and text provide
-  ///     information about the reason that the message was undeliverable.
-  ///   
-  /// </remarks>
   public interface IStreamReturn: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was
-    ///       originally published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.deliver".</summary>
-  /// <remarks>
-  /// 
-  ///     This method delivers a message to the client, via a consumer.  In
-  ///     the asynchronous message delivery model, the client starts a
-  ///     consumer using the Consume method, then the server responds with
-  ///     Deliver methods as and when messages arrive for that consumer.
-  ///   
-  /// </remarks>
   public interface IStreamDeliver: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was originally
-    ///       published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue that the message came from. Note
-    ///       that a single channel can start many consumers on different
-    ///       queues.
-    ///     
-    /// </summary>
     string Queue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.select".</summary>
-  /// <remarks>
-  /// 
-  ///     This method sets the channel to use standard transactions.  The
-  ///     client must use this method at least once on a channel before
-  ///     using the Commit or Rollback methods.
-  ///   
-  /// </remarks>
   public interface ITxSelect: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.select-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms to the client that the channel was successfully
-  ///     set to use standard transactions.
-  ///   
-  /// </remarks>
   public interface ITxSelectOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.commit".</summary>
-  /// <remarks>
-  /// 
-  ///     This method commits all messages published and acknowledged in
-  ///     the current transaction.  A new transaction starts immediately
-  ///     after a commit.
-  ///   
-  /// </remarks>
   public interface ITxCommit: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.commit-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms to the client that the commit succeeded.
-  ///     Note that if a commit fails, the server raises a channel exception.
-  ///   
-  /// </remarks>
   public interface ITxCommitOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.rollback".</summary>
-  /// <remarks>
-  /// 
-  ///     This method abandons all messages published and acknowledged in
-  ///     the current transaction.  A new transaction starts immediately
-  ///     after a rollback.
-  ///   
-  /// </remarks>
   public interface ITxRollback: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.rollback-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms to the client that the rollback succeeded.
-  ///     Note that if an rollback fails, the server raises a channel exception.
-  ///   
-  /// </remarks>
   public interface ITxRollbackOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.select".</summary>
-  /// <remarks>
-  /// 
-  ///     This method sets the channel to use distributed transactions.  The
-  ///     client must use this method at least once on a channel before
-  ///     using the Start method.
-  ///   
-  /// </remarks>
   public interface IDtxSelect: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.select-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms to the client that the channel was successfully
-  ///     set to use distributed transactions.
-  ///   
-  /// </remarks>
   public interface IDtxSelectOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.start".</summary>
-  /// <remarks>
-  /// 
-  ///     This method starts a new distributed transaction.  This must be
-  ///     the first method on a new channel that uses the distributed
-  ///     transaction mode, before any methods that publish or consume
-  ///     messages.
-  ///   
-  /// </remarks>
   public interface IDtxStart: IMethod {
-    /// <summary>
-    /// 
-    ///       The distributed transaction key. This identifies the transaction
-    ///       so that the AMQP server can coordinate with the distributed
-    ///       transaction coordinator.
-    ///     
-    /// </summary>
     string DtxIdentifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.start-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms to the client that the transaction started.
-  ///     Note that if a start fails, the server raises a channel exception.
-  ///   
-  /// </remarks>
   public interface IDtxStartOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tunnel.request".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tunnels a block of binary data, which can be an
-  ///     encoded AMQP method or other data.  The binary data is sent
-  ///     as the content for the Tunnel.Request method.
-  ///   
-  /// </remarks>
   public interface ITunnelRequest: IMethod {
-    /// <summary>
-    /// 
-    ///     This field table holds arbitrary meta-data that the sender needs
-    ///     to pass to the recipient.
-    ///     
-    /// </summary>
     System.Collections.IDictionary MetaData { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.integer".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tests the peer's capability to correctly marshal integer
-  ///     data.
-  ///   
-  /// </remarks>
   public interface ITestInteger: IMethod {
-    /// <summary>
-    /// 
-    ///       An octet integer test value.
-    ///     
-    /// </summary>
     byte Integer1 { get; }
-    /// <summary>
-    /// 
-    ///       A short integer test value.
-    ///     
-    /// </summary>
     ushort Integer2 { get; }
-    /// <summary>
-    /// 
-    ///       A long integer test value.
-    ///     
-    /// </summary>
     uint Integer3 { get; }
-    /// <summary>
-    /// 
-    ///       A long long integer test value.
-    ///     
-    /// </summary>
     ulong Integer4 { get; }
-    /// <summary>
-    /// 
-    ///       The client must execute this operation on the provided integer
-    ///       test fields and return the result.
-    ///     
-    /// </summary>
     byte Operation { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.integer-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method reports the result of an Integer method.
-  ///   
-  /// </remarks>
   public interface ITestIntegerOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The result of the tested operation.
-    ///     
-    /// </summary>
     ulong Result { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.string".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tests the peer's capability to correctly marshal string
-  ///     data.
-  ///   
-  /// </remarks>
   public interface ITestString: IMethod {
-    /// <summary>
-    /// 
-    ///       An short string test value.
-    ///     
-    /// </summary>
     string String1 { get; }
-    /// <summary>
-    /// 
-    ///       A long string test value.
-    ///     
-    /// </summary>
     byte[] String2 { get; }
-    /// <summary>
-    /// 
-    ///       The client must execute this operation on the provided string
-    ///       test fields and return the result.
-    ///     
-    /// </summary>
     byte Operation { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.string-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method reports the result of a String method.
-  ///   
-  /// </remarks>
   public interface ITestStringOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The result of the tested operation.
-    ///     
-    /// </summary>
     byte[] Result { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.table".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tests the peer's capability to correctly marshal field
-  ///     table data.
-  ///   
-  /// </remarks>
   public interface ITestTable: IMethod {
-    /// <summary>
-    /// 
-    ///       A field table of test values.
-    ///     
-    /// </summary>
     System.Collections.IDictionary Table { get; }
-    /// <summary>
-    /// 
-    ///       The client must execute this operation on the provided field
-    ///       table integer values and return the result.
-    ///     
-    /// </summary>
     byte IntegerOp { get; }
-    /// <summary>
-    /// 
-    ///       The client must execute this operation on the provided field
-    ///       table string values and return the result.
-    ///     
-    /// </summary>
     byte StringOp { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.table-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method reports the result of a Table method.
-  ///   
-  /// </remarks>
   public interface ITestTableOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The result of the tested integer operation.
-    ///     
-    /// </summary>
     ulong IntegerResult { get; }
-    /// <summary>
-    /// 
-    ///       The result of the tested string operation.
-    ///     
-    /// </summary>
     byte[] StringResult { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.content".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tests the peer's capability to correctly marshal content.
-  ///   
-  /// </remarks>
   public interface ITestContent: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "test.content-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method reports the result of a Content method.  It contains the
-  ///     content checksum and echoes the original content as provided.
-  ///   
-  /// </remarks>
   public interface ITestContentOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The 32-bit checksum of the content, calculated by adding the
-    ///       content into a 32-bit accumulator.
-    ///     
-    /// </summary>
     uint ContentChecksum { get; }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "basic"</summary>
-  /// <remarks>
-  /// 
-  ///   The Basic class provides methods that support an industry-standard
-  ///   messaging model.
-  /// 
-  /// </remarks>
   public class BasicProperties: RabbitMQ.Client.Impl.BasicProperties {
     private string m_contentType;
     private string m_contentEncoding;
@@ -2917,7 +1137,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
     private bool appId_present = false;
     private bool clusterId_present = false;
 
-    // (no documentation)
     public override string ContentType {
       get {
         return m_contentType;
@@ -2927,7 +1146,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_contentType = value;
       }
     }
-    // (no documentation)
     public override string ContentEncoding {
       get {
         return m_contentEncoding;
@@ -2937,7 +1155,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_contentEncoding = value;
       }
     }
-    // (no documentation)
     public override System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -2947,7 +1164,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_headers = value;
       }
     }
-    // (no documentation)
     public override byte DeliveryMode {
       get {
         return m_deliveryMode;
@@ -2957,7 +1173,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_deliveryMode = value;
       }
     }
-    // (no documentation)
     public override byte Priority {
       get {
         return m_priority;
@@ -2967,7 +1182,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_priority = value;
       }
     }
-    // (no documentation)
     public override string CorrelationId {
       get {
         return m_correlationId;
@@ -2977,7 +1191,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_correlationId = value;
       }
     }
-    // (no documentation)
     public override string ReplyTo {
       get {
         return m_replyTo;
@@ -2987,7 +1200,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_replyTo = value;
       }
     }
-    // (no documentation)
     public override string Expiration {
       get {
         return m_expiration;
@@ -2997,7 +1209,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_expiration = value;
       }
     }
-    // (no documentation)
     public override string MessageId {
       get {
         return m_messageId;
@@ -3007,7 +1218,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_messageId = value;
       }
     }
-    // (no documentation)
     public override AmqpTimestamp Timestamp {
       get {
         return m_timestamp;
@@ -3017,7 +1227,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_timestamp = value;
       }
     }
-    // (no documentation)
     public override string Type {
       get {
         return m_type;
@@ -3027,7 +1236,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_type = value;
       }
     }
-    // (no documentation)
     public override string UserId {
       get {
         return m_userId;
@@ -3037,7 +1245,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_userId = value;
       }
     }
-    // (no documentation)
     public override string AppId {
       get {
         return m_appId;
@@ -3047,7 +1254,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_appId = value;
       }
     }
-    // (no documentation)
     public override string ClusterId {
       get {
         return m_clusterId;
@@ -3161,17 +1367,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "file"</summary>
-  /// <remarks>
-  /// 
-  ///   The file class provides methods that support reliable file transfer.
-  ///   File messages have a specific set of properties that are required for
-  ///   interoperability with file transfer applications. File messages and
-  ///   acknowledgements are subject to channel transactions.  Note that the
-  ///   file class does not provide message browsing methods; these are not
-  ///   compatible with the staging model.  Applications that need browsable
-  ///   file transfer should use Basic content and the Basic class.
-  /// 
-  /// </remarks>
   public class FileProperties: RabbitMQ.Client.Impl.FileProperties {
     private string m_contentType;
     private string m_contentEncoding;
@@ -3193,7 +1388,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
     private bool timestamp_present = false;
     private bool clusterId_present = false;
 
-    // (no documentation)
     public override string ContentType {
       get {
         return m_contentType;
@@ -3203,7 +1397,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_contentType = value;
       }
     }
-    // (no documentation)
     public override string ContentEncoding {
       get {
         return m_contentEncoding;
@@ -3213,7 +1406,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_contentEncoding = value;
       }
     }
-    // (no documentation)
     public override System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -3223,7 +1415,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_headers = value;
       }
     }
-    // (no documentation)
     public override byte Priority {
       get {
         return m_priority;
@@ -3233,7 +1424,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_priority = value;
       }
     }
-    // (no documentation)
     public override string ReplyTo {
       get {
         return m_replyTo;
@@ -3243,7 +1433,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_replyTo = value;
       }
     }
-    // (no documentation)
     public override string MessageId {
       get {
         return m_messageId;
@@ -3253,7 +1442,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_messageId = value;
       }
     }
-    // (no documentation)
     public override string Filename {
       get {
         return m_filename;
@@ -3263,7 +1451,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_filename = value;
       }
     }
-    // (no documentation)
     public override AmqpTimestamp Timestamp {
       get {
         return m_timestamp;
@@ -3273,7 +1460,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_timestamp = value;
       }
     }
-    // (no documentation)
     public override string ClusterId {
       get {
         return m_clusterId;
@@ -3357,16 +1543,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "stream"</summary>
-  /// <remarks>
-  /// 
-  ///   The stream class provides methods that support multimedia streaming.
-  ///   The stream class uses the following semantics: one message is one
-  ///   packet of data; delivery is unacknowleged and unreliable; the consumer
-  ///   can specify quality of service parameters that the server can try to
-  ///   adhere to; lower-priority messages may be discarded in favour of high
-  ///   priority messages.
-  /// 
-  /// </remarks>
   public class StreamProperties: RabbitMQ.Client.Impl.StreamProperties {
     private string m_contentType;
     private string m_contentEncoding;
@@ -3380,7 +1556,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
     private bool priority_present = false;
     private bool timestamp_present = false;
 
-    // (no documentation)
     public override string ContentType {
       get {
         return m_contentType;
@@ -3390,7 +1565,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_contentType = value;
       }
     }
-    // (no documentation)
     public override string ContentEncoding {
       get {
         return m_contentEncoding;
@@ -3400,7 +1574,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_contentEncoding = value;
       }
     }
-    // (no documentation)
     public override System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -3410,7 +1583,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_headers = value;
       }
     }
-    // (no documentation)
     public override byte Priority {
       get {
         return m_priority;
@@ -3420,7 +1592,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_priority = value;
       }
     }
-    // (no documentation)
     public override AmqpTimestamp Timestamp {
       get {
         return m_timestamp;
@@ -3480,13 +1651,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "tunnel"</summary>
-  /// <remarks>
-  /// 
-  ///   The tunnel methods are used to send blocks of binary data - which
-  ///   can be serialised AMQP methods or other protocol frames - between
-  ///   AMQP peers.
-  /// 
-  /// </remarks>
   public class TunnelProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
     private System.Collections.IDictionary m_headers;
     private string m_proxyName;
@@ -3500,7 +1664,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
     private bool durable_present = false;
     private bool broadcast_present = false;
 
-    // (no documentation)
     public System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -3510,7 +1673,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_headers = value;
       }
     }
-    // (no documentation)
     public string ProxyName {
       get {
         return m_proxyName;
@@ -3520,7 +1682,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_proxyName = value;
       }
     }
-    // (no documentation)
     public string DataName {
       get {
         return m_dataName;
@@ -3530,7 +1691,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_dataName = value;
       }
     }
-    // (no documentation)
     public byte Durable {
       get {
         return m_durable;
@@ -3540,7 +1700,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
         m_durable = value;
       }
     }
-    // (no documentation)
     public byte Broadcast {
       get {
         return m_broadcast;
@@ -3600,16 +1759,6 @@ namespace RabbitMQ.Client.Framing.v0_8 {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "test"</summary>
-  /// <remarks>
-  /// 
-  ///   The test class provides methods for a peer to test the basic
-  ///   operational correctness of another peer. The test methods are
-  ///   intended to ensure that all peers respect at least the basic
-  ///   elements of the protocol, such as frame and content organisation
-  ///   and field types. We assume that a specially-designed peer, a
-  ///   "monitor client" would perform such tests.
-  /// 
-  /// </remarks>
   public class TestProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
 
 
index 5b6bd1d24c6e5173400663e6b5ce02ae1bc17ffb..e70c8a7b9fecd5552e623ae48b40be70ce8fc1ac 100644 (file)
@@ -675,2351 +675,557 @@ namespace RabbitMQ.Client.Framing.v0_9 {
     public const int InternalError = 541;
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.start".</summary>
-  /// <remarks>
-  /// 
-  ///         This method starts the connection negotiation process by telling the client the
-  ///         protocol version that the server proposes, along with a list of security mechanisms
-  ///         which the client can use for authentication.
-  ///       
-  /// </remarks>
   public interface IConnectionStart: IMethod {
-    /// <summary>
-    /// 
-    ///           The protocol version, major component, as transmitted in the AMQP protocol
-    ///           header. This, combined with the protocol minor component fully describe the
-    ///           protocol version, which is written in the format major-minor. Hence, with
-    ///           major=1, minor=3, the protocol version would be "1-3".
-    ///         
-    /// </summary>
     byte VersionMajor { get; }
-    /// <summary>
-    /// 
-    ///           The protocol version, minor component, as transmitted in the AMQP protocol
-    ///           header. This, combined with the protocol major component fully describe the
-    ///           protocol version, which is written in the format major-minor. Hence, with
-    ///           major=1, minor=3, the protocol version would be "1-3".
-    ///         
-    /// </summary>
     byte VersionMinor { get; }
-    // (no documentation)
     System.Collections.IDictionary ServerProperties { get; }
-    /// <summary>
-    /// 
-    ///           A list of the security mechanisms that the server supports, delimited by spaces.
-    ///         
-    /// </summary>
     byte[] Mechanisms { get; }
-    /// <summary>
-    /// 
-    ///           A list of the message locales that the server supports, delimited by spaces. The
-    ///           locale defines the language in which the server will send reply texts.
-    ///         
-    /// </summary>
     byte[] Locales { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.start-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method selects a SASL security mechanism.
-  ///       
-  /// </remarks>
   public interface IConnectionStartOk: IMethod {
-    // (no documentation)
     System.Collections.IDictionary ClientProperties { get; }
-    /// <summary>
-    /// 
-    ///           A single security mechanisms selected by the client, which must be one of those
-    ///           specified by the server.
-    ///         
-    /// </summary>
     string Mechanism { get; }
-    /// <summary>
-    /// 
-    ///           A block of opaque data passed to the security mechanism. The contents of this
-    ///           data are defined by the SASL security mechanism.
-    ///         
-    /// </summary>
     byte[] Response { get; }
-    /// <summary>
-    /// 
-    ///           A single message locale selected by the client, which must be one of those
-    ///           specified by the server.
-    ///         
-    /// </summary>
     string Locale { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.secure".</summary>
-  /// <remarks>
-  /// 
-  ///         The SASL protocol works by exchanging challenges and responses until both peers have
-  ///         received sufficient information to authenticate each other. This method challenges
-  ///         the client to provide more information.
-  ///       
-  /// </remarks>
   public interface IConnectionSecure: IMethod {
-    /// <summary>
-    /// 
-    ///           Challenge information, a block of opaque binary data passed to the security
-    ///           mechanism.
-    ///         
-    /// </summary>
     byte[] Challenge { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.secure-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method attempts to authenticate, passing a block of SASL data for the security
-  ///         mechanism at the server side.
-  ///       
-  /// </remarks>
   public interface IConnectionSecureOk: IMethod {
-    /// <summary>
-    /// 
-    ///           A block of opaque data passed to the security mechanism. The contents of this
-    ///           data are defined by the SASL security mechanism.
-    ///         
-    /// </summary>
     byte[] Response { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.tune".</summary>
-  /// <remarks>
-  /// 
-  ///         This method proposes a set of connection configuration values to the client. The
-  ///         client can accept and/or adjust these.
-  ///       
-  /// </remarks>
   public interface IConnectionTune: IMethod {
-    /// <summary>
-    /// 
-    ///           The maximum total number of channels that the server allows per connection. Zero
-    ///           means that the server does not impose a fixed limit, but the number of allowed
-    ///           channels may be limited by available server resources.
-    ///         
-    /// </summary>
     ushort ChannelMax { get; }
-    /// <summary>
-    /// 
-    ///           The largest frame size that the server proposes for the connection. The client
-    ///           can negotiate a lower value. Zero means that the server does not impose any
-    ///           specific limit but may reject very large frames if it cannot allocate resources
-    ///           for them.
-    ///         
-    /// </summary>
     uint FrameMax { get; }
-    /// <summary>
-    /// 
-    ///           The delay, in seconds, of the connection heartbeat that the server wants.
-    ///           Zero means the server does not want a heartbeat.
-    ///         
-    /// </summary>
     ushort Heartbeat { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.tune-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method sends the client's connection tuning parameters to the server.
-  ///         Certain fields are negotiated, others provide capability information.
-  ///       
-  /// </remarks>
   public interface IConnectionTuneOk: IMethod {
-    /// <summary>
-    /// 
-    ///           The maximum total number of channels that the client will use per connection.
-    ///         
-    /// </summary>
     ushort ChannelMax { get; }
-    /// <summary>
-    /// 
-    ///           The largest frame size that the client and server will use for the connection.
-    ///           Zero means that the client does not impose any specific limit but may reject
-    ///           very large frames if it cannot allocate resources for them. Note that the
-    ///           frame-max limit applies principally to content frames, where large contents can
-    ///           be broken into frames of arbitrary size.
-    ///         
-    /// </summary>
     uint FrameMax { get; }
-    /// <summary>
-    /// 
-    ///           The delay, in seconds, of the connection heartbeat that the client wants. Zero
-    ///           means the client does not want a heartbeat.
-    ///         
-    /// </summary>
     ushort Heartbeat { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.open".</summary>
-  /// <remarks>
-  /// 
-  ///         This method opens a connection to a virtual host, which is a collection of
-  ///         resources, and acts to separate multiple application domains within a server.
-  ///         The server may apply arbitrary limits per virtual host, such as the number
-  ///         of each type of entity that may be used, per connection and/or in total.
-  ///       
-  /// </remarks>
   public interface IConnectionOpen: IMethod {
-    /// <summary>
-    /// 
-    ///           The name of the virtual host to work with.
-    ///         
-    /// </summary>
     string VirtualHost { get; }
-    /// <summary>
-    /// 
-    ///           The client can specify zero or more capability names, delimited by spaces.
-    ///           The server can use this string to how to process the client's connection
-    ///           request.
-    ///         
-    /// </summary>
     string Capabilities { get; }
-    /// <summary>
-    /// 
-    ///           In a configuration with multiple collaborating servers, the server may respond
-    ///           to a Connection.Open method with a Connection.Redirect. The insist option tells
-    ///           the server that the client is insisting on a connection to the specified server.
-    ///         
-    /// </summary>
     bool Insist { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.open-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method signals to the client that the connection is ready for use.
-  ///       
-  /// </remarks>
   public interface IConnectionOpenOk: IMethod {
-    // (no documentation)
     string KnownHosts { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.redirect".</summary>
-  /// <remarks>
-  /// 
-  ///         This method redirects the client to another server, based on the requested virtual
-  ///         host and/or capabilities.
-  ///       
-  /// </remarks>
   public interface IConnectionRedirect: IMethod {
-    /// <summary>
-    /// 
-    ///           Specifies the server to connect to. This is an IP address or a DNS name,
-    ///           optionally followed by a colon and a port number. If no port number is
-    ///           specified, the client should use the default port number for the protocol.
-    ///         
-    /// </summary>
     string Host { get; }
-    // (no documentation)
     string KnownHosts { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.close".</summary>
-  /// <remarks>
-  /// 
-  ///         This method indicates that the sender wants to close the connection. This may be
-  ///         due to internal conditions (e.g. a forced shut-down) or due to an error handling
-  ///         a specific method, i.e. an exception. When a close is due to an exception, the
-  ///         sender provides the class and method id of the method which caused the exception.
-  ///       
-  /// </remarks>
   public interface IConnectionClose: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///           When the close is provoked by a method exception, this is the class of the
-    ///           method.
-    ///         
-    /// </summary>
     ushort ClassId { get; }
-    /// <summary>
-    /// 
-    ///           When the close is provoked by a method exception, this is the ID of the method.
-    ///         
-    /// </summary>
     ushort MethodId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.close-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms a Connection.Close method and tells the recipient that it is
-  ///         safe to release resources for the connection and close the socket.
-  ///       
-  /// </remarks>
   public interface IConnectionCloseOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.open".</summary>
-  /// <remarks>
-  /// 
-  ///         This method opens a channel to the server.
-  ///       
-  /// </remarks>
   public interface IChannelOpen: IMethod {
-    /// <summary>
-    /// 
-    ///           Configures out-of-band transfers on this channel. The syntax and meaning of this
-    ///           field will be formally defined at a later date.
-    ///         
-    /// </summary>
     string OutOfBand { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.open-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method signals to the client that the channel is ready for use.
-  ///       
-  /// </remarks>
   public interface IChannelOpenOk: IMethod {
-    // (no documentation)
     byte[] ChannelId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.flow".</summary>
-  /// <remarks>
-  /// 
-  ///         This method asks the peer to pause or restart the flow of content data. This is a
-  ///         simple flow-control mechanism that a peer can use to avoid overflowing its queues or
-  ///         otherwise finding itself receiving more messages than it can process. Note that this
-  ///         method is not intended for window control. The peer that receives a disable flow
-  ///         method should finish sending the current content frame, if any, then pause.
-  ///       
-  /// </remarks>
   public interface IChannelFlow: IMethod {
-    /// <summary>
-    /// 
-    ///           If 1, the peer starts sending content frames. If 0, the peer stops sending
-    ///           content frames.
-    ///         
-    /// </summary>
     bool Active { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.flow-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         Confirms to the peer that a flow command was received and processed.
-  ///       
-  /// </remarks>
   public interface IChannelFlowOk: IMethod {
-    /// <summary>
-    /// 
-    ///           Confirms the setting of the processed flow method: 1 means the peer will start
-    ///           sending or continue to send content frames; 0 means it will not.
-    ///         
-    /// </summary>
     bool Active { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.close".</summary>
-  /// <remarks>
-  /// 
-  ///         This method indicates that the sender wants to close the channel. This may be due to
-  ///         internal conditions (e.g. a forced shut-down) or due to an error handling a specific
-  ///         method, i.e. an exception. When a close is due to an exception, the sender provides
-  ///         the class and method id of the method which caused the exception.
-  ///       
-  /// </remarks>
   public interface IChannelClose: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///           When the close is provoked by a method exception, this is the class of the
-    ///           method.
-    ///         
-    /// </summary>
     ushort ClassId { get; }
-    /// <summary>
-    /// 
-    ///           When the close is provoked by a method exception, this is the ID of the method.
-    ///         
-    /// </summary>
     ushort MethodId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.close-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms a Channel.Close method and tells the recipient that it is safe
-  ///         to release resources for the channel.
-  ///       
-  /// </remarks>
   public interface IChannelCloseOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.resume".</summary>
-  /// <remarks>
-  /// 
-  ///         This method resume a previously interrupted channel.
-  ///       
-  /// </remarks>
   public interface IChannelResume: IMethod {
-    // (no documentation)
     byte[] ChannelId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.ping".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] Request that the recipient issue a pong request.
-  ///       
-  /// </remarks>
   public interface IChannelPing: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.pong".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] Issued after a ping request is received. Note that this is a
-  ///         request issued after receiving a ping, not a response to
-  ///         receiving a ping.
-  ///       
-  /// </remarks>
   public interface IChannelPong: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.ok".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] Signals normal completion of a method.
-  ///       
-  /// </remarks>
   public interface IChannelOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "access.request".</summary>
-  /// <remarks>
-  /// 
-  ///         This method requests an access ticket for an access realm. The server
-  ///         responds by granting the access ticket. If the client does not have
-  ///         access rights to the requested realm this causes a connection exception.
-  ///         Access tickets are a per-channel resource.
-  ///       
-  /// </remarks>
   public interface IAccessRequest: IMethod {
-    /// <summary>
-    /// 
-    ///           Specifies the name of the realm to which the client is requesting access.
-    ///           The realm is a configured server-side object that collects a set of
-    ///           resources (exchanges, queues, etc.).  If the channel has already requested
-    ///           an access ticket onto this realm, the previous ticket is destroyed and a
-    ///           new ticket is created with the requested access rights, if allowed.
-    ///         
-    /// </summary>
     string Realm { get; }
-    /// <summary>
-    /// 
-    ///           Request exclusive access to the realm, meaning that this will be the only
-    ///           channel that uses the realm's resources.
-    ///         
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///           Request message passive access to the specified access realm. Passive
-    ///           access lets a client get information about resources in the realm but
-    ///           not to make any changes to them.
-    ///         
-    /// </summary>
     bool Passive { get; }
-    /// <summary>
-    /// 
-    ///           Request message active access to the specified access realm. Active access lets
-    ///           a client get create and delete resources in the realm.
-    ///         
-    /// </summary>
     bool Active { get; }
-    /// <summary>
-    /// 
-    ///           Request write access to the specified access realm. Write access lets a client
-    ///           publish messages to all exchanges in the realm.
-    ///         
-    /// </summary>
     bool Write { get; }
-    /// <summary>
-    /// 
-    ///           Request read access to the specified access realm. Read access lets a client
-    ///           consume messages from queues in the realm.
-    ///         
-    /// </summary>
     bool Read { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "access.request-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method provides the client with an access ticket. The access ticket is valid
-  ///         within the current channel and for the lifespan of the channel.
-  ///       
-  /// </remarks>
   public interface IAccessRequestOk: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.declare".</summary>
-  /// <remarks>
-  /// 
-  ///         This method creates an exchange if it does not already exist, and if the exchange
-  ///         exists, verifies that it is of the correct and expected class.
-  ///       
-  /// </remarks>
   public interface IExchangeDeclare: IMethod {
-    /// <summary>
-    /// 
-    ///           When a client defines a new exchange, this belongs to the access realm of the
-    ///           ticket used. All further work done with that exchange must be done with an
-    ///           access ticket for the same realm.
-    ///         
-    /// </summary>
     ushort Ticket { get; }
-    // (no documentation)
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///           Each exchange belongs to one of a set of exchange types implemented by the
-    ///           server. The exchange types define the functionality of the exchange - i.e. how
-    ///           messages are routed through it. It is not valid or meaningful to attempt to
-    ///           change the type of an existing exchange.
-    ///         
-    /// </summary>
     string Type { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not create the exchange. The client can use this to
-    ///           check whether an exchange exists without modifying the server state.
-    ///         
-    /// </summary>
     bool Passive { get; }
-    /// <summary>
-    /// 
-    ///           If set when creating a new exchange, the exchange will be marked as durable.
-    ///           Durable exchanges remain active when a server restarts. Non-durable exchanges
-    ///           (transient exchanges) are purged if/when a server restarts.
-    ///         
-    /// </summary>
     bool Durable { get; }
-    /// <summary>
-    /// 
-    ///           If set, the exchange is deleted when all queues have finished using it.
-    ///         
-    /// </summary>
     bool AutoDelete { get; }
-    /// <summary>
-    /// 
-    ///           If set, the exchange may not be used directly by publishers, but only when bound
-    ///           to other exchanges. Internal exchanges are used to construct wiring that is not
-    ///           visible to applications.
-    ///         
-    /// </summary>
     bool Internal { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///           A set of arguments for the declaration. The syntax and semantics of these
-    ///           arguments depends on the server implementation. This field is ignored if passive
-    ///           is 1.
-    ///         
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.declare-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms a Declare method and confirms the name of the exchange,
-  ///         essential for automatically-named exchanges.
-  ///       
-  /// </remarks>
   public interface IExchangeDeclareOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.delete".</summary>
-  /// <remarks>
-  /// 
-  ///         This method deletes an exchange. When an exchange is deleted all queue bindings on
-  ///         the exchange are cancelled.
-  ///       
-  /// </remarks>
   public interface IExchangeDelete: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    // (no documentation)
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will only delete the exchange if it has no queue bindings. If
-    ///           the exchange has queue bindings the server does not delete it but raises a
-    ///           channel exception instead.
-    ///         
-    /// </summary>
     bool IfUnused { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.delete-ok".</summary>
-  /// <remarks>
-  /// This method confirms the deletion of an exchange.
-  /// </remarks>
   public interface IExchangeDeleteOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.declare".</summary>
-  /// <remarks>
-  /// 
-  ///         This method creates or checks a queue. When creating a new queue the client can
-  ///         specify various properties that control the durability of the queue and its
-  ///         contents, and the level of sharing for the queue.
-  ///       
-  /// </remarks>
   public interface IQueueDeclare: IMethod {
-    /// <summary>
-    /// 
-    ///           When a client defines a new queue, this belongs to the access realm of the
-    ///           ticket used. All further work done with that queue must be done with an access
-    ///           ticket for the same realm.
-    ///         
-    /// </summary>
     ushort Ticket { get; }
-    // (no documentation)
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not create the queue. This field allows the client
-    ///           to assert the presence of a queue without modifying the server state.
-    ///         
-    /// </summary>
     bool Passive { get; }
-    /// <summary>
-    /// 
-    ///           If set when creating a new queue, the queue will be marked as durable. Durable
-    ///           queues remain active when a server restarts. Non-durable queues (transient
-    ///           queues) are purged if/when a server restarts. Note that durable queues do not
-    ///           necessarily hold persistent messages, although it does not make sense to send
-    ///           persistent messages to a transient queue.
-    ///         
-    /// </summary>
     bool Durable { get; }
-    /// <summary>
-    /// 
-    ///           Exclusive queues may only be consumed from by the current connection. Setting
-    ///           the 'exclusive' flag always implies 'auto-delete'.
-    ///         
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///           If set, the queue is deleted when all consumers have finished using it. Last
-    ///           consumer can be cancelled either explicitly or because its channel is closed. If
-    ///           there was no consumer ever on the queue, it won't be deleted.
-    ///         
-    /// </summary>
     bool AutoDelete { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///           A set of arguments for the declaration. The syntax and semantics of these
-    ///           arguments depends on the server implementation. This field is ignored if passive
-    ///           is 1.
-    ///         
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.declare-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms a Declare method and confirms the name of the queue, essential
-  ///         for automatically-named queues.
-  ///       
-  /// </remarks>
   public interface IQueueDeclareOk: IMethod {
-    /// <summary>
-    /// 
-    ///           Reports the name of the queue. If the server generated a queue name, this field
-    ///           contains that name.
-    ///         
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///           Reports the number of messages in the queue, which will be zero for
-    ///           newly-created queues.
-    ///         
-    /// </summary>
     uint MessageCount { get; }
-    /// <summary>
-    /// 
-    ///           Reports the number of active consumers for the queue. Note that consumers can
-    ///           suspend activity (Channel.Flow) in which case they do not appear in this count.
-    ///         
-    /// </summary>
     uint ConsumerCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.bind".</summary>
-  /// <remarks>
-  /// 
-  ///         This method binds a queue to an exchange. Until a queue is bound it will not receive
-  ///         any messages. In a classic messaging model, store-and-forward queues are bound to a
-  ///         direct exchange and subscription queues are bound to a topic exchange.
-  ///       
-  /// </remarks>
   public interface IQueueBind: IMethod {
-    /// <summary>
-    /// 
-    ///           The client provides a valid access ticket giving "active" access rights to the
-    ///           queue's access realm.
-    ///         
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the queue to bind. If the queue name is empty, refers to
-    ///           the current queue for the channel, which is the last declared queue.
-    ///         
-    /// </summary>
     string Queue { get; }
-    // (no documentation)
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the routing key for the binding. The routing key is used for routing
-    ///           messages depending on the exchange configuration. Not all exchanges use a
-    ///           routing key - refer to the specific exchange documentation.  If the queue name
-    ///           is empty, the server uses the last queue declared on the channel.  If the
-    ///           routing key is also empty, the server uses this queue name for the routing
-    ///           key as well.  If the queue name is provided but the routing key is empty, the
-    ///           server does the binding with that empty routing key.  The meaning of empty
-    ///           routing keys depends on the exchange implementation.
-    ///         
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///           A set of arguments for the binding. The syntax and semantics of these arguments
-    ///           depends on the exchange class.
-    ///         
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.bind-ok".</summary>
-  /// <remarks>
-  /// This method confirms that the bind was successful.
-  /// </remarks>
   public interface IQueueBindOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.unbind".</summary>
-  /// <remarks>
-  /// This method unbinds a queue from an exchange.
-  /// </remarks>
   public interface IQueueUnbind: IMethod {
-    /// <summary>
-    /// 
-    ///           The client provides a valid access ticket giving "active"
-    ///           access rights to the queue's access realm.
-    ///         
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// Specifies the name of the queue to unbind.
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// The name of the exchange to unbind from.
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// Specifies the routing key of the binding to unbind.
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// Specifies the arguments of the binding to unbind.
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.unbind-ok".</summary>
-  /// <remarks>
-  /// This method confirms that the unbind was successful.
-  /// </remarks>
   public interface IQueueUnbindOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.purge".</summary>
-  /// <remarks>
-  /// 
-  ///         This method removes all messages from a queue. It does not cancel consumers. Purged
-  ///         messages are deleted without any formal "undo" mechanism.
-  ///       
-  /// </remarks>
   public interface IQueuePurge: IMethod {
-    /// <summary>
-    /// The access ticket must be for the access realm that holds the queue.
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the queue to purge. If the queue name is empty, refers to
-    ///           the current queue for the channel, which is the last declared queue.
-    ///         
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.purge-ok".</summary>
-  /// <remarks>
-  /// This method confirms the purge of a queue.
-  /// </remarks>
   public interface IQueuePurgeOk: IMethod {
-    /// <summary>
-    /// Reports the number of messages purged.
-    /// </summary>
     uint MessageCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.delete".</summary>
-  /// <remarks>
-  /// 
-  ///         This method deletes a queue. When a queue is deleted any pending messages are sent
-  ///         to a dead-letter queue if this is defined in the server configuration, and all
-  ///         consumers on the queue are cancelled.
-  ///       
-  /// </remarks>
   public interface IQueueDelete: IMethod {
-    /// <summary>
-    /// 
-    ///           The client provides a valid access ticket giving "active" access rights to the
-    ///           queue's access realm.
-    ///         
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the queue to delete. If the queue name is empty, refers to
-    ///           the current queue for the channel, which is the last declared queue.
-    ///         
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will only delete the queue if it has no consumers. If the
-    ///           queue has consumers the server does does not delete it but raises a channel
-    ///           exception instead.
-    ///         
-    /// </summary>
     bool IfUnused { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will only delete the queue if it has no messages.
-    ///         
-    /// </summary>
     bool IfEmpty { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.delete-ok".</summary>
-  /// <remarks>
-  /// This method confirms the deletion of a queue.
-  /// </remarks>
   public interface IQueueDeleteOk: IMethod {
-    /// <summary>
-    /// Reports the number of messages purged.
-    /// </summary>
     uint MessageCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.qos".</summary>
-  /// <remarks>
-  /// 
-  ///         This method requests a specific quality of service. The QoS can be specified for the
-  ///         current channel or for all channels on the connection. The particular properties and
-  ///         semantics of a qos method always depend on the content class semantics. Though the
-  ///         qos method could in principle apply to both peers, it is currently meaningful only
-  ///         for the server.
-  ///       
-  /// </remarks>
   public interface IBasicQos: IMethod {
-    /// <summary>
-    /// 
-    ///           The client can request that messages be sent in advance so that when the client
-    ///           finishes processing a message, the following message is already held locally,
-    ///           rather than needing to be sent down the channel. Prefetching gives a performance
-    ///           improvement. This field specifies the prefetch window size in octets. The server
-    ///           will send a message in advance if it is equal to or smaller in size than the
-    ///           available prefetch size (and also falls into other prefetch limits). May be set
-    ///           to zero, meaning "no specific limit", although other prefetch limits may still
-    ///           apply. The prefetch-size is ignored if the no-ack option is set.
-    ///         
-    /// </summary>
     uint PrefetchSize { get; }
-    /// <summary>
-    /// 
-    ///           Specifies a prefetch window in terms of whole messages. This field may be used
-    ///           in combination with the prefetch-size field; a message will only be sent in
-    ///           advance if both prefetch windows (and those at the channel and connection level)
-    ///           allow it. The prefetch-count is ignored if the no-ack option is set.
-    ///         
-    /// </summary>
     ushort PrefetchCount { get; }
-    /// <summary>
-    /// 
-    ///           By default the QoS settings apply to the current channel only. If this field is
-    ///           set, they are applied to the entire connection.
-    ///         
-    /// </summary>
     bool Global { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.qos-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method tells the client that the requested QoS levels could be handled by the
-  ///         server. The requested QoS applies to all active consumers until a new QoS is
-  ///         defined.
-  ///       
-  /// </remarks>
   public interface IBasicQosOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.consume".</summary>
-  /// <remarks>
-  /// 
-  ///         This method asks the server to start a "consumer", which is a transient request for
-  ///         messages from a specific queue. Consumers last as long as the channel they were
-  ///         created on, or until the client cancels them.
-  ///       
-  /// </remarks>
   public interface IBasicConsume: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the queue to consume from. If the queue name is null,
-    ///           refers to the current queue for the channel, which is the last declared queue.
-    ///         
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the identifier for the consumer. The consumer tag is local to a
-    ///           connection, so two clients can use the same consumer tags. If this field is
-    ///           empty the server will generate a unique tag.
-    ///         
-    /// </summary>
     string ConsumerTag { get; }
-    // (no documentation)
     bool NoLocal { get; }
-    // (no documentation)
     bool NoAck { get; }
-    /// <summary>
-    /// 
-    ///           Request exclusive consumer access, meaning only this consumer can access the
-    ///           queue.
-    ///         
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise
-    ///           a channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///           A set of filters for the consume. The syntax and semantics
-    ///                  of these filters depends on the providers implementation.
-    ///         
-    /// </summary>
     System.Collections.IDictionary Filter { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.consume-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         The server provides the client with a consumer tag, which is used by the client
-  ///         for methods called on the consumer at a later stage.
-  ///       
-  /// </remarks>
   public interface IBasicConsumeOk: IMethod {
-    /// <summary>
-    /// 
-    ///           Holds the consumer tag specified by the client or provided by the server.
-    ///         
-    /// </summary>
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.cancel".</summary>
-  /// <remarks>
-  /// 
-  ///         This method cancels a consumer. This does not affect already delivered
-  ///         messages, but it does mean the server will not send any more messages for
-  ///         that consumer. The client may receive an arbitrary number of messages in
-  ///         between sending the cancel method and receiving the cancel-ok reply.
-  ///       
-  /// </remarks>
   public interface IBasicCancel: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.cancel-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms that the cancellation was completed.
-  ///       
-  /// </remarks>
   public interface IBasicCancelOk: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.publish".</summary>
-  /// <remarks>
-  /// 
-  ///         This method publishes a message to a specific exchange. The message will be routed
-  ///         to queues as defined by the exchange configuration and distributed to any active
-  ///         consumers when the transaction, if any, is committed.
-  ///       
-  /// </remarks>
   public interface IBasicPublish: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the exchange to publish to. The exchange name can be
-    ///           empty, meaning the default exchange. If the exchange name is specified, and that
-    ///           exchange does not exist, the server will raise a channel exception.
-    ///         
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the routing key for the message. The routing key is used for routing
-    ///           messages depending on the exchange configuration.
-    ///         
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///           This flag tells the server how to react if the message cannot be routed to a
-    ///           queue. If this flag is set, the server will return an unroutable message with a
-    ///           Return method. If this flag is zero, the server silently drops the message.
-    ///         
-    /// </summary>
     bool Mandatory { get; }
-    /// <summary>
-    /// 
-    ///           This flag tells the server how to react if the message cannot be routed to a
-    ///           queue consumer immediately. If this flag is set, the server will return an
-    ///           undeliverable message with a Return method. If this flag is zero, the server
-    ///           will queue the message, but with no guarantee that it will ever be consumed.
-    ///         
-    /// </summary>
     bool Immediate { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.return".</summary>
-  /// <remarks>
-  /// 
-  ///         This method returns an undeliverable message that was published with the "immediate"
-  ///         flag set, or an unroutable message published with the "mandatory" flag set. The
-  ///         reply code and text provide information about the reason that the message was
-  ///         undeliverable.
-  ///       
-  /// </remarks>
   public interface IBasicReturn: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the exchange that the message was originally published to.
-    ///         
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the routing key name specified when the message was published.
-    ///         
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.deliver".</summary>
-  /// <remarks>
-  /// 
-  ///         This method delivers a message to the client, via a consumer. In the asynchronous
-  ///         message delivery model, the client starts a consumer using the Consume method, then
-  ///         the server responds with Deliver methods as and when messages arrive for that
-  ///         consumer.
-  ///       
-  /// </remarks>
   public interface IBasicDeliver: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    // (no documentation)
     ulong DeliveryTag { get; }
-    // (no documentation)
     bool Redelivered { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the exchange that the message was originally published to.
-    ///         
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// Specifies the routing key name specified when the message was published.
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.get".</summary>
-  /// <remarks>
-  /// 
-  ///         This method provides a direct access to the messages in a queue using a synchronous
-  ///         dialogue that is designed for specific types of application where synchronous
-  ///         functionality is more important than performance.
-  ///       
-  /// </remarks>
   public interface IBasicGet: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the queue to consume from. If the queue name is null,
-    ///           refers to the current queue for the channel, which is the last declared queue.
-    ///         
-    /// </summary>
     string Queue { get; }
-    // (no documentation)
     bool NoAck { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.get-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method delivers a message to the client following a get method. A message
-  ///         delivered by 'get-ok' must be acknowledged unless the no-ack option was set in the
-  ///         get method.
-  ///       
-  /// </remarks>
   public interface IBasicGetOk: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    // (no documentation)
     bool Redelivered { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the exchange that the message was originally published to.
-    ///           If empty, the message was published to the default exchange.
-    ///         
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// Specifies the routing key name specified when the message was published.
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///           This field reports the number of messages pending on the queue, excluding the
-    ///           message being delivered. Note that this figure is indicative, not reliable, and
-    ///           can change arbitrarily as messages are added to the queue and removed by other
-    ///           clients.
-    ///         
-    /// </summary>
     uint MessageCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.get-empty".</summary>
-  /// <remarks>
-  /// 
-  ///         This method tells the client that the queue has no messages available for the
-  ///         client.
-  ///       
-  /// </remarks>
   public interface IBasicGetEmpty: IMethod {
-    /// <summary>
-    /// 
-    ///           For use by cluster applications, should not be used by client applications.
-    ///         
-    /// </summary>
     string ClusterId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.ack".</summary>
-  /// <remarks>
-  /// 
-  ///         This method acknowledges one or more messages delivered via the Deliver or Get-Ok
-  ///         methods. The client can ask to confirm a single message or a set of messages up to
-  ///         and including a specific message.
-  ///       
-  /// </remarks>
   public interface IBasicAck: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///           If set to 1, the delivery tag is treated as "up to and including", so that the
-    ///           client can acknowledge multiple messages with a single method. If set to zero,
-    ///           the delivery tag refers to a single message. If the multiple field is 1, and the
-    ///           delivery tag is zero, tells the server to acknowledge all outstanding messages.
-    ///         
-    /// </summary>
     bool Multiple { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.reject".</summary>
-  /// <remarks>
-  /// 
-  ///         This method allows a client to reject a message. It can be used to interrupt and
-  ///         cancel large incoming messages, or return untreatable messages to their original
-  ///         queue.
-  ///       
-  /// </remarks>
   public interface IBasicReject: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///           If this field is zero, the message will be discarded. If this bit is 1, the
-    ///           server will attempt to requeue the message.
-    ///         
-    /// </summary>
     bool Requeue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.recover".</summary>
-  /// <remarks>
-  /// 
-  ///         This method asks the broker to redeliver all unacknowledged messages on a specified
-  ///         channel. Zero or more messages may be redelivered. This method is only allowed on
-  ///         non-transacted channels.
-  ///       
-  /// </remarks>
   public interface IBasicRecover: IMethod {
-    /// <summary>
-    /// 
-    ///           If this field is zero, the message will be redelivered to the original
-    ///           recipient. If this bit is 1, the server will attempt to requeue the message,
-    ///           potentially then delivering it to an alternative subscriber.
-    ///         
-    /// </summary>
     bool Requeue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.qos".</summary>
-  /// <remarks>
-  /// 
-  ///         This method requests a specific quality of service. The QoS can be specified for the
-  ///         current channel or for all channels on the connection. The particular properties and
-  ///         semantics of a qos method always depend on the content class semantics. Though the
-  ///         qos method could in principle apply to both peers, it is currently meaningful only
-  ///         for the server.
-  ///       
-  /// </remarks>
   public interface IFileQos: IMethod {
-    /// <summary>
-    /// 
-    ///           The client can request that messages be sent in advance so that when the client
-    ///           finishes processing a message, the following message is already held locally,
-    ///           rather than needing to be sent down the channel. Prefetching gives a performance
-    ///           improvement. This field specifies the prefetch window size in octets. May be set
-    ///           to zero, meaning "no specific limit". Note that other prefetch limits may still
-    ///           apply. The prefetch-size is ignored if the no-ack option is set.
-    ///         
-    /// </summary>
     uint PrefetchSize { get; }
-    /// <summary>
-    /// 
-    ///           Specifies a prefetch window in terms of whole messages. This is compatible with
-    ///           some file API implementations. This field may be used in combination with the
-    ///           prefetch-size field; a message will only be sent in advance if both prefetch
-    ///           windows (and those at the channel and connection level) allow it. The
-    ///           prefetch-count is ignored if the no-ack option is set.
-    ///         
-    /// </summary>
     ushort PrefetchCount { get; }
-    /// <summary>
-    /// 
-    ///           By default the QoS settings apply to the current channel only. If this field is
-    ///           set, they are applied to the entire connection.
-    ///         
-    /// </summary>
     bool Global { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.qos-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method tells the client that the requested QoS levels could be handled by the
-  ///         server. The requested QoS applies to all active consumers until a new QoS is
-  ///         defined.
-  ///       
-  /// </remarks>
   public interface IFileQosOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "file.consume".</summary>
-  /// <remarks>
-  /// 
-  ///         This method asks the server to start a "consumer", which is a transient request for
-  ///         messages from a specific queue. Consumers last as long as the channel they were
-  ///         created on, or until the client cancels them.
-  ///       
-  /// </remarks>
   public interface IFileConsume: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the queue to consume from. If the queue name is null,
-    ///           refers to the current queue for the channel, which is the last declared queue.
-    ///         
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the identifier for the consumer. The consumer tag is local to a
-    ///           connection, so two clients can use the same consumer tags. If this field is
-    ///           empty the server will generate a unique tag.
-    ///         
-    /// </summary>
     string ConsumerTag { get; }
-    // (no documentation)
     bool NoLocal { get; }
-    // (no documentation)
     bool NoAck { get; }
-    /// <summary>
-    /// 
-    ///           Request exclusive consumer access, meaning only this consumer can access the
-    ///           queue.
-    ///         
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///           A set of filters for the consume. The syntax and semantics
-    ///                  of these filters depends on the providers implementation.
-    ///         
-    /// </summary>
     System.Collections.IDictionary Filter { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.consume-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method provides the client with a consumer tag which it MUST use in methods
-  ///         that work with the consumer.
-  ///       
-  /// </remarks>
   public interface IFileConsumeOk: IMethod {
-    /// <summary>
-    /// Holds the consumer tag specified by the client or provided by the server.
-    /// </summary>
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.cancel".</summary>
-  /// <remarks>
-  /// 
-  ///         This method cancels a consumer. This does not affect already delivered messages, but
-  ///         it does mean the server will not send any more messages for that consumer.
-  ///       
-  /// </remarks>
   public interface IFileCancel: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.cancel-ok".</summary>
-  /// <remarks>
-  /// This method confirms that the cancellation was completed.
-  /// </remarks>
   public interface IFileCancelOk: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.open".</summary>
-  /// <remarks>
-  /// 
-  ///         This method requests permission to start staging a message. Staging means sending
-  ///         the message into a temporary area at the recipient end and then delivering the
-  ///         message by referring to this temporary area. Staging is how the protocol handles
-  ///         partial file transfers - if a message is partially staged and the connection breaks,
-  ///         the next time the sender starts to stage it, it can restart from where it left off.
-  ///       
-  /// </remarks>
   public interface IFileOpen: IMethod {
-    /// <summary>
-    /// 
-    ///           This is the staging identifier. This is an arbitrary string chosen by the
-    ///           sender. For staging to work correctly the sender must use the same staging
-    ///           identifier when staging the same message a second time after recovery from a
-    ///           failure. A good choice for the staging identifier would be the SHA1 hash of the
-    ///           message properties data (including the original filename, revised time, etc.).
-    ///         
-    /// </summary>
     string Identifier { get; }
-    /// <summary>
-    /// 
-    ///           The size of the content in octets. The recipient may use this information to
-    ///           allocate or check available space in advance, to avoid "disk full" errors during
-    ///           staging of very large messages.
-    ///         
-    /// </summary>
     ulong ContentSize { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.open-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms that the recipient is ready to accept staged data. If the
-  ///         message was already partially-staged at a previous time the recipient will report
-  ///         the number of octets already staged.
-  ///       
-  /// </remarks>
   public interface IFileOpenOk: IMethod {
-    /// <summary>
-    /// 
-    ///           The amount of previously-staged content in octets. For a new message this will
-    ///           be zero.
-    ///         
-    /// </summary>
     ulong StagedSize { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.stage".</summary>
-  /// <remarks>
-  /// 
-  ///         This method stages the message, sending the message content to the recipient from
-  ///         the octet offset specified in the Open-Ok method.
-  ///       
-  /// </remarks>
   public interface IFileStage: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "file.publish".</summary>
-  /// <remarks>
-  /// 
-  ///         This method publishes a staged file message to a specific exchange. The file message
-  ///         will be routed to queues as defined by the exchange configuration and distributed to
-  ///         any active consumers when the transaction, if any, is committed.
-  ///       
-  /// </remarks>
   public interface IFilePublish: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the exchange to publish to. The exchange name can be
-    ///           empty, meaning the default exchange. If the exchange name is specified, and that
-    ///           exchange does not exist, the server will raise a channel exception.
-    ///         
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the routing key for the message. The routing key is used for routing
-    ///           messages depending on the exchange configuration.
-    ///         
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///           This flag tells the server how to react if the message cannot be routed to a
-    ///           queue. If this flag is set, the server will return an unroutable message with a
-    ///           Return method. If this flag is zero, the server silently drops the message.
-    ///         
-    /// </summary>
     bool Mandatory { get; }
-    /// <summary>
-    /// 
-    ///           This flag tells the server how to react if the message cannot be routed to a
-    ///           queue consumer immediately. If this flag is set, the server will return an
-    ///           undeliverable message with a Return method. If this flag is zero, the server
-    ///           will queue the message, but with no guarantee that it will ever be consumed.
-    ///         
-    /// </summary>
     bool Immediate { get; }
-    /// <summary>
-    /// 
-    ///           This is the staging identifier of the message to publish. The message must have
-    ///           been staged. Note that a client can send the Publish method asynchronously
-    ///           without waiting for staging to finish.
-    ///         
-    /// </summary>
     string Identifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.return".</summary>
-  /// <remarks>
-  /// 
-  ///         This method returns an undeliverable message that was published with the "immediate"
-  ///         flag set, or an unroutable message published with the "mandatory" flag set. The
-  ///         reply code and text provide information about the reason that the message was
-  ///         undeliverable.
-  ///       
-  /// </remarks>
   public interface IFileReturn: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the exchange that the message was originally published to.
-    ///         
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// Specifies the routing key name specified when the message was published.
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.deliver".</summary>
-  /// <remarks>
-  /// 
-  ///         This method delivers a staged file message to the client, via a consumer. In the
-  ///         asynchronous message delivery model, the client starts a consumer using the Consume
-  ///         method, then the server responds with Deliver methods as and when messages arrive
-  ///         for that consumer.
-  ///       
-  /// </remarks>
   public interface IFileDeliver: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    // (no documentation)
     ulong DeliveryTag { get; }
-    // (no documentation)
     bool Redelivered { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the exchange that the message was originally published to.
-    ///         
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// Specifies the routing key name specified when the message was published.
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///           This is the staging identifier of the message to deliver. The message must have
-    ///           been staged. Note that a server can send the Deliver method asynchronously
-    ///           without waiting for staging to finish.
-    ///         
-    /// </summary>
     string Identifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.ack".</summary>
-  /// <remarks>
-  /// 
-  ///         This method acknowledges one or more messages delivered via the Deliver method. The
-  ///         client can ask to confirm a single message or a set of messages up to and including
-  ///         a specific message.
-  ///       
-  /// </remarks>
   public interface IFileAck: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///           If set to 1, the delivery tag is treated as "up to and including", so that the
-    ///           client can acknowledge multiple messages with a single method. If set to zero,
-    ///           the delivery tag refers to a single message. If the multiple field is 1, and the
-    ///           delivery tag is zero, tells the server to acknowledge all outstanding messages.
-    ///         
-    /// </summary>
     bool Multiple { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.reject".</summary>
-  /// <remarks>
-  /// 
-  ///         This method allows a client to reject a message. It can be used to return
-  ///         untreatable messages to their original queue. Note that file content is staged
-  ///         before delivery, so the client will not use this method to interrupt delivery of a
-  ///         large message.
-  ///       
-  /// </remarks>
   public interface IFileReject: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///           If this field is zero, the message will be discarded. If this bit is 1, the
-    ///           server will attempt to requeue the message.
-    ///         
-    /// </summary>
     bool Requeue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.qos".</summary>
-  /// <remarks>
-  /// 
-  ///         This method requests a specific quality of service. The QoS can be specified for the
-  ///         current channel or for all channels on the connection. The particular properties and
-  ///         semantics of a qos method always depend on the content class semantics. Though the
-  ///         qos method could in principle apply to both peers, it is currently meaningful only
-  ///         for the server.
-  ///       
-  /// </remarks>
   public interface IStreamQos: IMethod {
-    /// <summary>
-    /// 
-    ///           The client can request that messages be sent in advance so that when the client
-    ///           finishes processing a message, the following message is already held locally,
-    ///           rather than needing to be sent down the channel. Prefetching gives a performance
-    ///           improvement. This field specifies the prefetch window size in octets. May be set
-    ///           to zero, meaning "no specific limit". Note that other prefetch limits may still
-    ///           apply.
-    ///         
-    /// </summary>
     uint PrefetchSize { get; }
-    /// <summary>
-    /// 
-    ///           Specifies a prefetch window in terms of whole messages. This field may be used
-    ///           in combination with the prefetch-size field; a message will only be sent in
-    ///           advance if both prefetch windows (and those at the channel and connection level)
-    ///           allow it.
-    ///         
-    /// </summary>
     ushort PrefetchCount { get; }
-    /// <summary>
-    /// 
-    ///           Specifies a desired transfer rate in octets per second. This is usually
-    ///           determined by the application that uses the streaming data. A value of zero
-    ///           means "no limit", i.e. as rapidly as possible.
-    ///         
-    /// </summary>
     uint ConsumeRate { get; }
-    /// <summary>
-    /// 
-    ///           By default the QoS settings apply to the current channel only. If this field is
-    ///           set, they are applied to the entire connection.
-    ///         
-    /// </summary>
     bool Global { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.qos-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method tells the client that the requested QoS levels could be handled by the
-  ///         server. The requested QoS applies to all active consumers until a new QoS is
-  ///         defined.
-  ///       
-  /// </remarks>
   public interface IStreamQosOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.consume".</summary>
-  /// <remarks>
-  /// 
-  ///         This method asks the server to start a "consumer", which is a transient request for
-  ///         messages from a specific queue. Consumers last as long as the channel they were
-  ///         created on, or until the client cancels them.
-  ///       
-  /// </remarks>
   public interface IStreamConsume: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the queue to consume from. If the queue name is null,
-    ///           refers to the current queue for the channel, which is the last declared queue.
-    ///         
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the identifier for the consumer. The consumer tag is local to a
-    ///           connection, so two clients can use the same consumer tags. If this field is
-    ///           empty the server will generate a unique tag.
-    ///         
-    /// </summary>
     string ConsumerTag { get; }
-    // (no documentation)
     bool NoLocal { get; }
-    /// <summary>
-    /// 
-    ///           Request exclusive consumer access, meaning only this consumer can access the
-    ///           queue.
-    ///         
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///           A set of filters for the consume. The syntax and semantics
-    ///                  of these filters depends on the providers implementation.
-    ///         
-    /// </summary>
     System.Collections.IDictionary Filter { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.consume-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method provides the client with a consumer tag which it may use in methods that
-  ///         work with the consumer.
-  ///       
-  /// </remarks>
   public interface IStreamConsumeOk: IMethod {
-    /// <summary>
-    /// Holds the consumer tag specified by the client or provided by the server.
-    /// </summary>
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.cancel".</summary>
-  /// <remarks>
-  /// 
-  ///         This method cancels a consumer. Since message delivery is asynchronous the client
-  ///         may continue to receive messages for a short while after cancelling a consumer. It
-  ///         may process or discard these as appropriate.
-  ///       
-  /// </remarks>
   public interface IStreamCancel: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    /// <summary>
-    /// 
-    ///           If set, the server will not respond to the method. The client should not wait
-    ///           for a reply method. If the server could not complete the method it will raise a
-    ///           channel or connection exception.
-    ///         
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.cancel-ok".</summary>
-  /// <remarks>
-  /// This method confirms that the cancellation was completed.
-  /// </remarks>
   public interface IStreamCancelOk: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.publish".</summary>
-  /// <remarks>
-  /// 
-  ///         This method publishes a message to a specific exchange. The message will be routed
-  ///         to queues as defined by the exchange configuration and distributed to any active
-  ///         consumers as appropriate.
-  ///       
-  /// </remarks>
   public interface IStreamPublish: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the exchange to publish to. The exchange name can be
-    ///           empty, meaning the default exchange. If the exchange name is specified, and that
-    ///           exchange does not exist, the server will raise a channel exception.
-    ///         
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the routing key for the message. The routing key is used for routing
-    ///           messages depending on the exchange configuration.
-    ///         
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///           This flag tells the server how to react if the message cannot be routed to a
-    ///           queue. If this flag is set, the server will return an unroutable message with a
-    ///           Return method. If this flag is zero, the server silently drops the message.
-    ///         
-    /// </summary>
     bool Mandatory { get; }
-    /// <summary>
-    /// 
-    ///           This flag tells the server how to react if the message cannot be routed to a
-    ///           queue consumer immediately. If this flag is set, the server will return an
-    ///           undeliverable message with a Return method. If this flag is zero, the server
-    ///           will queue the message, but with no guarantee that it will ever be consumed.
-    ///         
-    /// </summary>
     bool Immediate { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.return".</summary>
-  /// <remarks>
-  /// 
-  ///         This method returns an undeliverable message that was published with the "immediate"
-  ///         flag set, or an unroutable message published with the "mandatory" flag set. The
-  ///         reply code and text provide information about the reason that the message was
-  ///         undeliverable.
-  ///       
-  /// </remarks>
   public interface IStreamReturn: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the exchange that the message was originally published to.
-    ///         
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// Specifies the routing key name specified when the message was published.
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.deliver".</summary>
-  /// <remarks>
-  /// 
-  ///         This method delivers a message to the client, via a consumer. In the asynchronous
-  ///         message delivery model, the client starts a consumer using the Consume method, then
-  ///         the server responds with Deliver methods as and when messages arrive for that
-  ///         consumer.
-  ///       
-  /// </remarks>
   public interface IStreamDeliver: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the exchange that the message was originally published to.
-    ///         
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the queue that the message came from. Note that a single
-    ///           channel can start many consumers on different queues.
-    ///         
-    /// </summary>
     string Queue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.select".</summary>
-  /// <remarks>
-  /// 
-  ///         This method sets the channel to use standard transactions. The client must use this
-  ///         method at least once on a channel before using the Commit or Rollback methods.
-  ///       
-  /// </remarks>
   public interface ITxSelect: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.select-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms to the client that the channel was successfully set to use
-  ///         standard transactions.
-  ///       
-  /// </remarks>
   public interface ITxSelectOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.commit".</summary>
-  /// <remarks>
-  /// 
-  ///         This method commits all messages published and acknowledged in the current
-  ///         transaction. A new transaction starts immediately after a commit.
-  ///       
-  /// </remarks>
   public interface ITxCommit: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.commit-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms to the client that the commit succeeded. Note that if a commit
-  ///         fails, the server raises a channel exception.
-  ///       
-  /// </remarks>
   public interface ITxCommitOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.rollback".</summary>
-  /// <remarks>
-  /// 
-  ///         This method abandons all messages published and acknowledged in the current
-  ///         transaction. A new transaction starts immediately after a rollback.
-  ///       
-  /// </remarks>
   public interface ITxRollback: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.rollback-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms to the client that the rollback succeeded. Note that if an
-  ///         rollback fails, the server raises a channel exception.
-  ///       
-  /// </remarks>
   public interface ITxRollbackOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.select".</summary>
-  /// <remarks>
-  /// 
-  ///         This method sets the channel to use distributed transactions. The client must use
-  ///         this method at least once on a channel before using the Start method.
-  ///       
-  /// </remarks>
   public interface IDtxSelect: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.select-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms to the client that the channel was successfully set to use
-  ///         distributed transactions.
-  ///       
-  /// </remarks>
   public interface IDtxSelectOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.start".</summary>
-  /// <remarks>
-  /// 
-  ///         This method starts a new distributed transaction. This must be the first method on a
-  ///         new channel that uses the distributed transaction mode, before any methods that
-  ///         publish or consume messages.
-  ///       
-  /// </remarks>
   public interface IDtxStart: IMethod {
-    /// <summary>
-    /// 
-    ///           The distributed transaction key. This identifies the transaction so that the
-    ///           AMQP server can coordinate with the distributed transaction coordinator.
-    ///         
-    /// </summary>
     string DtxIdentifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.start-ok".</summary>
-  /// <remarks>
-  /// 
-  ///         This method confirms to the client that the transaction started. Note that if a
-  ///         start fails, the server raises a channel exception.
-  ///       
-  /// </remarks>
   public interface IDtxStartOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tunnel.request".</summary>
-  /// <remarks>
-  /// 
-  ///         This method tunnels a block of binary data, which can be an encoded
-  ///         AMQP method or other data. The binary data is sent as the content for
-  ///         the Tunnel.Request method.
-  ///       
-  /// </remarks>
   public interface ITunnelRequest: IMethod {
-    /// <summary>
-    /// 
-    ///           This field table holds arbitrary meta-data that the sender needs to
-    ///           pass to the recipient.
-    ///         
-    /// </summary>
     System.Collections.IDictionary MetaData { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.transfer".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method transfers a message between two peers. When a
-  ///         client uses this method to publish a message to a broker, the
-  ///         destination identifies a specific exchange. The message will
-  ///         then be routed to queues as defined by the exchange
-  ///         configuration and distributed to any active consumers when the
-  ///         transaction, if any, is committed.
-  /// 
-  ///         In the asynchronous message delivery model, the client starts
-  ///         a consumer using the Consume method and passing in a
-  ///         destination, then the broker responds with transfer methods to
-  ///         the specified destination as and when messages arrive for that
-  ///         consumer.
-  /// 
-  ///         If synchronous message delivery is required, the client may
-  ///         issue a get request which on success causes a single message
-  ///         to be transferred to the specified destination.
-  /// 
-  ///         Message acknowledgement is signalled by the return result of
-  ///         this method.
-  ///       
-  /// </remarks>
   public interface IMessageTransfer: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the destination to which the message is to be
-    ///           transferred. The destination can be empty, meaning the
-    ///           default exchange or consumer. If the destination is
-    ///           specified, and that exchange or consumer does not exist, the
-    ///           peer must raise a channel exception.
-    ///         
-    /// </summary>
     string Destination { get; }
-    // (no documentation)
     bool Redelivered { get; }
-    /// <summary>
-    /// 
-    ///           This flag tells the server how to react if the message
-    ///           cannot be routed to a queue consumer immediately. If this
-    ///           flag is set, the server will reject the message. If this
-    ///           flag is zero, the server will queue the message, but with no
-    ///           guarantee that it will ever be consumed.
-    ///         
-    /// </summary>
     bool Immediate { get; }
-    /// <summary>
-    /// 
-    ///           If this is set to a non zero value then a message expiration
-    ///           time will be computed based on the current time plus this
-    ///           value. Messages that live longer than their expiration time
-    ///           will be discarded (or dead lettered).
-    ///         
-    /// </summary>
     ulong Ttl { get; }
-    // (no documentation)
     byte Priority { get; }
-    /// <summary>
-    /// 
-    ///           Set on arrival by the broker.
-    ///         
-    /// </summary>
     AmqpTimestamp Timestamp { get; }
-    // (no documentation)
     byte DeliveryMode { get; }
-    /// <summary>
-    /// 
-    ///           The expiration header assigned by the broker. After
-    ///           receiving the message the broker sets expiration to the sum
-    ///           of the ttl specified in the publish method and the current
-    ///           time. (ttl = expiration - timestamp)
-    ///         
-    /// </summary>
     AmqpTimestamp Expiration { get; }
-    // (no documentation)
     string Exchange { get; }
-    // (no documentation)
     string RoutingKey { get; }
-    // (no documentation)
     string MessageId { get; }
-    // (no documentation)
     string CorrelationId { get; }
-    // (no documentation)
     string ReplyTo { get; }
-    // (no documentation)
     string ContentType { get; }
-    // (no documentation)
     string ContentEncoding { get; }
-    // (no documentation)
     string UserId { get; }
-    // (no documentation)
     string AppId { get; }
-    // (no documentation)
     string TransactionId { get; }
-    // (no documentation)
     byte[] SecurityToken { get; }
-    // (no documentation)
     System.Collections.IDictionary ApplicationHeaders { get; }
-    // (no documentation)
     byte[] Body { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.consume".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method asks the server to start a "consumer", which is a transient request for
-  ///         messages from a specific queue. Consumers last as long as the channel they were
-  ///         created on, or until the client cancels them.
-  ///       
-  /// </remarks>
   public interface IMessageConsume: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the queue to consume from. If the queue name is null,
-    ///           refers to the current queue for the channel, which is the last declared queue.
-    ///         
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the destination for the consumer. The destination is local to a
-    ///           connection, so two clients can use the same destination.
-    ///         
-    /// </summary>
     string Destination { get; }
-    // (no documentation)
     bool NoLocal { get; }
-    // (no documentation)
     bool NoAck { get; }
-    /// <summary>
-    /// 
-    ///           Request exclusive consumer access, meaning only this consumer can access the
-    ///           queue.
-    ///         
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///           A set of filters for the consume. The syntax and semantics
-    ///                  of these filters depends on the providers implementation.
-    ///         
-    /// </summary>
     System.Collections.IDictionary Filter { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.cancel".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method cancels a consumer. This does not affect already delivered
-  ///         messages, but it does mean the server will not send any more messages for
-  ///         that consumer. The client may receive an arbitrary number of messages in
-  ///         between sending the cancel method and receiving the cancel-ok reply.
-  ///       
-  /// </remarks>
   public interface IMessageCancel: IMethod {
-    // (no documentation)
     string Destination { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.get".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method provides a direct access to the messages in a queue using a synchronous
-  ///         dialogue that is designed for specific types of application where synchronous
-  ///         functionality is more important than performance.
-  ///       
-  /// </remarks>
   public interface IMessageGet: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///           Specifies the name of the queue to consume from. If the queue name is null,
-    ///           refers to the current queue for the channel, which is the last declared queue.
-    ///         
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///           On normal completion of the get request (i.e. a response of
-    ///           ok). A message will be transferred to the supplied destination.
-    ///         
-    /// </summary>
     string Destination { get; }
-    // (no documentation)
     bool NoAck { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.recover".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method asks the broker to redeliver all unacknowledged
-  ///         messages on a specified channel. Zero or more messages may be
-  ///         redelivered. This method is only allowed on non-transacted
-  ///         channels.
-  ///       
-  /// </remarks>
   public interface IMessageRecover: IMethod {
-    /// <summary>
-    /// 
-    ///           If this field is zero, the message will be redelivered to
-    ///           the original recipient. If this bit is 1, the server will
-    ///           attempt to requeue the message, potentially then delivering
-    ///           it to an alternative subscriber.
-    ///         
-    /// </summary>
     bool Requeue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.open".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method creates a reference. A references provides a means
-  ///         to send a message body into a temporary area at the recipient
-  ///         end and then deliver the message by referring to this
-  ///         temporary area. This is how the protocol handles large message
-  ///         transfers.
-  /// 
-  ///         The scope of a ref is defined to be between calls to
-  ///         open (or resume) and close. Between these points it is valid
-  ///         for a ref to be used from any content data type, and so the
-  ///         receiver must hold onto its contents. Should the channel be
-  ///         closed when a ref is still in scope, the receiver may discard
-  ///         its contents (unless it is checkpointed). A ref that is in
-  ///         scope is considered open.
-  ///       
-  /// </remarks>
   public interface IMessageOpen: IMethod {
-    // (no documentation)
     byte[] Reference { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.close".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method signals the recipient that no more data will be
-  ///         appended to the reference.
-  ///       
-  /// </remarks>
   public interface IMessageClose: IMethod {
-    // (no documentation)
     byte[] Reference { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.append".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method appends data to a reference.
-  ///       
-  /// </remarks>
   public interface IMessageAppend: IMethod {
-    // (no documentation)
     byte[] Reference { get; }
-    // (no documentation)
     byte[] Bytes { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.checkpoint".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method provides a means to checkpoint large message
-  ///         transfer. The sender may ask the recipient to checkpoint the
-  ///         contents of a reference using the supplied identifier. The
-  ///         sender may then resume the transfer at a later point. It is at
-  ///         the discretion of the recipient how much data to save with the
-  ///         checkpoint, and the sender MUST honour the offset returned by
-  ///         the resume method.
-  ///       
-  /// </remarks>
   public interface IMessageCheckpoint: IMethod {
-    // (no documentation)
     byte[] Reference { get; }
-    /// <summary>
-    /// 
-    ///           This is the checkpoint identifier. This is an arbitrary
-    ///           string chosen by the sender. For checkpointing to work
-    ///           correctly the sender must use the same checkpoint identifier
-    ///           when resuming the message. A good choice for the checkpoint
-    ///           identifier would be the SHA1 hash of the message properties
-    ///           data (including the original filename, revised time, etc.).
-    ///         
-    /// </summary>
     string Identifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.resume".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method resumes a reference from the last checkpoint. A
-  ///         reference is considered to be open (in scope) after a resume
-  ///         even though it will not have been opened via the open method
-  ///         during this session.
-  ///       
-  /// </remarks>
   public interface IMessageResume: IMethod {
-    // (no documentation)
     byte[] Reference { get; }
-    // (no documentation)
     string Identifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.qos".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This method requests a specific quality of service. The QoS can be specified for the
-  ///         current channel or for all channels on the connection. The particular properties and
-  ///         semantics of a qos method always depend on the content class semantics. Though the
-  ///         qos method could in principle apply to both peers, it is currently meaningful only
-  ///         for the server.
-  ///       
-  /// </remarks>
   public interface IMessageQos: IMethod {
-    /// <summary>
-    /// 
-    ///           The client can request that messages be sent in advance so that when the client
-    ///           finishes processing a message, the following message is already held locally,
-    ///           rather than needing to be sent down the channel. Prefetching gives a performance
-    ///           improvement. This field specifies the prefetch window size in octets. The server
-    ///           will send a message in advance if it is equal to or smaller in size than the
-    ///           available prefetch size (and also falls into other prefetch limits). May be set
-    ///           to zero, meaning "no specific limit", although other prefetch limits may still
-    ///           apply. The prefetch-size is ignored if the no-ack option is set.
-    ///         
-    /// </summary>
     uint PrefetchSize { get; }
-    /// <summary>
-    /// 
-    ///           Specifies a prefetch window in terms of whole messages. This field may be used
-    ///           in combination with the prefetch-size field; a message will only be sent in
-    ///           advance if both prefetch windows (and those at the channel and connection level)
-    ///           allow it. The prefetch-count is ignored if the no-ack option is set.
-    ///         
-    /// </summary>
     ushort PrefetchCount { get; }
-    /// <summary>
-    /// 
-    ///           By default the QoS settings apply to the current channel only. If this field is
-    ///           set, they are applied to the entire connection.
-    ///         
-    /// </summary>
     bool Global { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.ok".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] Signals the normal completion of a method.
-  ///       
-  /// </remarks>
   public interface IMessageOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "message.empty".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] Signals that a queue does not contain any messages.
-  ///       
-  /// </remarks>
   public interface IMessageEmpty: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "message.reject".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] This response rejects a message. A message may be rejected for
-  ///         a number of reasons.
-  ///       
-  /// </remarks>
   public interface IMessageReject: IMethod {
-    // (no documentation)
     ushort Code { get; }
-    // (no documentation)
     string Text { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "message.offset".</summary>
-  /// <remarks>
-  /// 
-  ///         [WORK IN PROGRESS] Returns the data offset into a reference body.
-  ///       
-  /// </remarks>
   public interface IMessageOffset: IMethod {
-    // (no documentation)
     ulong Value { get; }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "basic"</summary>
-  /// <remarks>
-  /// 
-  ///       The Basic class provides methods that support an industry-standard messaging model.
-  ///     
-  /// </remarks>
   public class BasicProperties: RabbitMQ.Client.Impl.BasicProperties {
     private string m_contentType;
     private string m_contentEncoding;
@@ -3051,9 +1257,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
     private bool appId_present = false;
     private bool clusterId_present = false;
 
-    /// <summary>
-    /// MIME content type
-    /// </summary>
     public override string ContentType {
       get {
         return m_contentType;
@@ -3063,9 +1266,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_contentType = value;
       }
     }
-    /// <summary>
-    /// MIME content encoding
-    /// </summary>
     public override string ContentEncoding {
       get {
         return m_contentEncoding;
@@ -3075,9 +1275,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_contentEncoding = value;
       }
     }
-    /// <summary>
-    /// message header field table
-    /// </summary>
     public override System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -3087,9 +1284,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_headers = value;
       }
     }
-    /// <summary>
-    /// non-persistent (1) or persistent (2)
-    /// </summary>
     public override byte DeliveryMode {
       get {
         return m_deliveryMode;
@@ -3099,9 +1293,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_deliveryMode = value;
       }
     }
-    /// <summary>
-    /// message priority, 0 to 9
-    /// </summary>
     public override byte Priority {
       get {
         return m_priority;
@@ -3111,9 +1302,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_priority = value;
       }
     }
-    /// <summary>
-    /// application correlation identifier
-    /// </summary>
     public override string CorrelationId {
       get {
         return m_correlationId;
@@ -3123,9 +1311,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_correlationId = value;
       }
     }
-    /// <summary>
-    /// destination to reply to
-    /// </summary>
     public override string ReplyTo {
       get {
         return m_replyTo;
@@ -3135,9 +1320,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_replyTo = value;
       }
     }
-    /// <summary>
-    /// message expiration specification
-    /// </summary>
     public override string Expiration {
       get {
         return m_expiration;
@@ -3147,9 +1329,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_expiration = value;
       }
     }
-    /// <summary>
-    /// application message identifier
-    /// </summary>
     public override string MessageId {
       get {
         return m_messageId;
@@ -3159,9 +1338,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_messageId = value;
       }
     }
-    /// <summary>
-    /// message timestamp
-    /// </summary>
     public override AmqpTimestamp Timestamp {
       get {
         return m_timestamp;
@@ -3171,9 +1347,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_timestamp = value;
       }
     }
-    /// <summary>
-    /// message type name
-    /// </summary>
     public override string Type {
       get {
         return m_type;
@@ -3183,9 +1356,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_type = value;
       }
     }
-    /// <summary>
-    /// creating user id
-    /// </summary>
     public override string UserId {
       get {
         return m_userId;
@@ -3195,9 +1365,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_userId = value;
       }
     }
-    /// <summary>
-    /// creating application id
-    /// </summary>
     public override string AppId {
       get {
         return m_appId;
@@ -3207,9 +1374,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_appId = value;
       }
     }
-    /// <summary>
-    /// intra-cluster routing identifier
-    /// </summary>
     public override string ClusterId {
       get {
         return m_clusterId;
@@ -3323,16 +1487,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "file"</summary>
-  /// <remarks>
-  /// 
-  ///       The file class provides methods that support reliable file transfer. File
-  ///       messages have a specific set of properties that are required for interoperability
-  ///       with file transfer applications. File messages and acknowledgements are subject to
-  ///       channel transactions. Note that the file class does not provide message browsing
-  ///       methods; these are not compatible with the staging model. Applications that need
-  ///       browsable file transfer should use Basic content and the Basic class.
-  ///     
-  /// </remarks>
   public class FileProperties: RabbitMQ.Client.Impl.FileProperties {
     private string m_contentType;
     private string m_contentEncoding;
@@ -3354,9 +1508,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
     private bool timestamp_present = false;
     private bool clusterId_present = false;
 
-    /// <summary>
-    /// MIME content type
-    /// </summary>
     public override string ContentType {
       get {
         return m_contentType;
@@ -3366,9 +1517,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_contentType = value;
       }
     }
-    /// <summary>
-    /// MIME content encoding
-    /// </summary>
     public override string ContentEncoding {
       get {
         return m_contentEncoding;
@@ -3378,9 +1526,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_contentEncoding = value;
       }
     }
-    /// <summary>
-    /// message header field table
-    /// </summary>
     public override System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -3390,9 +1535,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_headers = value;
       }
     }
-    /// <summary>
-    /// message priority, 0 to 9
-    /// </summary>
     public override byte Priority {
       get {
         return m_priority;
@@ -3402,9 +1544,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_priority = value;
       }
     }
-    /// <summary>
-    /// destination to reply to
-    /// </summary>
     public override string ReplyTo {
       get {
         return m_replyTo;
@@ -3414,9 +1553,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_replyTo = value;
       }
     }
-    /// <summary>
-    /// application message identifier
-    /// </summary>
     public override string MessageId {
       get {
         return m_messageId;
@@ -3426,9 +1562,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_messageId = value;
       }
     }
-    /// <summary>
-    /// message filename
-    /// </summary>
     public override string Filename {
       get {
         return m_filename;
@@ -3438,9 +1571,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_filename = value;
       }
     }
-    /// <summary>
-    /// message timestamp
-    /// </summary>
     public override AmqpTimestamp Timestamp {
       get {
         return m_timestamp;
@@ -3450,9 +1580,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_timestamp = value;
       }
     }
-    /// <summary>
-    /// intra-cluster routing identifier
-    /// </summary>
     public override string ClusterId {
       get {
         return m_clusterId;
@@ -3536,15 +1663,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "stream"</summary>
-  /// <remarks>
-  /// 
-  ///       The stream class provides methods that support multimedia streaming. The stream class
-  ///       uses the following semantics: one message is one packet of data; delivery is
-  ///       unacknowledged and unreliable; the consumer can specify quality of service parameters
-  ///       that the server can try to adhere to; lower-priority messages may be discarded in favour
-  ///       of high priority messages.
-  ///     
-  /// </remarks>
   public class StreamProperties: RabbitMQ.Client.Impl.StreamProperties {
     private string m_contentType;
     private string m_contentEncoding;
@@ -3558,9 +1676,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
     private bool priority_present = false;
     private bool timestamp_present = false;
 
-    /// <summary>
-    /// MIME content type
-    /// </summary>
     public override string ContentType {
       get {
         return m_contentType;
@@ -3570,9 +1685,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_contentType = value;
       }
     }
-    /// <summary>
-    /// MIME content encoding
-    /// </summary>
     public override string ContentEncoding {
       get {
         return m_contentEncoding;
@@ -3582,9 +1694,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_contentEncoding = value;
       }
     }
-    /// <summary>
-    /// message header field table
-    /// </summary>
     public override System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -3594,9 +1703,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_headers = value;
       }
     }
-    /// <summary>
-    /// message priority, 0 to 9
-    /// </summary>
     public override byte Priority {
       get {
         return m_priority;
@@ -3606,9 +1712,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_priority = value;
       }
     }
-    /// <summary>
-    /// message timestamp
-    /// </summary>
     public override AmqpTimestamp Timestamp {
       get {
         return m_timestamp;
@@ -3668,12 +1771,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "tunnel"</summary>
-  /// <remarks>
-  /// 
-  ///       The tunnel methods are used to send blocks of binary data - which can be serialised AMQP
-  ///       methods or other protocol frames - between AMQP peers.
-  ///     
-  /// </remarks>
   public class TunnelProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
     private System.Collections.IDictionary m_headers;
     private string m_proxyName;
@@ -3687,9 +1784,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
     private bool durable_present = false;
     private bool broadcast_present = false;
 
-    /// <summary>
-    /// message header field table
-    /// </summary>
     public System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -3699,9 +1793,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_headers = value;
       }
     }
-    /// <summary>
-    /// identity of tunnelling proxy
-    /// </summary>
     public string ProxyName {
       get {
         return m_proxyName;
@@ -3711,9 +1802,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_proxyName = value;
       }
     }
-    /// <summary>
-    /// name or type of message being tunnelled
-    /// </summary>
     public string DataName {
       get {
         return m_dataName;
@@ -3723,9 +1811,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_dataName = value;
       }
     }
-    /// <summary>
-    /// message durability indicator
-    /// </summary>
     public byte Durable {
       get {
         return m_durable;
@@ -3735,9 +1820,6 @@ namespace RabbitMQ.Client.Framing.v0_9 {
         m_durable = value;
       }
     }
-    /// <summary>
-    /// message broadcast mode
-    /// </summary>
     public byte Broadcast {
       get {
         return m_broadcast;
index 75302f3eac3425387050efa1658ccd164962ada8..2865b1d58177c13de6029a1c03741739639ffe63 100644 (file)
@@ -625,2278 +625,496 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
     public const int InternalError = 541;
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.start".</summary>
-  /// <remarks>
-  /// 
-  ///     This method starts the connection negotiation process by telling
-  ///     the client the protocol version that the server proposes, along
-  ///     with a list of security mechanisms which the client can use for
-  ///     authentication.
-  ///   
-  /// </remarks>
   public interface IConnectionStart: IMethod {
-    /// <summary>
-    /// 
-    ///       The protocol major version that the server agrees to use, which
-    ///       cannot be higher than the client's major version.
-    ///     
-    /// </summary>
     byte VersionMajor { get; }
-    /// <summary>
-    /// 
-    ///       The protocol minor version that the server agrees to use, which
-    ///       cannot be higher than the client's minor version.
-    ///     
-    /// </summary>
     byte VersionMinor { get; }
-    // (no documentation)
     System.Collections.IDictionary ServerProperties { get; }
-    /// <summary>
-    /// 
-    ///       A list of the security mechanisms that the server supports, delimited
-    ///       by spaces.  Currently ASL supports these mechanisms: PLAIN.
-    ///     
-    /// </summary>
     byte[] Mechanisms { get; }
-    /// <summary>
-    /// 
-    ///       A list of the message locales that the server supports, delimited
-    ///       by spaces.  The locale defines the language in which the server
-    ///       will send reply texts.
-    ///     
-    /// </summary>
     byte[] Locales { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.start-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method selects a SASL security mechanism. ASL uses SASL
-  ///     (RFC2222) to negotiate authentication and encryption.
-  ///   
-  /// </remarks>
   public interface IConnectionStartOk: IMethod {
-    // (no documentation)
     System.Collections.IDictionary ClientProperties { get; }
-    /// <summary>
-    /// 
-    ///       A single security mechanisms selected by the client, which must be
-    ///       one of those specified by the server.
-    ///     
-    /// </summary>
     string Mechanism { get; }
-    /// <summary>
-    /// 
-    ///       A block of opaque data passed to the security mechanism. The contents
-    ///       of this data are defined by the SASL security mechanism.  For the
-    ///       PLAIN security mechanism this is defined as a field table holding
-    ///       two fields, LOGIN and PASSWORD.
-    ///     
-    /// </summary>
     byte[] Response { get; }
-    /// <summary>
-    /// 
-    ///       A single message local selected by the client, which must be one
-    ///       of those specified by the server.
-    ///     
-    /// </summary>
     string Locale { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.secure".</summary>
-  /// <remarks>
-  /// 
-  ///     The SASL protocol works by exchanging challenges and responses until
-  ///     both peers have received sufficient information to authenticate each
-  ///     other.  This method challenges the client to provide more information.
-  ///   
-  /// </remarks>
   public interface IConnectionSecure: IMethod {
-    /// <summary>
-    /// 
-    ///       Challenge information, a block of opaque binary data passed to
-    ///       the security mechanism.
-    ///     
-    /// </summary>
     byte[] Challenge { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.secure-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method attempts to authenticate, passing a block of SASL data
-  ///     for the security mechanism at the server side.
-  ///   
-  /// </remarks>
   public interface IConnectionSecureOk: IMethod {
-    /// <summary>
-    /// 
-    ///       A block of opaque data passed to the security mechanism.  The contents
-    ///       of this data are defined by the SASL security mechanism.
-    ///     
-    /// </summary>
     byte[] Response { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.tune".</summary>
-  /// <remarks>
-  /// 
-  ///     This method proposes a set of connection configuration values
-  ///     to the client.  The client can accept and/or adjust these.
-  ///   
-  /// </remarks>
   public interface IConnectionTune: IMethod {
-    /// <summary>
-    /// 
-    ///       The maximum total number of channels that the server allows
-    ///       per connection. Zero means that the server does not impose a
-    ///       fixed limit, but the number of allowed channels may be limited
-    ///       by available server resources.
-    ///     
-    /// </summary>
     ushort ChannelMax { get; }
-    /// <summary>
-    /// 
-    ///       The largest frame size that the server proposes for the
-    ///       connection. The client can negotiate a lower value.  Zero means
-    ///       that the server does not impose any specific limit but may reject
-    ///       very large frames if it cannot allocate resources for them.
-    ///     
-    /// </summary>
     uint FrameMax { get; }
-    /// <summary>
-    /// 
-    ///       The delay, in seconds, of the connection heartbeat that the server
-    ///       wants.  Zero means the server does not want a heartbeat.
-    ///     
-    /// </summary>
     ushort Heartbeat { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.tune-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method sends the client's connection tuning parameters to the
-  ///     server. Certain fields are negotiated, others provide capability
-  ///     information.
-  ///   
-  /// </remarks>
   public interface IConnectionTuneOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The maximum total number of channels that the client will use
-    ///       per connection.  May not be higher than the value specified by
-    ///       the server.
-    ///     
-    /// </summary>
     ushort ChannelMax { get; }
-    /// <summary>
-    /// 
-    ///       The largest frame size that the client and server will use for
-    ///       the connection.  Zero means that the client does not impose any
-    ///       specific limit but may reject very large frames if it cannot
-    ///       allocate resources for them.  Note that the frame-max limit
-    ///       applies principally to content frames, where large contents
-    ///       can be broken into frames of arbitrary size.
-    ///     
-    /// </summary>
     uint FrameMax { get; }
-    /// <summary>
-    /// 
-    ///       The delay, in seconds, of the connection heartbeat that the client
-    ///       wants. Zero means the client does not want a heartbeat.
-    ///     
-    /// </summary>
     ushort Heartbeat { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.open".</summary>
-  /// <remarks>
-  /// 
-  ///     This method opens a connection to a virtual host, which is a
-  ///     collection of resources, and acts to separate multiple application
-  ///     domains within a server.
-  ///   
-  /// </remarks>
   public interface IConnectionOpen: IMethod {
-    /// <summary>
-    /// 
-    ///       The name of the virtual host to work with.
-    ///     
-    /// </summary>
     string VirtualHost { get; }
-    /// <summary>
-    /// 
-    ///       The client may specify a number of capability names, delimited by
-    ///       spaces.  The server can use this string to how to process the
-    ///       client's connection request.
-    ///     
-    /// </summary>
     string Capabilities { get; }
-    /// <summary>
-    /// 
-    ///       In a configuration with multiple load-sharing servers, the server
-    ///       may respond to a Connection.Open method with a Connection.Redirect.
-    ///       The insist option tells the server that the client is insisting on
-    ///       a connection to the specified server.
-    ///     
-    /// </summary>
     bool Insist { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.open-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method signals to the client that the connection is ready for
-  ///     use.
-  ///   
-  /// </remarks>
   public interface IConnectionOpenOk: IMethod {
-    // (no documentation)
     string KnownHosts { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.redirect".</summary>
-  /// <remarks>
-  /// 
-  ///     This method redirects the client to another server, based on the
-  ///     requested virtual host and/or capabilities.
-  ///   
-  /// </remarks>
   public interface IConnectionRedirect: IMethod {
-    /// <summary>
-    /// 
-    ///       Specifies the server to connect to.  This is an IP address or a
-    ///       DNS name, optionally followed by a colon and a port number. If
-    ///       no port number is specified, the client should use the default
-    ///       port number for the protocol.
-    ///     
-    /// </summary>
     string Host { get; }
-    // (no documentation)
     string KnownHosts { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.close".</summary>
-  /// <remarks>
-  /// 
-  ///     This method indicates that the sender wants to close the connection.
-  ///     This may be due to internal conditions (e.g. a forced shut-down) or
-  ///     due to an error handling a specific method, i.e. an exception.  When
-  ///     a close is due to an exception, the sender provides the class and
-  ///     method id of the method which caused the exception.
-  ///   
-  /// </remarks>
   public interface IConnectionClose: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       When the close is provoked by a method exception, this is the
-    ///       class of the method.
-    ///     
-    /// </summary>
     ushort ClassId { get; }
-    /// <summary>
-    /// 
-    ///       When the close is provoked by a method exception, this is the
-    ///       ID of the method.
-    ///     
-    /// </summary>
     ushort MethodId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "connection.close-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms a Connection.Close method and tells the
-  ///     recipient that it is safe to release resources for the connection
-  ///     and close the socket.
-  ///   
-  /// </remarks>
   public interface IConnectionCloseOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.open".</summary>
-  /// <remarks>
-  /// 
-  ///     This method opens a virtual connection (a channel).
-  ///   
-  /// </remarks>
   public interface IChannelOpen: IMethod {
-    /// <summary>
-    /// 
-    ///       Configures out-of-band transfers on this channel.  The syntax and
-    ///       meaning of this field will be formally defined at a later date.
-    ///     
-    /// </summary>
     string OutOfBand { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.open-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method signals to the client that the channel is ready for use.
-  ///   
-  /// </remarks>
   public interface IChannelOpenOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.flow".</summary>
-  /// <remarks>
-  /// 
-  ///     This method asks the peer to pause or restart the flow of content
-  ///     data. This is a simple flow-control mechanism that a peer can use
-  ///     to avoid oveflowing its queues or otherwise finding itself receiving
-  ///     more messages than it can process.  Note that this method is not
-  ///     intended for window control.  The peer that receives a request to
-  ///     stop sending content should finish sending the current content, if
-  ///     any, and then wait until it receives a Flow restart method.
-  ///   
-  /// </remarks>
   public interface IChannelFlow: IMethod {
-    /// <summary>
-    /// 
-    ///       If 1, the peer starts sending content frames.  If 0, the peer
-    ///       stops sending content frames.
-    ///     
-    /// </summary>
     bool Active { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.flow-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     Confirms to the peer that a flow command was received and processed.
-  ///   
-  /// </remarks>
   public interface IChannelFlowOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Confirms the setting of the processed flow method: 1 means the
-    ///       peer will start sending or continue to send content frames; 0
-    ///       means it will not.
-    ///     
-    /// </summary>
     bool Active { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.alert".</summary>
-  /// <remarks>
-  /// 
-  ///     This method allows the server to send a non-fatal warning to the
-  ///     client.  This is used for methods that are normally asynchronous
-  ///     and thus do not have confirmations, and for which the server may
-  ///     detect errors that need to be reported.  Fatal errors are handled
-  ///     as channel or connection exceptions; non-fatal errors are sent
-  ///     through this method.
-  ///   
-  /// </remarks>
   public interface IChannelAlert: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       A set of fields that provide more information about the
-    ///       problem.  The meaning of these fields are defined on a
-    ///       per-reply-code basis (TO BE DEFINED).
-    ///     
-    /// </summary>
     System.Collections.IDictionary Details { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.close".</summary>
-  /// <remarks>
-  /// 
-  ///     This method indicates that the sender wants to close the channel.
-  ///     This may be due to internal conditions (e.g. a forced shut-down) or
-  ///     due to an error handling a specific method, i.e. an exception.  When
-  ///     a close is due to an exception, the sender provides the class and
-  ///     method id of the method which caused the exception.
-  ///   
-  /// </remarks>
   public interface IChannelClose: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       When the close is provoked by a method exception, this is the
-    ///       class of the method.
-    ///     
-    /// </summary>
     ushort ClassId { get; }
-    /// <summary>
-    /// 
-    ///       When the close is provoked by a method exception, this is the
-    ///       ID of the method.
-    ///     
-    /// </summary>
     ushort MethodId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "channel.close-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms a Channel.Close method and tells the recipient
-  ///     that it is safe to release resources for the channel and close the
-  ///     socket.
-  ///   
-  /// </remarks>
   public interface IChannelCloseOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "access.request".</summary>
-  /// <remarks>
-  /// 
-  ///     This method requests an access ticket for an access realm.
-  ///     The server responds by granting the access ticket.  If the
-  ///     client does not have access rights to the requested realm
-  ///     this causes a connection exception.  Access tickets are a
-  ///     per-channel resource.
-  ///   
-  /// </remarks>
   public interface IAccessRequest: IMethod {
-    // (no documentation)
     string Realm { get; }
-    /// <summary>
-    /// 
-    ///       Request exclusive access to the realm. If the server cannot grant
-    ///       this - because there are other active tickets for the realm - it
-    ///       raises a channel exception.
-    ///     
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///       Request message passive access to the specified access realm.
-    ///       Passive access lets a client get information about resources in
-    ///       the realm but not to make any changes to them.
-    ///     
-    /// </summary>
     bool Passive { get; }
-    /// <summary>
-    /// 
-    ///       Request message active access to the specified access realm.
-    ///       Acvtive access lets a client get create and delete resources in
-    ///       the realm.
-    ///     
-    /// </summary>
     bool Active { get; }
-    /// <summary>
-    /// 
-    ///       Request write access to the specified access realm.  Write access
-    ///       lets a client publish messages to all exchanges in the realm.
-    ///     
-    /// </summary>
     bool Write { get; }
-    /// <summary>
-    /// 
-    ///       Request read access to the specified access realm.  Read access
-    ///       lets a client consume messages from queues in the realm.
-    ///     
-    /// </summary>
     bool Read { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "access.request-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method provides the client with an access ticket. The access
-  ///     ticket is valid within the current channel and for the lifespan of
-  ///     the channel.
-  ///   
-  /// </remarks>
   public interface IAccessRequestOk: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.declare".</summary>
-  /// <remarks>
-  /// 
-  ///     This method creates an exchange if it does not already exist, and if the
-  ///     exchange exists, verifies that it is of the correct and expected class.
-  ///   
-  /// </remarks>
   public interface IExchangeDeclare: IMethod {
-    /// <summary>
-    /// 
-    ///       When a client defines a new exchange, this belongs to the access realm
-    ///       of the ticket used.  All further work done with that exchange must be
-    ///       done with an access ticket for the same realm.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    // (no documentation)
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Each exchange belongs to one of a set of exchange types implemented
-    ///       by the server.  The exchange types define the functionality of the
-    ///       exchange - i.e. how messages are routed through it.  It is not valid
-    ///       or meaningful to attempt to change the type of an existing exchange.
-    ///     
-    /// </summary>
     string Type { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not create the exchange.  The client can use
-    ///     this to check whether an exchange exists without modifying the server
-    ///     state.
-    ///     
-    /// </summary>
     bool Passive { get; }
-    /// <summary>
-    /// 
-    ///       If set when creating a new exchange, the exchange will be marked as
-    ///       durable.  Durable exchanges remain active when a server restarts.
-    ///       Non-durable exchanges (transient exchanges) are purged if/when a
-    ///       server restarts.
-    ///     
-    /// </summary>
     bool Durable { get; }
-    /// <summary>
-    /// 
-    ///       If set, the exchange is deleted when all queues have finished
-    ///       using it.
-    ///     
-    /// </summary>
     bool AutoDelete { get; }
-    /// <summary>
-    /// 
-    ///       If set, the exchange may not be used directly by publishers, but
-    ///       only when bound to other exchanges. Internal exchanges are used to
-    ///       construct wiring that is not visible to applications.
-    ///     
-    /// </summary>
     bool Internal { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///       A set of arguments for the declaration. The syntax and semantics
-    ///       of these arguments depends on the server implementation.  This
-    ///       field is ignored if passive is 1.
-    ///     
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.declare-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms a Declare method and confirms the name of the
-  ///     exchange, essential for automatically-named exchanges.
-  ///   
-  /// </remarks>
   public interface IExchangeDeclareOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.delete".</summary>
-  /// <remarks>
-  /// 
-  ///     This method deletes an exchange.  When an exchange is deleted all queue
-  ///     bindings on the exchange are cancelled.
-  ///   
-  /// </remarks>
   public interface IExchangeDelete: IMethod {
-    // (no documentation)
     ushort Ticket { get; }
-    // (no documentation)
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       If set, the server will only delete the exchange if it has no queue
-    ///       bindings. If the exchange has queue bindings the server does not
-    ///       delete it but raises a channel exception instead.
-    ///     
-    /// </summary>
     bool IfUnused { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.delete-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms the deletion of an exchange.
-  ///   
-  /// </remarks>
   public interface IExchangeDeleteOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.bound".</summary>
-  // (no documentation)
   public interface IExchangeBound: IMethod {
-    // (no documentation)
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///               Specifies the routing key for the message.  The routing key is
-    ///               used for routing messages depending on the exchange configuration.
-    ///             
-    /// </summary>
     string RoutingKey { get; }
-    // (no documentation)
     string Queue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "exchange.bound-ok".</summary>
-  // (no documentation)
   public interface IExchangeBoundOk: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.declare".</summary>
-  /// <remarks>
-  /// 
-  ///     This method creates or checks a queue.  When creating a new queue
-  ///     the client can specify various properties that control the durability
-  ///     of the queue and its contents, and the level of sharing for the queue.
-  ///   
-  /// </remarks>
   public interface IQueueDeclare: IMethod {
-    /// <summary>
-    /// 
-    ///       When a client defines a new queue, this belongs to the access realm
-    ///       of the ticket used.  All further work done with that queue must be
-    ///       done with an access ticket for the same realm.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    // (no documentation)
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not create the queue.  The client can use
-    ///     this to check whether a queue exists without modifying the server
-    ///     state.
-    ///     
-    /// </summary>
     bool Passive { get; }
-    /// <summary>
-    /// 
-    ///       If set when creating a new queue, the queue will be marked as
-    ///       durable.  Durable queues remain active when a server restarts.
-    ///       Non-durable queues (transient queues) are purged if/when a
-    ///       server restarts.  Note that durable queues do not necessarily
-    ///       hold persistent messages, although it does not make sense to
-    ///       send persistent messages to a transient queue.
-    ///     
-    /// </summary>
     bool Durable { get; }
-    /// <summary>
-    /// 
-    ///       Exclusive queues may only be consumed from by the current connection.
-    ///       Setting the 'exclusive' flag always implies 'auto-delete'.
-    ///     
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///       If set, the queue is deleted when all consumers have finished
-    ///       using it. Last consumer can be cancelled either explicitly or because
-    ///       its channel is closed. If there was no consumer ever on the queue, it
-    ///       won't be deleted.
-    ///     
-    /// </summary>
     bool AutoDelete { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///       A set of arguments for the declaration. The syntax and semantics
-    ///       of these arguments depends on the server implementation.  This
-    ///       field is ignored if passive is 1.
-    ///     
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.declare-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms a Declare method and confirms the name of the
-  ///     queue, essential for automatically-named queues.
-  ///   
-  /// </remarks>
   public interface IQueueDeclareOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Reports the name of the queue. If the server generated a queue
-    ///       name, this field contains that name.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///       Reports the number of messages in the queue, which will be zero
-    ///       for newly-created queues.
-    ///     
-    /// </summary>
     uint MessageCount { get; }
-    /// <summary>
-    /// 
-    ///       Reports the number of active consumers for the queue. Note that
-    ///       consumers can suspend activity (Channel.Flow) in which case they
-    ///       do not appear in this count.
-    ///     
-    /// </summary>
     uint ConsumerCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.bind".</summary>
-  /// <remarks>
-  /// 
-  ///     This method binds a queue to an exchange.  Until a queue is
-  ///     bound it will not receive any messages.  In a classic messaging
-  ///     model, store-and-forward queues are bound to a dest exchange
-  ///     and subscription queues are bound to a dest_wild exchange.
-  ///   
-  /// </remarks>
   public interface IQueueBind: IMethod {
-    /// <summary>
-    /// 
-    ///       The client provides a valid access ticket giving "active"
-    ///       access rights to the queue's access realm.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to bind.  If the queue name is
-    ///       empty, refers to the current queue for the channel, which is
-    ///       the last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    // (no documentation)
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key for the binding.  The routing key is
-    ///       used for routing messages depending on the exchange configuration.
-    ///       Not all exchanges use a routing key - refer to the specific
-    ///       exchange documentation.  If the routing key is empty and the queue
-    ///       name is empty, the routing key will be the current queue for the
-    ///       channel, which is the last declared queue.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///       A set of arguments for the binding.  The syntax and semantics of
-    ///       these arguments depends on the exchange class.
-    ///     
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.bind-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms that the bind was successful.
-  ///   
-  /// </remarks>
   public interface IQueueBindOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.purge".</summary>
-  /// <remarks>
-  /// 
-  ///     This method removes all messages from a queue.  It does not cancel
-  ///     consumers.  Purged messages are deleted without any formal "undo"
-  ///     mechanism.
-  ///   
-  /// </remarks>
   public interface IQueuePurge: IMethod {
-    /// <summary>
-    /// 
-    ///       The access ticket must be for the access realm that holds the
-    ///       queue.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to purge.  If the queue name is
-    ///       empty, refers to the current queue for the channel, which is
-    ///       the last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.purge-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms the purge of a queue.
-  ///   
-  /// </remarks>
   public interface IQueuePurgeOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Reports the number of messages purged.
-    ///     
-    /// </summary>
     uint MessageCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.delete".</summary>
-  /// <remarks>
-  /// 
-  ///     This method deletes a queue.  When a queue is deleted any pending
-  ///     messages are sent to a dead-letter queue if this is defined in the
-  ///     server configuration, and all consumers on the queue are cancelled.
-  ///   
-  /// </remarks>
   public interface IQueueDelete: IMethod {
-    /// <summary>
-    /// 
-    ///       The client provides a valid access ticket giving "active"
-    ///       access rights to the queue's access realm.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to delete. If the queue name is
-    ///       empty, refers to the current queue for the channel, which is the
-    ///       last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///       If set, the server will only delete the queue if it has no
-    ///       consumers. If the queue has consumers the server does does not
-    ///       delete it but raises a channel exception instead.
-    ///     
-    /// </summary>
     bool IfUnused { get; }
-    /// <summary>
-    /// 
-    ///       If set, the server will only delete the queue if it has no
-    ///       messages. If the queue is not empty the server raises a channel
-    ///       exception.
-    ///     
-    /// </summary>
     bool IfEmpty { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "queue.delete-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms the deletion of a queue.
-  ///   
-  /// </remarks>
   public interface IQueueDeleteOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Reports the number of messages purged.
-    ///     
-    /// </summary>
     uint MessageCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.qos".</summary>
-  /// <remarks>
-  /// 
-  ///     This method requests a specific quality of service.  The QoS can
-  ///     be specified for the current channel or for all channels on the
-  ///     connection.  The particular properties and semantics of a qos method
-  ///     always depend on the content class semantics.  Though the qos method
-  ///     could in principle apply to both peers, it is currently meaningful
-  ///     only for the server.
-  ///   
-  /// </remarks>
   public interface IBasicQos: IMethod {
-    /// <summary>
-    /// 
-    ///       The client can request that messages be sent in advance so that
-    ///       when the client finishes processing a message, the following
-    ///       message is already held locally, rather than needing to be sent
-    ///       down the channel.  Prefetching gives a performance improvement.
-    ///       This field specifies the prefetch window size in octets.  The
-    ///       server will send a message in advance if it is equal to or
-    ///       smaller in size than the available prefetch size (and also falls
-    ///       into other prefetch limits). May be set to zero, meaning "no
-    ///       specific limit", although other prefetch limits may still apply.
-    ///       The prefetch-size is ignored if the no-ack option is set.
-    ///     
-    /// </summary>
     uint PrefetchSize { get; }
-    /// <summary>
-    /// 
-    ///       Specifies a prefetch window in terms of whole messages.  This
-    ///       field may be used in combination with the prefetch-size field;
-    ///       a message will only be sent in advance if both prefetch windows
-    ///       (and those at the channel and connection level) allow it.
-    ///       The prefetch-count is ignored if the no-ack option is set.
-    ///     
-    /// </summary>
     ushort PrefetchCount { get; }
-    /// <summary>
-    /// 
-    ///       By default the QoS settings apply to the current channel only.  If
-    ///       this field is set, they are applied to the entire connection.
-    ///     
-    /// </summary>
     bool Global { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.qos-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tells the client that the requested QoS levels could
-  ///     be handled by the server.  The requested QoS applies to all active
-  ///     consumers until a new QoS is defined.
-  ///   
-  /// </remarks>
   public interface IBasicQosOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.consume".</summary>
-  /// <remarks>
-  /// 
-  ///     This method asks the server to start a "consumer", which is a
-  ///     transient request for messages from a specific queue. Consumers
-  ///     last as long as the channel they were created on, or until the
-  ///     client cancels them.
-  ///   
-  /// </remarks>
   public interface IBasicConsume: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "read" access
-    ///       rights to the realm for the queue.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to consume from.  If the queue name
-    ///       is null, refers to the current queue for the channel, which is the
-    ///       last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the identifier for the consumer. The consumer tag is
-    ///       local to a connection, so two clients can use the same consumer
-    ///       tags. If this field is empty the server will generate a unique
-    ///       tag.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
-    // (no documentation)
     bool NoLocal { get; }
-    // (no documentation)
     bool NoAck { get; }
-    /// <summary>
-    /// 
-    ///       Request exclusive consumer access, meaning only this consumer can
-    ///       access the queue.
-    ///     
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
-    /// <summary>
-    /// 
-    ///     A set of arguments for the consume. The syntax and semantics
-    ///     of these arguments depends on the server implementation.  This
-    ///     field is ignored if passive is 1.
-    ///   
-    /// </summary>
     System.Collections.IDictionary Arguments { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.consume-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     The server provides the client with a consumer tag, which is used
-  ///     by the client for methods called on the consumer at a later stage.
-  ///   
-  /// </remarks>
   public interface IBasicConsumeOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Holds the consumer tag specified by the client or provided by
-    ///       the server.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.cancel".</summary>
-  /// <remarks>
-  /// 
-  ///     This method cancels a consumer. This does not affect already
-  ///     delivered messages, but it does mean the server will not send any
-  ///     more messages for that consumer.  The client may receive an
-  ///     abitrary number of messages in between sending the cancel method
-  ///     and receiving the cancel-ok reply.
-  ///   
-  /// </remarks>
   public interface IBasicCancel: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.cancel-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms that the cancellation was completed.
-  ///   
-  /// </remarks>
   public interface IBasicCancelOk: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.publish".</summary>
-  /// <remarks>
-  /// 
-  ///     This method publishes a message to a specific exchange. The message
-  ///     will be routed to queues as defined by the exchange configuration
-  ///     and distributed to any active consumers when the transaction, if any,
-  ///     is committed.
-  ///   
-  /// </remarks>
   public interface IBasicPublish: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "write"
-    ///       access rights to the access realm for the exchange.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange to publish to.  The exchange
-    ///       name can be empty, meaning the default exchange.  If the exchange
-    ///       name is specified, and that exchange does not exist, the server
-    ///       will raise a channel exception.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key for the message.  The routing key is
-    ///       used for routing messages depending on the exchange configuration.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue.  If this flag is set, the server will return an
-    ///       unroutable message with a Return method.  If this flag is zero, the
-    ///       server silently drops the message.
-    ///     
-    /// </summary>
     bool Mandatory { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue consumer immediately.  If this flag is set, the
-    ///       server will return an undeliverable message with a Return method.
-    ///       If this flag is zero, the server will queue the message, but with
-    ///       no guarantee that it will ever be consumed.
-    ///     
-    /// </summary>
     bool Immediate { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.return".</summary>
-  /// <remarks>
-  /// 
-  ///     This method returns an undeliverable message that was published
-  ///     with the "immediate" flag set, or an unroutable message published
-  ///     with the "mandatory" flag set. The reply code and text provide
-  ///     information about the reason that the message was undeliverable.
-  ///   
-  /// </remarks>
   public interface IBasicReturn: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was
-    ///       originally published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.deliver".</summary>
-  /// <remarks>
-  /// 
-  ///     This method delivers a message to the client, via a consumer.  In
-  ///     the asynchronous message delivery model, the client starts a
-  ///     consumer using the Consume method, then the server responds with
-  ///     Deliver methods as and when messages arrive for that consumer.
-  ///   
-  /// </remarks>
   public interface IBasicDeliver: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    // (no documentation)
     ulong DeliveryTag { get; }
-    // (no documentation)
     bool Redelivered { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was
-    ///       originally published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.get".</summary>
-  /// <remarks>
-  /// 
-  ///     This method provides a direct access to the messages in a queue
-  ///     using a synchronous dialogue that is designed for specific types of
-  ///     application where synchronous functionality is more important than
-  ///     performance.
-  ///   
-  /// </remarks>
   public interface IBasicGet: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "read"
-    ///       access rights to the realm for the queue.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to consume from.  If the queue name
-    ///       is null, refers to the current queue for the channel, which is the
-    ///       last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    // (no documentation)
     bool NoAck { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.get-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method delivers a message to the client following a get
-  ///     method.  A message delivered by 'get-ok' must be acknowledged
-  ///     unless the no-ack option was set in the get method.
-  ///   
-  /// </remarks>
   public interface IBasicGetOk: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    // (no documentation)
     bool Redelivered { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was originally
-    ///       published to.  If empty, the message was published to the default
-    ///       exchange.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///       This field reports the number of messages pending on the queue,
-    ///       excluding the message being delivered.  Note that this figure is
-    ///       indicative, not reliable, and can change arbitrarily as messages
-    ///       are added to the queue and removed by other clients.
-    ///     
-    /// </summary>
     uint MessageCount { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.get-empty".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tells the client that the queue has no messages
-  ///     available for the client.
-  ///   
-  /// </remarks>
   public interface IBasicGetEmpty: IMethod {
-    /// <summary>
-    /// 
-    ///       For use by cluster applications, should not be used by
-    ///       client applications.
-    ///     
-    /// </summary>
     string ClusterId { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.ack".</summary>
-  /// <remarks>
-  /// 
-  ///     This method acknowledges one or more messages delivered via the
-  ///     Deliver or Get-Ok methods.  The client can ask to confirm a
-  ///     single message or a set of messages up to and including a specific
-  ///     message.
-  ///   
-  /// </remarks>
   public interface IBasicAck: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///       If set to 1, the delivery tag is treated as "up to and including",
-    ///       so that the client can acknowledge multiple messages with a single
-    ///       method.  If set to zero, the delivery tag refers to a single
-    ///       message.  If the multiple field is 1, and the delivery tag is zero,
-    ///       tells the server to acknowledge all outstanding mesages.
-    ///     
-    /// </summary>
     bool Multiple { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.reject".</summary>
-  /// <remarks>
-  /// 
-  ///     This method allows a client to reject a message.  It can be used to
-  ///     interrupt and cancel large incoming messages, or return untreatable
-  ///     messages to their original queue.
-  ///   
-  /// </remarks>
   public interface IBasicReject: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///       If this field is zero, the message will be discarded.  If this bit
-    ///       is 1, the server will attempt to requeue the message.
-    ///     
-    /// </summary>
     bool Requeue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.recover".</summary>
-  /// <remarks>
-  /// 
-  ///     This method asks the broker to redeliver all unacknowledged messages on a
-  ///     specified channel. Zero or more messages may be redelivered.  This method
-  ///     is only allowed on non-transacted channels.
-  ///   
-  /// </remarks>
   public interface IBasicRecover: IMethod {
-    /// <summary>
-    /// 
-    ///       If this field is zero, the message will be redelivered to the original
-    ///       recipient.  If this bit is 1, the server will attempt to requeue the
-    ///       message, potentially then delivering it to an alternative subscriber.
-    ///     
-    /// </summary>
     bool Requeue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "basic.recover-ok".</summary>
-  /// <remarks>
-  /// 
-  ///    This method confirms to the client that the recover succeeded.
-  ///            Note that if an recover fails, the server raises a channel exception.
-  ///     
-  /// </remarks>
   public interface IBasicRecoverOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "file.qos".</summary>
-  /// <remarks>
-  /// 
-  ///     This method requests a specific quality of service.  The QoS can
-  ///     be specified for the current channel or for all channels on the
-  ///     connection.  The particular properties and semantics of a qos method
-  ///     always depend on the content class semantics.  Though the qos method
-  ///     could in principle apply to both peers, it is currently meaningful
-  ///     only for the server.
-  ///   
-  /// </remarks>
   public interface IFileQos: IMethod {
-    /// <summary>
-    /// 
-    ///       The client can request that messages be sent in advance so that
-    ///       when the client finishes processing a message, the following
-    ///       message is already held locally, rather than needing to be sent
-    ///       down the channel.  Prefetching gives a performance improvement.
-    ///       This field specifies the prefetch window size in octets. May be
-    ///       set to zero, meaning "no specific limit".  Note that other
-    ///       prefetch limits may still apply. The prefetch-size is ignored
-    ///       if the no-ack option is set.
-    ///     
-    /// </summary>
     uint PrefetchSize { get; }
-    /// <summary>
-    /// 
-    ///       Specifies a prefetch window in terms of whole messages.  This
-    ///       is compatible with some file API implementations.  This field
-    ///       may be used in combination with the prefetch-size field; a
-    ///       message will only be sent in advance if both prefetch windows
-    ///       (and those at the channel and connection level) allow it.
-    ///       The prefetch-count is ignored if the no-ack option is set.
-    ///     
-    /// </summary>
     ushort PrefetchCount { get; }
-    /// <summary>
-    /// 
-    ///       By default the QoS settings apply to the current channel only.  If
-    ///       this field is set, they are applied to the entire connection.
-    ///     
-    /// </summary>
     bool Global { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.qos-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tells the client that the requested QoS levels could
-  ///     be handled by the server.  The requested QoS applies to all active
-  ///     consumers until a new QoS is defined.
-  ///   
-  /// </remarks>
   public interface IFileQosOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "file.consume".</summary>
-  /// <remarks>
-  /// 
-  ///     This method asks the server to start a "consumer", which is a
-  ///     transient request for messages from a specific queue. Consumers
-  ///     last as long as the channel they were created on, or until the
-  ///     client cancels them.
-  ///   
-  /// </remarks>
   public interface IFileConsume: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "read" access
-    ///       rights to the realm for the queue.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to consume from.  If the queue name
-    ///       is null, refers to the current queue for the channel, which is the
-    ///       last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the identifier for the consumer. The consumer tag is
-    ///       local to a connection, so two clients can use the same consumer
-    ///       tags. If this field is empty the server will generate a unique
-    ///       tag.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
-    // (no documentation)
     bool NoLocal { get; }
-    // (no documentation)
     bool NoAck { get; }
-    /// <summary>
-    /// 
-    ///       Request exclusive consumer access, meaning only this consumer can
-    ///       access the queue.
-    ///     
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.consume-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method provides the client with a consumer tag which it MUST
-  ///     use in methods that work with the consumer.
-  ///   
-  /// </remarks>
   public interface IFileConsumeOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Holds the consumer tag specified by the client or provided by
-    ///       the server.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.cancel".</summary>
-  /// <remarks>
-  /// 
-  ///     This method cancels a consumer. This does not affect already
-  ///     delivered messages, but it does mean the server will not send any
-  ///     more messages for that consumer.
-  ///   
-  /// </remarks>
   public interface IFileCancel: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.cancel-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms that the cancellation was completed.
-  ///   
-  /// </remarks>
   public interface IFileCancelOk: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.open".</summary>
-  /// <remarks>
-  /// 
-  ///     This method requests permission to start staging a message.  Staging
-  ///     means sending the message into a temporary area at the recipient end
-  ///     and then delivering the message by referring to this temporary area.
-  ///     Staging is how the protocol handles partial file transfers - if a
-  ///     message is partially staged and the connection breaks, the next time
-  ///     the sender starts to stage it, it can restart from where it left off.
-  ///   
-  /// </remarks>
   public interface IFileOpen: IMethod {
-    /// <summary>
-    /// 
-    ///       This is the staging identifier. This is an arbitrary string chosen
-    ///       by the sender.  For staging to work correctly the sender must use
-    ///       the same staging identifier when staging the same message a second
-    ///       time after recovery from a failure.  A good choice for the staging
-    ///       identifier would be the SHA1 hash of the message properties data
-    ///       (including the original filename, revised time, etc.).
-    ///     
-    /// </summary>
     string Identifier { get; }
-    /// <summary>
-    /// 
-    ///       The size of the content in octets.  The recipient may use this
-    ///       information to allocate or check available space in advance, to
-    ///       avoid "disk full" errors during staging of very large messages.
-    ///     
-    /// </summary>
     ulong ContentSize { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.open-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms that the recipient is ready to accept staged
-  ///     data.  If the message was already partially-staged at a previous
-  ///     time the recipient will report the number of octets already staged.
-  ///   
-  /// </remarks>
   public interface IFileOpenOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The amount of previously-staged content in octets.  For a new
-    ///       message this will be zero.
-    ///     
-    /// </summary>
     ulong StagedSize { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.stage".</summary>
-  /// <remarks>
-  /// 
-  ///     This method stages the message, sending the message content to the
-  ///     recipient from the octet offset specified in the Open-Ok method.
-  ///   
-  /// </remarks>
   public interface IFileStage: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "file.publish".</summary>
-  /// <remarks>
-  /// 
-  ///     This method publishes a staged file message to a specific exchange.
-  ///     The file message will be routed to queues as defined by the exchange
-  ///     configuration and distributed to any active consumers when the
-  ///     transaction, if any, is committed.
-  ///   
-  /// </remarks>
   public interface IFilePublish: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "write"
-    ///       access rights to the access realm for the exchange.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange to publish to.  The exchange
-    ///       name can be empty, meaning the default exchange.  If the exchange
-    ///       name is specified, and that exchange does not exist, the server
-    ///       will raise a channel exception.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key for the message.  The routing key is
-    ///       used for routing messages depending on the exchange configuration.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue.  If this flag is set, the server will return an
-    ///       unroutable message with a Return method.  If this flag is zero, the
-    ///       server silently drops the message.
-    ///     
-    /// </summary>
     bool Mandatory { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue consumer immediately.  If this flag is set, the
-    ///       server will return an undeliverable message with a Return method.
-    ///       If this flag is zero, the server will queue the message, but with
-    ///       no guarantee that it will ever be consumed.
-    ///     
-    /// </summary>
     bool Immediate { get; }
-    /// <summary>
-    /// 
-    ///       This is the staging identifier of the message to publish.  The
-    ///       message must have been staged.  Note that a client can send the
-    ///       Publish method asynchronously without waiting for staging to
-    ///       finish.
-    ///     
-    /// </summary>
     string Identifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.return".</summary>
-  /// <remarks>
-  /// 
-  ///     This method returns an undeliverable message that was published
-  ///     with the "immediate" flag set, or an unroutable message published
-  ///     with the "mandatory" flag set. The reply code and text provide
-  ///     information about the reason that the message was undeliverable.
-  ///   
-  /// </remarks>
   public interface IFileReturn: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was
-    ///       originally published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.deliver".</summary>
-  /// <remarks>
-  /// 
-  ///     This method delivers a staged file message to the client, via a
-  ///     consumer. In the asynchronous message delivery model, the client
-  ///     starts a consumer using the Consume method, then the server
-  ///     responds with Deliver methods as and when messages arrive for
-  ///     that consumer.
-  ///   
-  /// </remarks>
   public interface IFileDeliver: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    // (no documentation)
     ulong DeliveryTag { get; }
-    // (no documentation)
     bool Redelivered { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was originally
-    ///       published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///       This is the staging identifier of the message to deliver.  The
-    ///       message must have been staged.  Note that a server can send the
-    ///       Deliver method asynchronously without waiting for staging to
-    ///       finish.
-    ///     
-    /// </summary>
     string Identifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.ack".</summary>
-  /// <remarks>
-  /// 
-  ///     This method acknowledges one or more messages delivered via the
-  ///     Deliver method.  The client can ask to confirm a single message or
-  ///     a set of messages up to and including a specific message.
-  ///   
-  /// </remarks>
   public interface IFileAck: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///       If set to 1, the delivery tag is treated as "up to and including",
-    ///       so that the client can acknowledge multiple messages with a single
-    ///       method.  If set to zero, the delivery tag refers to a single
-    ///       message.  If the multiple field is 1, and the delivery tag is zero,
-    ///       tells the server to acknowledge all outstanding mesages.
-    ///     
-    /// </summary>
     bool Multiple { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "file.reject".</summary>
-  /// <remarks>
-  /// 
-  ///     This method allows a client to reject a message.  It can be used to
-  ///     return untreatable messages to their original queue.  Note that file
-  ///     content is staged before delivery, so the client will not use this
-  ///     method to interrupt delivery of a large message.
-  ///   
-  /// </remarks>
   public interface IFileReject: IMethod {
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///       If this field is zero, the message will be discarded.  If this bit
-    ///       is 1, the server will attempt to requeue the message.
-    ///     
-    /// </summary>
     bool Requeue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.qos".</summary>
-  /// <remarks>
-  /// 
-  ///     This method requests a specific quality of service.  The QoS can
-  ///     be specified for the current channel or for all channels on the
-  ///     connection.  The particular properties and semantics of a qos method
-  ///     always depend on the content class semantics.  Though the qos method
-  ///     could in principle apply to both peers, it is currently meaningful
-  ///     only for the server.
-  ///   
-  /// </remarks>
   public interface IStreamQos: IMethod {
-    /// <summary>
-    /// 
-    ///       The client can request that messages be sent in advance so that
-    ///       when the client finishes processing a message, the following
-    ///       message is already held locally, rather than needing to be sent
-    ///       down the channel.  Prefetching gives a performance improvement.
-    ///       This field specifies the prefetch window size in octets. May be
-    ///       set to zero, meaning "no specific limit".  Note that other
-    ///       prefetch limits may still apply.
-    ///     
-    /// </summary>
     uint PrefetchSize { get; }
-    /// <summary>
-    /// 
-    ///       Specifies a prefetch window in terms of whole messages.  This
-    ///       field may be used in combination with the prefetch-size field;
-    ///       a message will only be sent in advance if both prefetch windows
-    ///       (and those at the channel and connection level) allow it.
-    ///     
-    /// </summary>
     ushort PrefetchCount { get; }
-    /// <summary>
-    /// 
-    ///       Specifies a desired transfer rate in octets per second. This is
-    ///       usually determined by the application that uses the streaming
-    ///       data.  A value of zero means "no limit", i.e. as rapidly as
-    ///       possible.
-    ///     
-    /// </summary>
     uint ConsumeRate { get; }
-    /// <summary>
-    /// 
-    ///       By default the QoS settings apply to the current channel only.  If
-    ///       this field is set, they are applied to the entire connection.
-    ///     
-    /// </summary>
     bool Global { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.qos-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tells the client that the requested QoS levels could
-  ///     be handled by the server.  The requested QoS applies to all active
-  ///     consumers until a new QoS is defined.
-  ///   
-  /// </remarks>
   public interface IStreamQosOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.consume".</summary>
-  /// <remarks>
-  /// 
-  ///     This method asks the server to start a "consumer", which is a
-  ///     transient request for messages from a specific queue. Consumers
-  ///     last as long as the channel they were created on, or until the
-  ///     client cancels them.
-  ///   
-  /// </remarks>
   public interface IStreamConsume: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "read" access
-    ///       rights to the realm for the queue.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue to consume from.  If the queue name
-    ///       is null, refers to the current queue for the channel, which is the
-    ///       last declared queue.
-    ///     
-    /// </summary>
     string Queue { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the identifier for the consumer. The consumer tag is
-    ///       local to a connection, so two clients can use the same consumer
-    ///       tags. If this field is empty the server will generate a unique
-    ///       tag.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
-    // (no documentation)
     bool NoLocal { get; }
-    /// <summary>
-    /// 
-    ///       Request exclusive consumer access, meaning only this consumer can
-    ///       access the queue.
-    ///     
-    /// </summary>
     bool Exclusive { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.consume-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method provides the client with a consumer tag which it may
-  ///     use in methods that work with the consumer.
-  ///   
-  /// </remarks>
   public interface IStreamConsumeOk: IMethod {
-    /// <summary>
-    /// 
-    ///       Holds the consumer tag specified by the client or provided by
-    ///       the server.
-    ///     
-    /// </summary>
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.cancel".</summary>
-  /// <remarks>
-  /// 
-  ///     This method cancels a consumer.  Since message delivery is
-  ///     asynchronous the client may continue to receive messages for
-  ///     a short while after canceling a consumer.  It may process or
-  ///     discard these as appropriate.
-  ///   
-  /// </remarks>
   public interface IStreamCancel: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    /// <summary>
-    /// 
-    ///     If set, the server will not respond to the method. The client should
-    ///     not wait for a reply method.  If the server could not complete the
-    ///     method it will raise a channel or connection exception.
-    ///     
-    /// </summary>
     bool Nowait { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.cancel-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms that the cancellation was completed.
-  ///   
-  /// </remarks>
   public interface IStreamCancelOk: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.publish".</summary>
-  /// <remarks>
-  /// 
-  ///     This method publishes a message to a specific exchange. The message
-  ///     will be routed to queues as defined by the exchange configuration
-  ///     and distributed to any active consumers as appropriate.
-  ///   
-  /// </remarks>
   public interface IStreamPublish: IMethod {
-    /// <summary>
-    /// 
-    ///       The client MUST provide a valid access ticket giving "write"
-    ///       access rights to the access realm for the exchange.
-    ///     
-    /// </summary>
     ushort Ticket { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange to publish to.  The exchange
-    ///       name can be empty, meaning the default exchange.  If the exchange
-    ///       name is specified, and that exchange does not exist, the server
-    ///       will raise a channel exception.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key for the message.  The routing key is
-    ///       used for routing messages depending on the exchange configuration.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue.  If this flag is set, the server will return an
-    ///       unroutable message with a Return method.  If this flag is zero, the
-    ///       server silently drops the message.
-    ///     
-    /// </summary>
     bool Mandatory { get; }
-    /// <summary>
-    /// 
-    ///       This flag tells the server how to react if the message cannot be
-    ///       routed to a queue consumer immediately.  If this flag is set, the
-    ///       server will return an undeliverable message with a Return method.
-    ///       If this flag is zero, the server will queue the message, but with
-    ///       no guarantee that it will ever be consumed.
-    ///     
-    /// </summary>
     bool Immediate { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.return".</summary>
-  /// <remarks>
-  /// 
-  ///     This method returns an undeliverable message that was published
-  ///     with the "immediate" flag set, or an unroutable message published
-  ///     with the "mandatory" flag set. The reply code and text provide
-  ///     information about the reason that the message was undeliverable.
-  ///   
-  /// </remarks>
   public interface IStreamReturn: IMethod {
-    // (no documentation)
     ushort ReplyCode { get; }
-    // (no documentation)
     string ReplyText { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was
-    ///       originally published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the routing key name specified when the message was
-    ///       published.
-    ///     
-    /// </summary>
     string RoutingKey { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "stream.deliver".</summary>
-  /// <remarks>
-  /// 
-  ///     This method delivers a message to the client, via a consumer.  In
-  ///     the asynchronous message delivery model, the client starts a
-  ///     consumer using the Consume method, then the server responds with
-  ///     Deliver methods as and when messages arrive for that consumer.
-  ///   
-  /// </remarks>
   public interface IStreamDeliver: IMethod {
-    // (no documentation)
     string ConsumerTag { get; }
-    // (no documentation)
     ulong DeliveryTag { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the exchange that the message was originally
-    ///       published to.
-    ///     
-    /// </summary>
     string Exchange { get; }
-    /// <summary>
-    /// 
-    ///       Specifies the name of the queue that the message came from. Note
-    ///       that a single channel can start many consumers on different
-    ///       queues.
-    ///     
-    /// </summary>
     string Queue { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.select".</summary>
-  /// <remarks>
-  /// 
-  ///     This method sets the channel to use standard transactions.  The
-  ///     client must use this method at least once on a channel before
-  ///     using the Commit or Rollback methods.
-  ///   
-  /// </remarks>
   public interface ITxSelect: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.select-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms to the client that the channel was successfully
-  ///     set to use standard transactions.
-  ///   
-  /// </remarks>
   public interface ITxSelectOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.commit".</summary>
-  /// <remarks>
-  /// 
-  ///     This method commits all messages published and acknowledged in
-  ///     the current transaction.  A new transaction starts immediately
-  ///     after a commit.
-  ///   
-  /// </remarks>
   public interface ITxCommit: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.commit-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms to the client that the commit succeeded.
-  ///     Note that if a commit fails, the server raises a channel exception.
-  ///   
-  /// </remarks>
   public interface ITxCommitOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.rollback".</summary>
-  /// <remarks>
-  /// 
-  ///     This method abandons all messages published and acknowledged in
-  ///     the current transaction.  A new transaction starts immediately
-  ///     after a rollback.
-  ///   
-  /// </remarks>
   public interface ITxRollback: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tx.rollback-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms to the client that the rollback succeeded.
-  ///     Note that if an rollback fails, the server raises a channel exception.
-  ///   
-  /// </remarks>
   public interface ITxRollbackOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.select".</summary>
-  /// <remarks>
-  /// 
-  ///     This method sets the channel to use distributed transactions.  The
-  ///     client must use this method at least once on a channel before
-  ///     using the Start method.
-  ///   
-  /// </remarks>
   public interface IDtxSelect: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.select-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms to the client that the channel was successfully
-  ///     set to use distributed transactions.
-  ///   
-  /// </remarks>
   public interface IDtxSelectOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.start".</summary>
-  /// <remarks>
-  /// 
-  ///     This method starts a new distributed transaction.  This must be
-  ///     the first method on a new channel that uses the distributed
-  ///     transaction mode, before any methods that publish or consume
-  ///     messages.
-  ///   
-  /// </remarks>
   public interface IDtxStart: IMethod {
-    /// <summary>
-    /// 
-    ///       The distributed transaction key. This identifies the transaction
-    ///       so that the AMQP server can coordinate with the distributed
-    ///       transaction coordinator.
-    ///     
-    /// </summary>
     string DtxIdentifier { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "dtx.start-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method confirms to the client that the transaction started.
-  ///     Note that if a start fails, the server raises a channel exception.
-  ///   
-  /// </remarks>
   public interface IDtxStartOk: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "tunnel.request".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tunnels a block of binary data, which can be an
-  ///     encoded AMQP method or other data.  The binary data is sent
-  ///     as the content for the Tunnel.Request method.
-  ///   
-  /// </remarks>
   public interface ITunnelRequest: IMethod {
-    /// <summary>
-    /// 
-    ///     This field table holds arbitrary meta-data that the sender needs
-    ///     to pass to the recipient.
-    ///     
-    /// </summary>
     System.Collections.IDictionary MetaData { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.integer".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tests the peer's capability to correctly marshal integer
-  ///     data.
-  ///   
-  /// </remarks>
   public interface ITestInteger: IMethod {
-    /// <summary>
-    /// 
-    ///       An octet integer test value.
-    ///     
-    /// </summary>
     byte Integer1 { get; }
-    /// <summary>
-    /// 
-    ///       A short integer test value.
-    ///     
-    /// </summary>
     ushort Integer2 { get; }
-    /// <summary>
-    /// 
-    ///       A long integer test value.
-    ///     
-    /// </summary>
     uint Integer3 { get; }
-    /// <summary>
-    /// 
-    ///       A long long integer test value.
-    ///     
-    /// </summary>
     ulong Integer4 { get; }
-    /// <summary>
-    /// 
-    ///       The client must execute this operation on the provided integer
-    ///       test fields and return the result.
-    ///     
-    /// </summary>
     byte Operation { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.integer-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method reports the result of an Integer method.
-  ///   
-  /// </remarks>
   public interface ITestIntegerOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The result of the tested operation.
-    ///     
-    /// </summary>
     ulong Result { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.string".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tests the peer's capability to correctly marshal string
-  ///     data.
-  ///   
-  /// </remarks>
   public interface ITestString: IMethod {
-    /// <summary>
-    /// 
-    ///       An short string test value.
-    ///     
-    /// </summary>
     string String1 { get; }
-    /// <summary>
-    /// 
-    ///       A long string test value.
-    ///     
-    /// </summary>
     byte[] String2 { get; }
-    /// <summary>
-    /// 
-    ///       The client must execute this operation on the provided string
-    ///       test fields and return the result.
-    ///     
-    /// </summary>
     byte Operation { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.string-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method reports the result of a String method.
-  ///   
-  /// </remarks>
   public interface ITestStringOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The result of the tested operation.
-    ///     
-    /// </summary>
     byte[] Result { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.table".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tests the peer's capability to correctly marshal field
-  ///     table data.
-  ///   
-  /// </remarks>
   public interface ITestTable: IMethod {
-    /// <summary>
-    /// 
-    ///       A field table of test values.
-    ///     
-    /// </summary>
     System.Collections.IDictionary Table { get; }
-    /// <summary>
-    /// 
-    ///       The client must execute this operation on the provided field
-    ///       table integer values and return the result.
-    ///     
-    /// </summary>
     byte IntegerOp { get; }
-    /// <summary>
-    /// 
-    ///       The client must execute this operation on the provided field
-    ///       table string values and return the result.
-    ///     
-    /// </summary>
     byte StringOp { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.table-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method reports the result of a Table method.
-  ///   
-  /// </remarks>
   public interface ITestTableOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The result of the tested integer operation.
-    ///     
-    /// </summary>
     ulong IntegerResult { get; }
-    /// <summary>
-    /// 
-    ///       The result of the tested string operation.
-    ///     
-    /// </summary>
     byte[] StringResult { get; }
   }
   /// <summary>Autogenerated type. AMQP specification method "test.content".</summary>
-  /// <remarks>
-  /// 
-  ///     This method tests the peer's capability to correctly marshal content.
-  ///   
-  /// </remarks>
   public interface ITestContent: IMethod {
   }
   /// <summary>Autogenerated type. AMQP specification method "test.content-ok".</summary>
-  /// <remarks>
-  /// 
-  ///     This method reports the result of a Content method.  It contains the
-  ///     content checksum and echoes the original content as provided.
-  ///   
-  /// </remarks>
   public interface ITestContentOk: IMethod {
-    /// <summary>
-    /// 
-    ///       The 32-bit checksum of the content, calculated by adding the
-    ///       content into a 32-bit accumulator.
-    ///     
-    /// </summary>
     uint ContentChecksum { get; }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "basic"</summary>
-  /// <remarks>
-  /// 
-  ///   The Basic class provides methods that support an industry-standard
-  ///   messaging model.
-  /// 
-  /// </remarks>
   public class BasicProperties: RabbitMQ.Client.Impl.BasicProperties {
     private string m_contentType;
     private string m_contentEncoding;
@@ -2928,7 +1146,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
     private bool appId_present = false;
     private bool clusterId_present = false;
 
-    // (no documentation)
     public override string ContentType {
       get {
         return m_contentType;
@@ -2938,7 +1155,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_contentType = value;
       }
     }
-    // (no documentation)
     public override string ContentEncoding {
       get {
         return m_contentEncoding;
@@ -2948,7 +1164,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_contentEncoding = value;
       }
     }
-    // (no documentation)
     public override System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -2958,7 +1173,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_headers = value;
       }
     }
-    // (no documentation)
     public override byte DeliveryMode {
       get {
         return m_deliveryMode;
@@ -2968,7 +1182,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_deliveryMode = value;
       }
     }
-    // (no documentation)
     public override byte Priority {
       get {
         return m_priority;
@@ -2978,7 +1191,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_priority = value;
       }
     }
-    // (no documentation)
     public override string CorrelationId {
       get {
         return m_correlationId;
@@ -2988,7 +1200,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_correlationId = value;
       }
     }
-    // (no documentation)
     public override string ReplyTo {
       get {
         return m_replyTo;
@@ -2998,7 +1209,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_replyTo = value;
       }
     }
-    // (no documentation)
     public override string Expiration {
       get {
         return m_expiration;
@@ -3008,7 +1218,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_expiration = value;
       }
     }
-    // (no documentation)
     public override string MessageId {
       get {
         return m_messageId;
@@ -3018,7 +1227,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_messageId = value;
       }
     }
-    // (no documentation)
     public override AmqpTimestamp Timestamp {
       get {
         return m_timestamp;
@@ -3028,7 +1236,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_timestamp = value;
       }
     }
-    // (no documentation)
     public override string Type {
       get {
         return m_type;
@@ -3038,7 +1245,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_type = value;
       }
     }
-    // (no documentation)
     public override string UserId {
       get {
         return m_userId;
@@ -3048,7 +1254,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_userId = value;
       }
     }
-    // (no documentation)
     public override string AppId {
       get {
         return m_appId;
@@ -3058,7 +1263,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_appId = value;
       }
     }
-    // (no documentation)
     public override string ClusterId {
       get {
         return m_clusterId;
@@ -3172,17 +1376,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "file"</summary>
-  /// <remarks>
-  /// 
-  ///   The file class provides methods that support reliable file transfer.
-  ///   File messages have a specific set of properties that are required for
-  ///   interoperability with file transfer applications. File messages and
-  ///   acknowledgements are subject to channel transactions.  Note that the
-  ///   file class does not provide message browsing methods; these are not
-  ///   compatible with the staging model.  Applications that need browsable
-  ///   file transfer should use Basic content and the Basic class.
-  /// 
-  /// </remarks>
   public class FileProperties: RabbitMQ.Client.Impl.FileProperties {
     private string m_contentType;
     private string m_contentEncoding;
@@ -3204,7 +1397,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
     private bool timestamp_present = false;
     private bool clusterId_present = false;
 
-    // (no documentation)
     public override string ContentType {
       get {
         return m_contentType;
@@ -3214,7 +1406,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_contentType = value;
       }
     }
-    // (no documentation)
     public override string ContentEncoding {
       get {
         return m_contentEncoding;
@@ -3224,7 +1415,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_contentEncoding = value;
       }
     }
-    // (no documentation)
     public override System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -3234,7 +1424,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_headers = value;
       }
     }
-    // (no documentation)
     public override byte Priority {
       get {
         return m_priority;
@@ -3244,7 +1433,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_priority = value;
       }
     }
-    // (no documentation)
     public override string ReplyTo {
       get {
         return m_replyTo;
@@ -3254,7 +1442,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_replyTo = value;
       }
     }
-    // (no documentation)
     public override string MessageId {
       get {
         return m_messageId;
@@ -3264,7 +1451,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_messageId = value;
       }
     }
-    // (no documentation)
     public override string Filename {
       get {
         return m_filename;
@@ -3274,7 +1460,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_filename = value;
       }
     }
-    // (no documentation)
     public override AmqpTimestamp Timestamp {
       get {
         return m_timestamp;
@@ -3284,7 +1469,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_timestamp = value;
       }
     }
-    // (no documentation)
     public override string ClusterId {
       get {
         return m_clusterId;
@@ -3368,16 +1552,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "stream"</summary>
-  /// <remarks>
-  /// 
-  ///   The stream class provides methods that support multimedia streaming.
-  ///   The stream class uses the following semantics: one message is one
-  ///   packet of data; delivery is unacknowleged and unreliable; the consumer
-  ///   can specify quality of service parameters that the server can try to
-  ///   adhere to; lower-priority messages may be discarded in favour of high
-  ///   priority messages.
-  /// 
-  /// </remarks>
   public class StreamProperties: RabbitMQ.Client.Impl.StreamProperties {
     private string m_contentType;
     private string m_contentEncoding;
@@ -3391,7 +1565,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
     private bool priority_present = false;
     private bool timestamp_present = false;
 
-    // (no documentation)
     public override string ContentType {
       get {
         return m_contentType;
@@ -3401,7 +1574,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_contentType = value;
       }
     }
-    // (no documentation)
     public override string ContentEncoding {
       get {
         return m_contentEncoding;
@@ -3411,7 +1583,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_contentEncoding = value;
       }
     }
-    // (no documentation)
     public override System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -3421,7 +1592,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_headers = value;
       }
     }
-    // (no documentation)
     public override byte Priority {
       get {
         return m_priority;
@@ -3431,7 +1601,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_priority = value;
       }
     }
-    // (no documentation)
     public override AmqpTimestamp Timestamp {
       get {
         return m_timestamp;
@@ -3491,13 +1660,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "tunnel"</summary>
-  /// <remarks>
-  /// 
-  ///   The tunnel methods are used to send blocks of binary data - which
-  ///   can be serialised AMQP methods or other protocol frames - between
-  ///   AMQP peers.
-  /// 
-  /// </remarks>
   public class TunnelProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
     private System.Collections.IDictionary m_headers;
     private string m_proxyName;
@@ -3511,7 +1673,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
     private bool durable_present = false;
     private bool broadcast_present = false;
 
-    // (no documentation)
     public System.Collections.IDictionary Headers {
       get {
         return m_headers;
@@ -3521,7 +1682,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_headers = value;
       }
     }
-    // (no documentation)
     public string ProxyName {
       get {
         return m_proxyName;
@@ -3531,7 +1691,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_proxyName = value;
       }
     }
-    // (no documentation)
     public string DataName {
       get {
         return m_dataName;
@@ -3541,7 +1700,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_dataName = value;
       }
     }
-    // (no documentation)
     public byte Durable {
       get {
         return m_durable;
@@ -3551,7 +1709,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
         m_durable = value;
       }
     }
-    // (no documentation)
     public byte Broadcast {
       get {
         return m_broadcast;
@@ -3611,16 +1768,6 @@ namespace RabbitMQ.Client.Framing.v0_8qpid {
     }
   }
   /// <summary>Autogenerated type. AMQP specification content header properties for content class "test"</summary>
-  /// <remarks>
-  /// 
-  ///   The test class provides methods for a peer to test the basic
-  ///   operational correctness of another peer. The test methods are
-  ///   intended to ensure that all peers respect at least the basic
-  ///   elements of the protocol, such as frame and content organisation
-  ///   and field types. We assume that a specially-designed peer, a
-  ///   "monitor client" would perform such tests.
-  /// 
-  /// </remarks>
   public class TestProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
 
 
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/qpid-amqp.0-8.xml b/mcs/class/RabbitMQ.Client/docs/specs/qpid-amqp.0-8.xml
deleted file mode 100644 (file)
index bfb9ee4..0000000
+++ /dev/null
@@ -1,3996 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-       Copyright Notice
-       ================
-       (c) Copyright JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc.,
-       iMatix Corporation, IONA\ufffd Technologies, Red Hat, Inc.,
-       TWIST Process Innovations, and 29West Inc. 2006. All rights reserved.
-       
-       License
-       =======
-       JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc., iMatix 
-       Corporation, IONA Technologies, Red Hat, Inc., TWIST Process Innovations, and 
-       29West Inc. (collectively, the "Authors") each hereby grants to you a worldwide,
-       perpetual, royalty-free, nontransferable, nonexclusive license to
-       (i) copy, display, distribute and implement the Advanced Messaging Queue Protocol
-       ("AMQP") Specification and (ii) the Licensed Claims that are held by
-       the Authors, all for the purpose of implementing the Advanced Messaging
-       Queue Protocol Specification. Your license and any rights under this
-       Agreement will terminate immediately without notice from
-       any Author if you bring any claim, suit, demand, or action related to
-       the Advanced Messaging Queue Protocol Specification against any Author.
-       Upon termination, you shall destroy all copies of the Advanced Messaging
-       Queue Protocol Specification in your possession or control.
-       
-       As used hereunder, "Licensed Claims" means those claims of a patent or
-       patent application, throughout the world, excluding design patents and
-       design registrations, owned or controlled, or that can be sublicensed
-       without fee and in compliance with the requirements of this
-       Agreement, by an Author or its affiliates now or at any
-       future time and which would necessarily be infringed by implementation
-       of the Advanced Messaging Queue Protocol Specification. A claim is
-       necessarily infringed hereunder only when it is not possible to avoid
-       infringing it because there is no plausible non-infringing alternative
-       for implementing the required portions of the Advanced Messaging Queue
-       Protocol Specification. Notwithstanding the foregoing, Licensed Claims
-       shall not include any claims other than as set forth above even if
-       contained in the same patent as Licensed Claims; or that read solely
-       on any implementations of any portion of the Advanced Messaging Queue
-       Protocol Specification that are not required by the Advanced Messaging
-       Queue Protocol Specification, or that, if licensed, would require a
-       payment of royalties by the licensor to unaffiliated third parties.
-       Moreover, Licensed Claims shall not include (i) any enabling technologies
-       that may be necessary to make or use any Licensed Product but are not
-       themselves expressly set forth in the Advanced Messaging Queue Protocol
-       Specification (e.g., semiconductor manufacturing technology, compiler
-       technology, object oriented technology, networking technology, operating
-       system technology, and the like); or (ii) the implementation of other
-       published standards developed elsewhere and merely referred to in the
-       body of the Advanced Messaging Queue Protocol Specification, or
-       (iii) any Licensed Product and any combinations thereof the purpose or
-       function of which is not required for compliance with the Advanced
-       Messaging Queue Protocol Specification. For purposes of this definition,
-       the Advanced Messaging Queue Protocol Specification shall be deemed to
-       include both architectural and interconnection requirements essential
-       for interoperability and may also include supporting source code artifacts
-       where such architectural, interconnection requirements and source code
-       artifacts are expressly identified as being required or documentation to
-       achieve compliance with the Advanced Messaging Queue Protocol Specification.
-       
-       As used hereunder, "Licensed Products" means only those specific portions
-       of products (hardware, software or combinations thereof) that implement
-       and are compliant with all relevant portions of the Advanced Messaging
-       Queue Protocol Specification.
-       
-       The following disclaimers, which you hereby also acknowledge as to any
-       use you may make of the Advanced Messaging Queue Protocol Specification:
-       
-       THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS,"
-       AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
-       IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
-       FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
-       CONTENTS OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE
-       SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF THE ADVANCED
-       MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD PARTY 
-       PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-       
-       THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
-       INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
-       USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED MESSAGING QUEUE
-       PROTOCOL SPECIFICATION.
-       
-       The name and trademarks of the Authors may NOT be used in any manner,
-       including advertising or publicity pertaining to the Advanced Messaging
-       Queue Protocol Specification or its contents without specific, written
-       prior permission. Title to copyright in the Advanced Messaging Queue
-       Protocol Specification will at all times remain with the Authors.
-       
-       No other rights are granted by implication, estoppel or otherwise.
-       
-       Upon termination of your license or rights under this Agreement, you
-       shall destroy all copies of the Advanced Messaging Queue Protocol
-       Specification in your possession or control.
-       
-       Trademarks
-       ==========
-       "JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the
-       Octagon Symbol are trademarks of JPMorgan Chase & Co.
-       
-       IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
-       
-       IONA, IONA Technologies, and the IONA logos are trademarks of IONA
-       Technologies PLC and/or its subsidiaries.
-       
-       LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered
-       trademarks of Red Hat, Inc. in the US and other countries.
-       
-       Java, all Java-based trademarks and OpenOffice.org are trademarks of
-       Sun Microsystems, Inc. in the United States, other countries, or both.
-       
-       Other company, product, or service names may be trademarks or service
-       marks of others.
-       
-       Links to full AMQP specification:
-       =================================
-       http://www.envoytech.org/spec/amq/
-       http://www.iona.com/opensource/amqp/
-       http://www.redhat.com/solutions/specifications/amqp/
-       http://www.twiststandards.org/tiki-index.php?page=AMQ
-       http://www.imatix.com/amqp
-       
--->
-
-<!--
-========================================================
-EDITORS: (PH)   Pieter Hintjens <ph@imatix.com>
-         (KvdR) Kim van der Riet <kim.vdriet@redhat.com>
-
-NOTE: These editors have been assigned by the AMQP working group. Please do not
-edit/commit this file without consulting with one of the above editors.
-========================================================
-
-Revision history:
-    2006-06-07 (PH) - version number changed to 0.8 to conform to public
-    release documentation.
-
-    2006-05-15 (PH) - fixed comments on queue name in basic.get to clarify
-    use of current queue in this method.
-
-    2006-05-15 (PH) - fixed comments on routing key in queue.bind to clarify
-    how routing key is filled when empty (to allow asynch queue.declare).
-
-    2006-05-11 (PH) - reset version to 0.70 so that putatitive standards
-    group can release 2-3 major new versions before hitting 1.0 (again).
-
-    2006-05-11 (PH) - TODO in documentation: cycle field in frame header
-    has been removed.
-
-    2006-05-11 (PH) - added nowait option to exchange.declare, delete,
-    queue.declare, delete, bind, purge, basic.consume, cancel,
-    file.consume, cancel, stream.consume and cancel methods.
-
-    2006-05-11 (PH) - removed notnull rule and added explanations on queue
-    name in queue.bind, purge, delete, basic.consume, cancel, file.consume,
-    cancel, stream.consume and cancel methods.
-
-    2006-05-11 (PH) - added basic.qos, file.qos, and stream.qos methods that
-    regroup all prefetch options from the consume methods.  Also removed the
-    prefetch option from channel.open.
-
-    2006-05-11 (PH) - renumbered method indexes to show request-response
-    nature of methods; requests are 10, 20, 30 while responses are 11, 21,
-    etc.
-
-    2006-05-11 (PH) - removed OpenAMQ extension methods from this definition
-    since these are maintained seperately.
-    
-    2006-05-26 (RG) - added Basic.Recover method to allow replay of
-    unacknowledged messages on a channel.
-
-    2006-07-03 (PH) - cosmetic clean-up of Basic.Recover comments.
--->
-
-<amqp major="8" minor="0" port="5672" comment="AMQ protocol 0.80">
-    AMQ Protocol 0.80
-
-<!--
-======================================================
-==       CONSTANTS
-======================================================
--->
-  <constant name="frame method" value="1"/>
-  <constant name="frame header" value="2"/>
-  <constant name="frame body" value="3"/>
-  <constant name="frame oob method" value="4"/>
-  <constant name="frame oob header" value="5"/>
-  <constant name="frame oob body" value="6"/>
-  <constant name="frame trace" value="7"/>
-  <constant name="frame heartbeat" value="8"/>
-  <constant name="frame min size" value="4096"/>
-  <constant name="frame end" value="206"/>
-  <constant name="reply success" value="200">
-  Indicates that the method completed successfully. This reply code is
-  reserved for future use - the current protocol design does not use
-  positive confirmation and reply codes are sent only in case of an
-  error.
-</constant>
-  <constant name="not delivered" value="310" class="soft error">
-  The client asked for a specific message that is no longer available.
-  The message was delivered to another client, or was purged from the
-  queue for some other reason.
-</constant>
-  <constant name="content too large" value="311" class="soft error">
-  The client attempted to transfer content larger than the server
-  could accept at the present time.  The client may retry at a later
-  time.
-</constant>
-  <constant name="connection forced" value="320" class="hard error">
-  An operator intervened to close the connection for some reason.
-  The client may retry at some later date.
-</constant>
-  <constant name="invalid path" value="402" class="hard error">
-  The client tried to work with an unknown virtual host or cluster.
-</constant>
-  <constant name="access refused" value="403" class="soft error">
-  The client attempted to work with a server entity to which it has
-  no  due to security settings.
-</constant>
-  <constant name="not found" value="404" class="soft error">
-  The client attempted to work with a server entity that does not exist.
-</constant>
-  <constant name="resource locked" value="405" class="soft error">
-  The client attempted to work with a server entity to which it has
-  no access because another client is working with it.
-</constant>
-  <constant name="frame error" value="501" class="hard error">
-  The client sent a malformed frame that the server could not decode.
-  This strongly implies a programming error in the client.
-</constant>
-  <constant name="syntax error" value="502" class="hard error">
-  The client sent a frame that contained illegal values for one or more
-  fields.  This strongly implies a programming error in the client.
-</constant>
-  <constant name="command invalid" value="503" class="hard error">
-  The client sent an invalid sequence of frames, attempting to perform
-  an operation that was considered invalid by the server. This usually
-  implies a programming error in the client.
-</constant>
-  <constant name="channel error" value="504" class="hard error">
-  The client attempted to work with a channel that had not been
-  correctly opened.  This most likely indicates a fault in the client
-  layer.
-</constant>
-  <constant name="resource error" value="506" class="hard error">
-  The server could not complete the method because it lacked sufficient
-  resources. This may be due to the client creating too many of some
-  type of entity.
-</constant>
-  <constant name="not allowed" value="530" class="hard error">
-  The client tried to work with some entity in a manner that is
-  prohibited by the server, due to security settings or by some other
-  criteria.
-</constant>
-  <constant name="not implemented" value="540" class="hard error">
-  The client tried to use functionality that is not implemented in the
-  server.
-</constant>
-  <constant name="internal error" value="541" class="hard error">
-  The server could not complete the method because of an internal error.
-  The server may require intervention by an operator in order to resume
-  normal operations.
-</constant>
-  <!--
-======================================================
-==       DOMAIN TYPES
-======================================================
--->
-  <domain name="access ticket" type="short">
-    access ticket granted by server
-    <doc>
-    An access ticket granted by the server for a certain set of access
-    rights within a specific realm. Access tickets are valid within the
-    channel where they were created, and expire when the channel closes.
-    </doc>
-    <assert check="ne" value="0"/>
-  </domain>
-  <domain name="class id" type="short"/>
-  <domain name="consumer tag" type="shortstr">
-    consumer tag
-    <doc>
-      Identifier for the consumer, valid within the current connection.
-    </doc>
-    <rule implement="MUST">
-      The consumer tag is valid only within the channel from which the
-      consumer was created. I.e. a client MUST NOT create a consumer in
-      one channel and then use it in another.
-    </rule>
-  </domain>
-  <domain name="delivery tag" type="longlong">
-    server-assigned delivery tag
-    <doc>
-      The server-assigned and channel-specific delivery tag
-    </doc>
-    <rule implement="MUST">
-      The delivery tag is valid only within the channel from which the
-      message was received.  I.e. a client MUST NOT receive a message on
-      one channel and then acknowledge it on another.
-    </rule>
-    <rule implement="MUST">
-      The server MUST NOT use a zero value for delivery tags.  Zero is
-      reserved for client use, meaning "all messages so far received".
-    </rule>
-  </domain>
-  <domain name="exchange name" type="shortstr">
-    exchange name
-    <doc>
-      The exchange name is a client-selected string that identifies
-      the exchange for publish methods.  Exchange names may consist
-      of any mixture of digits, letters, and underscores.  Exchange
-      names are scoped by the virtual host.
-    </doc>
-    <assert check="length" value="127"/>
-  </domain>
-  <domain name="known hosts" type="shortstr">
-list of known hosts
-<doc>
-Specifies the list of equivalent or alternative hosts that the server
-knows about, which will normally include the current server itself.
-Clients can cache this information and use it when reconnecting to a
-server after a failure.
-</doc>
-    <rule implement="MAY">
-The server MAY leave this field empty if it knows of no other
-hosts than itself.
-</rule>
-  </domain>
-  <domain name="method id" type="short"/>
-  <domain name="no ack" type="bit">
-    no acknowledgement needed
-    <doc>
-      If this field is set the server does not expect acknowledgments
-      for messages.  That is, when a message is delivered to the client
-      the server automatically and silently acknowledges it on behalf
-      of the client.  This functionality increases performance but at
-      the cost of reliability.  Messages can get lost if a client dies
-      before it can deliver them to the application.
-    </doc>
-  </domain>
-  <domain name="no local" type="bit">
-    do not deliver own messages
-    <doc>
-    If the no-local field is set the server will not send messages to
-    the client that published them.
-    </doc>
-  </domain>
-  <domain name="path" type="shortstr">
-    <doc>
-  Must start with a slash "/" and continue with path names
-  separated by slashes. A path name consists of any combination
-  of at least one of [A-Za-z0-9] plus zero or more of [.-_+!=:].
-</doc>
-    <assert check="notnull"/>
-    <assert check="syntax" rule="path"/>
-    <assert check="length" value="127"/>
-  </domain>
-  <domain name="peer properties" type="table">
-    <doc>
-This string provides a set of peer properties, used for
-identification, debugging, and general information.
-</doc>
-    <rule implement="SHOULD">
-The properties SHOULD contain these fields:
-"product", giving the name of the peer product, "version", giving
-the name of the peer version, "platform", giving the name of the
-operating system, "copyright", if appropriate, and "information",
-giving other general information.
-</rule>
-  </domain>
-  <domain name="queue name" type="shortstr">
-    queue name
-    <doc>
-    The queue name identifies the queue within the vhost.  Queue
-    names may consist of any mixture of digits, letters, and
-    underscores.
-    </doc>
-    <assert check="length" value="127"/>
-  </domain>
-  <domain name="redelivered" type="bit">
-    message is being redelivered
-    <doc>
-      This indicates that the message has been previously delivered to
-      this or another client.
-    </doc>
-    <rule implement="SHOULD">
-      The server SHOULD try to signal redelivered messages when it can.
-      When redelivering a message that was not successfully acknowledged,
-      the server SHOULD deliver it to the original client if possible.
-    </rule>
-    <rule implement="MUST">
-      The client MUST NOT rely on the redelivered field but MUST take it
-      as a hint that the message may already have been processed.  A
-      fully robust client must be able to track duplicate received messages
-      on non-transacted, and locally-transacted channels.
-    </rule>
-  </domain>
-  <domain name="reply code" type="short">
-reply code from server
-<doc>
-  The reply code. The AMQ reply codes are defined in AMQ RFC 011.
-</doc>
-    <assert check="notnull"/>
-  </domain>
-  <domain name="reply text" type="shortstr">
-localised reply text
-<doc>
-  The localised reply text.  This text can be logged as an aid to
-  resolving issues.
-</doc>
-    <assert check="notnull"/>
-  </domain>
-  <class name="connection" handler="connection" index="10">
-    <!--
-======================================================
-==       CONNECTION
-======================================================
--->
-  work with socket connections
-<doc>
-  The connection class provides methods for a client to establish a
-  network connection to a server, and for both peers to operate the
-  connection thereafter.
-</doc>
-    <doc name="grammar">
-    connection          = open-connection *use-connection close-connection
-    open-connection     = C:protocol-header
-                          S:START C:START-OK
-                          *challenge
-                          S:TUNE C:TUNE-OK
-                          C:OPEN S:OPEN-OK | S:REDIRECT
-    challenge           = S:SECURE C:SECURE-OK
-    use-connection      = *channel
-    close-connection    = C:CLOSE S:CLOSE-OK
-                        / S:CLOSE C:CLOSE-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="MUST"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="start" synchronous="1" index="10">
-  start connection negotiation
-  <doc>
-    This method starts the connection negotiation process by telling
-    the client the protocol version that the server proposes, along
-    with a list of security mechanisms which the client can use for
-    authentication.
-  </doc>
-      <rule implement="MUST">
-    If the client cannot handle the protocol version suggested by the
-    server it MUST close the socket connection.
-  </rule>
-      <rule implement="MUST">
-    The server MUST provide a protocol version that is lower than or
-    equal to that requested by the client in the protocol header. If
-    the server cannot support the specified protocol it MUST NOT send
-    this method, but MUST close the socket connection.
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <response name="start-ok"/>
-      <field name="version major" type="octet">
-    protocol major version
-    <doc>
-      The protocol major version that the server agrees to use, which
-      cannot be higher than the client's major version.
-    </doc>
-      </field>
-      <field name="version minor" type="octet">
-    protocol major version
-    <doc>
-      The protocol minor version that the server agrees to use, which
-      cannot be higher than the client's minor version.
-    </doc>
-      </field>
-      <field name="server properties" domain="peer properties">
-    server properties
-  </field>
-      <field name="mechanisms" type="longstr">
-    available security mechanisms
-    <doc>
-      A list of the security mechanisms that the server supports, delimited
-      by spaces.  Currently ASL supports these mechanisms: PLAIN.
-    </doc>
-        <see name="security mechanisms"/>
-        <assert check="notnull"/>
-      </field>
-      <field name="locales" type="longstr">
-    available message locales
-    <doc>
-      A list of the message locales that the server supports, delimited
-      by spaces.  The locale defines the language in which the server
-      will send reply texts.
-    </doc>
-        <rule implement="MUST">
-      All servers MUST support at least the en_US locale.
-    </rule>
-        <assert check="notnull"/>
-      </field>
-    </method>
-    <method name="start-ok" synchronous="1" index="11">
-  select security mechanism and locale
-  <doc>
-    This method selects a SASL security mechanism. ASL uses SASL
-    (RFC2222) to negotiate authentication and encryption.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <field name="client properties" domain="peer properties">
-    client properties
-  </field>
-      <field name="mechanism" type="shortstr">
-    selected security mechanism
-    <doc>
-      A single security mechanisms selected by the client, which must be
-      one of those specified by the server.
-    </doc>
-        <rule implement="SHOULD">
-      The client SHOULD authenticate using the highest-level security
-      profile it can handle from the list provided by the server.
-    </rule>
-        <rule implement="MUST">
-    The mechanism field MUST contain one of the security mechanisms
-    proposed by the server in the Start method. If it doesn't, the
-    server MUST close the socket.
-    </rule>
-        <assert check="notnull"/>
-      </field>
-      <field name="response" type="longstr">
-    security response data
-    <doc>
-      A block of opaque data passed to the security mechanism. The contents
-      of this data are defined by the SASL security mechanism.  For the
-      PLAIN security mechanism this is defined as a field table holding
-      two fields, LOGIN and PASSWORD.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-      <field name="locale" type="shortstr">
-    selected message locale
-    <doc>
-      A single message local selected by the client, which must be one
-      of those specified by the server.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="secure" synchronous="1" index="20">
-  security mechanism challenge
-  <doc>
-    The SASL protocol works by exchanging challenges and responses until
-    both peers have received sufficient information to authenticate each
-    other.  This method challenges the client to provide more information.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <response name="secure-ok"/>
-      <field name="challenge" type="longstr">
-    security challenge data
-    <doc>
-      Challenge information, a block of opaque binary data passed to
-      the security mechanism.
-    </doc>
-        <see name="security mechanisms"/>
-      </field>
-    </method>
-    <method name="secure-ok" synchronous="1" index="21">
-  security mechanism response
-  <doc>
-    This method attempts to authenticate, passing a block of SASL data
-    for the security mechanism at the server side.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <field name="response" type="longstr">
-    security response data
-    <doc>
-      A block of opaque data passed to the security mechanism.  The contents
-      of this data are defined by the SASL security mechanism.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="tune" synchronous="1" index="30">
-  propose connection tuning parameters
-  <doc>
-    This method proposes a set of connection configuration values
-    to the client.  The client can accept and/or adjust these.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <response name="tune-ok"/>
-      <field name="channel max" type="short">
-    proposed maximum channels
-    <doc>
-      The maximum total number of channels that the server allows
-      per connection. Zero means that the server does not impose a
-      fixed limit, but the number of allowed channels may be limited
-      by available server resources.
-    </doc>
-      </field>
-      <field name="frame max" type="long">
-    proposed maximum frame size
-    <doc>
-      The largest frame size that the server proposes for the
-      connection. The client can negotiate a lower value.  Zero means
-      that the server does not impose any specific limit but may reject
-      very large frames if it cannot allocate resources for them.
-    </doc>
-        <rule implement="MUST">
-      Until the frame-max has been negotiated, both peers MUST accept
-      frames of up to 4096 octets large. The minimum non-zero value for
-      the frame-max field is 4096.
-    </rule>
-      </field>
-      <field name="heartbeat" type="short">
-    desired heartbeat delay
-    <doc>
-      The delay, in seconds, of the connection heartbeat that the server
-      wants.  Zero means the server does not want a heartbeat.
-    </doc>
-      </field>
-    </method>
-    <method name="tune-ok" synchronous="1" index="31">
-  negotiate connection tuning parameters
-  <doc>
-    This method sends the client's connection tuning parameters to the
-    server. Certain fields are negotiated, others provide capability
-    information.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <field name="channel max" type="short">
-    negotiated maximum channels
-    <doc>
-      The maximum total number of channels that the client will use
-      per connection.  May not be higher than the value specified by
-      the server.
-    </doc>
-        <rule implement="MAY">
-      The server MAY ignore the channel-max value or MAY use it for
-      tuning its resource allocation.
-    </rule>
-        <assert check="notnull"/>
-        <assert check="le" method="tune" field="channel max"/>
-      </field>
-      <field name="frame max" type="long">
-    negotiated maximum frame size
-    <doc>
-      The largest frame size that the client and server will use for
-      the connection.  Zero means that the client does not impose any
-      specific limit but may reject very large frames if it cannot
-      allocate resources for them.  Note that the frame-max limit
-      applies principally to content frames, where large contents
-      can be broken into frames of arbitrary size.
-    </doc>
-        <rule implement="MUST">
-      Until the frame-max has been negotiated, both peers must accept
-      frames of up to 4096 octets large. The minimum non-zero value for
-      the frame-max field is 4096.
-    </rule>
-      </field>
-      <field name="heartbeat" type="short">
-    desired heartbeat delay
-    <doc>
-      The delay, in seconds, of the connection heartbeat that the client
-      wants. Zero means the client does not want a heartbeat.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="open" synchronous="1" index="40">
-  open connection to virtual host
-  <doc>
-    This method opens a connection to a virtual host, which is a
-    collection of resources, and acts to separate multiple application
-    domains within a server.
-  </doc>
-      <rule implement="MUST">
-    The client MUST open the context before doing any work on the
-    connection.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="open-ok"/>
-      <response name="redirect"/>
-      <field name="virtual host" domain="path">
-    virtual host name
-    <assert check="regexp" value="^[a-zA-Z0-9/-_]+$"/>
-        <doc>
-      The name of the virtual host to work with.
-    </doc>
-        <rule implement="MUST">
-      If the server supports multiple virtual hosts, it MUST enforce a
-      full separation of exchanges, queues, and all associated entities
-      per virtual host. An application, connected to a specific virtual
-      host, MUST NOT be able to access resources of another virtual host.
-    </rule>
-        <rule implement="SHOULD">
-      The server SHOULD verify that the client has permission to access
-      the specified virtual host.
-    </rule>
-        <rule implement="MAY">
-      The server MAY configure arbitrary limits per virtual host, such
-      as the number of each type of entity that may be used, per
-      connection and/or in total.
-    </rule>
-      </field>
-      <field name="capabilities" type="shortstr">
-    required capabilities
-    <doc>
-      The client may specify a number of capability names, delimited by
-      spaces.  The server can use this string to how to process the
-      client's connection request.
-    </doc>
-      </field>
-      <field name="insist" type="bit">
-    insist on connecting to server
-    <doc>
-      In a configuration with multiple load-sharing servers, the server
-      may respond to a Connection.Open method with a Connection.Redirect.
-      The insist option tells the server that the client is insisting on
-      a connection to the specified server.
-    </doc>
-        <rule implement="SHOULD">
-      When the client uses the insist option, the server SHOULD accept
-      the client connection unless it is technically unable to do so.
-    </rule>
-      </field>
-    </method>
-    <method name="open-ok" synchronous="1" index="41">
-  signal that the connection is ready
-  <doc>
-    This method signals to the client that the connection is ready for
-    use.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <field name="known hosts" domain="known hosts"/>
-    </method>
-    <method name="redirect" synchronous="1" index="50">
-  asks the client to use a different server
-  <doc>
-    This method redirects the client to another server, based on the
-    requested virtual host and/or capabilities.
-  </doc>
-      <rule implement="SHOULD">
-    When getting the Connection.Redirect method, the client SHOULD
-    reconnect to the host specified, and if that host is not present,
-    to any of the hosts specified in the known-hosts list.
-  </rule>
-      <chassis name="client" implement="MAY"/>
-      <field name="host" type="shortstr">
-    server to connect to
-    <doc>
-      Specifies the server to connect to.  This is an IP address or a
-      DNS name, optionally followed by a colon and a port number. If
-      no port number is specified, the client should use the default
-      port number for the protocol.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-      <field name="known hosts" domain="known hosts"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="close" synchronous="1" index="60">
-  request a connection close
-  <doc>
-    This method indicates that the sender wants to close the connection.
-    This may be due to internal conditions (e.g. a forced shut-down) or
-    due to an error handling a specific method, i.e. an exception.  When
-    a close is due to an exception, the sender provides the class and
-    method id of the method which caused the exception.
-  </doc>
-      <rule implement="MUST">
-    After sending this method any received method except the Close-OK
-    method MUST be discarded.
-  </rule>
-      <rule implement="MAY">
-    The peer sending this method MAY use a counter or timeout to
-    detect failure of the other peer to respond correctly with
-    the Close-OK method.
-  </rule>
-      <rule implement="MUST">
-    When a server receives the Close method from a client it MUST
-    delete all server-side resources associated with the client's
-    context.  A client CANNOT reconnect to a context after sending
-    or receiving a Close method.
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="close-ok"/>
-      <field name="reply code" domain="reply code"/>
-      <field name="reply text" domain="reply text"/>
-      <field name="class id" domain="class id">
-    failing method class
-    <doc>
-      When the close is provoked by a method exception, this is the
-      class of the method.
-    </doc>
-      </field>
-      <field name="method id" domain="class id">
-    failing method ID
-    <doc>
-      When the close is provoked by a method exception, this is the
-      ID of the method.
-    </doc>
-      </field>
-    </method>
-    <method name="close-ok" synchronous="1" index="61">
-  confirm a connection close
-  <doc>
-    This method confirms a Connection.Close method and tells the
-    recipient that it is safe to release resources for the connection
-    and close the socket.
-  </doc>
-      <rule implement="SHOULD">
-    A peer that detects a socket closure without having received a
-    Close-Ok handshake method SHOULD log the error.
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-    </method>
-  </class>
-  <class name="channel" handler="channel" index="20">
-    <!--
-======================================================
-==       CHANNEL
-======================================================
--->
-  work with channels
-<doc>
-  The channel class provides methods for a client to establish a virtual
-  connection - a channel - to a server and for both peers to operate the
-  virtual connection thereafter.
-</doc>
-    <doc name="grammar">
-    channel             = open-channel *use-channel close-channel
-    open-channel        = C:OPEN S:OPEN-OK
-    use-channel         = C:FLOW S:FLOW-OK
-                        / S:FLOW C:FLOW-OK
-                        / S:ALERT
-                        / functional-class
-    close-channel       = C:CLOSE S:CLOSE-OK
-                        / S:CLOSE C:CLOSE-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="MUST"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="open" synchronous="1" index="10">
-  open a channel for use
-  <doc>
-    This method opens a virtual connection (a channel).
-  </doc>
-      <rule implement="MUST">
-    This method MUST NOT be called when the channel is already open.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="open-ok"/>
-      <field name="out of band" type="shortstr">
-    out-of-band settings
-    <doc>
-      Configures out-of-band transfers on this channel.  The syntax and
-      meaning of this field will be formally defined at a later date.
-    </doc>
-        <assert check="null"/>
-      </field>
-    </method>
-    <method name="open-ok" synchronous="1" index="11">
-  signal that the channel is ready
-  <doc>
-    This method signals to the client that the channel is ready for use.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="flow" synchronous="1" index="20">
-  enable/disable flow from peer
-  <doc>
-    This method asks the peer to pause or restart the flow of content
-    data. This is a simple flow-control mechanism that a peer can use
-    to avoid oveflowing its queues or otherwise finding itself receiving
-    more messages than it can process.  Note that this method is not
-    intended for window control.  The peer that receives a request to
-    stop sending content should finish sending the current content, if
-    any, and then wait until it receives a Flow restart method.
-  </doc>
-      <rule implement="MAY">
-    When a new channel is opened, it is active.  Some applications
-    assume that channels are inactive until started.  To emulate this
-    behaviour a client MAY open the channel, then pause it.
-  </rule>
-      <rule implement="SHOULD">
-    When sending content data in multiple frames, a peer SHOULD monitor
-    the channel for incoming methods and respond to a Channel.Flow as
-    rapidly as possible.
-  </rule>
-      <rule implement="MAY">
-    A peer MAY use the Channel.Flow method to throttle incoming content
-    data for internal reasons, for example, when exchangeing data over a
-    slower connection.
-  </rule>
-      <rule implement="MAY">
-    The peer that requests a Channel.Flow method MAY disconnect and/or
-    ban a peer that does not respect the request.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <chassis name="client" implement="MUST"/>
-      <response name="flow-ok"/>
-      <field name="active" type="bit">
-    start/stop content frames
-    <doc>
-      If 1, the peer starts sending content frames.  If 0, the peer
-      stops sending content frames.
-    </doc>
-      </field>
-    </method>
-    <method name="flow-ok" index="21">
-  confirm a flow method
-  <doc>
-    Confirms to the peer that a flow command was received and processed.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <chassis name="client" implement="MUST"/>
-      <field name="active" type="bit">
-    current flow setting
-    <doc>
-      Confirms the setting of the processed flow method: 1 means the
-      peer will start sending or continue to send content frames; 0
-      means it will not.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="alert" index="30">
-  send a non-fatal warning message
-  <doc>
-    This method allows the server to send a non-fatal warning to the
-    client.  This is used for methods that are normally asynchronous
-    and thus do not have confirmations, and for which the server may
-    detect errors that need to be reported.  Fatal errors are handled
-    as channel or connection exceptions; non-fatal errors are sent
-    through this method.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <field name="reply code" domain="reply code"/>
-      <field name="reply text" domain="reply text"/>
-      <field name="details" type="table">
-    detailed information for warning
-    <doc>
-      A set of fields that provide more information about the
-      problem.  The meaning of these fields are defined on a
-      per-reply-code basis (TO BE DEFINED).
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="close" synchronous="1" index="40">
-  request a channel close
-  <doc>
-    This method indicates that the sender wants to close the channel.
-    This may be due to internal conditions (e.g. a forced shut-down) or
-    due to an error handling a specific method, i.e. an exception.  When
-    a close is due to an exception, the sender provides the class and
-    method id of the method which caused the exception.
-  </doc>
-      <rule implement="MUST">
-    After sending this method any received method except
-    Channel.Close-OK MUST be discarded.
-  </rule>
-      <rule implement="MAY">
-    The peer sending this method MAY use a counter or timeout to detect
-    failure of the other peer to respond correctly with Channel.Close-OK..
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="close-ok"/>
-      <field name="reply code" domain="reply code"/>
-      <field name="reply text" domain="reply text"/>
-      <field name="class id" domain="class id">
-    failing method class
-    <doc>
-      When the close is provoked by a method exception, this is the
-      class of the method.
-    </doc>
-      </field>
-      <field name="method id" domain="method id">
-    failing method ID
-    <doc>
-      When the close is provoked by a method exception, this is the
-      ID of the method.
-    </doc>
-      </field>
-    </method>
-    <method name="close-ok" synchronous="1" index="41">
-  confirm a channel close
-  <doc>
-    This method confirms a Channel.Close method and tells the recipient
-    that it is safe to release resources for the channel and close the
-    socket.
-  </doc>
-      <rule implement="SHOULD">
-    A peer that detects a socket closure without having received a
-    Channel.Close-Ok handshake method SHOULD log the error.
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-    </method>
-  </class>
-  <class name="access" handler="connection" index="30">
-    <!--
-======================================================
-==      ACCESS CONTROL
-======================================================
--->
-  work with access tickets
-<doc>
-  The protocol control access to server resources using access tickets.
-  A client must explicitly request access tickets before doing work.
-  An access ticket grants a client the right to use a specific set of
-  resources - called a "realm" - in specific ways.
-</doc>
-    <doc name="grammar">
-    access              = C:REQUEST S:REQUEST-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="MUST"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="request" synchronous="1" index="10">
-  request an access ticket
-  <doc>
-    This method requests an access ticket for an access realm.
-    The server responds by granting the access ticket.  If the
-    client does not have access rights to the requested realm
-    this causes a connection exception.  Access tickets are a
-    per-channel resource.
-  </doc>
-      <rule implement="MUST">
-    The realm name MUST start with either "/data" (for application
-    resources) or "/admin" (for server administration resources).
-    If the realm starts with any other path, the server MUST raise
-    a connection exception with reply code 403 (access refused).
-  </rule>
-      <rule implement="MUST">
-    The server MUST implement the /data realm and MAY implement the
-    /admin realm.  The mapping of resources to realms is not
-    defined in the protocol - this is a server-side configuration
-    issue.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="request-ok"/>
-      <field name="realm" domain="path">
-    name of requested realm
-    <rule implement="MUST">
-      If the specified realm is not known to the server, the server
-      must raise a channel exception with reply code 402 (invalid
-      path).
-    </rule>
-      </field>
-      <field name="exclusive" type="bit">
-    request exclusive access
-    <doc>
-      Request exclusive access to the realm. If the server cannot grant
-      this - because there are other active tickets for the realm - it
-      raises a channel exception.
-    </doc>
-      </field>
-      <field name="passive" type="bit">
-    request passive access
-    <doc>
-      Request message passive access to the specified access realm.
-      Passive access lets a client get information about resources in
-      the realm but not to make any changes to them.
-    </doc>
-      </field>
-      <field name="active" type="bit">
-    request active access
-    <doc>
-      Request message active access to the specified access realm.
-      Acvtive access lets a client get create and delete resources in
-      the realm.
-    </doc>
-      </field>
-      <field name="write" type="bit">
-    request write access
-    <doc>
-      Request write access to the specified access realm.  Write access
-      lets a client publish messages to all exchanges in the realm.
-    </doc>
-      </field>
-      <field name="read" type="bit">
-    request read access
-    <doc>
-      Request read access to the specified access realm.  Read access
-      lets a client consume messages from queues in the realm.
-    </doc>
-      </field>
-    </method>
-    <method name="request-ok" synchronous="1" index="11">
-  grant access to server resources
-  <doc>
-    This method provides the client with an access ticket. The access
-    ticket is valid within the current channel and for the lifespan of
-    the channel.
-  </doc>
-      <rule implement="MUST">
-    The client MUST NOT use access tickets except within the same
-    channel as originally granted.
-  </rule>
-      <rule implement="MUST">
-    The server MUST isolate access tickets per channel and treat an
-    attempt by a client to mix these as a connection exception.
-  </rule>
-      <chassis name="client" implement="MUST"/>
-      <field name="ticket" domain="access ticket"/>
-    </method>
-  </class>
-  <class name="exchange" handler="channel" index="40">
-    <!--
-======================================================
-==       EXCHANGES (or "routers", if you prefer)
-==       (Or matchers, plugins, extensions, agents,... Routing is just one of
-==        the many fun things an exchange can do.)
-======================================================
--->
-  work with exchanges
-<doc>
-  Exchanges match and distribute messages across queues.  Exchanges can be
-  configured in the server or created at runtime.
-</doc>
-    <doc name="grammar">
-    exchange            = C:DECLARE  S:DECLARE-OK
-                        / C:DELETE   S:DELETE-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="MUST"/>
-    <rule implement="MUST">
-      <test>amq_exchange_19</test>
-  The server MUST implement the direct and fanout exchange types, and
-  predeclare the corresponding exchanges named amq.direct and amq.fanout
-  in each virtual host. The server MUST also predeclare a direct
-  exchange to act as the default exchange for content Publish methods
-  and for default queue bindings.
-</rule>
-    <rule implement="SHOULD">
-      <test>amq_exchange_20</test>
-  The server SHOULD implement the topic exchange type, and predeclare
-  the corresponding exchange named amq.topic in each virtual host.
-</rule>
-    <rule implement="MAY">
-      <test>amq_exchange_21</test>
-  The server MAY implement the system exchange type, and predeclare the
-  corresponding exchanges named amq.system in each virtual host. If the
-  client attempts to bind a queue to the system exchange, the server
-  MUST raise a connection exception with reply code 507 (not allowed).
-</rule>
-    <rule implement="MUST">
-      <test>amq_exchange_22</test>
-  The default exchange MUST be defined as internal, and be inaccessible
-  to the client except by specifying an empty exchange name in a content
-  Publish method. That is, the server MUST NOT let clients make explicit
-  bindings to this exchange.
-</rule>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="declare" synchronous="1" index="10">
-  declare exchange, create if needed
-  <doc>
-    This method creates an exchange if it does not already exist, and if the
-    exchange exists, verifies that it is of the correct and expected class.
-  </doc>
-      <rule implement="SHOULD">
-        <test>amq_exchange_23</test>
-    The server SHOULD support a minimum of 16 exchanges per virtual host
-    and ideally, impose no limit except as defined by available resources.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="declare-ok"/>
-      <field name="ticket" domain="access ticket">
-        <doc>
-      When a client defines a new exchange, this belongs to the access realm
-      of the ticket used.  All further work done with that exchange must be
-      done with an access ticket for the same realm.
-    </doc>
-        <rule implement="MUST">
-      The client MUST provide a valid access ticket giving "active" access
-      to the realm in which the exchange exists or will be created, or
-      "passive" access if the if-exists flag is set.
-    </rule>
-      </field>
-      <field name="exchange" domain="exchange name">
-        <rule implement="MUST">
-          <test>amq_exchange_15</test>
-      Exchange names starting with "amq." are reserved for predeclared
-      and standardised exchanges.  If the client attempts to create an
-      exchange starting with "amq.", the server MUST raise a channel
-      exception with reply code 403 (access refused).
-    </rule>
-        <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
-      </field>
-      <field name="type" type="shortstr">
-    exchange type
-    <doc>
-      Each exchange belongs to one of a set of exchange types implemented
-      by the server.  The exchange types define the functionality of the
-      exchange - i.e. how messages are routed through it.  It is not valid
-      or meaningful to attempt to change the type of an existing exchange.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_exchange_16</test>
-      If the exchange already exists with a different type, the server
-      MUST raise a connection exception with a reply code 507 (not allowed).
-    </rule>
-        <rule implement="MUST">
-          <test>amq_exchange_18</test>
-      If the server does not support the requested exchange type it MUST
-      raise a connection exception with a reply code 503 (command invalid).
-    </rule>
-        <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
-      </field>
-      <field name="passive" type="bit">
-    do not create exchange
-    <doc>
-    If set, the server will not create the exchange.  The client can use
-    this to check whether an exchange exists without modifying the server
-    state.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_exchange_05</test>
-      If set, and the exchange does not already exist, the server MUST
-      raise a channel exception with reply code 404 (not found).
-    </rule>
-      </field>
-      <field name="durable" type="bit">
-    request a durable exchange
-    <doc>
-      If set when creating a new exchange, the exchange will be marked as
-      durable.  Durable exchanges remain active when a server restarts.
-      Non-durable exchanges (transient exchanges) are purged if/when a
-      server restarts.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_exchange_24</test>
-      The server MUST support both durable and transient exchanges.
-    </rule>
-        <rule implement="MUST">
-      The server MUST ignore the durable field if the exchange already
-      exists.
-    </rule>
-      </field>
-      <field name="auto delete" type="bit">
-    auto-delete when unused
-    <doc>
-      If set, the exchange is deleted when all queues have finished
-      using it.
-    </doc>
-        <rule implement="SHOULD">
-          <test>amq_exchange_02</test>
-      The server SHOULD allow for a reasonable delay between the point
-      when it determines that an exchange is not being used (or no longer
-      used), and the point when it deletes the exchange.  At the least it
-      must allow a client to create an exchange and then bind a queue to
-      it, with a small but non-zero delay between these two actions.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_exchange_25</test>
-      The server MUST ignore the auto-delete field if the exchange already
-      exists.
-    </rule>
-      </field>
-      <field name="internal" type="bit">
-    create internal exchange
-    <doc>
-      If set, the exchange may not be used directly by publishers, but
-      only when bound to other exchanges. Internal exchanges are used to
-      construct wiring that is not visible to applications.
-    </doc>
-      </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-
-      <field name="arguments" type="table">
-    arguments for declaration
-    <doc>
-      A set of arguments for the declaration. The syntax and semantics
-      of these arguments depends on the server implementation.  This
-      field is ignored if passive is 1.
-    </doc>
-      </field>
-    </method>
-    <method name="declare-ok" synchronous="1" index="11">
-  confirms an exchange declaration
-  <doc>
-    This method confirms a Declare method and confirms the name of the
-    exchange, essential for automatically-named exchanges.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="delete" synchronous="1" index="20">
-  delete an exchange
-  <doc>
-    This method deletes an exchange.  When an exchange is deleted all queue
-    bindings on the exchange are cancelled.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <response name="delete-ok"/>
-      <field name="ticket" domain="access ticket">
-        <rule implement="MUST">
-      The client MUST provide a valid access ticket giving "active"
-      access rights to the exchange's access realm.
-    </rule>
-      </field>
-      <field name="exchange" domain="exchange name">
-        <rule implement="MUST">
-          <test>amq_exchange_11</test>
-      The exchange MUST exist. Attempting to delete a non-existing exchange
-      causes a channel exception.
-    </rule>
-        <assert check="notnull"/>
-      </field>
-      <field name="if unused" type="bit">
-    delete only if unused
-    <doc>
-      If set, the server will only delete the exchange if it has no queue
-      bindings. If the exchange has queue bindings the server does not
-      delete it but raises a channel exception instead.
-    </doc>
-        <rule implement="SHOULD">
-          <test>amq_exchange_12</test>
-      If set, the server SHOULD delete the exchange but only if it has
-      no queue bindings.
-    </rule>
-        <rule implement="SHOULD">
-          <test>amq_exchange_13</test>
-      If set, the server SHOULD raise a channel exception if the exchange is in
-      use.
-    </rule>
-      </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-
-    </method>
-    <method name="delete-ok" synchronous="1" index="21">
-  confirm deletion of an exchange
-  <doc>
-    This method confirms the deletion of an exchange.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-
-    <method name="bound" synchronous="1" index="22">
-        <field name="exchange" domain="exchange name"/>
-        <field name = "routing key" type = "shortstr">
-            Message routing key
-            <doc>
-              Specifies the routing key for the message.  The routing key is
-              used for routing messages depending on the exchange configuration.
-            </doc>
-        </field>
-        <field name = "queue" domain = "queue name"/>
-    </method>
-
-    <method name="bound-ok" synchronous="1" index="23">
-        <field name="reply code" domain="reply code"/>
-        <field name="reply text" domain="reply text"/>
-    </method>
-
-  </class>
-
-  <class name="queue" handler="channel" index="50">
-    <!--
-======================================================
-==       QUEUES
-======================================================
--->
-  work with queues
-
-<doc>
-  Queues store and forward messages.  Queues can be configured in the server
-  or created at runtime.  Queues must be attached to at least one exchange
-  in order to receive messages from publishers.
-</doc>
-    <doc name="grammar">
-    queue               = C:DECLARE  S:DECLARE-OK
-                        / C:BIND     S:BIND-OK
-                        / C:PURGE    S:PURGE-OK
-                        / C:DELETE   S:DELETE-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="MUST"/>
-    <rule implement="MUST">
-      <test>amq_queue_33</test>
-  A server MUST allow any content class to be sent to any queue, in any
-  mix, and queue and delivery these content classes independently. Note
-  that all methods that fetch content off queues are specific to a given
-  content class.
-</rule>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="declare" synchronous="1" index="10">
-  declare queue, create if needed
-  <doc>
-    This method creates or checks a queue.  When creating a new queue
-    the client can specify various properties that control the durability
-    of the queue and its contents, and the level of sharing for the queue.
-  </doc>
-      <rule implement="MUST">
-        <test>amq_queue_34</test>
-    The server MUST create a default binding for a newly-created queue
-    to the default exchange, which is an exchange of type 'direct'.
-  </rule>
-      <rule implement="SHOULD">
-        <test>amq_queue_35</test>
-    The server SHOULD support a minimum of 256 queues per virtual host
-    and ideally, impose no limit except as defined by available resources.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="declare-ok"/>
-      <field name="ticket" domain="access ticket">
-        <doc>
-      When a client defines a new queue, this belongs to the access realm
-      of the ticket used.  All further work done with that queue must be
-      done with an access ticket for the same realm.
-    </doc>
-        <doc>
-      The client provides a valid access ticket giving "active" access
-      to the realm in which the queue exists or will be created, or
-      "passive" access if the if-exists flag is set.
-    </doc>
-      </field>
-      <field name="queue" domain="queue name">
-        <rule implement="MAY">
-          <test>amq_queue_10</test>
-      The queue name MAY be empty, in which case the server MUST create
-      a new queue with a unique generated name and return this to the
-      client in the Declare-Ok method.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_queue_32</test>
-      Queue names starting with "amq." are reserved for predeclared and
-      standardised server queues.  If the queue name starts with "amq."
-      and the passive option is zero, the server MUST raise a connection
-      exception with reply code 403 (access refused).
-    </rule>
-        <assert check="regexp" value="^[a-zA-Z0-9-_.:]*$"/>
-      </field>
-      <field name="passive" type="bit">
-    do not create queue
-    <doc>
-    If set, the server will not create the queue.  The client can use
-    this to check whether a queue exists without modifying the server
-    state.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_queue_05</test>
-      If set, and the queue does not already exist, the server MUST
-      respond with a reply code 404 (not found) and raise a channel
-      exception.
-    </rule>
-      </field>
-      <field name="durable" type="bit">
-    request a durable queue
-    <doc>
-      If set when creating a new queue, the queue will be marked as
-      durable.  Durable queues remain active when a server restarts.
-      Non-durable queues (transient queues) are purged if/when a
-      server restarts.  Note that durable queues do not necessarily
-      hold persistent messages, although it does not make sense to
-      send persistent messages to a transient queue.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_queue_03</test>
-      The server MUST recreate the durable queue after a restart.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_queue_36</test>
-      The server MUST support both durable and transient queues.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_queue_37</test>
-      The server MUST ignore the durable field if the queue already
-      exists.
-    </rule>
-      </field>
-      <field name="exclusive" type="bit">
-    request an exclusive queue
-    <doc>
-      Exclusive queues may only be consumed from by the current connection.
-      Setting the 'exclusive' flag always implies 'auto-delete'.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_queue_38</test>
-      The server MUST support both exclusive (private) and non-exclusive
-      (shared) queues.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_queue_04</test>
-      The server MUST raise a channel exception if 'exclusive' is specified
-      and the queue already exists and is owned by a different connection.
-    </rule>
-      </field>
-      <field name="auto delete" type="bit">
-    auto-delete queue when unused
-    <doc>
-      If set, the queue is deleted when all consumers have finished
-      using it. Last consumer can be cancelled either explicitly or because
-      its channel is closed. If there was no consumer ever on the queue, it
-      won't be deleted.
-    </doc>
-        <rule implement="SHOULD">
-          <test>amq_queue_02</test>
-      The server SHOULD allow for a reasonable delay between the point
-      when it determines that a queue is not being used (or no longer
-      used), and the point when it deletes the queue.  At the least it
-      must allow a client to create a queue and then create a consumer
-      to read from it, with a small but non-zero delay between these
-      two actions.  The server should equally allow for clients that may
-      be disconnected prematurely, and wish to re-consume from the same
-      queue without losing messages.  We would recommend a configurable
-      timeout, with a suitable default value being one minute.
-    </rule>
-        <rule implement="MUST">
-          <test>amq_queue_31</test>
-      The server MUST ignore the auto-delete field if the queue already
-      exists.
-    </rule>
-      </field>
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-
-      <field name="arguments" type="table">
-    arguments for declaration
-    <doc>
-      A set of arguments for the declaration. The syntax and semantics
-      of these arguments depends on the server implementation.  This
-      field is ignored if passive is 1.
-    </doc>
-      </field>
-    </method>
-    <method name="declare-ok" synchronous="1" index="11">
-  confirms a queue definition
-  <doc>
-    This method confirms a Declare method and confirms the name of the
-    queue, essential for automatically-named queues.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <field name="queue" domain="queue name">
-        <doc>
-      Reports the name of the queue. If the server generated a queue
-      name, this field contains that name.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-      <field name="message count" type="long">
-    number of messages in queue
-    <doc>
-      Reports the number of messages in the queue, which will be zero
-      for newly-created queues.
-    </doc>
-      </field>
-      <field name="consumer count" type="long">
-    number of consumers
-    <doc>
-      Reports the number of active consumers for the queue. Note that
-      consumers can suspend activity (Channel.Flow) in which case they
-      do not appear in this count.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="bind" synchronous="1" index="20">
-  bind queue to an exchange
-  <doc>
-    This method binds a queue to an exchange.  Until a queue is
-    bound it will not receive any messages.  In a classic messaging
-    model, store-and-forward queues are bound to a dest exchange
-    and subscription queues are bound to a dest_wild exchange.
-  </doc>
-      <rule implement="MUST">
-        <test>amq_queue_25</test>
-    A server MUST allow ignore duplicate bindings - that is, two or
-    more bind methods for a specific queue, with identical arguments
-    - without treating these as an error.
-  </rule>
-      <rule implement="MUST">
-        <test>amq_queue_39</test>
-    If a bind fails, the server MUST raise a connection exception.
-  </rule>
-      <rule implement="MUST">
-        <test>amq_queue_12</test>
-    The server MUST NOT allow a durable queue to bind to a transient
-    exchange. If the client attempts this the server MUST raise a
-    channel exception.
-  </rule>
-      <rule implement="SHOULD">
-        <test>amq_queue_13</test>
-    Bindings for durable queues are automatically durable and the
-    server SHOULD restore such bindings after a server restart.
-  </rule>
-      <rule implement="MUST">
-        <test>amq_queue_17</test>
-    If the client attempts to an exchange that was declared as internal,
-    the server MUST raise a connection exception with reply code 530
-    (not allowed).
-  </rule>
-      <rule implement="SHOULD">
-        <test>amq_queue_40</test>
-    The server SHOULD support at least 4 bindings per queue, and
-    ideally, impose no limit except as defined by available resources.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="bind-ok"/>
-      <field name="ticket" domain="access ticket">
-        <doc>
-      The client provides a valid access ticket giving "active"
-      access rights to the queue's access realm.
-    </doc>
-      </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to bind.  If the queue name is
-      empty, refers to the current queue for the channel, which is
-      the last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue
-      name in this method is empty, the server MUST raise a connection
-      exception with reply code 530 (not allowed).
-    </doc>
-    <doc name = "rule" test = "amq_queue_26">
-      If the queue does not exist the server MUST raise a channel exception
-      with reply code 404 (not found).
-    </doc>
-  </field>
-
-  <field name="exchange" domain="exchange name">
-          The name of the exchange to bind to.
-          <rule implement="MUST">
-          <test>amq_queue_14</test>
-      If the exchange does not exist the server MUST raise a channel
-      exception with reply code 404 (not found).
-    </rule>
-      </field>
-      <field name="routing key" type="shortstr">
-     message routing key
-    <doc>
-      Specifies the routing key for the binding.  The routing key is
-      used for routing messages depending on the exchange configuration.
-      Not all exchanges use a routing key - refer to the specific
-      exchange documentation.  If the routing key is empty and the queue
-      name is empty, the routing key will be the current queue for the
-      channel, which is the last declared queue.
-    </doc>
-  </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-
-  <field name="arguments" type="table">
-    arguments for binding
-    <doc>
-      A set of arguments for the binding.  The syntax and semantics of
-      these arguments depends on the exchange class.
-    </doc>
-      </field>
-    </method>
-    <method name="bind-ok" synchronous="1" index="21">
-  confirm bind successful
-  <doc>
-    This method confirms that the bind was successful.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="purge" synchronous="1" index="30">
-  purge a queue
-  <doc>
-    This method removes all messages from a queue.  It does not cancel
-    consumers.  Purged messages are deleted without any formal "undo"
-    mechanism.
-  </doc>
-      <rule implement="MUST">
-        <test>amq_queue_15</test>
-    A call to purge MUST result in an empty queue.
-  </rule>
-      <rule implement="MUST">
-        <test>amq_queue_41</test>
-    On transacted channels the server MUST not purge messages that have
-    already been sent to a client but not yet acknowledged.
-  </rule>
-      <rule implement="MAY">
-        <test>amq_queue_42</test>
-    The server MAY implement a purge queue or log that allows system
-    administrators to recover accidentally-purged messages.  The server
-    SHOULD NOT keep purged messages in the same storage spaces as the
-    live messages since the volumes of purged messages may get very
-    large.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="purge-ok"/>
-      <field name="ticket" domain="access ticket">
-        <doc>
-      The access ticket must be for the access realm that holds the
-      queue.
-    </doc>
-        <rule implement="MUST">
-      The client MUST provide a valid access ticket giving "read" access
-      rights to the queue's access realm.  Note that purging a queue is
-      equivalent to reading all messages and discarding them.
-    </rule>
-      </field>
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to purge.  If the queue name is
-      empty, refers to the current queue for the channel, which is
-      the last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue
-      name in this method is empty, the server MUST raise a connection
-      exception with reply code 530 (not allowed).
-    </doc>
-    <doc name = "rule" test = "amq_queue_16">
-      The queue must exist. Attempting to purge a non-existing queue
-      causes a channel exception.
-    </doc>
-  </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-    </method>
-    <method name="purge-ok" synchronous="1" index="31">
-  confirms a queue purge
-  <doc>
-    This method confirms the purge of a queue.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <field name="message count" type="long">
-    number of messages purged
-    <doc>
-      Reports the number of messages purged.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="delete" synchronous="1" index="40">
-  delete a queue
-  <doc>
-    This method deletes a queue.  When a queue is deleted any pending
-    messages are sent to a dead-letter queue if this is defined in the
-    server configuration, and all consumers on the queue are cancelled.
-  </doc>
-      <rule implement="SHOULD">
-        <test>amq_queue_43</test>
-    The server SHOULD use a dead-letter queue to hold messages that
-    were pending on a deleted queue, and MAY provide facilities for
-    a system administrator to move these messages back to an active
-    queue.
-  </rule>
-      <chassis name="server" implement="MUST"/>
-      <response name="delete-ok"/>
-      <field name="ticket" domain="access ticket">
-        <doc>
-      The client provides a valid access ticket giving "active"
-      access rights to the queue's access realm.
-    </doc>
-      </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to delete. If the queue name is
-      empty, refers to the current queue for the channel, which is the
-      last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue
-      name in this method is empty, the server MUST raise a connection
-      exception with reply code 530 (not allowed).
-    </doc>
-    <doc name = "rule" test = "amq_queue_21">
-      The queue must exist. Attempting to delete a non-existing queue
-      causes a channel exception.
-    </doc>
-  </field>
-
-      <field name="if unused" type="bit">
-    delete only if unused
-    <doc>
-      If set, the server will only delete the queue if it has no
-      consumers. If the queue has consumers the server does does not
-      delete it but raises a channel exception instead.
-    </doc>
-        <rule implement="MUST">
-          <test>amq_queue_29</test>
-          <test>amq_queue_30</test>
-      The server MUST respect the if-unused flag when deleting a queue.
-    </rule>
-      </field>
-      <field name="if empty" type="bit">
-    delete only if empty
-       <test>amq_queue_27</test>
-        <doc>
-      If set, the server will only delete the queue if it has no
-      messages. If the queue is not empty the server raises a channel
-      exception.
-    </doc>
-      </field>
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-    </method>
-
-    <method name="delete-ok" synchronous="1" index="41">
-  confirm deletion of a queue
-  <doc>
-    This method confirms the deletion of a queue.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <field name="message count" type="long">
-    number of messages purged
-    <doc>
-      Reports the number of messages purged.
-    </doc>
-      </field>
-    </method>
-  </class>
-  <class name="basic" handler="channel" index="60">
-    <!--
-======================================================
-==       BASIC MIDDLEWARE
-======================================================
--->
-  work with basic content
-<doc>
-  The Basic class provides methods that support an industry-standard
-  messaging model.
-</doc>
-
-<doc name = "grammar">
-    basic               = C:QOS S:QOS-OK
-                        / C:CONSUME S:CONSUME-OK
-                        / C:CANCEL S:CANCEL-OK
-                        / C:PUBLISH content
-                        / S:RETURN content
-                        / S:DELIVER content
-                        / C:GET ( S:GET-OK content / S:GET-EMPTY )
-                        / C:ACK
-                        / C:REJECT
-</doc>
-
-<chassis name = "server" implement = "MUST" />
-<chassis name = "client" implement = "MAY"  />
-
-<doc name = "rule" test = "amq_basic_08">
-  The server SHOULD respect the persistent property of basic messages
-  and SHOULD make a best-effort to hold persistent basic messages on a
-  reliable storage mechanism.
-</doc>
-<doc name = "rule" test = "amq_basic_09">
-  The server MUST NOT discard a persistent basic message in case of a
-  queue overflow. The server MAY use the Channel.Flow method to slow
-  or stop a basic message publisher when necessary.
-</doc>
-<doc name = "rule" test = "amq_basic_10">
-  The server MAY overflow non-persistent basic messages to persistent
-  storage and MAY discard or dead-letter non-persistent basic messages
-  on a priority basis if the queue size exceeds some configured limit.
-</doc>
-<doc name = "rule" test = "amq_basic_11">
-  The server MUST implement at least 2 priority levels for basic
-  messages, where priorities 0-4 and 5-9 are treated as two distinct
-  levels. The server MAY implement up to 10 priority levels.
-</doc>
-<doc name = "rule" test = "amq_basic_12">
-  The server MUST deliver messages of the same priority in order
-  irrespective of their individual persistence.
-</doc>
-<doc name = "rule" test = "amq_basic_13">
-  The server MUST support both automatic and explicit acknowledgements
-  on Basic content.
-</doc>
-
-<!--  These are the properties for a Basic content  -->
-
-<field name = "content type" type = "shortstr">
-    MIME content type
-</field>
-<field name = "content encoding" type = "shortstr">
-    MIME content encoding
-</field>
-<field name = "headers" type = "table">
-    Message header field table
-</field>
-<field name = "delivery mode" type = "octet">
-    Non-persistent (1) or persistent (2)
-</field>
-<field name = "priority" type = "octet">
-    The message priority, 0 to 9
-</field>
-<field name = "correlation id" type = "shortstr">
-    The application correlation identifier
-</field>
-<field name = "reply to" type = "shortstr">
-    The destination to reply to
-</field>
-<field name = "expiration" type = "shortstr">
-    Message expiration specification
-</field>
-<field name = "message id" type = "shortstr">
-    The application message identifier
-</field>
-<field name = "timestamp" type = "timestamp">
-    The message timestamp
-</field>
-<field name = "type" type = "shortstr">
-    The message type name
-</field>
-<field name = "user id" type = "shortstr">
-    The creating user id
-</field>
-<field name = "app id" type = "shortstr">
-    The creating application id
-</field>
-<field name = "cluster id" type = "shortstr">
-    Intra-cluster routing identifier
-</field>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "qos" synchronous = "1" index = "10">
-  specify quality of service
-  <doc>
-    This method requests a specific quality of service.  The QoS can
-    be specified for the current channel or for all channels on the
-    connection.  The particular properties and semantics of a qos method
-    always depend on the content class semantics.  Though the qos method
-    could in principle apply to both peers, it is currently meaningful
-    only for the server.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "qos-ok" />
-
-  <field name = "prefetch size" type = "long">
-    prefetch window in octets
-    <doc>
-      The client can request that messages be sent in advance so that
-      when the client finishes processing a message, the following
-      message is already held locally, rather than needing to be sent
-      down the channel.  Prefetching gives a performance improvement.
-      This field specifies the prefetch window size in octets.  The
-      server will send a message in advance if it is equal to or
-      smaller in size than the available prefetch size (and also falls
-      into other prefetch limits). May be set to zero, meaning "no
-      specific limit", although other prefetch limits may still apply.
-      The prefetch-size is ignored if the no-ack option is set.
-    </doc>
-    <doc name = "rule" test = "amq_basic_17">
-      The server MUST ignore this setting when the client is not
-      processing any messages - i.e. the prefetch size does not limit
-      the transfer of single messages to a client, only the sending in
-      advance of more messages while the client still has one or more
-      unacknowledged messages.
-   </doc>
-  </field>
-
-  <field name = "prefetch count" type = "short">
-    prefetch window in messages
-    <doc>
-      Specifies a prefetch window in terms of whole messages.  This
-      field may be used in combination with the prefetch-size field;
-      a message will only be sent in advance if both prefetch windows
-      (and those at the channel and connection level) allow it.
-      The prefetch-count is ignored if the no-ack option is set.
-    </doc>
-    <doc name = "rule" test = "amq_basic_18">
-      The server MAY send less data in advance than allowed by the
-      client's specified prefetch windows but it MUST NOT send more.
-    </doc>
-  </field>
-
-  <field name = "global" type = "bit">
-    apply to entire connection
-    <doc>
-      By default the QoS settings apply to the current channel only.  If
-      this field is set, they are applied to the entire connection.
-    </doc>
-  </field>
-</method>
-
-<method name = "qos-ok" synchronous = "1" index = "11">
-  confirm the requested qos
-  <doc>
-    This method tells the client that the requested QoS levels could
-    be handled by the server.  The requested QoS applies to all active
-    consumers until a new QoS is defined.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "consume" synchronous = "1" index = "20">
-  start a queue consumer
-  <doc>
-    This method asks the server to start a "consumer", which is a
-    transient request for messages from a specific queue. Consumers
-    last as long as the channel they were created on, or until the
-    client cancels them.
-  </doc>
-  <doc name = "rule" test = "amq_basic_01">
-    The server SHOULD support at least 16 consumers per queue, unless
-    the queue was declared as private, and ideally, impose no limit
-    except as defined by available resources.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "consume-ok" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "read" access
-      rights to the realm for the queue.
-    </doc>
-  </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to consume from.  If the queue name
-      is null, refers to the current queue for the channel, which is the
-      last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue name
-      in this method is empty, the server MUST raise a connection exception
-      with reply code 530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Specifies the identifier for the consumer. The consumer tag is
-      local to a connection, so two clients can use the same consumer
-      tags. If this field is empty the server will generate a unique
-      tag.
-    </doc>
-    <doc name = "rule" test = "todo">
-      The tag MUST NOT refer to an existing consumer. If the client
-      attempts to create two consumers with the same non-empty tag
-      the server MUST raise a connection exception with reply code
-      530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "no local" domain = "no local" />
-
-  <field name = "no ack" domain = "no ack" />
-
-  <field name = "exclusive" type = "bit">
-    request exclusive access
-    <doc>
-      Request exclusive consumer access, meaning only this consumer can
-      access the queue.
-    </doc>
-    <doc name = "rule" test = "amq_basic_02">
-      If the server cannot grant exclusive access to the queue when asked,
-      - because there are other consumers active - it MUST raise a channel
-      exception with return code 403 (access refused).
-    </doc>
-  </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-
-    <field name="arguments" type="table" label="arguments for consuming">
-  <doc>
-    A set of arguments for the consume. The syntax and semantics
-    of these arguments depends on the server implementation.  This
-    field is ignored if passive is 1.
-  </doc>
-    </field>
-</method>
-
-<method name = "consume-ok" synchronous = "1" index = "21">
-  confirm a new consumer
-  <doc>
-    The server provides the client with a consumer tag, which is used
-    by the client for methods called on the consumer at a later stage.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Holds the consumer tag specified by the client or provided by
-      the server.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "cancel" synchronous = "1" index = "30">
-  end a queue consumer
-  <doc test = "amq_basic_04">
-    This method cancels a consumer. This does not affect already
-    delivered messages, but it does mean the server will not send any
-    more messages for that consumer.  The client may receive an
-    abitrary number of messages in between sending the cancel method
-    and receiving the cancel-ok reply.
-  </doc>
-  <doc name = "rule" test = "todo">
-    If the queue no longer exists when the client sends a cancel command,
-    or the consumer has been cancelled for other reasons, this command
-    has no effect.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "cancel-ok" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-<method name = "cancel-ok" synchronous = "1" index = "31">
-  confirm a cancelled consumer
-  <doc>
-    This method confirms that the cancellation was completed.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "publish" content = "1" index = "40">
-  publish a message
-  <doc>
-    This method publishes a message to a specific exchange. The message
-    will be routed to queues as defined by the exchange configuration
-    and distributed to any active consumers when the transaction, if any,
-    is committed.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "write"
-      access rights to the access realm for the exchange.
-    </doc>
-  </field>
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange to publish to.  The exchange
-      name can be empty, meaning the default exchange.  If the exchange
-      name is specified, and that exchange does not exist, the server
-      will raise a channel exception.
-    </doc>
-    <doc name = "rule" test = "amq_basic_06">
-      The server MUST accept a blank exchange name to mean the default
-      exchange.
-    </doc>
-    <doc name = "rule" test = "amq_basic_14">
-      If the exchange was declared as an internal exchange, the server
-      MUST raise a channel exception with a reply code 403 (access
-      refused).
-    </doc>
-    <doc name = "rule" test = "amq_basic_15">
-      The exchange MAY refuse basic content in which case it MUST raise
-      a channel exception with reply code 540 (not implemented).
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key for the message.  The routing key is
-      used for routing messages depending on the exchange configuration.
-    </doc>
-  </field>
-
-  <field name = "mandatory" type = "bit">
-    indicate mandatory routing
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue.  If this flag is set, the server will return an
-      unroutable message with a Return method.  If this flag is zero, the
-      server silently drops the message.
-    </doc>
-    <doc name = "rule" test = "amq_basic_07">
-      The server SHOULD implement the mandatory flag.
-    </doc>
-  </field>
-
-  <field name = "immediate" type = "bit">
-    request immediate delivery
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue consumer immediately.  If this flag is set, the
-      server will return an undeliverable message with a Return method.
-      If this flag is zero, the server will queue the message, but with
-      no guarantee that it will ever be consumed.
-    </doc>
-    <doc name = "rule" test = "amq_basic_16">
-      The server SHOULD implement the immediate flag.
-    </doc>
-  </field>
-</method>
-
-<method name = "return" content = "1" index = "50">
-  return a failed message
-  <doc>
-    This method returns an undeliverable message that was published
-    with the "immediate" flag set, or an unroutable message published
-    with the "mandatory" flag set. The reply code and text provide
-    information about the reason that the message was undeliverable.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "reply code" domain = "reply code" />
-  <field name = "reply text" domain = "reply text" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was
-      originally published to.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "deliver" content = "1" index = "60">
-  notify the client of a consumer message
-  <doc>
-    This method delivers a message to the client, via a consumer.  In
-    the asynchronous message delivery model, the client starts a
-    consumer using the Consume method, then the server responds with
-    Deliver methods as and when messages arrive for that consumer.
-  </doc>
-  <doc name = "rule" test = "amq_basic_19">
-    The server SHOULD track the number of times a message has been
-    delivered to clients and when a message is redelivered a certain
-    number of times - e.g. 5 times - without being acknowledged, the
-    server SHOULD consider the message to be unprocessable (possibly
-    causing client applications to abort), and move the message to a
-    dead letter queue.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "redelivered" domain = "redelivered" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was
-      originally published to.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "get" synchronous = "1" index = "70">
-  direct access to a queue
-  <doc>
-    This method provides a direct access to the messages in a queue
-    using a synchronous dialogue that is designed for specific types of
-    application where synchronous functionality is more important than
-    performance.
-  </doc>
-  <response name = "get-ok" />
-  <response name = "get-empty" />
-  <chassis name = "server" implement = "MUST" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "read"
-      access rights to the realm for the queue.
-    </doc>
-  </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to consume from.  If the queue name
-      is null, refers to the current queue for the channel, which is the
-      last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue name
-      in this method is empty, the server MUST raise a connection exception
-      with reply code 530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "no ack" domain = "no ack" />
-</method>
-
-<method name = "get-ok" synchronous = "1" content = "1" index = "71">
-  provide client with a message
-  <doc>
-    This method delivers a message to the client following a get
-    method.  A message delivered by 'get-ok' must be acknowledged
-    unless the no-ack option was set in the get method.
-  </doc>
-  <chassis name = "client" implement = "MAY" />
-
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "redelivered"  domain = "redelivered"  />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was originally
-      published to.  If empty, the message was published to the default
-      exchange.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>
-  </field>
-
-  <field name = "message count" type = "long" >
-    number of messages pending
-    <doc>
-      This field reports the number of messages pending on the queue,
-      excluding the message being delivered.  Note that this figure is
-      indicative, not reliable, and can change arbitrarily as messages
-      are added to the queue and removed by other clients.
-    </doc>
-  </field>
-</method>
-
-
-<method name = "get-empty" synchronous = "1" index = "72">
-  indicate no messages available
-  <doc>
-    This method tells the client that the queue has no messages
-    available for the client.
-  </doc>
-  <chassis name = "client" implement = "MAY" />
-
-  <field name = "cluster id" type = "shortstr">
-     Cluster id
-    <doc>
-      For use by cluster applications, should not be used by
-      client applications.
-    </doc>
-  </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "ack" index = "80">
-  acknowledge one or more messages
-  <doc>
-    This method acknowledges one or more messages delivered via the
-    Deliver or Get-Ok methods.  The client can ask to confirm a
-    single message or a set of messages up to and including a specific
-    message.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "multiple" type = "bit">
-    acknowledge multiple messages
-    <doc>
-      If set to 1, the delivery tag is treated as "up to and including",
-      so that the client can acknowledge multiple messages with a single
-      method.  If set to zero, the delivery tag refers to a single
-      message.  If the multiple field is 1, and the delivery tag is zero,
-      tells the server to acknowledge all outstanding mesages.
-    </doc>
-    <doc name = "rule" test = "amq_basic_20">
-      The server MUST validate that a non-zero delivery-tag refers to an
-      delivered message, and raise a channel exception if this is not the
-      case.
-    </doc>
-  </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "reject" index = "90">
-  reject an incoming message
-  <doc>
-    This method allows a client to reject a message.  It can be used to
-    interrupt and cancel large incoming messages, or return untreatable
-    messages to their original queue.
-  </doc>
-  <doc name = "rule" test = "amq_basic_21">
-    The server SHOULD be capable of accepting and process the Reject
-    method while sending message content with a Deliver or Get-Ok
-    method.  I.e. the server should read and process incoming methods
-    while sending output frames.  To cancel a partially-send content,
-    the server sends a content body frame of size 1 (i.e. with no data
-    except the frame-end octet).
-  </doc>
-  <doc name = "rule" test = "amq_basic_22">
-    The server SHOULD interpret this method as meaning that the client
-    is unable to process the message at this time.
-  </doc>
-  <doc name = "rule">
-    A client MUST NOT use this method as a means of selecting messages
-    to process.  A rejected message MAY be discarded or dead-lettered,
-    not necessarily passed to another client.
-  </doc>      
-  <chassis name = "server" implement = "MUST" />
-    
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "requeue" type = "bit">
-    requeue the message
-    <doc>
-      If this field is zero, the message will be discarded.  If this bit
-      is 1, the server will attempt to requeue the message.
-    </doc>
-    <doc name = "rule" test = "amq_basic_23">
-      The server MUST NOT deliver the message to the same client within
-      the context of the current channel.  The recommended strategy is
-      to attempt to deliver the message to an alternative consumer, and
-      if that is not possible, to move the message to a dead-letter
-      queue.  The server MAY use more sophisticated tracking to hold
-      the message on the queue and redeliver it to the same client at
-      a later stage.
-    </doc>
-  </field>
-</method>
-
-<method name = "recover" index = "100">
-  redeliver unacknowledged messages
-  <doc>
-    This method asks the broker to redeliver all unacknowledged messages on a
-    specified channel. Zero or more messages may be redelivered.  This method
-    is only allowed on non-transacted channels.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-
-  <field name = "requeue" type = "bit">
-    requeue the message
-    <doc>
-      If this field is zero, the message will be redelivered to the original
-      recipient.  If this bit is 1, the server will attempt to requeue the
-      message, potentially then delivering it to an alternative subscriber.
-    </doc>
-  </field>    
-  <doc name="rule">
-    The server MUST set the redelivered flag on all messages that are resent.
-  </doc>
-  <doc name="rule">
-    The server MUST raise a channel exception if this is called on a 
-    transacted channel.
-  </doc>
-    <response name="recover-ok"/>
-  </method>
-  <method name="recover-ok" synchronous="1" index="101">
-       confirm a successful recover
-       <doc>
-         This method confirms to the client that the recover succeeded.
-         Note that if an recover fails, the server raises a channel exception.
-    </doc>
-    <chassis name="client" implement="MUST"/>
-  </method>
-
-</class>
-
-
-  <class name="file" handler="channel" index="70">
-    <!--
-======================================================
-==      FILE TRANSFER
-======================================================
--->
-  work with file content
-<doc>
-  The file class provides methods that support reliable file transfer.
-  File messages have a specific set of properties that are required for
-  interoperability with file transfer applications. File messages and
-  acknowledgements are subject to channel transactions.  Note that the
-  file class does not provide message browsing methods; these are not
-  compatible with the staging model.  Applications that need browsable
-  file transfer should use Basic content and the Basic class.
-</doc>
-
-<doc name = "grammar">
-    file                = C:QOS S:QOS-OK
-                        / C:CONSUME S:CONSUME-OK
-                        / C:CANCEL S:CANCEL-OK
-                        / C:OPEN S:OPEN-OK C:STAGE content
-                        / S:OPEN C:OPEN-OK S:STAGE content
-                        / C:PUBLISH
-                        / S:DELIVER
-                        / S:RETURN
-                        / C:ACK
-                        / C:REJECT
-</doc>
-
-<chassis name = "server" implement = "MAY" />
-<chassis name = "client" implement = "MAY" />
-
-<doc name = "rule">
-  The server MUST make a best-effort to hold file messages on a
-  reliable storage mechanism.
-</doc>
-<doc name = "rule">
-  The server MUST NOT discard a file message in case of a queue
-  overflow. The server MUST use the Channel.Flow method to slow or stop
-  a file message publisher when necessary.
-</doc>
-<doc name = "rule">
-  The server MUST implement at least 2 priority levels for file
-  messages, where priorities 0-4 and 5-9 are treated as two distinct
-  levels. The server MAY implement up to 10 priority levels.
-</doc>
-<doc name = "rule">
-  The server MUST support both automatic and explicit acknowledgements
-  on file content.
-</doc>
-
-<!--  These are the properties for a File content  -->
-
-<field name = "content type" type = "shortstr">
-    MIME content type
-</field>
-<field name = "content encoding" type = "shortstr">
-    MIME content encoding
-</field>
-<field name = "headers" type = "table">
-    Message header field table
-</field>
-<field name = "priority" type = "octet">
-    The message priority, 0 to 9
-</field>
-<field name = "reply to" type = "shortstr">
-    The destination to reply to
-</field>
-<field name = "message id" type = "shortstr">
-    The application message identifier
-</field>
-<field name = "filename" type = "shortstr">
-    The message filename
-</field>
-<field name = "timestamp" type = "timestamp">
-    The message timestamp
-</field>
-<field name = "cluster id" type = "shortstr">
-    Intra-cluster routing identifier
-</field>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "qos" synchronous = "1" index = "10">
-  specify quality of service
-  <doc>
-    This method requests a specific quality of service.  The QoS can
-    be specified for the current channel or for all channels on the
-    connection.  The particular properties and semantics of a qos method
-    always depend on the content class semantics.  Though the qos method
-    could in principle apply to both peers, it is currently meaningful
-    only for the server.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "qos-ok" />
-
-  <field name = "prefetch size" type = "long">
-    prefetch window in octets
-    <doc>
-      The client can request that messages be sent in advance so that
-      when the client finishes processing a message, the following
-      message is already held locally, rather than needing to be sent
-      down the channel.  Prefetching gives a performance improvement.
-      This field specifies the prefetch window size in octets. May be
-      set to zero, meaning "no specific limit".  Note that other
-      prefetch limits may still apply. The prefetch-size is ignored
-      if the no-ack option is set.
-    </doc>
-  </field>
-
-  <field name = "prefetch count" type = "short">
-    prefetch window in messages
-    <doc>
-      Specifies a prefetch window in terms of whole messages.  This
-      is compatible with some file API implementations.  This field
-      may be used in combination with the prefetch-size field; a
-      message will only be sent in advance if both prefetch windows
-      (and those at the channel and connection level) allow it.
-      The prefetch-count is ignored if the no-ack option is set.
-    </doc>
-    <doc name = "rule">
-      The server MAY send less data in advance than allowed by the
-      client's specified prefetch windows but it MUST NOT send more.
-    </doc>
-  </field>
-
-  <field name = "global" type = "bit">
-    apply to entire connection
-    <doc>
-      By default the QoS settings apply to the current channel only.  If
-      this field is set, they are applied to the entire connection.
-    </doc>
-  </field>
-</method>
-
-<method name = "qos-ok" synchronous = "1" index = "11">
-  confirm the requested qos
-  <doc>
-    This method tells the client that the requested QoS levels could
-    be handled by the server.  The requested QoS applies to all active
-    consumers until a new QoS is defined.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "consume" synchronous = "1" index = "20">
-  start a queue consumer
-  <doc>
-    This method asks the server to start a "consumer", which is a
-    transient request for messages from a specific queue. Consumers
-    last as long as the channel they were created on, or until the
-    client cancels them.
-  </doc>
-  <doc name = "rule">
-    The server SHOULD support at least 16 consumers per queue, unless
-    the queue was declared as private, and ideally, impose no limit
-    except as defined by available resources.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "consume-ok" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "read" access
-      rights to the realm for the queue.
-    </doc>
-  </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to consume from.  If the queue name
-      is null, refers to the current queue for the channel, which is the
-      last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue name
-      in this method is empty, the server MUST raise a connection exception
-      with reply code 530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Specifies the identifier for the consumer. The consumer tag is
-      local to a connection, so two clients can use the same consumer
-      tags. If this field is empty the server will generate a unique
-      tag.
-    </doc>
-    <doc name = "rule" test = "todo">
-      The tag MUST NOT refer to an existing consumer. If the client
-      attempts to create two consumers with the same non-empty tag
-      the server MUST raise a connection exception with reply code
-      530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "no local" domain = "no local" />
-
-  <field name = "no ack" domain = "no ack" />
-
-  <field name = "exclusive" type = "bit">
-    request exclusive access
-    <doc>
-      Request exclusive consumer access, meaning only this consumer can
-      access the queue.
-    </doc>
-    <doc name = "rule" test = "amq_file_00">
-      If the server cannot grant exclusive access to the queue when asked,
-      - because there are other consumers active - it MUST raise a channel
-      exception with return code 405 (resource locked).
-    </doc>
-  </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-<method name = "consume-ok" synchronous = "1" index = "21">
-  confirm a new consumer
-  <doc>
-    This method provides the client with a consumer tag which it MUST
-    use in methods that work with the consumer.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Holds the consumer tag specified by the client or provided by
-      the server.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "cancel" synchronous = "1" index = "30">
-  end a queue consumer
-  <doc>
-    This method cancels a consumer. This does not affect already
-    delivered messages, but it does mean the server will not send any
-    more messages for that consumer.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "cancel-ok" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-<method name = "cancel-ok" synchronous = "1" index = "31">
-  confirm a cancelled consumer
-  <doc>
-    This method confirms that the cancellation was completed.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "open" synchronous = "1" index = "40">
-  request to start staging
-  <doc>
-    This method requests permission to start staging a message.  Staging
-    means sending the message into a temporary area at the recipient end
-    and then delivering the message by referring to this temporary area.
-    Staging is how the protocol handles partial file transfers - if a
-    message is partially staged and the connection breaks, the next time
-    the sender starts to stage it, it can restart from where it left off.
-  </doc>
-  <response name = "open-ok" />
-  <chassis name = "server" implement = "MUST" />
-  <chassis name = "client" implement = "MUST" />
-  
-  <field name = "identifier" type = "shortstr">
-    staging identifier
-    <doc>
-      This is the staging identifier. This is an arbitrary string chosen
-      by the sender.  For staging to work correctly the sender must use
-      the same staging identifier when staging the same message a second
-      time after recovery from a failure.  A good choice for the staging
-      identifier would be the SHA1 hash of the message properties data
-      (including the original filename, revised time, etc.).
-    </doc>
-  </field>
-
-  <field name = "content size" type = "longlong">
-    message content size
-    <doc>
-      The size of the content in octets.  The recipient may use this
-      information to allocate or check available space in advance, to
-      avoid "disk full" errors during staging of very large messages.
-    </doc>
-    <doc name = "rule">
-      The sender MUST accurately fill the content-size field.
-      Zero-length content is permitted.
-    </doc>
-  </field>
-</method>
-
-<method name = "open-ok" synchronous = "1" index = "41">
-  confirm staging ready
-  <doc>
-    This method confirms that the recipient is ready to accept staged
-    data.  If the message was already partially-staged at a previous
-    time the recipient will report the number of octets already staged.
-  </doc>
-  <response name = "stage" />
-  <chassis name = "server" implement = "MUST" />
-  <chassis name = "client" implement = "MUST" />
-  
-  <field name = "staged size" type = "longlong">
-    already staged amount
-    <doc>
-      The amount of previously-staged content in octets.  For a new
-      message this will be zero.
-    </doc>
-    <doc name = "rule">
-      The sender MUST start sending data from this octet offset in the
-      message, counting from zero.
-    </doc>
-    <doc name = "rule">
-      The recipient MAY decide how long to hold partially-staged content
-      and MAY implement staging by always discarding partially-staged
-      content.  However if it uses the file content type it MUST support
-      the staging methods.
-    </doc>
-  </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "stage" content = "1" index = "50">
-  stage message content
-  <doc>
-    This method stages the message, sending the message content to the
-    recipient from the octet offset specified in the Open-Ok method.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <chassis name = "client" implement = "MUST" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "publish" index = "60">
-  publish a message
-  <doc>
-    This method publishes a staged file message to a specific exchange.
-    The file message will be routed to queues as defined by the exchange
-    configuration and distributed to any active consumers when the
-    transaction, if any, is committed.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "write"
-      access rights to the access realm for the exchange.
-    </doc>
-  </field>
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange to publish to.  The exchange
-      name can be empty, meaning the default exchange.  If the exchange
-      name is specified, and that exchange does not exist, the server
-      will raise a channel exception.
-    </doc>
-    <doc name = "rule">
-      The server MUST accept a blank exchange name to mean the default
-      exchange.
-    </doc>
-    <doc name = "rule">
-      If the exchange was declared as an internal exchange, the server
-      MUST respond with a reply code 403 (access refused) and raise a
-      channel exception.
-    </doc>
-    <doc name = "rule">
-      The exchange MAY refuse file content in which case it MUST respond
-      with a reply code 540 (not implemented) and raise a channel
-      exception.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key for the message.  The routing key is
-      used for routing messages depending on the exchange configuration.
-    </doc>
-  </field>
-
-  <field name = "mandatory" type = "bit">
-    indicate mandatory routing
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue.  If this flag is set, the server will return an
-      unroutable message with a Return method.  If this flag is zero, the
-      server silently drops the message.
-    </doc>
-    <doc name = "rule" test = "amq_file_00">
-      The server SHOULD implement the mandatory flag.
-    </doc>
-  </field>
-
-  <field name = "immediate" type = "bit">
-    request immediate delivery
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue consumer immediately.  If this flag is set, the
-      server will return an undeliverable message with a Return method.
-      If this flag is zero, the server will queue the message, but with
-      no guarantee that it will ever be consumed.
-    </doc>
-    <doc name = "rule" test = "amq_file_00">
-      The server SHOULD implement the immediate flag.
-    </doc>
-  </field>
-
-  <field name = "identifier" type = "shortstr">
-    staging identifier
-    <doc>
-      This is the staging identifier of the message to publish.  The
-      message must have been staged.  Note that a client can send the
-      Publish method asynchronously without waiting for staging to
-      finish.
-    </doc>
-  </field>
-</method>
-
-<method name = "return" content = "1" index = "70">
-  return a failed message
-  <doc>
-    This method returns an undeliverable message that was published
-    with the "immediate" flag set, or an unroutable message published
-    with the "mandatory" flag set. The reply code and text provide
-    information about the reason that the message was undeliverable.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "reply code" domain = "reply code" />
-  <field name = "reply text" domain = "reply text" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was
-      originally published to.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "deliver" index = "80">
-  notify the client of a consumer message
-  <doc>
-    This method delivers a staged file message to the client, via a
-    consumer. In the asynchronous message delivery model, the client
-    starts a consumer using the Consume method, then the server
-    responds with Deliver methods as and when messages arrive for
-    that consumer.
-  </doc>
-  <doc name = "rule">
-    The server SHOULD track the number of times a message has been
-    delivered to clients and when a message is redelivered a certain
-    number of times - e.g. 5 times - without being acknowledged, the
-    server SHOULD consider the message to be unprocessable (possibly
-    causing client applications to abort), and move the message to a
-    dead letter queue.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "redelivered" domain = "redelivered" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was originally
-      published to.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>
-  </field>
-
-  <field name = "identifier" type = "shortstr">
-    staging identifier
-    <doc>
-      This is the staging identifier of the message to deliver.  The
-      message must have been staged.  Note that a server can send the
-      Deliver method asynchronously without waiting for staging to
-      finish.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "ack" index = "90">
-  acknowledge one or more messages
-  <doc>
-    This method acknowledges one or more messages delivered via the
-    Deliver method.  The client can ask to confirm a single message or
-    a set of messages up to and including a specific message.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <field name = "delivery tag" domain = "delivery tag" />
-      
-  <field name = "multiple" type = "bit">
-    acknowledge multiple messages
-    <doc>
-      If set to 1, the delivery tag is treated as "up to and including",
-      so that the client can acknowledge multiple messages with a single
-      method.  If set to zero, the delivery tag refers to a single
-      message.  If the multiple field is 1, and the delivery tag is zero,
-      tells the server to acknowledge all outstanding mesages.
-    </doc>
-    <doc name = "rule">
-      The server MUST validate that a non-zero delivery-tag refers to an
-      delivered message, and raise a channel exception if this is not the
-      case.
-    </doc>
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "reject" index = "100">
-  reject an incoming message
-  <doc>
-    This method allows a client to reject a message.  It can be used to
-    return untreatable messages to their original queue.  Note that file
-    content is staged before delivery, so the client will not use this
-    method to interrupt delivery of a large message.
-  </doc>
-  <doc name = "rule">
-    The server SHOULD interpret this method as meaning that the client
-    is unable to process the message at this time.
-  </doc>
-  <doc name = "rule">
-    A client MUST NOT use this method as a means of selecting messages
-    to process.  A rejected message MAY be discarded or dead-lettered,
-    not necessarily passed to another client.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-    
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "requeue" type = "bit">
-    requeue the message
-    <doc>
-      If this field is zero, the message will be discarded.  If this bit
-      is 1, the server will attempt to requeue the message.
-    </doc>
-    <doc name = "rule">
-      The server MUST NOT deliver the message to the same client within
-      the context of the current channel.  The recommended strategy is
-      to attempt to deliver the message to an alternative consumer, and
-      if that is not possible, to move the message to a dead-letter
-      queue.  The server MAY use more sophisticated tracking to hold
-      the message on the queue and redeliver it to the same client at
-      a later stage.
-    </doc>
-  </field>
-</method>
-
-</class>
-
-  <class name="stream" handler="channel" index="80">
-    <!--
-======================================================
-==       STREAMING
-======================================================
--->
-  work with streaming content
-
-<doc>
-  The stream class provides methods that support multimedia streaming.
-  The stream class uses the following semantics: one message is one
-  packet of data; delivery is unacknowleged and unreliable; the consumer
-  can specify quality of service parameters that the server can try to
-  adhere to; lower-priority messages may be discarded in favour of high
-  priority messages.
-</doc>
-
-<doc name = "grammar">
-    stream              = C:QOS S:QOS-OK
-                        / C:CONSUME S:CONSUME-OK
-                        / C:CANCEL S:CANCEL-OK
-                        / C:PUBLISH content
-                        / S:RETURN
-                        / S:DELIVER content
-</doc>
-
-<chassis name = "server" implement = "MAY" />
-<chassis name = "client" implement = "MAY" />
-
-<doc name = "rule">
-  The server SHOULD discard stream messages on a priority basis if
-  the queue size exceeds some configured limit.
-</doc>
-<doc name = "rule">
-  The server MUST implement at least 2 priority levels for stream
-  messages, where priorities 0-4 and 5-9 are treated as two distinct
-  levels. The server MAY implement up to 10 priority levels.
-</doc>
-<doc name = "rule">
-  The server MUST implement automatic acknowledgements on stream
-  content.  That is, as soon as a message is delivered to a client
-  via a Deliver method, the server must remove it from the queue.
-</doc>
-
-
-<!--  These are the properties for a Stream content  -->
-
-<field name = "content type" type = "shortstr">
-    MIME content type
-</field>
-<field name = "content encoding" type = "shortstr">
-    MIME content encoding
-</field>
-<field name = "headers" type = "table">
-    Message header field table
-</field>
-<field name = "priority" type = "octet">
-    The message priority, 0 to 9
-</field>
-<field name = "timestamp" type = "timestamp">
-    The message timestamp
-</field>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "qos" synchronous = "1" index = "10">
-  specify quality of service
-  <doc>
-    This method requests a specific quality of service.  The QoS can
-    be specified for the current channel or for all channels on the
-    connection.  The particular properties and semantics of a qos method
-    always depend on the content class semantics.  Though the qos method
-    could in principle apply to both peers, it is currently meaningful
-    only for the server.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "qos-ok" />
-
-  <field name = "prefetch size" type = "long">
-    prefetch window in octets
-    <doc>
-      The client can request that messages be sent in advance so that
-      when the client finishes processing a message, the following
-      message is already held locally, rather than needing to be sent
-      down the channel.  Prefetching gives a performance improvement.
-      This field specifies the prefetch window size in octets. May be
-      set to zero, meaning "no specific limit".  Note that other
-      prefetch limits may still apply.
-    </doc>
-  </field>
-
-  <field name = "prefetch count" type = "short">
-    prefetch window in messages
-    <doc>
-      Specifies a prefetch window in terms of whole messages.  This
-      field may be used in combination with the prefetch-size field;
-      a message will only be sent in advance if both prefetch windows
-      (and those at the channel and connection level) allow it.
-    </doc>
-  </field>
-
-  <field name = "consume rate" type = "long">
-    transfer rate in octets/second
-    <doc>
-      Specifies a desired transfer rate in octets per second. This is
-      usually determined by the application that uses the streaming
-      data.  A value of zero means "no limit", i.e. as rapidly as
-      possible.
-    </doc>
-    <doc name = "rule">
-      The server MAY ignore the prefetch values and consume rates,
-      depending on the type of stream and the ability of the server
-      to queue and/or reply it.  The server MAY drop low-priority
-      messages in favour of high-priority messages.
-    </doc>
-  </field>
-
-  <field name = "global" type = "bit">
-    apply to entire connection
-    <doc>
-      By default the QoS settings apply to the current channel only.  If
-      this field is set, they are applied to the entire connection.
-    </doc>
-  </field>
-</method>
-
-<method name = "qos-ok" synchronous = "1" index = "11">
-  confirm the requested qos
-  <doc>
-    This method tells the client that the requested QoS levels could
-    be handled by the server.  The requested QoS applies to all active
-    consumers until a new QoS is defined.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "consume" synchronous = "1" index = "20">
-  start a queue consumer
-  <doc>
-    This method asks the server to start a "consumer", which is a
-    transient request for messages from a specific queue. Consumers
-    last as long as the channel they were created on, or until the
-    client cancels them.
-  </doc>
-  <doc name = "rule">
-    The server SHOULD support at least 16 consumers per queue, unless
-    the queue was declared as private, and ideally, impose no limit
-    except as defined by available resources.
-  </doc>
-  <doc name = "rule">
-    Streaming applications SHOULD use different channels to select
-    different streaming resolutions. AMQP makes no provision for
-    filtering and/or transforming streams except on the basis of
-    priority-based selective delivery of individual messages.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "consume-ok" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "read" access
-      rights to the realm for the queue.
-    </doc>
-  </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue to consume from.  If the queue name
-      is null, refers to the current queue for the channel, which is the
-      last declared queue.
-    </doc>
-    <doc name = "rule">
-      If the client did not previously declare a queue, and the queue name
-      in this method is empty, the server MUST raise a connection exception
-      with reply code 530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Specifies the identifier for the consumer. The consumer tag is
-      local to a connection, so two clients can use the same consumer
-      tags. If this field is empty the server will generate a unique
-      tag.
-    </doc>
-    <doc name = "rule" test = "todo">
-      The tag MUST NOT refer to an existing consumer. If the client
-      attempts to create two consumers with the same non-empty tag
-      the server MUST raise a connection exception with reply code
-      530 (not allowed).
-    </doc>
-  </field>
-
-  <field name = "no local" domain = "no local" />
-
-  <field name = "exclusive" type = "bit">
-    request exclusive access
-    <doc>
-      Request exclusive consumer access, meaning only this consumer can
-      access the queue.
-    </doc>
-    <doc name = "rule" test = "amq_file_00">
-      If the server cannot grant exclusive access to the queue when asked,
-      - because there are other consumers active - it MUST raise a channel
-      exception with return code 405 (resource locked).
-    </doc>
-  </field>
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-
-<method name = "consume-ok" synchronous = "1" index = "21">
-  confirm a new consumer
-  <doc>
-    This method provides the client with a consumer tag which it may
-    use in methods that work with the consumer.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag">
-    <doc>
-      Holds the consumer tag specified by the client or provided by
-      the server.
-    </doc>
-  </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "cancel" synchronous = "1" index = "30">
-  end a queue consumer
-  <doc>
-    This method cancels a consumer.  Since message delivery is
-    asynchronous the client may continue to receive messages for
-    a short while after canceling a consumer.  It may process or
-    discard these as appropriate.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-  <response name = "cancel-ok" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "nowait" type = "bit">
-    do not send a reply method
-    <doc>
-    If set, the server will not respond to the method. The client should
-    not wait for a reply method.  If the server could not complete the
-    method it will raise a channel or connection exception.
-    </doc>
-  </field>
-</method>
-
-<method name = "cancel-ok" synchronous = "1" index = "31">
-  confirm a cancelled consumer
-  <doc>
-    This method confirms that the cancellation was completed.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "publish" content = "1" index = "40">
-  publish a message
-  <doc>
-    This method publishes a message to a specific exchange. The message
-    will be routed to queues as defined by the exchange configuration
-    and distributed to any active consumers as appropriate.
-  </doc>
-  <chassis name = "server" implement = "MUST" />
-
-  <field name = "ticket" domain = "access ticket">
-    <doc name = "rule">
-      The client MUST provide a valid access ticket giving "write"
-      access rights to the access realm for the exchange.
-    </doc>
-  </field>
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange to publish to.  The exchange
-      name can be empty, meaning the default exchange.  If the exchange
-      name is specified, and that exchange does not exist, the server
-      will raise a channel exception.
-    </doc>
-    <doc name = "rule">
-      The server MUST accept a blank exchange name to mean the default
-      exchange.
-    </doc>
-    <doc name = "rule">
-      If the exchange was declared as an internal exchange, the server
-      MUST respond with a reply code 403 (access refused) and raise a
-      channel exception.
-    </doc>
-    <doc name = "rule">
-      The exchange MAY refuse stream content in which case it MUST
-      respond with a reply code 540 (not implemented) and raise a
-      channel exception.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key for the message.  The routing key is
-      used for routing messages depending on the exchange configuration.
-    </doc>
-  </field>
-
-  <field name = "mandatory" type = "bit">
-    indicate mandatory routing
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue.  If this flag is set, the server will return an
-      unroutable message with a Return method.  If this flag is zero, the
-      server silently drops the message.
-    </doc>
-    <doc name = "rule" test = "amq_stream_00">
-      The server SHOULD implement the mandatory flag.
-    </doc>
-  </field>
-
-  <field name = "immediate" type = "bit">
-    request immediate delivery
-    <doc>
-      This flag tells the server how to react if the message cannot be
-      routed to a queue consumer immediately.  If this flag is set, the
-      server will return an undeliverable message with a Return method.
-      If this flag is zero, the server will queue the message, but with
-      no guarantee that it will ever be consumed.
-    </doc>
-    <doc name = "rule" test = "amq_stream_00">
-      The server SHOULD implement the immediate flag.
-    </doc>
-  </field>
-</method>
-
-<method name = "return" content = "1" index = "50">
-  return a failed message
-  <doc>
-    This method returns an undeliverable message that was published
-    with the "immediate" flag set, or an unroutable message published
-    with the "mandatory" flag set. The reply code and text provide
-    information about the reason that the message was undeliverable.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "reply code" domain = "reply code" />
-  <field name = "reply text" domain = "reply text" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was
-      originally published to.
-    </doc>
-  </field>
-
-  <field name = "routing key" type = "shortstr">
-     Message routing key
-    <doc>
-      Specifies the routing key name specified when the message was
-      published.
-    </doc>     
-  </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "deliver" content = "1" index = "60">
-  notify the client of a consumer message
-  <doc>
-    This method delivers a message to the client, via a consumer.  In
-    the asynchronous message delivery model, the client starts a
-    consumer using the Consume method, then the server responds with
-    Deliver methods as and when messages arrive for that consumer.
-  </doc>
-  <chassis name = "client" implement = "MUST" />
-
-  <field name = "consumer tag" domain = "consumer tag" />
-
-  <field name = "delivery tag" domain = "delivery tag" />
-
-  <field name = "exchange" domain = "exchange name">
-    <doc>
-      Specifies the name of the exchange that the message was originally
-      published to.
-    </doc>
-  </field>
-
-  <field name = "queue" domain = "queue name">
-    <doc>
-      Specifies the name of the queue that the message came from. Note
-      that a single channel can start many consumers on different
-      queues.
-    </doc>
-    <assert check = "notnull" />
-  </field>
-</method>
-  </class>
-
-  <class name="tx" handler="channel" index="90">
-    <!--
-======================================================
-==       TRANSACTIONS
-======================================================
--->
-  work with standard transactions
-
-<doc>
-  Standard transactions provide so-called "1.5 phase commit".  We can
-  ensure that work is never lost, but there is a chance of confirmations
-  being lost, so that messages may be resent.  Applications that use
-  standard transactions must be able to detect and ignore duplicate
-  messages.
-</doc>
-    <rule implement="SHOULD">
-  An client using standard transactions SHOULD be able to track all
-  messages received within a reasonable period, and thus detect and
-  reject duplicates of the same message. It SHOULD NOT pass these to
-  the application layer.
-</rule>
-    <doc name="grammar">
-    tx                  = C:SELECT S:SELECT-OK
-                        / C:COMMIT S:COMMIT-OK
-                        / C:ROLLBACK S:ROLLBACK-OK
-</doc>
-    <chassis name="server" implement="SHOULD"/>
-    <chassis name="client" implement="MAY"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="select" synchronous="1" index="10">
-select standard transaction mode
-  <doc>
-    This method sets the channel to use standard transactions.  The
-    client must use this method at least once on a channel before
-    using the Commit or Rollback methods.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <response name="select-ok"/>
-    </method>
-    <method name="select-ok" synchronous="1" index="11">
-confirm transaction mode
-  <doc>
-    This method confirms to the client that the channel was successfully
-    set to use standard transactions.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="commit" synchronous="1" index="20">
-commit the current transaction
-  <doc>
-    This method commits all messages published and acknowledged in
-    the current transaction.  A new transaction starts immediately
-    after a commit.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <response name="commit-ok"/>
-    </method>
-    <method name="commit-ok" synchronous="1" index="21">
-confirm a successful commit
-  <doc>
-    This method confirms to the client that the commit succeeded.
-    Note that if a commit fails, the server raises a channel exception.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="rollback" synchronous="1" index="30">
-abandon the current transaction
-  <doc>
-    This method abandons all messages published and acknowledged in
-    the current transaction.  A new transaction starts immediately
-    after a rollback.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <response name="rollback-ok"/>
-    </method>
-    <method name="rollback-ok" synchronous="1" index="31">
-confirm a successful rollback
-  <doc>
-    This method confirms to the client that the rollback succeeded.
-    Note that if an rollback fails, the server raises a channel exception.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-  </class>
-  <class name="dtx" handler="channel" index="100">
-    <!--
-======================================================
-==       DISTRIBUTED TRANSACTIONS
-======================================================
--->
-  work with distributed transactions
-
-<doc>
-  Distributed transactions provide so-called "2-phase commit".    The
-  AMQP distributed transaction model supports the X-Open XA
-  architecture and other distributed transaction implementations.
-  The Dtx class assumes that the server has a private communications
-  channel (not AMQP) to a distributed transaction coordinator.
-</doc>
-    <doc name="grammar">
-    dtx                 = C:SELECT S:SELECT-OK
-                          C:START S:START-OK
-</doc>
-    <chassis name="server" implement="MAY"/>
-    <chassis name="client" implement="MAY"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="select" synchronous="1" index="10">
-select standard transaction mode
-  <doc>
-    This method sets the channel to use distributed transactions.  The
-    client must use this method at least once on a channel before
-    using the Start method.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <response name="select-ok"/>
-    </method>
-    <method name="select-ok" synchronous="1" index="11">
-confirm transaction mode
-  <doc>
-    This method confirms to the client that the channel was successfully
-    set to use distributed transactions.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="start" synchronous="1" index="20">
-  start a new distributed transaction
-  <doc>
-    This method starts a new distributed transaction.  This must be
-    the first method on a new channel that uses the distributed
-    transaction mode, before any methods that publish or consume
-    messages.
-  </doc>
-      <chassis name="server" implement="MAY"/>
-      <response name="start-ok"/>
-      <field name="dtx identifier" type="shortstr">
-    transaction identifier
-    <doc>
-      The distributed transaction key. This identifies the transaction
-      so that the AMQP server can coordinate with the distributed
-      transaction coordinator.
-    </doc>
-        <assert check="notnull"/>
-      </field>
-    </method>
-    <method name="start-ok" synchronous="1" index="21">
-  confirm the start of a new distributed transaction
-  <doc>
-    This method confirms to the client that the transaction started.
-    Note that if a start fails, the server raises a channel exception.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-    </method>
-  </class>
-  <class name="tunnel" handler="tunnel" index="110">
-    <!--
-======================================================
-==       TUNNEL
-======================================================
--->
-  methods for protocol tunneling.
-
-<doc>
-  The tunnel methods are used to send blocks of binary data - which
-  can be serialised AMQP methods or other protocol frames - between
-  AMQP peers.
-</doc>
-    <doc name="grammar">
-    tunnel              = C:REQUEST
-                        / S:REQUEST
-</doc>
-    <chassis name="server" implement="MAY"/>
-    <chassis name="client" implement="MAY"/>
-    <field name="headers" type="table">
-    Message header field table
-</field>
-    <field name="proxy name" type="shortstr">
-    The identity of the tunnelling proxy
-</field>
-    <field name="data name" type="shortstr">
-    The name or type of the message being tunnelled
-</field>
-    <field name="durable" type="octet">
-    The message durability indicator
-</field>
-    <field name="broadcast" type="octet">
-    The message broadcast mode
-</field>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="request" content="1" index="10">
-  sends a tunnelled method
-  <doc>
-    This method tunnels a block of binary data, which can be an
-    encoded AMQP method or other data.  The binary data is sent
-    as the content for the Tunnel.Request method.
-  </doc>
-      <chassis name="server" implement="MUST"/>
-      <field name="meta data" type="table">
-    meta data for the tunnelled block
-    <doc>
-    This field table holds arbitrary meta-data that the sender needs
-    to pass to the recipient.
-    </doc>
-      </field>
-    </method>
-  </class>
-  <class name="test" handler="channel" index="120">
-    <!--
-======================================================
-==       TEST - CHECK FUNCTIONAL CAPABILITIES OF AN IMPLEMENTATION
-======================================================
--->
-  test functional primitives of the implementation
-
-<doc>
-  The test class provides methods for a peer to test the basic
-  operational correctness of another peer. The test methods are
-  intended to ensure that all peers respect at least the basic
-  elements of the protocol, such as frame and content organisation
-  and field types. We assume that a specially-designed peer, a
-  "monitor client" would perform such tests.
-</doc>
-    <doc name="grammar">
-    test                = C:INTEGER S:INTEGER-OK
-                        / S:INTEGER C:INTEGER-OK
-                        / C:STRING S:STRING-OK
-                        / S:STRING C:STRING-OK
-                        / C:TABLE S:TABLE-OK
-                        / S:TABLE C:TABLE-OK
-                        / C:CONTENT S:CONTENT-OK
-                        / S:CONTENT C:CONTENT-OK
-</doc>
-    <chassis name="server" implement="MUST"/>
-    <chassis name="client" implement="SHOULD"/>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="integer" synchronous="1" index="10">
-  test integer handling
-  <doc>
-    This method tests the peer's capability to correctly marshal integer
-    data.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="integer-ok"/>
-      <field name="integer 1" type="octet">
-    octet test value
-    <doc>
-      An octet integer test value.
-    </doc>
-      </field>
-      <field name="integer 2" type="short">
-    short test value
-    <doc>
-      A short integer test value.
-    </doc>
-      </field>
-      <field name="integer 3" type="long">
-    long test value
-    <doc>
-      A long integer test value.
-    </doc>
-      </field>
-      <field name="integer 4" type="longlong">
-    long-long test value
-    <doc>
-      A long long integer test value.
-    </doc>
-      </field>
-      <field name="operation" type="octet">
-    operation to test
-    <doc>
-      The client must execute this operation on the provided integer
-      test fields and return the result.
-    </doc>
-        <assert check="enum">
-          <value name="add">return sum of test values</value>
-          <value name="min">return lowest of test values</value>
-          <value name="max">return highest of test values</value>
-        </assert>
-      </field>
-    </method>
-    <method name="integer-ok" synchronous="1" index="11">
-  report integer test result
-  <doc>
-    This method reports the result of an Integer method.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <field name="result" type="longlong">
-    result value
-    <doc>
-      The result of the tested operation.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="string" synchronous="1" index="20">
-  test string handling
-  <doc>
-    This method tests the peer's capability to correctly marshal string
-    data.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="string-ok"/>
-      <field name="string 1" type="shortstr">
-    short string test value
-    <doc>
-      An short string test value.
-    </doc>
-      </field>
-      <field name="string 2" type="longstr">
-    long string test value
-    <doc>
-      A long string test value.
-    </doc>
-      </field>
-      <field name="operation" type="octet">
-    operation to test
-    <doc>
-      The client must execute this operation on the provided string
-      test fields and return the result.
-    </doc>
-        <assert check="enum">
-          <value name="add">return concatentation of test strings</value>
-          <value name="min">return shortest of test strings</value>
-          <value name="max">return longest of test strings</value>
-        </assert>
-      </field>
-    </method>
-    <method name="string-ok" synchronous="1" index="21">
-  report string test result
-  <doc>
-    This method reports the result of a String method.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <field name="result" type="longstr">
-    result value
-    <doc>
-      The result of the tested operation.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="table" synchronous="1" index="30">
-  test field table handling
-  <doc>
-    This method tests the peer's capability to correctly marshal field
-    table data.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="table-ok"/>
-      <field name="table" type="table">
-    field table of test values
-    <doc>
-      A field table of test values.
-    </doc>
-      </field>
-      <field name="integer op" type="octet">
-    operation to test on integers
-    <doc>
-      The client must execute this operation on the provided field
-      table integer values and return the result.
-    </doc>
-        <assert check="enum">
-          <value name="add">return sum of numeric field values</value>
-          <value name="min">return min of numeric field values</value>
-          <value name="max">return max of numeric field values</value>
-        </assert>
-      </field>
-      <field name="string op" type="octet">
-    operation to test on strings
-    <doc>
-      The client must execute this operation on the provided field
-      table string values and return the result.
-    </doc>
-        <assert check="enum">
-          <value name="add">return concatenation of string field values</value>
-          <value name="min">return shortest of string field values</value>
-          <value name="max">return longest of string field values</value>
-        </assert>
-      </field>
-    </method>
-    <method name="table-ok" synchronous="1" index="31">
-  report table test result
-  <doc>
-    This method reports the result of a Table method.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <field name="integer result" type="longlong">
-    integer result value
-    <doc>
-      The result of the tested integer operation.
-    </doc>
-      </field>
-      <field name="string result" type="longstr">
-    string result value
-    <doc>
-      The result of the tested string operation.
-    </doc>
-      </field>
-    </method>
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <method name="content" synchronous="1" content="1" index="40">
-  test content handling
-  <doc>
-    This method tests the peer's capability to correctly marshal content.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <response name="content-ok"/>
-    </method>
-    <method name="content-ok" synchronous="1" content="1" index="41">
-  report content test result
-  <doc>
-    This method reports the result of a Content method.  It contains the
-    content checksum and echoes the original content as provided.
-  </doc>
-      <chassis name="client" implement="MUST"/>
-      <chassis name="server" implement="MUST"/>
-      <field name="content checksum" type="long">
-    content hash
-    <doc>
-      The 32-bit checksum of the content, calculated by adding the
-      content into a 32-bit accumulator.
-    </doc>
-      </field>
-    </method>
-  </class>
-</amqp>
index fe4715d715cc96642b7793672adfaac0c326c142..90824470a4ded55e881a14a5d9be9532df334806 100644 (file)
@@ -166,6 +166,7 @@ namespace RabbitMQ.Client.Apigen {
         public int majorVersion;
         public int minorVersion;
         public string apiName;
+        private bool emitComments = false;
 
         public Type modelType = typeof(RabbitMQ.Client.Impl.IFullModel);
        public ArrayList modelTypes = new ArrayList();
@@ -206,6 +207,8 @@ namespace RabbitMQ.Client.Apigen {
                 versionOverridden = true;
                 majorVersion = int.Parse(parts[0]);
                 minorVersion = int.Parse(parts[1]);
+            } else if (opt == "/c") {
+                emitComments = true;
             } else {
                 Console.Error.WriteLine("Unsupported command-line option: " + opt);
                 Usage();
@@ -218,6 +221,7 @@ namespace RabbitMQ.Client.Apigen {
             Console.Error.WriteLine("    /apiName:<identifier>");
             Console.Error.WriteLine("    /n:<name.space.prefix>");
             Console.Error.WriteLine("    /v:<majorversion>-<minorversion>");
+            Console.Error.WriteLine("    /c");
             Console.Error.WriteLine("  The apiName option is required.");
             Environment.Exit(1);
         }
@@ -384,10 +388,12 @@ namespace RabbitMQ.Client.Apigen {
             foreach (AmqpMethod m in c.Methods) {
                 EmitAutogeneratedSummary("  ",
                                          "AMQP specification method \""+c.Name+"."+m.Name+"\".");
-                EmitLine(m.DocumentationCommentVariant("  ", "remarks"));
+                if (emitComments)
+                    EmitLine(m.DocumentationCommentVariant("  ", "remarks"));
                 EmitLine("  public interface I"+MangleMethodClass(c, m)+": IMethod {");
                 foreach (AmqpField f in m.Fields) {
-                    EmitLine(f.DocumentationComment("    "));
+                    if (emitComments)
+                        EmitLine(f.DocumentationComment("    "));
                     EmitLine("    "+MapDomain(f.Domain)+" "+MangleClass(f.Name)+" { get; }");
                 }
                 EmitLine("  }");
@@ -426,7 +432,8 @@ namespace RabbitMQ.Client.Apigen {
             EmitAutogeneratedSummary("  ",
                                      "AMQP specification content header properties for "+
                                      "content class \""+c.Name+"\"");
-            EmitLine(c.DocumentationCommentVariant("  ", "remarks"));
+            if (emitComments)
+                EmitLine(c.DocumentationCommentVariant("  ", "remarks"));
             EmitLine("  public class "+MangleClass(c.Name)
                      +"Properties: "+propertiesBaseClass+" {");
             foreach (AmqpField f in c.Fields) {
@@ -440,7 +447,8 @@ namespace RabbitMQ.Client.Apigen {
             }
             EmitLine("");
             foreach (AmqpField f in c.Fields) {
-                EmitLine(f.DocumentationComment("    ", "@label"));
+                if (emitComments)
+                    EmitLine(f.DocumentationComment("    ", "@label"));
                 EmitLine("    public "+maybeOverride+MapDomain(f.Domain)+" "+MangleClass(f.Name)+" {");
                 EmitLine("      get {");
                 EmitLine("        return m_"+MangleMethod(f.Name)+";");
index a4057a533abf8e3c2bf682db1023463e9e3cf2f2..ccf66610d84d5745ccacee216dbd7bd4d36d73d6 100644 (file)
@@ -1,3 +1,10 @@
+2009-05-22  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * WebClient_2_1.cs: Add an internal OpenPolicyReadAsync. Check 
+       result in ProcessResponse and throw if not Ok (200).
+       * WebRequest_2_1.cs: Add an internal overload to BeginGetResponse
+       from where we can handle downloading the policy.
+
 2009-05-14  Sebastien Pouliot  <sebastien@ximian.com>
 
        * DnsEndPoint_2_1.cs: Add method to return an IPEndPoint from a
index b44e20f45455ce3d16299fbf4bd62479ec7bbb83..644b89e5b12e5e72c52184519c920ce3fbfcccee 100644 (file)
@@ -937,7 +937,25 @@ namespace System.Net
                Stream ProcessResponse (WebResponse response)
                {
 //                     responseHeaders = response.Headers;
-                       return response.GetResponseStream ();
+                       HttpWebResponse hwr = (response as HttpWebResponse);
+                       if (hwr == null)
+                               throw new NotSupportedException ();
+
+                       HttpStatusCode status_code = HttpStatusCode.NotFound;
+                       Stream s = null;
+                       try {
+                               status_code = hwr.StatusCode;
+                               if (status_code == HttpStatusCode.OK)
+                                       s = response.GetResponseStream ();
+                       }
+                       catch (Exception e) {
+                               throw new WebException ("NotFound", e, WebExceptionStatus.UnknownError, response);
+                       }
+                       finally {
+                               if (status_code != HttpStatusCode.OK)
+                                       throw new WebException ("NotFound", null, WebExceptionStatus.UnknownError, response);
+                       }
+                       return s;
                }
 
                Stream ReadAll (Stream stream, int length, object userToken)
@@ -1160,10 +1178,27 @@ namespace System.Net
 
                public void OpenReadAsync (Uri address)
                {
-                       OpenReadAsync (address, null);
+                       OpenReadAsync (address, null, false);
                }
 
                public void OpenReadAsync (Uri address, object userToken)
+               {
+                       OpenReadAsync (address, userToken, false);
+               }
+
+               internal void OpenPolicyReadAsync (Uri address)
+               {
+                       switch (address.LocalPath) {
+                       case "/clientaccesspolicy.xml":
+                       case "/crossdomain.xml":
+                               OpenReadAsync (address, null, true);
+                               break;
+                       default:
+                               throw new SecurityException ();
+                       }
+               }
+
+               private void OpenReadAsync (Uri address, object userToken, bool policy)
                {
                        if (address == null)
                                throw new ArgumentNullException ("address");
@@ -1176,9 +1211,8 @@ namespace System.Net
                                        object [] args = (object []) state;
                                        WebRequest request = null;
                                        try {
-                                               request = SetupRequest ((Uri) args [0], "GET");
-                                               //WebResponse response = request.GetResponse ();
-                                               IAsyncResult asyncresult = request.BeginGetResponse (null, userToken);
+                                               request = SetupRequest (address, "GET");
+                                               IAsyncResult asyncresult = request.BeginGetResponse (null, userToken, policy);
                                                asyncresult.AsyncWaitHandle.WaitOne ();
                                                WebResponse response = request.EndGetResponse (asyncresult);
                                                Stream stream = ProcessResponse (response);
index 62baff14b24964af0b53df1d994ef76853699366..24f031cfacc66d21c4ee9743cac81beb29ae9a3f 100644 (file)
@@ -58,6 +58,11 @@ namespace System.Net {
                public abstract Stream EndGetRequestStream (IAsyncResult asyncResult);
                public abstract WebResponse EndGetResponse (IAsyncResult asyncResult);
 
+               internal virtual IAsyncResult BeginGetResponse (AsyncCallback callback, object state, bool policy)
+               {
+                       return BeginGetResponse (callback, state);
+               }
+
                public static WebRequest Create (Uri uri)
                {
                        if (uri == null)
index 2f3514c237783148e16efaeffa4ba5fc800c0090..30ff23c75bf01b07c2ff75a982c5627bf3ec5cd7 100644 (file)
@@ -1,3 +1,21 @@
+2009-05-24  Robert Jordan  <robertj@gmx.net>
+
+       * GenericTest.cs: differentiate between "Test(int)" and
+       "Test<int>(int)" to prove that the correct method is invoked.
+
+2009-05-24  Robert Jordan  <robertj@gmx.net>
+
+       * GenericTest.cs (TestCrossAppDomainChannel): disable on MS.NET as
+       some generic calls do not seem to be supported anymore. It looks
+       like a bug, though, since the same tests are passing when performed
+       over the TCP channel.
+
+2009-05-24  Robert Jordan  <robertj@gmx.net>
+
+       * GenericTest.cs (TestTcpChannel): create a unique channel and
+       unregister it upon termination. Fixes issues that were uncovered
+       by the NUnit upgrade (see Atsushi's changelogs below).
+
 2009-01-07  Atsushi Enomoto  <atsushi@ximian.com>
 
        * RemotingServicesTest.cs : mark failing test as NotWorking, and 
index 8488a8df146f540f0e788d7f8306ba2e4d66674b..f755e4386a661cadfdf0d6fb396a78c53293849c 100644 (file)
@@ -8,6 +8,7 @@
 #if NET_2_0
 
 using System;
+using System.Collections;
 using System.Runtime.Remoting;
 using System.Runtime.Remoting.Channels;
 using System.Runtime.Remoting.Channels.Tcp;
@@ -96,7 +97,7 @@ namespace MonoTests.Remoting
                
                public int Test (int i)
                {
-                       return i;
+                       return i + 500;
                }
 
                int INested.Test (int a, int b)
@@ -129,7 +130,7 @@ namespace MonoTests.Remoting
 
                public int Test (int i)
                {
-                       return i;
+                       return i + 500;
                }
 
                int INested.Test (int a, int b)
@@ -152,33 +153,51 @@ namespace MonoTests.Remoting
        [TestFixture]
        public class GenericTest
        {
+               // Under MS.NET, INested.Test<V>(V v) isn't supported over the
+               // xappdom channel anymore (as of .NET 3.5). The stacktrace
+               // looks like if INested.Test(int) is invoked in place of
+               // INested.Test<int>(int).
+               [Category("NotDotNet")]
                [Test]
                public void TestCrossAppDomainChannel ()
                {
-                       RunTests (GetRemObject <Server<object>> ());
+                       RunTests (RegisterAndConnect <Server<object>> ());
                }
 
                [Test]
-               [Ignore ("disabled as it got not working by NUnit upgrade to 2.4.8 (applies to .NET too)")]
                public void TestTcpChannel ()
                {
-                       RunTests (GetRemObjectTcp <Server<object>> ());
+                       IDictionary props = new Hashtable ();
+                       props ["name"] = Guid.NewGuid ().ToString("N");
+                       props ["port"] = 18191;
+                       TcpChannel chan = new TcpChannel (props, null, null);
+                       ChannelServices.RegisterChannel (chan);
+                       
+                       try {
+                               Register <Server<object>> ("gentcptest.rem");
+                               RunTests (Connect <Server<object>> ("tcp://localhost:18191/gentcptest.rem"));
+                       } finally {
+                               ChannelServices.UnregisterChannel (chan);
+                       }
                }
 
-               static T GetRemObject <T> () where T: MarshalByRefObject
+               static T RegisterAndConnect <T> () where T: MarshalByRefObject
                {
-                       AppDomain d = BaseCallTest.CreateDomain ("Foo");
+                       AppDomain d = BaseCallTest.CreateDomain ("GenericTests");
                        return (T) d.CreateInstanceAndUnwrap (
                                typeof (T).Assembly.FullName,
                                typeof (T).FullName);
                }
 
-               static T GetRemObjectTcp <T> () where T: MarshalByRefObject
+               static void Register <T> (string uri) where T: MarshalByRefObject
                {
-                       new TcpChannel (18191);
                        object obj = Activator.CreateInstance (typeof(T));
-                       RemotingServices.Marshal ((MarshalByRefObject)obj, "test.rem");
-                       return (T) RemotingServices.Connect (typeof (T), "tcp://localhost:18191/test.rem");
+                       RemotingServices.Marshal ((MarshalByRefObject)obj, uri);
+               }
+
+               static T Connect <T> (string uri) where T: MarshalByRefObject
+               {
+                       return (T) RemotingServices.Connect (typeof (T), uri);
                }
 
                static void RunTests (ServerBase<object> rem)
@@ -200,7 +219,7 @@ namespace MonoTests.Remoting
                        Assert.AreEqual (42, cao.Test (),
                                         "#5a calling INested.Test ()");
 
-                       Assert.AreEqual (42, cao.Test (42),
+                       Assert.AreEqual (42 + 500, cao.Test (42),
                                         "#5 calling INested.Test (int)");
 
                        Assert.AreEqual (42, cao.Test (21, 21),
@@ -216,7 +235,7 @@ namespace MonoTests.Remoting
                        Assert.AreEqual (42, cao.Test (),
                                         "#9a calling INested.Test ()");
 
-                       Assert.AreEqual (42, cao.Test (42),
+                       Assert.AreEqual (42 + 500, cao.Test (42),
                                         "#9 calling INested.Test (int)");
 
                        Assert.AreEqual (42, cao.Test (21, 21),
index 8d759ce83ce3afe515d224946ae1262bb3694ed5..35c0b0e7baa25e433a94debde79a13c1bbb8c35a 100755 (executable)
@@ -1,3 +1,9 @@
+2009-05-25  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * SerializationMap.cs, XmlFormatterSerializer.cs :
+         collection types should not output xsi:type e.g. IList<T> should
+         not exposed xsi:type as xsi:type=List`1.
+
 2009-05-18  Atsushi Enomoto  <atsushi@ximian.com>
 
        * SerializationMap.cs, XmlFormatterDeserializer.cs,
index ce1638ea5c6dfedd2cf2095bdff97fb1e31e1027..fd6416066762942aeaaaa804a70256c8a406a8fc 100644 (file)
@@ -108,6 +108,10 @@ namespace System.Runtime.Serialization
                        Members = new List<DataMemberInfo> ();
                }
 
+               public virtual bool OutputXsiType {
+                       get { return true; }
+               }
+
                public QName XmlName { get; set; }
 
                public CollectionDataContractAttribute GetCollectionDataContractAttribute (Type type)
@@ -589,6 +593,10 @@ namespace System.Runtime.Serialization
                        }
                }
 
+               public override bool OutputXsiType {
+                       get { return false; }
+               }
+
                internal virtual string CurrentNamespace {
                        get {
                                string ns = element_qname.Namespace;
index a3364899e6db8ef892478312d4b1f4fbe2a63eed..bdcca7441d6aaed9c2297fddc31e4332fe63bc13 100644 (file)
@@ -88,7 +88,15 @@ namespace System.Runtime.Serialization
                                writer.WriteAttributeString ("nil", XmlSchema.InstanceNamespace, "true");
                        else {
                                Type actualType = graph.GetType ();
-                               if (actualType != type) {
+
+                               SerializationMap map = types.FindUserMap (actualType);
+                               if (map == null) {
+                                       /* Unknown actual type */
+                                       types.Add (actualType);
+                                       map = types.FindUserMap (actualType);
+                               }
+
+                               if (actualType != type && (map == null || map.OutputXsiType)) {
                                        QName qname = types.GetXmlName (actualType);
                                        string name = qname.Name;
                                        string ns = qname.Namespace;
@@ -107,7 +115,7 @@ namespace System.Runtime.Serialization
                                if (predef != QName.Empty)
                                        SerializePrimitive (type, graph, predef);
                                else
-                                       SerializeNonPrimitive (type, graph);
+                                       map.Serialize (graph, this);
                        }
                }
 
@@ -130,20 +138,6 @@ namespace System.Runtime.Serialization
                {
                        writer.WriteEndElement ();
                }
-
-               public void SerializeNonPrimitive (Type type, object graph)
-               {
-                       Type actualType = graph.GetType ();
-
-                       SerializationMap map = types.FindUserMap (actualType);
-                       if (map == null) {
-                               /* Unknown actual type */
-                               types.Add (actualType);
-                               map = types.FindUserMap (actualType);
-                       }
-
-                       map.Serialize (graph, this);
-               }
        }
 }
 #endif
index 2aa0bbb9b86afcce568b4fa8f591445ec37c29f2..d40d9ef4054b3eb5c78081e6f3f6fc0a0a17e8f0 100755 (executable)
@@ -1,3 +1,13 @@
+2009-05-23  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XmlBinaryDictionaryReader.cs : fix regression on stream consumption
+         excess.
+
+2009-05-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XmlBinaryDictionaryReader.cs : ReadContentString() returned
+         doubled string result.
+
 2009-05-19  Atsushi Enomoto  <atsushi@ximian.com>
 
        * XmlBinaryDictionaryReader.cs : fix utf16 array on getting its
index eae87dc1b472061171e357de5fa32cfa74a7f4dd..0352d772c4afec174675d73fb496f97f75fad76b 100644 (file)
@@ -72,6 +72,8 @@ namespace System.Xml
 
                        public int ReadByte ()
                        {
+                               if (reader.PeekChar () < 0)
+                                       return -1;
                                return reader.ReadByte ();
                        }
 
@@ -1045,7 +1047,7 @@ namespace System.Xml
 
                public override string ReadContentAsString ()
                {
-                       string value = Value;
+                       string value = String.Empty;
                        do {
                                switch (NodeType) {
                                case XmlNodeType.Element:
index f6aebba25d789b8863cb0525785476c1260dae9e..88386917a2b1a512aac3cb10cdba97540a7fe348 100755 (executable)
@@ -1,3 +1,12 @@
+2009-05-26  Astushi Enomoto  <atsushi@ximian.com>
+
+       * System.ServiceModel.dll.sources: cosmetic file renaming.
+
+2009-05-25  Astushi Enomoto  <atsushi@ximian.com>
+
+       * System.ServiceModel.dll_test.sources:
+         added PeerResolverSerializationTest.cs.
+
 2009-05-15  Astushi Enomoto  <atsushi@ximian.com>
 
        * System.ServiceModel.dll_test.sources: added MessageFaultTest.cs.
index b36983923cf69727b4974943b92e26e251f0e6c5..a5bbc686a3c457ea4a810d864ff3117de678b1c5 100644 (file)
@@ -3,7 +3,7 @@
 //
 // Author: Atsushi Enomoto (atsushi@ximian.com)
 //
-// Copyright (C) 2005 Novell, Inc (http://www.novell.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
@@ -192,19 +192,21 @@ namespace System.ServiceModel.Channels
                {
                }
 
-               public BinaryMessageEncoder (BinaryMessageEncoderFactory owner)
+               public BinaryMessageEncoder (BinaryMessageEncoderFactory owner, bool session)
                {
                        this.owner = owner;
+                       this.session = session;
                }
 
                BinaryMessageEncoderFactory owner;
+               bool session;
 
                public override string ContentType {
-                       get { return "application/soap+msbin1"; }
+                       get { return MediaType; }
                }
 
                public override string MediaType {
-                       get { return "application/soap+msbin1"; }
+                       get { return session ? "application/soap+msbinsession1" : "application/soap+msbin1"; }
                }
 
                public override MessageVersion MessageVersion {
@@ -244,7 +246,7 @@ namespace System.ServiceModel.Channels
                                throw new ProtocolException ("Only content type 'application/soap+msbin1' is allowed.");
 
                        return Message.CreateMessage (
-                               XmlDictionaryReader.CreateBinaryReader (stream, soap_dictionary, owner != null ? owner.Owner.ReaderQuotas : new XmlDictionaryReaderQuotas (), CurrentReaderSession),
+                               XmlDictionaryReader.CreateBinaryReader (stream, soap_dictionary, owner != null ? owner.Owner.ReaderQuotas : new XmlDictionaryReaderQuotas (), session ? CurrentReaderSession : null),
                                maxSizeOfHeaders, MessageVersion);
                }
 
index 86de4e0902024ee993114e3026b9b6ef30e92bbb..95ee4283f07dc6a720f7033db4cb1648f7ada2a7 100644 (file)
@@ -40,7 +40,7 @@ namespace System.ServiceModel.Channels
                        BinaryMessageEncodingBindingElement owner)
                {
                        this.owner = owner;
-                       encoder = new BinaryMessageEncoder (this);
+                       encoder = new BinaryMessageEncoder (this, false);
                }
 
                public BinaryMessageEncodingBindingElement Owner {
@@ -55,5 +55,10 @@ namespace System.ServiceModel.Channels
                public override MessageVersion MessageVersion {
                        get { return MessageVersion.Default; }
                }
+
+               public override MessageEncoder CreateSessionEncoder ()
+               {
+                       return new BinaryMessageEncoder (this, true);
+               }
        }
 }
index 15ad7d7c4257842c529e76aae2660f1d6bee4315..3c9b3bf46adb542d6d38256dbea3f2806817b076 100755 (executable)
@@ -1,3 +1,50 @@
+2009-05-26  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * DuplexSessionChannelBase.cs, DuplexChannelBase.cs:
+         rename from former to latter.
+
+2009-05-25  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * TcpDuplexSessionChannel.cs : reader does not always return full
+         buffer (depending on the stream).
+
+2009-05-25  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * PeerDuplexChannel.cs, PeerOutputChannel.cs : use new PeerNode.ctor.
+
+2009-05-25  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * PeerCustomResolverBindingElement.cs : (Resolve) returned addresses
+         could be null.
+
+2009-05-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ChannelManagerBase.cs : there was annoying non-2.1 stuff.
+
+2009-05-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * TcpChannelListener.cs, TcpChannelFactory.cs : get reader quotas.
+
+2009-05-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ChannelManagerBase.cs : fix wrong session channel detection.
+
+2009-05-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * BinaryMessageEncoderFactory.cs, BinaryMessageEncoder.cs
+         This encoder factory implements CreateSessionEncoder() and binary
+         encoder does support session transmit, in different media type.
+       * ChannelManagerBase.cs : added utility method to create appropriate
+         encoder.
+       * HttpChannelFactory.cs, HttpChannelListener.cs,
+         MsmqChannelFactory.cs, MsmqChannelListener.cs,
+         PeerChannelFactory.cs, PeerChannelListener.cs,
+         TcpChannelFactory.cs, TcpChannelListener.cs : use above.
+
+2009-05-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * TcpDuplexSessionChannel.cs : add ReplyTo header.
+
 2009-05-21  Atsushi Enomoto  <atsushi@ximian.com>
 
        * DuplexSessionBase.cs : new file, for session implementation.
index 8676cd86811f3eaa92bc69c6814176531e35fd72..7541ca08a04d2b9f214f7d1572308ff252e23e9b 100644 (file)
@@ -59,5 +59,21 @@ namespace System.ServiceModel.Channels
                TimeSpan IDefaultCommunicationTimeouts.SendTimeout {
                        get { return DefaultSendTimeout; }
                }
+
+               internal MessageEncoder CreateEncoder<TChannel> (MessageEncodingBindingElement mbe)
+               {
+                       var f = mbe.CreateMessageEncoderFactory ();
+                       var t = typeof (TChannel);
+                       if (t == typeof (IRequestSessionChannel) ||
+#if !NET_2_1
+                           t == typeof (IReplySessionChannel) ||
+#endif
+                           t == typeof (IInputSessionChannel) ||
+                           t == typeof (IOutputSessionChannel) ||
+                           t == typeof (IDuplexSessionChannel))
+                               return f.CreateSessionEncoder ();
+                       else
+                               return f.Encoder;
+               }
        }
 }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexChannelBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexChannelBase.cs
new file mode 100644 (file)
index 0000000..07db03f
--- /dev/null
@@ -0,0 +1,159 @@
+// 
+// DuplexSessionChannelBase.cs
+// 
+// Author:
+//     Marcos Cobena (marcoscobena@gmail.com)
+//     Atsushi Enomoto  <atsushi@ximian.com>
+// 
+// Copyright 2007 Marcos Cobena (http://www.youcannoteatbits.org/)
+// 
+// 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.
+//
+
+using System;
+using System.ServiceModel.Channels;
+
+namespace System.ServiceModel.Channels
+{
+       internal abstract class DuplexChannelBase : ChannelBase, IDuplexChannel
+       {
+               ChannelFactoryBase channel_factory_base;
+               ChannelListenerBase channel_listener_base;
+               EndpointAddress local_address;
+               EndpointAddress remote_address;
+               Uri via;
+               
+               public DuplexChannelBase (ChannelFactoryBase factory, EndpointAddress remoteAddress, Uri via) : base (factory)
+               {
+                       channel_factory_base = factory;
+                       remote_address = remoteAddress;
+                       this.via = via;
+                       SetupDelegates ();
+               }
+               
+               public DuplexChannelBase (ChannelListenerBase listener) : base (listener)
+               {
+                       channel_listener_base = listener;
+                       SetupDelegates ();
+               }
+
+               public abstract EndpointAddress LocalAddress { get; }
+               
+               public EndpointAddress RemoteAddress {
+                       get { return remote_address; }
+               }
+
+               public Uri Via {
+                       get { return via; }
+               }
+
+               void SetupDelegates ()
+               {
+                       send_handler = new AsyncSendHandler (Send);
+                       receive_handler = new AsyncReceiveHandler (Receive);
+                       wait_handler = new AsyncWaitForMessageHandler (WaitForMessage);
+               }
+
+               // Send
+
+               delegate void AsyncSendHandler (Message message, TimeSpan timeout);
+               AsyncSendHandler send_handler;
+
+               public virtual IAsyncResult BeginSend (Message message, AsyncCallback callback, object state)
+               {
+                       return BeginSend (message, DefaultSendTimeout, callback, state);
+               }
+
+               public virtual IAsyncResult BeginSend (Message message, TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return send_handler.BeginInvoke (message, timeout, callback, state);
+               }
+
+               public virtual void EndSend (IAsyncResult result)
+               {
+                       send_handler.EndInvoke (result);
+               }
+
+               public virtual void Send (Message message)
+               {
+                       Send (message, this.DefaultSendTimeout);
+               }
+
+               public abstract void Send (Message message, TimeSpan timeout);
+
+               // Receive
+
+               delegate Message AsyncReceiveHandler (TimeSpan timeout);
+               AsyncReceiveHandler receive_handler;
+
+               public virtual IAsyncResult BeginReceive (AsyncCallback callback, object state)
+               {
+                       return BeginReceive (this.DefaultReceiveTimeout, callback, state);
+               }
+
+               public virtual IAsyncResult BeginReceive (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return receive_handler.BeginInvoke (timeout, callback, state);
+               }
+
+               public virtual Message EndReceive (IAsyncResult result)
+               {
+                       return receive_handler.EndInvoke (result);
+               }
+
+               public virtual Message Receive ()
+               {
+                       return Receive (this.DefaultReceiveTimeout);
+               }
+
+               public abstract Message Receive (TimeSpan timeout);
+
+               // TryReceive
+               // FIXME: apply those "async to call sync" pattern too (but how?)
+
+               public abstract IAsyncResult BeginTryReceive (TimeSpan timeout, AsyncCallback callback, object state);
+               
+               public abstract bool EndTryReceive (IAsyncResult result, out Message message);
+               
+               public virtual bool TryReceive (TimeSpan timeout, out Message message)
+               {
+                       return EndTryReceive (BeginTryReceive (timeout, null, null), out message);
+               }
+
+               // WaitForMessage
+
+               delegate bool AsyncWaitForMessageHandler (TimeSpan timeout);
+               AsyncWaitForMessageHandler wait_handler;
+
+               public virtual IAsyncResult BeginWaitForMessage (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return wait_handler.BeginInvoke (timeout, callback, state);
+               }
+               
+               public virtual bool EndWaitForMessage (IAsyncResult result)
+               {
+                       return wait_handler.EndInvoke (result);
+               }
+               
+               public abstract bool WaitForMessage (TimeSpan timeout);
+       }
+}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexSessionChannelBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexSessionChannelBase.cs
deleted file mode 100644 (file)
index 07db03f..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-// 
-// DuplexSessionChannelBase.cs
-// 
-// Author:
-//     Marcos Cobena (marcoscobena@gmail.com)
-//     Atsushi Enomoto  <atsushi@ximian.com>
-// 
-// Copyright 2007 Marcos Cobena (http://www.youcannoteatbits.org/)
-// 
-// 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.
-//
-
-using System;
-using System.ServiceModel.Channels;
-
-namespace System.ServiceModel.Channels
-{
-       internal abstract class DuplexChannelBase : ChannelBase, IDuplexChannel
-       {
-               ChannelFactoryBase channel_factory_base;
-               ChannelListenerBase channel_listener_base;
-               EndpointAddress local_address;
-               EndpointAddress remote_address;
-               Uri via;
-               
-               public DuplexChannelBase (ChannelFactoryBase factory, EndpointAddress remoteAddress, Uri via) : base (factory)
-               {
-                       channel_factory_base = factory;
-                       remote_address = remoteAddress;
-                       this.via = via;
-                       SetupDelegates ();
-               }
-               
-               public DuplexChannelBase (ChannelListenerBase listener) : base (listener)
-               {
-                       channel_listener_base = listener;
-                       SetupDelegates ();
-               }
-
-               public abstract EndpointAddress LocalAddress { get; }
-               
-               public EndpointAddress RemoteAddress {
-                       get { return remote_address; }
-               }
-
-               public Uri Via {
-                       get { return via; }
-               }
-
-               void SetupDelegates ()
-               {
-                       send_handler = new AsyncSendHandler (Send);
-                       receive_handler = new AsyncReceiveHandler (Receive);
-                       wait_handler = new AsyncWaitForMessageHandler (WaitForMessage);
-               }
-
-               // Send
-
-               delegate void AsyncSendHandler (Message message, TimeSpan timeout);
-               AsyncSendHandler send_handler;
-
-               public virtual IAsyncResult BeginSend (Message message, AsyncCallback callback, object state)
-               {
-                       return BeginSend (message, DefaultSendTimeout, callback, state);
-               }
-
-               public virtual IAsyncResult BeginSend (Message message, TimeSpan timeout, AsyncCallback callback, object state)
-               {
-                       return send_handler.BeginInvoke (message, timeout, callback, state);
-               }
-
-               public virtual void EndSend (IAsyncResult result)
-               {
-                       send_handler.EndInvoke (result);
-               }
-
-               public virtual void Send (Message message)
-               {
-                       Send (message, this.DefaultSendTimeout);
-               }
-
-               public abstract void Send (Message message, TimeSpan timeout);
-
-               // Receive
-
-               delegate Message AsyncReceiveHandler (TimeSpan timeout);
-               AsyncReceiveHandler receive_handler;
-
-               public virtual IAsyncResult BeginReceive (AsyncCallback callback, object state)
-               {
-                       return BeginReceive (this.DefaultReceiveTimeout, callback, state);
-               }
-
-               public virtual IAsyncResult BeginReceive (TimeSpan timeout, AsyncCallback callback, object state)
-               {
-                       return receive_handler.BeginInvoke (timeout, callback, state);
-               }
-
-               public virtual Message EndReceive (IAsyncResult result)
-               {
-                       return receive_handler.EndInvoke (result);
-               }
-
-               public virtual Message Receive ()
-               {
-                       return Receive (this.DefaultReceiveTimeout);
-               }
-
-               public abstract Message Receive (TimeSpan timeout);
-
-               // TryReceive
-               // FIXME: apply those "async to call sync" pattern too (but how?)
-
-               public abstract IAsyncResult BeginTryReceive (TimeSpan timeout, AsyncCallback callback, object state);
-               
-               public abstract bool EndTryReceive (IAsyncResult result, out Message message);
-               
-               public virtual bool TryReceive (TimeSpan timeout, out Message message)
-               {
-                       return EndTryReceive (BeginTryReceive (timeout, null, null), out message);
-               }
-
-               // WaitForMessage
-
-               delegate bool AsyncWaitForMessageHandler (TimeSpan timeout);
-               AsyncWaitForMessageHandler wait_handler;
-
-               public virtual IAsyncResult BeginWaitForMessage (TimeSpan timeout, AsyncCallback callback, object state)
-               {
-                       return wait_handler.BeginInvoke (timeout, callback, state);
-               }
-               
-               public virtual bool EndWaitForMessage (IAsyncResult result)
-               {
-                       return wait_handler.EndInvoke (result);
-               }
-               
-               public abstract bool WaitForMessage (TimeSpan timeout);
-       }
-}
index 38c247adeeda45a003e21612d406f3c968088f6a..c59b395255c170c7a347e12b18655719ca45251c 100644 (file)
@@ -48,7 +48,7 @@ namespace System.ServiceModel.Channels
                        foreach (BindingElement be in ctx.RemainingBindingElements) {
                                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                                if (mbe != null) {
-                                       encoder = mbe.CreateMessageEncoderFactory ().Encoder;
+                                       encoder = CreateEncoder<TChannel> (mbe);
                                        break;
                                }
                        }
index 98d31da1bdab81828e39b31294e627809150e1af..c5d68fb35e917f784a54b1e95689b390df13a0bd 100644 (file)
@@ -58,7 +58,7 @@ namespace System.ServiceModel.Channels
                        foreach (BindingElement be in context.RemainingBindingElements) {
                                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                                if (mbe != null) {
-                                       encoder = mbe.CreateMessageEncoderFactory ().Encoder;
+                                       encoder = CreateEncoder<TChannel> (mbe);
                                        break;
                                }
                        }
index 9b964a1103d491d9708dda0293456b81ea8225f7..d10dd7fa74cdddde7046880f7a2e275692401337 100644 (file)
@@ -48,7 +48,7 @@ namespace System.ServiceModel.Channels
                        foreach (BindingElement be in ctx.RemainingBindingElements) {
                                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                                if (mbe != null) {
-                                       encoder = mbe.CreateMessageEncoderFactory ().Encoder;
+                                       encoder = CreateEncoder<TChannel> (mbe);
                                        break;
                                }
                        }
index f6ac287780a03b2db7b568658960b5c4502a759a..36717bb48511a2885968a207c4a5345ac4f8c020 100644 (file)
@@ -59,7 +59,7 @@ namespace System.ServiceModel.Channels
                        foreach (BindingElement be in context.RemainingBindingElements) {
                                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                                if (mbe != null) {
-                                       encoder = mbe.CreateMessageEncoderFactory ().Encoder;
+                                       encoder = CreateEncoder<TChannel> (mbe);
                                        break;
                                }
                        }
index 177ab913d22cabfecc85606b4bf9cff286bd8224..749d61a9fbf04282c239e61eabcd8d814296f492 100755 (executable)
@@ -47,7 +47,7 @@ namespace System.ServiceModel.Channels
                        foreach (BindingElement be in ctx.RemainingBindingElements) {
                                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                                if (mbe != null) {
-                                       encoder = mbe.CreateMessageEncoderFactory ().Encoder;
+                                       encoder = CreateEncoder<TChannel> (mbe);
                                        break;
                                }
                        }
index fdfea9ddfdd53002d0f24b3ea8bf00e8669d79b1..6b559150148e8b9ca8bbbc770c633c1ab2b470b7 100755 (executable)
@@ -57,7 +57,7 @@ namespace System.ServiceModel.Channels
                        foreach (BindingElement be in context.RemainingBindingElements) {
                                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                                if (mbe != null) {
-                                       encoder = mbe.CreateMessageEncoderFactory ().Encoder;
+                                       encoder = CreateEncoder<TChannel> (mbe);
                                        break;
                                }
                        }
index 277917557ec98b0c6ad4a87dcea3400a68d6513a..33b3aee99d6ad6858f0a172f714942b966fca563 100755 (executable)
@@ -142,7 +142,7 @@ namespace System.ServiceModel.Channels
                        string meshId, int maxAddresses, TimeSpan timeout)
                {
                        client.OperationTimeout = timeout;
-                       return new ReadOnlyCollection<PeerNodeAddress> (client.Resolve (new ResolveInfo (client_id, meshId, maxAddresses)).Addresses);
+                       return new ReadOnlyCollection<PeerNodeAddress> (client.Resolve (new ResolveInfo (client_id, meshId, maxAddresses)).Addresses ?? new PeerNodeAddress [0]);
                }
 
                public override void Unregister (object registrationId,
index dd638baf60502aa27567069dd2bed3400b96dad4..f28a9edd6dbca397791563a1be54c4f182b3fb9e 100755 (executable)
@@ -51,10 +51,9 @@ namespace System.ServiceModel.Channels
                        this.factory = factory;
                        this.resolver = resolver;
 
-                       string mesh = RemoteAddress.Uri.Host;
                        // It could be opened even with empty list of PeerNodeAddresses.
                        // So, do not create PeerNode per PeerNodeAddress, but do it with PeerNodeAddress[].
-                       node = new PeerNodeImpl (resolver, mesh, factory.Source.Port);
+                       node = new PeerNodeImpl (resolver, RemoteAddress, factory.Source.Port);
                }
 
                // FIXME: receive local_address too
@@ -126,10 +125,9 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
 
-               [MonoTODO]
                protected override void OnClose (TimeSpan timeout)
                {
-                       throw new NotImplementedException ();
+                       node.Close (timeout);
                }
                
                [MonoTODO]
index 1e0fdcc19d3ab27333f3609d2e6fc8c1b8190f7e..a75927f44e95cc9f87126e83b57ce9534083a4db 100755 (executable)
@@ -49,10 +49,9 @@ namespace System.ServiceModel.Channels
                        this.factory = factory;
                        this.resolver = resolver;
 
-                       string mesh = RemoteAddress.Uri.Host;
                        // It could be opened even with empty list of PeerNodeAddresses.
                        // So, do not create PeerNode per PeerNodeAddress, but do it with PeerNodeAddress[].
-                       node = new PeerNodeImpl (resolver, mesh, factory.Source.Port);
+                       node = new PeerNodeImpl (resolver, RemoteAddress, factory.Source.Port);
                }
 
                // OutputChannelBase
@@ -89,10 +88,9 @@ namespace System.ServiceModel.Channels
                        throw new NotImplementedException ();
                }
 
-               [MonoTODO]
                protected override void OnClose (TimeSpan timeout)
                {
-                       throw new NotImplementedException ();
+                       node.Close (timeout);
                }
                
                [MonoTODO]
index 9bc4d79f3244aacb7e0e2aef8dcabe927cdce610..c7c82bb7ce0468294c3861eeff53a028c4b7a57a 100644 (file)
@@ -15,27 +15,24 @@ using System.ServiceModel;
 using System.ServiceModel.Description;
 using System.ServiceModel.Security;
 using System.Text;
+using System.Xml;
 
 namespace System.ServiceModel.Channels
 {
        internal class TcpChannelInfo
        {
-               public TcpChannelInfo (TcpTransportBindingElement element, MessageEncoder encoder)
+               public TcpChannelInfo (TcpTransportBindingElement element, MessageEncoder encoder, XmlDictionaryReaderQuotas readerQuotas)
                {
-                       this.element = element;
-                       this.encoder = encoder;
+                       this.BindingElement = element;
+                       this.MessageEncoder = encoder;
+                       this.ReaderQuotas = readerQuotas ?? new XmlDictionaryReaderQuotas ();
                }
 
-               TcpTransportBindingElement element;
-               MessageEncoder encoder;
+               public TcpTransportBindingElement BindingElement { get; private set; }
 
-               public TcpTransportBindingElement BindingElement {
-                       get { return element; }
-               }
+               public MessageEncoder MessageEncoder { get; private set; }
 
-               public MessageEncoder MessageEncoder {
-                       get { return encoder; }
-               }
+               public XmlDictionaryReaderQuotas ReaderQuotas { get; private set; }
        }
 
        internal class TcpChannelFactory<TChannel> : ChannelFactoryBase<TChannel>
@@ -46,16 +43,18 @@ namespace System.ServiceModel.Channels
                public TcpChannelFactory (TcpTransportBindingElement source, BindingContext ctx)
                {
                        MessageEncoder encoder = null;
+                       XmlDictionaryReaderQuotas quotas = null;
                        foreach (BindingElement be in ctx.RemainingBindingElements) {
                                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                                if (mbe != null) {
-                                       encoder = mbe.CreateMessageEncoderFactory ().Encoder;
+                                       encoder = CreateEncoder<TChannel> (mbe);
+                                       quotas = mbe.GetProperty<XmlDictionaryReaderQuotas> (ctx);
                                        break;
                                }
                        }
                        if (encoder == null)
                                encoder = new BinaryMessageEncoder ();
-                       info = new TcpChannelInfo (source, encoder);
+                       info = new TcpChannelInfo (source, encoder, quotas);
                }
 
                [MonoTODO]
index 6c7be7f06457c31edf0323c0bfa9f80da8a9cb23..f5b813911e99660a8aaea66a5aa4aac5e10cdfd3 100644 (file)
@@ -14,6 +14,7 @@ using System.Net;
 using System.Net.Sockets;
 using System.ServiceModel.Description;
 using System.Text;
+using System.Xml;
 
 namespace System.ServiceModel.Channels
 {
@@ -32,6 +33,8 @@ namespace System.ServiceModel.Channels
                                           BindingContext context) : base (context.Binding)
                {
                        MessageEncoder encoder = null;
+                       XmlDictionaryReaderQuotas quotas = null;
+
                        if (context.ListenUriMode == ListenUriMode.Explicit)
                                listen_uri =
                                        context.ListenUriRelativeAddress != null ?
@@ -43,7 +46,8 @@ namespace System.ServiceModel.Channels
                        foreach (BindingElement be in context.RemainingBindingElements) {
                                MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
                                if (mbe != null) {
-                                       encoder = mbe.CreateMessageEncoderFactory ().Encoder;
+                                       encoder = CreateEncoder<TChannel> (mbe);
+                                       quotas = mbe.GetProperty<XmlDictionaryReaderQuotas> (context);
                                        break;
                                }
                        }
@@ -51,7 +55,7 @@ namespace System.ServiceModel.Channels
                        if (encoder == null)
                                encoder = new BinaryMessageEncoder ();
 
-                       info = new TcpChannelInfo (source, encoder);
+                       info = new TcpChannelInfo (source, encoder, quotas);
                }
                
                public override Uri Uri {
index cf46395157113f41df31a64f64e5e3376476cfd4..cd3dbde1132cc0b97b25ecb8d048949a81c2ac08 100644 (file)
@@ -110,10 +110,11 @@ namespace System.ServiceModel.Channels
                
                public override void Send (Message message, TimeSpan timeout)
                {
-                       // FIXME: add MessageID and ReplyTo (might not be here; it's likely in session channel in common)
-
                        if (!is_service_side && message.Headers.To == null)
                                message.Headers.To = RemoteAddress.Uri;
+                       if (!is_service_side && message.Headers.ReplyTo == null)
+                               message.Headers.ReplyTo = new EndpointAddress (Constants.WsaAnonymousUri);
+
                        client.SendTimeout = (int) timeout.TotalMilliseconds;
                        frame.WriteSizedMessage (message);
                        // FIXME: should EndRecord be sent here?
@@ -339,8 +340,8 @@ namespace System.ServiceModel.Channels
                                throw new InvalidOperationException ("The message is too large.");
 
                        byte [] buffer = new byte [length];
-                       reader.Read (buffer, 0, length);
-                       
+                       for (int readSize = 0; readSize < length; )
+                               readSize += reader.Read (buffer, readSize, length - readSize);
                        return buffer;
                }
 
index bf487eabdff8efffb3a9a9968b15caba64384851..33f1440bdc95c189d7aa20f1281a8f5584525701 100755 (executable)
@@ -165,8 +165,8 @@ System.ServiceModel.Channels/CustomBinding.cs
 System.ServiceModel.Channels/DeliveryFailure.cs
 System.ServiceModel.Channels/DeliveryStatus.cs
 System.ServiceModel.Channels/DirectionalAction.cs
+System.ServiceModel.Channels/DuplexChannelBase.cs
 System.ServiceModel.Channels/DuplexSessionBase.cs
-System.ServiceModel.Channels/DuplexSessionChannelBase.cs
 System.ServiceModel.Channels/FaultConverter.cs
 System.ServiceModel.Channels/HostedTransportConfiguration.cs
 System.ServiceModel.Channels/HtmlizedException.cs
index 9ecded451f94627f46df48348c36f2c5bc47412c..b86d1658f149fb216cbc386deeaa9eb2e51130fa 100755 (executable)
@@ -1,3 +1,13 @@
+2009-05-25  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * PeerNode.cs : if Resolve() returns no address, create a new peer
+         address here, and shut it down when it is closed.
+
+2009-05-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ClientRuntimeChannel.cs, ServiceRuntimeChannel.cs :
+         IDuplexSession was not supported.
+
 2009-05-13  Atsushi Enomoto  <atsushi@ximian.com>
 
        * OperationContext.cs : missing from the previous commit (remove
index 5cc13b8b4fe5396e447b7e887f3aeb7d5b47332c..c8f2658cf7039be0a7e3796333c3ae4fef2129e7 100644 (file)
@@ -32,6 +32,7 @@ using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
 using System.ServiceModel.Security;
 using System.Threading;
+using System.Xml;
 
 namespace System.ServiceModel
 {
@@ -250,7 +251,10 @@ namespace System.ServiceModel
                        get {
                                ISessionChannel<IInputSession> ch = request_channel as ISessionChannel<IInputSession>;
                                ch = ch ?? output_channel as ISessionChannel<IInputSession>;
-                               return ch != null ? ch.Session : null;
+                               if (ch != null)
+                                       return ch.Session;
+                               var dch = output_channel as ISessionChannel<IDuplexSession>;
+                               return dch != null ? dch.Session : null;
                        }
                }
 
@@ -268,7 +272,10 @@ namespace System.ServiceModel
                        get {
                                ISessionChannel<IOutputSession> ch = request_channel as ISessionChannel<IOutputSession>;
                                ch = ch ?? output_channel as ISessionChannel<IOutputSession>;
-                               return ch != null ? ch.Session : null;
+                               if (ch != null)
+                                       return ch.Session;
+                               var dch = output_channel as ISessionChannel<IDuplexSession>;
+                               return dch != null ? dch.Session : null;
                        }
                }
 
@@ -541,7 +548,11 @@ namespace System.ServiceModel
                                        version, parameters);
                        else
                                msg = (Message) parameters [0];
+
+                       if (OutputSession != null)
+                               msg.Headers.MessageId = new UniqueId (OutputSession.Id);
                        msg.Properties.AllowOutputBatching = AllowOutputBatching;
+
                        return msg;
                }
 
index 636420533e5670ba09166f770a8e2dc5e8ad2219..623854d0191642677771ddf64ff0ab01cd6a3786 100644 (file)
@@ -28,6 +28,8 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
+using System.Net;
+using System.Net.Sockets;
 using System.ServiceModel.Channels;
 
 namespace System.ServiceModel
@@ -56,6 +58,7 @@ namespace System.ServiceModel
                public abstract PeerMessagePropagationFilter MessagePropagationFilter { get; set; }
 
                internal abstract void Open (TimeSpan timeout);
+               internal abstract void Close (TimeSpan timeout);
 
                public void RefreshConnection ()
                {
@@ -83,14 +86,25 @@ namespace System.ServiceModel
 
        internal class PeerNodeImpl : PeerNode
        {
-               internal PeerNodeImpl (PeerResolver resolver, string meshId, int port)
-                       : base (meshId, port)
+               class NodeInfo
+               {
+                       public int Id { get; set; }
+                       public PeerNodeAddress Address { get; set; }
+               }
+
+               Dictionary<string,NodeInfo> mesh_map = new Dictionary<string,NodeInfo> ();
+
+               internal PeerNodeImpl (PeerResolver resolver, EndpointAddress remoteAddress, int port)
+                       : base (remoteAddress.Uri.Host, port)
                {
                        this.resolver = resolver;
+                       this.remote_address = remoteAddress;
                }
 
                PeerResolver resolver;
+               EndpointAddress remote_address;
                object registered_id;
+               TcpListener listener; // FIXME: not sure if it is actually used ...
 
                // FIXME: implement
                public override PeerMessagePropagationFilter MessagePropagationFilter { get; set; }
@@ -105,15 +119,43 @@ namespace System.ServiceModel
 
                        int maxAddresses = 3; // FIXME: get it from somewhere
 
-                       // FIXME: not sure how I should handle addresses
-                       int idx = 0;
-                       foreach (var addr in resolver.Resolve (MeshId, maxAddresses, timeout)) {
-                               idx++;
-                               registered_id = resolver.Register (MeshId, addr, timeout - (DateTime.Now - startTime));
-                               NodeId = idx;
-                               SetOnline ();
-                               break;
+                       NodeInfo info;
+                       if (!mesh_map.TryGetValue (MeshId, out info)) {
+                               var rnd = new Random ();
+                               // FIXME: not sure how I should handle addresses
+                               foreach (var address in resolver.Resolve (MeshId, maxAddresses, timeout)) {
+                                       info = new NodeInfo () { Id = rnd.Next (), Address = address };
+                                       break;
+                               }
+                               if (info == null) { // there was no resolved IP for the MeshId, so create a new peer ...
+                                       int p = rnd.Next (50000, 60000);
+                                       while (p < 60000) {
+                                               try {
+                                                       listener = new TcpListener (p);
+                                                       break;
+                                               } catch {
+                                               }
+                                       }
+                                       if (listener == null)
+                                               throw new Exception ("No port is available for a peer node to listen");
+                                       listener.Start ();
+                                       var ep = (IPEndPoint) listener.LocalEndpoint;
+                                       string name = Dns.GetHostName ();
+                                       info = new NodeInfo () { Id = new Random ().Next (0, int.MaxValue), Address = new PeerNodeAddress (new EndpointAddress ("net.tcp://" + name + ":" + ep.Port + "/PeerChannelEndpoints/" + Guid.NewGuid ()), new ReadOnlyCollection<IPAddress> (Dns.GetHostEntry (name).AddressList)) };
+                               }
                        }
+                       registered_id = resolver.Register (MeshId, info.Address, timeout - (DateTime.Now - startTime));
+                       mesh_map [MeshId] = info;
+                       NodeId = info.Id;
+                       SetOnline ();
+               }
+
+               internal override void Close (TimeSpan timeout)
+               {
+                       resolver.Unregister (registered_id, timeout);
+                       if (listener != null)
+                               listener.Stop ();
+                       registered_id = null;
                }
        }
 }
index a94b122dee7b29fc97b0223575a7428b98ac939e..8478f5654864898a5ffba58bf509167a67c0c594 100644 (file)
@@ -60,9 +60,11 @@ namespace System.ServiceModel
 
                public IInputSession InputSession {
                        get {
-                               if (channel is IInputSessionChannel)
-                                       return ((IInputSessionChannel) channel).Session;
-                               return null;
+                               var ch = channel as ISessionChannel<IInputSession>;
+                               if (ch != null)
+                                       return ch.Session;
+                               var dch = channel as ISessionChannel<IDuplexSession>;
+                               return dch != null ? dch.Session : null;
                        }
                }
 
@@ -84,9 +86,11 @@ namespace System.ServiceModel
 
                public IOutputSession OutputSession {
                        get {
-                               if (channel is IOutputSessionChannel)
-                                       return ((IOutputSessionChannel) channel).Session;
-                               return null;
+                               var ch = channel as ISessionChannel<IOutputSession>;
+                               if (ch != null)
+                                       return ch.Session;
+                               var dch = channel as ISessionChannel<IDuplexSession>;
+                               return dch != null ? dch.Session : null;
                        }
                }
 
index 884d00e971244bc8377d5c079cf147d8add985e8..d2d12dd6749645287198e9f758caa7210d9c7350 100644 (file)
@@ -84,6 +84,7 @@ System.ServiceModel.Dispatcher/InvalidBodyAccessExceptionTest.cs
 System.ServiceModel.Dispatcher/PrefixEndpointAddressMessageFilterTest.cs
 System.ServiceModel.Dispatcher/ChannelDispatcherTest.cs
 System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs
+System.ServiceModel.PeerResolvers/PeerResolverSerializationTest.cs
 System.ServiceModel.Security.Tokens/IssuedSecurityTokenParametersTest.cs
 System.ServiceModel.Security.Tokens/IssuedSecurityTokenProviderTest.cs
 System.ServiceModel.Security.Tokens/RsaSecurityTokenParametersTest.cs
index 156bf9888411a5eaf3c28ae4e50dd7fa1ca5dbde..62594471c8f424998cfe2e6058b3c84a3fc8ef02 100644 (file)
@@ -1,3 +1,7 @@
+2009-05-22  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * MessageEncoderTest.cs : test CreateSessionEncoder().
+
 2009-05-19  Atsushi Enomoto  <atsushi@ximian.com>
 
        * MessageFaultTest.cs : added more SOAP 12 fault parser tests.
index dc7756e8b4f5243ba6dc46a363c99543798407e6..6f5c92ae01aa4305a46f1f19db9a65c07d5fa5a8 100644 (file)
@@ -108,5 +108,13 @@ namespace MonoTests.System.ServiceModel.Channels
                        MessageEncoderFactory f = new TextMessageEncodingBindingElement (MessageVersion.Soap11, Encoding.UTF8).CreateMessageEncoderFactory ();
                        f.Encoder.WriteMessage (msg, new MemoryStream ());
                }
+
+               [Test]
+               public void CreateSessionEncoder ()
+               {
+                       Assert.AreEqual ("application/soap+xml", new TextMessageEncodingBindingElement ().CreateMessageEncoderFactory ().CreateSessionEncoder ().MediaType, "#1");
+                       Assert.AreEqual ("application/soap+msbinsession1", new BinaryMessageEncodingBindingElement ().CreateMessageEncoderFactory ().CreateSessionEncoder ().MediaType, "#2"); // different from application/soap+msbin1
+                       Assert.AreEqual ("multipart/related", new MtomMessageEncodingBindingElement ().CreateMessageEncoderFactory ().CreateSessionEncoder ().MediaType, "#3");
+               }
        }
 }
index 70180cad8b06bb1f00a99159d79f3d67a117ff1c..78e4d418541ca59595d45ec783fcec921cacb12a 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-25  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * PeerResolverSerializationTest.cs : new test for general
+         serialization tests.
+
 2009-04-07  Atsushi Enomoto  <atsushi@ximian.com>
 
        (bah, bad manner; no ChangeLog previously.)
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/PeerResolverSerializationTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/PeerResolverSerializationTest.cs
new file mode 100644 (file)
index 0000000..364f050
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// PeerResolversSerializationTest.cs
+//
+// Author:
+//     Atsushi Enomoto <atsushi@ximian.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.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Net;
+using System.Runtime.Serialization;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.PeerResolvers;
+using System.Xml;
+
+public class PeerResolverSerializationTest
+{
+       public void ResolveResponseInfo ()
+       {
+               var ser = new DataContractSerializer (typeof (ResolveResponseInfo));
+               var rri = new ResolveResponseInfo ();
+               var pna = new PeerNodeAddress (
+                       new EndpointAddress ("http://localhost:8080"),
+                       new ReadOnlyCollection<IPAddress> (new IPAddress [0]));
+               rri.Addresses = new List<PeerNodeAddress> ();
+               rri.Addresses.Add (pna);
+               var sw = new StringWriter ();
+               using (var xw = XmlWriter.Create (sw))
+                       ser.WriteObject (xw, rri);
+               rri = (ResolveResponseInfo) ser.ReadObject (XmlReader.Create (new StringReader (sw.ToString ())));
+       }
+}
+
+/*
+[DataContract]
+public class ResolveResponseInfo
+{
+       public ResolveResponseInfo ()
+       {
+               Addresses = new List<PeerNodeAddress> ();
+       }
+
+       [DataMember]
+       public IList<PeerNodeAddress> Addresses { get; set; }
+}
+
+public class PeerNodeAddress
+{
+       public PeerNodeAddress (EndpointAddress ea, IList<IPAddress> al)
+       {
+               Endpoint = ea;
+               Addresses = al;
+       }
+
+       public EndpointAddress Endpoint { get; set; }
+       public IList<IPAddress> Addresses { get; set; }
+}
+*/
index ec260b6ca3e127906ebd497af6e6602d28e080bc..11b899451bfbd9525d93e36b6ec7ce17e6350ed9 100644 (file)
@@ -1,3 +1,17 @@
+2009-05-25  Marek Habersack  <mhabersack@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@ximian.com>
 
        * System.Web.Routing_test.dll.sources:
index c89f33cb4f69b6a3b0acc21940fd369e57f8e4ef..be16d0b3b4b378a6288a2a8f47f9d7e5a644175b 100644 (file)
@@ -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
index 6388b5ba715f257a2014829d74feb5aad19eb85f..977e128f09ab047c8095ebbce25fcc30f6621ecf 100644 (file)
@@ -1,3 +1,23 @@
+2009-05-25  Marek Habersack  <mhabersack@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@novell.com>
 
        * UrlPattern.cs: if the pattern is line {a}/{b} and {b} is substituted
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 (file)
index 0000000..bc4a97c
--- /dev/null
@@ -0,0 +1,506 @@
+//
+// PatternParser.cs
+//
+// Author:
+//      Atsushi Enomoto <atsushi@ximian.com>
+//      Marek Habersack <mhabersack@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> ();
+                       
+                       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;
+                       
+                       // quick check
+                       if (String.Compare (url, path, StringComparison.Ordinal) == 0 && url.IndexOf ('{') < 0)
+                               return AddDefaults (ret, defaults);
+
+                       string [] argSegs = path.Split ('/');
+                       int argsCount = argSegs.Length;
+                       bool haveDefaults = defaults != null && defaults.Count > 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;
+
+                                       if (first) {
+                                               ret.Append ('?');
+                                               first = false;
+                                       } else
+                                               ret.Append ('&');
+
+                                       object parameterValue = de.Value;
+                                       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 (file)
index 0000000..5f40cee
--- /dev/null
@@ -0,0 +1,81 @@
+//
+// PatternToken.cs
+//
+// Author:
+//     Marek Habersack <mhabersack@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 (file)
index 0000000..7321ca1
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// PatternTokenType.cs
+//
+// Author:
+//     Marek Habersack <mhabersack@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
+       }
+}
index c57fced624525f07cc2878faedd17f8f71780d50..753d606115944155b4ff958ac9a0a6f135a0af9b 100644 (file)
@@ -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)
@@ -117,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 (file)
index 0000000..b645249
--- /dev/null
@@ -0,0 +1,89 @@
+//
+// PatternParser.cs
+//
+// Author:
+//      Marek Habersack <mhabersack@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))
+                               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 (file)
index 6b4d3d9..0000000
+++ /dev/null
@@ -1,298 +0,0 @@
-//
-// Route.cs
-//
-// Author:
-//     Atsushi Enomoto <atsushi@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
-       {
-               sealed class TrimEntry 
-               {
-                       public bool Allowed;
-               }
-               
-               int segmentsCount;
-               string [] segments;
-               int [] segmentLengths;
-               bool [] segment_flags;
-               List <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 '?'");
-
-                       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;
-                               }
-                       }
-               }
-
-               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 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;
-               }
-               
-               RouteValueDictionary tmp = new RouteValueDictionary ();
-               public RouteValueDictionary Match (string path, RouteValueDictionary defaults)
-               {
-                       tmp.Clear ();
-
-                       // quick check
-                       if (Url == path && Url.IndexOf ('{') < 0)
-                               return AddDefaults (tmp, defaults);
-
-                       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 != null) ? o.ToString () : null;
-                                               if (v == null && o != null) {
-                                                       Type type = (o != null) ? o.GetType () : null;
-                                                       throw new InvalidOperationException ("The RouteData must contain an item named '" + key + "' of type " + type + "'.");
-                                               } else if (v == null)
-                                                       throw new InvalidOperationException ("The RouteData must contain an item named '" + key + "'.");
-                                       }
-                                       
-                                       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 AddDefaults (tmp, defaults);
-               }
-
-               static readonly string [] substsep = {"{{"};
-               
-               // it may return null for invalid values.
-               public bool TrySubstitute (RouteValueDictionary values, RouteValueDictionary defaults, out string value)
-               {
-                       if (values == null) {
-                               value = Url;
-                               return true;
-                       }
-
-                       var trim = new Dictionary <string, TrimEntry> (StringComparer.OrdinalIgnoreCase);
-                       foreach (string token in tokens) {
-                               bool trimValue;
-                               if (!values.ContainsKey (token)) {
-                                       value = null;
-                                       return false;
-                               }
-
-                               object left, right;
-                               if (values.TryGetValue (token, out left) && defaults != null && defaults.TryGetValue (token, out right)) {
-                                       if (left is string && right is string)
-                                               trimValue = String.Compare ((string)left, (string)right, StringComparison.OrdinalIgnoreCase) == 0;
-                                       else if (left == right)
-                                               trimValue = true;
-                                       else
-                                               trimValue = false;
-                               } else
-                                       trimValue = false;
-
-                               if (!trimValue) {
-                                       foreach (var de in trim)
-                                               de.Value.Allowed = false;
-                               }
-                               
-                               if (!trim.ContainsKey (token))
-                                       trim.Add (token, new TrimEntry { Allowed = trimValue});
-                       }
-
-                       var replacements = new RouteValueDictionary (values);
-                       if (defaults != null) {
-                               string key;
-                               
-                               foreach (var de in defaults) {
-                                       key = de.Key;
-                                       if (replacements.ContainsKey (key))
-                                               continue;
-                                       replacements.Add (key, de.Value);
-                               }
-                       }
-                       
-                       // 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) {
-                                       string pKey = p.Key;
-                                       string pValue;
-                                       TrimEntry trimValue;
-                                       
-                                       if (trim.TryGetValue (pKey, out trimValue)) {
-                                               if (trimValue.Allowed)
-                                                       pValue = String.Empty;
-                                               else
-                                                       pValue = p.Value.ToString ();
-                                       } else
-                                               pValue = p.Value.ToString ();
-
-                                       string rkey = "{" + pKey + "}";
-                                       if (String.IsNullOrEmpty (pValue) && s.EndsWith ("/" + rkey)) {
-                                               s = s.Substring (0, s.Length - rkey.Length - 1);
-                                       } else
-                                               s = s.Replace (rkey, pValue);
-                               }
-                               
-                               arr [i] = s;
-                       }
-                       value = String.Join ("{{", arr);
-                       return true;
-               }
-       }
-}
index c2513f475316dcae17e4f05f04f06624c3142f00..d55d50a30455d3e0e942d4797949932f565048ce 100644 (file)
@@ -1,3 +1,4 @@
+System.Web.Routing/AssertExtensions.cs
 System.Web.Routing/HttpMethodConstraintTest.cs
 System.Web.Routing/RouteCollectionTest.cs
 System.Web.Routing/RouteDataTest.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 (file)
index 0000000..b544165
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// AssertExtensions.cs
+//
+// Author:
+//     Marek Habersack <mhabersack@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);
+               }
+       }
+}
index 90b08e180098d590df10b4798c802439973336d4..2770716ec0a868ff98909fc4f0446f0caf383921 100644 (file)
@@ -1,3 +1,13 @@
+2009-05-25  Marek Habersack  <mhabersack@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@novell.com>
 
        * RouteCollectionTest.cs: added test for bug #502555
index bd30f8d6965fb112b55888ad1fd1efc90e5a303b..bc604dc2e5ed0c980fac951b184ad572e331d3dd 100644 (file)
@@ -236,10 +236,12 @@ 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.IsNotNull (vpd, "#1");
-                       Assert.AreEqual ("apppath/x/y_modified", vpd.VirtualPath, "#2");
-                       Assert.AreEqual (0, vpd.DataTokens.Count, "#3");
+                       Assert.IsNotNull (vpd, "#2");
+                       Assert.AreEqual ("apppath/x/y_modified", vpd.VirtualPath, "#3");
+                       Assert.AreEqual (0, vpd.DataTokens.Count, "#4");
                }
 
                [Test (Description = "Bug #502555")]
@@ -291,6 +293,181 @@ namespace MonoTests.System.Web.Routing
                        Assert.AreEqual ("/Account/LogOn_modified", vpd.VirtualPath, "#C2");
                        Assert.AreEqual (0, vpd.DataTokens.Count, "#C3");
                }
+
+               [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]
                [Ignore ("looks like RouteExistingFiles ( = false) does not affect... so this test needs more investigation")]
index dd1f5127b26efc3f71103417d7a758823b170821..748b560633ea852bae807db715b6c23a44ef7b2a 100644 (file)
@@ -4,7 +4,7 @@
 // Author:
 //     Atsushi Enomoto <atsushi@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);
@@ -266,6 +266,408 @@ namespace MonoTests.System.Web.Routing
                        Assert.IsNull (rd, "#1");
                }
 
+               [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 ()
@@ -366,6 +768,173 @@ namespace MonoTests.System.Web.Routing
                        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);
+               }
+               
                // Bug #500739
                [Test]
                public void RouteGetRequiredStringWithDefaults ()
@@ -373,7 +942,8 @@ namespace MonoTests.System.Web.Routing
                        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);
@@ -384,5 +954,38 @@ namespace MonoTests.System.Web.Routing
                        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"
+                       );
+               }
        }
 }
index e445d2bab3bc9e36e130c71e7adddec3b7d9d7aa..0a2a8d5a3b395cdd1754cf089cc13785c61c316d 100644 (file)
@@ -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);
+               }
        }
 }
index d585d347cf03c8f01735a34b0a0c1e650f0179c6..bbab16234d6d9f0a21f56e8fc7738aeb8469504e 100644 (file)
@@ -1,3 +1,7 @@
+2009-05-21  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * XmlSchemaTests.cs: added tests for bug #502115.
+
 2009-05-07  Jonas Larsson <jonas.larsson@manodo.se> 
 
        * XmlSchemaValidatorTests.cs : added test for bug #501666.
index 59abd6b8253a0bd8638e407dda73bf479d31a8ea..d719a6a876ddb8a1cfb8b000f312e7fafb9ab815 100644 (file)
@@ -20,6 +20,8 @@ namespace MonoTests.System.Xml
        [TestFixture]
        public class XmlSchemaTests : XmlSchemaAssertion
        {
+               static readonly bool StrictMsCompliant = Environment.GetEnvironmentVariable ("MONO_STRICT_MS_COMPLIANT") == "yes";
+
                [Test]
                public void TestRead ()
                {
@@ -419,7 +421,135 @@ namespace MonoTests.System.Xml
                                r.Close ();
                        }
                }
-               
+
+               [Test] // bug #502115
+               public void ExtensionRedefineAttribute1 ()
+               {
+                       const string xml = "<Bar xmlns='foo'/>";
+
+                       XmlSchema schema = GetSchema ("Test/XmlFiles/xsd/extension-attr-redefine-1.xsd");
+
+#if NET_2_0
+                       XmlSchemaSet xss = new XmlSchemaSet ();
+                       xss.Add (schema);
+                       if (StrictMsCompliant) {
+                               xss.Compile ();
+                       } else {
+                               try {
+                                       xss.Compile ();
+                                       Fail ();
+                               } catch (XmlSchemaException) {
+                               }
+                               return;
+                       }
+
+                       StringReader sr = new StringReader (xml);
+
+                       XmlReaderSettings settings = new XmlReaderSettings ();
+                       settings.ValidationType = ValidationType.Schema;
+                       settings.Schemas = xss;
+                       XmlReader vr = XmlReader.Create (sr, settings);
+#else
+                       if (StrictMsCompliant) {
+                               schema.Compile (null);
+                       } else {
+                               try {
+                                       schema.Compile (null);
+                                       Fail ();
+                               } catch (XmlSchemaException) {
+                               }
+                       }
+
+                       XmlValidatingReader vr = new XmlValidatingReader (xml,
+                               XmlNodeType.Document, null);
+                       vr.Schemas.Add (schema);
+                       vr.ValidationType = ValidationType.Schema;
+#endif
+
+                       try {
+                               vr.Read ();
+                               Fail ();
+                       } catch (XmlSchemaException) {
+                       }
+               }
+
+               [Test] // bug #502115
+               public void ExtensionRedefineAttribute2 ()
+               {
+                       const string xml = "<Bar xmlns='foo'/>";
+
+                       XmlSchema schema = GetSchema ("Test/XmlFiles/xsd/extension-attr-redefine-2.xsd");
+
+#if NET_2_0
+                       XmlSchemaSet xss = new XmlSchemaSet ();
+                       xss.Add (schema);
+                       xss.Compile ();
+
+                       StringReader sr = new StringReader (xml);
+
+                       XmlReaderSettings settings = new XmlReaderSettings ();
+                       settings.ValidationType = ValidationType.Schema;
+                       settings.Schemas = xss;
+                       XmlReader vr = XmlReader.Create (sr, settings);
+#else
+                       schema.Compile (null);
+
+                       XmlValidatingReader vr = new XmlValidatingReader (xml,
+                               XmlNodeType.Document, null);
+                       vr.Schemas.Add (schema);
+                       vr.ValidationType = ValidationType.Schema;
+#endif
+
+                       while (vr.Read ()) ;
+               }
+
+               [Test] // bug #502115
+               public void ExtensionRedefineAttribute3 ()
+               {
+                       const string xml = "<Bar xmlns='foo'/>";
+
+                       XmlSchema schema = GetSchema ("Test/XmlFiles/xsd/extension-attr-redefine-3.xsd");
+
+#if NET_2_0
+                       XmlSchemaSet xss = new XmlSchemaSet ();
+                       xss.Add (schema);
+                       if (StrictMsCompliant) {
+                               xss.Compile ();
+                       } else {
+                               try {
+                                       xss.Compile ();
+                                       Fail ();
+                               } catch (XmlSchemaException) {
+                               }
+                               return;
+                       }
+
+                       StringReader sr = new StringReader ("<Bar xmlns='foo'/>");
+
+                       XmlReaderSettings settings = new XmlReaderSettings ();
+                       settings.ValidationType = ValidationType.Schema;
+                       settings.Schemas = xss;
+                       XmlReader vr = XmlReader.Create (sr, settings);
+#else
+                       if (StrictMsCompliant) {
+                               schema.Compile (null);
+                       } else {
+                               try {
+                                       schema.Compile (null);
+                                       Fail ();
+                               } catch (XmlSchemaException) {
+                               }
+                       }
+
+                       XmlValidatingReader vr = new XmlValidatingReader (xml,
+                               XmlNodeType.Document, null);
+                       vr.Schemas.Add (schema);
+                       vr.ValidationType = ValidationType.Schema;
+#endif
+
+                       while (vr.Read ()) ;
+               }
+
 #if NET_2_0
 
                internal class XmlTestResolver : XmlResolver
index 48a501ae131a494e75387472c56c8fe534f95563..d2914d9c149ca27451bfc7c7845ebb96b3b67d6b 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-22  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * XmlResolverTest.cs: Fix ResolveUri test on Windows when current
+       directory is not on C drive.
+
 2009-05-12  Jonas Larsson  <jonas.larsson@manodo.se>
 
        * XmlValidatingReaderTests.cs : test for bug #502168
index b4358abcc7e30fc85afa397b61207065de3dc421..5865dbe07bc7c3ddbd49b5ed4f835450ec64038b 100644 (file)
@@ -74,9 +74,11 @@ namespace MonoTest.System.Xml {
                        Uri uri = xr.ResolveUri (null, "/Moonlight");
                        // note: this is *very* different from [silver|moon]light
                        Assert.IsTrue (uri.IsAbsoluteUri, "null,string");
-                       if (isWin32)
-                               Assert.AreEqual ("file:///C:/Moonlight", uri.ToString (), "ToString");
-                       else
+                       if (isWin32) {
+                               string currentdir = Directory.GetCurrentDirectory ();
+                               string volume = currentdir.Substring (0, 2);
+                               Assert.AreEqual ("file:///" + volume + "/Moonlight", uri.ToString (), "ToString");
+                       } else
                                Assert.AreEqual ("file:///Moonlight", uri.ToString (), "ToString");
 
                        uri = new Uri ("http://www.mono-project.com");
@@ -101,6 +103,6 @@ namespace MonoTest.System.Xml {
                        u2 = xr.ResolveUri (null, "file:///mystuff");
                        Assert.IsTrue (u2.IsAbsoluteUri, "null,absolute/file");
                }
-#endif
+#endif\r
        }
 }
index d62c4f78d43235256ce329a93b9e25ac7c4ed337..64bdb6c1fa629c35fad58f1ea97c31ccdd8b21dd 100644 (file)
@@ -1,3 +1,7 @@
+2009-05-21  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * extension-attr-redefine-*.xsd: new test files.
+
 2008-12-15  Atsushi Enomoto  <atsushi@ximian.com>
 
        * import-subst-dbr-base.xsd, import-subst-dbr-ext.xsd :
diff --git a/mcs/class/System.XML/Test/XmlFiles/xsd/extension-attr-redefine-1.xsd b/mcs/class/System.XML/Test/XmlFiles/xsd/extension-attr-redefine-1.xsd
new file mode 100644 (file)
index 0000000..8c76f0c
--- /dev/null
@@ -0,0 +1,14 @@
+<xs:schema xmlns="foo" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="foo" id="foo">
+       <xs:element name="Foo" type="FooType" />
+       <xs:element name="Bar" type="BarType" />
+       <xs:complexType name="FooType">
+               <xs:attribute name="name" type="xs:string" use="optional"/>
+       </xs:complexType>
+       <xs:complexType name="BarType">
+               <xs:complexContent>
+                       <xs:extension base="FooType">
+                               <xs:attribute name="name" type="xs:string" use="required"/>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+</xs:schema>
diff --git a/mcs/class/System.XML/Test/XmlFiles/xsd/extension-attr-redefine-2.xsd b/mcs/class/System.XML/Test/XmlFiles/xsd/extension-attr-redefine-2.xsd
new file mode 100644 (file)
index 0000000..aefd30f
--- /dev/null
@@ -0,0 +1,14 @@
+<xs:schema xmlns="foo" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="foo" id="foo">
+       <xs:element name="Foo" type="FooType" />
+       <xs:element name="Bar" type="BarType" />
+       <xs:complexType name="FooType">
+               <xs:attribute name="name" type="xs:string" use="optional"/>
+       </xs:complexType>
+       <xs:complexType name="BarType">
+               <xs:complexContent>
+                       <xs:extension base="FooType">
+                               <xs:attribute name="name" type="xs:string" use="optional"/>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+</xs:schema>
diff --git a/mcs/class/System.XML/Test/XmlFiles/xsd/extension-attr-redefine-3.xsd b/mcs/class/System.XML/Test/XmlFiles/xsd/extension-attr-redefine-3.xsd
new file mode 100644 (file)
index 0000000..f249df1
--- /dev/null
@@ -0,0 +1,14 @@
+<xs:schema xmlns="foo" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="foo" id="foo">
+       <xs:element name="Foo" type="FooType" />
+       <xs:element name="Bar" type="BarType" />
+       <xs:complexType name="FooType">
+               <xs:attribute name="name" type="xs:string" use="required"/>
+       </xs:complexType>
+       <xs:complexType name="BarType">
+               <xs:complexContent>
+                       <xs:extension base="FooType">
+                               <xs:attribute name="name" type="xs:string" use="optional"/>
+                       </xs:extension>
+               </xs:complexContent>
+       </xs:complexType>
+</xs:schema>
index 88fcdde19c2f2a66b640d9367797503738e86b08..0c40cec58cd66ac405daa449471422191038855d 100644 (file)
@@ -1,3 +1,13 @@
+2009-05-22  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Socket_2_1.cs: Do not throw a SecurityException if the security
+       policy check fails in NET_2_1 but set the SocketError to AccessDenied
+       ensure the EndPoint has a valid policy before connecting.
+       * SocketAsyncEventArgs.cs: Don't recurse endlessly in SendCallback
+       and ReceiveCallback if the socket is not connected. Check for
+       AccessDenied in ConnectCallback (needed for the security policy
+       check in NET_2_1).
+
 2009-05-14  Sebastien Pouliot  <sebastien@ximian.com>
 
        * Socket_2_1.cs: Add ConnectAsync support for NET_2_1 which will
index f05cb2208dac22eaf124abbfb7443758adede138..3e488f24c382969cd870e0d412e7e621f74f087c 100644 (file)
@@ -163,6 +163,11 @@ namespace System.Net.Sockets
                        SocketError = SocketError.Success;
                        LastOperation = SocketAsyncOperation.Receive;
                        SocketError error = SocketError.Success;
+
+                       if (!curSocket.Connected) {
+                               SocketError = SocketError.NotConnected;
+                               return;
+                       }
                        
                        try {
                                // FIXME: this does not support using BufferList
@@ -175,8 +180,15 @@ namespace System.Net.Sockets
 
                void ConnectCallback ()
                {
-                       SocketError = SocketError.Success;
                        LastOperation = SocketAsyncOperation.Connect;
+#if NET_2_1
+                       if (SocketError == SocketError.AccessDenied) {
+                               curSocket.Connected = false;
+                               OnCompleted (this);
+                               return;
+                       }
+#endif
+                       SocketError = SocketError.Success;
                        SocketError error = SocketError.Success;
 
                        try {
@@ -207,6 +219,11 @@ namespace System.Net.Sockets
                        LastOperation = SocketAsyncOperation.Send;
                        SocketError error = SocketError.Success;
 
+                       if (!curSocket.Connected) {
+                               SocketError = SocketError.NotConnected;
+                               return;
+                       }
+
                        try {
                                if (Buffer != null) {
                                        BytesTransferred = curSocket.Send_nochecks (Buffer, Offset, Count, SocketFlags.None, out error);
index df03ea10dd1512f39291545cc102817d32fd3438..cf91f60c3a4719ab993e341580fc1af43a8517db 100644 (file)
@@ -191,6 +191,10 @@ namespace System.Net.Sockets {
                
                public Socket(AddressFamily family, SocketType type, ProtocolType proto)
                {
+#if NET_2_1
+                       if (family == AddressFamily.Unspecified)
+                               throw new ArgumentException ("family");
+#endif
                        address_family=family;
                        socket_type=type;
                        protocol_type=proto;
@@ -695,14 +699,15 @@ namespace System.Net.Sockets {
                        if (!checkPolicy)
                                return;
 
+                       e.SocketError = SocketError.AccessDenied;
                        if (check_socket_policy == null) {
                                Type type = Type.GetType ("System.Windows.Browser.Net.CrossDomainPolicyManager, System.Windows.Browser, Version=2.0.5.0, Culture=Neutral, PublicKeyToken=7cec85d7bea7798e");
                                check_socket_policy = type.GetMethod ("CheckEndPoint");
                                if (check_socket_policy == null)
                                        throw new SecurityException ();
                        }
-                       if (!(bool) check_socket_policy.Invoke (null, new object [1] { e.RemoteEndPoint }))
-                               throw new SecurityException ();
+                       if ((bool) check_socket_policy.Invoke (null, new object [1] { e.RemoteEndPoint }))
+                               e.SocketError = SocketError.Success;
                }
 
                // only _directly_ used (with false) to download the socket policy
index 6eb0ece1e523e8103c9cba8ae31d627aaca2160b..63f383f1810c4c03b0ad4dcfebea12481ba88171 100644 (file)
@@ -1,3 +1,12 @@
+2009-05-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * corlib.dll.sources: Add new net 4.0 files.
+
+       * corlib_test.dll.sources: Add System/LazyTest.cs.
+
+       * corlib.dll.sources: Add System/{Lazy,LazyExecutionMode,Funcs}.cs for
+       NET 4.0.
+
 2009-05-01  Sebastien Pouliot  <sebastien@ximian.com> 
 
        * corlib_test.dll.sources: Add unit tests for AppDomainManager
index e24a5498d5cdc0f02c06e3c9872cde949013ae0d..68d37a19c196aedfe48e7514d4b97ca72414d7b5 100644 (file)
@@ -1,3 +1,7 @@
+2009-05-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * IStructuralComparable.cs IStructuralEquatable.cs: New files.
+
 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
 
        * BitArray.cs (CopyTo): Allow an index equal to the array length if
diff --git a/mcs/class/corlib/System.Collections/IStructuralComparable.cs b/mcs/class/corlib/System.Collections/IStructuralComparable.cs
new file mode 100644 (file)
index 0000000..3df02b5
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// IStructuralComparable.cs
+//
+// Authors:
+//  Zoltan Varga (vargaz@gmail.com)
+//
+// Copyright (C) 2009 Novell
+//
+// 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_4_0
+
+using System;
+
+namespace System.Collections
+{
+       public interface IStructuralComparable {
+               int CompareTo (object other, IComparer comparer);
+       }
+}
+
+#endif
diff --git a/mcs/class/corlib/System.Collections/IStructuralEquatable.cs b/mcs/class/corlib/System.Collections/IStructuralEquatable.cs
new file mode 100644 (file)
index 0000000..cc41773
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// IStructuralEquatable.cs
+//
+// Authors:
+//  Zoltan Varga (vargaz@gmail.com)
+//
+// Copyright (C) 2009 Novell
+//
+// 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_4_0
+
+using System;
+
+namespace System.Collections
+{
+       public interface IStructuralEquatable {
+               bool Equals (object other, IEqualityComparer comparer);
+
+               int GetHashCode (IEqualityComparer comparer);
+       }
+}
+
+#endif
index fc6dfe02bb3bd9b0d449cd239b8cd9e08be35232..b693399762f8ec03c986f3b8c35562fb6a268680 100644 (file)
@@ -162,6 +162,11 @@ namespace System.Reflection.Emit
                                        "access");
 #endif
 
+#if NET_4_0
+                       if ((access & AssemblyBuilderAccess.RunAndCollect) == AssemblyBuilderAccess.RunAndCollect)
+                               throw new NotSupportedException ("RunAndCollect not yet supported.");
+#endif
+
                        name = n.Name;
                        this.access = (uint)access;
                        flags = (uint) n.Flags;
index 963bfcc207832980e5dadc8b1317500c342fb473..34e397d27b15f538f501a32d33c5c22a4c76aa93 100644 (file)
@@ -45,6 +45,10 @@ namespace System.Reflection.Emit
 #if NET_2_0
        ,
        ReflectionOnly = 6
+#endif
+#if NET_4_0
+       ,
+       RunAndCollect = 9
 #endif
   }
 }
index 0d891c3e91acb0a78e2026efa7a80d9542904344..bb2175456ceaa754cc0ba69589f78bb95e3bd958 100644 (file)
@@ -1,3 +1,10 @@
+2009-05-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * AssemblyBuilder.cs (.ctor): Error out if the not yet supported 
+       RunAndCollect flag was given.
+
+       * AssemblyBuilderAccess.cs: Add RunAndCollect flag for net 4.0.
+
 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com>
 
        * DynamicMethod.cs (Invoke): Wrap a MethodAccessException inside a
index 7d14e26d394406470f326bfef4f605ebe60e6810..6e4ad4c098ae6177f8b4f4e1db2b42c07a413325 100644 (file)
@@ -1,3 +1,9 @@
+2009-05-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * Tuple.cs Tuples.cs: New files.
+
+       * Lazy.cs LazyExecutionMode.cs Funcs.cs: New files.
+
 2009-05-14 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * Type.cs: (GetInterfaceMap) 'this' can't be an interface itself.
diff --git a/mcs/class/corlib/System/Funcs.cs b/mcs/class/corlib/System/Funcs.cs
new file mode 100644 (file)
index 0000000..bdfda75
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// System.Func.cs
+//
+// Authors:
+//      Alejandro Serrano "Serras" (trupill@yahoo.es)
+//     Marek Safar (marek.safar@gmail.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 TArg 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
+//
+
+#if NET_4_0
+
+namespace System {
+       public delegate TResult Func<TResult> ();
+       public delegate TResult Func<T, TResult> (T arg1);
+       public delegate TResult Func<T1, T2, TResult> (T1 arg1, T2 arg2);
+       public delegate TResult Func<T1, T2, T3, TResult> (T1 arg1, T2 arg2, T3 arg3);
+       public delegate TResult Func<T1, T2, T3, T4, TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4);
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System/Lazy.cs b/mcs/class/corlib/System/Lazy.cs
new file mode 100644 (file)
index 0000000..f1604fc
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Lazy.cs
+//
+// Authors:
+//  Zoltan Varga (vargaz@gmail.com)
+//
+// Copyright (C) 2009 Novell
+//
+// 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_4_0
+
+using System;
+using System.Runtime.Serialization;
+using System.Runtime.InteropServices;
+using System.Security.Permissions;
+using System.Threading;
+
+namespace System
+{
+       [SerializableAttribute]
+       [ComVisibleAttribute(false)]
+       [HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, 
+                                                        ExternalThreading = true)]
+       public class Lazy<T> : ISerializable
+       {
+               T value;
+               bool inited;
+               LazyExecutionMode mode;
+               Func<T> factory;
+               object monitor;
+
+               public Lazy () : this (LazyExecutionMode.NotThreadSafe) {
+               }
+
+               public Lazy (Func<T> valueFactory) : this (valueFactory, LazyExecutionMode.NotThreadSafe) {
+               }
+
+               public Lazy (LazyExecutionMode mode) {
+                       this.mode = mode;
+                       if (mode != LazyExecutionMode.NotThreadSafe)
+                               monitor = new Object ();
+               }
+
+               public Lazy (Func<T> valueFactory, LazyExecutionMode mode) {
+                       if (valueFactory == null)
+                               throw new ArgumentNullException ("valueFactory");
+                       this.factory = valueFactory;
+                       this.mode = mode;
+                       if (mode != LazyExecutionMode.NotThreadSafe)
+                               monitor = new Object ();
+               }
+
+               [MonoTODO]
+               protected Lazy (SerializationInfo info, StreamingContext context) {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual void GetObjectData (SerializationInfo info, StreamingContext context) {
+                       throw new NotImplementedException ();
+               }
+
+               public override string ToString () {
+                       if (!IsValueCreated)
+                               return "Value is not created";
+                       return Value.ToString ();
+               }
+
+               [MonoTODO]
+               public T Value {
+                       get {
+                               if (inited)
+                                       return value;
+
+                               return InitValue ();
+                       }
+               }
+
+               T InitValue () {
+                       if (mode == LazyExecutionMode.NotThreadSafe) {
+                               value = CreateValue ();
+                               inited = true;
+                       } else {
+                               // We treat AllowMultipleThread... as EnsureSingleThread...
+                               lock (monitor) {
+                                       if (inited)
+                                               return value;
+                                       T v = CreateValue ();
+                                       value = v;
+                                       Thread.MemoryBarrier ();
+                                       inited = true;
+                               }
+                       }
+
+                       return value;
+               }
+
+               T CreateValue () {
+                       if (factory == null) {
+                               try {
+                                       return Activator.CreateInstance<T> ();
+                               } catch (MissingMethodException) {
+                                       throw new MissingMemberException ("The lazily-initialized type does not have a public, parameterless constructor.");
+                               }
+                       } else {
+                               return factory ();
+                       }
+               }                       
+
+               public bool IsValueCreated {
+                       get {
+                               return inited;
+                       }
+               }
+       }               
+}
+       
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System/LazyExecutionMode.cs b/mcs/class/corlib/System/LazyExecutionMode.cs
new file mode 100644 (file)
index 0000000..05a4595
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// LazyExecutionMode.cs
+//
+// Authors:
+//  Zoltan Varga (vargaz@gmail.com)
+//
+// Copyright (C) 2009 Novell
+//
+// 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_4_0
+
+namespace System
+{
+       public enum LazyExecutionMode {
+               NotThreadSafe = 0,
+               AllowMultipleThreadSafeExecution = 1,
+               EnsureSingleThreadSafeExecution = 2
+       }
+}
+
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System/Tuple.cs b/mcs/class/corlib/System/Tuple.cs
new file mode 100644 (file)
index 0000000..79fe0ed
--- /dev/null
@@ -0,0 +1,115 @@
+//
+// Tuple.cs
+//
+// Authors:
+//  Zoltan Varga (vargaz@gmail.com)
+//
+// Copyright (C) 2009 Novell
+//
+// 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_4_0
+
+using System;
+
+namespace System
+{
+       public static class Tuple
+       {
+               public static Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> Create<T1, T2, T3, T4, T5, T6, T7, TRest>
+                       (
+                        T1 item1,
+                        T2 item2,
+                        T3 item3,
+                        T4 item4,
+                        T5 item5,
+                        T6 item6,
+                        T7 item7,
+                        TRest rest) {
+                       return new Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> (item1, item2, item3, item4, item5, item6, item7, rest);
+               }
+
+               public static Tuple<T1, T2, T3, T4, T5, T6, T7> Create<T1, T2, T3, T4, T5, T6, T7>
+                       (
+                        T1 item1,
+                        T2 item2,
+                        T3 item3,
+                        T4 item4,
+                        T5 item5,
+                        T6 item6,
+                        T7 item7) {
+                       return new Tuple<T1, T2, T3, T4, T5, T6, T7> (item1, item2, item3, item4, item5, item6, item7);
+               }
+
+               public static Tuple<T1, T2, T3, T4, T5, T6> Create<T1, T2, T3, T4, T5, T6>
+                       (
+                        T1 item1,
+                        T2 item2,
+                        T3 item3,
+                        T4 item4,
+                        T5 item5,
+                        T6 item6) {
+                       return new Tuple<T1, T2, T3, T4, T5, T6> (item1, item2, item3, item4, item5, item6);
+               }
+
+               public static Tuple<T1, T2, T3, T4, T5> Create<T1, T2, T3, T4, T5>
+                       (
+                        T1 item1,
+                        T2 item2,
+                        T3 item3,
+                        T4 item4,
+                        T5 item5) {
+                       return new Tuple<T1, T2, T3, T4, T5> (item1, item2, item3, item4, item5);
+               }
+
+               public static Tuple<T1, T2, T3, T4> Create<T1, T2, T3, T4>
+                       (
+                        T1 item1,
+                        T2 item2,
+                        T3 item3,
+                        T4 item4) {
+                       return new Tuple<T1, T2, T3, T4> (item1, item2, item3, item4);
+               }
+
+               public static Tuple<T1, T2, T3> Create<T1, T2, T3>
+                       (
+                        T1 item1,
+                        T2 item2,
+                        T3 item3) {
+                       return new Tuple<T1, T2, T3> (item1, item2, item3);
+               }
+
+               public static Tuple<T1, T2> Create<T1, T2>
+                       (
+                        T1 item1,
+                        T2 item2) {
+                       return new Tuple<T1, T2> (item1, item2);
+               }
+
+               public static Tuple<T1> Create<T1>
+                       (
+                        T1 item1) {
+                       return new Tuple<T1> (item1);
+               }
+       }               
+}
+       
+#endif
\ No newline at end of file
diff --git a/mcs/class/corlib/System/Tuples.cs b/mcs/class/corlib/System/Tuples.cs
new file mode 100644 (file)
index 0000000..bc42c1d
--- /dev/null
@@ -0,0 +1,498 @@
+//
+// Tuples.cs
+//
+// Authors:
+//  Zoltan Varga (vargaz@gmail.com)
+//
+// Copyright (C) 2009 Novell
+//
+// 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_4_0
+
+using System;
+using System.Collections;
+
+namespace System
+{
+       public class Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> : IStructuralEquatable, IStructuralComparable, IComparable
+       {
+               T1 item1;
+               T2 item2;
+               T3 item3;
+               T4 item4;
+               T5 item5;
+               T6 item6;
+               T7 item7;
+               TRest rest;
+
+               public Tuple (T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) {
+                       this.item1 = item1;
+                       this.item2 = item2;
+                       this.item3 = item3;
+                       this.item4 = item4;
+                       this.item5 = item5;
+                       this.item6 = item6;
+                       this.item7 = item7;
+                       this.rest = rest;
+
+                       bool ok = true;
+                       if (!typeof (TRest).IsGenericType)
+                               ok = false;
+                       if (ok) {
+                               Type t = typeof (TRest).GetGenericTypeDefinition ();
+                               if (!(t == typeof (Tuple<>) || t == typeof (Tuple<,>) || t == typeof (Tuple<,,>) || t == typeof (Tuple<,,,>) || t == typeof (Tuple<,,,,>) || t == typeof (Tuple <,,,,,>) || t == typeof (Tuple<,,,,,,>) || t == typeof (Tuple<,,,,,,,>)))
+                                       ok = false;
+                       }
+                       if (!ok)
+                               throw new ArgumentException ("The last element of an eight element tuple must be a Tuple.");
+               }
+
+               public T1 Item1 {
+                       get {
+                               return item1;
+                       }
+               }
+
+               public T2 Item2 {
+                       get {
+                               return item2;
+                       }
+               }
+
+               public T3 Item3 {
+                       get {
+                               return item3;
+                       }
+               }
+
+               public T4 Item4 {
+                       get {
+                               return item4;
+                       }
+               }
+
+               public T5 Item5 {
+                       get {
+                               return item5;
+                       }
+               }
+
+               public T6 Item6 {
+                       get {
+                               return item6;
+                       }
+               }
+
+               public T7 Item7 {
+                       get {
+                               return item7;
+                       }
+               }
+
+               public TRest Rest {
+                       get {
+                               return rest;
+                       }
+               }
+
+               int IComparable.CompareTo (object other) { throw new NotImplementedException (); }
+               int IStructuralComparable.CompareTo (object other, IComparer comparer) { throw new NotImplementedException (); }
+               bool IStructuralEquatable.Equals (object other, IEqualityComparer comparer) { throw new NotImplementedException (); }
+               int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { throw new NotImplementedException (); }
+
+               [MonoTODO]
+               public override string ToString () {
+                       // FIXME: Merge the items from rest into the parent
+                       return String.Format ("({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", Item1, Item2, Item3, Item4, Item5, Item6, Item7, Rest);
+               }
+       }
+
+       /* The rest is generated by the script at the bottom */
+
+       public class Tuple<T1> : IStructuralEquatable, IStructuralComparable, IComparable
+       {
+               T1 item1;
+
+               public Tuple (T1 item1) {
+                        this.item1 = item1;
+               }
+               public T1 Item1 {
+                       get {
+                               return item1;
+                       }
+               }
+               [MonoTODO] int IComparable.CompareTo (object other) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralComparable.CompareTo (object other, IComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] bool IStructuralEquatable.Equals (object other, IEqualityComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { throw new NotImplementedException (); }
+               public override string ToString () {
+                       return String.Format ("({0})", Item1);
+               }
+       }
+
+       public class Tuple<T1, T2> : IStructuralEquatable, IStructuralComparable, IComparable
+       {
+               T1 item1;
+               T2 item2;
+
+               public Tuple (T1 item1, T2 item2) {
+                        this.item1 = item1;
+                        this.item2 = item2;
+               }
+               public T1 Item1 {
+                       get {
+                               return item1;
+                       }
+               }
+               public T2 Item2 {
+                       get {
+                               return item2;
+                       }
+               }
+               [MonoTODO] int IComparable.CompareTo (object other) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralComparable.CompareTo (object other, IComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] bool IStructuralEquatable.Equals (object other, IEqualityComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { throw new NotImplementedException (); }
+               public override string ToString () {
+                       return String.Format ("({0}, {1})", Item1, Item2);
+               }
+       }
+
+       public class Tuple<T1, T2, T3> : IStructuralEquatable, IStructuralComparable, IComparable
+       {
+               T1 item1;
+               T2 item2;
+               T3 item3;
+
+               public Tuple (T1 item1, T2 item2, T3 item3) {
+                        this.item1 = item1;
+                        this.item2 = item2;
+                        this.item3 = item3;
+               }
+               public T1 Item1 {
+                       get {
+                               return item1;
+                       }
+               }
+               public T2 Item2 {
+                       get {
+                               return item2;
+                       }
+               }
+               public T3 Item3 {
+                       get {
+                               return item3;
+                       }
+               }
+               [MonoTODO] int IComparable.CompareTo (object other) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralComparable.CompareTo (object other, IComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] bool IStructuralEquatable.Equals (object other, IEqualityComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { throw new NotImplementedException (); }
+               public override string ToString () {
+                       return String.Format ("({0}, {1}, {2})", Item1, Item2, Item3);
+               }
+       }
+
+       public class Tuple<T1, T2, T3, T4> : IStructuralEquatable, IStructuralComparable, IComparable
+       {
+               T1 item1;
+               T2 item2;
+               T3 item3;
+               T4 item4;
+
+               public Tuple (T1 item1, T2 item2, T3 item3, T4 item4) {
+                        this.item1 = item1;
+                        this.item2 = item2;
+                        this.item3 = item3;
+                        this.item4 = item4;
+               }
+               public T1 Item1 {
+                       get {
+                               return item1;
+                       }
+               }
+               public T2 Item2 {
+                       get {
+                               return item2;
+                       }
+               }
+               public T3 Item3 {
+                       get {
+                               return item3;
+                       }
+               }
+               public T4 Item4 {
+                       get {
+                               return item4;
+                       }
+               }
+               [MonoTODO] int IComparable.CompareTo (object other) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralComparable.CompareTo (object other, IComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] bool IStructuralEquatable.Equals (object other, IEqualityComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { throw new NotImplementedException (); }
+               public override string ToString () {
+                       return String.Format ("({0}, {1}, {2}, {3})", Item1, Item2, Item3, Item4);
+               }
+       }
+
+       public class Tuple<T1, T2, T3, T4, T5> : IStructuralEquatable, IStructuralComparable, IComparable
+       {
+               T1 item1;
+               T2 item2;
+               T3 item3;
+               T4 item4;
+               T5 item5;
+
+               public Tuple (T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) {
+                        this.item1 = item1;
+                        this.item2 = item2;
+                        this.item3 = item3;
+                        this.item4 = item4;
+                        this.item5 = item5;
+               }
+               public T1 Item1 {
+                       get {
+                               return item1;
+                       }
+               }
+               public T2 Item2 {
+                       get {
+                               return item2;
+                       }
+               }
+               public T3 Item3 {
+                       get {
+                               return item3;
+                       }
+               }
+               public T4 Item4 {
+                       get {
+                               return item4;
+                       }
+               }
+               public T5 Item5 {
+                       get {
+                               return item5;
+                       }
+               }
+               [MonoTODO] int IComparable.CompareTo (object other) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralComparable.CompareTo (object other, IComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] bool IStructuralEquatable.Equals (object other, IEqualityComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { throw new NotImplementedException (); }
+               public override string ToString () {
+                       return String.Format ("({0}, {1}, {2}, {3}, {4})", Item1, Item2, Item3, Item4, Item5);
+               }
+       }
+
+       public class Tuple<T1, T2, T3, T4, T5, T6> : IStructuralEquatable, IStructuralComparable, IComparable
+       {
+               T1 item1;
+               T2 item2;
+               T3 item3;
+               T4 item4;
+               T5 item5;
+               T6 item6;
+
+               public Tuple (T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) {
+                        this.item1 = item1;
+                        this.item2 = item2;
+                        this.item3 = item3;
+                        this.item4 = item4;
+                        this.item5 = item5;
+                        this.item6 = item6;
+               }
+               public T1 Item1 {
+                       get {
+                               return item1;
+                       }
+               }
+               public T2 Item2 {
+                       get {
+                               return item2;
+                       }
+               }
+               public T3 Item3 {
+                       get {
+                               return item3;
+                       }
+               }
+               public T4 Item4 {
+                       get {
+                               return item4;
+                       }
+               }
+               public T5 Item5 {
+                       get {
+                               return item5;
+                       }
+               }
+               public T6 Item6 {
+                       get {
+                               return item6;
+                       }
+               }
+               [MonoTODO] int IComparable.CompareTo (object other) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralComparable.CompareTo (object other, IComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] bool IStructuralEquatable.Equals (object other, IEqualityComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { throw new NotImplementedException (); }
+               public override string ToString () {
+                       return String.Format ("({0}, {1}, {2}, {3}, {4}, {5})", Item1, Item2, Item3, Item4, Item5, Item6);
+               }
+       }
+
+       public class Tuple<T1, T2, T3, T4, T5, T6, T7> : IStructuralEquatable, IStructuralComparable, IComparable
+       {
+               T1 item1;
+               T2 item2;
+               T3 item3;
+               T4 item4;
+               T5 item5;
+               T6 item6;
+               T7 item7;
+
+               public Tuple (T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) {
+                        this.item1 = item1;
+                        this.item2 = item2;
+                        this.item3 = item3;
+                        this.item4 = item4;
+                        this.item5 = item5;
+                        this.item6 = item6;
+                        this.item7 = item7;
+               }
+               public T1 Item1 {
+                       get {
+                               return item1;
+                       }
+               }
+               public T2 Item2 {
+                       get {
+                               return item2;
+                       }
+               }
+               public T3 Item3 {
+                       get {
+                               return item3;
+                       }
+               }
+               public T4 Item4 {
+                       get {
+                               return item4;
+                       }
+               }
+               public T5 Item5 {
+                       get {
+                               return item5;
+                       }
+               }
+               public T6 Item6 {
+                       get {
+                               return item6;
+                       }
+               }
+               public T7 Item7 {
+                       get {
+                               return item7;
+                       }
+               }
+               [MonoTODO] int IComparable.CompareTo (object other) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralComparable.CompareTo (object other, IComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] bool IStructuralEquatable.Equals (object other, IEqualityComparer comparer) { throw new NotImplementedException (); }
+               [MonoTODO] int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { throw new NotImplementedException (); }
+               public override string ToString () {
+                       return String.Format ("({0}, {1}, {2}, {3}, {4}, {5}, {6})", Item1, Item2, Item3, Item4, Item5, Item6, Item7);
+               }
+       }
+
+
+}
+       
+#endif
+
+#if FALSE
+
+//
+// generator script
+//
+
+using System;
+
+public class TupleGen
+{
+       public static void Main () {
+               for (int arity = 1; arity < 8; ++arity) {
+                       Console.Write ("\tpublic class Tuple<");
+                       for (int i = 1; i <= arity; ++i) {
+                               Console.Write (String.Format ("T{0}", i));
+                               if (i < arity)
+                                       Console.Write (", ");
+                       }
+                       Console.WriteLine ("> : IStructuralEquatable, IStructuralComparable, IComparable");
+                       Console.WriteLine ("\t{");
+                       for (int i = 1; i <= arity; ++i)
+                               Console.WriteLine (String.Format ("\t\tT{0} item{0};", i));
+                       Console.WriteLine ();
+                       Console.Write ("\t\tpublic Tuple (");
+                       for (int i = 1; i <= arity; ++i) {
+                               Console.Write (String.Format ("T{0} item{0}", i));
+                               if (i < arity)
+                                       Console.Write (", ");
+                       }
+                       Console.WriteLine (") {");
+                       for (int i = 1; i <= arity; ++i)
+                               Console.WriteLine (String.Format ("\t\t\t this.item{0} = item{0};", i));
+                       Console.WriteLine ("\t\t}");
+
+                       for (int i = 1; i <= arity; ++i) {
+                               Console.WriteLine (String.Format ("\t\tpublic T{0} Item{0} {{", i));
+                               Console.WriteLine ("\t\t\tget {");
+                               Console.WriteLine (String.Format ("\t\t\t\treturn item{0};", i));
+                               Console.WriteLine ("\t\t\t}");
+                               Console.WriteLine ("\t\t}");
+                       }
+
+                       Console.WriteLine ("\t\t[MonoTODO] int IComparable.CompareTo (object other) { throw new NotImplementedException (); }");
+                       Console.WriteLine ("\t\t[MonoTODO] int IStructuralComparable.CompareTo (object other, IComparer comparer) { throw new NotImplementedException (); }");
+                       Console.WriteLine ("\t\t[MonoTODO] bool IStructuralEquatable.Equals (object other, IEqualityComparer comparer) { throw new NotImplementedException (); }");
+                       Console.WriteLine ("\t\t[MonoTODO] int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { throw new NotImplementedException (); }");
+
+                       Console.WriteLine ("\t\tpublic override string ToString () {");
+                       Console.Write ("\t\t\treturn String.Format (\"(");
+                       for (int i = 1; i <= arity; ++i) {
+                               Console.Write ("{" + (i - 1) + "}");
+                               if (i < arity)
+                                       Console.Write (", ");
+                       }
+                       Console.Write (")\", ");
+                       for (int i = 1; i <= arity; ++i) {
+                               Console.Write ("Item" + i);
+                               if (i < arity)
+                                       Console.Write (", ");
+                       }
+                       Console.WriteLine (");");
+                       Console.WriteLine ("\t\t}");
+
+                       Console.WriteLine ("\t}\n");
+               }
+       }
+}
+
+#endif
\ No newline at end of file
index f328302d02e2ef6a510c7a007e756ad1085695ac..1183b6fcd4e80e78a93ab2f6c8b5dfb7c633ad09 100644 (file)
@@ -1,3 +1,7 @@
+2009-05-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * LazyTest.cs: New file.
+
 2009-05-14 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * TypeTest.cs: test for bug #503728
diff --git a/mcs/class/corlib/Test/System/LazyTest.cs b/mcs/class/corlib/Test/System/LazyTest.cs
new file mode 100644 (file)
index 0000000..15852c4
--- /dev/null
@@ -0,0 +1,139 @@
+//
+// LazyTest.cs - NUnit Test Cases for Lazy
+//
+// Author:
+//     Zoltan Varga (vargaz@gmail.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_4_0
+
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+using System.Threading;
+using NUnit.Framework;
+
+#pragma warning disable 219
+#pragma warning disable 168
+
+namespace MonoTests.System
+{
+       [TestFixture]
+       public class LazyTest
+       {
+               [Test]
+               [ExpectedException (typeof (ArgumentNullException))]
+               public void Ctor_Null_1 () {
+                       new Lazy<int> (null);
+               }
+
+               [Test]
+               [ExpectedException (typeof (ArgumentNullException))]
+               public void Ctor_Null_2 () {
+                       new Lazy<int> (null, LazyExecutionMode.NotThreadSafe);
+               }
+
+               [Test]
+               public void IsValueCreated () {
+                       var l1 = new Lazy<int> ();
+
+                       Assert.IsFalse (l1.IsValueCreated);
+
+                       int i = l1.Value;
+
+                       Assert.IsTrue (l1.IsValueCreated);
+               }
+
+               [Test]
+               public void DefaultCtor () {
+                       var l1 = new Lazy<DefaultCtorClass> ();
+                       
+                       var o = l1.Value;
+                       Assert.AreEqual (5, o.Prop);
+               }
+
+               class DefaultCtorClass {
+                       public DefaultCtorClass () {
+                               Prop = 5;
+                       }
+
+                       public int Prop {
+                               get; set;
+                       }
+               }
+
+               [Test]
+               [ExpectedException (typeof (MissingMemberException))]
+               public void NoDefaultCtor () {
+                       var l1 = new Lazy<NoDefaultCtorClass> ();
+                       
+                       var o = l1.Value;
+               }
+
+               class NoDefaultCtorClass {
+                       public NoDefaultCtorClass (int i) {
+                       }
+               }
+
+               [Test]
+               public void NotThreadSafe () {
+                       var l1 = new Lazy<int> ();
+
+                       Assert.AreEqual (0, l1.Value);
+
+                       var l2 = new Lazy<int> (delegate () { return 42; });
+
+                       Assert.AreEqual (42, l2.Value);
+               }
+
+               static int counter;
+
+               [Test]
+               public void EnsureSingleThreadSafeExecution () {
+                       counter = 42;
+
+                       //var l = new Lazy<int> (delegate () { return counter ++; }, LazyExecutionMode.NotThreadSafe);
+                       var l = new Lazy<int> (delegate () { return counter ++; }, LazyExecutionMode.EnsureSingleThreadSafeExecution);
+
+                       object monitor = new object ();
+                       var threads = new Thread [10];
+                       for (int i = 0; i < 10; ++i) {
+                               threads [i] = new Thread (delegate () {
+                                               lock (monitor) {
+                                                       Monitor.Wait (monitor);
+                                               }
+                                               int val = l.Value;
+                                       });
+                       }
+                       for (int i = 0; i < 10; ++i)
+                               threads [i].Start ();
+                       lock (monitor)
+                               Monitor.PulseAll (monitor);
+                       
+                       Assert.AreEqual (42, l.Value);
+               }                       
+       }
+}
+
+#endif
index 1f5c37539cab7da48f633d59f30720727b50b855..5da00b241a1adfc709017d0876d46e312a923788 100644 (file)
@@ -150,6 +150,7 @@ System/ExecutionEngineException.cs
 System/FieldAccessException.cs
 System/FlagsAttribute.cs
 System/FormatException.cs
+System/Funcs.cs
 System/GC.cs
 System/GCCollectionMode.cs
 System/GCNotificationStatus.cs
@@ -176,6 +177,8 @@ System/InvalidOperationException.cs
 System/InvalidProgramException.cs
 System/IServiceProvider.cs
 System/KnownTerminals.cs
+System/Lazy.cs
+System/LazyExecutionMode.cs
 System/LoaderOptimization.cs
 System/LoaderOptimizationAttribute.cs
 System/LocalDataStoreSlot.cs
@@ -247,6 +250,8 @@ System/TypedReference.cs
 System/TypeInitializationException.cs
 System/TypeLoadException.cs
 System/TypeUnloadedException.cs
+System/Tuple.cs
+System/Tuples.cs
 System/UInt16.cs
 System/UInt32.cs
 System/UInt64.cs
@@ -281,6 +286,8 @@ System.Collections/IEnumerator.cs
 System.Collections/IEqualityComparer.cs
 System.Collections/IHashCodeProvider.cs
 System.Collections/IList.cs
+System.Collections/IStructuralComparable.cs
+System.Collections/IStructuralEquatable.cs
 System.Collections/Queue.cs
 System.Collections/ReadOnlyCollectionBase.cs
 System.Collections/SortedList.cs
index 91edeaaa5cc95f0faf1582b73815f0121a138e69..3c2cc3837cd28e5cc2be620947da61c0192dd21e 100644 (file)
@@ -24,6 +24,7 @@ System/DelegateTest.cs
 System/ModuleHandleTest.cs
 System/ObsoleteAttributeTest.cs
 System/IntegerTryParse.cs
+System/LazyTest.cs
 System.Collections/ArrayListTest.cs
 System.Collections/BitArrayTest.cs
 System.Collections/CaseInsensitiveComparerTest.cs
index 660304bfe8f59c75a914beb5b5c5d5db33fd4065..5ff3d0d6e4d99d120c703edb6e6c6cc9ab66c7c8 100644 (file)
@@ -27,7 +27,7 @@
                <type fullname="System.Char" />
                <type fullname="System.Collections.Generic.ICollection`1" />
                <type fullname="System.Collections.Generic.IEnumerable`1" />
-               <type fullname="System.Collections.Generic.IEquatableOfTEqualityComparer`1" />
+               <type fullname="System.Collections.Generic.GenericEqualityComparer`1" />
                <type fullname="System.Collections.Generic.IList`1" />
                <type fullname="System.Console" />
                <type fullname="System.ConsoleDriver" />
diff --git a/mono/CMakeLists.txt b/mono/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ed828ce
--- /dev/null
@@ -0,0 +1,6 @@
+set(SUBDIRS utils io-layer cil metadata
+      arch interpreter mini dis monograph tests benchmark profiler)
+
+foreach(subdir ${SUBDIRS})
+  add_subdirectory(${subdir})
+endforeach()
\ No newline at end of file
diff --git a/mono/dis/CMakeLists.txt b/mono/dis/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2153956
--- /dev/null
@@ -0,0 +1,42 @@
+if(PLATFORM_WIN32)
+###export HOST_CC
+endif()
+
+set(libmonodis_a_SOURCES  
+       get.c   
+       get.h   
+       dis-cil.c
+       dis-cil.h
+       util.c  
+       util.h)
+
+set(monodis_SOURCES  
+       dump.c  
+       dump.h  
+       main.c  
+       meta.h  
+       declsec.c
+       declsec.h)
+
+set(monodis_LDADD              
+       libmonodis.a            
+       ${runtime_lib}          
+       ${GLIB_LIBS})
+
+include_directories(${top_srcdir})
+include_directories(${GLIB2_INCLUDE_DIRS})
+set(CMAKE_C_FLAGS "${CFLAGS} ${CPPFLAGS}")
+
+# FIXME: cmake doesn't seem to link the libs together into libmono-static.a
+link_directories(../../libgc/.libs)
+
+add_executable(monodis ${libmonodis_a_SOURCES} ${monodis_SOURCES})
+target_link_libraries(monodis mono-static ${GLIB_LIBS})
+
+###bin_PROGRAMS monodis
+
+###noinst_LIBRARIES libmonodis.a
+
+###man_MANS monodis.1
+
+###EXTRA_DIST ${man_MANS}
diff --git a/mono/io-layer/CMakeLists.txt b/mono/io-layer/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b1274b1
--- /dev/null
@@ -0,0 +1,141 @@
+
+# Last synched with Makefile.am at r134597
+
+set(OTHER_H
+       access.h
+       atomic.h
+       collection.h
+       context.h
+       critical-sections.h
+       error.h 
+       events.h
+       handles.h
+       io.h    
+       io-layer.h
+       io-portability.h
+       macros.h
+       messages.h
+       mono-mutex.h
+       mutexes.h
+       processes.h
+       security.h
+       semaphores.h
+       sockets.h
+       status.h
+       system.h
+       threads.h
+       timefuncs.h
+       types.h 
+       uglify.h
+       versioninfo.h
+       wait.h  
+       wapi.h)
+
+set(OTHER_SRC
+       access.h        
+       atomic.c        
+       atomic.h        
+       collection.c    
+       collection.h    
+       context.c       
+       context.h       
+       critical-sections.c
+       critical-sections.h
+       critical-section-private.h
+       error.c         
+       error.h         
+       events.c        
+       events.h        
+       event-private.h 
+       handles.c       
+       handles.h       
+       handles-private.h
+       io.c            
+       io.h            
+       io-portability.c
+       io-portability.h
+       io-private.h    
+       io-layer.h      
+       locking.c       
+       macros.h        
+       messages.c      
+       messages.h      
+       misc.c          
+       misc-private.h  
+       mutexes.c       
+       mutexes.h       
+       mutex-private.h 
+       mono-mutex.c    
+       mono-mutex.h    
+       mono-spinlock.h 
+       processes.c     
+       processes.h     
+       process-private.h
+       security.c      
+       security.h      
+       semaphores.c    
+       semaphores.h    
+       semaphore-private.h
+       shared.c        
+       shared.h        
+       sockets.c       
+       sockets.h       
+       socket-private.h
+       socket-wrappers.h
+       status.h        
+       system.c        
+       system.h        
+       threads.h       
+       thread-private.h
+       timefuncs.c     
+       timefuncs.h     
+       timefuncs-private.h
+       types.h         
+       uglify.h        
+       versioninfo.c   
+       versioninfo.h   
+       wait.c          
+       wait.h          
+       wapi_glob.h     
+       wapi_glob.c     
+       wapi.h          
+       wapi-private.h  
+       wthreads.c)
+
+set(WINDOWS_H
+  io-layer.h)
+
+set(WINDOWS_SRC
+  io-layer.h
+  io-layer-dummy.c)
+
+set(HPPA_SRC
+  hppa_atomic.S)
+
+if(PLATFORM_WIN32)
+###if PLATFORM_WIN32
+###libwapi_la_SOURCES = $(WINDOWS_SRC)
+###libwapiinclude_HEADERS = $(WINDOWS_H)
+else()
+###if HPPA
+###libwapi_la_SOURCES = $(OTHER_SRC) $(HPPA_SRC)
+#### to enable pick up of config.h
+###libwapi_la_CCASFLAGS = -I$(top_builddir)
+###else
+set(libwapi_la_SOURCES ${OTHER_SRC})
+###endif
+###libwapiinclude_HEADERS = $(OTHER_H)
+###endif
+endif()
+
+###EXTRA_DIST =
+###    $(WINDOWS_SRC)
+###        $(HPPA_SRC) \
+###    $(OTHER_SRC)
+
+set(top_srcdir ../../)
+include_directories(${top_srcdir} ${top_srcdir}/mono ${GLIB2_INCLUDE_DIRS})
+add_definitions(${CFLAGS} ${LIBGC_CFLAGS} ${CPPFLAGS})
+
+add_library(wapi-static STATIC ${libwapi_la_SOURCES})
+add_library(wapi SHARED ${libwapi_la_SOURCES})
index 952dae17264aaf61ce892eeca9312a40690be3d3..e17c10120e24dbbca633deee5443057731b43ca6 100644 (file)
@@ -1,3 +1,20 @@
+2009-05-22  Miguel de Icaza  <miguel@novell.com>
+
+       * wapi_glob.c: Do not need sys/param.h anymore, we now use the
+       POSIX PATH_MAX instead of BSD's MAXPATHLEN
+
+       * handles.c: Do not pull a reference to sockets if they are
+       disabled.
+
+       * sockets.c: Allow for ports to define their own ioctlsocket. 
+
+       * wthreads.c: Remove obsolete code that I recently introudced (the
+       hook for mono_register_thread_attr.
+
+2009-05-22  Miguel de Icaza  <miguel@novell.com>
+
+       * versioninfo.c: One missing signature, fixed.
+
 2009-05-21  Miguel de Icaza  <miguel@novell.com>
 
        * daemon.c: Remove more DEBUG ifdef mess.
index b98456b5551ffc45b07d6f34322eafd40f660d73..315b5e082335e3420a3d73456015b3296798cd26 100644 (file)
@@ -54,7 +54,9 @@ static struct _WapiHandleOps *handle_ops[WAPI_HANDLE_COUNT]={
        &_wapi_sem_ops,
        &_wapi_mutex_ops,
        &_wapi_event_ops,
+#ifndef DISABLE_SOCKETS
        &_wapi_socket_ops,
+#endif
        &_wapi_find_ops,
        &_wapi_process_ops,
        &_wapi_pipe_ops,
index 34d71a310cb1be816da0d57fbf6aeff9b6b5c980..a55569a3902e3f77d9ecfb63cd085faff0509f5b 100644 (file)
@@ -1253,6 +1253,7 @@ WSAIoctl (guint32 fd, gint32 command,
        return(0);
 }
 
+#ifndef PLATFORM_PORT_PROVIDES_IOCTLSOCKET
 int ioctlsocket(guint32 fd, gint32 command, gpointer arg)
 {
        gpointer handle = GUINT_TO_POINTER (fd);
@@ -1425,6 +1426,7 @@ void _wapi_FD_SET(guint32 fd, fd_set *set)
 
        FD_SET (fd, set);
 }
+#endif
 
 static void
 wsabuf_to_msghdr (WapiWSABuf *buffers, guint32 count, struct msghdr *hdr)
index 90dbb344097310501b67622b9c12a73545e5328f..7dad3da103c36c6daa5dceb44d4e903bee131165 100644 (file)
@@ -989,7 +989,7 @@ GetFileVersionInfo (gunichar2 *filename, guint32 handle G_GNUC_UNUSED, guint32 l
 #endif
        }
 
-       unmap_pe_file (file_map, &map_handle);
+       unmap_pe_file (file_map, map_handle);
        
        return(ret);
 }
index c34e1714f3fc9e1cdbf96576f227374ecede40d5..8831d03c420a384184c6c9f94fd6ccf42d762d37 100644 (file)
@@ -39,7 +39,7 @@
  * GLOB_MAGCHAR:
  *     Set in gl_flags if pattern contained a globbing character.
  */
-#include <sys/param.h>
+#include <sys/types.h>
 #include <sys/stat.h>
 
 #include <glib.h>
index 750e4389621fed3b68324243c4da3d2acc7f34de..480db8cabf7004442377c07d2f4ede415eb35a12 100644 (file)
@@ -402,9 +402,6 @@ gpointer CreateThread(WapiSecurityAttributes *security G_GNUC_UNUSED, guint32 st
 
        ret = pthread_create (&thread_handle_p->id, &attr,
                              thread_start_routine, (void *)thread_handle_p);
-#ifdef MONO_REGISTER_THREAD_ATTR
-       mono_register_thread_attr (&attr, &thread_handle_p->id);
-#endif
 
        if (ret != 0) {
 #ifdef DEBUG
diff --git a/mono/metadata/CMakeLists.txt b/mono/metadata/CMakeLists.txt
new file mode 100644 (file)
index 0000000..1189be6
--- /dev/null
@@ -0,0 +1,232 @@
+if(PLATFORM_WIN32)
+###win32_sources = \
+###    console-win32.c
+
+###platform_sources = $(win32_sources)
+
+#### Use -m here. This will use / as directory separator (C:/WINNT).
+#### The files that use MONO_ASSEMBLIES and/or MONO_CFG_DIR replace the
+#### / by \ if running under WIN32.
+###if CROSS_COMPILING
+###assembliesdir = ${libdir}
+###confdir = ${sysconfdir}
+###else
+###assembliesdir = `cygpath -m "${libdir}"`
+###confdir = `cygpath -m "${sysconfdir}"`
+###endif
+###export HOST_CC
+#### The mingw math.h has "extern inline" functions that dont appear in libs, so
+#### optimisation is required to actually inline them
+###AM_CFLAGS = -O
+
+else()
+
+# FIXME:
+set(assembliesdir ${CMAKE_INSTALL_PREFIX}/lib)
+set(sysconfdir ${CMAKE_INSTALL_PREFIX}/etc)
+set(confdir ${sysconfdir})
+###assembliesdir = $(exec_prefix)/lib
+###confdir = $(sysconfdir)
+
+set(unix_sources
+  console-unix.c)
+
+set(platform_sources ${unix_sources})
+
+endif(PLATFORM_WIN32)
+
+###bin_PROGRAMS = pedump
+
+#
+#### libtool is not capable of creating static/shared versions of the same
+#### convenience lib, so we have to do it ourselves
+#
+###noinst_LTLIBRARIES = libmonoruntime.la libmonoruntime-static.la
+
+set(top_srcdir ../../)
+INCLUDE_DIRECTORIES(${top_srcdir} ${top_srcdir}/mono ${GLIB2_INCLUDE_DIRS})
+ADD_DEFINITIONS("-DMONO_BINDIR=\"${CMAKE_BINARY_DIR}\"")
+ADD_DEFINITIONS("-DMONO_ASSEMBLIES=\"${assembliesdir}\"")
+ADD_DEFINITIONS("-DMONO_CFG_DIR=\"${confdir}\"")
+ADD_DEFINITIONS(${CFLAGS} ${LIBGC_CFLAGS} ${CPPFLAGS})
+
+#
+#### Make sure any prefix changes are updated in the binaries too.
+#
+####  assembly.c uses MONO_ASSEMBLIES
+####  mono-config.c uses MONO_CFG_DIR
+#
+#### This won't result in many more false positives than AC_DEFINEing them
+#### in configure.in.
+#
+###assembly.lo mono-config.lo: Makefile
+
+###CLEANFILES = mono-bundle.stamp
+
+###libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD)
+
+set(null_sources
+  console-null.c)
+
+set(libmonoruntime_la_SOURCES
+       ${platform_sources}
+       appdomain.c     
+       assembly.c      
+       attach.h        
+       attach.c        
+       boehm-gc.c      
+       char-conversions.h
+       cil-coff.h      
+       class.c         
+       class-internals.h
+       cominterop.c    
+       cominterop.h    
+       console-io.h    
+       coree.c         
+       coree.h         
+       culture-info.h  
+       culture-info-tables.h
+       debug-helpers.c 
+       debug-mono-symfile.h
+       debug-mono-symfile.c
+       decimal.c       
+       decimal.h       
+       domain.c        
+       domain-internals.h
+       environment.c   
+       environment.h   
+       exception.c     
+       exception.h     
+       file-io.c       
+       file-io.h       
+       filewatcher.c   
+       filewatcher.h   
+       gc.c            
+       gc-internal.h   
+       generic-sharing.c
+       icall.c         
+       icall-def.h     
+       image.c         
+       loader.c        
+       locales.c       
+       locales.h       
+       lock-tracer.c   
+       lock-tracer.h   
+       marshal.c       
+       marshal.h       
+       mempool.c       
+       mempool-internals.h
+       metadata.c      
+       metadata-verify.c
+       metadata-internals.h
+       method-builder.h 
+       method-builder.c 
+       mono-config.c   
+       mono-debug.h    
+       mono-debug.c    
+       mono-debug-debugger.h
+       mono-debug-debugger.c
+       mono-endian.c   
+       mono-endian.h   
+       mono-mlist.c    
+       mono-mlist.h    
+       mono-perfcounters.c
+       mono-perfcounters.h
+       mono-perfcounters-def.h
+       monitor.c       
+       monitor.h       
+       normalization-tables.h
+       null-gc.c       
+       number-formatter.h
+       object.c        
+       object-internals.h
+       opcodes.c       
+       socket-io.c     
+       socket-io.h     
+       process.c       
+       process.h       
+       profiler.c      
+       profiler-private.h
+       rand.h          
+       rand.c          
+       reflection.c    
+       security.c      
+       security.h      
+       security-core-clr.c
+       security-core-clr.h
+       security-manager.c
+       security-manager.h
+       sgen-gc.c       
+       sgen-gc.h       
+       string-icalls.c 
+       string-icalls.h 
+       sysmath.h       
+       sysmath.c       
+       tabledefs.h     
+       threads.c       
+       threads-types.h 
+       threadpool.c    
+       threadpool.h    
+       threadpool-internals.h
+       verify.c        
+       verify-internals.h
+       wrapper-types.h)
+
+set(libmonoruntime_static_la_SOURCES ${libmonoruntime_la_SOURCES})
+
+###libmonoruntimeincludedir = $(includedir)/mono-$(API_VER)/mono/metadata
+
+###libmonoruntimeinclude_HEADERS = \
+###    assembly.h              \
+###    attrdefs.h              \
+###    appdomain.h             \
+###    blob.h                  \
+###    class.h                 \
+###    debug-helpers.h         \
+###    debug-mono-symfile.h    \
+###    threads.h               \
+###    environment.h           \
+###    exception.h             \
+###    image.h                 \
+###    loader.h                \
+###    mempool.h               \
+###    metadata.h              \
+###    mono-config.h           \
+###    mono-debug.h            \
+###    mono-gc.h               \
+###    object.h                \
+###    opcodes.h               \
+###    profiler.h              \
+###    reflection.h            \
+###    row-indexes.h           \
+###    tokentype.h             \
+###    verify.h                
+
+#ADD_LIBRARY(libmonoruntime SHARED ${libmonoruntime_la_SOURCES})
+
+###if DTRACE_G_REQUIRED
+
+###PEDUMP_DTRACE_OBJECT = pedump-dtrace.$(OBJEXT)
+
+###pedump-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
+###    DTRACE="$(DTRACE)" DTRACEFLAGS="$(DTRACEFLAGS)" AR="$(AR)" $(SHELL) $(top_srcdir)/data/dtrace-prelink.sh \
+###    --pic pedump-dtrace.$(OBJEXT) $(top_srcdir)/data/mono.d libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la
+
+###else
+###PEDUMP_DTRACE_OBJECT = 
+###endif
+
+add_library(monoruntime-static STATIC ${libmonoruntime_static_la_SOURCES})
+#add_library(monoruntime SHARED ${libmonoruntime_static_la_SOURCES})
+#target_link_libraries(monoruntime wapi monoutils monogc ${GLIB2_LIBRARIES} ${LIBS})
+
+# FIXME:
+link_directories(../../libgc/.libs)
+add_executable(pedump pedump.c)
+target_link_libraries(pedump monoruntime-static wapi monoutils monogc-static ${GLIB2_LIBRARIES} ${LIBS})
+
+###pedump_LDADD = libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la \
+###    $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(PEDUMP_DTRACE_OBJECT)
+
+###EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources)
+
index 0bcc20b4c2536e4b27a32774aa23401bac3857d7..f56b19c2bd8e17e550f7ecdb2ad7eaf766d33ceb 100644 (file)
@@ -1,3 +1,61 @@
+2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * 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-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * metadata-verify.c (safe_read): Use endian safe read macros.
+
+2009-05-25  Zoltan Varga  <vargaz@gmail.com>
+
+       * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
+       it is read-only when using full aot.
+
+2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * metadata-verify.c (is_valid_method_signature): Verify parts
+       of the return type. Provide an error message in case of failure.
+
+2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * metadata-verify.c (is_valid_method_signature): Verify the call conv.
+
+2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * metadata-verify.c: Include the size prefix in the bounds check.
+
+2009-05-22  Miguel de Icaza  <miguel@novell.com>
+
+       * icall.c: Remove warnings.
+
+       * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
+       prevent auto-detection based on GCC defines.
+
+       Add PS3
+
+       * metadata-verify.c: Do not include signal.h
+
+       * generic-sharing.c, marshal.c: Add returns to avoid some warning
+       messages.  Not sure why the g_assert_not_reached is not enough to
+       quiet the compiler.
+       
+
+       * appdomain.c: Remove code that is not used when
+       DISABLE_SHADOW_COPY is set.
+
+       * image.c: use g_getenv
+
+2009-05-21  Miguel de Icaza  <miguel@novell.com>
+
+       * reflection.c: Remove code that it not used with
+       DISABLE_REFLECTION_EMIT is defined.
+
+2009-05-21  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
+       invoke wrappers.
+
 2009-05-20  Miguel de Icaza  <miguel@novell.com>
 
        * socket-io.c
index 0521f0f5ca0c8962ea3ce5e55576757bb83a5de0..0451dee78ab4ac86deb540017c5c9edafdc93e82 100644 (file)
@@ -431,10 +431,12 @@ mono_domain_create_appdomain_internal (char *friendly_name, MonoAppDomainSetup *
        
        add_assemblies_to_domain (data, mono_defaults.corlib->assembly, NULL);
 
+#ifndef DISABLE_SHADOW_COPY
        shadow_location = get_shadow_assembly_location_base (data);
        mono_debugger_event_create_appdomain (data, shadow_location);
        g_free (shadow_location);
-
+#endif
+       
        return ad;
 }
 
index a6e7e437ce5a1454899cd25d907a000cb6a58505..d7ec1fc224e3ab5f7d8e14011e134b1dc572416c 100644 (file)
@@ -1097,9 +1097,14 @@ mono_class_setup_fields (MonoClass *class)
                class->min_align = 1;
        }
 
-       if (class->simd_type)
-               class->min_align = 16;
+       /* 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);
 
index 2dad1c9b25065813b94e13f540bcb75936fd2e2d..b54eadb3b6ca7446d235636862fd718b7e949c30 100644 (file)
@@ -585,6 +585,8 @@ inflate_other_data (gpointer data, int info_type, MonoGenericContext *context, M
        default:
                g_assert_not_reached ();
        }
+       /* Not reached, quiet compiler */
+       return NULL;
 }
 
 static gpointer
@@ -771,6 +773,8 @@ class_type_info (MonoDomain *domain, MonoClass *class, int info_type)
        default:
                g_assert_not_reached ();
        }
+       /* Not reached */
+       return NULL;
 }
 
 static gpointer
@@ -837,6 +841,8 @@ instantiate_other_info (MonoDomain *domain, MonoRuntimeGenericContextOtherInfoTe
        default:
                g_assert_not_reached ();
        }
+       /* Not reached */
+       return NULL;
 }
 
 /*
@@ -940,6 +946,8 @@ other_info_equal (gpointer data1, gpointer data2, int info_type)
        default:
                g_assert_not_reached ();
        }
+       /* never reached */
+       return NULL;
 }
 
 static int
index 99d1c991d38b81e48b00ff2c5c04cf08dc4b44c1..77d001d8db1dde84366f96b391b5758e2f7bdcfe 100644 (file)
@@ -7217,14 +7217,16 @@ mono_ArgIterator_Setup (MonoArgIterator *iter, char* argsp, char* start)
        if (start) {
                iter->args = start;
        } else {
-               guint32 i, arg_size;
-               gint32 align;
                iter->args = argsp + sizeof (gpointer);
 #ifndef MONO_ARCH_REGPARMS
+               {
+               guint32 i, arg_size;
+               gint32 align;
                for (i = 0; i < iter->sig->sentinelpos; ++i) {
                        arg_size = mono_type_stack_size (iter->sig->params [i], &align);
                        iter->args = (char*)iter->args + arg_size;
                }
+               }
 #endif
        }
        iter->num_args = iter->sig->param_count - iter->sig->sentinelpos;
@@ -7501,6 +7503,8 @@ custom_attrs_get_by_type (MonoObject *obj, MonoReflectionType *attr_type)
        if (mono_loader_get_last_error ()) {
                mono_raise_exception (mono_loader_error_prepare_exception (mono_loader_get_last_error ()));
                g_assert_not_reached ();
+               /* Not reached */
+               return NULL;
        } else {
                return res;
        }
index a254e33e30ce6b7ec9a0aad0d2dfb329fc02a256..da552e6fa65c971a1674302873f03a585e4633f8 100644 (file)
@@ -130,7 +130,7 @@ mono_images_init (void)
        loaded_images_hash = g_hash_table_new (g_str_hash, g_str_equal);
        loaded_images_refonly_hash = g_hash_table_new (g_str_hash, g_str_equal);
 
-       debug_assembly_unload = getenv ("MONO_DEBUG_ASSEMBLY_UNLOAD") != NULL;
+       debug_assembly_unload = g_getenv ("MONO_DEBUG_ASSEMBLY_UNLOAD") != NULL;
 }
 
 /**
index 234270f8c58805f78951e95a7eb4384ffc6ea096..e13eef427e2b31dcdf9eeac93b492041b2578aaf 100644 (file)
@@ -3458,6 +3458,8 @@ mono_marshal_get_remoting_invoke_for_target (MonoMethod *method, MonoRemotingTar
        } else {
                return mono_marshal_get_remoting_invoke (method);
        }
+       /* Not erached */
+       return NULL;
 }
 
 G_GNUC_UNUSED static gpointer
@@ -3812,8 +3814,12 @@ add_string_ctor_signature (MonoMethod *method)
 static MonoType*
 get_runtime_invoke_type (MonoType *t, gboolean ret)
 {
-       if (t->byref)
-               return &mono_defaults.int_class->byval_arg;
+       if (t->byref) {
+               if (t->type == MONO_TYPE_GENERICINST)
+                       return t;
+               else
+                       return &mono_defaults.int_class->byval_arg;
+       }
 
 handle_enum:
        switch (t->type) {
@@ -3867,7 +3873,7 @@ static gboolean
 runtime_invoke_signature_equal (MonoMethodSignature *sig1, MonoMethodSignature *sig2)
 {
        /* Can't share wrappers which return a vtype since it needs to be boxed */
-       if (sig1->ret != sig2->ret && !(MONO_TYPE_IS_REFERENCE (sig1->ret) && MONO_TYPE_IS_REFERENCE (sig2->ret)))
+       if (sig1->ret != sig2->ret && !(MONO_TYPE_IS_REFERENCE (sig1->ret) && MONO_TYPE_IS_REFERENCE (sig2->ret)) && !mono_metadata_type_equal (sig1->ret, sig2->ret))
                return FALSE;
        else
                return mono_metadata_signature_equal (sig1, sig2);
@@ -3957,11 +3963,13 @@ mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual)
                }
        }
 
+#if 0
        /* Vtypes/nullables/Byrefs cause too many problems */
        for (i = 0; i < callsig->param_count; ++i) {
                if (MONO_TYPE_ISSTRUCT (callsig->params [i]) || callsig->params [i]->byref)
                        need_direct_wrapper = TRUE;
        }
+#endif
 
        /*
         * We try to share runtime invoke wrappers between different methods but have to
index da4451a02e5f11a35a39eb3e7be9eb4ef98571aa..2abd95812a9bcb81844e1747bd385302d9731ba5 100644 (file)
@@ -24,7 +24,7 @@
 #include <mono/metadata/attrdefs.h>
 #include <mono/utils/strenc.h>
 #include <string.h>
-#include <signal.h>
+//#include <signal.h>
 #include <ctype.h>
 
 #ifndef DISABLE_VERIFIER
@@ -249,6 +249,14 @@ typedef struct {
                return; \
        } while (0)
 
+#define FAIL(__ctx, __msg)     \
+       do {    \
+               if ((__ctx)->report_error) \
+                       ADD_VERIFY_INFO(__ctx, __msg, MONO_VERIFY_ERROR, MONO_EXCEPTION_INVALID_PROGRAM); \
+               (__ctx)->valid = 0; \
+               return FALSE; \
+       } while (0)
+
 #define CHECK_STATE() do { if (!ctx.valid) goto cleanup; } while (0)
 
 #define CHECK_ERROR() do { if (!ctx->valid) return; } while (0)
@@ -1019,6 +1027,138 @@ typedef_is_system_object (VerifyContext *ctx, guint32 *data)
        return ctx->is_corlib && !string_cmp (ctx, "System", data [MONO_TYPEDEF_NAME]) && !string_cmp (ctx, "Object", data [MONO_TYPEDEF_NAMESPACE]);
 }
 
+static gboolean
+decode_value (const char *_ptr, unsigned available, unsigned *value, unsigned *size)
+{
+       unsigned char b;
+       const unsigned char *ptr = (const unsigned char *)_ptr;
+
+       if (!available)
+               return FALSE;
+
+       b = *ptr;
+       *value = *size = 0;
+       
+       if ((b & 0x80) == 0) {
+               *size = 1;
+               *value = b;
+       } else if ((b & 0x40) == 0) {
+               if (available < 2)
+                       return FALSE;
+               *size = 2;
+               *value = ((b & 0x3f) << 8 | ptr [1]);
+       } else {
+               if (available < 4)
+                       return FALSE;
+               *size = 4;
+               *value  = ((b & 0x1f) << 24) |
+                       (ptr [1] << 16) |
+                       (ptr [2] << 8) |
+                       ptr [3];
+       }
+
+       return TRUE;
+}
+
+static gboolean
+decode_signature_header (VerifyContext *ctx, guint32 offset, int *size, const char **first_byte)
+{
+       MonoStreamHeader blob = ctx->image->heap_blob;
+       guint32 value, enc_size;
+
+       if (offset >= blob.size)
+               return FALSE;
+
+       if (!decode_value (blob.data + offset, blob.size - offset, &value, &enc_size))
+               return FALSE;
+
+       if (offset + enc_size + value < offset)
+               return FALSE;
+
+       if (offset + enc_size + value >= blob.size)
+               return FALSE;
+
+       *size = value;
+       *first_byte = blob.data + offset + enc_size;
+       return TRUE;
+}
+
+static gboolean
+safe_read (const char **_ptr, const char *limit, void *dest, int size)
+{
+       const char *ptr = *_ptr;
+       if (ptr + size > limit)
+               return FALSE;
+       switch (size) {
+       case 1:
+               *((guint8*)dest) = *((guint8*)ptr);
+               ++ptr;
+               break;
+       case 2:
+               *((guint16*)dest) = read16 (ptr);
+               ptr += 2;
+               break;
+       case 4:
+               *((guint32*)dest) = read32 (ptr);
+               ptr += 4;
+               break;
+       }
+       *_ptr = ptr;
+       return TRUE;
+}
+
+static gboolean
+safe_read_compressed_int (const char **_ptr, const char *limit, unsigned *dest)
+{
+       unsigned size = 0;
+       const char *ptr = *_ptr;
+       gboolean res = decode_value (ptr, limit - ptr, dest, &size);
+       *_ptr = ptr + size;
+       return res;
+}
+
+#define safe_read8(VAR, PTR, LIMIT) safe_read (&PTR, LIMIT, &VAR, 1)
+#define safe_read_cint(VAR, PTR, LIMIT) safe_read_compressed_int (&PTR, LIMIT, &VAR)
+#define safe_read16(VAR, PTR, LIMIT) safe_read (&PTR, LIMIT, &VAR, 2)
+#define safe_read32(VAR, PTR, LIMIT) safe_read (&PTR, LIMIT, &VAR, 4)
+
+static gboolean
+parse_custom_mods (VerifyContext *ctx, const char **_ptr, const char *end)
+{
+       return TRUE;
+}
+
+static gboolean
+parse_type (VerifyContext *ctx, const char **_ptr, const char *end)
+{
+       return TRUE;
+}
+
+static gboolean
+parse_return_type (VerifyContext *ctx, const char **_ptr, const char *end)
+{
+       const char *ptr;
+       int type = 0;
+
+       if (!parse_custom_mods (ctx, _ptr, end))
+               return FALSE;
+
+       ptr = *_ptr;
+       if (!safe_read8 (type, ptr, end))
+               FAIL (ctx, g_strdup ("ReturnType: Not enough room for the type"));
+
+       if (type == MONO_TYPE_VOID || type == MONO_TYPE_TYPEDBYREF) {
+               *_ptr = ptr;
+               return TRUE;
+       }
+
+       //it's a byref, update the cursor ptr
+       if (type == MONO_TYPE_TYPEDBYREF)
+               *_ptr = ptr;
+
+       return parse_type (ctx, _ptr, end);
+}
+
 static gboolean
 is_valid_field_signature (VerifyContext *ctx, guint32 offset)
 {
@@ -1030,9 +1170,29 @@ is_valid_field_signature (VerifyContext *ctx, guint32 offset)
 static gboolean
 is_valid_method_signature (VerifyContext *ctx, guint32 offset)
 {
-       OffsetAndSize blob = get_metadata_stream (ctx, &ctx->image->heap_blob);
-       //TODO do proper verification
-       return blob.size >= 2 && blob.size - 2 >= offset;
+       int size = 0, cconv = 0;
+       unsigned param_count;
+       const char *ptr = NULL, *end;
+       if (!decode_signature_header (ctx, offset, &size, &ptr))
+               return FALSE;
+       end = ptr + size;
+
+       if (!safe_read8 (cconv, ptr, end))
+               FAIL (ctx, g_strdup ("MethodSig: Not enough room for the call conv"));
+
+       if (cconv & 0x80)
+               FAIL (ctx, g_strdup ("MethodSig: CallConv has 0x80 set"));
+
+       if ((cconv & 0x0F) != 0 && (cconv & 0x0F)!= 5)
+               FAIL (ctx, g_strdup ("MethodSig: CallConv is not Default or Vararg"));
+
+       if (!safe_read_cint (param_count, ptr, end))
+               FAIL (ctx, g_strdup ("MethodSig: Not enough room for the param count"));
+
+       if (!parse_return_type (ctx, &ptr, end))
+               return FALSE;
+
+       return TRUE;
 }
 
 static gboolean
@@ -1099,39 +1259,6 @@ is_valid_methodspec_blog (VerifyContext *ctx, guint32 offset)
        return offset > 0 && blob.size >= 1 && blob.size - 1 >= offset;
 }
 
-static gboolean
-decode_value (const char *_ptr, guint32 available, guint32 *value, guint32 *size)
-{
-       unsigned char b;
-       const unsigned char *ptr = (const unsigned char *)_ptr;
-
-       if (!available)
-               return FALSE;
-
-       b = *ptr;
-       *value = *size = 0;
-       
-       if ((b & 0x80) == 0) {
-               *size = 1;
-               *value = b;
-       } else if ((b & 0x40) == 0) {
-               if (available < 2)
-                       return FALSE;
-               *size = 2;
-               *value = ((b & 0x3f) << 8 | ptr [1]);
-       } else {
-               if (available < 4)
-                       return FALSE;
-               *size = 4;
-               *value  = ((b & 0x1f) << 24) |
-                       (ptr [1] << 16) |
-                       (ptr [2] << 8) |
-                       ptr [3];
-       }
-
-       return TRUE;
-}
-
 static gboolean
 is_valid_blob_object (VerifyContext *ctx, guint32 offset)
 {
@@ -1146,10 +1273,10 @@ is_valid_blob_object (VerifyContext *ctx, guint32 offset)
        if (!decode_value (ctx->data + offset + blob.offset, blob.size - blob.offset, &entry_size, &bytes))
                return FALSE;
 
-       if (offset + entry_size < offset)
+       if (offset + entry_size + bytes < offset)
                return FALSE;
 
-       return blob.size >= offset + entry_size;
+       return blob.size >= offset + entry_size + bytes;
 }
 
 static gboolean
index 28de1572e9591827713f7ef1a3d38a278487ed5f..d3e8ddaddf5b69ca5923cd2166f0ccd81a657180 100644 (file)
 #define CONFIG_OS "aix"
 #elif defined(__hpux)
 #define CONFIG_OS "hpux"
+#elif defined(SN_TARGET_PS3)
+#define CONFIG_OS "CellOS"
 #else
 #warning Unknown operating system
 #define CONFIG_OS "unknownOS"
 #endif
 
+#ifndef CONFIG_CPU
 #if defined(__i386__)
 #define CONFIG_CPU "x86"
 #define CONFIG_WORDSIZE "32"
@@ -82,6 +85,7 @@
 #warning Unknown CPU
 #define CONFIG_CPU "unknownCPU"
 #endif
+#endif
 
 static void start_element (GMarkupParseContext *context, 
                            const gchar         *element_name,
index a1697ad66056baa545dc5c8d4d5ee810f56aa101..3ffb76005e24404b5d3d81a4919a57f750313e0a 100644 (file)
@@ -5721,7 +5721,7 @@ mono_create_ftnptr (MonoDomain *domain, gpointer addr)
 #elif defined(__ppc64__) || defined(__powerpc64__)
        gpointer *desc;
 
-       desc = mono_domain_code_reserve (domain, 3 * sizeof (gpointer));
+       desc = mono_domain_alloc0 (domain, 3 * sizeof (gpointer));
 
        desc [0] = addr;
        desc [1] = NULL;
index 8e2faea67a59691e7de153a6aec28f934f3ed3d7..a3b4fb6d5bd2288b9b5e6a89411ac9542c9a334a 100644 (file)
@@ -51,18 +51,6 @@ static void* reflection_info_desc = NULL;
 #define MOVING_GC_REGISTER(addr)
 #endif
 
-static void
-check_array_for_usertypes (MonoArray *arr)
-{
-       int i;
-
-       if (!arr)
-               return;
-
-       for (i = 0; i < mono_array_length (arr); ++i)
-               CHECK_MONOTYPE (mono_array_get (arr, gpointer, i));
-}
-
 typedef struct {
        char *p;
        char *buf;
@@ -160,27 +148,31 @@ const unsigned char table_sizes [MONO_TABLE_NUM] = {
 
 };
 
-static void reflection_methodbuilder_from_method_builder (ReflectionMethodBuilder *rmb, MonoReflectionMethodBuilder *mb);
-static void reflection_methodbuilder_from_ctor_builder (ReflectionMethodBuilder *rmb, MonoReflectionCtorBuilder *mb);
-static guint32 mono_image_typedef_or_ref (MonoDynamicImage *assembly, MonoType *type);
-static guint32 mono_image_typedef_or_ref_full (MonoDynamicImage *assembly, MonoType *type, gboolean try_typespec);
+#ifndef DISABLE_REFLECTION_EMIT
 static guint32 mono_image_get_methodref_token (MonoDynamicImage *assembly, MonoMethod *method, gboolean create_typespec);
 static guint32 mono_image_get_methodbuilder_token (MonoDynamicImage *assembly, MonoReflectionMethodBuilder *mb, gboolean create_methodspec);
 static guint32 mono_image_get_ctorbuilder_token (MonoDynamicImage *assembly, MonoReflectionCtorBuilder *cb);
 static guint32 mono_image_get_sighelper_token (MonoDynamicImage *assembly, MonoReflectionSigHelper *helper);
+static void    ensure_runtime_vtable (MonoClass *klass);
+static gpointer resolve_object (MonoImage *image, MonoObject *obj, MonoClass **handle_class, MonoGenericContext *context);
+static guint32 mono_image_get_methodref_token_for_methodbuilder (MonoDynamicImage *assembly, MonoReflectionMethodBuilder *method);
+static guint32 encode_generic_method_sig (MonoDynamicImage *assembly, MonoGenericContext *context);
+static gpointer register_assembly (MonoDomain *domain, MonoReflectionAssembly *res, MonoAssembly *assembly);
+#endif
+
+static void reflection_methodbuilder_from_method_builder (ReflectionMethodBuilder *rmb, MonoReflectionMethodBuilder *mb);
+static void reflection_methodbuilder_from_ctor_builder (ReflectionMethodBuilder *rmb, MonoReflectionCtorBuilder *mb);
+static guint32 mono_image_typedef_or_ref (MonoDynamicImage *assembly, MonoType *type);
+static guint32 mono_image_typedef_or_ref_full (MonoDynamicImage *assembly, MonoType *type, gboolean try_typespec);
 static void    mono_image_get_generic_param_info (MonoReflectionGenericParam *gparam, guint32 owner, MonoDynamicImage *assembly);
 static guint32 encode_marshal_blob (MonoDynamicImage *assembly, MonoReflectionMarshal *minfo);
 static guint32 encode_constant (MonoDynamicImage *assembly, MonoObject *val, guint32 *ret_type);
 static char*   type_get_qualified_name (MonoType *type, MonoAssembly *ass);
-static void    ensure_runtime_vtable (MonoClass *klass);
-static gpointer resolve_object (MonoImage *image, MonoObject *obj, MonoClass **handle_class, MonoGenericContext *context);
 static void    encode_type (MonoDynamicImage *assembly, MonoType *type, SigBuffer *buf);
 static void get_default_param_value_blobs (MonoMethod *method, char **blobs, guint32 *types);
 static MonoObject *mono_get_object_from_blob (MonoDomain *domain, MonoType *type, const char *blob);
 static MonoReflectionType *mono_reflection_type_get_underlying_system_type (MonoReflectionType* t);
 static MonoType* mono_reflection_get_type_with_rootimage (MonoImage *rootimage, MonoImage* image, MonoTypeNameParse *info, gboolean ignorecase, gboolean *type_resolve);
-static guint32 mono_image_get_methodref_token_for_methodbuilder (MonoDynamicImage *assembly, MonoReflectionMethodBuilder *method);
-static guint32 encode_generic_method_sig (MonoDynamicImage *assembly, MonoGenericContext *context);
 
 void
 mono_reflection_init (void)
@@ -237,6 +229,7 @@ sigbuffer_free (SigBuffer *buf)
        g_free (buf->buf);
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 /**
  * mp_g_alloc:
  *
@@ -251,6 +244,7 @@ image_g_malloc (MonoImage *image, guint size)
        else
                return g_malloc (size);
 }
+#endif /* !DISABLE_REFLECTION_EMIT */
 
 /**
  * image_g_alloc0:
@@ -267,6 +261,7 @@ image_g_malloc0 (MonoImage *image, guint size)
                return g_malloc0 (size);
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static char*
 image_strdup (MonoImage *image, const char *s)
 {
@@ -275,6 +270,7 @@ image_strdup (MonoImage *image, const char *s)
        else
                return g_strdup (s);
 }
+#endif
 
 #define image_g_new(image,struct_type, n_structs)              \
     ((struct_type *) image_g_malloc (image, ((gsize) sizeof (struct_type)) * ((gsize) (n_structs))))
@@ -352,6 +348,7 @@ string_heap_insert_mstring (MonoDynamicStream *sh, MonoString *str)
        return idx;
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static void
 string_heap_init (MonoDynamicStream *sh)
 {
@@ -361,6 +358,7 @@ string_heap_init (MonoDynamicStream *sh)
        sh->hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
        string_heap_insert (sh, "");
 }
+#endif
 
 static guint32
 mono_image_add_stream_data (MonoDynamicStream *stream, const char *data, guint32 len)
@@ -401,6 +399,7 @@ stream_data_align (MonoDynamicStream *stream)
                mono_image_add_stream_data (stream, buf, 4 - count);
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static int
 mono_blob_entry_hash (const char* str)
 {
@@ -429,7 +428,7 @@ mono_blob_entry_equal (const char *str1, const char *str2) {
                return 0;
        return memcmp (end1, end2, len) == 0;
 }
-
+#endif
 static guint32
 add_to_blob_cached (MonoDynamicImage *assembly, char *b1, int s1, char *b2, int s2)
 {
@@ -532,6 +531,7 @@ add_mono_string_to_blob_cached (MonoDynamicImage *assembly, MonoString *str)
        return idx;
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static MonoClass *
 default_class_from_mono_type (MonoType *type)
 {
@@ -577,6 +577,7 @@ default_class_from_mono_type (MonoType *type)
        
        return NULL;
 }
+#endif
 
 static void
 encode_generic_class (MonoDynamicImage *assembly, MonoGenericClass *gclass, SigBuffer *buf)
@@ -720,6 +721,7 @@ encode_custom_modifiers (MonoDynamicImage *assembly, MonoArray *modreq, MonoArra
        }
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static guint32
 method_encode_signature (MonoDynamicImage *assembly, MonoMethodSignature *sig)
 {
@@ -754,6 +756,7 @@ method_encode_signature (MonoDynamicImage *assembly, MonoMethodSignature *sig)
        sigbuffer_free (&buf);
        return idx;
 }
+#endif
 
 static guint32
 method_builder_encode_signature (MonoDynamicImage *assembly, ReflectionMethodBuilder *mb)
@@ -871,6 +874,7 @@ method_count_clauses (MonoReflectionILGen *ilgen)
        return num_clauses;
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static MonoExceptionClause*
 method_encode_clauses (MonoImage *image, MonoDynamicImage *assembly, MonoReflectionILGen *ilgen, guint32 num_clauses)
 {
@@ -918,6 +922,7 @@ method_encode_clauses (MonoImage *image, MonoDynamicImage *assembly, MonoReflect
 
        return clauses;
 }
+#endif /* !DISABLE_REFLECTION_EMIT */
 
 static guint32
 method_encode_code (MonoDynamicImage *assembly, ReflectionMethodBuilder *mb)
@@ -1168,6 +1173,7 @@ mono_custom_attrs_from_builders (MonoImage *alloc_img, MonoImage *image, MonoArr
        return ainfo;
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 /*
  * LOCKING: Acquires the loader lock. 
  */
@@ -1189,6 +1195,7 @@ mono_save_custom_attrs (MonoImage *image, void *obj, MonoArray *cattrs)
        mono_loader_unlock ();
 
 }
+#endif
 
 void
 mono_custom_attrs_free (MonoCustomAttrInfo *ainfo)
@@ -1443,6 +1450,7 @@ reflection_methodbuilder_from_ctor_builder (ReflectionMethodBuilder *rmb, MonoRe
        rmb->refs = NULL;
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static void
 reflection_methodbuilder_from_dynamic_method (ReflectionMethodBuilder *rmb, MonoReflectionDynamicMethod *mb)
 {
@@ -1473,6 +1481,7 @@ reflection_methodbuilder_from_dynamic_method (ReflectionMethodBuilder *rmb, Mono
        rmb->nrefs = 0;
        rmb->refs = NULL;
 }      
+#endif
 
 static void
 mono_image_add_methodimpl (MonoDynamicImage *assembly, MonoReflectionMethodBuilder *mb)
@@ -1596,6 +1605,7 @@ type_get_qualified_name (MonoType *type, MonoAssembly *ass) {
        return mono_type_get_name_full (type, MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED);
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static guint32
 fieldref_encode_signature (MonoDynamicImage *assembly, MonoType *type)
 {
@@ -1624,6 +1634,7 @@ fieldref_encode_signature (MonoDynamicImage *assembly, MonoType *type)
        sigbuffer_free (&buf);
        return idx;
 }
+#endif
 
 static guint32
 field_encode_signature (MonoDynamicImage *assembly, MonoReflectionFieldBuilder *fb)
@@ -2288,6 +2299,7 @@ mono_image_typedef_or_ref (MonoDynamicImage *assembly, MonoType *type)
        return mono_image_typedef_or_ref_full (assembly, type, TRUE);
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 /*
  * Insert a memberef row into the metadata: the token that point to the memberref
  * is returned. Caching is done in the caller (mono_image_get_methodref_token() or
@@ -2546,6 +2558,7 @@ mono_image_get_ctorbuilder_token (MonoDynamicImage *assembly, MonoReflectionCtor
        g_hash_table_insert (assembly->handleref, mb, GUINT_TO_POINTER(token));
        return token;
 }
+#endif
 
 static gboolean
 is_field_on_inst (MonoClassField *field)
@@ -2571,6 +2584,7 @@ get_field_on_inst_generic_type (MonoClassField *field)
        return dgclass->field_generic_types [field_index];
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static guint32
 mono_image_get_fieldref_token (MonoDynamicImage *assembly, MonoReflectionField *f)
 {
@@ -3021,7 +3035,7 @@ mono_reflection_encode_sighelper (MonoDynamicImage *assembly, MonoReflectionSigH
 
        return idx;
 }
-       
+
 static guint32 
 mono_image_get_sighelper_token (MonoDynamicImage *assembly, MonoReflectionSigHelper *helper)
 {
@@ -3052,6 +3066,7 @@ reflection_cc_to_file (int call_conv) {
        }
        return 0;
 }
+#endif /* !DISABLE_REFLECTION_EMIT */
 
 typedef struct {
        MonoType *parent;
@@ -3060,6 +3075,7 @@ typedef struct {
        guint32 token;
 } ArrayMethod;
 
+#ifndef DISABLE_REFLECTION_EMIT
 static guint32
 mono_image_get_array_token (MonoDynamicImage *assembly, MonoReflectionArrayMethod *m)
 {
@@ -3103,6 +3119,7 @@ mono_image_get_array_token (MonoDynamicImage *assembly, MonoReflectionArrayMetho
        m->table_idx = am->token & 0xffffff;
        return am->token;
 }
+#endif
 
 /*
  * Insert into the metadata tables all the info about the TypeBuilder tb.
@@ -4426,6 +4443,20 @@ mono_image_build_metadata (MonoReflectionModuleBuilder *moduleb)
 
 #endif /* DISABLE_REFLECTION_EMIT_SAVE */
 
+
+typedef struct {
+       guint32 import_lookup_table;
+       guint32 timestamp;
+       guint32 forwarder;
+       guint32 name_rva;
+       guint32 import_address_table_rva;
+} MonoIDT;
+
+typedef struct {
+       guint32 name_rva;
+       guint32 flags;
+} MonoILT;
+
 #ifndef DISABLE_REFLECTION_EMIT
 
 /*
@@ -4703,23 +4734,6 @@ mono_image_register_token (MonoDynamicImage *assembly, guint32 token, MonoObject
        }
 }
 
-#endif /* DISABLE_REFLECTION_EMIT */
-
-typedef struct {
-       guint32 import_lookup_table;
-       guint32 timestamp;
-       guint32 forwarder;
-       guint32 name_rva;
-       guint32 import_address_table_rva;
-} MonoIDT;
-
-typedef struct {
-       guint32 name_rva;
-       guint32 flags;
-} MonoILT;
-
-static gpointer register_assembly (MonoDomain *domain, MonoReflectionAssembly *res, MonoAssembly *assembly);
-
 static MonoDynamicImage*
 create_dynamic_mono_image (MonoDynamicAssembly *assembly, char *assembly_name, char *module_name)
 {
@@ -4801,6 +4815,7 @@ create_dynamic_mono_image (MonoDynamicAssembly *assembly, char *assembly_name, c
 
        return image;
 }
+#endif
 
 static void
 free_blob_cache_entry (gpointer key, gpointer val, gpointer user_data)
@@ -4954,7 +4969,7 @@ mono_image_basic_init (MonoReflectionAssemblyBuilder *assemblyb)
        mono_assembly_invoke_load_hook ((MonoAssembly*)assembly);
 }
 
-#endif /* DISABLE_REFLECTION_EMIT */
+#endif /* !DISABLE_REFLECTION_EMIT */
 
 #ifndef DISABLE_REFLECTION_EMIT_SAVE
 
@@ -5776,6 +5791,7 @@ mono_reflection_cleanup_domain (MonoDomain *domain)
        }
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static gpointer
 register_assembly (MonoDomain *domain, MonoReflectionAssembly *res, MonoAssembly *assembly)
 {
@@ -5788,8 +5804,6 @@ register_module (MonoDomain *domain, MonoReflectionModuleBuilder *res, MonoDynam
        CACHE_OBJECT (MonoReflectionModuleBuilder *, module, res, NULL);
 }
 
-#ifndef DISABLE_REFLECTION_EMIT
-
 void
 mono_image_module_basic_init (MonoReflectionModuleBuilder *moduleb)
 {
@@ -8438,6 +8452,7 @@ mono_reflection_type_get_underlying_system_type (MonoReflectionType* t)
         return (MonoReflectionType *) mono_runtime_invoke (method_get_underlying_system_type, t, NULL, NULL);
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static MonoType*
 mono_reflection_type_get_handle (MonoReflectionType* t)
 {
@@ -8541,6 +8556,7 @@ get_field_name_and_type (MonoObject *field, char **name, MonoType **type)
                *type = f->field->type;
        }
 }
+#endif /* !DISABLE_REFLECTION_EMIT */
 
 /*
  * Encode a value in a custom attribute stream of bytes.
@@ -8819,6 +8835,7 @@ encode_field_or_prop_type (MonoType *type, char *p, char **retp)
        *retp = p;
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static void
 encode_named_val (MonoReflectionAssembly *assembly, char *buffer, char *p, char **retbuffer, char **retp, guint32 *buflen, MonoType *type, char *name, MonoObject *value)
 {
@@ -8857,8 +8874,6 @@ encode_named_val (MonoReflectionAssembly *assembly, char *buffer, char *p, char
        *retbuffer = buffer;
 }
 
-#ifndef DISABLE_REFLECTION_EMIT
-
 /*
  * mono_reflection_get_custom_attrs_blob:
  * @ctor: custom attribute constructor
@@ -9160,8 +9175,6 @@ mono_reflection_create_internal_class (MonoReflectionTypeBuilder *tb)
        mono_loader_unlock ();
 }
 
-#endif /* DISABLE_REFLECTION_EMIT */
-
 static MonoMarshalSpec*
 mono_marshal_spec_from_builder (MonoImage *image, MonoAssembly *assembly,
                                                                MonoReflectionMarshal *minfo)
@@ -9205,6 +9218,7 @@ mono_marshal_spec_from_builder (MonoImage *image, MonoAssembly *assembly,
 
        return res;
 }
+#endif /* !DISABLE_REFLECTION_EMIT */
 
 MonoReflectionMarshal*
 mono_reflection_marshal_from_marshal_spec (MonoDomain *domain, MonoClass *klass,
@@ -9254,6 +9268,7 @@ mono_reflection_marshal_from_marshal_spec (MonoDomain *domain, MonoClass *klass,
        return minfo;
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 static MonoMethod*
 reflection_methodbuilder_to_mono_method (MonoClass *klass,
                                         ReflectionMethodBuilder *rmb,
@@ -9570,6 +9585,7 @@ fieldbuilder_to_mono_class_field (MonoClass *klass, MonoReflectionFieldBuilder*
 
        return field;
 }
+#endif
 
 MonoType*
 mono_reflection_bind_generic_parameters (MonoReflectionType *type, int type_argc, MonoType **types)
@@ -9638,7 +9654,6 @@ mono_reflection_bind_generic_method_parameters (MonoReflectionMethod *rmethod, M
        MonoClass *klass;
        MonoMethod *method, *inflated;
        MonoMethodInflated *imethod;
-       MonoReflectionMethodBuilder *mb = NULL;
        MonoGenericContext tmp_context;
        MonoGenericInst *ginst;
        MonoType **type_argv;
@@ -9648,6 +9663,7 @@ mono_reflection_bind_generic_method_parameters (MonoReflectionMethod *rmethod, M
 
        if (!strcmp (rmethod->object.vtable->klass->name, "MethodBuilder")) {
 #ifndef DISABLE_REFLECTION_EMIT
+               MonoReflectionMethodBuilder *mb = NULL;
                MonoReflectionTypeBuilder *tb;
                MonoClass *klass;
 
@@ -10233,6 +10249,18 @@ remove_instantiations_of (gpointer key,
                return FALSE;
 }
 
+static void
+check_array_for_usertypes (MonoArray *arr)
+{
+       int i;
+
+       if (!arr)
+               return;
+
+       for (i = 0; i < mono_array_length (arr); ++i)
+               CHECK_MONOTYPE (mono_array_get (arr, gpointer, i));
+}
+
 MonoReflectionType*
 mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb)
 {
diff --git a/mono/mini/CMakeLists.txt b/mono/mini/CMakeLists.txt
new file mode 100644 (file)
index 0000000..dd34cc9
--- /dev/null
@@ -0,0 +1,666 @@
+
+# Last synched with Makefile.am at r134597
+
+cmake_policy(SET CMP0010 NEW)
+
+# Helper functions
+
+function(add_cs_target target sources args depends)
+  separate_arguments(sources)
+  separate_arguments(args)
+  separate_arguments(depends)
+  add_custom_command(
+       OUTPUT ${target}
+       COMMAND ${MCS} -out:${target} ${args} ${sources}
+       DEPENDS ${sources} ${depends}
+       )
+  add_custom_target (${target}-target DEPENDS ${target})
+endfunction()
+
+function(add_cs_dll target sources args depends)
+  add_cs_target(${target} ${sources} "-target:library ${args}" "${depends}")
+endfunction()
+
+function(add_cs_exe target sources args depends)
+  add_cs_target(${target} ${sources} "-target:exe ${args}" "${depends}")
+endfunction()
+
+function(add_il_target target sources args)
+  separate_arguments(sources)
+  separate_arguments(args)
+  add_custom_command(
+       OUTPUT ${target}
+       COMMAND ${ILASM} -output=${target} ${args} ${sources}
+       DEPENDS ${sources}
+       )
+  add_custom_target (${target}-target DEPENDS ${target})
+endfunction()
+
+
+
+
+set(count 100000)
+set(mtest for_loop)
+set(monodir ${top_builddir})
+
+set(CLASS ${mcs_topdir}/class/lib/net_2_0)
+
+set(RUNTIME MONO_PATH=${CLASS} ${top_builddir}/runtime/mono-wrapper)
+set(RUNTIME_AOTCHECK MONO_PATH=${CLASS}:. ${top_builddir}/runtime/mono-wrapper)
+
+set(MCS ${RUNTIME} ${CLASS}/gmcs.exe -unsafe -nowarn:0162)
+set(ILASM ${RUNTIME} ${CLASS}/ilasm.exe)
+
+set(x86_sources
+       mini-x86.c      
+       mini-x86.h      
+       exceptions-x86.c
+       tramp-x86.c)
+
+set(amd64_sources
+       mini-amd64.c    
+       mini-amd64.h    
+       exceptions-amd64.c
+       tramp-amd64.c)
+
+set(ppc_sources
+       mini-ppc.c      
+       mini-ppc.h      
+       exceptions-ppc.c
+       tramp-ppc.c)
+
+set(arm_sources
+       mini-arm.c      
+       mini-arm.h      
+       exceptions-arm.c
+       tramp-arm.c)
+
+set(mips_sources
+       mini-mips.c     
+       mini-mips.h     
+       exceptions-mips.c
+       tramp-mips.c)
+
+set(sparc_sources
+       mini-sparc.c    
+       mini-sparc.h    
+       exceptions-sparc.c
+       tramp-sparc.c)
+
+set(s390_sources
+       mini-s390.c     
+       mini-s390.h     
+       exceptions-s390.c
+       tramp-s390.c)
+
+set(s390x_sources
+       mini-s390x.c    
+       mini-s390x.h    
+       exceptions-s390x.c
+       tramp-s390x.c)
+
+set(ia64_sources
+       mini-ia64.c     
+       mini-ia64.h     
+       exceptions-ia64.c
+       tramp-ia64.c)
+
+set(alpha_sources
+       mini-alpha.c    
+       mini-alpha.h    
+       exceptions-alpha.c
+       tramp-alpha.c)
+
+set(hppa_sources
+       mini-hppa.c     
+       mini-hppa.h     
+       exceptions-hppa.c
+       tramp-hppa.c)
+
+set(darwin_sources
+       mini-darwin.c)
+
+set(windows_sources
+       mini-windows.c)
+
+set(posix_sources
+       mini-posix.c)
+
+set(common_sources
+       mini.c          
+       ir-emit.h       
+       method-to-ir.c  
+       decompose.c     
+       mini.h          
+       version.h       
+       optflags-def.h  
+       jit-icalls.h    
+       jit-icalls.c    
+       trace.c         
+       trace.h         
+       patch-info.h    
+       mini-ops.h      
+       mini-arch.h     
+       dominators.c    
+       cfold.c         
+       regalloc.c      
+       regalloc.h      
+       helpers.c       
+       liveness.c      
+       ssa.c           
+       abcremoval.c    
+       abcremoval.h    
+       ssapre.c        
+       ssapre.h        
+       local-propagation.c
+       driver.c        
+       debug-mini.c    
+       debug-mini.h    
+       linear-scan.c   
+       aot-compiler.c  
+       aot-runtime.c   
+       graph.c         
+       mini-codegen.c  
+       mini-exceptions.c
+       mini-trampolines.c  
+       declsec.c       
+       declsec.h       
+       wapihandles.c   
+       branch-opts.c   
+       mini-generic-sharing.c
+       regalloc2.c     
+       simd-methods.h  
+       tasklets.c      
+       tasklets.h      
+       simd-intrinsics.c
+       unwind.h        
+       unwind.c        
+       image-writer.h
+       image-writer.c
+       dwarfwriter.h
+       dwarfwriter.c
+       mini-gc.h       
+       mini-gc.c)
+
+set(test_sources               
+       basic-calls.cs  
+       basic-long.cs   
+       bench.cs        
+       objects.cs      
+       arrays.cs       
+       basic-float.cs  
+       basic-math.cs   
+       basic.cs        
+       exceptions.cs   
+       devirtualization.cs
+       iltests.il.in   
+       test.cs         
+       generics.cs     
+       generics-variant-types.il
+       basic-simd.cs)
+
+if(MONO_DEBUGGER_SUPPORTED)
+if(AMD64)
+set(mono_debugger_arch_sources mdb-debug-info64.s)
+elseif(X86)
+set(mono_debugger_arch_sources mdb-debug-info32.s)
+endif()
+enable_language(ASM-ATT)
+set(mono_debugger_sources debug-debugger.c debug-debugger.h ${mono_debugger_arch_sources})
+
+set(ASM-ATT_FLAGS)
+else(MONO_DEBUGGER_SUPPORTED)
+set(mono_debugger_sources)
+endif(MONO_DEBUGGER_SUPPORTED)
+
+set(regtests basic.exe basic-float.exe basic-long.exe basic-calls.exe objects.exe arrays.exe basic-math.exe exceptions.exe iltests.exe devirtualization.exe generics.exe basic-simd.exe)
+
+if(X86)
+set(arch_sources ${x86_sources} ${mono_debugger_sources})
+set(arch_built cpu-x86.h)
+set(arch_define __i386__)
+endif()
+
+if(AMD64)
+set(arch_sources ${amd64_sources} ${mono_debugger_sources})
+set(arch_built cpu-amd64.h)
+set(arch_define __x86_64__)
+endif()
+
+if(POWERPC)
+set(arch_sources ${ppc_sources})
+set(arch_built cpu-ppc.h)
+set(arch_define __ppc__)
+endif()
+
+if(POWERPC64)
+set(arch_sources ${ppc_sources})
+set(arch_built cpu-ppc64.h)
+set(arch_define __ppc64__)
+endif()
+
+if(MIPS)
+set(arch_sources ${mips_sources})
+set(arch_built cpu-mips.h)
+set(arch_define __mips__)
+endif()
+
+if(ARM)
+# pick up arm_dpimacros.h and arm_fpamacros.h
+set(ARCH_CFLAGS -I../arch/arm)
+set(arch_sources ${arm_sources})
+set(arch_built cpu-arm.h)
+set(arch_define __arm__)
+endif()
+
+if(SPARC)
+set(arch_sources ${sparc_sources})
+set(arch_built cpu-sparc.h)
+set(arch_define __sparc__)
+endif()
+
+if(SPARC64)
+set(arch_sources ${sparc_sources})
+set(arch_built cpu-sparc.h)
+set(arch_define __sparc__)
+endif()
+
+if(S390)
+set(arch_sources ${s390_sources})
+set(arch_built cpu-s390.h)
+set(arch_define __s390__)
+endif()
+
+if(S390x)
+set(arch_sources ${s390x_sources})
+set(arch_built cpu-s390x.h)
+set(arch_define __s390__)
+endif()
+
+if(IA64)
+set(arch_sources ${ia64_sources})
+set(arch_built cpu-ia64.h)
+set(arch_define __ia64__)
+endif()
+
+if(ALPHA)
+set(arch_sources ${alpha_sources} ${mono_debugger_sources})
+set(arch_built cpu-alpha.h)
+set(arch_define __alpha__)
+endif()
+
+if(HPPA)
+# Only support 32-bit targets for now
+set(arch_sources ${hppa_sources})
+set(arch_built cpu-hppa.h)
+set(arch_define __hppa__)
+endif()
+
+if(PLATFORM_WIN32)
+set(os_sources ${windows_sources})
+endif()
+
+if(PLATFORM_SIGPOSIX)
+set(os_sources ${posix_sources})
+endif()
+
+if(PLATFORM_DARWIN)
+set(os_sources ${darwin_sources} ${posix_sources})
+endif()
+
+#### we don't always use the perl impl because it's an additional
+#### build dependency for the poor windows users
+#### ${arch_define} is the preprocessor symbol that enables all the opcodes
+#### for the specific platform in mini-ops.h
+###if CROSS_COMPILING
+###GENMDESC_PRG=perl ${srcdir)/genmdesc.pl ${arch_define} ${srcdir)
+###else !CROSS_COMPILING
+set(GENMDESC_PRG ${CMAKE_CURRENT_BINARY_DIR}/genmdesc)
+###endif !CROSS_COMPILING
+
+function(add_genmdesc_target target source define)
+  add_custom_command(
+       OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target}
+       COMMAND ${GENMDESC_PRG} ${CMAKE_CURRENT_BINARY_DIR}/${target} ${define} ${source}
+       DEPENDS genmdesc ${source}
+       )
+endfunction()
+
+foreach(arch x86 amd64 sparc ia64 alpha hppa mips)
+  add_genmdesc_target(cpu-${arch}.h cpu-${arch}.md ${arch}_desc)
+endforeach()
+
+add_genmdesc_target(cpu-ppc.h cpu-ppc.md ppcg4)
+add_genmdesc_target(cpu-ppc64.h cpu-ppc64.md ppc64_cpu_desc)
+add_genmdesc_target(cpu-arm.h cpu-arm.md arm_cpu_desc)
+add_genmdesc_target(cpu-s390.h cpu-s390.md s390_cpu_desc)
+add_genmdesc_target(cpu-s390x.h cpu-s390x.md s390x_cpu_desc)
+
+include_directories(../..)
+include_directories(${GLIB2_INCLUDE_DIRS})
+include_directories(${LIBGC_INCLUDE_DIRS})
+# FIXME:
+link_directories(../../libgc/.libs)
+set(CMAKE_C_FLAGS "${CFLAGS} ${LIBGC_CFLAGS} ${CPPFLAGS}")
+
+# genmdesc
+add_executable(genmdesc genmdesc.c helpers.c)
+target_link_libraries(genmdesc monoutils-static monoruntime-static ${GLIB2_LIBRARIES})
+
+# libmono
+
+set(libmono_la_SOURCES ${common_sources} ${llvm_sources} ${arch_sources} ${os_sources})
+
+# FIXME: cmake doesn't seem to recognize the ${arch_built} dependency
+add_library(libmono-static STATIC ${libmono_la_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${arch_built})
+target_link_libraries(libmono-static monoruntime-static monoutils-static monogc-static wapi-static ${GLIB2_LIBRARIES} ${LIBS})
+set_target_properties(libmono-static PROPERTIES OUTPUT_NAME "mono-static")
+
+# FIXME: cmake has no support for convenience libraries, so we would end up 
+# creating a lot of shared libraries linking to each other
+#add_library(libmono SHARED ${libmono_la_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${arch_built})
+#set_target_properties(libmono PROPERTIES OUTPUT_NAME "mono")
+#target_link_libraries(libmono monoruntime monoutils monogc wapi ${GLIB2_LIBRARIES} ${LIBS})
+
+# version.h
+
+# Its a pain to try to pass a complex shell script to add_custom_command (), so
+# write it to disk instead
+# " needs to be escaped as \"
+# \ needs to be escaped as \\
+set(top_srcdir ../../)
+file(WRITE create-version.h.sh "
+       if test -d ${top_srcdir}/.git/svn; then svn_info=\"echo \\\"`git log --no-color --first-parent --pretty=format:%b|grep -m1 git-svn-id|sed -e 's,git-svn-id: \\(.*\\)@\\(.*\\) .*,URL: \\1 Revision: \\2,'`\"; fi;
+       if test -d ${srcdir}/.svn; then svn_info='svn info'; fi;
+       if test -n \"$svn_info\"; then
+               (cd ${top_srcdir};
+                       LANG=C; export LANG;
+                       branch=`$svn_info | grep URL | sed -e 's,.*source/\\(.*\\)/mono.*,/\\1/mono,'`;
+                       version=`$svn_info | grep Revision | sed 's/.*: //'`;
+                       echo \"#define FULL_VERSION \\\"$branch r$version\\\"\";
+               );
+       else
+               echo \"#define FULL_VERSION \\\"tarball\\\"\";
+       fi > version.h
+")
+
+# FIXME: dependencies ?
+add_custom_command(
+  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
+  COMMAND chmod a+x ./create-version.h.sh
+  COMMAND ./create-version.h.sh
+  VERBATIM
+)
+
+# buildver.h
+
+# We build this after libmono was built so it contains the date when the final
+# link was done
+add_custom_command(
+  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/buildver.h
+  PRE_LINK
+  COMMAND sh -c "X='\"'; echo \"const char *build_date = $X`date`$X;\" > ${CMAKE_CURRENT_BINARY_DIR}/buildver.h"
+  DEPENDS libmono-static
+  VERBATIM
+)
+set_source_files_properties(main.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buildver.h)
+set_source_files_properties(main.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buildver.h)
+
+# mono
+
+add_executable(mono main.c ${CMAKE_CURRENT_BINARY_DIR}/buildver.h)
+add_dependencies(mono libmono-static)
+target_link_libraries(mono libmono-static ${GLIB2_LIBRARIES})
+
+# Test file targets
+
+foreach(test ${test_sources})
+  if (${test} MATCHES ".*\\.cs")
+       string(REPLACE ".cs" ".exe" exe_name ${test})
+       add_cs_exe(${exe_name} ${test} "-r:TestDriver.dll -r:generics-variant-types.dll -r:Mono.Simd.dll" "TestDriver.dll generics-variant-types.dll")
+  endif()
+endforeach()
+
+set(il_source "iltests.il")
+set(exe_name "iltests.exe")
+add_custom_command(
+  OUTPUT ${exe_name}
+  COMMAND ${ILASM} -output=${exe_name} ${il_source}
+  DEPENDS ${il_source}
+  )
+add_custom_target(${exe_name}-exe DEPENDS ${exe_name})
+
+add_custom_command(
+  OUTPUT "iltests.il"
+  COMMAND echo // DO NOT EDIT: This file has been generated from iltests.il.in > iltests.il
+  COMMAND cpp -Darch=${arch_define} < iltests.il.in | sed "s/^#.*//" >> iltests.il
+  DEPENDS iltests.il.in
+  VERBATIM
+)
+
+add_cs_dll("TestDriver.dll" "TestDriver.cs" "-r:System.dll -r:System.dll" "")
+
+add_il_target("generics-variant-types.dll" "generics-variant-types.il" "-dll")
+  
+# Testing targets
+
+add_custom_target(rcheck
+  COMMAND ${RUNTIME} --regression ${regtests}
+  DEPENDS mono ${regtests}
+)
+
+# FIXME: make runs rcheck, but then says: 'No rule to make target `rcheck', needed by `mono/mini/CMakeFiles/check'
+#add_custom_target(check
+#  DEPENDS rcheck)
+add_custom_target(check
+  COMMAND ${RUNTIME} --regression ${regtests}
+  DEPENDS mono ${regtests}
+)
+
+add_custom_target(testi
+  COMMAND ${RUNTIME} -v -v --ncompile 1 --compile Test:${mtest} test.exe
+  DEPENDS mono test.exe
+)
+
+# ensure the tests are actually correct
+add_custom_target(checktests
+  COMMAND for i in ${regtests}\; do ${RUNTIME} $$i\; done
+  DEPENDS ${regtests}
+)
+
+add_custom_target(aotcheck
+  COMMAND rm -f *.exe.so
+  COMMAND ${RUNTIME} --aot ${regtests} || exit 1
+  COMMAND for i in ${regtests}\; do ${RUNTIME_AOTCHECK} --regression $$i || exit 1\; done
+  COMMAND rm -f *.exe.so
+  DEPENDS mono ${regtests}
+)
+
+# This currently only works on amd64/arm
+add_custom_target(fullaotcheck
+  COMMAND      rm -rf fullaot-tmp
+  COMMAND      mkdir fullaot-tmp
+  COMMAND      cp ${CLASS}/mscorlib.dll ${CLASS}/Mono.Simd.dll ${regtests} generics-variant-types.dll TestDriver.dll fullaot-tmp/
+  COMMAND      cp ${regtests} fullaot-tmp/
+  COMMAND      MONO_PATH=fullaot-tmp ${top_builddir}/runtime/mono-wrapper --aot=full fullaot-tmp/* || exit 1
+  COMMAND   for i in ${regtests}\; do echo $$i\; MONO_PATH=fullaot-tmp ${top_builddir}/runtime/mono-wrapper --full-aot fullaot-tmp/$$i --exclude '!FULLAOT' || exit 1\; done
+  DEPENDS mono ${regtests}
+)
+
+add_custom_target(bench
+  COMMAND time env ${RUNTIME} --ncompile ${count} --compile Test:${mtest} test.exe
+  DEPENDS mono test.exe
+)
+
+add_custom_target(stat1
+  COMMAND ${RUNTIME} --verbose --statfile stats.pl --regression bench.exe
+  COMMAND perl viewstat.pl stats.pl
+  DEPENDS mono bench.exe
+)
+
+add_custom_target(stat2
+  COMMAND ${RUNTIME} --verbose --statfile stats.pl --regression basic.exe
+  COMMAND perl viewstat.pl -e stats.pl
+  DEPENDS mono basic.exe
+)
+
+add_custom_target(stat3
+  COMMAND ${RUNTIME} --statfile stats.pl --ncompile 1000 --compile Tests:test_0_many_nested_loops bench.exe 
+  COMMAND perl viewstat.pl stats.pl
+  DEPENDS mono bench.exe
+)
+
+#### This is needed for automake dependency generation
+###if INCLUDED_LIBGC
+###libgc_libs=${monodir)/libgc/libmonogc.la
+###libgc_static_libs=${monodir)/libgc/libmonogc-static.la
+###else
+###libgc_libs=${LIBGC_LIBS)
+###libgc_static_libs=${LIBGC_STATIC_LIBS)
+###endif
+
+###AM_CFLAGS = \
+###    -I${top_srcdir}         \
+###    ${LIBGC_CFLAGS)         \
+###    ${GLIB_CFLAGS)
+###    ${PLATFORM_CFLAGS} ${ARCH_CFLAGS)
+
+###AM_CXXFLAGS = ${LLVM_CXXFLAGS} ${GLIB_CFLAGS)
+
+###if PLATFORM_WIN32
+###export HOST_CC
+#### The mingw math.h has "extern inline" functions that dont appear in libs, so
+#### optimisation is required to actually inline them
+###PLATFORM_CFLAGS = -O
+###endif
+
+#### hack for automake to have the same source file in a library and a bin
+###genmdesc_CFLAGS = ${AM_CFLAGS)
+
+###if NO_VERSION_SCRIPT
+###monoldflags=${export_ldflags)
+###monobinldflags=${export_ldflags)
+###else
+###monoldflags=-Wl,-version-script=${srcdir)/ldscript ${export_ldflags)
+###monobinldflags=-Wl,-version-script=${srcdir)/ldscript.mono ${export_ldflags)
+###endif
+
+###if PLATFORM_WIN32
+###libmono_la_LDFLAGS=-no-undefined -avoid-version -Wl,--kill-at ${monoldflags)
+###else
+###libmono_la_LDFLAGS=${monoldflags)
+###endif
+
+###if JIT_SUPPORTED
+
+###if PLATFORM_WIN32
+###bin_PROGRAMS = mono monow
+###else
+###bin_PROGRAMS = mono
+###endif
+
+###noinst_PROGRAMS = genmdesc
+
+###lib_LTLIBRARIES = libmono.la
+###noinst_LTLIBRARIES = libmono-static.la
+###endif
+
+###if DTRACE_G_REQUIRED
+###LIBMONO_DTRACE_OBJECT = .libs/mono-dtrace.${OBJEXT)
+###if STATIC_MONO
+###MONO_DTRACE_OBJECT = mono-dtrace.${OBJEXT)
+###else
+###MONO_DTRACE_OBJECT = 
+###endif
+###else
+###MONO_DTRACE_OBJECT = 
+###LIBMONO_DTRACE_OBJECT = 
+###endif
+
+###if STATIC_MONO
+#### Link libmono into mono statically
+#### This leads to higher performance, especially with TLS
+###MONO_LIB=libmono-static.la
+###else 
+###MONO_LIB=libmono.la
+###endif
+
+###mono_LDADD = \
+###    ${MONO_LIB)                     \
+###    ${GLIB_LIBS)            \
+###    ${LLVM_LIBS)            \
+###    -lm     \
+###    ${MONO_DTRACE_OBJECT)
+
+###mono_LDFLAGS = \
+###    ${static_flags} -export-dynamic ${monobinldflags)
+
+###if DTRACE_G_REQUIRED
+
+###mono-dtrace.${OBJEXT): ${top_srcdir)/data/mono.d mini.lo ${monodir)/mono/metadata/libmonoruntime-static.la
+###    DTRACE="${DTRACE)" DTRACEFLAGS="${DTRACEFLAGS)" AR="${AR)" ${SHELL} ${top_srcdir)/data/dtrace-prelink.sh \
+###    $@ ${top_srcdir)/data/mono.d ${monodir)/mono/metadata/libmonoruntime-static.la mini.lo
+
+###.libs/mono-dtrace.${OBJEXT): ${top_srcdir)/data/mono.d mini.lo ${monodir)/mono/metadata/libmonoruntime.la
+###    DTRACE="${DTRACE)" DTRACEFLAGS="${DTRACEFLAGS)" AR="${AR)" ${SHELL} ${top_srcdir)/data/dtrace-prelink.sh \
+###    --pic $@ ${top_srcdir)/data/mono.d ${monodir)/mono/metadata/libmonoruntime.la mini.lo
+
+###endif
+
+#### Create monow.exe, linked for the 'windows' subsystem
+###if PLATFORM_WIN32
+###monow_LDADD = ${mono_LDADD)
+###monow_LDFLAGS = ${mono_LDFLAGS} -mwindows
+###monow_SOURCES = ${mono_SOURCES)
+###endif
+
+#### Don't link this against libmonoruntime to speed up rebuilds
+###genmdesc_LDADD = \
+###    ${monodir)/mono/utils/libmonoutils.la ${monodir)/mono/metadata/opcodes.lo -lm   \
+###    ${GLIB_LIBS)
+
+###if ENABLE_LLVM
+#### Disabled for now to fix the windows build
+####llvm_sources = \
+####   mini-llvm.c             \
+####   mini-llvm-cpp.cpp
+###endif
+
+###libmono_static_la_LIBADD = ${static_libs} ${MONO_DTRACE_OBJECT)
+
+###libmonoincludedir = ${includedir)/mono-${API_VER)/mono/jit
+
+###libmonoinclude_HEADERS = jit.h
+
+###libmono_la_LIBADD = \
+###    ${libs} ${LIBMONO_DTRACE_OBJECT)
+
+###clean-local:
+###    rm -f mono a.out gmon.out *.o buildver.h test.exe
+
+###pkgconfigdir = ${libdir)/pkgconfig
+
+###if JIT_SUPPORTED
+###BUILT_SOURCES = version.h ${arch_built)
+###else
+###BUILT_SOURCES = version.h
+###endif
+
+###CLEANFILES= ${BUILT_SOURCES} *.exe *.dll
+###EXTRA_DIST = TestDriver.cs ldscript ldscript.mono \
+###    genmdesc.pl     \
+###    ${test_sources} \
+###    ${x86_sources} cpu-x86.md \
+###    ${amd64_sources} cpu-amd64.md \
+###    ${ppc_sources} cpu-ppc.md cpu-ppc64.md \
+###    ${arm_sources} cpu-arm.md \
+###    ${mips_sources} cpu-mips.md \
+###    ${sparc_sources} cpu-sparc.md \
+###    ${s390_sources} cpu-s390.md \
+###    ${s390x_sources} cpu-s390x.md \
+###    ${ia64_sources} cpu-ia64.md \
+###    ${alpha_sources} cpu-alpha.md \
+###    ${hppa_sources} cpu-hppa.md     \
+###    ${windows_sources)              \
+###    ${darwin_sources)               \
+###    ${posix_sources)
index b27a3411e4ac9b6058a3c91554a841121e38b8e9..f32b55984985f02d0810d1a0df89be20c1049ba6 100644 (file)
@@ -1,3 +1,97 @@
+2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
+       long_conv_to_r_un to 64 bits.
+
+       * cpu-x86.md: Increase the instruction size due to the changes.
+
+       * iltests.il.in: Add regression test.
+
+       Fixes #467201.
+
+2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * objects.cs: Move the previous test from basic.cs to here.
+
+2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * basic.cs: Add regression test for #506915.
+
+2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * 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-25  Zoltan Varga  <vargaz@gmail.com>
+
+       * image-writer.c: Fix pointer directive on ppc64.
+
+2009-05-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * image-writer.c (asm_writer_emit_section_change): Avoid using
+       .bss subsections on ppc too.
+
+2009-05-23  Zoltan Varga  <vargaz@gmail.com>
+
+       * image-writer.c: Fix the definition of TARGET_ASM_....
+       
+       * image-writer.c: Fix the emission of assembler directives in the last
+       change.
+
+       * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
+       exception throwing code to accomodate ppc64.
+
+       * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
+       size to work on ppc64 too.
+
+       * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
+       too.
+
+       * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
+       the assembler dialect instead of using platform specific defines.
+
+2009-05-22  Geoff Norton  <gnorton@novell.com>
+
+       * mini-arm.c (get_call_info): If a structure is split between the stack
+       and argument registers, we should not advance the stack pointer by the entire
+       native size, but just by the amount that spilled.
+
+2009-05-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-arm.c (get_call_info): Handle structures with alignment requirements
+       correctly.
+
+2009-05-21  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
+       wrappers normally.
+       
+       * aot-compiler.c (add_extra_method): Fix up the collection of extra
+       methods so wrapper don't get added twice.
+       (add_generic_instances): Don't add methods of arrays.
+
+       * generics.cs: Mark one test as !FULLAOT.
+
+2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * mini-x86.c (emit_move_return_value): Remove unused vars.
+
+2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * 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  Miguel de Icaza  <miguel@novell.com>
 
        * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
index e3b76e5dbcda1adbcefc44459a843c711ad05364..9745896af809c9c9e5294c6ebc6aaedf966cb6ad 100644 (file)
@@ -1094,7 +1094,11 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8
        if (method->wrapper_type) {
                if (method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE) {
                        char *tmpsig = mono_signature_get_desc (mono_method_signature (method), TRUE);
-                       name = g_strdup_printf ("(wrapper runtime-invoke):%s (%s)", method->name, tmpsig);
+                       if (mono_marshal_method_from_wrapper (method) != method) {
+                               /* Direct wrapper, encode it normally */
+                       } else {
+                               name = g_strdup_printf ("(wrapper runtime-invoke):%s (%s)", method->name, tmpsig);
+                       }
                        g_free (tmpsig);
                } else if (method->wrapper_type == MONO_WRAPPER_DELEGATE_INVOKE) {
                        char *tmpsig = mono_signature_get_desc (mono_method_signature (method), TRUE);
@@ -1162,7 +1166,8 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8
                        break;
                case MONO_WRAPPER_STATIC_RGCTX_INVOKE:
                case MONO_WRAPPER_SYNCHRONIZED:
-               case MONO_WRAPPER_MANAGED_TO_NATIVE: {
+               case MONO_WRAPPER_MANAGED_TO_NATIVE:
+               case MONO_WRAPPER_RUNTIME_INVOKE: {
                        MonoMethod *m;
 
                        m = mono_marshal_method_from_wrapper (method);
@@ -1370,7 +1375,7 @@ get_shared_got_offset (MonoAotCompile *acfg, MonoJumpInfo *ji)
 
 /* Add a method to the list of methods which need to be emitted */
 static void
-add_method_with_index (MonoAotCompile *acfg, MonoMethod *method, int index)
+add_method_with_index (MonoAotCompile *acfg, MonoMethod *method, int index, gboolean extra)
 {
        g_assert (method);
        if (!g_hash_table_lookup (acfg->method_indexes, method)) {
@@ -1378,6 +1383,9 @@ add_method_with_index (MonoAotCompile *acfg, MonoMethod *method, int index)
                g_hash_table_insert (acfg->method_indexes, method, GUINT_TO_POINTER (index + 1));
                acfg->nmethods = acfg->methods->len + 1;
        }
+
+       if (method->wrapper_type || extra)
+               g_ptr_array_add (acfg->extra_methods, method);
 }
 
 static guint32
@@ -1391,7 +1399,7 @@ get_method_index (MonoAotCompile *acfg, MonoMethod *method)
 }
 
 static int
-add_method (MonoAotCompile *acfg, MonoMethod *method)
+add_method_full (MonoAotCompile *acfg, MonoMethod *method, gboolean extra)
 {
        int index;
 
@@ -1400,7 +1408,7 @@ add_method (MonoAotCompile *acfg, MonoMethod *method)
                return index - 1;
 
        index = acfg->method_index;
-       add_method_with_index (acfg, method, index);
+       add_method_with_index (acfg, method, index, extra);
 
        /* FIXME: Fix quadratic behavior */
        acfg->method_order = g_list_append (acfg->method_order, GUINT_TO_POINTER (index));
@@ -1410,16 +1418,16 @@ add_method (MonoAotCompile *acfg, MonoMethod *method)
        return index;
 }
 
+static int
+add_method (MonoAotCompile *acfg, MonoMethod *method)
+{
+       return add_method_full (acfg, method, FALSE);
+}
+
 static void
 add_extra_method (MonoAotCompile *acfg, MonoMethod *method)
 {
-       int index;
-
-       index = GPOINTER_TO_UINT (g_hash_table_lookup (acfg->method_indexes, method));
-       if (index)
-               return;
-       add_method (acfg, method);
-       g_ptr_array_add (acfg->extra_methods, method);
+       add_method_full (acfg, method, TRUE);
 }
 
 static void
@@ -1866,7 +1874,7 @@ add_generic_instances (MonoAotCompile *acfg)
                token = MONO_TOKEN_TYPE_SPEC | (i + 1);
 
                klass = mono_class_get (acfg->image, token);
-               if (!klass)
+               if (!klass || klass->rank)
                        continue;
 
                add_generic_class (acfg, klass);
@@ -3307,8 +3315,10 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
 
        g_hash_table_insert (acfg->method_to_cfg, cfg->orig_method, cfg);
 
+       /*
        if (cfg->orig_method->wrapper_type)
                g_ptr_array_add (acfg->extra_methods, cfg->orig_method);
+       */
 
        mono_acfg_unlock (acfg);
 
@@ -3790,6 +3800,11 @@ emit_extra_methods (MonoAotCompile *acfg)
                        case MONO_WRAPPER_SYNCHRONIZED:
                                /* encode_method_ref () can handle these */
                                break;
+                       case MONO_WRAPPER_RUNTIME_INVOKE:
+                               if (mono_marshal_method_from_wrapper (method) != method && !strstr (method->name, "virtual"))
+                                       /* Direct wrapper, encode normally */
+                                       break;
+                               /* Fall through */
                        default:
                                name = mono_aot_wrapper_name (method);
                                break;
@@ -4458,7 +4473,7 @@ collect_methods (MonoAotCompile *acfg)
                }
 
                /* Since we add the normal methods first, their index will be equal to their zero based token index */
-               add_method_with_index (acfg, method, i);
+               add_method_with_index (acfg, method, i, FALSE);
                acfg->method_index ++;
        }
 
index 50d17fa78c2b28ec2e32cb7f2c4983a91b1f5dc1..0958bb0bf03d8b721dd6e059803958c34ee67971 100644 (file)
@@ -554,6 +554,15 @@ decode_method_ref (MonoAotModule *module, guint32 *token, MonoMethod **method, g
                        *method = mono_monitor_get_fast_path (orig_method);
                        break;
                }
+               case MONO_WRAPPER_RUNTIME_INVOKE: {
+                       /* Direct wrapper */
+                       MonoMethod *m = decode_method_ref_2 (module, p, &p);
+
+                       if (!m)
+                               return NULL;
+                       *method = mono_marshal_get_runtime_invoke (m, FALSE);
+                       break;
+               }
                default:
                        g_assert_not_reached ();
                }
index c9b22c20510ec5e150c8a4e2720a37d61e89ff36..74d1ede1fad72f11ac21e1b961f698dae738bf77 100644 (file)
@@ -1325,5 +1325,4 @@ class Tests {
                        return 2;
                return 0;
        }
-
 }
index fef209753a65d27c972e4ef11ce036d214306cd1..a32e9a9baf32fba30b3c7d41c68a31d101c73d67 100644 (file)
@@ -204,7 +204,7 @@ long_shr: dest:L src1:L src2:s clob:1 len:22
 long_shr_un: dest:L src1:L src2:s clob:1 len:22
 long_conv_to_ovf_i: dest:i src1:i src2:i len:30
 long_mul_ovf: 
-long_conv_to_r_un: dest:f src1:i src2:i len:20 
+long_conv_to_r_un: dest:f src1:i src2:i len:26 
 long_shr_imm: dest:L src1:L clob:1 len:10
 long_shr_un_imm: dest:L src1:L clob:1 len:10
 long_shl_imm: dest:L src1:L clob:1 len:10
@@ -378,7 +378,7 @@ cmov_ilt_un: dest:i src1:i src2:i len:16 clob:1
 long_conv_to_ovf_i4_2: dest:i src1:i src2:i len:30
 long_conv_to_r8_2: dest:f src1:i src2:i len:14 
 long_conv_to_r4_2: dest:f src1:i src2:i len:14
-long_conv_to_r_un_2: dest:f src1:i src2:i len:20 
+long_conv_to_r_un_2: dest:f src1:i src2:i len:26 
 
 fmove: dest:f src1:f
 float_conv_to_r4: dest:f src1:f  len:12
index ddb2ff0093092f4ef0ac12351643c68ec51819d9..5d244c1ec29804b8a197e0b70487eebd5ef1a12d 100644 (file)
@@ -1164,7 +1164,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) {
index 1cdfc2b356782faf915afa28d198ad399159f146..d83b7640c01a9c2ffe8fa4a0e5fd333cd3edf3fc 100644 (file)
@@ -204,6 +204,7 @@ class Tests {
                return 0;
        }
 
+       [Category ("!FULLAOT")]
        public static int test_0_generic_get_value_optimization_int () {
                int[] x = new int[] {100, 200};
 
index 4e3759739ac85dfdf390864debd743c252f26f1d..b5bf6fe5e3626968e97738fa5e513988ac9b5df2 100644 (file)
@@ -2230,6 +2230,32 @@ OK:
        }
 */
 
+       .method public static default int32 test_0_long_to_r8_un_overflow () cil managed
+       {
+               .maxstack 16
+               ldc.i8     0x00FFFFFFFFFFFFFF
+               conv.r.un
+               conv.i8
+               ldc.i8 0x100000000000000
+               beq OK_1
+
+               ldc.i4.1
+               ret
+OK_1:
+               ldc.i8     0x00FFFFFFFFFFFFFF
+               conv.r.un
+               conv.r8
+               conv.i8
+               ldc.i8 0x100000000000000
+               beq OK_2
+
+               ldc.i4.2
+               ret
+OK_2:
+               ldc.i4.0
+               ret
+       }
+
        .field public static int32 shift1
 
        .method public static int32 regress_497271_helper (int32 i) cil managed
index 5ab6ec3492cfe171267ef525e182cecdbf484608..63410f6df4a582f8bd926c5346cc1c96ba772615 100644 (file)
 #define TV_GETTIME(tv) tv = mono_100ns_ticks ()
 #define TV_ELAPSED(start,end) (((end) - (start)) / 10)
 
-#ifdef PLATFORM_WIN32
-#define SHARED_EXT ".dll"
-#elif defined(__ppc__) && defined(__MACH__)
-#define SHARED_EXT ".dylib"
+/* 
+ * The used assembler dialect
+ * TARGET_ASM_APPLE == apple assembler on OSX
+ * TARGET_ASM_GAS == GNU assembler
+ */
+#if !defined(TARGET_ASM_APPLE) && !defined(TARGET_ASM_GAS)
+#ifdef __MACH__
+#define TARGET_ASM_APPLE
 #else
-#define SHARED_EXT ".so"
+#define TARGET_ASM_GAS
+#endif
 #endif
 
-#if defined(sparc) || defined(__ppc__) || defined(__powerpc__) || defined(__MACH__)
+/*
+ * Defines for the directives used by different assemblers
+ */
+#if defined(__ppc__) || defined(__powerpc__) || defined(__MACH__)
 #define AS_STRING_DIRECTIVE ".asciz"
 #else
-/* GNU as */
 #define AS_STRING_DIRECTIVE ".string"
 #endif
 
+#define AS_INT32_DIRECTIVE ".long"
+#define AS_INT64_DIRECTIVE ".quad"
+
+#if defined(TARGET_AMD64) || defined(TARGET_POWERPC64)
+#define AS_POINTER_DIRECTIVE ".quad"
+#else
+#define AS_POINTER_DIRECTIVE ".long"
+#endif
+
+#if defined(TARGET_ASM_APPLE)
+#define AS_INT16_DIRECTIVE ".short"
+#elif defined(TARGET_ASM_GAS)
+#define AS_INT16_DIRECTIVE ".hword"
+#else
+#define AS_INT16_DIRECTIVE ".word"
+#endif
+
+#if defined(TARGET_ASM_APPLE)
+#define AS_SKIP_DIRECTIVE ".space"
+#else
+#define AS_SKIP_DIRECTIVE ".skip"
+#endif
 
-// __MACH__
-// .byte generates 1 byte per expression.
-// .short generates 2 bytes per expression.
-// .long generates 4 bytes per expression.
-// .quad generates 8 bytes per expression.
 
 #define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
 #define ALIGN_PTR_TO(ptr,align) (gpointer)((((gssize)(ptr)) + (align - 1)) & (~(align - 1)))
@@ -1388,15 +1412,12 @@ asm_writer_emit_section_change (MonoImageWriter *acfg, const char *section_name,
        asm_writer_emit_unset_mode (acfg);
 #if defined(PLATFORM_WIN32)
        fprintf (acfg->fp, ".section %s\n", section_name);
-#elif defined(__MACH__)
+#elif defined(TARGET_ASM_APPLE)
        if (strcmp(section_name, ".bss") == 0)
                fprintf (acfg->fp, "%s\n", ".data");
        else
                fprintf (acfg->fp, "%s\n", section_name);
-#elif defined(sparc)
-       /* For solaris as, GNU as should accept the same */
-       fprintf (acfg->fp, ".section \"%s\"\n", section_name);
-#elif defined(TARGET_ARM)
+#elif defined(TARGET_ARM) || defined(TARGET_POWERPC)
        /* ARM gas doesn't seem to like subsections of .bss */
        if (!strcmp (section_name, ".text") || !strcmp (section_name, ".data")) {
                fprintf (acfg->fp, "%s %d\n", section_name, subsection_index);
@@ -1425,14 +1446,12 @@ asm_writer_emit_symbol_type (MonoImageWriter *acfg, const char *name, gboolean f
                stype = "object";
 
        asm_writer_emit_unset_mode (acfg);
-#if defined(__MACH__)
+#if defined(TARGET_ASM_APPLE)
 
-#elif defined(sparc) || defined(TARGET_ARM)
+#elif defined(TARGET_ARM)
        fprintf (acfg->fp, "\t.type %s,#%s\n", name, stype);
 #elif defined(PLATFORM_WIN32)
 
-#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);
 #endif
@@ -1442,7 +1461,7 @@ static void
 asm_writer_emit_global (MonoImageWriter *acfg, const char *name, gboolean func)
 {
        asm_writer_emit_unset_mode (acfg);
-#if  (defined(__ppc__) && defined(__MACH__)) || defined(PLATFORM_WIN32)
+#if  (defined(__ppc__) && defined(TARGET_ASM_APPLE)) || defined(PLATFORM_WIN32)
     // mach-o always uses a '_' prefix.
        fprintf (acfg->fp, "\t.globl _%s\n", name);
 #else
@@ -1457,7 +1476,7 @@ asm_writer_emit_local_symbol (MonoImageWriter *acfg, const char *name, const cha
 {
        asm_writer_emit_unset_mode (acfg);
 
-#ifndef __MACH__
+#ifndef TARGET_ASM_APPLE
        fprintf (acfg->fp, "\t.local %s\n", name);
 #endif
 
@@ -1468,7 +1487,7 @@ static void
 asm_writer_emit_label (MonoImageWriter *acfg, const char *name)
 {
        asm_writer_emit_unset_mode (acfg);
-#if (defined(__ppc__) && defined(__MACH__)) || defined(PLATFORM_WIN32)
+#if (defined(__ppc__) && defined(TARGET_ASM_APPLE)) || defined(PLATFORM_WIN32)
     // mach-o always uses a '_' prefix.
        fprintf (acfg->fp, "_%s:\n", name);
 #else
@@ -1501,11 +1520,11 @@ asm_writer_emit_alignment (MonoImageWriter *acfg, int size)
        asm_writer_emit_unset_mode (acfg);
 #if defined(TARGET_ARM)
        fprintf (acfg->fp, "\t.align %d\n", ilog2 (size));
-#elif defined(__ppc__) && defined(__MACH__)
+#elif defined(__ppc__) && defined(TARGET_ASM_APPLE)
        // the mach-o assembler specifies alignments as powers of 2.
        fprintf (acfg->fp, "\t.align %d\t; ilog2\n", ilog2(size));
-#elif defined(__powerpc__)
-       /* ignore on linux/ppc */
+#elif defined(TARGET_ASM_GAS)
+       fprintf (acfg->fp, "\t.balign %d\n", size);
 #else
        fprintf (acfg->fp, "\t.align %d\n", size);
 #endif
@@ -1515,13 +1534,7 @@ static void
 asm_writer_emit_pointer_unaligned (MonoImageWriter *acfg, const char *target)
 {
        asm_writer_emit_unset_mode (acfg);
-#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");
-#else
-       fprintf (acfg->fp, "\t.long %s\n", target ? target : "0");
-#endif
+       fprintf (acfg->fp, "\t%s %s\n", AS_POINTER_DIRECTIVE, target ? target : "0");
 }
 
 static void
@@ -1566,14 +1579,7 @@ asm_writer_emit_int16 (MonoImageWriter *acfg, int value)
                acfg->col_count = 0;
        }
        if ((acfg->col_count++ % 8) == 0)
-#if defined(__MACH__)
-               fprintf (acfg->fp, "\n\t.short ");
-#elif defined(TARGET_ARM)
-               /* FIXME: Use .hword on other archs as well */
-               fprintf (acfg->fp, "\n\t.hword ");
-#else
-               fprintf (acfg->fp, "\n\t.word ");
-#endif
+               fprintf (acfg->fp, "\n\t%s ", AS_INT16_DIRECTIVE);
        else
                fprintf (acfg->fp, ", ");
        fprintf (acfg->fp, "%d", value);
@@ -1587,7 +1593,7 @@ asm_writer_emit_int32 (MonoImageWriter *acfg, int value)
                acfg->col_count = 0;
        }
        if ((acfg->col_count++ % 8) == 0)
-               fprintf (acfg->fp, "\n\t.long ");
+               fprintf (acfg->fp, "\n\t%s ", AS_INT32_DIRECTIVE);
        else
                fprintf (acfg->fp, ",");
        fprintf (acfg->fp, "%d", value);
@@ -1601,7 +1607,7 @@ asm_writer_emit_symbol_diff (MonoImageWriter *acfg, const char *end, const char*
                acfg->col_count = 0;
        }
        if ((acfg->col_count++ % 8) == 0)
-               fprintf (acfg->fp, "\n\t.long ");
+               fprintf (acfg->fp, "\n\t%s ", AS_INT32_DIRECTIVE);
        else
                fprintf (acfg->fp, ",");
        if (offset > 0)
@@ -1616,11 +1622,7 @@ static void
 asm_writer_emit_zero_bytes (MonoImageWriter *acfg, int num)
 {
        asm_writer_emit_unset_mode (acfg);
-#if defined(__MACH__)
-       fprintf (acfg->fp, "\t.space %d\n", num);
-#else
-       fprintf (acfg->fp, "\t.skip %d\n", num);
-#endif
+       fprintf (acfg->fp, "\t%s %d\n", AS_SKIP_DIRECTIVE, num);
 }
 
 /* EMIT FUNCTIONS */
index cfea3df56968816632dccd0a199430854f602960..aa4c026dc5e69b2996b90cef412bbf3e19096118 100644 (file)
@@ -7198,7 +7198,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 --;
index 25d2a8d2de8bf59381081b7a90fbf90eb5f24737..3ca343334d0043a5eef9f7d3523e84d8cb404bbd 100644 (file)
@@ -739,7 +739,7 @@ add_general (guint *gr, guint *stack_size, ArgInfo *ainfo, gboolean simple)
 }
 
 static CallInfo*
-calculate_sizes (MonoMethodSignature *sig, gboolean is_pinvoke)
+get_call_info (MonoMethodSignature *sig, gboolean is_pinvoke)
 {
        guint i, gr;
        int n = sig->hasthis + sig->param_count;
@@ -825,15 +825,17 @@ calculate_sizes (MonoMethodSignature *sig, gboolean is_pinvoke)
                        gint size;
                        int align_size;
                        int nwords;
+                       guint32 align;
 
                        if (simpletype->type == MONO_TYPE_TYPEDBYREF) {
                                size = sizeof (MonoTypedRef);
+                               align = sizeof (gpointer);
                        } else {
                                MonoClass *klass = mono_class_from_mono_type (sig->params [i]);
                                if (is_pinvoke)
-                                       size = mono_class_native_size (klass, NULL);
+                                       size = mono_class_native_size (klass, &align);
                                else
-                                       size = mono_class_value_size (klass, NULL);
+                                       size = mono_class_value_size (klass, &align);
                        }
                        DEBUG(printf ("load %d bytes struct\n",
                                      mono_class_native_size (sig->params [i]->data.klass, NULL)));
@@ -843,17 +845,23 @@ calculate_sizes (MonoMethodSignature *sig, gboolean is_pinvoke)
                        align_size &= ~(sizeof (gpointer) - 1);
                        nwords = (align_size + sizeof (gpointer) -1 ) / sizeof (gpointer);
                        cinfo->args [n].regtype = RegTypeStructByVal;
-                       /* FIXME: align gr and stack_size if needed */
+                       /* FIXME: align stack_size if needed */
+#ifdef __ARM_EABI__
+                       if (align >= 8 && (gr & 1))
+                               gr ++;
+#endif
                        if (gr > ARMREG_R3) {
                                cinfo->args [n].size = 0;
                                cinfo->args [n].vtsize = nwords;
                        } else {
                                int rest = ARMREG_R3 - gr + 1;
                                int n_in_regs = rest >= nwords? nwords: rest;
+
                                cinfo->args [n].size = n_in_regs;
                                cinfo->args [n].vtsize = nwords - n_in_regs;
                                cinfo->args [n].reg = gr;
                                gr += n_in_regs;
+                               nwords -= n_in_regs;
                        }
                        cinfo->args [n].offset = stack_size;
                        /*g_print ("offset for arg %d at %d\n", n, stack_size);*/
@@ -1132,7 +1140,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
        sig = call->signature;
        n = sig->param_count + sig->hasthis;
        
-       cinfo = calculate_sizes (sig, sig->pinvoke);
+       cinfo = get_call_info (sig, sig->pinvoke);
 
        for (i = 0; i < n; ++i) {
                ArgInfo *ainfo = cinfo->args + i;
@@ -2364,7 +2372,7 @@ emit_load_volatile_arguments (MonoCompile *cfg, guint8 *code)
 
        pos = 0;
 
-       cinfo = calculate_sizes (sig, sig->pinvoke);
+       cinfo = get_call_info (sig, sig->pinvoke);
 
        if (MONO_TYPE_ISSTRUCT (sig->ret)) {
                ArgInfo *ainfo = &cinfo->ret;
@@ -3837,7 +3845,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        /* load arguments allocated to register from the stack */
        pos = 0;
 
-       cinfo = calculate_sizes (sig, sig->pinvoke);
+       cinfo = get_call_info (sig, sig->pinvoke);
 
        if (MONO_TYPE_ISSTRUCT (sig->ret)) {
                ArgInfo *ainfo = &cinfo->ret;
index 18e321ae41573f15d10b27da74b9703002d8d81f..1bcf3b60a5bdcfa8af3c0e91234c12f92227dd1f 100644 (file)
@@ -4972,13 +4972,13 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
      
        /* 
         * make sure we have enough space for exceptions
-        * 24 is the simulated call to throw_exception_by_name
+        * 28 is the simulated call to throw_corlib_exception
         */
        for (patch_info = cfg->patch_info; patch_info; patch_info = patch_info->next) {
                if (patch_info->type == MONO_PATCH_INFO_EXC) {
                        i = exception_id_by_name (patch_info->data.target);
                        if (!exc_throw_found [i]) {
-                               max_epilog_size += 24;
+                               max_epilog_size += 28;
                                exc_throw_found [i] = TRUE;
                        }
                } else if (patch_info->type == MONO_PATCH_INFO_BB_OVF)
@@ -4987,7 +4987,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
                        MonoOvfJump *ovfj = (MonoOvfJump*)patch_info->data.target;
                        i = exception_id_by_name (ovfj->data.exception);
                        if (!exc_throw_found [i]) {
-                               max_epilog_size += 24;
+                               max_epilog_size += 28;
                                exc_throw_found [i] = TRUE;
                        }
                        max_epilog_size += 8;
index b5455f44f63f65cd02986536a0dfff9245957d5d..19bc05b2f81bf16b9872383740ea820190b272d6 100644 (file)
@@ -166,9 +166,7 @@ typedef struct MonoCompileArch {
 #define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1
 #define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1
 
-#ifndef __mono_ppc64__
 #define MONO_ARCH_HAVE_STATIC_RGCTX_TRAMPOLINE 1
-#endif
 
 #define MONO_ARCH_GSHARED_SUPPORTED 1
 
index e226cf4b7315d4bc497a1807759ecd9d0e37dc04..e8239ff80f79a0ba985129bde20dc2e29da42fde 100644 (file)
@@ -1233,26 +1233,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);
                }
        }
 
@@ -1962,9 +1951,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:
@@ -1973,31 +1959,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;
        default:
                break;
        }
@@ -3202,6 +3163,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
 
                        x86_patch (br, code);
 
+                       /* Change precision */
+                       x86_fst_membase (code, X86_ESP, 0, TRUE, TRUE);
+                       x86_fld_membase (code, X86_ESP, 0, TRUE);
+
                        x86_alu_reg_imm (code, X86_ADD, X86_ESP, 8);
 
                        break;
index 0d844ebc47b211ed44eba4e34918ad8c7e843ea5..71317d5d823c7dcffbe072437ca9b38e249c09cd 100644 (file)
@@ -1364,5 +1364,21 @@ ncells ) {
                arr [0, 0] = 256f;
                return arr [0, 0] == 256f ? 0 : 1;
        }
+
+       //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;
+       }
 }
 
index d6dc81a46cbc29150f67b559ea81bb84695f9107..3c36a33cd5aa4889c726d6c6000a57b49007c0b9 100644 (file)
@@ -586,8 +586,9 @@ gpointer
 mono_arch_get_nullified_class_init_trampoline (guint32 *code_len)
 {
        guint8 *code, *buf;
+       guint32 tramp_size = 64;
 
-       code = buf = mono_global_codeman_reserve (16);
+       code = buf = mono_global_codeman_reserve (tramp_size);
        code = mono_ppc_create_pre_code_ftnptr (code);
        ppc_blr (code);
 
@@ -595,5 +596,7 @@ mono_arch_get_nullified_class_init_trampoline (guint32 *code_len)
 
        *code_len = code - buf;
 
+       g_assert (code - buf <= tramp_size);
+
        return buf;
 }
index 850eb1221bcedc5151a431965fd18aaabf375dc3..066303ea1738df973035395de36e6bd2043da38b 100644 (file)
@@ -1,3 +1,18 @@
+2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * cli-blob-tests.md: More tests for method def signatures.
+
+2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * cli-blob-tests.md: New file for blob signature tests.
+
+       * Makefile: Update for new test source.
+
+2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * gen-md-tests.c: Added blob.i to make it easier to locate signatures to
+       mess around.
+
 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * cli-tables-tests.md: Add tests for the generic param constraint table.
index 81c0e61f89bf40e991b223426a99e7dcb300153d..c37e37750b86f01d122d674465b7d7321386933c 100644 (file)
@@ -86,7 +86,11 @@ cli-tables-tests.ok: gen-md-tests cli-tables-tests.md $(TEST_BINARIES)
        ./gen-md-tests cli-tables-tests.md
        touch cli-tables-tests.ok
 
-generate-stamp: header-tests.ok section-table-tests.ok data-directory-tests.ok resources-tests.ok cli-header-tests.ok cli-metadata-tests.ok cli-tables-tests.ok
+cli-blob-tests.ok: gen-md-tests cli-blob-tests.md $(TEST_BINARIES)
+       ./gen-md-tests cli-blob-tests.md
+       touch cli-blob-tests.ok
+
+generate-stamp: header-tests.ok section-table-tests.ok data-directory-tests.ok resources-tests.ok cli-header-tests.ok cli-metadata-tests.ok cli-tables-tests.ok cli-blob-tests.ok
        touch generate-stamp
 
 clean-stamps:
diff --git a/mono/tests/metadata-verifier/cli-blob-tests.md b/mono/tests/metadata-verifier/cli-blob-tests.md
new file mode 100644 (file)
index 0000000..cd540d1
--- /dev/null
@@ -0,0 +1,31 @@
+method-def-sig {
+       assembly assembly-with-methods.exe
+
+       #bad first byte
+       #method zero is a default ctor
+       #0 -> default 5 -> vararg
+
+       #signature size, zero is invalid
+       invalid offset blob.i (table-row (6 0) + 12) set-byte 0
+
+       #cconv
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-byte 0x26
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-byte 0x27
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-byte 0x28
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-byte 0x29
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-byte 0x2A
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-byte 0x2B
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-byte 0x2C
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-byte 0x2D
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-byte 0x2E
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-byte 0x2F
+
+       #upper nimble flags 0x80 is invalid     
+       invalid offset blob.i (table-row (6 0) + 12) + 1 set-bit 7
+
+       #sig is too small to decode param count
+       invalid offset blob.i (table-row (6 0) + 12) set-byte 1
+
+       #sig is too small to decode return type
+       invalid offset blob.i (table-row (6 0) + 12) set-byte 2
+}
\ No newline at end of file
index c95db5d8d0c5800cb169f267552470129dba7149..60334459cd6ae7dec2bf9351f4345a440d4e3cc8 100644 (file)
@@ -76,7 +76,8 @@ fun_name:
        translate.rva |
        translate.rva.ind |
        stream-header |
-       table-row
+       table-row |
+       blob.i
 
 arg_list:
        expression |
@@ -395,7 +396,7 @@ call_func (test_entry_t *entry, const char *name, GSList *args)
        if (!strcmp ("read.ushort", name)) {
                guint32 offset;
                if (g_slist_length (args) != 1) {
-                       printf ("Invalid number of args to read.ushort %d\b", g_slist_length (args));
+                       printf ("Invalid number of args to read.ushort %d\n", g_slist_length (args));
                        exit (INVALID_ARG_COUNT);
                }
                offset = expression_eval (args->data, entry);
@@ -404,7 +405,7 @@ call_func (test_entry_t *entry, const char *name, GSList *args)
        if (!strcmp ("read.uint", name)) {
                guint32 offset;
                if (g_slist_length (args) != 1) {
-                       printf ("Invalid number of args to read.uint %d\b", g_slist_length (args));
+                       printf ("Invalid number of args to read.uint %d\n", g_slist_length (args));
                        exit (INVALID_ARG_COUNT);
                }
                offset = expression_eval (args->data, entry);
@@ -413,7 +414,7 @@ call_func (test_entry_t *entry, const char *name, GSList *args)
        if (!strcmp ("translate.rva", name)) {
                guint32 rva;
                if (g_slist_length (args) != 1) {
-                       printf ("Invalid number of args to translate.rva %d\b", g_slist_length (args));
+                       printf ("Invalid number of args to translate.rva %d\n", g_slist_length (args));
                        exit (INVALID_ARG_COUNT);
                }
                rva = expression_eval (args->data, entry);
@@ -422,7 +423,7 @@ call_func (test_entry_t *entry, const char *name, GSList *args)
        if (!strcmp ("translate.rva.ind", name)) {
                guint32 rva;
                if (g_slist_length (args) != 1) {
-                       printf ("Invalid number of args to translate.rva.ind %d\b", g_slist_length (args));
+                       printf ("Invalid number of args to translate.rva.ind %d\n", g_slist_length (args));
                        exit (INVALID_ARG_COUNT);
                }
                rva = expression_eval (args->data, entry);
@@ -432,7 +433,7 @@ call_func (test_entry_t *entry, const char *name, GSList *args)
        if (!strcmp ("stream-header", name)) {
                guint32 idx;
                if (g_slist_length (args) != 1) {
-                       printf ("Invalid number of args to stream-header %d\b", g_slist_length (args));
+                       printf ("Invalid number of args to stream-header %d\n", g_slist_length (args));
                        exit (INVALID_ARG_COUNT);
                }
                idx = expression_eval (args->data, entry);
@@ -443,7 +444,7 @@ call_func (test_entry_t *entry, const char *name, GSList *args)
                guint32 table, row;
                const MonoTableInfo *info;
                if (g_slist_length (args) != 2) {
-                       printf ("Invalid number of args to table-row %d\b", g_slist_length (args));
+                       printf ("Invalid number of args to table-row %d\n", g_slist_length (args));
                        exit (INVALID_ARG_COUNT);
                }
                table = expression_eval (args->data, entry);
@@ -452,6 +453,18 @@ call_func (test_entry_t *entry, const char *name, GSList *args)
                data = info->base + row * info->row_size;
                return data - entry->test_set->assembly_data;
        }
+       if (!strcmp ("blob.i", name)) {
+               guint32 offset, base;
+               MonoStreamHeader blob = entry->test_set->image->heap_blob;
+               if (g_slist_length (args) != 1) {
+                       printf ("Invalid number of args to blob %d\n", g_slist_length (args));
+                       exit (INVALID_ARG_COUNT);
+               }
+               base = blob.data - entry->test_set->image->raw_data;
+               offset = expression_eval (args->data, entry);
+               offset = READ_VAR (guint16, entry->data + offset);
+               return base + offset;
+       }
 
        printf ("Unknown function %s\n", name);
        exit (INVALID_FUNCTION_NAME);
diff --git a/mono/utils/CMakeLists.txt b/mono/utils/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6b343e1
--- /dev/null
@@ -0,0 +1,87 @@
+###noinst_LTLIBRARIES = libmonoutils.la
+
+###INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CFLAGS) $(GLIB_CFLAGS)
+
+###if ENABLE_DTRACE
+
+###BUILT_SOURCES = mono-dtrace.h
+
+###mono-dtrace.h: $(top_srcdir)/data/mono.d
+###    $(DTRACE) $(DTRACEFLAGS) -h -s $(top_srcdir)/data/mono.d -o $@ || > $@
+###
+###endif
+
+if(EGLIB_BUILD)
+  set(hash_sources mono-ehash.c)
+else()
+  set(hash_sources mono-hash.c)
+endif()
+
+set(libmonoutils_la_SOURCES
+       ${hash_sources}
+       mono-md5.c      
+       mono-sha1.c     
+       mono-logger.c   
+       mono-codeman.c  
+       dlmalloc.h      
+       dlmalloc.c      
+       mono-counters.c 
+       mono-compiler.h 
+       mono-dl.c       
+       mono-dl.h       
+       mono-internal-hash.c
+       mono-internal-hash.h
+       mono-io-portability.c 
+       mono-io-portability.h
+       monobitset.c    
+       mono-filemap.c  
+       mono-math.c     
+       mono-mmap.c     
+       mono-mmap.h     
+       mono-proclib.c  
+       mono-proclib.h  
+       mono-time.c     
+       mono-time.h     
+       strtod.h        
+       strtod.c        
+       strenc.h        
+       strenc.c        
+       mono-uri.c      
+       mono-poll.c     
+       mono-path.c     
+       mono-stdlib.c   
+       mono-property-hash.h 
+       mono-property-hash.c 
+       mono-value-hash.h 
+       mono-value-hash.c 
+       freebsd-elf_common.h 
+       freebsd-elf32.h 
+       freebsd-elf64.h 
+       freebsd-dwarf.h 
+       dtrace.h                
+       gc_wrapper.h)
+
+set(libmonoutilsincludedir ${includedir}/mono-${API_VER}/mono/utils)
+
+set(libmonoutilsinclude_HEADERS
+       monobitset.h
+       mono-codeman.h
+       mono-counters.h
+       mono-digest.h
+       mono-embed.h
+       mono-logger.h
+       mono-hash.h
+       mono-math.h
+       mono-membar.h
+       mono-path.h
+       mono-poll.h
+       mono-uri.h
+       mono-stdlib.h)
+
+set(EXTRA_DIST ChangeLog mono-hash.c mono-hash.h mono-ehash.c)
+
+set(top_srcdir ../../)
+INCLUDE_DIRECTORIES(${top_srcdir} ${top_srcdir}/mono ${GLIB2_INCLUDE_DIRS})
+ADD_DEFINITIONS(${CFLAGS} ${LIBGC_CFLAGS} ${CPPFLAGS})
+ADD_LIBRARY(monoutils-static STATIC ${libmonoutils_la_SOURCES})
+ADD_LIBRARY(monoutils SHARED ${libmonoutils_la_SOURCES})
\ No newline at end of file
index 3e5671ad84ca0dddeca6ef605a8749725afc07d3..e0769c612b4a4ad1bdd9d1ec133a9b7d877892cb 100644 (file)
@@ -1,3 +1,7 @@
+2009-05-26  Zoltan Varga  <vargaz@gmail.com>
+
+       * CMakeLists.txt: New file.
+
 2009-05-09  Miguel de Icaza  <miguel@novell.com>
 
        * mono-value-hash.c (mono_value_hash_table_insert_replace):
diff --git a/support/CMakeLists.txt b/support/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b332310
--- /dev/null
@@ -0,0 +1,162 @@
+
+# Source code which helps implement the ANSI C standards, and thus *should* be
+# portable to any platform having a C compiler.
+set(MPH_C_SOURCE
+       errno.c
+       map.c
+       map.h
+       mph.h
+       signal.c
+       stdio.c
+       string.c
+       stdlib.c)
+
+# Source code which helps implement POSIX and other related Unix standards,
+# and *may* be portable between Unix platforms.
+set(MPH_UNIX_SOURCE
+       dirent.c
+       fcntl.c
+       fstab.c
+       grp.c
+       macros.c
+       old-map.c
+       old-map.h
+       pwd.c
+       serial.c
+       sys-mman.c
+       sys-sendfile.c
+       sys-stat.c
+       sys-statvfs.c
+       sys-time.c
+       sys-utsname.c
+       sys-wait.c
+       sys-xattr.c
+       syslog.c
+       time.c
+       unistd.c
+       utime.c
+       x-struct-str.c)
+
+if(PLATFORM_WIN32)
+set(MPH_SOURCE ${MPH_C_SOURCE})
+set(MPH_LIBS)
+else()
+set(MPH_SOURCE ${MPH_C_SOURCE} ${MPH_UNIX_SOURCE})
+set(MPH_LIBS ${GLIB_LIBS})
+endif()
+
+set(MINIZIP_SOURCE 
+       minizip/crypt.h
+       minizip/ioapi.c
+       minizip/ioapi.h
+       minizip/unzip.c
+       minizip/unzip.h
+       minizip/zip.c
+       minizip/zip.h)
+
+set(ZLIB_SOURCES 
+       adler32.c
+       compress.c
+       crc32.c 
+       gzio.c  
+       uncompr.c
+       deflate.c
+       trees.c 
+       zutil.c 
+       inflate.c
+       infback.c
+       inftrees.c
+       inffast.c
+       crc32.h 
+       deflate.h  
+       inffast.h  
+       inffixed.h  
+       inflate.h  
+       inftrees.h  
+       trees.h  
+       zconf.h  
+       zlib.h  
+       zutil.h)
+
+if(HAVE_ZLIB)
+set(Z_SOURCE  zlib_macros.c)
+set(Z_LIBS  -lz)
+else()
+set(Z_SOURCE  zlib_macros.c ${ZLIB_SOURCES})
+set(Z_LIBS)
+endif()
+
+set(libMonoPosixHelper_la_SOURCES
+       ${MPH_SOURCE}
+       ${Z_SOURCE}
+       ${MINIZIP_SOURCE})
+
+set(libMonoPosixHelper_la_LIBADD
+       ${MPH_LIBS}
+       ${Z_LIBS}
+       ${XATTR_LIB})
+
+# set(libMonoPosixHelper_la_LDFLAGS  -no-undefined -version-info 1:0:1
+###set(libMonoPosixHelper_la_LDFLAGS  -no-undefined -avoid-version)
+###set(libMonoSupportW_la_LDFLAGS  -no-undefined -avoid-version)
+
+set(libMonoSupportW_la_SOURCES
+               supportw.c
+               support-heap.c
+               supportw.h)
+
+set(libMonoSupportW_la_LIBADD
+               ${GLIB_LIBS})
+
+include_directories(${top_srcdir})
+include_directories(${GLIB2_INCLUDE_DIRS})
+set(CMAKE_C_FLAGS "${CFLAGS} ${CPPFLAGS}")
+link_directories(../mini)
+
+add_library(MonoPosixHelper SHARED ${libMonoPosixHelper_la_SOURCES})
+target_link_libraries(MonoPosixHelper ${libMonoPosixHelper_la_LIBADD})
+
+if(PLATFORM_WIN32)
+else()
+###set(lib_LTLIBRARIES
+###    libMonoPosixHelper.la
+###    ${SUPPORT})
+endif()
+
+# 
+# Use this target to refresh the values in map.[ch]
+#
+add_custom_target(refresh
+  COMMAND cp `pkg-config --variable=Programs create-native-map` .
+  COMMAND ${top_builddir}/runtime/mono-wrapper create-native-map.exe 
+       --autoconf-member=d_off                               
+       --autoconf-member=d_reclen                            
+       --autoconf-member=d_type                              
+       --exclude-native-symbol=Mono_Posix_Stdlib_snprintf    
+       --impl-macro=_GNU_SOURCE --impl-macro=_XOPEN_SOURCE   
+       --impl-header="<sys/types.h>"                         
+       --impl-header="<sys/stat.h>"                          
+       --autoconf-header="<sys/time.h>"                      
+       --autoconf-header="<sys/poll.h>"                      
+       --autoconf-header="<sys/wait.h>"                      
+       --autoconf-header="<sys/statvfs.h>"                   
+       --autoconf-header="<sys/xattr.h>"                     
+       --autoconf-header="<sys/mman.h>"                      
+       --autoconf-header="<unistd.h>"                        
+       --impl-header="<fcntl.h>"                             
+       --impl-header="<signal.h>"                            
+       --autoconf-header="<poll.h>"                          
+       --autoconf-header="<grp.h>"                           
+       --impl-header="<errno.h>"                             
+       --autoconf-header="<syslog.h>"                        
+       --autoconf-header="<dirent.h>"                        
+       --autoconf-header="<utime.h>"                         
+       --impl-header="<time.h>"                              
+       --impl-header=""mph.h""                             
+       --rename-member=st_atime=st_atime_                    
+       --rename-member=st_ctime=st_ctime_                    
+       --rename-member=st_mtime=st_mtime_                    
+       --rename-namespace=Mono.Unix.Native=Mono.Posix        
+       --library=MonoPosixHelper                             
+       ${mcs_topdir}/class/lib/net_2_0/Mono.Posix.dll map
+)
\ No newline at end of file