Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Toshok <toshok@novell.com>2010-01-28 22:03:36 +0300
committerChris Toshok <toshok@novell.com>2010-01-28 22:03:36 +0300
commit7c591aef6990c3f45e264c8ba8eff0215c967572 (patch)
tree2b0ab128f162c865efb734baf1dc0e0252cba0d4
parent31af90c154121a61421c5453a1bd9cc664244827 (diff)
parent70ffc535d0d72eaf0811a19b2e7faeb99330123d (diff)
merge up to r150220 from branch 2-6
svn path=/branches/moon/moon-2-0/mcs/; revision=150388
-rw-r--r--mcs/build/ChangeLog4
-rw-r--r--mcs/build/common/ChangeLog5
-rw-r--r--mcs/build/common/Consts.cs.in8
-rw-r--r--mcs/build/profiles/basic.make7
-rw-r--r--mcs/class/ChangeLog4
-rw-r--r--mcs/class/I18N/CJK/Test/ChangeLog4
-rw-r--r--mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs2
-rw-r--r--mcs/class/Makefile2
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog77
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs17
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/GroupBoxRenderer.cs3
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/MessageBox.cs8
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/RadioButton.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBox.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs10
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/TrackBar.cs64
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs7
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIStructs.cs8
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs20
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog13
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs17
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs36
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TrackBarTest.cs27
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft.dll.sources120
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainCreateEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/AppDomainCreateEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/AppDomainMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainUnloadEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/AppDomainUnloadEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ArrayMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ArrayMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/AssemblyLoadEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/AssemblyMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/BreakpointEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEventRequest.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/BreakpointEventRequest.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ChangeLog)0
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/Connection.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeDataMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/CustomAttributeDataMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeNamedArgumentMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/CustomAttributeNamedArgumentMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeTypedArgumentMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/CustomAttributeTypedArgumentMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/DataConverter.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/DataConverter.cs)0
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EnumMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/EnumMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Event.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/Event.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventQueueImpl.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/EventQueueImpl.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/EventRequest.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventType.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/EventType.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ExceptionEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ExceptionEventRequest.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/FieldInfoMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/FieldInfoMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInstruction.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ILInstruction.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/IMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/IMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvalidStackFrameException.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/InvalidStackFrameException.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvocationException.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/InvocationException.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/InvokeOptions.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/LocalVariable.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/LocalVariable.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Location.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/Location.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodBodyMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodBodyMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodEntryEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEventRequest.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodEntryEventRequest.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodExitEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEventRequest.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodExitEventRequest.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Mirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/Mirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ModuleMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectCollectedException.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ObjectCollectedException.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ObjectMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ParameterInfoMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ParameterInfoMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/PrimitiveValue.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PropertyInfoMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/PropertyInfoMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/StackFrame.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/StepEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/StepEventRequest.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StringMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/StringMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/StructMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/SuspendPolicy.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/SuspendPolicy.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadDeathEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ThreadDeathEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ThreadMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadStartEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/ThreadStartEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/TypeLoadEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/TypeMirror.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDeathEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMDeathEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMDisconnectEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectedException.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMDisconnectedException.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMMismatchException.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMMismatchException.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMStartEvent.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMStartEvent.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Value.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/Value.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/VirtualMachine.cs)2
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs (renamed from mcs/class/Mono.Debugger.Soft/Mono.Debugger/VirtualMachineManager.cs)2
-rw-r--r--mcs/class/RabbitMQ.Client/ChangeLog13
-rw-r--r--mcs/class/RabbitMQ.Client/Makefile19
-rw-r--r--mcs/class/RabbitMQ.Client/Makefile.orig64
-rw-r--r--mcs/class/RabbitMQ.Client/docs/specs/Makefile23
-rw-r--r--mcs/class/RabbitMQ.Client/docs/specs/amqp0-8.stripped.xml771
-rw-r--r--mcs/class/RabbitMQ.Client/docs/specs/amqp0-9.stripped.xml844
-rw-r--r--mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-8.cs6336
-rw-r--r--mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-9.cs6956
-rw-r--r--mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-qpid-0-8.cs6373
-rw-r--r--mcs/class/RabbitMQ.Client/docs/specs/qpid-amqp.0-8.stripped.xml773
-rw-r--r--mcs/class/System.Configuration/System.Configuration/ChangeLog13
-rw-r--r--mcs/class/System.Configuration/System.Configuration/Configuration.cs16
-rw-r--r--mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs4
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/ChangeLog7
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/Expression.cs4
-rw-r--r--mcs/class/System.Core/System/ChangeLog7
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs2
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs2
-rwxr-xr-xmcs/class/System.Data.Linq/ChangeLog5
-rw-r--r--mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs100
-rw-r--r--mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Database/Implementation/TransactionalCommand.cs19
-rw-r--r--mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Linq_101_Samples/Insert_Update_Delete.cs6
-rw-r--r--mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Transactions.cs3
-rw-r--r--mcs/class/System.Json/System.Json/ChangeLog4
-rw-r--r--mcs/class/System.Json/System.Json/JsonReader.cs7
-rw-r--r--mcs/class/System.Net/ChangeLog13
-rw-r--r--mcs/class/System.Net/Makefile2
-rw-r--r--mcs/class/System.Net/System.Net.Sockets/UdpAnySourceMulticastClient.cs170
-rw-r--r--mcs/class/System.Net/System.Net.Sockets/UdpSingleSourceMulticastClient.cs128
-rw-r--r--mcs/class/System.Net/System.Net/ChangeLog41
-rw-r--r--mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs5
-rw-r--r--mcs/class/System.Net/System.Net/InternalWebRequestStreamWrapper.cs124
-rw-r--r--mcs/class/System.Net/System.Net/InternalWebResponseStreamWrapper.cs100
-rw-r--r--mcs/class/System.Net/System.Net/WebClient_2_1.cs70
-rw-r--r--mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs2
-rw-r--r--mcs/class/System.Net/System.Net/WebRequest_2_1.cs57
-rw-r--r--mcs/class/System.Net/net_2_1_raw_System.Net.dll.sources4
-rw-r--r--mcs/class/System.Runtime.Serialization/ChangeLog5
-rwxr-xr-xmcs/class/System.Runtime.Serialization/System.Runtime.Serialization/ChangeLog7
-rw-r--r--mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs2
-rw-r--r--mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/SerializationMap.cs4
-rwxr-xr-xmcs/class/System.Runtime.Serialization/System.Xml/ChangeLog5
-rw-r--r--mcs/class/System.Runtime.Serialization/System.Xml/XmlBinaryDictionaryReader.cs2
-rw-r--r--mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/ChangeLog4
-rw-r--r--mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/XmlObjectSerializerTest.cs22
-rw-r--r--mcs/class/System.Runtime.Serialization/net_4_0_System.Runtime.Serialization.dll.sources11
-rw-r--r--mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs8
-rw-r--r--mcs/class/System.ServiceModel.Web/Assembly/ChangeLog5
-rw-r--r--mcs/class/System.ServiceModel.Web/ChangeLog23
-rw-r--r--mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/ChangeLog41
-rw-r--r--mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer_2_1.cs117
-rw-r--r--mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonReader.cs7
-rw-r--r--mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs26
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/ChangeLog13
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs59
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/JsonReaderTest.cs6
-rw-r--r--mcs/class/System.ServiceModel.Web/common_System.ServiceModel.Web.dll.sources44
-rw-r--r--mcs/class/System.ServiceModel.Web/monotouch_System.ServiceModel.Web.dll.sources11
-rw-r--r--mcs/class/System.ServiceModel.Web/net_2_0_System.ServiceModel.Web.dll.sources46
-rw-r--r--mcs/class/System.ServiceModel.Web/net_2_1_raw_System.ServiceModel.Web.dll.sources2
-rw-r--r--mcs/class/System.ServiceModel.Web/net_4_0_System.ServiceModel.Web.dll.sources1
-rwxr-xr-xmcs/class/System.ServiceModel/ChangeLog35
-rw-r--r--mcs/class/System.ServiceModel/Dummy_2_1.cs3
-rwxr-xr-xmcs/class/System.ServiceModel/Mono.CodeGeneration/ChangeLog1
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncoder.cs13
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs6
-rwxr-xr-xmcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog140
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs3
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelListener.cs13
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpListenerManager.cs17
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs44
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestContext.cs13
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs60
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs13
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/LocalClientSecuritySettings.cs27
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageFault.cs18
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs14
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReplyChannelBase.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs85
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityChannelListener.cs51
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpBinaryFrameManager.cs69
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpDuplexSessionChannel.cs12
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpReplyChannel.cs29
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpRequestChannel.cs9
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs48
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/XmlReaderBodyWriter.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog24
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs26
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs222
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataExtension.cs3
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog36
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs13
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DefaultOperationInvoker.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs192
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/InstanceBehavior.cs5
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/OperationInvokerHandler.cs32
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs1
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs75
-rwxr-xr-xmcs/class/System.ServiceModel/System.ServiceModel/ChangeLog33
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs10
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs7
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress10.cs14
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources5
-rw-r--r--mcs/class/System.ServiceModel/Test/FeatureBased/ChangeLog5
-rw-r--r--mcs/class/System.ServiceModel/Test/FeatureBased/TestFixtureBase.cs12
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/BinaryMessageEncodingBindingElementTest.cs87
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/ChangeLog32
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpTransportBindingElementTest.cs63
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpsTransportBindingElementTest.cs66
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageFaultTest.cs9
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageHeadersTest.cs26
-rwxr-xr-xmcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ChangeLog4
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceDebugBehaviorTest.cs25
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChangeLog10
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChannelDispatcherTest.cs2
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs4
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/ChangeLog8
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs18
-rwxr-xr-xmcs/class/System.ServiceModel/Test/System.ServiceModel.Security.Tokens/ChangeLog4
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Security.Tokens/IssuedSecurityTokenProviderTest.cs1
-rwxr-xr-xmcs/class/System.ServiceModel/Test/System.ServiceModel.Security/ChangeLog5
-rwxr-xr-xmcs/class/System.ServiceModel/Test/System.ServiceModel.Security/TransportSecurityBindingElementTest.cs51
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/WSSecurityTokenSerializerTest.cs1
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel/BasicHttpBindingTest.cs66
-rwxr-xr-xmcs/class/System.ServiceModel/Test/System.ServiceModel/ChangeLog27
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs2
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel/NetTcpBindingTest.cs38
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs3
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel/WSHttpBindingTest.cs3
-rwxr-xr-xmcs/class/System.ServiceModel/net_2_1_raw_System.ServiceModel.dll.sources10
-rw-r--r--mcs/class/System.ServiceModel/net_4_0_System.ServiceModel.dll.sources40
-rw-r--r--mcs/class/System.Transactions/System.Transactions/ChangeLog4
-rw-r--r--mcs/class/System.Transactions/System.Transactions/TransactionAbortedException.cs2
-rw-r--r--mcs/class/System.Web.DynamicData/ChangeLog5
-rw-r--r--mcs/class/System.Web.DynamicData/Makefile2
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.Script.Services/ChangeLog10
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs14
-rw-r--r--mcs/class/System.Web/ChangeLog25
-rw-r--r--mcs/class/System.Web/Makefile8
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.cs4
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/BuildManager.cs7
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/BuildManagerDirectoryBuilder.cs1
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/ChangeLog29
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs35
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog10
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs28
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs121
-rw-r--r--mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog4
-rw-r--r--mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs14
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog12
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs11
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs7
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs146
-rw-r--r--mcs/class/System.Web/System.Web.UI/ChangeLog25
-rw-r--r--mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs46
-rw-r--r--mcs/class/System.Web/System.Web.UI/IndexedString.cs12
-rw-r--r--mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs44
-rw-r--r--mcs/class/System.Web/System.Web.UI/Page.cs22
-rw-r--r--mcs/class/System.Web/System.Web/ChangeLog13
-rw-r--r--mcs/class/System.Web/System.Web/StaticSiteMapProvider.cs26
-rw-r--r--mcs/class/System.Web/System.Web/VirtualPathUtility.cs9
-rw-r--r--mcs/class/System.Web/System.Web_test.dll.sources5
-rw-r--r--mcs/class/System.Web/Test/System.Web.Compilation/ChangeLog4
-rw-r--r--mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs8
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog11
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangePasswordTest.cs18
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.WebControls/ParameterTest.cs74
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI/ChangeLog4
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI/ObjectStateFormatterTest.cs106
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/Author.cs106
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/AuthorConverter.cs116
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/Book.cs196
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/BookType.cs14
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs1
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx123
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx27
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx89
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs178
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx37
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx21
-rw-r--r--mcs/class/System.XML/ChangeLog5
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/ChangeLog5
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs4
-rw-r--r--mcs/class/System.XML/System.Xml.dll.sources4
-rw-r--r--mcs/class/System.XML/System.Xml/ChangeLog73
-rw-r--r--mcs/class/System.XML/System.Xml/NamespaceHandling.cs11
-rw-r--r--mcs/class/System.XML/System.Xml/XmlConvert.cs123
-rw-r--r--mcs/class/System.XML/System.Xml/XmlDocument.cs4
-rw-r--r--mcs/class/System.XML/System.Xml/XmlTextWriter2.cs10
-rw-r--r--mcs/class/System.XML/System.Xml/XmlWriterSettings.cs7
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Serialization/ChangeLog4
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs29
-rw-r--r--mcs/class/System.XML/Test/System.Xml/ChangeLog46
-rw-r--r--mcs/class/System.XML/Test/System.Xml/XmlConvertTests.cs75
-rw-r--r--mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs3
-rw-r--r--mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs15
-rw-r--r--mcs/class/System.XML/monotouch_System.Xml.dll.sources1
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog36
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XAttribute.cs32
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs27
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeWriter.cs2
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XUtil.cs28
-rw-r--r--mcs/class/System.Xml.Linq/Test/System.Xml.Linq/ChangeLog15
-rw-r--r--mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XAttributeTest.cs912
-rw-r--r--mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs1029
-rw-r--r--mcs/class/System/ChangeLog5
-rw-r--r--mcs/class/System/System.ComponentModel/BaseNumberConverter.cs12
-rw-r--r--mcs/class/System/System.ComponentModel/ChangeLog5
-rw-r--r--mcs/class/System/System.IO.Compression/ChangeLog5
-rw-r--r--mcs/class/System/System.IO.Compression/DeflateStream.cs2
-rw-r--r--mcs/class/System/System.Net.Mail/ChangeLog6
-rw-r--r--mcs/class/System/System.Net.Mail/SmtpClient.cs1
-rw-r--r--mcs/class/System/System.Net.Sockets/ChangeLog5
-rw-r--r--mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs5
-rw-r--r--mcs/class/System/System.Net/ChangeLog42
-rw-r--r--mcs/class/System/System.Net/Cookie.cs68
-rw-r--r--mcs/class/System/System.Net/CookieCollection.cs65
-rw-r--r--mcs/class/System/System.Net/CookieContainer.cs351
-rw-r--r--mcs/class/System/System.Net/HttpWebRequest.cs12
-rw-r--r--mcs/class/System/System.Net/IPEndPoint.cs4
-rw-r--r--mcs/class/System/System.Net/NetworkCredential.cs19
-rw-r--r--mcs/class/System/System.Net/ServicePoint.cs11
-rw-r--r--mcs/class/System/System.Net/WebConnectionGroup.cs20
-rw-r--r--mcs/class/System/System_test.dll.sources1
-rw-r--r--mcs/class/System/Test/System.ComponentModel/ByteConverterTests.cs1
-rw-r--r--mcs/class/System/Test/System.ComponentModel/ChangeLog14
-rw-r--r--mcs/class/System/Test/System.ComponentModel/DoubleConverterTests.cs1
-rw-r--r--mcs/class/System/Test/System.ComponentModel/Int16ConverterTests.cs1
-rw-r--r--mcs/class/System/Test/System.ComponentModel/Int32ConverterTests.cs1
-rw-r--r--mcs/class/System/Test/System.ComponentModel/Int64ConverterTests.cs1
-rw-r--r--mcs/class/System/Test/System.ComponentModel/SByteConverterTests.cs1
-rw-r--r--mcs/class/System/Test/System.ComponentModel/SingleConverterTests.cs1
-rw-r--r--mcs/class/System/Test/System.ComponentModel/UInt16ConverterTests.cs1
-rw-r--r--mcs/class/System/Test/System.ComponentModel/UInt32ConverterTests.cs1
-rw-r--r--mcs/class/System/Test/System.ComponentModel/UInt64ConverterTests.cs1
-rw-r--r--mcs/class/System/Test/System.Net/ChangeLog17
-rw-r--r--mcs/class/System/Test/System.Net/CookieContainerTest.cs669
-rw-r--r--mcs/class/System/Test/System.Net/NetworkCredentialTest.cs104
-rw-r--r--mcs/class/corlib/System.IO/ChangeLog11
-rw-r--r--mcs/class/corlib/System.IO/File.cs25
-rw-r--r--mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs4
-rw-r--r--mcs/class/corlib/System.Reflection/ChangeLog11
-rw-r--r--mcs/class/corlib/System.Reflection/ParameterInfo.cs11
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/ChangeLog6
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/DateTimeConstantAttribute.cs4
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/ChangeLog6
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs25
-rw-r--r--mcs/class/corlib/System.Threading/ChangeLog4
-rw-r--r--mcs/class/corlib/System.Threading/Parallel.cs2
-rw-r--r--mcs/class/corlib/System/Array.cs2
-rw-r--r--mcs/class/corlib/System/ChangeLog74
-rw-r--r--mcs/class/corlib/System/Convert.cs44
-rw-r--r--mcs/class/corlib/System/DateTime.cs15
-rw-r--r--mcs/class/corlib/System/DateTimeOffset.cs3
-rw-r--r--mcs/class/corlib/System/Double.cs44
-rw-r--r--mcs/class/corlib/System/Int32.cs80
-rw-r--r--mcs/class/corlib/System/MonoType.cs6
-rw-r--r--mcs/class/corlib/System/Single.cs14
-rw-r--r--mcs/class/corlib/System/String.cs10
-rw-r--r--mcs/class/corlib/Test/System.Reflection/ChangeLog6
-rw-r--r--mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs11
-rw-r--r--mcs/class/corlib/Test/System.Threading/ChangeLog4
-rw-r--r--mcs/class/corlib/Test/System.Threading/ParallelTests.cs50
-rw-r--r--mcs/class/corlib/Test/System/ByteTest.cs5
-rw-r--r--mcs/class/corlib/Test/System/ChangeLog59
-rw-r--r--mcs/class/corlib/Test/System/ConvertTest.cs47
-rw-r--r--mcs/class/corlib/Test/System/DateTimeOffsetTest.cs8
-rw-r--r--mcs/class/corlib/Test/System/DateTimeTest.cs7
-rw-r--r--mcs/class/corlib/Test/System/DoubleTest.cs10
-rw-r--r--mcs/class/corlib/Test/System/Int16Test.cs5
-rw-r--r--mcs/class/corlib/Test/System/Int32Test.cs59
-rw-r--r--mcs/class/corlib/Test/System/Int64Test.cs5
-rw-r--r--mcs/class/corlib/Test/System/SingleTest.cs59
-rw-r--r--mcs/class/corlib/Test/System/StringTest.cs15
-rw-r--r--mcs/class/corlib/Test/System/TypeTest.cs11
-rw-r--r--mcs/mcs/ChangeLog9
-rw-r--r--mcs/mcs/complete.cs4
-rw-r--r--mcs/mcs/cs-parser.jay2
-rw-r--r--mcs/mcs/eval.cs16
-rw-r--r--mcs/mcs/statement.cs3
-rw-r--r--mcs/tools/csharp/ChangeLog4
-rw-r--r--mcs/tools/csharp/repl.cs2
-rw-r--r--mcs/tools/linker/ChangeLog18
-rw-r--r--mcs/tools/linker/Descriptors/mscorlib.xml385
-rw-r--r--mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs88
-rw-r--r--mcs/tools/mdoc/ChangeLog6
-rw-r--r--mcs/tools/mdoc/Mono.Documentation/monodocs2slashdoc.cs19
-rw-r--r--mcs/tools/monodoc/ChangeLog39
-rw-r--r--mcs/tools/monodoc/Lucene.Net/Lucene.Net/QueryParser/QueryParser.cs2
-rw-r--r--mcs/tools/monodoc/Mono.Documentation/XmlDocUtils.cs7
-rw-r--r--mcs/tools/monodoc/Monodoc/ecma-provider.cs7
-rw-r--r--mcs/tools/monodoc/Monodoc/provider.cs4
-rw-r--r--mcs/tools/monodoc/Resources/mdoc-html-utils.xsl6
-rw-r--r--mcs/tools/sqlmetal/ChangeLog5
-rw-r--r--mcs/tools/sqlmetal/Makefile6
391 files changed, 11963 insertions, 21440 deletions
diff --git a/mcs/build/ChangeLog b/mcs/build/ChangeLog
index 944f37b308b..5d3f1e45d77 100644
--- a/mcs/build/ChangeLog
+++ b/mcs/build/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-12 Zoltan Varga <vargaz@gmail.com>
+
+ * profiles/basic.make: Document that mono 2.6 can't be compiled with mono SVN HEAD.
+
2009-11-17 Marek Habersack <mhabersack@novell.com>
* tests.make (TEST_RUNTIME_WRAPPERS_PATH): added - used to set up
diff --git a/mcs/build/common/ChangeLog b/mcs/build/common/ChangeLog
index e21fef69372..23981ce5639 100644
--- a/mcs/build/common/ChangeLog
+++ b/mcs/build/common/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Consts.cs.in: Update FX version for SL3 latest released version
+ [Backport r149187]
+
2009-11-12 Jb Evain <jbevain@novell.com>
* Consts.cs.in: add a AssemblySystem_Core constant.
diff --git a/mcs/build/common/Consts.cs.in b/mcs/build/common/Consts.cs.in
index 340684d0cb7..2e663e2aa8c 100644
--- a/mcs/build/common/Consts.cs.in
+++ b/mcs/build/common/Consts.cs.in
@@ -69,11 +69,11 @@ internal
public const string FxFileVersion = "3.0.4506.648";
public const string VsFileVersion = "6.0.6001.17014";
#elif NET_2_1
- // Versions of .NET Framework for SilverLight
+ // Versions of .NET Framework for Silverlight 3.0
public const string FxVersion = "2.0.5.0";
- public const string VsVersion = "9.0.0.0"; // TODO:
- public const string FxFileVersion = "2.0.40115.0";
- public const string VsFileVersion = "9.0.50727.42"; // TODO:
+ public const string VsVersion = "9.0.0.0"; // unused, but needed for compilation
+ public const string FxFileVersion = "3.0.40818.0";
+ public const string VsFileVersion = "9.0.50727.42"; // unused, but needed for compilation
#elif NET_2_0 || BOOTSTRAP_NET_2_0
// Versions of .NET Framework 2.0 RTM
public const string FxVersion = "2.0.0.0";
diff --git a/mcs/build/profiles/basic.make b/mcs/build/profiles/basic.make
index 19a36342725..e17c0e7b688 100644
--- a/mcs/build/profiles/basic.make
+++ b/mcs/build/profiles/basic.make
@@ -47,17 +47,20 @@ PROFILE_CS = $(depsdir)/basic-profile-check.cs
PROFILE_EXE = $(PROFILE_CS:.cs=.exe)
PROFILE_OUT = $(PROFILE_CS:.cs=.out)
+MAKE_Q=$(if $(V),,-s)
+
do-profile-check:
@ok=:; \
rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
- $(MAKE) -s $(PROFILE_OUT) > /dev/null || ok=false; \
+ $(MAKE) $(MAKE_Q) $(PROFILE_OUT) || ok=false; \
rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
if $$ok; then :; else \
if test -f $(topdir)/class/lib/monolite/mcs.exe; then \
$(MAKE) -s do-profile-check-monolite ; \
else \
echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
- echo "*** You need a C# compiler installed to build MCS (make sure mcs works from the command line)" 1>&2 ; \
+ echo "*** You need a C# 1.0 compiler installed to build MCS (make sure mcs works from the command line)" 1>&2 ; \
+ echo "*** mcs/gmcs from mono > 2.6 will not work, since they target NET 2.0." 1>&2 ; \
echo "*** Read INSTALL.txt for information on how to bootstrap a Mono installation." 1>&2 ; \
exit 1; fi; fi
diff --git a/mcs/class/ChangeLog b/mcs/class/ChangeLog
index 0d6fab56057..61db1acc9e3 100644
--- a/mcs/class/ChangeLog
+++ b/mcs/class/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-11 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Makefile: For 2.1 build System.Core.dll before System.Net.dll
+
2009-11-07 Zoltan Varga <vargaz@gmail.com>
* Makefile (net_2_0_dirs): Add System.Data.Services.
diff --git a/mcs/class/I18N/CJK/Test/ChangeLog b/mcs/class/I18N/CJK/Test/ChangeLog
index f0974a2fde8..b0b63551455 100644
--- a/mcs/class/I18N/CJK/Test/ChangeLog
+++ b/mcs/class/I18N/CJK/Test/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-18 Atsushi Enomoto <atsushi@ximian.com>
+
+ * I18N.CJK.Test.cs : add NET_2_0 condition. fix 1.1 test.
+
2009-10-09 Atsushi Enomoto <atsushi@ximian.com>
* I18N.CJK.Test.cs : added test for iso-2022-jp wrong esc sequences.
diff --git a/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs b/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs
index 61260ad328c..dca6560fe5e 100644
--- a/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs
+++ b/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs
@@ -198,6 +198,7 @@ namespace MonoTests.I18N.CJK
Assert.AreEqual ("\u001B$0", Encoding.GetEncoding (50220).GetString (new byte [] {0x1B, 0x24, 0x30}), "#1");
}
+#if NET_2_0
[Test]
public void CP50220BrokenESC2 ()
{
@@ -211,6 +212,7 @@ namespace MonoTests.I18N.CJK
// neither ...
Assert.AreEqual ("\u001B$0", Encoding.GetEncoding (50220, new EncoderExceptionFallback (), new DecoderExceptionFallback ()).GetString (new byte [] {0x1B, 0x24, 0x30}), "#2");
}
+#endif
[Test]
#if !NET_2_0
diff --git a/mcs/class/Makefile b/mcs/class/Makefile
index 9449a7cd0a8..0ad521d7742 100644
--- a/mcs/class/Makefile
+++ b/mcs/class/Makefile
@@ -133,9 +133,9 @@ net_2_1_dirs := \
corlib \
Mono.CompilerServices.SymbolWriter \
System \
- System.Net \
System.XML \
System.Core \
+ System.Net \
System.Xml.Linq \
System.Runtime.Serialization \
System.ServiceModel \
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
index 44122dddf03..e2c9792a9c1 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
@@ -1,3 +1,80 @@
+2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ComboBox.cs: When the normal drop down window is closed, make sure
+ that the auto complete list -if any- is closed as well, instead of
+ stay open without need.
+
+2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * TextBox.cs: When showing the autocomplete listbox, make sure it's on
+ top, by calling the raw XplatUI.SetZOrder for it, since we can't
+ properly call BringToFront on it as it is parentless. This fixes an
+ issue when using this feature with ComboBox's own parentless listbox.
+ Fixes the remaining bits of #489339.
+
+2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * XplatUI.cs:
+ * XplatUIDriver:
+ * XplatUICarbon:
+ * XplatUIWin32:
+ * XplatUIX11.cs:
+ * XplatUIStructs: Implement support for different kind of audible
+ alerts in Windows, and update the requiered classes.
+ * MessageBox.cs:
+ * TextBoxBase.cs: Update calls to XplatUI.AudibleAlert.
+ Fixes #473725.
+
+2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ComboBox.cs: When use manually setting DropDownHeight, ignore the
+ MaxDropDownHeight property - also rename our field 'count' to
+ 'visible_items_count' to avoid confusion as much as possible.
+ Fixes an issue with several items, showing an incorrect layout.
+
+2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * RichTextBox.cs: SelectedText should set Modified to true. Observe
+ that this is happening just here, not for the Text property, and
+ neither for the TextBoxBase impl.
+ Fixes #569950.
+
+2010-01-10 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ToolStripMenuItem.cs: Put the Checked/CheckState logic in a single
+ place and synchronize the events properly. Fixes a lack of
+ coordination between the events - which should be fired together.
+
+2010-01-09 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * TrackBar.cs: Move our events code to a single method, allowing it to
+ optionally fire the Scroll event. This way we both avoid the
+ duplicated calls to OnScroll and also will be able to fire Scroll
+ *before* OnValueChanged in other places.
+ Fixes #568026.
+
+2010-01-04 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * RadioButton.cs: When drawing, if Appearance is Button use the old
+ normal routine in the theme engine, instead of using the one in 2.0,
+ since this last one doesn't support proper rendering of the control as
+ a button.
+ Fixes #567904.
+
+2010-01-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * GroupBoxRenderer.cs: Properly use SystemColors.GrayText to draw to
+ text of the group box if it is disabled.
+ Fixes #567847.
+
+2009-12-31 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * XplatUICarbon.cs: Implement the overriden AudibleAlert
+ function in XplatUICarbon. Currently it throws
+ NotImplementedException which will kill a WinForms application showing
+ a dialog box.
+ Patch by Erik Ylvisaker (erik@agatelib.org).
+
2009-11-12 Carlos Alberto Cortez <calberto.cortez@gmail.com>
[merge the very last changes from trunk, -r 144884:145790]
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
index 2e1fde53b85..8da7cf3a0ac 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
@@ -1598,6 +1598,12 @@ namespace System.Windows.Forms
listbox_ctrl.Dispose ();
listbox_ctrl = null;
}
+#if NET_2_0
+ // The auto complete list could have been shown after the listbox,
+ // so make sure it's hidden.
+ if (textbox_ctrl != null)
+ textbox_ctrl.HideAutoCompleteList ();
+#endif
}
private int FindStringCaseInsensitive (string search)
@@ -2522,11 +2528,11 @@ namespace System.Windows.Forms
else { // DropDown or DropDownList
width = owner.DropDownWidth;
- int count = (owner.Items.Count <= owner.MaxDropDownItems) ? owner.Items.Count : owner.MaxDropDownItems;
+ int visible_items_count = (owner.Items.Count <= owner.MaxDropDownItems) ? owner.Items.Count : owner.MaxDropDownItems;
if (owner.DrawMode == DrawMode.OwnerDrawVariable) {
height = 0;
- for (int i = 0; i < count; i++) {
+ for (int i = 0; i < visible_items_count; i++) {
height += owner.GetItemHeight (i);
}
@@ -2535,14 +2541,15 @@ namespace System.Windows.Forms
} else {
#if NET_2_0
if (owner.DropDownHeight == default_drop_down_height) { // ignore DropDownHeight
- height = owner.ItemHeight * count;
+ height = owner.ItemHeight * visible_items_count;
show_scrollbar = owner.Items.Count > owner.MaxDropDownItems;
} else {
+ // ignore visible items count, and use manual height instead
height = owner.DropDownHeight;
- show_scrollbar = (count * owner.ItemHeight) > height;
+ show_scrollbar = (owner.Items.Count * owner.ItemHeight) > height;
}
#else
- height = owner.ItemHeight * count;
+ height = owner.ItemHeight * visible_items_count;
show_scrollbar = owner.Items.Count > owner.MaxDropDownItems;
#endif
}
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GroupBoxRenderer.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GroupBoxRenderer.cs
index e2832badc9d..0f4e5b6787c 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GroupBoxRenderer.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GroupBoxRenderer.cs
@@ -111,7 +111,8 @@ namespace System.Windows.Forms
if (groupBoxText != String.Empty) {
if (textColor == Color.Empty)
- textColor = SystemColors.ControlText;
+ textColor = state == GroupBoxState.Normal ? SystemColors.ControlText :
+ SystemColors.GrayText;
TextRenderer.DrawText (g, groupBoxText, font, new Point (bounds.Left + 8, bounds.Top), textColor, flags);
}
}
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MessageBox.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MessageBox.cs
index 3c1e25dbab1..1803aa9d1e0 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MessageBox.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MessageBox.cs
@@ -69,6 +69,7 @@ namespace System.Windows.Forms
string help_keyword;
HelpNavigator help_navigator;
object help_param;
+ AlertType alert_type;
#endregion // MessageBoxFrom Local Variables
#region MessageBoxForm Constructors
@@ -81,26 +82,31 @@ namespace System.Windows.Forms
switch (icon) {
case MessageBoxIcon.None: {
icon_image = null;
+ alert_type = AlertType.Default;
break;
}
case MessageBoxIcon.Error: { // Same as MessageBoxIcon.Hand and MessageBoxIcon.Stop
icon_image = SystemIcons.Error;
+ alert_type = AlertType.Error;
break;
}
case MessageBoxIcon.Question: {
icon_image = SystemIcons.Question;
+ alert_type = AlertType.Question;
break;
}
case MessageBoxIcon.Asterisk: { // Same as MessageBoxIcon.Information
icon_image = SystemIcons.Information;
+ alert_type = AlertType.Information;
break;
}
case MessageBoxIcon.Warning: { // Same as MessageBoxIcon.Exclamation:
icon_image = SystemIcons.Warning;
+ alert_type = AlertType.Warning;
break;
}
}
@@ -190,7 +196,7 @@ namespace System.Windows.Forms
if (Owner != null)
TopMost = Owner.TopMost;
- XplatUI.AudibleAlert ();
+ XplatUI.AudibleAlert (alert_type);
this.ShowDialog ();
return this.DialogResult;
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RadioButton.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RadioButton.cs
index 14ca465d498..35af67e5988 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RadioButton.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RadioButton.cs
@@ -182,7 +182,7 @@ namespace System.Windows.Forms {
ThemeEngine.Current.CalculateRadioButtonTextAndImageLayout (this, Point.Empty, out glyph_rectangle, out text_rectangle, out image_rectangle);
// Draw our button
- if (FlatStyle != FlatStyle.System)
+ if (FlatStyle != FlatStyle.System && Appearance != Appearance.Button)
ThemeEngine.Current.DrawRadioButton (pe.Graphics, this, glyph_rectangle, text_rectangle, image_rectangle, pe.ClipRectangle);
else
ThemeEngine.Current.DrawRadioButton (pe.Graphics, this.ClientRectangle, this);
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
index b93a54c988a..9774eec2df5 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
@@ -443,6 +443,8 @@ namespace System.Windows.Forms {
}
set {
+ // TextBox/TextBoxBase don't set Modified in this same property
+ Modified = true;
base.SelectedText = value;
}
}
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBox.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBox.cs
index 4964b964e30..5ad95c14933 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBox.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBox.cs
@@ -996,6 +996,8 @@ namespace System.Windows.Forms {
HighlightedIndex = -1;
Show ();
+ // make sure we are on top - call the raw routine, since we are parentless
+ XplatUI.SetZOrder (Handle, IntPtr.Zero, true, false);
Invalidate ();
}
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
index 243b9235d4c..4151589aa7e 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
@@ -1597,7 +1597,7 @@ namespace System.Windows.Forms
OnTextChanged(EventArgs.Empty);
} else {
- XplatUI.AudibleAlert();
+ XplatUI.AudibleAlert(AlertType.Default);
}
return;
} else if (ch == 8) {
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
index ff62d634905..caa88fbe27f 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
@@ -109,11 +109,7 @@ namespace System.Windows.Forms
}
}
set {
- if (this.checked_state != (value ? CheckState.Checked : CheckState.Unchecked)) {
- this.checked_state = value ? CheckState.Checked : CheckState.Unchecked;
- this.Invalidate ();
- this.OnCheckedChanged (EventArgs.Empty);
- }
+ CheckState = value ? CheckState.Checked : CheckState.Unchecked;
}
}
@@ -138,8 +134,12 @@ namespace System.Windows.Forms
if (!Enum.IsDefined (typeof (CheckState), value))
throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for CheckState", value));
+ if (value == checked_state)
+ return;
+
this.checked_state = value;
this.Invalidate ();
+ this.OnCheckedChanged (EventArgs.Empty);
this.OnCheckStateChanged (EventArgs.Empty);
}
}
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TrackBar.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TrackBar.cs
index 6b908929876..a6edb2b0ce0 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TrackBar.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TrackBar.cs
@@ -537,21 +537,31 @@ namespace System.Windows.Forms
public int Value {
get { return position; }
set {
- if (value < Minimum || value > Maximum)
- throw new ArgumentException(
- string.Format("'{0}' is not a valid value for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'", value));
-
- if (position != value) {
- position = value;
+ SetValue (value, false);
+ }
+ }
+
+ void SetValue (int value, bool fire_onscroll)
+ {
+ if (value < Minimum || value > Maximum)
+ throw new ArgumentException(
+ String.Format ("'{0}' is not a valid value for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'", value));
- // XXX any reason we don't call OnValueChanged here?
- EventHandler eh = (EventHandler)(Events [ValueChangedEvent]);
- if (eh != null)
- eh (this, EventArgs.Empty);
+ if (position == value)
+ return;
- Invalidate (thumb_area);
- }
- }
+ position = value;
+
+ // OnScroll goes before OnValueChanged
+ if (fire_onscroll)
+ OnScroll (EventArgs.Empty);
+
+ // XXX any reason we don't call OnValueChanged here?
+ EventHandler eh = (EventHandler)(Events [ValueChangedEvent]);
+ if (eh != null)
+ eh (this, EventArgs.Empty);
+
+ Invalidate (thumb_area);
}
#endregion //Public Properties
@@ -695,14 +705,14 @@ namespace System.Windows.Forms
private void UpdatePos (int newPos, bool update_trumbpos)
{
if (newPos < minimum){
- Value = minimum;
+ SetValue (minimum, true);
}
else {
if (newPos > maximum) {
- Value = maximum;
+ SetValue (maximum, true);
}
else {
- Value = newPos;
+ SetValue (newPos, true);
}
}
}
@@ -712,7 +722,6 @@ namespace System.Windows.Forms
{
UpdatePos (position + LargeChange, true);
Invalidate (thumb_area);
- OnScroll (new EventArgs ());
}
// Used by UIA implementation, so making internal
@@ -720,21 +729,18 @@ namespace System.Windows.Forms
{
UpdatePos (position - LargeChange, true);
Invalidate (thumb_area);
- OnScroll (new EventArgs ());
}
private void SmallIncrement ()
{
UpdatePos (position + SmallChange, true);
Invalidate (thumb_area);
- OnScroll (new EventArgs ());
}
private void SmallDecrement ()
{
UpdatePos (position - SmallChange, true);
Invalidate (thumb_area);
- OnScroll (new EventArgs ());
}
private void OnMouseUpTB (object sender, MouseEventArgs e)
@@ -821,13 +827,9 @@ namespace System.Windows.Forms
mouse_moved = true;
/* Moving the thumb */
- if (thumb_pressed) {
- int old_value = Value;
- Value = ThemeEngine.Current.TrackBarValueFromMousePosition (e.X, e.Y, this);
-
- if (Value != old_value)
- OnScroll (EventArgs.Empty);
- }
+ if (thumb_pressed)
+ SetValue (ThemeEngine.Current.TrackBarValueFromMousePosition (e.X, e.Y, this), true);
+
ThumbEntered = GetRealThumbRectangle ().Contains (e.Location);
}
@@ -892,16 +894,16 @@ namespace System.Windows.Forms
case Keys.Home:
if (horiz)
- Value = Minimum;
+ SetValue (Minimum, true);
else
- Value = Maximum;
+ SetValue (Maximum, true);
break;
case Keys.End:
if (horiz)
- Value = Maximum;
+ SetValue (Maximum, true);
else
- Value = Minimum;
+ SetValue (Minimum, true);
break;
default:
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
index c04f7418f10..9728486e64e 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
@@ -464,11 +464,11 @@ namespace System.Windows.Forms {
driver.Activate(handle);
}
- internal static void AudibleAlert() {
+ internal static void AudibleAlert(AlertType alert) {
#if DriverDebug
Console.WriteLine("AudibleAlert(): Called");
#endif
- driver.AudibleAlert();
+ driver.AudibleAlert(alert);
}
internal static bool CalculateWindowRect(ref Rectangle ClientRect, CreateParams cp, Menu menu, out Rectangle WindowRect) {
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs
index 4755efd1791..897fff46028 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs
@@ -791,8 +791,8 @@ namespace System.Windows.Forms {
ActiveWindow = handle;
}
- internal override void AudibleAlert() {
- throw new NotImplementedException();
+ internal override void AudibleAlert(AlertType alert) {
+ AlertSoundPlay ();
}
internal override void CaretVisible (IntPtr hwnd, bool visible) {
@@ -2369,6 +2369,9 @@ namespace System.Windows.Forms {
[DllImport("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
extern static short GetMBarHeight ();
+ [DllImport("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
+ extern static void AlertSoundPlay ();
+
#region Cursor imports
[DllImport("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")]
extern static Carbon.HIRect CGDisplayBounds (IntPtr displayID);
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs
index bf8efc08f3b..d32659714df 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs
@@ -274,7 +274,7 @@ namespace System.Windows.Forms {
internal abstract event EventHandler Idle;
#region XplatUI Driver Methods
- internal abstract void AudibleAlert();
+ internal abstract void AudibleAlert(AlertType alert);
internal abstract void EnableThemes();
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIStructs.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIStructs.cs
index c203090971d..d9fe8d0361f 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIStructs.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIStructs.cs
@@ -874,5 +874,13 @@ namespace System.Windows.Forms {
SC_MONITORPOWER = 0xF170,
SC_CONTEXTHELP = 0xF180
}
+
+ internal enum AlertType {
+ Default = 1,
+ Error = 2,
+ Question = 3,
+ Warning = 4,
+ Information = 5
+ }
}
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
index 63ea893e4fc..f3d7ca3294b 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs
@@ -1568,8 +1568,24 @@ namespace System.Windows.Forms {
Console.WriteLine("Xplat version $revision: $");
}
- internal override void AudibleAlert() {
- Win32PlaySound("Default", IntPtr.Zero, SndFlags.SND_ALIAS | SndFlags.SND_ASYNC | SndFlags.SND_NOSTOP | SndFlags.SND_NOWAIT);
+ string GetSoundAlias (AlertType alert)
+ {
+ switch (alert) {
+ case AlertType.Error:
+ return "SystemHand";
+ case AlertType.Question:
+ return "SystemQuestion";
+ case AlertType.Warning:
+ return "SystemExclamation";
+ case AlertType.Information:
+ return "SystemAsterisk";
+ default:
+ return "SystemDefault";
+ }
+ }
+
+ internal override void AudibleAlert(AlertType alert) {
+ Win32PlaySound(GetSoundAlias (alert), IntPtr.Zero, SndFlags.SND_ALIAS_ID | SndFlags.SND_ASYNC | SndFlags.SND_NOSTOP | SndFlags.SND_NOWAIT);
}
internal override void GetDisplaySize(out Size size) {
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
index 512dbafeaa6..b64febd4cea 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
@@ -2570,7 +2570,7 @@ namespace System.Windows.Forms {
}
}
- internal override void AudibleAlert() {
+ internal override void AudibleAlert(AlertType alert) {
XBell(DisplayHandle, 0);
return;
}
@@ -3355,7 +3355,7 @@ namespace System.Windows.Forms {
case HitTest.HTBOTTOMLEFT: handle = Cursors.SizeNESW.handle; break;
case HitTest.HTBOTTOMRIGHT: handle = Cursors.SizeNWSE.handle; break;
case HitTest.HTERROR: if ((msg.LParam.ToInt32() >> 16) == (int)Msg.WM_LBUTTONDOWN) {
- AudibleAlert();
+ AudibleAlert(AlertType.Default);
}
handle = Cursors.Default.handle;
break;
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
index 833cbddd3eb..7ae837a627e 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * RichTextBoxTest.cs: New test for the Modified property.
+
+2010-01-10 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * ToolStripMenuItemTest: New test for the events related to the check
+ state.
+
+2010-01-09 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * TrackBarTest.cs: New test for events.
+
2009-11-12 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* ComboBoxTest.cs: New test case for data binding and Text
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
index e1712244add..388a1eb2468 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
@@ -292,6 +292,23 @@ namespace MonoTests.System.Windows.Forms
}
[Test]
+ public void Modified ()
+ {
+ RichTextBox rtb = new RichTextBox ();
+ Assert.AreEqual (false, rtb.Modified, "#A1");
+
+ rtb.SelectedText = "mono";
+ Assert.AreEqual (true, rtb.Modified, "#B1");
+
+ rtb.Modified = false;
+ Assert.AreEqual (false, rtb.Modified, "#C1");
+
+ // Only SelectedText seems to cause a change in Modified, as opposed to Text
+ rtb.Text = "moon";
+ Assert.AreEqual (false, rtb.Modified, "#D1");
+ }
+
+ [Test]
public void ReadOnly_BackColor_Set ()
{
RichTextBox rtb = new RichTextBox ();
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs
index c9be2bef2bd..c917b0361f1 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs
@@ -287,6 +287,42 @@ namespace MonoTests.System.Windows.Forms
return this.ProcessCmdKey (ref m, keys);
}
}
+
+ [Test]
+ public void EventsTest ()
+ {
+ ToolStripMenuItem tsmi = new ToolStripMenuItem ("Sample");
+ tsmi.CheckStateChanged += new EventHandler (tsmi_CheckStateChanged);
+ tsmi.CheckedChanged += new EventHandler (tsmi_CheckedChanged);
+ event_log = String.Empty;
+
+ Assert.AreEqual (false, tsmi.Checked, "#A1");
+ Assert.AreEqual (CheckState.Unchecked, tsmi.CheckState, "#A2");
+
+ tsmi.Checked = true;
+ Assert.AreEqual (true, tsmi.Checked, "#B1");
+ Assert.AreEqual (CheckState.Checked, tsmi.CheckState, "#B2");
+ Assert.AreEqual ("CheckedChanged=True;CheckStateChanged=Checked;", event_log, "#B3");
+
+ event_log = String.Empty;
+
+ tsmi.CheckState = CheckState.Unchecked;
+ Assert.AreEqual (false, tsmi.Checked, "#C1");
+ Assert.AreEqual (CheckState.Unchecked, tsmi.CheckState, "#C2");
+ Assert.AreEqual ("CheckedChanged=False;CheckStateChanged=Unchecked;", event_log, "#C3");
+ }
+
+ string event_log;
+
+ void tsmi_CheckedChanged (object sender, EventArgs e)
+ {
+ event_log += "CheckedChanged=" + ((ToolStripMenuItem)sender).Checked + ";";
+ }
+
+ void tsmi_CheckStateChanged (object sender, EventArgs e)
+ {
+ event_log += "CheckStateChanged=" + ((ToolStripMenuItem)sender).CheckState + ";";
+ }
}
}
#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TrackBarTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TrackBarTest.cs
index a994d17ee30..fbb61684abe 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TrackBarTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TrackBarTest.cs
@@ -283,6 +283,33 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual(handle, handle, "Removes warning");
}
+
+ [Test]
+ public void EventsTest ()
+ {
+ TrackBar trackbar = new TrackBar ();
+ trackbar.Maximum = 10;
+ trackbar.Minimum = 1;
+ trackbar.LargeChange = 2;
+
+ trackbar.ValueChanged += new EventHandler (trackbar_ValueChanged);
+ trackbar.Scroll += new EventHandler (trackbar_Scroll);
+
+ trackbar.Value = 6;
+ Assert.AreEqual ("ValueChanged=6;", event_log, "#A1");
+ }
+
+ string event_log;
+
+ void trackbar_Scroll (object sender, EventArgs e)
+ {
+ event_log += "Scroll=" + ((TrackBar)sender).Value + ";";
+ }
+
+ void trackbar_ValueChanged (object sender, EventArgs e)
+ {
+ event_log += "ValueChanged=" + ((TrackBar)sender).Value + ";";
+ }
}
}
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft.dll.sources b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft.dll.sources
index 5897cdebbef..9ba706c68b4 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft.dll.sources
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft.dll.sources
@@ -1,60 +1,60 @@
-Mono.Debugger/CustomAttributeTypedArgumentMirror.cs
-Mono.Debugger/ExceptionEvent.cs
-Mono.Debugger/ModuleMirror.cs
-Mono.Debugger/AppDomainMirror.cs
-Mono.Debugger/AssemblyLoadEvent.cs
-Mono.Debugger/VMStartEvent.cs
-Mono.Debugger/StackFrame.cs
-Mono.Debugger/CustomAttributeDataMirror.cs
-Mono.Debugger/ThreadStartEvent.cs
-Mono.Debugger/ILInstruction.cs
-Mono.Debugger/PrimitiveValue.cs
-Mono.Debugger/VMDisconnectedException.cs
-Mono.Debugger/Mirror.cs
-Mono.Debugger/EnumMirror.cs
-Mono.Debugger/FieldInfoMirror.cs
-Mono.Debugger/TypeMirror.cs
-Mono.Debugger/CustomAttributeNamedArgumentMirror.cs
-Mono.Debugger/DataConverter.cs
-Mono.Debugger/AssemblyMirror.cs
-Mono.Debugger/VirtualMachine.cs
-Mono.Debugger/VMMismatchException.cs
-Mono.Debugger/AppDomainUnloadEvent.cs
-Mono.Debugger/ExceptionEventRequest.cs
-Mono.Debugger/EventType.cs
-Mono.Debugger/StructMirror.cs
-Mono.Debugger/InvocationException.cs
-Mono.Debugger/IMirror.cs
-Mono.Debugger/VMDeathEvent.cs
-Mono.Debugger/MethodBodyMirror.cs
-Mono.Debugger/MethodEntryEvent.cs
-Mono.Debugger/MethodMirror.cs
-Mono.Debugger/BreakpointEventRequest.cs
-Mono.Debugger/MethodEntryEventRequest.cs
-Mono.Debugger/LocalVariable.cs
-Mono.Debugger/ParameterInfoMirror.cs
-Mono.Debugger/Event.cs
-Mono.Debugger/AppDomainCreateEvent.cs
-Mono.Debugger/ThreadDeathEvent.cs
-Mono.Debugger/SuspendPolicy.cs
-Mono.Debugger/VirtualMachineManager.cs
-Mono.Debugger/MethodExitEvent.cs
-Mono.Debugger/MethodExitEventRequest.cs
-Mono.Debugger/EventQueueImpl.cs
-Mono.Debugger/ObjectMirror.cs
-Mono.Debugger/Value.cs
-Mono.Debugger/StepEvent.cs
-Mono.Debugger/Location.cs
-Mono.Debugger/ObjectCollectedException.cs
-Mono.Debugger/EventRequest.cs
-Mono.Debugger/InvalidStackFrameException.cs
-Mono.Debugger/BreakpointEvent.cs
-Mono.Debugger/StringMirror.cs
-Mono.Debugger/PropertyInfoMirror.cs
-Mono.Debugger/ArrayMirror.cs
-Mono.Debugger/StepEventRequest.cs
-Mono.Debugger/Connection.cs
-Mono.Debugger/ThreadMirror.cs
-Mono.Debugger/TypeLoadEvent.cs
-Mono.Debugger/VMDisconnectEvent.cs
-Mono.Debugger/InvokeOptions.cs
+Mono.Debugger.Soft/CustomAttributeTypedArgumentMirror.cs
+Mono.Debugger.Soft/ExceptionEvent.cs
+Mono.Debugger.Soft/ModuleMirror.cs
+Mono.Debugger.Soft/AppDomainMirror.cs
+Mono.Debugger.Soft/AssemblyLoadEvent.cs
+Mono.Debugger.Soft/VMStartEvent.cs
+Mono.Debugger.Soft/StackFrame.cs
+Mono.Debugger.Soft/CustomAttributeDataMirror.cs
+Mono.Debugger.Soft/ThreadStartEvent.cs
+Mono.Debugger.Soft/ILInstruction.cs
+Mono.Debugger.Soft/PrimitiveValue.cs
+Mono.Debugger.Soft/VMDisconnectedException.cs
+Mono.Debugger.Soft/Mirror.cs
+Mono.Debugger.Soft/EnumMirror.cs
+Mono.Debugger.Soft/FieldInfoMirror.cs
+Mono.Debugger.Soft/TypeMirror.cs
+Mono.Debugger.Soft/CustomAttributeNamedArgumentMirror.cs
+Mono.Debugger.Soft/DataConverter.cs
+Mono.Debugger.Soft/AssemblyMirror.cs
+Mono.Debugger.Soft/VirtualMachine.cs
+Mono.Debugger.Soft/VMMismatchException.cs
+Mono.Debugger.Soft/AppDomainUnloadEvent.cs
+Mono.Debugger.Soft/ExceptionEventRequest.cs
+Mono.Debugger.Soft/EventType.cs
+Mono.Debugger.Soft/StructMirror.cs
+Mono.Debugger.Soft/InvocationException.cs
+Mono.Debugger.Soft/IMirror.cs
+Mono.Debugger.Soft/VMDeathEvent.cs
+Mono.Debugger.Soft/MethodBodyMirror.cs
+Mono.Debugger.Soft/MethodEntryEvent.cs
+Mono.Debugger.Soft/MethodMirror.cs
+Mono.Debugger.Soft/BreakpointEventRequest.cs
+Mono.Debugger.Soft/MethodEntryEventRequest.cs
+Mono.Debugger.Soft/LocalVariable.cs
+Mono.Debugger.Soft/ParameterInfoMirror.cs
+Mono.Debugger.Soft/Event.cs
+Mono.Debugger.Soft/AppDomainCreateEvent.cs
+Mono.Debugger.Soft/ThreadDeathEvent.cs
+Mono.Debugger.Soft/SuspendPolicy.cs
+Mono.Debugger.Soft/VirtualMachineManager.cs
+Mono.Debugger.Soft/MethodExitEvent.cs
+Mono.Debugger.Soft/MethodExitEventRequest.cs
+Mono.Debugger.Soft/EventQueueImpl.cs
+Mono.Debugger.Soft/ObjectMirror.cs
+Mono.Debugger.Soft/Value.cs
+Mono.Debugger.Soft/StepEvent.cs
+Mono.Debugger.Soft/Location.cs
+Mono.Debugger.Soft/ObjectCollectedException.cs
+Mono.Debugger.Soft/EventRequest.cs
+Mono.Debugger.Soft/InvalidStackFrameException.cs
+Mono.Debugger.Soft/BreakpointEvent.cs
+Mono.Debugger.Soft/StringMirror.cs
+Mono.Debugger.Soft/PropertyInfoMirror.cs
+Mono.Debugger.Soft/ArrayMirror.cs
+Mono.Debugger.Soft/StepEventRequest.cs
+Mono.Debugger.Soft/Connection.cs
+Mono.Debugger.Soft/ThreadMirror.cs
+Mono.Debugger.Soft/TypeLoadEvent.cs
+Mono.Debugger.Soft/VMDisconnectEvent.cs
+Mono.Debugger.Soft/InvokeOptions.cs
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/AppDomainCreateEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainCreateEvent.cs
index 7700f51109f..ae2a3e9cf01 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/AppDomainCreateEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainCreateEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class AppDomainCreateEvent : Event {
AppDomainMirror domain;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/AppDomainMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainMirror.cs
index 73314dab5e7..0066d37ccf4 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/AppDomainMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainMirror.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class AppDomainMirror : Mirror
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/AppDomainUnloadEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainUnloadEvent.cs
index 4109df4ca00..e2ad5a94d91 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/AppDomainUnloadEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AppDomainUnloadEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class AppDomainUnloadEvent : Event {
AppDomainMirror domain;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ArrayMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ArrayMirror.cs
index f0901618108..c58b2f0192c 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ArrayMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ArrayMirror.cs
@@ -2,7 +2,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class ArrayMirror : ObjectMirror, IEnumerable {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/AssemblyLoadEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEvent.cs
index 9ea7ea4a754..df9c69128f9 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/AssemblyLoadEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class AssemblyLoadEvent : Event {
AssemblyMirror assembly;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/AssemblyMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs
index 1323ad91ce6..986fb34028f 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/AssemblyMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyMirror.cs
@@ -3,7 +3,7 @@ using System.Reflection;
using Mono.Debugger;
using Mono.Cecil;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class AssemblyMirror : Mirror
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/BreakpointEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEvent.cs
index 02731ebba71..cd52f7e9f17 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/BreakpointEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class BreakpointEvent : Event {
MethodMirror method;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/BreakpointEventRequest.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEventRequest.cs
index 8021c8d0c19..cb9485116d7 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/BreakpointEventRequest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/BreakpointEventRequest.cs
@@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public sealed class BreakpointEventRequest : EventRequest {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ChangeLog b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog
index ea04efdc5ed..ea04efdc5ed 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ChangeLog
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
index 36b47a88d31..0446ff8ad45 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/Connection.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Text;
using Mono.Cecil.Metadata;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
class VersionInfo {
public string VMVersion {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/CustomAttributeDataMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeDataMirror.cs
index 9c514dd2eca..69f039be63a 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/CustomAttributeDataMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeDataMirror.cs
@@ -6,7 +6,7 @@ using System.Reflection;
using System.Text;
using Mono.Cecil.Metadata;
-namespace Mono.Debugger {
+namespace Mono.Debugger.Soft {
public sealed class CustomAttributeDataMirror {
MethodMirror ctorInfo;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/CustomAttributeNamedArgumentMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeNamedArgumentMirror.cs
index 430aa9c74c5..0f904499d76 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/CustomAttributeNamedArgumentMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeNamedArgumentMirror.cs
@@ -2,7 +2,7 @@ using System;
using System.Runtime.InteropServices;
using System.Reflection;
-namespace Mono.Debugger {
+namespace Mono.Debugger.Soft {
public struct CustomAttributeNamedArgumentMirror {
CustomAttributeTypedArgumentMirror arg;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/CustomAttributeTypedArgumentMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeTypedArgumentMirror.cs
index 177bb13d279..8096d20ed25 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/CustomAttributeTypedArgumentMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/CustomAttributeTypedArgumentMirror.cs
@@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
using System.Collections.ObjectModel;
using System.Reflection;
-namespace Mono.Debugger {
+namespace Mono.Debugger.Soft {
public struct CustomAttributeTypedArgumentMirror {
Type type;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/DataConverter.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/DataConverter.cs
index d0bf0476f60..d0bf0476f60 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/DataConverter.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/DataConverter.cs
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/EnumMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EnumMirror.cs
index 9b0c166d535..973eb72e6af 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/EnumMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EnumMirror.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
/*
* Represents an enum value in the debuggee
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/Event.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Event.cs
index 5b66bc68859..6a09dea218e 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/Event.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Event.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public abstract class Event {
protected VirtualMachine vm;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/EventQueueImpl.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventQueueImpl.cs
index 04ec7b56ef5..08826fefa5e 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/EventQueueImpl.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventQueueImpl.cs
@@ -8,7 +8,7 @@ using Mono.Debugger;
using Mono.Debugger.Requests;
using Mono.Debugger.Events;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
class EventQueueImpl : MirrorImpl, EventQueue
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/EventRequest.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs
index 93384a0af2c..69f35f4c0ac 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/EventRequest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs
@@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public abstract class EventRequest {
protected int id;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/EventType.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventType.cs
index fac206013e5..3ddd0ac85d5 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/EventType.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventType.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
// Keep it in sync with debugger-agent.h
public enum EventType {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ExceptionEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEvent.cs
index dda7eddd7a6..4b2c6067104 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ExceptionEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class ExceptionEvent : Event {
ObjectMirror exc;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ExceptionEventRequest.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs
index af849e18aac..4242d4067f4 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ExceptionEventRequest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public sealed class ExceptionEventRequest : EventRequest {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/FieldInfoMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/FieldInfoMirror.cs
index 62a90b11224..c0e444d75ce 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/FieldInfoMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/FieldInfoMirror.cs
@@ -5,7 +5,7 @@ using System.Reflection;
using C = Mono.Cecil;
using Mono.Cecil.Metadata;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class FieldInfoMirror : Mirror {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ILInstruction.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInstruction.cs
index 6efbfe6a570..6c2c7d14df2 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ILInstruction.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInstruction.cs
@@ -6,7 +6,7 @@ using Mono.Cecil.Metadata;
using System.IO;
using System.Reflection;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
/*
* This is similar to the Instruction class in Cecil, we can't use that
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/IMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/IMirror.cs
index 02d059fcc56..61c364e75fe 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/IMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/IMirror.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
/*
* A Mirror represents a runtime object in the remote virtual machine. Calling
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/InvalidStackFrameException.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvalidStackFrameException.cs
index c31c245bbd3..751df406548 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/InvalidStackFrameException.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvalidStackFrameException.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class InvalidStackFrameException : Exception {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/InvocationException.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvocationException.cs
index a3900b0a157..d8ae2e621e5 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/InvocationException.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvocationException.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class InvocationException : Exception {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/InvokeOptions.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs
index 8ea79fa5fc3..bc064795083 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/InvokeOptions.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
[Flags]
public enum InvokeOptions {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/LocalVariable.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/LocalVariable.cs
index 7f9a7df7664..6003ae2c8e8 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/LocalVariable.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/LocalVariable.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class LocalVariable : Mirror {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/Location.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Location.cs
index 60f919b5b26..e08d5c85943 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/Location.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Location.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class Location : Mirror
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodBodyMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodBodyMirror.cs
index 21af150a81c..77cd5d51ec9 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodBodyMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodBodyMirror.cs
@@ -6,7 +6,7 @@ using Mono.Cecil.Metadata;
using System.IO;
using System.Reflection;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class MethodBodyMirror : Mirror
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodEntryEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEvent.cs
index 6f6f465f1fb..d21f60c8d4f 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodEntryEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class MethodEntryEvent : Event {
MethodMirror method;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodEntryEventRequest.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEventRequest.cs
index ddef33bbb17..e54cb730b2d 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodEntryEventRequest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodEntryEventRequest.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public sealed class MethodEntryEventRequest : EventRequest {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodExitEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEvent.cs
index 785958d94b7..55cd4b76062 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodExitEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class MethodExitEvent : Event {
MethodMirror method;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodExitEventRequest.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEventRequest.cs
index 9b577e589ea..be89dcdf65f 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodExitEventRequest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodExitEventRequest.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public sealed class MethodExitEventRequest : EventRequest {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs
index 2b1c7d64121..71d3ba3365a 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/MethodMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs
@@ -5,7 +5,7 @@ using System.Reflection;
using C = Mono.Cecil;
using Mono.Cecil.Metadata;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class MethodMirror : Mirror
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/Mirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Mirror.cs
index 114f30d3c71..699706ceb24 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/Mirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Mirror.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public abstract class Mirror : IMirror
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ModuleMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs
index df5bfd5bcab..fb944360250 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ModuleMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ModuleMirror.cs
@@ -2,7 +2,7 @@ using System;
using Mono.Debugger;
using Mono.Cecil;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class ModuleMirror : Mirror
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ObjectCollectedException.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectCollectedException.cs
index 7218cc7e291..f89177c9728 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ObjectCollectedException.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectCollectedException.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class ObjectCollectedException : Exception {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ObjectMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
index e3292522927..e6e25fd8c0f 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ObjectMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Runtime.Remoting.Messaging;
using System.Threading;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class ObjectMirror : Value {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ParameterInfoMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ParameterInfoMirror.cs
index 4067028c5ae..32fb621d700 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ParameterInfoMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ParameterInfoMirror.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text;
using System.Reflection;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class ParameterInfoMirror : Mirror {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/PrimitiveValue.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs
index 726387d2df7..1c6c60a0e67 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/PrimitiveValue.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
/*
* Represents a value of a primitive type in the debuggee
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/PropertyInfoMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PropertyInfoMirror.cs
index bf1a52ccb92..c97ebbc8ced 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/PropertyInfoMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PropertyInfoMirror.cs
@@ -5,7 +5,7 @@ using System.Reflection;
using C = Mono.Cecil;
using Mono.Cecil.Metadata;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class PropertyInfoMirror : Mirror {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/StackFrame.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs
index 2a8623c5006..b3e6509fe8d 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/StackFrame.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StackFrame.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class StackFrame : Mirror
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/StepEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEvent.cs
index 43ba7d3b343..5fe3c8b05ef 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/StepEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class StepEvent : Event {
MethodMirror method;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/StepEventRequest.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs
index d15dd9313e3..e33486e80f1 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/StepEventRequest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public enum StepDepth {
Into = 0,
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/StringMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StringMirror.cs
index a93f17d80ce..30cc9a43c30 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/StringMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StringMirror.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class StringMirror : ObjectMirror {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/StructMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
index 1b8ea13a149..922eb8bc89b 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/StructMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
/*
* Represents a valuetype value in the debuggee
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/SuspendPolicy.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/SuspendPolicy.cs
index b962ccf903e..b490ee7e486 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/SuspendPolicy.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/SuspendPolicy.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
// Keep it in sync with debugger-agent.h
public enum SuspendPolicy {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ThreadDeathEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadDeathEvent.cs
index 227909200dc..cf2c8cae91f 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ThreadDeathEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadDeathEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class ThreadDeathEvent : Event {
internal ThreadDeathEvent (VirtualMachine vm, int req_id, long id) : base (EventType.ThreadDeath, vm, req_id, id) {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ThreadMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
index a693c1a1875..65e0c0f62ac 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ThreadMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs
@@ -1,7 +1,7 @@
using System;
using System.Threading;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class ThreadMirror : ObjectMirror
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ThreadStartEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadStartEvent.cs
index 13dd17b2b60..92a1cef2092 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/ThreadStartEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadStartEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class ThreadStartEvent : Event {
internal ThreadStartEvent (VirtualMachine vm, int req_id, long id) : base (EventType.ThreadStart, vm, req_id, id) {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/TypeLoadEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEvent.cs
index 00ed052948d..cd2886f883f 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/TypeLoadEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeLoadEvent.cs
@@ -1,5 +1,5 @@
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class TypeLoadEvent : Event {
TypeMirror type;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/TypeMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
index ea7522989d5..3cf1ba5cbe2 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/TypeMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
@@ -4,7 +4,7 @@ using System.Reflection;
using C = Mono.Cecil;
using Mono.Cecil.Metadata;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
/*
* Represents a type in the remote virtual machine.
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMDeathEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDeathEvent.cs
index 4a2826276e6..18eeb92ca74 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMDeathEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDeathEvent.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class VMDeathEvent : Event
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMDisconnectEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectEvent.cs
index c7101e9d491..7157fa20bd0 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMDisconnectEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectEvent.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class VMDisconnectEvent : Event
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMDisconnectedException.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectedException.cs
index 913e0282cce..d26b1be202f 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMDisconnectedException.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMDisconnectedException.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class VMDisconnectedException : Exception {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMMismatchException.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMMismatchException.cs
index 6d24f4f02ab..2d3fd814f19 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMMismatchException.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMMismatchException.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class VMMismatchException : Exception
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMStartEvent.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMStartEvent.cs
index 01125f78641..f6948286d27 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VMStartEvent.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VMStartEvent.cs
@@ -1,6 +1,6 @@
using System;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class VMStartEvent : Event
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/Value.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Value.cs
index a1e61849bb8..67e187b0c7f 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/Value.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Value.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public abstract class Value : Mirror {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VirtualMachine.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
index e1a6ab77176..933e02b3b98 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VirtualMachine.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
@@ -7,7 +7,7 @@ using System.Collections;
using System.Collections.Generic;
using Mono.Cecil.Metadata;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class VirtualMachine : Mirror
{
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VirtualMachineManager.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
index 7ec5b1dcc23..932963473e6 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger/VirtualMachineManager.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachineManager.cs
@@ -6,7 +6,7 @@ using System.Net;
using System.Net.Sockets;
using System.Runtime.Remoting.Messaging;
-namespace Mono.Debugger
+namespace Mono.Debugger.Soft
{
public class LaunchOptions {
public string AgentArgs {
diff --git a/mcs/class/RabbitMQ.Client/ChangeLog b/mcs/class/RabbitMQ.Client/ChangeLog
index 388999ca688..38b25b8f6b5 100644
--- a/mcs/class/RabbitMQ.Client/ChangeLog
+++ b/mcs/class/RabbitMQ.Client/ChangeLog
@@ -1,3 +1,12 @@
+2009-12-23 Jo Shields <directhex@apebox.org>
+
+ * docs/specs/Makefile: Use compiled Mono, not system Mono (fixes
+ broken build on systems without Mono already installed)
+
+2009-12-19 Michael Barker <mike@middlesoft.co.uk>
+
+ * Added stripped xml to avoid licensing issues.
+
2009-08-31 Michael Barker <mike@middlesoft.co.uk>
* Updated to version 1.6 of the RabbitMQ libraries
@@ -8,8 +17,8 @@
2009-05-25 Michael Barker <mike@middlesoft.co.uk>
- * Removed amqp spec files and modified generated code to fix licensing
- issues.
+ * Removed amqp spec files and modified generated code to fix licensing
+ issues.
2009-05-21 Michael Barker <mike@middlesoft.co.uk>
diff --git a/mcs/class/RabbitMQ.Client/Makefile b/mcs/class/RabbitMQ.Client/Makefile
index 590100a12b9..5dfe98dca27 100644
--- a/mcs/class/RabbitMQ.Client/Makefile
+++ b/mcs/class/RabbitMQ.Client/Makefile
@@ -1,12 +1,9 @@
thisdir = class/RabbitMQ.Client
-#SUBDIRS = src/bootstrap src/apigen docs/specs src/client
-SUBDIRS = src/client
+SUBDIRS = src/apigen docs/specs src/client
+#SUBDIRS = src/client
include ../../build/rules.make
DISTFILES = \
- docs/specs/autogenerated-api-0-8.cs \
- docs/specs/autogenerated-api-0-9.cs \
- docs/specs/autogenerated-api-qpid-0-8.cs \
src/util/DebugUtil.cs \
src/util/NetworkBinaryReader.cs \
src/util/NetworkBinaryWriter.cs \
@@ -14,7 +11,17 @@ DISTFILES = \
src/util/Semaphore.cs \
src/util/Either.cs \
src/util/SharedQueue.cs \
- src/util/XmlUtil.cs
+ src/util/XmlUtil.cs \
+ src/apigen/AmqpClass.cs \
+ src/apigen/AmqpEntity.cs \
+ src/apigen/AmqpField.cs \
+ src/apigen/AmqpMethod.cs \
+ src/apigen/Apigen.cs \
+ src/apigen/Makefile \
+ docs/specs/amqp0-8.stripped.xml \
+ docs/specs/amqp0-9.stripped.xml \
+ docs/specs/qpid-amqp.0-8.stripped.xml \
+ docs/specs/Makefile
all-local install-local clean-local test-local run-test-local run-test-ondotnet-local uninstall-local doc-update-local:
diff --git a/mcs/class/RabbitMQ.Client/Makefile.orig b/mcs/class/RabbitMQ.Client/Makefile.orig
index 84182ff9fce..e69de29bb2d 100644
--- a/mcs/class/RabbitMQ.Client/Makefile.orig
+++ b/mcs/class/RabbitMQ.Client/Makefile.orig
@@ -1,64 +0,0 @@
-NAME=rabbitmq-dotnet-client
-NAME_VSN=${NAME}-${RABBIT_VSN}
-
-RELEASE_DIR=releases/${NAME}/v${RABBIT_VSN}
-
-STAGE_RELEASE_DIR=charlotte:/home/rabbitmq/stage-extras/releases/${NAME}
-LIVE_RELEASE_DIR=charlotte:/home/rabbitmq/live-extras/releases/${NAME}
-
-RSYNC_CMD=rsync -irvl --delete-after
-
-TMPXMLZIP=${NAME_VSN}-tmp-xmldoc.zip
-
-ifeq "$(RABBIT_VSN)" ""
-rabbit-vsn:
- @echo "RABBIT_VSN is not set"
- @false
-else
-rabbit-vsn:
-endif
-
-deploy-stage: rabbit-vsn ensure-deliverables
- ${RSYNC_CMD} --exclude=${TMPXMLZIP} releases/${NAME}/ ${STAGE_RELEASE_DIR}
-
-deploy-live: rabbit-vsn ensure-deliverables
- ${RSYNC_CMD} --exclude=${TMPXMLZIP} releases/${NAME}/ ${LIVE_RELEASE_DIR}
-
-ensure-deliverables: rabbit-vsn
- file ${RELEASE_DIR}/${NAME_VSN}.zip
- file ${RELEASE_DIR}/${NAME_VSN}-api-guide.pdf
- file ${RELEASE_DIR}/${NAME_VSN}-user-guide.pdf
- file ${RELEASE_DIR}/${NAME_VSN}-wcf-service-model.pdf
- file ${RELEASE_DIR}/${NAME_VSN}-net-2.0.zip
- file ${RELEASE_DIR}/${NAME_VSN}-net-2.0-htmldoc.zip
- file ${RELEASE_DIR}/${NAME_VSN}-net-2.0-htmldoc
- file ${RELEASE_DIR}/${NAME_VSN}-net-3.0-wcf.zip
- file ${RELEASE_DIR}/${NAME_VSN}-net-3.0-wcf-htmldoc.zip
- file ${RELEASE_DIR}/${NAME_VSN}-net-3.0-wcf-htmldoc
-
-ensure-prerequisites: rabbit-vsn
- dpkg -p htmldoc plotutils transfig graphviz > /dev/null
-
-ensure-release-dir: rabbit-vsn
- touch ${RELEASE_DIR}/
-
-ensure-docs: rabbit-vsn
- file ${RELEASE_DIR}/${NAME_VSN}-net-2.0-htmldoc.zip
- file ${RELEASE_DIR}/${TMPXMLZIP}
-
-doc: rabbit-vsn ensure-prerequisites ensure-release-dir ensure-docs
- rm -rf build/tmpdoc build/doc
- mkdir -p build/tmpdoc/html build/tmpdoc/xml
- unzip -j ${RELEASE_DIR}/${NAME_VSN}-net-2.0-htmldoc.zip -d build/tmpdoc/html
- unzip -j ${RELEASE_DIR}/${NAME_VSN}-tmp-xmldoc.zip -d build/tmpdoc/xml
- cd docs && ./api-guide.sh && \
- mv api-guide.pdf ../${RELEASE_DIR}/${NAME_VSN}-api-guide.pdf
- $(MAKE) -C docs
- mv build/doc/userguide/user-guide.pdf ${RELEASE_DIR}/${NAME_VSN}-user-guide.pdf
- cp docs/"RabbitMQ Service Model.pdf" \
- ${RELEASE_DIR}/${NAME_VSN}-wcf-service-model.pdf
- cd ${RELEASE_DIR} && \
- rm -rf ${NAME_VSN}-net-2.0-htmldoc && \
- unzip ${NAME_VSN}-net-2.0-htmldoc.zip && \
- rm -rf unzip ${NAME_VSN}-net-3.0-wcf-htmldoc && \
- unzip ${NAME_VSN}-net-3.0-wcf-htmldoc.zip
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/Makefile b/mcs/class/RabbitMQ.Client/docs/specs/Makefile
index db16399db06..a3b552cc16f 100644
--- a/mcs/class/RabbitMQ.Client/docs/specs/Makefile
+++ b/mcs/class/RabbitMQ.Client/docs/specs/Makefile
@@ -7,29 +7,20 @@ 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" $^ $@
+autogenerated-api-0-9.cs: amqp0-9.stripped.xml
+ MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) ../../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" $^ $@
+autogenerated-api-0-8.cs: amqp0-8.stripped.xml
+ MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) ../../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" $^ $@
+autogenerated-api-qpid-0-8.cs: qpid-amqp.0-8.stripped.xml
+ MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) ../../src/apigen/RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $^ $@
install-local:
clean-local:
rm -f ../../src/apigen/apigen-bootstrap.dll
- rm autogenerated-api*.cs
+ rm -f autogenerated-api*.cs
test-local:
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/amqp0-8.stripped.xml b/mcs/class/RabbitMQ.Client/docs/specs/amqp0-8.stripped.xml
new file mode 100644
index 00000000000..d1fd2c0e5af
--- /dev/null
+++ b/mcs/class/RabbitMQ.Client/docs/specs/amqp0-8.stripped.xml
@@ -0,0 +1,771 @@
+<?xml version="1.0"?>
+<!--
+Copyright (c) 2009 AMQP Working Group.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<amqp major="8" minor="0" port="5672">
+ <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"/>
+ <constant name="not delivered" value="310" class="soft error"/>
+ <constant name="content too large" value="311" class="soft error"/>
+ <constant name="connection forced" value="320" class="hard error"/>
+ <constant name="invalid path" value="402" class="hard error"/>
+ <constant name="access refused" value="403" class="soft error"/>
+ <constant name="not found" value="404" class="soft error"/>
+ <constant name="resource locked" value="405" class="soft error"/>
+ <constant name="frame error" value="501" class="hard error"/>
+ <constant name="syntax error" value="502" class="hard error"/>
+ <constant name="command invalid" value="503" class="hard error"/>
+ <constant name="channel error" value="504" class="hard error"/>
+ <constant name="resource error" value="506" class="hard error"/>
+ <constant name="not allowed" value="530" class="hard error"/>
+ <constant name="not implemented" value="540" class="hard error"/>
+ <constant name="internal error" value="541" class="hard error"/>
+ <domain name="access ticket" type="short">
+ <assert check="ne" value="0"/>
+ </domain>
+ <domain name="class id" type="short"/>
+ <domain name="consumer tag" type="shortstr"/>
+ <domain name="delivery tag" type="longlong"/>
+ <domain name="exchange name" type="shortstr">
+ <assert check="length" value="127"/>
+ </domain>
+ <domain name="known hosts" type="shortstr"/>
+ <domain name="method id" type="short"/>
+ <domain name="no ack" type="bit"/>
+ <domain name="no local" type="bit"/>
+ <domain name="path" type="shortstr">
+ <assert check="notnull"/>
+ <assert check="syntax" rule="path"/>
+ <assert check="length" value="127"/>
+ </domain>
+ <domain name="peer properties" type="table"/>
+ <domain name="queue name" type="shortstr">
+ <assert check="length" value="127"/>
+ </domain>
+ <domain name="redelivered" type="bit"/>
+ <domain name="reply code" type="short">
+ <assert check="notnull"/>
+ </domain>
+ <domain name="reply text" type="shortstr">
+ <assert check="notnull"/>
+ </domain>
+ <class name="connection" handler="connection" index="10">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="start" synchronous="1" index="10">
+ <chassis name="client" implement="MUST"/>
+ <response name="start-ok"/>
+ <field name="version major" type="octet"/>
+ <field name="version minor" type="octet"/>
+ <field name="server properties" domain="peer properties"/>
+ <field name="mechanisms" type="longstr">
+ <see name="security mechanisms"/>
+ <assert check="notnull"/>
+ </field>
+ <field name="locales" type="longstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="start-ok" synchronous="1" index="11">
+ <chassis name="server" implement="MUST"/>
+ <field name="client properties" domain="peer properties"/>
+ <field name="mechanism" type="shortstr">
+ <assert check="notnull"/>
+ </field>
+ <field name="response" type="longstr">
+ <assert check="notnull"/>
+ </field>
+ <field name="locale" type="shortstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="secure" synchronous="1" index="20">
+ <chassis name="client" implement="MUST"/>
+ <response name="secure-ok"/>
+ <field name="challenge" type="longstr">
+ <see name="security mechanisms"/>
+ </field>
+ </method>
+ <method name="secure-ok" synchronous="1" index="21">
+ <chassis name="server" implement="MUST"/>
+ <field name="response" type="longstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="tune" synchronous="1" index="30">
+ <chassis name="client" implement="MUST"/>
+ <response name="tune-ok"/>
+ <field name="channel max" type="short"/>
+ <field name="frame max" type="long"/>
+ <field name="heartbeat" type="short"/>
+ </method>
+ <method name="tune-ok" synchronous="1" index="31">
+ <chassis name="server" implement="MUST"/>
+ <field name="channel max" type="short">
+ <assert check="notnull"/>
+ <assert check="le" method="tune" field="channel max"/>
+ </field>
+ <field name="frame max" type="long"/>
+ <field name="heartbeat" type="short"/>
+ </method>
+ <method name="open" synchronous="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <response name="open-ok"/>
+ <response name="redirect"/>
+ <field name="virtual host" domain="path">
+ <assert check="regexp" value="^[a-zA-Z0-9/-_]+$"/>
+ </field>
+ <field name="capabilities" type="shortstr"/>
+ <field name="insist" type="bit"/>
+ </method>
+ <method name="open-ok" synchronous="1" index="41">
+ <chassis name="client" implement="MUST"/>
+ <field name="known hosts" domain="known hosts"/>
+ </method>
+ <method name="redirect" synchronous="1" index="50">
+ <chassis name="client" implement="MAY"/>
+ <field name="host" type="shortstr">
+ <assert check="notnull"/>
+ </field>
+ <field name="known hosts" domain="known hosts"/>
+ </method>
+ <method name="close" synchronous="1" index="60">
+ <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"/>
+ <field name="method id" domain="class id"/>
+ </method>
+ <method name="close-ok" synchronous="1" index="61">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ </method>
+ </class>
+ <class name="channel" handler="channel" index="20">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="open" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="open-ok"/>
+ <field name="out of band" type="shortstr">
+ <assert check="null"/>
+ </field>
+ </method>
+ <method name="open-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="flow" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <response name="flow-ok"/>
+ <field name="active" type="bit"/>
+ </method>
+ <method name="flow-ok" index="21">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <field name="active" type="bit"/>
+ </method>
+ <method name="alert" index="30">
+ <chassis name="client" implement="MUST"/>
+ <field name="reply code" domain="reply code"/>
+ <field name="reply text" domain="reply text"/>
+ <field name="details" type="table"/>
+ </method>
+ <method name="close" synchronous="1" index="40">
+ <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"/>
+ <field name="method id" domain="method id"/>
+ </method>
+ <method name="close-ok" synchronous="1" index="41">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ </method>
+ </class>
+ <class name="access" handler="connection" index="30">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="request" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="request-ok"/>
+ <field name="realm" domain="path"/>
+ <field name="exclusive" type="bit"/>
+ <field name="passive" type="bit"/>
+ <field name="active" type="bit"/>
+ <field name="write" type="bit"/>
+ <field name="read" type="bit"/>
+ </method>
+ <method name="request-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ <field name="ticket" domain="access ticket"/>
+ </method>
+ </class>
+ <class name="exchange" handler="channel" index="40">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="declare" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="declare-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="exchange" domain="exchange name">
+ <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
+ </field>
+ <field name="type" type="shortstr">
+ <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
+ </field>
+ <field name="passive" type="bit"/>
+ <field name="durable" type="bit"/>
+ <field name="auto delete" type="bit"/>
+ <field name="internal" type="bit"/>
+ <field name="nowait" type="bit"/>
+ <field name="arguments" type="table"/>
+ </method>
+ <method name="declare-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="delete" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="delete-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="exchange" domain="exchange name">
+ <assert check="notnull"/>
+ </field>
+ <field name="if unused" type="bit"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="delete-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ </class>
+ <class name="queue" handler="channel" index="50">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="declare" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="declare-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name">
+ <assert check="regexp" value="^[a-zA-Z0-9-_.:]*$"/>
+ </field>
+ <field name="passive" type="bit"/>
+ <field name="durable" type="bit"/>
+ <field name="exclusive" type="bit"/>
+ <field name="auto delete" type="bit"/>
+ <field name="nowait" type="bit"/>
+ <field name="arguments" type="table"/>
+ </method>
+ <method name="declare-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ <field name="queue" domain="queue name">
+ <assert check="notnull"/>
+ </field>
+ <field name="message count" type="long"/>
+ <field name="consumer count" type="long"/>
+ </method>
+ <method name="bind" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="bind-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="nowait" type="bit"/>
+ <field name="arguments" type="table"/>
+ </method>
+ <method name="bind-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="unbind" synchronous="1" index="50">
+ <chassis name="server" implement="MUST"/>
+ <response name="unbind-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" domain="shortstr"/>
+ <field name="arguments" domain="table"/>
+ </method>
+ <method name="unbind-ok" synchronous="1" index="51">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="purge" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="purge-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="purge-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="message count" type="long"/>
+ </method>
+ <method name="delete" synchronous="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <response name="delete-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="if unused" type="bit"/>
+ <field name="if empty" type="bit">
+ <test/>
+ </field>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="delete-ok" synchronous="1" index="41">
+ <chassis name="client" implement="MUST"/>
+ <field name="message count" type="long"/>
+ </method>
+ </class>
+ <class name="basic" handler="channel" index="60">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="content type" type="shortstr"/>
+ <field name="content encoding" type="shortstr"/>
+ <field name="headers" type="table"/>
+ <field name="delivery mode" type="octet"/>
+ <field name="priority" type="octet"/>
+ <field name="correlation id" type="shortstr"/>
+ <field name="reply to" type="shortstr"/>
+ <field name="expiration" type="shortstr"/>
+ <field name="message id" type="shortstr"/>
+ <field name="timestamp" type="timestamp"/>
+ <field name="type" type="shortstr"/>
+ <field name="user id" type="shortstr"/>
+ <field name="app id" type="shortstr"/>
+ <field name="cluster id" type="shortstr"/>
+ <method name="qos" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="qos-ok"/>
+ <field name="prefetch size" type="long"/>
+ <field name="prefetch count" type="short"/>
+ <field name="global" type="bit"/>
+ </method>
+ <method name="qos-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="consume" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="consume-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="no local" domain="no local"/>
+ <field name="no ack" domain="no ack"/>
+ <field name="exclusive" type="bit"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="consume-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="cancel" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="cancel-ok"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="cancel-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="publish" content="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="mandatory" type="bit"/>
+ <field name="immediate" type="bit"/>
+ </method>
+ <method name="return" content="1" index="50">
+ <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"/>
+ <field name="routing key" type="shortstr"/>
+ </method>
+ <method name="deliver" content="1" index="60">
+ <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"/>
+ <field name="routing key" type="shortstr"/>
+ </method>
+ <method name="get" synchronous="1" index="70">
+ <response name="get-ok"/>
+ <response name="get-empty"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="no ack" domain="no ack"/>
+ </method>
+ <method name="get-ok" synchronous="1" content="1" index="71">
+ <chassis name="client" implement="MAY"/>
+ <field name="delivery tag" domain="delivery tag"/>
+ <field name="redelivered" domain="redelivered"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="message count" type="long"/>
+ </method>
+ <method name="get-empty" synchronous="1" index="72">
+ <chassis name="client" implement="MAY"/>
+ <field name="cluster id" type="shortstr"/>
+ </method>
+ <method name="ack" index="80">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery tag" domain="delivery tag"/>
+ <field name="multiple" type="bit"/>
+ </method>
+ <method name="reject" index="90">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery tag" domain="delivery tag"/>
+ <field name="requeue" type="bit"/>
+ </method>
+ <method name="recover" index="100">
+ <chassis name="server" implement="MUST"/>
+ <field name="requeue" type="bit"/>
+ </method>
+ </class>
+ <class name="file" handler="channel" index="70">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="content type" type="shortstr"/>
+ <field name="content encoding" type="shortstr"/>
+ <field name="headers" type="table"/>
+ <field name="priority" type="octet"/>
+ <field name="reply to" type="shortstr"/>
+ <field name="message id" type="shortstr"/>
+ <field name="filename" type="shortstr"/>
+ <field name="timestamp" type="timestamp"/>
+ <field name="cluster id" type="shortstr"/>
+ <method name="qos" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="qos-ok"/>
+ <field name="prefetch size" type="long"/>
+ <field name="prefetch count" type="short"/>
+ <field name="global" type="bit"/>
+ </method>
+ <method name="qos-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="consume" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="consume-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="no local" domain="no local"/>
+ <field name="no ack" domain="no ack"/>
+ <field name="exclusive" type="bit"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="consume-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="cancel" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="cancel-ok"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="cancel-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="open" synchronous="1" index="40">
+ <response name="open-ok"/>
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <field name="identifier" type="shortstr"/>
+ <field name="content size" type="longlong"/>
+ </method>
+ <method name="open-ok" synchronous="1" index="41">
+ <response name="stage"/>
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <field name="staged size" type="longlong"/>
+ </method>
+ <method name="stage" content="1" index="50">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="publish" index="60">
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="mandatory" type="bit"/>
+ <field name="immediate" type="bit"/>
+ <field name="identifier" type="shortstr"/>
+ </method>
+ <method name="return" content="1" index="70">
+ <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"/>
+ <field name="routing key" type="shortstr"/>
+ </method>
+ <method name="deliver" index="80">
+ <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"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="identifier" type="shortstr"/>
+ </method>
+ <method name="ack" index="90">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery tag" domain="delivery tag"/>
+ <field name="multiple" type="bit"/>
+ </method>
+ <method name="reject" index="100">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery tag" domain="delivery tag"/>
+ <field name="requeue" type="bit"/>
+ </method>
+ </class>
+ <class name="stream" handler="channel" index="80">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="content type" type="shortstr"/>
+ <field name="content encoding" type="shortstr"/>
+ <field name="headers" type="table"/>
+ <field name="priority" type="octet"/>
+ <field name="timestamp" type="timestamp"/>
+ <method name="qos" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="qos-ok"/>
+ <field name="prefetch size" type="long"/>
+ <field name="prefetch count" type="short"/>
+ <field name="consume rate" type="long"/>
+ <field name="global" type="bit"/>
+ </method>
+ <method name="qos-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="consume" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="consume-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="no local" domain="no local"/>
+ <field name="exclusive" type="bit"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="consume-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="cancel" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="cancel-ok"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="cancel-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="publish" content="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="mandatory" type="bit"/>
+ <field name="immediate" type="bit"/>
+ </method>
+ <method name="return" content="1" index="50">
+ <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"/>
+ <field name="routing key" type="shortstr"/>
+ </method>
+ <method name="deliver" content="1" index="60">
+ <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"/>
+ <field name="queue" domain="queue name">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ </class>
+ <class name="tx" handler="channel" index="90">
+ <chassis name="server" implement="SHOULD"/>
+ <chassis name="client" implement="MAY"/>
+ <method name="select" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="select-ok"/>
+ </method>
+ <method name="select-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="commit" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="commit-ok"/>
+ </method>
+ <method name="commit-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="rollback" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="rollback-ok"/>
+ </method>
+ <method name="rollback-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ </class>
+ <class name="dtx" handler="channel" index="100">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <method name="select" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="select-ok"/>
+ </method>
+ <method name="select-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="start" synchronous="1" index="20">
+ <chassis name="server" implement="MAY"/>
+ <response name="start-ok"/>
+ <field name="dtx identifier" type="shortstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="start-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ </class>
+ <class name="tunnel" handler="tunnel" index="110">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="headers" type="table"/>
+ <field name="proxy name" type="shortstr"/>
+ <field name="data name" type="shortstr"/>
+ <field name="durable" type="octet"/>
+ <field name="broadcast" type="octet"/>
+ <method name="request" content="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <field name="meta data" type="table"/>
+ </method>
+ </class>
+ <class name="test" handler="channel" index="120">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="SHOULD"/>
+ <method name="integer" synchronous="1" index="10">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <response name="integer-ok"/>
+ <field name="integer 1" type="octet"/>
+ <field name="integer 2" type="short"/>
+ <field name="integer 3" type="long"/>
+ <field name="integer 4" type="longlong"/>
+ <field name="operation" type="octet">
+ <assert check="enum">
+ <value name="add"/>
+ <value name="min"/>
+ <value name="max"/>
+ </assert>
+ </field>
+ </method>
+ <method name="integer-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="result" type="longlong"/>
+ </method>
+ <method name="string" synchronous="1" index="20">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <response name="string-ok"/>
+ <field name="string 1" type="shortstr"/>
+ <field name="string 2" type="longstr"/>
+ <field name="operation" type="octet">
+ <assert check="enum">
+ <value name="add"/>
+ <value name="min"/>
+ <value name="max"/>
+ </assert>
+ </field>
+ </method>
+ <method name="string-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="result" type="longstr"/>
+ </method>
+ <method name="table" synchronous="1" index="30">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <response name="table-ok"/>
+ <field name="table" type="table"/>
+ <field name="integer op" type="octet">
+ <assert check="enum">
+ <value name="add"/>
+ <value name="min"/>
+ <value name="max"/>
+ </assert>
+ </field>
+ <field name="string op" type="octet">
+ <assert check="enum">
+ <value name="add"/>
+ <value name="min"/>
+ <value name="max"/>
+ </assert>
+ </field>
+ </method>
+ <method name="table-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="integer result" type="longlong"/>
+ <field name="string result" type="longstr"/>
+ </method>
+ <method name="content" synchronous="1" content="1" index="40">
+ <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">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="content checksum" type="long"/>
+ </method>
+ </class>
+</amqp>
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/amqp0-9.stripped.xml b/mcs/class/RabbitMQ.Client/docs/specs/amqp0-9.stripped.xml
new file mode 100644
index 00000000000..5233332b68d
--- /dev/null
+++ b/mcs/class/RabbitMQ.Client/docs/specs/amqp0-9.stripped.xml
@@ -0,0 +1,844 @@
+<?xml version="1.0"?>
+<!--
+Copyright (c) 2009 AMQP Working Group.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<amqp major="0" minor="9" port="5672">
+ <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"/>
+ <constant name="not-delivered" value="310" class="soft-error"/>
+ <constant name="content-too-large" value="311" class="soft-error"/>
+ <constant name="no-route" value="312" class="soft-error"/>
+ <constant name="no-consumers" value="313" class="soft-error"/>
+ <constant name="connection-forced" value="320" class="hard-error"/>
+ <constant name="invalid-path" value="402" class="hard-error"/>
+ <constant name="access-refused" value="403" class="soft-error"/>
+ <constant name="not-found" value="404" class="soft-error"/>
+ <constant name="resource-locked" value="405" class="soft-error"/>
+ <constant name="precondition-failed" value="406" class="soft-error"/>
+ <constant name="frame-error" value="501" class="hard-error"/>
+ <constant name="syntax-error" value="502" class="hard-error"/>
+ <constant name="command-invalid" value="503" class="hard-error"/>
+ <constant name="channel-error" value="504" class="hard-error"/>
+ <constant name="resource-error" value="506" class="hard-error"/>
+ <constant name="not-allowed" value="530" class="hard-error"/>
+ <constant name="not-implemented" value="540" class="hard-error"/>
+ <constant name="internal-error" value="541" class="hard-error"/>
+ <domain name="access-ticket" type="short">
+ <assert check="ne" value="0"/>
+ </domain>
+ <domain name="class-id" type="short"/>
+ <domain name="consumer-tag" type="shortstr"/>
+ <domain name="delivery-tag" type="longlong"/>
+ <domain name="exchange-name" type="shortstr">
+ <assert check="length" value="127"/>
+ </domain>
+ <domain name="known-hosts" type="shortstr"/>
+ <domain name="method-id" type="short"/>
+ <domain name="no-ack" type="bit"/>
+ <domain name="no-local" type="bit"/>
+ <domain name="path" type="shortstr">
+ <assert check="notnull"/>
+ <assert check="syntax" rule="path"/>
+ <assert check="length" value="127"/>
+ </domain>
+ <domain name="peer-properties" type="table"/>
+ <domain name="queue-name" type="shortstr">
+ <assert check="length" value="127"/>
+ </domain>
+ <domain name="redelivered" type="bit"/>
+ <domain name="reply-code" type="short">
+ <assert check="notnull"/>
+ </domain>
+ <domain name="reply-text" type="shortstr">
+ <assert check="notnull"/>
+ </domain>
+ <domain name="channel-id" type="longstr"/>
+ <domain name="duration" type="longlong"/>
+ <domain name="offset" type="longlong"/>
+ <domain name="reference" type="longstr"/>
+ <domain name="destination" type="shortstr"/>
+ <domain name="reject-code" type="short"/>
+ <domain name="reject-text" type="shortstr"/>
+ <domain name="security-token" type="longstr"/>
+ <domain name="bit" type="bit"/>
+ <domain name="octet" type="octet"/>
+ <domain name="short" type="short"/>
+ <domain name="long" type="long"/>
+ <domain name="longlong" type="longlong"/>
+ <domain name="shortstr" type="shortstr"/>
+ <domain name="longstr" type="longstr"/>
+ <domain name="timestamp" type="timestamp"/>
+ <domain name="table" type="table"/>
+ <class name="connection" handler="connection" index="10">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="start" synchronous="1" index="10">
+ <chassis name="client" implement="MUST"/>
+ <response name="start-ok"/>
+ <field name="version-major" domain="octet"/>
+ <field name="version-minor" domain="octet"/>
+ <field name="server-properties" domain="peer-properties"/>
+ <field name="mechanisms" domain="longstr">
+ <assert check="notnull"/>
+ </field>
+ <field name="locales" domain="longstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="start-ok" synchronous="1" index="11">
+ <chassis name="server" implement="MUST"/>
+ <field name="client-properties" domain="peer-properties"/>
+ <field name="mechanism" domain="shortstr">
+ <assert check="notnull"/>
+ </field>
+ <field name="response" domain="longstr">
+ <assert check="notnull"/>
+ </field>
+ <field name="locale" domain="shortstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="secure" synchronous="1" index="20">
+ <chassis name="client" implement="MUST"/>
+ <response name="secure-ok"/>
+ <field name="challenge" domain="longstr"/>
+ </method>
+ <method name="secure-ok" synchronous="1" index="21">
+ <chassis name="server" implement="MUST"/>
+ <field name="response" domain="longstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="tune" synchronous="1" index="30">
+ <chassis name="client" implement="MUST"/>
+ <response name="tune-ok"/>
+ <field name="channel-max" domain="short"/>
+ <field name="frame-max" domain="long"/>
+ <field name="heartbeat" domain="short"/>
+ </method>
+ <method name="tune-ok" synchronous="1" index="31">
+ <chassis name="server" implement="MUST"/>
+ <field name="channel-max" domain="short">
+ <assert check="notnull"/>
+ <assert check="le" method="tune" field="channel-max"/>
+ </field>
+ <field name="frame-max" domain="long"/>
+ <field name="heartbeat" domain="short"/>
+ </method>
+ <method name="open" synchronous="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <response name="open-ok"/>
+ <response name="redirect"/>
+ <field name="virtual-host" domain="path">
+ <assert check="regexp" value="^[a-zA-Z0-9/-_]+$"/>
+ </field>
+ <field name="capabilities" domain="shortstr"/>
+ <field name="insist" domain="bit"/>
+ </method>
+ <method name="open-ok" synchronous="1" index="41">
+ <chassis name="client" implement="MUST"/>
+ <field name="known-hosts" domain="known-hosts"/>
+ </method>
+ <method name="redirect" synchronous="1" index="42">
+ <chassis name="client" implement="MUST"/>
+ <field name="host" domain="shortstr">
+ <assert check="notnull"/>
+ </field>
+ <field name="known-hosts" domain="known-hosts"/>
+ </method>
+ <method name="close" synchronous="1" index="50">
+ <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"/>
+ <field name="method-id" domain="method-id"/>
+ </method>
+ <method name="close-ok" synchronous="1" index="51">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ </method>
+ </class>
+ <class name="channel" handler="channel" index="20">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="open" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="open-ok"/>
+ <field name="out-of-band" domain="shortstr">
+ <assert check="null"/>
+ </field>
+ </method>
+ <method name="open-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ <field name="channel-id" domain="channel-id"/>
+ </method>
+ <method name="flow" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <response name="flow-ok"/>
+ <field name="active" domain="bit"/>
+ </method>
+ <method name="flow-ok" index="21">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <field name="active" domain="bit"/>
+ </method>
+ <method name="close" synchronous="1" index="40">
+ <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"/>
+ <field name="method-id" domain="method-id"/>
+ </method>
+ <method name="close-ok" synchronous="1" index="41">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ </method>
+ <method name="resume" index="50">
+ <response name="ok"/>
+ <chassis name="server" implement="MAY"/>
+ <field name="channel-id" domain="channel-id"/>
+ </method>
+ <method name="ping" index="60">
+ <response name="ok"/>
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="pong" index="70">
+ <response name="ok"/>
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="ok" index="80">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ </method>
+ </class>
+ <class name="access" handler="connection" index="30">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="request" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="request-ok"/>
+ <field name="realm" domain="shortstr"/>
+ <field name="exclusive" domain="bit"/>
+ <field name="passive" domain="bit"/>
+ <field name="active" domain="bit"/>
+ <field name="write" domain="bit"/>
+ <field name="read" domain="bit"/>
+ </method>
+ <method name="request-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ <field name="ticket" domain="access-ticket"/>
+ </method>
+ </class>
+ <class name="exchange" handler="channel" index="40">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="declare" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="declare-ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="exchange" domain="exchange-name">
+ <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
+ </field>
+ <field name="type" domain="shortstr">
+ <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
+ </field>
+ <field name="passive" domain="bit"/>
+ <field name="durable" domain="bit"/>
+ <field name="auto-delete" domain="bit"/>
+ <field name="internal" domain="bit"/>
+ <field name="nowait" domain="bit"/>
+ <field name="arguments" domain="table"/>
+ </method>
+ <method name="declare-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="delete" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="delete-ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="exchange" domain="exchange-name">
+ <assert check="notnull"/>
+ </field>
+ <field name="if-unused" domain="bit"/>
+ <field name="nowait" domain="bit"/>
+ </method>
+ <method name="delete-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ </class>
+ <class name="queue" handler="channel" index="50">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="declare" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="declare-ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name">
+ <assert check="regexp" value="^[a-zA-Z0-9-_.:]*$"/>
+ </field>
+ <field name="passive" domain="bit"/>
+ <field name="durable" domain="bit"/>
+ <field name="exclusive" domain="bit"/>
+ <field name="auto-delete" domain="bit"/>
+ <field name="nowait" domain="bit"/>
+ <field name="arguments" domain="table"/>
+ </method>
+ <method name="declare-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ <field name="queue" domain="queue-name">
+ <assert check="notnull"/>
+ </field>
+ <field name="message-count" domain="long"/>
+ <field name="consumer-count" domain="long"/>
+ </method>
+ <method name="bind" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="bind-ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name"/>
+ <field name="exchange" domain="exchange-name"/>
+ <field name="routing-key" domain="shortstr"/>
+ <field name="nowait" domain="bit"/>
+ <field name="arguments" domain="table"/>
+ </method>
+ <method name="bind-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="unbind" synchronous="1" index="50">
+ <chassis name="server" implement="MUST"/>
+ <response name="unbind-ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name"/>
+ <field name="exchange" domain="exchange-name"/>
+ <field name="routing-key" domain="shortstr"/>
+ <field name="arguments" domain="table"/>
+ </method>
+ <method name="unbind-ok" synchronous="1" index="51">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="purge" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="purge-ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name"/>
+ <field name="nowait" domain="bit"/>
+ </method>
+ <method name="purge-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="message-count" domain="long"/>
+ </method>
+ <method name="delete" synchronous="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <response name="delete-ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name"/>
+ <field name="if-unused" domain="bit"/>
+ <field name="if-empty" domain="bit"/>
+ <field name="nowait" domain="bit"/>
+ </method>
+ <method name="delete-ok" synchronous="1" index="41">
+ <chassis name="client" implement="MUST"/>
+ <field name="message-count" domain="long"/>
+ </method>
+ </class>
+ <class name="basic" handler="channel" index="60">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="content-type" domain="shortstr"/>
+ <field name="content-encoding" domain="shortstr"/>
+ <field name="headers" domain="table"/>
+ <field name="delivery-mode" domain="octet"/>
+ <field name="priority" domain="octet"/>
+ <field name="correlation-id" domain="shortstr"/>
+ <field name="reply-to" domain="shortstr"/>
+ <field name="expiration" domain="shortstr"/>
+ <field name="message-id" domain="shortstr"/>
+ <field name="timestamp" domain="timestamp"/>
+ <field name="type" domain="shortstr"/>
+ <field name="user-id" domain="shortstr"/>
+ <field name="app-id" domain="shortstr"/>
+ <field name="cluster-id" domain="shortstr"/>
+ <method name="qos" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="qos-ok"/>
+ <field name="prefetch-size" domain="long"/>
+ <field name="prefetch-count" domain="short"/>
+ <field name="global" domain="bit"/>
+ </method>
+ <method name="qos-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="consume" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="consume-ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ <field name="no-local" domain="no-local"/>
+ <field name="no-ack" domain="no-ack"/>
+ <field name="exclusive" domain="bit"/>
+ <field name="nowait" domain="bit"/>
+ <field name="filter" domain="table"/>
+ </method>
+ <method name="consume-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ </method>
+ <method name="cancel" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="cancel-ok"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ <field name="nowait" domain="bit"/>
+ </method>
+ <method name="cancel-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ </method>
+ <method name="publish" content="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="exchange" domain="exchange-name"/>
+ <field name="routing-key" domain="shortstr"/>
+ <field name="mandatory" domain="bit"/>
+ <field name="immediate" domain="bit"/>
+ </method>
+ <method name="return" content="1" index="50">
+ <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"/>
+ <field name="routing-key" domain="shortstr"/>
+ </method>
+ <method name="deliver" content="1" index="60">
+ <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"/>
+ <field name="routing-key" domain="shortstr"/>
+ </method>
+ <method name="get" synchronous="1" index="70">
+ <response name="get-ok"/>
+ <response name="get-empty"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name"/>
+ <field name="no-ack" domain="no-ack"/>
+ </method>
+ <method name="get-ok" synchronous="1" content="1" index="71">
+ <chassis name="client" implement="MAY"/>
+ <field name="delivery-tag" domain="delivery-tag"/>
+ <field name="redelivered" domain="redelivered"/>
+ <field name="exchange" domain="exchange-name"/>
+ <field name="routing-key" domain="shortstr"/>
+ <field name="message-count" domain="long"/>
+ </method>
+ <method name="get-empty" synchronous="1" index="72">
+ <chassis name="client" implement="MAY"/>
+ <field name="cluster-id" domain="shortstr"/>
+ </method>
+ <method name="ack" index="80">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery-tag" domain="delivery-tag"/>
+ <field name="multiple" domain="bit"/>
+ </method>
+ <method name="reject" index="90">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery-tag" domain="delivery-tag"/>
+ <field name="requeue" domain="bit"/>
+ </method>
+ <method name="recover" index="100">
+ <chassis name="server" implement="MUST"/>
+ <field name="requeue" domain="bit"/>
+ </method>
+ </class>
+ <class name="file" handler="channel" index="70">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="content-type" domain="shortstr"/>
+ <field name="content-encoding" domain="shortstr"/>
+ <field name="headers" domain="table"/>
+ <field name="priority" domain="octet"/>
+ <field name="reply-to" domain="shortstr"/>
+ <field name="message-id" domain="shortstr"/>
+ <field name="filename" domain="shortstr"/>
+ <field name="timestamp" domain="timestamp"/>
+ <field name="cluster-id" domain="shortstr"/>
+ <method name="qos" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="qos-ok"/>
+ <field name="prefetch-size" domain="long"/>
+ <field name="prefetch-count" domain="short"/>
+ <field name="global" domain="bit"/>
+ </method>
+ <method name="qos-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="consume" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="consume-ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ <field name="no-local" domain="no-local"/>
+ <field name="no-ack" domain="no-ack"/>
+ <field name="exclusive" domain="bit"/>
+ <field name="nowait" domain="bit"/>
+ <field name="filter" domain="table"/>
+ </method>
+ <method name="consume-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ </method>
+ <method name="cancel" synchronous="1" index="30">
+ <response name="cancel-ok"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ <field name="nowait" domain="bit"/>
+ </method>
+ <method name="cancel-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ </method>
+ <method name="open" synchronous="1" index="40">
+ <response name="open-ok"/>
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <field name="identifier" domain="shortstr"/>
+ <field name="content-size" domain="longlong"/>
+ </method>
+ <method name="open-ok" synchronous="1" index="41">
+ <response name="stage"/>
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <field name="staged-size" domain="longlong"/>
+ </method>
+ <method name="stage" content="1" index="50">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="publish" index="60">
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="exchange" domain="exchange-name"/>
+ <field name="routing-key" domain="shortstr"/>
+ <field name="mandatory" domain="bit"/>
+ <field name="immediate" domain="bit"/>
+ <field name="identifier" domain="shortstr"/>
+ </method>
+ <method name="return" content="1" index="70">
+ <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"/>
+ <field name="routing-key" domain="shortstr"/>
+ </method>
+ <method name="deliver" index="80">
+ <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"/>
+ <field name="routing-key" domain="shortstr"/>
+ <field name="identifier" domain="shortstr"/>
+ </method>
+ <method name="ack" index="90">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery-tag" domain="delivery-tag"/>
+ <field name="multiple" domain="bit"/>
+ </method>
+ <method name="reject" index="100">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery-tag" domain="delivery-tag"/>
+ <field name="requeue" domain="bit"/>
+ </method>
+ </class>
+ <class name="stream" handler="channel" index="80">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="content-type" domain="shortstr"/>
+ <field name="content-encoding" domain="shortstr"/>
+ <field name="headers" domain="table"/>
+ <field name="priority" domain="octet"/>
+ <field name="timestamp" domain="timestamp"/>
+ <method name="qos" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="qos-ok"/>
+ <field name="prefetch-size" domain="long"/>
+ <field name="prefetch-count" domain="short"/>
+ <field name="consume-rate" domain="long"/>
+ <field name="global" domain="bit"/>
+ </method>
+ <method name="qos-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="consume" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="consume-ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ <field name="no-local" domain="no-local"/>
+ <field name="exclusive" domain="bit"/>
+ <field name="nowait" domain="bit"/>
+ <field name="filter" domain="table"/>
+ </method>
+ <method name="consume-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ </method>
+ <method name="cancel" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="cancel-ok"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ <field name="nowait" domain="bit"/>
+ </method>
+ <method name="cancel-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer-tag" domain="consumer-tag"/>
+ </method>
+ <method name="publish" content="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="exchange" domain="exchange-name"/>
+ <field name="routing-key" domain="shortstr"/>
+ <field name="mandatory" domain="bit"/>
+ <field name="immediate" domain="bit"/>
+ </method>
+ <method name="return" content="1" index="50">
+ <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"/>
+ <field name="routing-key" domain="shortstr"/>
+ </method>
+ <method name="deliver" content="1" index="60">
+ <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"/>
+ <field name="queue" domain="queue-name">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ </class>
+ <class name="tx" handler="channel" index="90">
+ <chassis name="server" implement="SHOULD"/>
+ <chassis name="client" implement="MAY"/>
+ <method name="select" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="select-ok"/>
+ </method>
+ <method name="select-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="commit" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="commit-ok"/>
+ </method>
+ <method name="commit-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="rollback" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="rollback-ok"/>
+ </method>
+ <method name="rollback-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ </class>
+ <class name="dtx" handler="channel" index="100">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <method name="select" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="select-ok"/>
+ </method>
+ <method name="select-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="start" synchronous="1" index="20">
+ <chassis name="server" implement="MAY"/>
+ <response name="start-ok"/>
+ <field name="dtx-identifier" domain="shortstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="start-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ </class>
+ <class name="tunnel" handler="tunnel" index="110">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="headers" domain="table"/>
+ <field name="proxy-name" domain="shortstr"/>
+ <field name="data-name" domain="shortstr"/>
+ <field name="durable" domain="octet"/>
+ <field name="broadcast" domain="octet"/>
+ <method name="request" content="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <field name="meta-data" domain="table"/>
+ </method>
+ </class>
+ <class name="message" index="120" handler="channel">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="transfer" index="10">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <response name="ok"/>
+ <response name="reject"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="destination" domain="destination"/>
+ <field name="redelivered" domain="redelivered"/>
+ <field name="immediate" domain="bit"/>
+ <field name="ttl" domain="duration"/>
+ <field name="priority" domain="octet"/>
+ <field name="timestamp" domain="timestamp"/>
+ <field name="delivery-mode" domain="octet"/>
+ <field name="expiration" domain="timestamp"/>
+ <field name="exchange" domain="exchange-name"/>
+ <field name="routing-key" domain="shortstr"/>
+ <field name="message-id" domain="shortstr"/>
+ <field name="correlation-id" domain="shortstr"/>
+ <field name="reply-to" domain="shortstr"/>
+ <field name="content-type" domain="shortstr"/>
+ <field name="content-encoding" domain="shortstr"/>
+ <field name="user-id" domain="shortstr"/>
+ <field name="app-id" domain="shortstr"/>
+ <field name="transaction-id" domain="shortstr"/>
+ <field name="security-token" domain="security-token"/>
+ <field name="application-headers" domain="table"/>
+ <field name="body" domain="content"/>
+ </method>
+ <method name="consume" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="ok"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name"/>
+ <field name="destination" domain="destination"/>
+ <field name="no-local" domain="no-local"/>
+ <field name="no-ack" domain="no-ack"/>
+ <field name="exclusive" domain="bit"/>
+ <field name="filter" domain="table"/>
+ </method>
+ <method name="cancel" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="ok"/>
+ <field name="destination" domain="destination"/>
+ </method>
+ <method name="get" index="40">
+ <response name="ok"/>
+ <response name="empty"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access-ticket"/>
+ <field name="queue" domain="queue-name"/>
+ <field name="destination" domain="destination"/>
+ <field name="no-ack" domain="no-ack"/>
+ </method>
+ <method name="recover" index="50">
+ <chassis name="server" implement="MUST"/>
+ <response name="ok"/>
+ <field name="requeue" domain="bit"/>
+ </method>
+ <method name="open" index="60">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <response name="ok"/>
+ <field name="reference" domain="reference"/>
+ </method>
+ <method name="close" index="70">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <response name="ok"/>
+ <field name="reference" domain="reference"/>
+ </method>
+ <method name="append" index="80">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <response name="ok"/>
+ <field name="reference" domain="reference"/>
+ <field name="bytes" domain="longstr"/>
+ </method>
+ <method name="checkpoint" index="90">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <response name="ok"/>
+ <field name="reference" domain="reference"/>
+ <field name="identifier" domain="shortstr"/>
+ </method>
+ <method name="resume" index="100">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <response name="offset"/>
+ <field name="reference" domain="reference"/>
+ <field name="identifier" domain="shortstr"/>
+ </method>
+ <method name="qos" index="110">
+ <chassis name="server" implement="MUST"/>
+ <response name="ok"/>
+ <field name="prefetch-size" domain="long"/>
+ <field name="prefetch-count" domain="short"/>
+ <field name="global" domain="bit"/>
+ </method>
+ <method name="ok" index="500">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="empty" index="510">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="reject" index="520">
+ <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">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <field name="value" domain="offset"/>
+ </method>
+ </class>
+</amqp>
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-8.cs b/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-8.cs
deleted file mode 100644
index ebd113f5e4b..00000000000
--- a/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-8.cs
+++ /dev/null
@@ -1,6336 +0,0 @@
-// Autogenerated code. Do not edit.
-
-using RabbitMQ.Client;
-using RabbitMQ.Client.Exceptions;
-
-namespace RabbitMQ.Client.Framing.v0_8 {
- public class Protocol: RabbitMQ.Client.Framing.Impl.v0_8.ProtocolBase {
- ///<summary>Protocol major version (= 8)</summary>
- public override int MajorVersion { get { return 8; } }
- ///<summary>Protocol minor version (= 0)</summary>
- public override int MinorVersion { get { return 0; } }
- ///<summary>Protocol API name (= AMQP_0_8)</summary>
- public override string ApiName { get { return "AMQP_0_8"; } }
- ///<summary>Default TCP port (= 5672)</summary>
- public override int DefaultPort { get { return 5672; } }
-
- public override RabbitMQ.Client.Impl.MethodBase DecodeMethodFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
- ushort classId = reader.ReadUInt16();
- ushort methodId = reader.ReadUInt16();
-
- switch (classId) {
- case 10: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionStart result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionStart();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionStartOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionStartOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionSecure result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionSecure();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionSecureOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionSecureOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionTune result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionTune();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionTuneOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionTuneOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionOpen result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionOpen();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionOpenOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionRedirect result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionRedirect();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionClose result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionClose();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 61: {
- RabbitMQ.Client.Framing.Impl.v0_8.ConnectionCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ConnectionCloseOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 20: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.ChannelOpen result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelOpen();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.ChannelOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelOpenOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8.ChannelFlow result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelFlow();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8.ChannelFlowOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelFlowOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8.ChannelAlert result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelAlert();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8.ChannelClose result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelClose();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_8.ChannelCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ChannelCloseOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 30: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.AccessRequest result = new RabbitMQ.Client.Framing.Impl.v0_8.AccessRequest();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.AccessRequestOk result = new RabbitMQ.Client.Framing.Impl.v0_8.AccessRequestOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 40: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeclare result = new RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeclare();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeclareOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDelete result = new RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDelete();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_8.ExchangeDeleteOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 50: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.QueueDeclare result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueDeclare();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.QueueDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueDeclareOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8.QueueBind result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueBind();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8.QueueBindOk result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueBindOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_8.QueueUnbind result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueUnbind();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 51: {
- RabbitMQ.Client.Framing.Impl.v0_8.QueueUnbindOk result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueUnbindOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8.QueuePurge result = new RabbitMQ.Client.Framing.Impl.v0_8.QueuePurge();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8.QueuePurgeOk result = new RabbitMQ.Client.Framing.Impl.v0_8.QueuePurgeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8.QueueDelete result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueDelete();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_8.QueueDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_8.QueueDeleteOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 60: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicQos result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicQos();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicQosOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicConsume result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicConsume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicConsumeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicCancel result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicCancel();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicCancelOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicPublish result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicPublish();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicReturn result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicReturn();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicDeliver();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 70: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicGet result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicGet();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 71: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicGetOk result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicGetOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 72: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicGetEmpty result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicGetEmpty();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 80: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicAck result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicAck();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 90: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicReject result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicReject();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 100: {
- RabbitMQ.Client.Framing.Impl.v0_8.BasicRecover result = new RabbitMQ.Client.Framing.Impl.v0_8.BasicRecover();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 70: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileQos result = new RabbitMQ.Client.Framing.Impl.v0_8.FileQos();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8.FileQosOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileConsume result = new RabbitMQ.Client.Framing.Impl.v0_8.FileConsume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8.FileConsumeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileCancel result = new RabbitMQ.Client.Framing.Impl.v0_8.FileCancel();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8.FileCancelOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileOpen result = new RabbitMQ.Client.Framing.Impl.v0_8.FileOpen();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8.FileOpenOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileStage result = new RabbitMQ.Client.Framing.Impl.v0_8.FileStage();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_8.FilePublish result = new RabbitMQ.Client.Framing.Impl.v0_8.FilePublish();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 70: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileReturn result = new RabbitMQ.Client.Framing.Impl.v0_8.FileReturn();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 80: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8.FileDeliver();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 90: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileAck result = new RabbitMQ.Client.Framing.Impl.v0_8.FileAck();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 100: {
- RabbitMQ.Client.Framing.Impl.v0_8.FileReject result = new RabbitMQ.Client.Framing.Impl.v0_8.FileReject();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 80: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.StreamQos result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamQos();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.StreamQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamQosOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8.StreamConsume result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamConsume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8.StreamConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamConsumeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8.StreamCancel result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamCancel();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8.StreamCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamCancelOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8.StreamPublish result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamPublish();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_8.StreamReturn result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamReturn();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_8.StreamDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8.StreamDeliver();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 90: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.TxSelect result = new RabbitMQ.Client.Framing.Impl.v0_8.TxSelect();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.TxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TxSelectOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8.TxCommit result = new RabbitMQ.Client.Framing.Impl.v0_8.TxCommit();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8.TxCommitOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TxCommitOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8.TxRollback result = new RabbitMQ.Client.Framing.Impl.v0_8.TxRollback();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8.TxRollbackOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TxRollbackOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 100: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.DtxSelect result = new RabbitMQ.Client.Framing.Impl.v0_8.DtxSelect();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.DtxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_8.DtxSelectOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8.DtxStart result = new RabbitMQ.Client.Framing.Impl.v0_8.DtxStart();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8.DtxStartOk result = new RabbitMQ.Client.Framing.Impl.v0_8.DtxStartOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 110: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.TunnelRequest result = new RabbitMQ.Client.Framing.Impl.v0_8.TunnelRequest();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 120: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8.TestInteger result = new RabbitMQ.Client.Framing.Impl.v0_8.TestInteger();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8.TestIntegerOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TestIntegerOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8.TestString result = new RabbitMQ.Client.Framing.Impl.v0_8.TestString();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8.TestStringOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TestStringOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8.TestTable result = new RabbitMQ.Client.Framing.Impl.v0_8.TestTable();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8.TestTableOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TestTableOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8.TestContent result = new RabbitMQ.Client.Framing.Impl.v0_8.TestContent();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_8.TestContentOk result = new RabbitMQ.Client.Framing.Impl.v0_8.TestContentOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- default: break;
- }
- throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, methodId);
- }
-
- public override RabbitMQ.Client.Impl.ContentHeaderBase DecodeContentHeaderFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
- ushort classId = reader.ReadUInt16();
-
- switch (classId) {
- case 60: return new BasicProperties();
- case 70: return new FileProperties();
- case 80: return new StreamProperties();
- case 110: return new TunnelProperties();
- case 120: return new TestProperties();
- default: break;
- }
- throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, 0);
- }
- }
- public class Constants {
- ///<summary>(= 1)</summary>
- public const int FrameMethod = 1;
- ///<summary>(= 2)</summary>
- public const int FrameHeader = 2;
- ///<summary>(= 3)</summary>
- public const int FrameBody = 3;
- ///<summary>(= 4)</summary>
- public const int FrameOobMethod = 4;
- ///<summary>(= 5)</summary>
- public const int FrameOobHeader = 5;
- ///<summary>(= 6)</summary>
- public const int FrameOobBody = 6;
- ///<summary>(= 7)</summary>
- public const int FrameTrace = 7;
- ///<summary>(= 8)</summary>
- public const int FrameHeartbeat = 8;
- ///<summary>(= 4096)</summary>
- public const int FrameMinSize = 4096;
- ///<summary>(= 206)</summary>
- public const int FrameEnd = 206;
- ///<summary>(= 200)</summary>
- public const int ReplySuccess = 200;
- ///<summary>(= 310)</summary>
- public const int NotDelivered = 310;
- ///<summary>(= 311)</summary>
- public const int ContentTooLarge = 311;
- ///<summary>(= 320)</summary>
- public const int ConnectionForced = 320;
- ///<summary>(= 402)</summary>
- public const int InvalidPath = 402;
- ///<summary>(= 403)</summary>
- public const int AccessRefused = 403;
- ///<summary>(= 404)</summary>
- public const int NotFound = 404;
- ///<summary>(= 405)</summary>
- public const int ResourceLocked = 405;
- ///<summary>(= 501)</summary>
- public const int FrameError = 501;
- ///<summary>(= 502)</summary>
- public const int SyntaxError = 502;
- ///<summary>(= 503)</summary>
- public const int CommandInvalid = 503;
- ///<summary>(= 504)</summary>
- public const int ChannelError = 504;
- ///<summary>(= 506)</summary>
- public const int ResourceError = 506;
- ///<summary>(= 530)</summary>
- public const int NotAllowed = 530;
- ///<summary>(= 540)</summary>
- public const int NotImplemented = 540;
- ///<summary>(= 541)</summary>
- public const int InternalError = 541;
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.start".</summary>
- public interface IConnectionStart: IMethod {
- byte VersionMajor { get; }
- byte VersionMinor { get; }
- System.Collections.IDictionary ServerProperties { get; }
- byte[] Mechanisms { get; }
- byte[] Locales { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.start-ok".</summary>
- public interface IConnectionStartOk: IMethod {
- System.Collections.IDictionary ClientProperties { get; }
- string Mechanism { get; }
- byte[] Response { get; }
- string Locale { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.secure".</summary>
- public interface IConnectionSecure: IMethod {
- byte[] Challenge { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.secure-ok".</summary>
- public interface IConnectionSecureOk: IMethod {
- byte[] Response { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.tune".</summary>
- public interface IConnectionTune: IMethod {
- ushort ChannelMax { get; }
- uint FrameMax { get; }
- ushort Heartbeat { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.tune-ok".</summary>
- public interface IConnectionTuneOk: IMethod {
- ushort ChannelMax { get; }
- uint FrameMax { get; }
- ushort Heartbeat { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.open".</summary>
- public interface IConnectionOpen: IMethod {
- string VirtualHost { get; }
- string Capabilities { get; }
- bool Insist { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.open-ok".</summary>
- public interface IConnectionOpenOk: IMethod {
- string KnownHosts { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.redirect".</summary>
- public interface IConnectionRedirect: IMethod {
- string Host { get; }
- string KnownHosts { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.close".</summary>
- public interface IConnectionClose: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- ushort ClassId { get; }
- ushort MethodId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.close-ok".</summary>
- public interface IConnectionCloseOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.open".</summary>
- public interface IChannelOpen: IMethod {
- string OutOfBand { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.open-ok".</summary>
- public interface IChannelOpenOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.flow".</summary>
- public interface IChannelFlow: IMethod {
- bool Active { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.flow-ok".</summary>
- public interface IChannelFlowOk: IMethod {
- bool Active { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.alert".</summary>
- public interface IChannelAlert: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- System.Collections.IDictionary Details { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.close".</summary>
- public interface IChannelClose: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- ushort ClassId { get; }
- ushort MethodId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.close-ok".</summary>
- public interface IChannelCloseOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "access.request".</summary>
- public interface IAccessRequest: IMethod {
- string Realm { get; }
- bool Exclusive { get; }
- bool Passive { get; }
- bool Active { get; }
- bool Write { get; }
- bool Read { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "access.request-ok".</summary>
- public interface IAccessRequestOk: IMethod {
- ushort Ticket { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.declare".</summary>
- public interface IExchangeDeclare: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string Type { get; }
- bool Passive { get; }
- bool Durable { get; }
- bool AutoDelete { get; }
- bool Internal { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.declare-ok".</summary>
- public interface IExchangeDeclareOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.delete".</summary>
- public interface IExchangeDelete: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- bool IfUnused { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.delete-ok".</summary>
- public interface IExchangeDeleteOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.declare".</summary>
- public interface IQueueDeclare: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool Passive { get; }
- bool Durable { get; }
- bool Exclusive { get; }
- bool AutoDelete { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.declare-ok".</summary>
- public interface IQueueDeclareOk: IMethod {
- string Queue { get; }
- uint MessageCount { get; }
- uint ConsumerCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.bind".</summary>
- public interface IQueueBind: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.bind-ok".</summary>
- public interface IQueueBindOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.unbind".</summary>
- public interface IQueueUnbind: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.unbind-ok".</summary>
- public interface IQueueUnbindOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.purge".</summary>
- public interface IQueuePurge: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.purge-ok".</summary>
- public interface IQueuePurgeOk: IMethod {
- uint MessageCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.delete".</summary>
- public interface IQueueDelete: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool IfUnused { get; }
- bool IfEmpty { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.delete-ok".</summary>
- public interface IQueueDeleteOk: IMethod {
- uint MessageCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.qos".</summary>
- public interface IBasicQos: IMethod {
- uint PrefetchSize { get; }
- ushort PrefetchCount { get; }
- bool Global { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.qos-ok".</summary>
- public interface IBasicQosOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.consume".</summary>
- public interface IBasicConsume: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string ConsumerTag { get; }
- bool NoLocal { get; }
- bool NoAck { get; }
- bool Exclusive { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.consume-ok".</summary>
- public interface IBasicConsumeOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.cancel".</summary>
- public interface IBasicCancel: IMethod {
- string ConsumerTag { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.cancel-ok".</summary>
- public interface IBasicCancelOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.publish".</summary>
- public interface IBasicPublish: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Mandatory { get; }
- bool Immediate { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.return".</summary>
- public interface IBasicReturn: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.deliver".</summary>
- public interface IBasicDeliver: IMethod {
- string ConsumerTag { get; }
- ulong DeliveryTag { get; }
- bool Redelivered { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.get".</summary>
- public interface IBasicGet: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool NoAck { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.get-ok".</summary>
- public interface IBasicGetOk: IMethod {
- ulong DeliveryTag { get; }
- bool Redelivered { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- uint MessageCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.get-empty".</summary>
- public interface IBasicGetEmpty: IMethod {
- string ClusterId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.ack".</summary>
- public interface IBasicAck: IMethod {
- ulong DeliveryTag { get; }
- bool Multiple { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.reject".</summary>
- public interface IBasicReject: IMethod {
- ulong DeliveryTag { get; }
- bool Requeue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.recover".</summary>
- public interface IBasicRecover: IMethod {
- bool Requeue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.qos".</summary>
- public interface IFileQos: IMethod {
- uint PrefetchSize { get; }
- ushort PrefetchCount { get; }
- bool Global { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.qos-ok".</summary>
- public interface IFileQosOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "file.consume".</summary>
- public interface IFileConsume: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string ConsumerTag { get; }
- bool NoLocal { get; }
- bool NoAck { get; }
- bool Exclusive { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.consume-ok".</summary>
- public interface IFileConsumeOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.cancel".</summary>
- public interface IFileCancel: IMethod {
- string ConsumerTag { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.cancel-ok".</summary>
- public interface IFileCancelOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.open".</summary>
- public interface IFileOpen: IMethod {
- string Identifier { get; }
- ulong ContentSize { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.open-ok".</summary>
- public interface IFileOpenOk: IMethod {
- ulong StagedSize { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.stage".</summary>
- public interface IFileStage: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "file.publish".</summary>
- public interface IFilePublish: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Mandatory { get; }
- bool Immediate { get; }
- string Identifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.return".</summary>
- public interface IFileReturn: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.deliver".</summary>
- public interface IFileDeliver: IMethod {
- string ConsumerTag { get; }
- ulong DeliveryTag { get; }
- bool Redelivered { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- string Identifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.ack".</summary>
- public interface IFileAck: IMethod {
- ulong DeliveryTag { get; }
- bool Multiple { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.reject".</summary>
- public interface IFileReject: IMethod {
- ulong DeliveryTag { get; }
- bool Requeue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.qos".</summary>
- public interface IStreamQos: IMethod {
- uint PrefetchSize { get; }
- ushort PrefetchCount { get; }
- uint ConsumeRate { get; }
- bool Global { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.qos-ok".</summary>
- public interface IStreamQosOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.consume".</summary>
- public interface IStreamConsume: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string ConsumerTag { get; }
- bool NoLocal { get; }
- bool Exclusive { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.consume-ok".</summary>
- public interface IStreamConsumeOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.cancel".</summary>
- public interface IStreamCancel: IMethod {
- string ConsumerTag { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.cancel-ok".</summary>
- public interface IStreamCancelOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.publish".</summary>
- public interface IStreamPublish: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Mandatory { get; }
- bool Immediate { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.return".</summary>
- public interface IStreamReturn: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.deliver".</summary>
- public interface IStreamDeliver: IMethod {
- string ConsumerTag { get; }
- ulong DeliveryTag { get; }
- string Exchange { get; }
- string Queue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.select".</summary>
- public interface ITxSelect: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.select-ok".</summary>
- public interface ITxSelectOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.commit".</summary>
- public interface ITxCommit: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.commit-ok".</summary>
- public interface ITxCommitOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.rollback".</summary>
- public interface ITxRollback: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.rollback-ok".</summary>
- public interface ITxRollbackOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.select".</summary>
- public interface IDtxSelect: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.select-ok".</summary>
- public interface IDtxSelectOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.start".</summary>
- public interface IDtxStart: IMethod {
- string DtxIdentifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.start-ok".</summary>
- public interface IDtxStartOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tunnel.request".</summary>
- public interface ITunnelRequest: IMethod {
- System.Collections.IDictionary MetaData { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.integer".</summary>
- public interface ITestInteger: IMethod {
- byte Integer1 { get; }
- ushort Integer2 { get; }
- uint Integer3 { get; }
- ulong Integer4 { get; }
- byte Operation { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.integer-ok".</summary>
- public interface ITestIntegerOk: IMethod {
- ulong Result { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.string".</summary>
- public interface ITestString: IMethod {
- string String1 { get; }
- byte[] String2 { get; }
- byte Operation { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.string-ok".</summary>
- public interface ITestStringOk: IMethod {
- byte[] Result { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.table".</summary>
- public interface ITestTable: IMethod {
- System.Collections.IDictionary Table { get; }
- byte IntegerOp { get; }
- byte StringOp { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.table-ok".</summary>
- public interface ITestTableOk: IMethod {
- ulong IntegerResult { get; }
- byte[] StringResult { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.content".</summary>
- public interface ITestContent: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "test.content-ok".</summary>
- public interface ITestContentOk: IMethod {
- uint ContentChecksum { get; }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "basic"</summary>
- public class BasicProperties: RabbitMQ.Client.Impl.BasicProperties {
- private string m_contentType;
- private string m_contentEncoding;
- private System.Collections.IDictionary m_headers;
- private byte m_deliveryMode;
- private byte m_priority;
- private string m_correlationId;
- private string m_replyTo;
- private string m_expiration;
- private string m_messageId;
- private AmqpTimestamp m_timestamp;
- private string m_type;
- private string m_userId;
- private string m_appId;
- private string m_clusterId;
-
- private bool m_contentType_present = false;
- private bool m_contentEncoding_present = false;
- private bool m_headers_present = false;
- private bool m_deliveryMode_present = false;
- private bool m_priority_present = false;
- private bool m_correlationId_present = false;
- private bool m_replyTo_present = false;
- private bool m_expiration_present = false;
- private bool m_messageId_present = false;
- private bool m_timestamp_present = false;
- private bool m_type_present = false;
- private bool m_userId_present = false;
- private bool m_appId_present = false;
- private bool m_clusterId_present = false;
-
- public override string ContentType {
- get {
- return m_contentType;
- }
- set {
- m_contentType_present = true;
- m_contentType = value;
- }
- }
- public override string ContentEncoding {
- get {
- return m_contentEncoding;
- }
- set {
- m_contentEncoding_present = true;
- m_contentEncoding = value;
- }
- }
- public override System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public override byte DeliveryMode {
- get {
- return m_deliveryMode;
- }
- set {
- m_deliveryMode_present = true;
- m_deliveryMode = value;
- }
- }
- public override byte Priority {
- get {
- return m_priority;
- }
- set {
- m_priority_present = true;
- m_priority = value;
- }
- }
- public override string CorrelationId {
- get {
- return m_correlationId;
- }
- set {
- m_correlationId_present = true;
- m_correlationId = value;
- }
- }
- public override string ReplyTo {
- get {
- return m_replyTo;
- }
- set {
- m_replyTo_present = true;
- m_replyTo = value;
- }
- }
- public override string Expiration {
- get {
- return m_expiration;
- }
- set {
- m_expiration_present = true;
- m_expiration = value;
- }
- }
- public override string MessageId {
- get {
- return m_messageId;
- }
- set {
- m_messageId_present = true;
- m_messageId = value;
- }
- }
- public override AmqpTimestamp Timestamp {
- get {
- return m_timestamp;
- }
- set {
- m_timestamp_present = true;
- m_timestamp = value;
- }
- }
- public override string Type {
- get {
- return m_type;
- }
- set {
- m_type_present = true;
- m_type = value;
- }
- }
- public override string UserId {
- get {
- return m_userId;
- }
- set {
- m_userId_present = true;
- m_userId = value;
- }
- }
- public override string AppId {
- get {
- return m_appId;
- }
- set {
- m_appId_present = true;
- m_appId = value;
- }
- }
- public override string ClusterId {
- get {
- return m_clusterId;
- }
- set {
- m_clusterId_present = true;
- m_clusterId = value;
- }
- }
-
- public override void ClearContentType() { m_contentType_present = false; }
- public override void ClearContentEncoding() { m_contentEncoding_present = false; }
- public override void ClearHeaders() { m_headers_present = false; }
- public override void ClearDeliveryMode() { m_deliveryMode_present = false; }
- public override void ClearPriority() { m_priority_present = false; }
- public override void ClearCorrelationId() { m_correlationId_present = false; }
- public override void ClearReplyTo() { m_replyTo_present = false; }
- public override void ClearExpiration() { m_expiration_present = false; }
- public override void ClearMessageId() { m_messageId_present = false; }
- public override void ClearTimestamp() { m_timestamp_present = false; }
- public override void ClearType() { m_type_present = false; }
- public override void ClearUserId() { m_userId_present = false; }
- public override void ClearAppId() { m_appId_present = false; }
- public override void ClearClusterId() { m_clusterId_present = false; }
-
- public BasicProperties() {}
- public override int ProtocolClassId { get { return 60; } }
- public override string ProtocolClassName { get { return "basic"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_contentType_present = reader.ReadPresence();
- m_contentEncoding_present = reader.ReadPresence();
- m_headers_present = reader.ReadPresence();
- m_deliveryMode_present = reader.ReadPresence();
- m_priority_present = reader.ReadPresence();
- m_correlationId_present = reader.ReadPresence();
- m_replyTo_present = reader.ReadPresence();
- m_expiration_present = reader.ReadPresence();
- m_messageId_present = reader.ReadPresence();
- m_timestamp_present = reader.ReadPresence();
- m_type_present = reader.ReadPresence();
- m_userId_present = reader.ReadPresence();
- m_appId_present = reader.ReadPresence();
- m_clusterId_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_contentType_present) { m_contentType = reader.ReadShortstr(); }
- if (m_contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_deliveryMode_present) { m_deliveryMode = reader.ReadOctet(); }
- if (m_priority_present) { m_priority = reader.ReadOctet(); }
- if (m_correlationId_present) { m_correlationId = reader.ReadShortstr(); }
- if (m_replyTo_present) { m_replyTo = reader.ReadShortstr(); }
- if (m_expiration_present) { m_expiration = reader.ReadShortstr(); }
- if (m_messageId_present) { m_messageId = reader.ReadShortstr(); }
- if (m_timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
- if (m_type_present) { m_type = reader.ReadShortstr(); }
- if (m_userId_present) { m_userId = reader.ReadShortstr(); }
- if (m_appId_present) { m_appId = reader.ReadShortstr(); }
- if (m_clusterId_present) { m_clusterId = reader.ReadShortstr(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_contentType_present);
- writer.WritePresence(m_contentEncoding_present);
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_deliveryMode_present);
- writer.WritePresence(m_priority_present);
- writer.WritePresence(m_correlationId_present);
- writer.WritePresence(m_replyTo_present);
- writer.WritePresence(m_expiration_present);
- writer.WritePresence(m_messageId_present);
- writer.WritePresence(m_timestamp_present);
- writer.WritePresence(m_type_present);
- writer.WritePresence(m_userId_present);
- writer.WritePresence(m_appId_present);
- writer.WritePresence(m_clusterId_present);
- writer.FinishPresence();
- if (m_contentType_present) { writer.WriteShortstr(m_contentType); }
- if (m_contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_deliveryMode_present) { writer.WriteOctet(m_deliveryMode); }
- if (m_priority_present) { writer.WriteOctet(m_priority); }
- if (m_correlationId_present) { writer.WriteShortstr(m_correlationId); }
- if (m_replyTo_present) { writer.WriteShortstr(m_replyTo); }
- if (m_expiration_present) { writer.WriteShortstr(m_expiration); }
- if (m_messageId_present) { writer.WriteShortstr(m_messageId); }
- if (m_timestamp_present) { writer.WriteTimestamp(m_timestamp); }
- if (m_type_present) { writer.WriteShortstr(m_type); }
- if (m_userId_present) { writer.WriteShortstr(m_userId); }
- if (m_appId_present) { writer.WriteShortstr(m_appId); }
- if (m_clusterId_present) { writer.WriteShortstr(m_clusterId); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("content type="); sb.Append(m_contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
- sb.Append("content encoding="); sb.Append(m_contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("delivery mode="); sb.Append(m_deliveryMode_present ? m_deliveryMode.ToString() : "_"); sb.Append(", ");
- sb.Append("priority="); sb.Append(m_priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
- sb.Append("correlation id="); sb.Append(m_correlationId_present ? (m_correlationId == null ? "(null)" : m_correlationId.ToString()) : "_"); sb.Append(", ");
- sb.Append("reply to="); sb.Append(m_replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
- sb.Append("expiration="); sb.Append(m_expiration_present ? (m_expiration == null ? "(null)" : m_expiration.ToString()) : "_"); sb.Append(", ");
- sb.Append("message id="); sb.Append(m_messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
- sb.Append("timestamp="); sb.Append(m_timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
- sb.Append("type="); sb.Append(m_type_present ? (m_type == null ? "(null)" : m_type.ToString()) : "_"); sb.Append(", ");
- sb.Append("user id="); sb.Append(m_userId_present ? (m_userId == null ? "(null)" : m_userId.ToString()) : "_"); sb.Append(", ");
- sb.Append("app id="); sb.Append(m_appId_present ? (m_appId == null ? "(null)" : m_appId.ToString()) : "_"); sb.Append(", ");
- sb.Append("cluster id="); sb.Append(m_clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "file"</summary>
- public class FileProperties: RabbitMQ.Client.Impl.FileProperties {
- private string m_contentType;
- private string m_contentEncoding;
- private System.Collections.IDictionary m_headers;
- private byte m_priority;
- private string m_replyTo;
- private string m_messageId;
- private string m_filename;
- private AmqpTimestamp m_timestamp;
- private string m_clusterId;
-
- private bool m_contentType_present = false;
- private bool m_contentEncoding_present = false;
- private bool m_headers_present = false;
- private bool m_priority_present = false;
- private bool m_replyTo_present = false;
- private bool m_messageId_present = false;
- private bool m_filename_present = false;
- private bool m_timestamp_present = false;
- private bool m_clusterId_present = false;
-
- public override string ContentType {
- get {
- return m_contentType;
- }
- set {
- m_contentType_present = true;
- m_contentType = value;
- }
- }
- public override string ContentEncoding {
- get {
- return m_contentEncoding;
- }
- set {
- m_contentEncoding_present = true;
- m_contentEncoding = value;
- }
- }
- public override System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public override byte Priority {
- get {
- return m_priority;
- }
- set {
- m_priority_present = true;
- m_priority = value;
- }
- }
- public override string ReplyTo {
- get {
- return m_replyTo;
- }
- set {
- m_replyTo_present = true;
- m_replyTo = value;
- }
- }
- public override string MessageId {
- get {
- return m_messageId;
- }
- set {
- m_messageId_present = true;
- m_messageId = value;
- }
- }
- public override string Filename {
- get {
- return m_filename;
- }
- set {
- m_filename_present = true;
- m_filename = value;
- }
- }
- public override AmqpTimestamp Timestamp {
- get {
- return m_timestamp;
- }
- set {
- m_timestamp_present = true;
- m_timestamp = value;
- }
- }
- public override string ClusterId {
- get {
- return m_clusterId;
- }
- set {
- m_clusterId_present = true;
- m_clusterId = value;
- }
- }
-
- public override void ClearContentType() { m_contentType_present = false; }
- public override void ClearContentEncoding() { m_contentEncoding_present = false; }
- public override void ClearHeaders() { m_headers_present = false; }
- public override void ClearPriority() { m_priority_present = false; }
- public override void ClearReplyTo() { m_replyTo_present = false; }
- public override void ClearMessageId() { m_messageId_present = false; }
- public override void ClearFilename() { m_filename_present = false; }
- public override void ClearTimestamp() { m_timestamp_present = false; }
- public override void ClearClusterId() { m_clusterId_present = false; }
-
- public FileProperties() {}
- public override int ProtocolClassId { get { return 70; } }
- public override string ProtocolClassName { get { return "file"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_contentType_present = reader.ReadPresence();
- m_contentEncoding_present = reader.ReadPresence();
- m_headers_present = reader.ReadPresence();
- m_priority_present = reader.ReadPresence();
- m_replyTo_present = reader.ReadPresence();
- m_messageId_present = reader.ReadPresence();
- m_filename_present = reader.ReadPresence();
- m_timestamp_present = reader.ReadPresence();
- m_clusterId_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_contentType_present) { m_contentType = reader.ReadShortstr(); }
- if (m_contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_priority_present) { m_priority = reader.ReadOctet(); }
- if (m_replyTo_present) { m_replyTo = reader.ReadShortstr(); }
- if (m_messageId_present) { m_messageId = reader.ReadShortstr(); }
- if (m_filename_present) { m_filename = reader.ReadShortstr(); }
- if (m_timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
- if (m_clusterId_present) { m_clusterId = reader.ReadShortstr(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_contentType_present);
- writer.WritePresence(m_contentEncoding_present);
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_priority_present);
- writer.WritePresence(m_replyTo_present);
- writer.WritePresence(m_messageId_present);
- writer.WritePresence(m_filename_present);
- writer.WritePresence(m_timestamp_present);
- writer.WritePresence(m_clusterId_present);
- writer.FinishPresence();
- if (m_contentType_present) { writer.WriteShortstr(m_contentType); }
- if (m_contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_priority_present) { writer.WriteOctet(m_priority); }
- if (m_replyTo_present) { writer.WriteShortstr(m_replyTo); }
- if (m_messageId_present) { writer.WriteShortstr(m_messageId); }
- if (m_filename_present) { writer.WriteShortstr(m_filename); }
- if (m_timestamp_present) { writer.WriteTimestamp(m_timestamp); }
- if (m_clusterId_present) { writer.WriteShortstr(m_clusterId); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("content type="); sb.Append(m_contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
- sb.Append("content encoding="); sb.Append(m_contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("priority="); sb.Append(m_priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
- sb.Append("reply to="); sb.Append(m_replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
- sb.Append("message id="); sb.Append(m_messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
- sb.Append("filename="); sb.Append(m_filename_present ? (m_filename == null ? "(null)" : m_filename.ToString()) : "_"); sb.Append(", ");
- sb.Append("timestamp="); sb.Append(m_timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
- sb.Append("cluster id="); sb.Append(m_clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "stream"</summary>
- public class StreamProperties: RabbitMQ.Client.Impl.StreamProperties {
- private string m_contentType;
- private string m_contentEncoding;
- private System.Collections.IDictionary m_headers;
- private byte m_priority;
- private AmqpTimestamp m_timestamp;
-
- private bool m_contentType_present = false;
- private bool m_contentEncoding_present = false;
- private bool m_headers_present = false;
- private bool m_priority_present = false;
- private bool m_timestamp_present = false;
-
- public override string ContentType {
- get {
- return m_contentType;
- }
- set {
- m_contentType_present = true;
- m_contentType = value;
- }
- }
- public override string ContentEncoding {
- get {
- return m_contentEncoding;
- }
- set {
- m_contentEncoding_present = true;
- m_contentEncoding = value;
- }
- }
- public override System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public override byte Priority {
- get {
- return m_priority;
- }
- set {
- m_priority_present = true;
- m_priority = value;
- }
- }
- public override AmqpTimestamp Timestamp {
- get {
- return m_timestamp;
- }
- set {
- m_timestamp_present = true;
- m_timestamp = value;
- }
- }
-
- public override void ClearContentType() { m_contentType_present = false; }
- public override void ClearContentEncoding() { m_contentEncoding_present = false; }
- public override void ClearHeaders() { m_headers_present = false; }
- public override void ClearPriority() { m_priority_present = false; }
- public override void ClearTimestamp() { m_timestamp_present = false; }
-
- public StreamProperties() {}
- public override int ProtocolClassId { get { return 80; } }
- public override string ProtocolClassName { get { return "stream"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_contentType_present = reader.ReadPresence();
- m_contentEncoding_present = reader.ReadPresence();
- m_headers_present = reader.ReadPresence();
- m_priority_present = reader.ReadPresence();
- m_timestamp_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_contentType_present) { m_contentType = reader.ReadShortstr(); }
- if (m_contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_priority_present) { m_priority = reader.ReadOctet(); }
- if (m_timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_contentType_present);
- writer.WritePresence(m_contentEncoding_present);
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_priority_present);
- writer.WritePresence(m_timestamp_present);
- writer.FinishPresence();
- if (m_contentType_present) { writer.WriteShortstr(m_contentType); }
- if (m_contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_priority_present) { writer.WriteOctet(m_priority); }
- if (m_timestamp_present) { writer.WriteTimestamp(m_timestamp); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("content type="); sb.Append(m_contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
- sb.Append("content encoding="); sb.Append(m_contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("priority="); sb.Append(m_priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
- sb.Append("timestamp="); sb.Append(m_timestamp_present ? m_timestamp.ToString() : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "tunnel"</summary>
- public class TunnelProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
- private System.Collections.IDictionary m_headers;
- private string m_proxyName;
- private string m_dataName;
- private byte m_durable;
- private byte m_broadcast;
-
- private bool m_headers_present = false;
- private bool m_proxyName_present = false;
- private bool m_dataName_present = false;
- private bool m_durable_present = false;
- private bool m_broadcast_present = false;
-
- public System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public string ProxyName {
- get {
- return m_proxyName;
- }
- set {
- m_proxyName_present = true;
- m_proxyName = value;
- }
- }
- public string DataName {
- get {
- return m_dataName;
- }
- set {
- m_dataName_present = true;
- m_dataName = value;
- }
- }
- public byte Durable {
- get {
- return m_durable;
- }
- set {
- m_durable_present = true;
- m_durable = value;
- }
- }
- public byte Broadcast {
- get {
- return m_broadcast;
- }
- set {
- m_broadcast_present = true;
- m_broadcast = value;
- }
- }
-
- public void ClearHeaders() { m_headers_present = false; }
- public void ClearProxyName() { m_proxyName_present = false; }
- public void ClearDataName() { m_dataName_present = false; }
- public void ClearDurable() { m_durable_present = false; }
- public void ClearBroadcast() { m_broadcast_present = false; }
-
- public TunnelProperties() {}
- public override int ProtocolClassId { get { return 110; } }
- public override string ProtocolClassName { get { return "tunnel"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_headers_present = reader.ReadPresence();
- m_proxyName_present = reader.ReadPresence();
- m_dataName_present = reader.ReadPresence();
- m_durable_present = reader.ReadPresence();
- m_broadcast_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_proxyName_present) { m_proxyName = reader.ReadShortstr(); }
- if (m_dataName_present) { m_dataName = reader.ReadShortstr(); }
- if (m_durable_present) { m_durable = reader.ReadOctet(); }
- if (m_broadcast_present) { m_broadcast = reader.ReadOctet(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_proxyName_present);
- writer.WritePresence(m_dataName_present);
- writer.WritePresence(m_durable_present);
- writer.WritePresence(m_broadcast_present);
- writer.FinishPresence();
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_proxyName_present) { writer.WriteShortstr(m_proxyName); }
- if (m_dataName_present) { writer.WriteShortstr(m_dataName); }
- if (m_durable_present) { writer.WriteOctet(m_durable); }
- if (m_broadcast_present) { writer.WriteOctet(m_broadcast); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("proxy name="); sb.Append(m_proxyName_present ? (m_proxyName == null ? "(null)" : m_proxyName.ToString()) : "_"); sb.Append(", ");
- sb.Append("data name="); sb.Append(m_dataName_present ? (m_dataName == null ? "(null)" : m_dataName.ToString()) : "_"); sb.Append(", ");
- sb.Append("durable="); sb.Append(m_durable_present ? m_durable.ToString() : "_"); sb.Append(", ");
- sb.Append("broadcast="); sb.Append(m_broadcast_present ? m_broadcast.ToString() : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "test"</summary>
- public class TestProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
-
-
-
-
- public TestProperties() {}
- public override int ProtocolClassId { get { return 120; } }
- public override string ProtocolClassName { get { return "test"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- reader.FinishPresence();
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.FinishPresence();
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
-}
-namespace RabbitMQ.Client.Framing.Impl.v0_8 {
- using RabbitMQ.Client.Framing.v0_8;
- public enum ClassId {
- Connection = 10,
- Channel = 20,
- Access = 30,
- Exchange = 40,
- Queue = 50,
- Basic = 60,
- File = 70,
- Stream = 80,
- Tx = 90,
- Dtx = 100,
- Tunnel = 110,
- Test = 120,
- Invalid = -1
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionStart: RabbitMQ.Client.Impl.MethodBase, IConnectionStart {
- public const int ClassId = 10;
- public const int MethodId = 10;
-
- public byte m_versionMajor;
- public byte m_versionMinor;
- public System.Collections.IDictionary m_serverProperties;
- public byte[] m_mechanisms;
- public byte[] m_locales;
-
- byte IConnectionStart.VersionMajor { get { return m_versionMajor; } }
- byte IConnectionStart.VersionMinor { get { return m_versionMinor; } }
- System.Collections.IDictionary IConnectionStart.ServerProperties { get { return m_serverProperties; } }
- byte[] IConnectionStart.Mechanisms { get { return m_mechanisms; } }
- byte[] IConnectionStart.Locales { get { return m_locales; } }
-
- public ConnectionStart() {}
- public ConnectionStart(
- byte initVersionMajor,
- byte initVersionMinor,
- System.Collections.IDictionary initServerProperties,
- byte[] initMechanisms,
- byte[] initLocales)
- {
- m_versionMajor = initVersionMajor;
- m_versionMinor = initVersionMinor;
- m_serverProperties = initServerProperties;
- m_mechanisms = initMechanisms;
- m_locales = initLocales;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "connection.start"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_versionMajor = reader.ReadOctet();
- m_versionMinor = reader.ReadOctet();
- m_serverProperties = reader.ReadTable();
- m_mechanisms = reader.ReadLongstr();
- m_locales = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteOctet(m_versionMajor);
- writer.WriteOctet(m_versionMinor);
- writer.WriteTable(m_serverProperties);
- writer.WriteLongstr(m_mechanisms);
- writer.WriteLongstr(m_locales);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_versionMajor); sb.Append(",");
- sb.Append(m_versionMinor); sb.Append(",");
- sb.Append(m_serverProperties); sb.Append(",");
- sb.Append(m_mechanisms); sb.Append(",");
- sb.Append(m_locales);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionStartOk: RabbitMQ.Client.Impl.MethodBase, IConnectionStartOk {
- public const int ClassId = 10;
- public const int MethodId = 11;
-
- public System.Collections.IDictionary m_clientProperties;
- public string m_mechanism;
- public byte[] m_response;
- public string m_locale;
-
- System.Collections.IDictionary IConnectionStartOk.ClientProperties { get { return m_clientProperties; } }
- string IConnectionStartOk.Mechanism { get { return m_mechanism; } }
- byte[] IConnectionStartOk.Response { get { return m_response; } }
- string IConnectionStartOk.Locale { get { return m_locale; } }
-
- public ConnectionStartOk() {}
- public ConnectionStartOk(
- System.Collections.IDictionary initClientProperties,
- string initMechanism,
- byte[] initResponse,
- string initLocale)
- {
- m_clientProperties = initClientProperties;
- m_mechanism = initMechanism;
- m_response = initResponse;
- m_locale = initLocale;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "connection.start-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_clientProperties = reader.ReadTable();
- m_mechanism = reader.ReadShortstr();
- m_response = reader.ReadLongstr();
- m_locale = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteTable(m_clientProperties);
- writer.WriteShortstr(m_mechanism);
- writer.WriteLongstr(m_response);
- writer.WriteShortstr(m_locale);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_clientProperties); sb.Append(",");
- sb.Append(m_mechanism); sb.Append(",");
- sb.Append(m_response); sb.Append(",");
- sb.Append(m_locale);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionSecure: RabbitMQ.Client.Impl.MethodBase, IConnectionSecure {
- public const int ClassId = 10;
- public const int MethodId = 20;
-
- public byte[] m_challenge;
-
- byte[] IConnectionSecure.Challenge { get { return m_challenge; } }
-
- public ConnectionSecure() {}
- public ConnectionSecure(
- byte[] initChallenge)
- {
- m_challenge = initChallenge;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "connection.secure"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_challenge = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_challenge);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_challenge);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionSecureOk: RabbitMQ.Client.Impl.MethodBase, IConnectionSecureOk {
- public const int ClassId = 10;
- public const int MethodId = 21;
-
- public byte[] m_response;
-
- byte[] IConnectionSecureOk.Response { get { return m_response; } }
-
- public ConnectionSecureOk() {}
- public ConnectionSecureOk(
- byte[] initResponse)
- {
- m_response = initResponse;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "connection.secure-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_response = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_response);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_response);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionTune: RabbitMQ.Client.Impl.MethodBase, IConnectionTune {
- public const int ClassId = 10;
- public const int MethodId = 30;
-
- public ushort m_channelMax;
- public uint m_frameMax;
- public ushort m_heartbeat;
-
- ushort IConnectionTune.ChannelMax { get { return m_channelMax; } }
- uint IConnectionTune.FrameMax { get { return m_frameMax; } }
- ushort IConnectionTune.Heartbeat { get { return m_heartbeat; } }
-
- public ConnectionTune() {}
- public ConnectionTune(
- ushort initChannelMax,
- uint initFrameMax,
- ushort initHeartbeat)
- {
- m_channelMax = initChannelMax;
- m_frameMax = initFrameMax;
- m_heartbeat = initHeartbeat;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "connection.tune"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_channelMax = reader.ReadShort();
- m_frameMax = reader.ReadLong();
- m_heartbeat = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_channelMax);
- writer.WriteLong(m_frameMax);
- writer.WriteShort(m_heartbeat);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_channelMax); sb.Append(",");
- sb.Append(m_frameMax); sb.Append(",");
- sb.Append(m_heartbeat);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionTuneOk: RabbitMQ.Client.Impl.MethodBase, IConnectionTuneOk {
- public const int ClassId = 10;
- public const int MethodId = 31;
-
- public ushort m_channelMax;
- public uint m_frameMax;
- public ushort m_heartbeat;
-
- ushort IConnectionTuneOk.ChannelMax { get { return m_channelMax; } }
- uint IConnectionTuneOk.FrameMax { get { return m_frameMax; } }
- ushort IConnectionTuneOk.Heartbeat { get { return m_heartbeat; } }
-
- public ConnectionTuneOk() {}
- public ConnectionTuneOk(
- ushort initChannelMax,
- uint initFrameMax,
- ushort initHeartbeat)
- {
- m_channelMax = initChannelMax;
- m_frameMax = initFrameMax;
- m_heartbeat = initHeartbeat;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "connection.tune-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_channelMax = reader.ReadShort();
- m_frameMax = reader.ReadLong();
- m_heartbeat = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_channelMax);
- writer.WriteLong(m_frameMax);
- writer.WriteShort(m_heartbeat);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_channelMax); sb.Append(",");
- sb.Append(m_frameMax); sb.Append(",");
- sb.Append(m_heartbeat);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionOpen: RabbitMQ.Client.Impl.MethodBase, IConnectionOpen {
- public const int ClassId = 10;
- public const int MethodId = 40;
-
- public string m_virtualHost;
- public string m_capabilities;
- public bool m_insist;
-
- string IConnectionOpen.VirtualHost { get { return m_virtualHost; } }
- string IConnectionOpen.Capabilities { get { return m_capabilities; } }
- bool IConnectionOpen.Insist { get { return m_insist; } }
-
- public ConnectionOpen() {}
- public ConnectionOpen(
- string initVirtualHost,
- string initCapabilities,
- bool initInsist)
- {
- m_virtualHost = initVirtualHost;
- m_capabilities = initCapabilities;
- m_insist = initInsist;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "connection.open"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_virtualHost = reader.ReadShortstr();
- m_capabilities = reader.ReadShortstr();
- m_insist = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_virtualHost);
- writer.WriteShortstr(m_capabilities);
- writer.WriteBit(m_insist);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_virtualHost); sb.Append(",");
- sb.Append(m_capabilities); sb.Append(",");
- sb.Append(m_insist);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionOpenOk: RabbitMQ.Client.Impl.MethodBase, IConnectionOpenOk {
- public const int ClassId = 10;
- public const int MethodId = 41;
-
- public string m_knownHosts;
-
- string IConnectionOpenOk.KnownHosts { get { return m_knownHosts; } }
-
- public ConnectionOpenOk() {}
- public ConnectionOpenOk(
- string initKnownHosts)
- {
- m_knownHosts = initKnownHosts;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "connection.open-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_knownHosts = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_knownHosts);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_knownHosts);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionRedirect: RabbitMQ.Client.Impl.MethodBase, IConnectionRedirect {
- public const int ClassId = 10;
- public const int MethodId = 50;
-
- public string m_host;
- public string m_knownHosts;
-
- string IConnectionRedirect.Host { get { return m_host; } }
- string IConnectionRedirect.KnownHosts { get { return m_knownHosts; } }
-
- public ConnectionRedirect() {}
- public ConnectionRedirect(
- string initHost,
- string initKnownHosts)
- {
- m_host = initHost;
- m_knownHosts = initKnownHosts;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "connection.redirect"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_host = reader.ReadShortstr();
- m_knownHosts = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_host);
- writer.WriteShortstr(m_knownHosts);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_host); sb.Append(",");
- sb.Append(m_knownHosts);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionClose: RabbitMQ.Client.Impl.MethodBase, IConnectionClose {
- public const int ClassId = 10;
- public const int MethodId = 60;
-
- public ushort m_replyCode;
- public string m_replyText;
- public ushort m_classId;
- public ushort m_methodId;
-
- ushort IConnectionClose.ReplyCode { get { return m_replyCode; } }
- string IConnectionClose.ReplyText { get { return m_replyText; } }
- ushort IConnectionClose.ClassId { get { return m_classId; } }
- ushort IConnectionClose.MethodId { get { return m_methodId; } }
-
- public ConnectionClose() {}
- public ConnectionClose(
- ushort initReplyCode,
- string initReplyText,
- ushort initClassId,
- ushort initMethodId)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_classId = initClassId;
- m_methodId = initMethodId;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "connection.close"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_classId = reader.ReadShort();
- m_methodId = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShort(m_classId);
- writer.WriteShort(m_methodId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_classId); sb.Append(",");
- sb.Append(m_methodId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionCloseOk: RabbitMQ.Client.Impl.MethodBase, IConnectionCloseOk {
- public const int ClassId = 10;
- public const int MethodId = 61;
-
-
-
- public ConnectionCloseOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 61; } }
- public override string ProtocolMethodName { get { return "connection.close-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelOpen: RabbitMQ.Client.Impl.MethodBase, IChannelOpen {
- public const int ClassId = 20;
- public const int MethodId = 10;
-
- public string m_outOfBand;
-
- string IChannelOpen.OutOfBand { get { return m_outOfBand; } }
-
- public ChannelOpen() {}
- public ChannelOpen(
- string initOutOfBand)
- {
- m_outOfBand = initOutOfBand;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "channel.open"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_outOfBand = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_outOfBand);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_outOfBand);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelOpenOk: RabbitMQ.Client.Impl.MethodBase, IChannelOpenOk {
- public const int ClassId = 20;
- public const int MethodId = 11;
-
-
-
- public ChannelOpenOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "channel.open-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelFlow: RabbitMQ.Client.Impl.MethodBase, IChannelFlow {
- public const int ClassId = 20;
- public const int MethodId = 20;
-
- public bool m_active;
-
- bool IChannelFlow.Active { get { return m_active; } }
-
- public ChannelFlow() {}
- public ChannelFlow(
- bool initActive)
- {
- m_active = initActive;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "channel.flow"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_active = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteBit(m_active);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_active);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelFlowOk: RabbitMQ.Client.Impl.MethodBase, IChannelFlowOk {
- public const int ClassId = 20;
- public const int MethodId = 21;
-
- public bool m_active;
-
- bool IChannelFlowOk.Active { get { return m_active; } }
-
- public ChannelFlowOk() {}
- public ChannelFlowOk(
- bool initActive)
- {
- m_active = initActive;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "channel.flow-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_active = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteBit(m_active);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_active);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelAlert: RabbitMQ.Client.Impl.MethodBase, IChannelAlert {
- public const int ClassId = 20;
- public const int MethodId = 30;
-
- public ushort m_replyCode;
- public string m_replyText;
- public System.Collections.IDictionary m_details;
-
- ushort IChannelAlert.ReplyCode { get { return m_replyCode; } }
- string IChannelAlert.ReplyText { get { return m_replyText; } }
- System.Collections.IDictionary IChannelAlert.Details { get { return m_details; } }
-
- public ChannelAlert() {}
- public ChannelAlert(
- ushort initReplyCode,
- string initReplyText,
- System.Collections.IDictionary initDetails)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_details = initDetails;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "channel.alert"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_details = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteTable(m_details);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_details);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelClose: RabbitMQ.Client.Impl.MethodBase, IChannelClose {
- public const int ClassId = 20;
- public const int MethodId = 40;
-
- public ushort m_replyCode;
- public string m_replyText;
- public ushort m_classId;
- public ushort m_methodId;
-
- ushort IChannelClose.ReplyCode { get { return m_replyCode; } }
- string IChannelClose.ReplyText { get { return m_replyText; } }
- ushort IChannelClose.ClassId { get { return m_classId; } }
- ushort IChannelClose.MethodId { get { return m_methodId; } }
-
- public ChannelClose() {}
- public ChannelClose(
- ushort initReplyCode,
- string initReplyText,
- ushort initClassId,
- ushort initMethodId)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_classId = initClassId;
- m_methodId = initMethodId;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "channel.close"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_classId = reader.ReadShort();
- m_methodId = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShort(m_classId);
- writer.WriteShort(m_methodId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_classId); sb.Append(",");
- sb.Append(m_methodId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelCloseOk: RabbitMQ.Client.Impl.MethodBase, IChannelCloseOk {
- public const int ClassId = 20;
- public const int MethodId = 41;
-
-
-
- public ChannelCloseOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "channel.close-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class AccessRequest: RabbitMQ.Client.Impl.MethodBase, IAccessRequest {
- public const int ClassId = 30;
- public const int MethodId = 10;
-
- public string m_realm;
- public bool m_exclusive;
- public bool m_passive;
- public bool m_active;
- public bool m_write;
- public bool m_read;
-
- string IAccessRequest.Realm { get { return m_realm; } }
- bool IAccessRequest.Exclusive { get { return m_exclusive; } }
- bool IAccessRequest.Passive { get { return m_passive; } }
- bool IAccessRequest.Active { get { return m_active; } }
- bool IAccessRequest.Write { get { return m_write; } }
- bool IAccessRequest.Read { get { return m_read; } }
-
- public AccessRequest() {}
- public AccessRequest(
- string initRealm,
- bool initExclusive,
- bool initPassive,
- bool initActive,
- bool initWrite,
- bool initRead)
- {
- m_realm = initRealm;
- m_exclusive = initExclusive;
- m_passive = initPassive;
- m_active = initActive;
- m_write = initWrite;
- m_read = initRead;
- }
-
- public override int ProtocolClassId { get { return 30; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "access.request"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_realm = reader.ReadShortstr();
- m_exclusive = reader.ReadBit();
- m_passive = reader.ReadBit();
- m_active = reader.ReadBit();
- m_write = reader.ReadBit();
- m_read = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_realm);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_passive);
- writer.WriteBit(m_active);
- writer.WriteBit(m_write);
- writer.WriteBit(m_read);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_realm); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_passive); sb.Append(",");
- sb.Append(m_active); sb.Append(",");
- sb.Append(m_write); sb.Append(",");
- sb.Append(m_read);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class AccessRequestOk: RabbitMQ.Client.Impl.MethodBase, IAccessRequestOk {
- public const int ClassId = 30;
- public const int MethodId = 11;
-
- public ushort m_ticket;
-
- ushort IAccessRequestOk.Ticket { get { return m_ticket; } }
-
- public AccessRequestOk() {}
- public AccessRequestOk(
- ushort initTicket)
- {
- m_ticket = initTicket;
- }
-
- public override int ProtocolClassId { get { return 30; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "access.request-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDeclare: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclare {
- public const int ClassId = 40;
- public const int MethodId = 10;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_type;
- public bool m_passive;
- public bool m_durable;
- public bool m_autoDelete;
- public bool m_internal;
- public bool m_nowait;
- public System.Collections.IDictionary m_arguments;
-
- ushort IExchangeDeclare.Ticket { get { return m_ticket; } }
- string IExchangeDeclare.Exchange { get { return m_exchange; } }
- string IExchangeDeclare.Type { get { return m_type; } }
- bool IExchangeDeclare.Passive { get { return m_passive; } }
- bool IExchangeDeclare.Durable { get { return m_durable; } }
- bool IExchangeDeclare.AutoDelete { get { return m_autoDelete; } }
- bool IExchangeDeclare.Internal { get { return m_internal; } }
- bool IExchangeDeclare.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IExchangeDeclare.Arguments { get { return m_arguments; } }
-
- public ExchangeDeclare() {}
- public ExchangeDeclare(
- ushort initTicket,
- string initExchange,
- string initType,
- bool initPassive,
- bool initDurable,
- bool initAutoDelete,
- bool initInternal,
- bool initNowait,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_type = initType;
- m_passive = initPassive;
- m_durable = initDurable;
- m_autoDelete = initAutoDelete;
- m_internal = initInternal;
- m_nowait = initNowait;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "exchange.declare"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_type = reader.ReadShortstr();
- m_passive = reader.ReadBit();
- m_durable = reader.ReadBit();
- m_autoDelete = reader.ReadBit();
- m_internal = reader.ReadBit();
- m_nowait = reader.ReadBit();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_type);
- writer.WriteBit(m_passive);
- writer.WriteBit(m_durable);
- writer.WriteBit(m_autoDelete);
- writer.WriteBit(m_internal);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_type); sb.Append(",");
- sb.Append(m_passive); sb.Append(",");
- sb.Append(m_durable); sb.Append(",");
- sb.Append(m_autoDelete); sb.Append(",");
- sb.Append(m_internal); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDeclareOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclareOk {
- public const int ClassId = 40;
- public const int MethodId = 11;
-
-
-
- public ExchangeDeclareOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "exchange.declare-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDelete: RabbitMQ.Client.Impl.MethodBase, IExchangeDelete {
- public const int ClassId = 40;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_exchange;
- public bool m_ifUnused;
- public bool m_nowait;
-
- ushort IExchangeDelete.Ticket { get { return m_ticket; } }
- string IExchangeDelete.Exchange { get { return m_exchange; } }
- bool IExchangeDelete.IfUnused { get { return m_ifUnused; } }
- bool IExchangeDelete.Nowait { get { return m_nowait; } }
-
- public ExchangeDelete() {}
- public ExchangeDelete(
- ushort initTicket,
- string initExchange,
- bool initIfUnused,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_ifUnused = initIfUnused;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "exchange.delete"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_ifUnused = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteBit(m_ifUnused);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_ifUnused); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDeleteOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeleteOk {
- public const int ClassId = 40;
- public const int MethodId = 21;
-
-
-
- public ExchangeDeleteOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "exchange.delete-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDeclare: RabbitMQ.Client.Impl.MethodBase, IQueueDeclare {
- public const int ClassId = 50;
- public const int MethodId = 10;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_passive;
- public bool m_durable;
- public bool m_exclusive;
- public bool m_autoDelete;
- public bool m_nowait;
- public System.Collections.IDictionary m_arguments;
-
- ushort IQueueDeclare.Ticket { get { return m_ticket; } }
- string IQueueDeclare.Queue { get { return m_queue; } }
- bool IQueueDeclare.Passive { get { return m_passive; } }
- bool IQueueDeclare.Durable { get { return m_durable; } }
- bool IQueueDeclare.Exclusive { get { return m_exclusive; } }
- bool IQueueDeclare.AutoDelete { get { return m_autoDelete; } }
- bool IQueueDeclare.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IQueueDeclare.Arguments { get { return m_arguments; } }
-
- public QueueDeclare() {}
- public QueueDeclare(
- ushort initTicket,
- string initQueue,
- bool initPassive,
- bool initDurable,
- bool initExclusive,
- bool initAutoDelete,
- bool initNowait,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_passive = initPassive;
- m_durable = initDurable;
- m_exclusive = initExclusive;
- m_autoDelete = initAutoDelete;
- m_nowait = initNowait;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "queue.declare"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_passive = reader.ReadBit();
- m_durable = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_autoDelete = reader.ReadBit();
- m_nowait = reader.ReadBit();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_passive);
- writer.WriteBit(m_durable);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_autoDelete);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_passive); sb.Append(",");
- sb.Append(m_durable); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_autoDelete); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDeclareOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeclareOk {
- public const int ClassId = 50;
- public const int MethodId = 11;
-
- public string m_queue;
- public uint m_messageCount;
- public uint m_consumerCount;
-
- string IQueueDeclareOk.Queue { get { return m_queue; } }
- uint IQueueDeclareOk.MessageCount { get { return m_messageCount; } }
- uint IQueueDeclareOk.ConsumerCount { get { return m_consumerCount; } }
-
- public QueueDeclareOk() {}
- public QueueDeclareOk(
- string initQueue,
- uint initMessageCount,
- uint initConsumerCount)
- {
- m_queue = initQueue;
- m_messageCount = initMessageCount;
- m_consumerCount = initConsumerCount;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "queue.declare-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_queue = reader.ReadShortstr();
- m_messageCount = reader.ReadLong();
- m_consumerCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_queue);
- writer.WriteLong(m_messageCount);
- writer.WriteLong(m_consumerCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_messageCount); sb.Append(",");
- sb.Append(m_consumerCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueBind: RabbitMQ.Client.Impl.MethodBase, IQueueBind {
- public const int ClassId = 50;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_exchange;
- public string m_routingKey;
- public bool m_nowait;
- public System.Collections.IDictionary m_arguments;
-
- ushort IQueueBind.Ticket { get { return m_ticket; } }
- string IQueueBind.Queue { get { return m_queue; } }
- string IQueueBind.Exchange { get { return m_exchange; } }
- string IQueueBind.RoutingKey { get { return m_routingKey; } }
- bool IQueueBind.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IQueueBind.Arguments { get { return m_arguments; } }
-
- public QueueBind() {}
- public QueueBind(
- ushort initTicket,
- string initQueue,
- string initExchange,
- string initRoutingKey,
- bool initNowait,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_nowait = initNowait;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "queue.bind"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueBindOk: RabbitMQ.Client.Impl.MethodBase, IQueueBindOk {
- public const int ClassId = 50;
- public const int MethodId = 21;
-
-
-
- public QueueBindOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "queue.bind-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueUnbind: RabbitMQ.Client.Impl.MethodBase, IQueueUnbind {
- public const int ClassId = 50;
- public const int MethodId = 50;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_exchange;
- public string m_routingKey;
- public System.Collections.IDictionary m_arguments;
-
- ushort IQueueUnbind.Ticket { get { return m_ticket; } }
- string IQueueUnbind.Queue { get { return m_queue; } }
- string IQueueUnbind.Exchange { get { return m_exchange; } }
- string IQueueUnbind.RoutingKey { get { return m_routingKey; } }
- System.Collections.IDictionary IQueueUnbind.Arguments { get { return m_arguments; } }
-
- public QueueUnbind() {}
- public QueueUnbind(
- ushort initTicket,
- string initQueue,
- string initExchange,
- string initRoutingKey,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "queue.unbind"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueUnbindOk: RabbitMQ.Client.Impl.MethodBase, IQueueUnbindOk {
- public const int ClassId = 50;
- public const int MethodId = 51;
-
-
-
- public QueueUnbindOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 51; } }
- public override string ProtocolMethodName { get { return "queue.unbind-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueuePurge: RabbitMQ.Client.Impl.MethodBase, IQueuePurge {
- public const int ClassId = 50;
- public const int MethodId = 30;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_nowait;
-
- ushort IQueuePurge.Ticket { get { return m_ticket; } }
- string IQueuePurge.Queue { get { return m_queue; } }
- bool IQueuePurge.Nowait { get { return m_nowait; } }
-
- public QueuePurge() {}
- public QueuePurge(
- ushort initTicket,
- string initQueue,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "queue.purge"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueuePurgeOk: RabbitMQ.Client.Impl.MethodBase, IQueuePurgeOk {
- public const int ClassId = 50;
- public const int MethodId = 31;
-
- public uint m_messageCount;
-
- uint IQueuePurgeOk.MessageCount { get { return m_messageCount; } }
-
- public QueuePurgeOk() {}
- public QueuePurgeOk(
- uint initMessageCount)
- {
- m_messageCount = initMessageCount;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "queue.purge-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_messageCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_messageCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_messageCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDelete: RabbitMQ.Client.Impl.MethodBase, IQueueDelete {
- public const int ClassId = 50;
- public const int MethodId = 40;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_ifUnused;
- public bool m_ifEmpty;
- public bool m_nowait;
-
- ushort IQueueDelete.Ticket { get { return m_ticket; } }
- string IQueueDelete.Queue { get { return m_queue; } }
- bool IQueueDelete.IfUnused { get { return m_ifUnused; } }
- bool IQueueDelete.IfEmpty { get { return m_ifEmpty; } }
- bool IQueueDelete.Nowait { get { return m_nowait; } }
-
- public QueueDelete() {}
- public QueueDelete(
- ushort initTicket,
- string initQueue,
- bool initIfUnused,
- bool initIfEmpty,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_ifUnused = initIfUnused;
- m_ifEmpty = initIfEmpty;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "queue.delete"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_ifUnused = reader.ReadBit();
- m_ifEmpty = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_ifUnused);
- writer.WriteBit(m_ifEmpty);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_ifUnused); sb.Append(",");
- sb.Append(m_ifEmpty); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDeleteOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeleteOk {
- public const int ClassId = 50;
- public const int MethodId = 41;
-
- public uint m_messageCount;
-
- uint IQueueDeleteOk.MessageCount { get { return m_messageCount; } }
-
- public QueueDeleteOk() {}
- public QueueDeleteOk(
- uint initMessageCount)
- {
- m_messageCount = initMessageCount;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "queue.delete-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_messageCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_messageCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_messageCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicQos: RabbitMQ.Client.Impl.MethodBase, IBasicQos {
- public const int ClassId = 60;
- public const int MethodId = 10;
-
- public uint m_prefetchSize;
- public ushort m_prefetchCount;
- public bool m_global;
-
- uint IBasicQos.PrefetchSize { get { return m_prefetchSize; } }
- ushort IBasicQos.PrefetchCount { get { return m_prefetchCount; } }
- bool IBasicQos.Global { get { return m_global; } }
-
- public BasicQos() {}
- public BasicQos(
- uint initPrefetchSize,
- ushort initPrefetchCount,
- bool initGlobal)
- {
- m_prefetchSize = initPrefetchSize;
- m_prefetchCount = initPrefetchCount;
- m_global = initGlobal;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "basic.qos"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_prefetchSize = reader.ReadLong();
- m_prefetchCount = reader.ReadShort();
- m_global = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_prefetchSize);
- writer.WriteShort(m_prefetchCount);
- writer.WriteBit(m_global);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_prefetchSize); sb.Append(",");
- sb.Append(m_prefetchCount); sb.Append(",");
- sb.Append(m_global);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicQosOk: RabbitMQ.Client.Impl.MethodBase, IBasicQosOk {
- public const int ClassId = 60;
- public const int MethodId = 11;
-
-
-
- public BasicQosOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "basic.qos-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicConsume: RabbitMQ.Client.Impl.MethodBase, IBasicConsume {
- public const int ClassId = 60;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_consumerTag;
- public bool m_noLocal;
- public bool m_noAck;
- public bool m_exclusive;
- public bool m_nowait;
-
- ushort IBasicConsume.Ticket { get { return m_ticket; } }
- string IBasicConsume.Queue { get { return m_queue; } }
- string IBasicConsume.ConsumerTag { get { return m_consumerTag; } }
- bool IBasicConsume.NoLocal { get { return m_noLocal; } }
- bool IBasicConsume.NoAck { get { return m_noAck; } }
- bool IBasicConsume.Exclusive { get { return m_exclusive; } }
- bool IBasicConsume.Nowait { get { return m_nowait; } }
-
- public BasicConsume() {}
- public BasicConsume(
- ushort initTicket,
- string initQueue,
- string initConsumerTag,
- bool initNoLocal,
- bool initNoAck,
- bool initExclusive,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_consumerTag = initConsumerTag;
- m_noLocal = initNoLocal;
- m_noAck = initNoAck;
- m_exclusive = initExclusive;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "basic.consume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_consumerTag = reader.ReadShortstr();
- m_noLocal = reader.ReadBit();
- m_noAck = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_noLocal);
- writer.WriteBit(m_noAck);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_noLocal); sb.Append(",");
- sb.Append(m_noAck); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicConsumeOk: RabbitMQ.Client.Impl.MethodBase, IBasicConsumeOk {
- public const int ClassId = 60;
- public const int MethodId = 21;
-
- public string m_consumerTag;
-
- string IBasicConsumeOk.ConsumerTag { get { return m_consumerTag; } }
-
- public BasicConsumeOk() {}
- public BasicConsumeOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "basic.consume-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicCancel: RabbitMQ.Client.Impl.MethodBase, IBasicCancel {
- public const int ClassId = 60;
- public const int MethodId = 30;
-
- public string m_consumerTag;
- public bool m_nowait;
-
- string IBasicCancel.ConsumerTag { get { return m_consumerTag; } }
- bool IBasicCancel.Nowait { get { return m_nowait; } }
-
- public BasicCancel() {}
- public BasicCancel(
- string initConsumerTag,
- bool initNowait)
- {
- m_consumerTag = initConsumerTag;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "basic.cancel"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicCancelOk: RabbitMQ.Client.Impl.MethodBase, IBasicCancelOk {
- public const int ClassId = 60;
- public const int MethodId = 31;
-
- public string m_consumerTag;
-
- string IBasicCancelOk.ConsumerTag { get { return m_consumerTag; } }
-
- public BasicCancelOk() {}
- public BasicCancelOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "basic.cancel-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicPublish: RabbitMQ.Client.Impl.MethodBase, IBasicPublish {
- public const int ClassId = 60;
- public const int MethodId = 40;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_routingKey;
- public bool m_mandatory;
- public bool m_immediate;
-
- ushort IBasicPublish.Ticket { get { return m_ticket; } }
- string IBasicPublish.Exchange { get { return m_exchange; } }
- string IBasicPublish.RoutingKey { get { return m_routingKey; } }
- bool IBasicPublish.Mandatory { get { return m_mandatory; } }
- bool IBasicPublish.Immediate { get { return m_immediate; } }
-
- public BasicPublish() {}
- public BasicPublish(
- ushort initTicket,
- string initExchange,
- string initRoutingKey,
- bool initMandatory,
- bool initImmediate)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_mandatory = initMandatory;
- m_immediate = initImmediate;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "basic.publish"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_mandatory = reader.ReadBit();
- m_immediate = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_mandatory);
- writer.WriteBit(m_immediate);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_mandatory); sb.Append(",");
- sb.Append(m_immediate);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicReturn: RabbitMQ.Client.Impl.MethodBase, IBasicReturn {
- public const int ClassId = 60;
- public const int MethodId = 50;
-
- public ushort m_replyCode;
- public string m_replyText;
- public string m_exchange;
- public string m_routingKey;
-
- ushort IBasicReturn.ReplyCode { get { return m_replyCode; } }
- string IBasicReturn.ReplyText { get { return m_replyText; } }
- string IBasicReturn.Exchange { get { return m_exchange; } }
- string IBasicReturn.RoutingKey { get { return m_routingKey; } }
-
- public BasicReturn() {}
- public BasicReturn(
- ushort initReplyCode,
- string initReplyText,
- string initExchange,
- string initRoutingKey)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "basic.return"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicDeliver: RabbitMQ.Client.Impl.MethodBase, IBasicDeliver {
- public const int ClassId = 60;
- public const int MethodId = 60;
-
- public string m_consumerTag;
- public ulong m_deliveryTag;
- public bool m_redelivered;
- public string m_exchange;
- public string m_routingKey;
-
- string IBasicDeliver.ConsumerTag { get { return m_consumerTag; } }
- ulong IBasicDeliver.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicDeliver.Redelivered { get { return m_redelivered; } }
- string IBasicDeliver.Exchange { get { return m_exchange; } }
- string IBasicDeliver.RoutingKey { get { return m_routingKey; } }
-
- public BasicDeliver() {}
- public BasicDeliver(
- string initConsumerTag,
- ulong initDeliveryTag,
- bool initRedelivered,
- string initExchange,
- string initRoutingKey)
- {
- m_consumerTag = initConsumerTag;
- m_deliveryTag = initDeliveryTag;
- m_redelivered = initRedelivered;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "basic.deliver"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_deliveryTag = reader.ReadLonglong();
- m_redelivered = reader.ReadBit();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_redelivered);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_redelivered); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicGet: RabbitMQ.Client.Impl.MethodBase, IBasicGet {
- public const int ClassId = 60;
- public const int MethodId = 70;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_noAck;
-
- ushort IBasicGet.Ticket { get { return m_ticket; } }
- string IBasicGet.Queue { get { return m_queue; } }
- bool IBasicGet.NoAck { get { return m_noAck; } }
-
- public BasicGet() {}
- public BasicGet(
- ushort initTicket,
- string initQueue,
- bool initNoAck)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_noAck = initNoAck;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 70; } }
- public override string ProtocolMethodName { get { return "basic.get"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_noAck = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_noAck);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_noAck);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicGetOk: RabbitMQ.Client.Impl.MethodBase, IBasicGetOk {
- public const int ClassId = 60;
- public const int MethodId = 71;
-
- public ulong m_deliveryTag;
- public bool m_redelivered;
- public string m_exchange;
- public string m_routingKey;
- public uint m_messageCount;
-
- ulong IBasicGetOk.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicGetOk.Redelivered { get { return m_redelivered; } }
- string IBasicGetOk.Exchange { get { return m_exchange; } }
- string IBasicGetOk.RoutingKey { get { return m_routingKey; } }
- uint IBasicGetOk.MessageCount { get { return m_messageCount; } }
-
- public BasicGetOk() {}
- public BasicGetOk(
- ulong initDeliveryTag,
- bool initRedelivered,
- string initExchange,
- string initRoutingKey,
- uint initMessageCount)
- {
- m_deliveryTag = initDeliveryTag;
- m_redelivered = initRedelivered;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_messageCount = initMessageCount;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 71; } }
- public override string ProtocolMethodName { get { return "basic.get-ok"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_redelivered = reader.ReadBit();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_messageCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_redelivered);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteLong(m_messageCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_redelivered); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_messageCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicGetEmpty: RabbitMQ.Client.Impl.MethodBase, IBasicGetEmpty {
- public const int ClassId = 60;
- public const int MethodId = 72;
-
- public string m_clusterId;
-
- string IBasicGetEmpty.ClusterId { get { return m_clusterId; } }
-
- public BasicGetEmpty() {}
- public BasicGetEmpty(
- string initClusterId)
- {
- m_clusterId = initClusterId;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 72; } }
- public override string ProtocolMethodName { get { return "basic.get-empty"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_clusterId = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_clusterId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_clusterId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicAck: RabbitMQ.Client.Impl.MethodBase, IBasicAck {
- public const int ClassId = 60;
- public const int MethodId = 80;
-
- public ulong m_deliveryTag;
- public bool m_multiple;
-
- ulong IBasicAck.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicAck.Multiple { get { return m_multiple; } }
-
- public BasicAck() {}
- public BasicAck(
- ulong initDeliveryTag,
- bool initMultiple)
- {
- m_deliveryTag = initDeliveryTag;
- m_multiple = initMultiple;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 80; } }
- public override string ProtocolMethodName { get { return "basic.ack"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_multiple = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_multiple);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_multiple);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicReject: RabbitMQ.Client.Impl.MethodBase, IBasicReject {
- public const int ClassId = 60;
- public const int MethodId = 90;
-
- public ulong m_deliveryTag;
- public bool m_requeue;
-
- ulong IBasicReject.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicReject.Requeue { get { return m_requeue; } }
-
- public BasicReject() {}
- public BasicReject(
- ulong initDeliveryTag,
- bool initRequeue)
- {
- m_deliveryTag = initDeliveryTag;
- m_requeue = initRequeue;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 90; } }
- public override string ProtocolMethodName { get { return "basic.reject"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_requeue = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_requeue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_requeue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicRecover: RabbitMQ.Client.Impl.MethodBase, IBasicRecover {
- public const int ClassId = 60;
- public const int MethodId = 100;
-
- public bool m_requeue;
-
- bool IBasicRecover.Requeue { get { return m_requeue; } }
-
- public BasicRecover() {}
- public BasicRecover(
- bool initRequeue)
- {
- m_requeue = initRequeue;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 100; } }
- public override string ProtocolMethodName { get { return "basic.recover"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_requeue = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteBit(m_requeue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_requeue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileQos: RabbitMQ.Client.Impl.MethodBase, IFileQos {
- public const int ClassId = 70;
- public const int MethodId = 10;
-
- public uint m_prefetchSize;
- public ushort m_prefetchCount;
- public bool m_global;
-
- uint IFileQos.PrefetchSize { get { return m_prefetchSize; } }
- ushort IFileQos.PrefetchCount { get { return m_prefetchCount; } }
- bool IFileQos.Global { get { return m_global; } }
-
- public FileQos() {}
- public FileQos(
- uint initPrefetchSize,
- ushort initPrefetchCount,
- bool initGlobal)
- {
- m_prefetchSize = initPrefetchSize;
- m_prefetchCount = initPrefetchCount;
- m_global = initGlobal;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "file.qos"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_prefetchSize = reader.ReadLong();
- m_prefetchCount = reader.ReadShort();
- m_global = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_prefetchSize);
- writer.WriteShort(m_prefetchCount);
- writer.WriteBit(m_global);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_prefetchSize); sb.Append(",");
- sb.Append(m_prefetchCount); sb.Append(",");
- sb.Append(m_global);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileQosOk: RabbitMQ.Client.Impl.MethodBase, IFileQosOk {
- public const int ClassId = 70;
- public const int MethodId = 11;
-
-
-
- public FileQosOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "file.qos-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileConsume: RabbitMQ.Client.Impl.MethodBase, IFileConsume {
- public const int ClassId = 70;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_consumerTag;
- public bool m_noLocal;
- public bool m_noAck;
- public bool m_exclusive;
- public bool m_nowait;
-
- ushort IFileConsume.Ticket { get { return m_ticket; } }
- string IFileConsume.Queue { get { return m_queue; } }
- string IFileConsume.ConsumerTag { get { return m_consumerTag; } }
- bool IFileConsume.NoLocal { get { return m_noLocal; } }
- bool IFileConsume.NoAck { get { return m_noAck; } }
- bool IFileConsume.Exclusive { get { return m_exclusive; } }
- bool IFileConsume.Nowait { get { return m_nowait; } }
-
- public FileConsume() {}
- public FileConsume(
- ushort initTicket,
- string initQueue,
- string initConsumerTag,
- bool initNoLocal,
- bool initNoAck,
- bool initExclusive,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_consumerTag = initConsumerTag;
- m_noLocal = initNoLocal;
- m_noAck = initNoAck;
- m_exclusive = initExclusive;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "file.consume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_consumerTag = reader.ReadShortstr();
- m_noLocal = reader.ReadBit();
- m_noAck = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_noLocal);
- writer.WriteBit(m_noAck);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_noLocal); sb.Append(",");
- sb.Append(m_noAck); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileConsumeOk: RabbitMQ.Client.Impl.MethodBase, IFileConsumeOk {
- public const int ClassId = 70;
- public const int MethodId = 21;
-
- public string m_consumerTag;
-
- string IFileConsumeOk.ConsumerTag { get { return m_consumerTag; } }
-
- public FileConsumeOk() {}
- public FileConsumeOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "file.consume-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileCancel: RabbitMQ.Client.Impl.MethodBase, IFileCancel {
- public const int ClassId = 70;
- public const int MethodId = 30;
-
- public string m_consumerTag;
- public bool m_nowait;
-
- string IFileCancel.ConsumerTag { get { return m_consumerTag; } }
- bool IFileCancel.Nowait { get { return m_nowait; } }
-
- public FileCancel() {}
- public FileCancel(
- string initConsumerTag,
- bool initNowait)
- {
- m_consumerTag = initConsumerTag;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "file.cancel"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileCancelOk: RabbitMQ.Client.Impl.MethodBase, IFileCancelOk {
- public const int ClassId = 70;
- public const int MethodId = 31;
-
- public string m_consumerTag;
-
- string IFileCancelOk.ConsumerTag { get { return m_consumerTag; } }
-
- public FileCancelOk() {}
- public FileCancelOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "file.cancel-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileOpen: RabbitMQ.Client.Impl.MethodBase, IFileOpen {
- public const int ClassId = 70;
- public const int MethodId = 40;
-
- public string m_identifier;
- public ulong m_contentSize;
-
- string IFileOpen.Identifier { get { return m_identifier; } }
- ulong IFileOpen.ContentSize { get { return m_contentSize; } }
-
- public FileOpen() {}
- public FileOpen(
- string initIdentifier,
- ulong initContentSize)
- {
- m_identifier = initIdentifier;
- m_contentSize = initContentSize;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "file.open"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_identifier = reader.ReadShortstr();
- m_contentSize = reader.ReadLonglong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_identifier);
- writer.WriteLonglong(m_contentSize);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_identifier); sb.Append(",");
- sb.Append(m_contentSize);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileOpenOk: RabbitMQ.Client.Impl.MethodBase, IFileOpenOk {
- public const int ClassId = 70;
- public const int MethodId = 41;
-
- public ulong m_stagedSize;
-
- ulong IFileOpenOk.StagedSize { get { return m_stagedSize; } }
-
- public FileOpenOk() {}
- public FileOpenOk(
- ulong initStagedSize)
- {
- m_stagedSize = initStagedSize;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "file.open-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_stagedSize = reader.ReadLonglong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_stagedSize);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_stagedSize);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileStage: RabbitMQ.Client.Impl.MethodBase, IFileStage {
- public const int ClassId = 70;
- public const int MethodId = 50;
-
-
-
- public FileStage(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "file.stage"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FilePublish: RabbitMQ.Client.Impl.MethodBase, IFilePublish {
- public const int ClassId = 70;
- public const int MethodId = 60;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_routingKey;
- public bool m_mandatory;
- public bool m_immediate;
- public string m_identifier;
-
- ushort IFilePublish.Ticket { get { return m_ticket; } }
- string IFilePublish.Exchange { get { return m_exchange; } }
- string IFilePublish.RoutingKey { get { return m_routingKey; } }
- bool IFilePublish.Mandatory { get { return m_mandatory; } }
- bool IFilePublish.Immediate { get { return m_immediate; } }
- string IFilePublish.Identifier { get { return m_identifier; } }
-
- public FilePublish() {}
- public FilePublish(
- ushort initTicket,
- string initExchange,
- string initRoutingKey,
- bool initMandatory,
- bool initImmediate,
- string initIdentifier)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_mandatory = initMandatory;
- m_immediate = initImmediate;
- m_identifier = initIdentifier;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "file.publish"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_mandatory = reader.ReadBit();
- m_immediate = reader.ReadBit();
- m_identifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_mandatory);
- writer.WriteBit(m_immediate);
- writer.WriteShortstr(m_identifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_mandatory); sb.Append(",");
- sb.Append(m_immediate); sb.Append(",");
- sb.Append(m_identifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileReturn: RabbitMQ.Client.Impl.MethodBase, IFileReturn {
- public const int ClassId = 70;
- public const int MethodId = 70;
-
- public ushort m_replyCode;
- public string m_replyText;
- public string m_exchange;
- public string m_routingKey;
-
- ushort IFileReturn.ReplyCode { get { return m_replyCode; } }
- string IFileReturn.ReplyText { get { return m_replyText; } }
- string IFileReturn.Exchange { get { return m_exchange; } }
- string IFileReturn.RoutingKey { get { return m_routingKey; } }
-
- public FileReturn() {}
- public FileReturn(
- ushort initReplyCode,
- string initReplyText,
- string initExchange,
- string initRoutingKey)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 70; } }
- public override string ProtocolMethodName { get { return "file.return"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileDeliver: RabbitMQ.Client.Impl.MethodBase, IFileDeliver {
- public const int ClassId = 70;
- public const int MethodId = 80;
-
- public string m_consumerTag;
- public ulong m_deliveryTag;
- public bool m_redelivered;
- public string m_exchange;
- public string m_routingKey;
- public string m_identifier;
-
- string IFileDeliver.ConsumerTag { get { return m_consumerTag; } }
- ulong IFileDeliver.DeliveryTag { get { return m_deliveryTag; } }
- bool IFileDeliver.Redelivered { get { return m_redelivered; } }
- string IFileDeliver.Exchange { get { return m_exchange; } }
- string IFileDeliver.RoutingKey { get { return m_routingKey; } }
- string IFileDeliver.Identifier { get { return m_identifier; } }
-
- public FileDeliver() {}
- public FileDeliver(
- string initConsumerTag,
- ulong initDeliveryTag,
- bool initRedelivered,
- string initExchange,
- string initRoutingKey,
- string initIdentifier)
- {
- m_consumerTag = initConsumerTag;
- m_deliveryTag = initDeliveryTag;
- m_redelivered = initRedelivered;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_identifier = initIdentifier;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 80; } }
- public override string ProtocolMethodName { get { return "file.deliver"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_deliveryTag = reader.ReadLonglong();
- m_redelivered = reader.ReadBit();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_identifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_redelivered);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteShortstr(m_identifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_redelivered); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_identifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileAck: RabbitMQ.Client.Impl.MethodBase, IFileAck {
- public const int ClassId = 70;
- public const int MethodId = 90;
-
- public ulong m_deliveryTag;
- public bool m_multiple;
-
- ulong IFileAck.DeliveryTag { get { return m_deliveryTag; } }
- bool IFileAck.Multiple { get { return m_multiple; } }
-
- public FileAck() {}
- public FileAck(
- ulong initDeliveryTag,
- bool initMultiple)
- {
- m_deliveryTag = initDeliveryTag;
- m_multiple = initMultiple;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 90; } }
- public override string ProtocolMethodName { get { return "file.ack"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_multiple = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_multiple);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_multiple);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileReject: RabbitMQ.Client.Impl.MethodBase, IFileReject {
- public const int ClassId = 70;
- public const int MethodId = 100;
-
- public ulong m_deliveryTag;
- public bool m_requeue;
-
- ulong IFileReject.DeliveryTag { get { return m_deliveryTag; } }
- bool IFileReject.Requeue { get { return m_requeue; } }
-
- public FileReject() {}
- public FileReject(
- ulong initDeliveryTag,
- bool initRequeue)
- {
- m_deliveryTag = initDeliveryTag;
- m_requeue = initRequeue;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 100; } }
- public override string ProtocolMethodName { get { return "file.reject"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_requeue = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_requeue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_requeue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamQos: RabbitMQ.Client.Impl.MethodBase, IStreamQos {
- public const int ClassId = 80;
- public const int MethodId = 10;
-
- public uint m_prefetchSize;
- public ushort m_prefetchCount;
- public uint m_consumeRate;
- public bool m_global;
-
- uint IStreamQos.PrefetchSize { get { return m_prefetchSize; } }
- ushort IStreamQos.PrefetchCount { get { return m_prefetchCount; } }
- uint IStreamQos.ConsumeRate { get { return m_consumeRate; } }
- bool IStreamQos.Global { get { return m_global; } }
-
- public StreamQos() {}
- public StreamQos(
- uint initPrefetchSize,
- ushort initPrefetchCount,
- uint initConsumeRate,
- bool initGlobal)
- {
- m_prefetchSize = initPrefetchSize;
- m_prefetchCount = initPrefetchCount;
- m_consumeRate = initConsumeRate;
- m_global = initGlobal;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "stream.qos"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_prefetchSize = reader.ReadLong();
- m_prefetchCount = reader.ReadShort();
- m_consumeRate = reader.ReadLong();
- m_global = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_prefetchSize);
- writer.WriteShort(m_prefetchCount);
- writer.WriteLong(m_consumeRate);
- writer.WriteBit(m_global);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_prefetchSize); sb.Append(",");
- sb.Append(m_prefetchCount); sb.Append(",");
- sb.Append(m_consumeRate); sb.Append(",");
- sb.Append(m_global);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamQosOk: RabbitMQ.Client.Impl.MethodBase, IStreamQosOk {
- public const int ClassId = 80;
- public const int MethodId = 11;
-
-
-
- public StreamQosOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "stream.qos-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamConsume: RabbitMQ.Client.Impl.MethodBase, IStreamConsume {
- public const int ClassId = 80;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_consumerTag;
- public bool m_noLocal;
- public bool m_exclusive;
- public bool m_nowait;
-
- ushort IStreamConsume.Ticket { get { return m_ticket; } }
- string IStreamConsume.Queue { get { return m_queue; } }
- string IStreamConsume.ConsumerTag { get { return m_consumerTag; } }
- bool IStreamConsume.NoLocal { get { return m_noLocal; } }
- bool IStreamConsume.Exclusive { get { return m_exclusive; } }
- bool IStreamConsume.Nowait { get { return m_nowait; } }
-
- public StreamConsume() {}
- public StreamConsume(
- ushort initTicket,
- string initQueue,
- string initConsumerTag,
- bool initNoLocal,
- bool initExclusive,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_consumerTag = initConsumerTag;
- m_noLocal = initNoLocal;
- m_exclusive = initExclusive;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "stream.consume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_consumerTag = reader.ReadShortstr();
- m_noLocal = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_noLocal);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_noLocal); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamConsumeOk: RabbitMQ.Client.Impl.MethodBase, IStreamConsumeOk {
- public const int ClassId = 80;
- public const int MethodId = 21;
-
- public string m_consumerTag;
-
- string IStreamConsumeOk.ConsumerTag { get { return m_consumerTag; } }
-
- public StreamConsumeOk() {}
- public StreamConsumeOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "stream.consume-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamCancel: RabbitMQ.Client.Impl.MethodBase, IStreamCancel {
- public const int ClassId = 80;
- public const int MethodId = 30;
-
- public string m_consumerTag;
- public bool m_nowait;
-
- string IStreamCancel.ConsumerTag { get { return m_consumerTag; } }
- bool IStreamCancel.Nowait { get { return m_nowait; } }
-
- public StreamCancel() {}
- public StreamCancel(
- string initConsumerTag,
- bool initNowait)
- {
- m_consumerTag = initConsumerTag;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "stream.cancel"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamCancelOk: RabbitMQ.Client.Impl.MethodBase, IStreamCancelOk {
- public const int ClassId = 80;
- public const int MethodId = 31;
-
- public string m_consumerTag;
-
- string IStreamCancelOk.ConsumerTag { get { return m_consumerTag; } }
-
- public StreamCancelOk() {}
- public StreamCancelOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "stream.cancel-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamPublish: RabbitMQ.Client.Impl.MethodBase, IStreamPublish {
- public const int ClassId = 80;
- public const int MethodId = 40;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_routingKey;
- public bool m_mandatory;
- public bool m_immediate;
-
- ushort IStreamPublish.Ticket { get { return m_ticket; } }
- string IStreamPublish.Exchange { get { return m_exchange; } }
- string IStreamPublish.RoutingKey { get { return m_routingKey; } }
- bool IStreamPublish.Mandatory { get { return m_mandatory; } }
- bool IStreamPublish.Immediate { get { return m_immediate; } }
-
- public StreamPublish() {}
- public StreamPublish(
- ushort initTicket,
- string initExchange,
- string initRoutingKey,
- bool initMandatory,
- bool initImmediate)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_mandatory = initMandatory;
- m_immediate = initImmediate;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "stream.publish"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_mandatory = reader.ReadBit();
- m_immediate = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_mandatory);
- writer.WriteBit(m_immediate);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_mandatory); sb.Append(",");
- sb.Append(m_immediate);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamReturn: RabbitMQ.Client.Impl.MethodBase, IStreamReturn {
- public const int ClassId = 80;
- public const int MethodId = 50;
-
- public ushort m_replyCode;
- public string m_replyText;
- public string m_exchange;
- public string m_routingKey;
-
- ushort IStreamReturn.ReplyCode { get { return m_replyCode; } }
- string IStreamReturn.ReplyText { get { return m_replyText; } }
- string IStreamReturn.Exchange { get { return m_exchange; } }
- string IStreamReturn.RoutingKey { get { return m_routingKey; } }
-
- public StreamReturn() {}
- public StreamReturn(
- ushort initReplyCode,
- string initReplyText,
- string initExchange,
- string initRoutingKey)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "stream.return"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamDeliver: RabbitMQ.Client.Impl.MethodBase, IStreamDeliver {
- public const int ClassId = 80;
- public const int MethodId = 60;
-
- public string m_consumerTag;
- public ulong m_deliveryTag;
- public string m_exchange;
- public string m_queue;
-
- string IStreamDeliver.ConsumerTag { get { return m_consumerTag; } }
- ulong IStreamDeliver.DeliveryTag { get { return m_deliveryTag; } }
- string IStreamDeliver.Exchange { get { return m_exchange; } }
- string IStreamDeliver.Queue { get { return m_queue; } }
-
- public StreamDeliver() {}
- public StreamDeliver(
- string initConsumerTag,
- ulong initDeliveryTag,
- string initExchange,
- string initQueue)
- {
- m_consumerTag = initConsumerTag;
- m_deliveryTag = initDeliveryTag;
- m_exchange = initExchange;
- m_queue = initQueue;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "stream.deliver"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_deliveryTag = reader.ReadLonglong();
- m_exchange = reader.ReadShortstr();
- m_queue = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_queue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_queue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxSelect: RabbitMQ.Client.Impl.MethodBase, ITxSelect {
- public const int ClassId = 90;
- public const int MethodId = 10;
-
-
-
- public TxSelect(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "tx.select"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxSelectOk: RabbitMQ.Client.Impl.MethodBase, ITxSelectOk {
- public const int ClassId = 90;
- public const int MethodId = 11;
-
-
-
- public TxSelectOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "tx.select-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxCommit: RabbitMQ.Client.Impl.MethodBase, ITxCommit {
- public const int ClassId = 90;
- public const int MethodId = 20;
-
-
-
- public TxCommit(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "tx.commit"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxCommitOk: RabbitMQ.Client.Impl.MethodBase, ITxCommitOk {
- public const int ClassId = 90;
- public const int MethodId = 21;
-
-
-
- public TxCommitOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "tx.commit-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxRollback: RabbitMQ.Client.Impl.MethodBase, ITxRollback {
- public const int ClassId = 90;
- public const int MethodId = 30;
-
-
-
- public TxRollback(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "tx.rollback"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxRollbackOk: RabbitMQ.Client.Impl.MethodBase, ITxRollbackOk {
- public const int ClassId = 90;
- public const int MethodId = 31;
-
-
-
- public TxRollbackOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "tx.rollback-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxSelect: RabbitMQ.Client.Impl.MethodBase, IDtxSelect {
- public const int ClassId = 100;
- public const int MethodId = 10;
-
-
-
- public DtxSelect(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "dtx.select"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxSelectOk: RabbitMQ.Client.Impl.MethodBase, IDtxSelectOk {
- public const int ClassId = 100;
- public const int MethodId = 11;
-
-
-
- public DtxSelectOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "dtx.select-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxStart: RabbitMQ.Client.Impl.MethodBase, IDtxStart {
- public const int ClassId = 100;
- public const int MethodId = 20;
-
- public string m_dtxIdentifier;
-
- string IDtxStart.DtxIdentifier { get { return m_dtxIdentifier; } }
-
- public DtxStart() {}
- public DtxStart(
- string initDtxIdentifier)
- {
- m_dtxIdentifier = initDtxIdentifier;
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "dtx.start"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_dtxIdentifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_dtxIdentifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_dtxIdentifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxStartOk: RabbitMQ.Client.Impl.MethodBase, IDtxStartOk {
- public const int ClassId = 100;
- public const int MethodId = 21;
-
-
-
- public DtxStartOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "dtx.start-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TunnelRequest: RabbitMQ.Client.Impl.MethodBase, ITunnelRequest {
- public const int ClassId = 110;
- public const int MethodId = 10;
-
- public System.Collections.IDictionary m_metaData;
-
- System.Collections.IDictionary ITunnelRequest.MetaData { get { return m_metaData; } }
-
- public TunnelRequest() {}
- public TunnelRequest(
- System.Collections.IDictionary initMetaData)
- {
- m_metaData = initMetaData;
- }
-
- public override int ProtocolClassId { get { return 110; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "tunnel.request"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_metaData = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteTable(m_metaData);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_metaData);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestInteger: RabbitMQ.Client.Impl.MethodBase, ITestInteger {
- public const int ClassId = 120;
- public const int MethodId = 10;
-
- public byte m_integer1;
- public ushort m_integer2;
- public uint m_integer3;
- public ulong m_integer4;
- public byte m_operation;
-
- byte ITestInteger.Integer1 { get { return m_integer1; } }
- ushort ITestInteger.Integer2 { get { return m_integer2; } }
- uint ITestInteger.Integer3 { get { return m_integer3; } }
- ulong ITestInteger.Integer4 { get { return m_integer4; } }
- byte ITestInteger.Operation { get { return m_operation; } }
-
- public TestInteger() {}
- public TestInteger(
- byte initInteger1,
- ushort initInteger2,
- uint initInteger3,
- ulong initInteger4,
- byte initOperation)
- {
- m_integer1 = initInteger1;
- m_integer2 = initInteger2;
- m_integer3 = initInteger3;
- m_integer4 = initInteger4;
- m_operation = initOperation;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "test.integer"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_integer1 = reader.ReadOctet();
- m_integer2 = reader.ReadShort();
- m_integer3 = reader.ReadLong();
- m_integer4 = reader.ReadLonglong();
- m_operation = reader.ReadOctet();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteOctet(m_integer1);
- writer.WriteShort(m_integer2);
- writer.WriteLong(m_integer3);
- writer.WriteLonglong(m_integer4);
- writer.WriteOctet(m_operation);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_integer1); sb.Append(",");
- sb.Append(m_integer2); sb.Append(",");
- sb.Append(m_integer3); sb.Append(",");
- sb.Append(m_integer4); sb.Append(",");
- sb.Append(m_operation);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestIntegerOk: RabbitMQ.Client.Impl.MethodBase, ITestIntegerOk {
- public const int ClassId = 120;
- public const int MethodId = 11;
-
- public ulong m_result;
-
- ulong ITestIntegerOk.Result { get { return m_result; } }
-
- public TestIntegerOk() {}
- public TestIntegerOk(
- ulong initResult)
- {
- m_result = initResult;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "test.integer-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_result = reader.ReadLonglong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_result);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_result);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestString: RabbitMQ.Client.Impl.MethodBase, ITestString {
- public const int ClassId = 120;
- public const int MethodId = 20;
-
- public string m_string1;
- public byte[] m_string2;
- public byte m_operation;
-
- string ITestString.String1 { get { return m_string1; } }
- byte[] ITestString.String2 { get { return m_string2; } }
- byte ITestString.Operation { get { return m_operation; } }
-
- public TestString() {}
- public TestString(
- string initString1,
- byte[] initString2,
- byte initOperation)
- {
- m_string1 = initString1;
- m_string2 = initString2;
- m_operation = initOperation;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "test.string"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_string1 = reader.ReadShortstr();
- m_string2 = reader.ReadLongstr();
- m_operation = reader.ReadOctet();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_string1);
- writer.WriteLongstr(m_string2);
- writer.WriteOctet(m_operation);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_string1); sb.Append(",");
- sb.Append(m_string2); sb.Append(",");
- sb.Append(m_operation);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestStringOk: RabbitMQ.Client.Impl.MethodBase, ITestStringOk {
- public const int ClassId = 120;
- public const int MethodId = 21;
-
- public byte[] m_result;
-
- byte[] ITestStringOk.Result { get { return m_result; } }
-
- public TestStringOk() {}
- public TestStringOk(
- byte[] initResult)
- {
- m_result = initResult;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "test.string-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_result = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_result);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_result);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestTable: RabbitMQ.Client.Impl.MethodBase, ITestTable {
- public const int ClassId = 120;
- public const int MethodId = 30;
-
- public System.Collections.IDictionary m_table;
- public byte m_integerOp;
- public byte m_stringOp;
-
- System.Collections.IDictionary ITestTable.Table { get { return m_table; } }
- byte ITestTable.IntegerOp { get { return m_integerOp; } }
- byte ITestTable.StringOp { get { return m_stringOp; } }
-
- public TestTable() {}
- public TestTable(
- System.Collections.IDictionary initTable,
- byte initIntegerOp,
- byte initStringOp)
- {
- m_table = initTable;
- m_integerOp = initIntegerOp;
- m_stringOp = initStringOp;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "test.table"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_table = reader.ReadTable();
- m_integerOp = reader.ReadOctet();
- m_stringOp = reader.ReadOctet();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteTable(m_table);
- writer.WriteOctet(m_integerOp);
- writer.WriteOctet(m_stringOp);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_table); sb.Append(",");
- sb.Append(m_integerOp); sb.Append(",");
- sb.Append(m_stringOp);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestTableOk: RabbitMQ.Client.Impl.MethodBase, ITestTableOk {
- public const int ClassId = 120;
- public const int MethodId = 31;
-
- public ulong m_integerResult;
- public byte[] m_stringResult;
-
- ulong ITestTableOk.IntegerResult { get { return m_integerResult; } }
- byte[] ITestTableOk.StringResult { get { return m_stringResult; } }
-
- public TestTableOk() {}
- public TestTableOk(
- ulong initIntegerResult,
- byte[] initStringResult)
- {
- m_integerResult = initIntegerResult;
- m_stringResult = initStringResult;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "test.table-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_integerResult = reader.ReadLonglong();
- m_stringResult = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_integerResult);
- writer.WriteLongstr(m_stringResult);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_integerResult); sb.Append(",");
- sb.Append(m_stringResult);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestContent: RabbitMQ.Client.Impl.MethodBase, ITestContent {
- public const int ClassId = 120;
- public const int MethodId = 40;
-
-
-
- public TestContent(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "test.content"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestContentOk: RabbitMQ.Client.Impl.MethodBase, ITestContentOk {
- public const int ClassId = 120;
- public const int MethodId = 41;
-
- public uint m_contentChecksum;
-
- uint ITestContentOk.ContentChecksum { get { return m_contentChecksum; } }
-
- public TestContentOk() {}
- public TestContentOk(
- uint initContentChecksum)
- {
- m_contentChecksum = initContentChecksum;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "test.content-ok"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_contentChecksum = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_contentChecksum);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_contentChecksum);
- sb.Append(")");
- }
- }
-
- public class Model: RabbitMQ.Client.Impl.ModelBase {
- public Model(RabbitMQ.Client.Impl.ISession session): base(session) {}
- public override void _Private_BasicPublish(
- System.String @exchange,
- System.String @routingKey,
- System.Boolean @mandatory,
- System.Boolean @immediate,
- RabbitMQ.Client.IBasicProperties @basicProperties,
- System.Byte[] @body)
- {
- BasicPublish __req = new BasicPublish();
- __req.m_exchange = @exchange;
- __req.m_routingKey = @routingKey;
- __req.m_mandatory = @mandatory;
- __req.m_immediate = @immediate;
- ModelSend(__req, (BasicProperties) basicProperties,body);
- }
- public override void _Private_BasicConsume(
- System.String @queue,
- System.String @consumerTag,
- System.Boolean @noLocal,
- System.Boolean @noAck,
- System.Boolean @exclusive,
- System.Boolean @nowait,
- System.Collections.IDictionary @filter)
- {
- BasicConsume __req = new BasicConsume();
- __req.m_queue = @queue;
- __req.m_consumerTag = @consumerTag;
- __req.m_noLocal = @noLocal;
- __req.m_noAck = @noAck;
- __req.m_exclusive = @exclusive;
- __req.m_nowait = @nowait;
- if (@filter != null) {
- throw new UnsupportedMethodFieldException("_Private_BasicConsume","filter");
- }
- ModelSend(__req,null,null);
- }
- public override void _Private_BasicCancel(
- System.String @consumerTag,
- System.Boolean @nowait)
- {
- BasicCancel __req = new BasicCancel();
- __req.m_consumerTag = @consumerTag;
- __req.m_nowait = @nowait;
- ModelSend(__req,null,null);
- }
- public override void _Private_ChannelOpen(
- System.String @outOfBand)
- {
- ChannelOpen __req = new ChannelOpen();
- __req.m_outOfBand = @outOfBand;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ChannelOpenOk __rep = __repBase as ChannelOpenOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void _Private_ChannelCloseOk()
- {
- ChannelCloseOk __req = new ChannelCloseOk();
- ModelSend(__req,null,null);
- }
- public override void _Private_ChannelClose(
- System.UInt16 @replyCode,
- System.String @replyText,
- System.UInt16 @classId,
- System.UInt16 @methodId)
- {
- ChannelClose __req = new ChannelClose();
- __req.m_replyCode = @replyCode;
- __req.m_replyText = @replyText;
- __req.m_classId = @classId;
- __req.m_methodId = @methodId;
- ModelSend(__req,null,null);
- }
- public override void _Private_BasicGet(
- System.String @queue,
- System.Boolean @noAck)
- {
- BasicGet __req = new BasicGet();
- __req.m_queue = @queue;
- __req.m_noAck = @noAck;
- ModelSend(__req,null,null);
- }
- public override void _Private_ChannelFlowOk()
- {
- ChannelFlowOk __req = new ChannelFlowOk();
- ModelSend(__req,null,null);
- }
- public override RabbitMQ.Client.Impl.ConnectionTuneDetails ConnectionStartOk(
- System.Collections.IDictionary @clientProperties,
- System.String @mechanism,
- System.Byte[] @response,
- System.String @locale)
- {
- ConnectionStartOk __req = new ConnectionStartOk();
- __req.m_clientProperties = @clientProperties;
- __req.m_mechanism = @mechanism;
- __req.m_response = @response;
- __req.m_locale = @locale;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ConnectionTune __rep = __repBase as ConnectionTune;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- RabbitMQ.Client.Impl.ConnectionTuneDetails __result = new RabbitMQ.Client.Impl.ConnectionTuneDetails();
- __result.m_channelMax = __rep.m_channelMax;
- __result.m_frameMax = __rep.m_frameMax;
- __result.m_heartbeat = __rep.m_heartbeat;
- return __result;
- }
- public override void ConnectionTuneOk(
- System.UInt16 @channelMax,
- System.UInt32 @frameMax,
- System.UInt16 @heartbeat)
- {
- ConnectionTuneOk __req = new ConnectionTuneOk();
- __req.m_channelMax = @channelMax;
- __req.m_frameMax = @frameMax;
- __req.m_heartbeat = @heartbeat;
- ModelSend(__req,null,null);
- }
- public override void _Private_ConnectionOpen(
- System.String @virtualHost,
- System.String @capabilities,
- System.Boolean @insist)
- {
- ConnectionOpen __req = new ConnectionOpen();
- __req.m_virtualHost = @virtualHost;
- __req.m_capabilities = @capabilities;
- __req.m_insist = @insist;
- ModelSend(__req,null,null);
- }
- public override void _Private_ConnectionClose(
- System.UInt16 @replyCode,
- System.String @replyText,
- System.UInt16 @classId,
- System.UInt16 @methodId)
- {
- ConnectionClose __req = new ConnectionClose();
- __req.m_replyCode = @replyCode;
- __req.m_replyText = @replyText;
- __req.m_classId = @classId;
- __req.m_methodId = @methodId;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ConnectionCloseOk __rep = __repBase as ConnectionCloseOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void _Private_ConnectionCloseOk()
- {
- ConnectionCloseOk __req = new ConnectionCloseOk();
- ModelSend(__req,null,null);
- }
- public override RabbitMQ.Client.IBasicProperties CreateBasicProperties()
- {
- return new BasicProperties();
- }
- public override RabbitMQ.Client.IFileProperties CreateFileProperties()
- {
- return new FileProperties();
- }
- public override RabbitMQ.Client.IStreamProperties CreateStreamProperties()
- {
- return new StreamProperties();
- }
- public override void ChannelFlow(
- System.Boolean @active)
- {
- ChannelFlow __req = new ChannelFlow();
- __req.m_active = @active;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ChannelFlowOk __rep = __repBase as ChannelFlowOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void ExchangeDeclare(
- System.String @exchange,
- System.String @type,
- System.Boolean @passive,
- System.Boolean @durable,
- System.Boolean @autoDelete,
- System.Boolean @internal,
- System.Boolean @nowait,
- System.Collections.IDictionary @arguments)
- {
- ExchangeDeclare __req = new ExchangeDeclare();
- __req.m_exchange = @exchange;
- __req.m_type = @type;
- __req.m_passive = @passive;
- __req.m_durable = @durable;
- __req.m_autoDelete = @autoDelete;
- __req.m_internal = @internal;
- __req.m_nowait = @nowait;
- __req.m_arguments = @arguments;
- if (nowait) {
- ModelSend(__req,null,null);
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ExchangeDeclareOk __rep = __repBase as ExchangeDeclareOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void ExchangeDelete(
- System.String @exchange,
- System.Boolean @ifUnused,
- System.Boolean @nowait)
- {
- ExchangeDelete __req = new ExchangeDelete();
- __req.m_exchange = @exchange;
- __req.m_ifUnused = @ifUnused;
- __req.m_nowait = @nowait;
- if (nowait) {
- ModelSend(__req,null,null);
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ExchangeDeleteOk __rep = __repBase as ExchangeDeleteOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override System.String QueueDeclare(
- System.String @queue,
- System.Boolean @passive,
- System.Boolean @durable,
- System.Boolean @exclusive,
- System.Boolean @autoDelete,
- System.Boolean @nowait,
- System.Collections.IDictionary @arguments)
- {
- QueueDeclare __req = new QueueDeclare();
- __req.m_queue = @queue;
- __req.m_passive = @passive;
- __req.m_durable = @durable;
- __req.m_exclusive = @exclusive;
- __req.m_autoDelete = @autoDelete;
- __req.m_nowait = @nowait;
- __req.m_arguments = @arguments;
- if (nowait) {
- ModelSend(__req,null,null);
- return null;
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueDeclareOk __rep = __repBase as QueueDeclareOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- return __rep.m_queue;
- }
- public override void QueueBind(
- System.String @queue,
- System.String @exchange,
- System.String @routingKey,
- System.Boolean @nowait,
- System.Collections.IDictionary @arguments)
- {
- QueueBind __req = new QueueBind();
- __req.m_queue = @queue;
- __req.m_exchange = @exchange;
- __req.m_routingKey = @routingKey;
- __req.m_nowait = @nowait;
- __req.m_arguments = @arguments;
- if (nowait) {
- ModelSend(__req,null,null);
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueBindOk __rep = __repBase as QueueBindOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void QueueUnbind(
- System.String @queue,
- System.String @exchange,
- System.String @routingKey,
- System.Collections.IDictionary @arguments)
- {
- QueueUnbind __req = new QueueUnbind();
- __req.m_queue = @queue;
- __req.m_exchange = @exchange;
- __req.m_routingKey = @routingKey;
- __req.m_arguments = @arguments;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueUnbindOk __rep = __repBase as QueueUnbindOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override System.UInt32 QueuePurge(
- System.String @queue,
- System.Boolean @nowait)
- {
- QueuePurge __req = new QueuePurge();
- __req.m_queue = @queue;
- __req.m_nowait = @nowait;
- if (nowait) {
- ModelSend(__req,null,null);
- return 0xFFFFFFFF;
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueuePurgeOk __rep = __repBase as QueuePurgeOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- return __rep.m_messageCount;
- }
- public override System.UInt32 QueueDelete(
- System.String @queue,
- System.Boolean @ifUnused,
- System.Boolean @ifEmpty,
- System.Boolean @nowait)
- {
- QueueDelete __req = new QueueDelete();
- __req.m_queue = @queue;
- __req.m_ifUnused = @ifUnused;
- __req.m_ifEmpty = @ifEmpty;
- __req.m_nowait = @nowait;
- if (nowait) {
- ModelSend(__req,null,null);
- return 0xFFFFFFFF;
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueDeleteOk __rep = __repBase as QueueDeleteOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- return __rep.m_messageCount;
- }
- public override void BasicQos(
- System.UInt32 @prefetchSize,
- System.UInt16 @prefetchCount,
- System.Boolean @global)
- {
- BasicQos __req = new BasicQos();
- __req.m_prefetchSize = @prefetchSize;
- __req.m_prefetchCount = @prefetchCount;
- __req.m_global = @global;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- BasicQosOk __rep = __repBase as BasicQosOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void BasicAck(
- System.UInt64 @deliveryTag,
- System.Boolean @multiple)
- {
- BasicAck __req = new BasicAck();
- __req.m_deliveryTag = @deliveryTag;
- __req.m_multiple = @multiple;
- ModelSend(__req,null,null);
- }
- public override void BasicReject(
- System.UInt64 @deliveryTag,
- System.Boolean @requeue)
- {
- BasicReject __req = new BasicReject();
- __req.m_deliveryTag = @deliveryTag;
- __req.m_requeue = @requeue;
- ModelSend(__req,null,null);
- }
- public override void BasicRecover(
- System.Boolean @requeue)
- {
- BasicRecover __req = new BasicRecover();
- __req.m_requeue = @requeue;
- ModelSend(__req,null,null);
- }
- public override void TxSelect()
- {
- TxSelect __req = new TxSelect();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- TxSelectOk __rep = __repBase as TxSelectOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void TxCommit()
- {
- TxCommit __req = new TxCommit();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- TxCommitOk __rep = __repBase as TxCommitOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void TxRollback()
- {
- TxRollback __req = new TxRollback();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- TxRollbackOk __rep = __repBase as TxRollbackOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void DtxSelect()
- {
- DtxSelect __req = new DtxSelect();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- DtxSelectOk __rep = __repBase as DtxSelectOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void DtxStart(
- System.String @dtxIdentifier)
- {
- DtxStart __req = new DtxStart();
- __req.m_dtxIdentifier = @dtxIdentifier;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- DtxStartOk __rep = __repBase as DtxStartOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override bool DispatchAsynchronous(RabbitMQ.Client.Impl.Command cmd) {
- RabbitMQ.Client.Impl.MethodBase __method = (RabbitMQ.Client.Impl.MethodBase) cmd.Method;
- switch ((__method.ProtocolClassId << 16) | __method.ProtocolMethodId) {
- case 3932181: {
- BasicConsumeOk __impl = (BasicConsumeOk) __method;
- HandleBasicConsumeOk(
- __impl.m_consumerTag);
- return true;
- }
- case 3932191: {
- BasicCancelOk __impl = (BasicCancelOk) __method;
- HandleBasicCancelOk(
- __impl.m_consumerTag);
- return true;
- }
- case 3932231: {
- BasicGetOk __impl = (BasicGetOk) __method;
- HandleBasicGetOk(
- __impl.m_deliveryTag,
- __impl.m_redelivered,
- __impl.m_exchange,
- __impl.m_routingKey,
- __impl.m_messageCount,
- (RabbitMQ.Client.IBasicProperties) cmd.Header,
- cmd.Body);
- return true;
- }
- case 3932232: {
- HandleBasicGetEmpty();
- return true;
- }
- case 3932220: {
- BasicDeliver __impl = (BasicDeliver) __method;
- HandleBasicDeliver(
- __impl.m_consumerTag,
- __impl.m_deliveryTag,
- __impl.m_redelivered,
- __impl.m_exchange,
- __impl.m_routingKey,
- (RabbitMQ.Client.IBasicProperties) cmd.Header,
- cmd.Body);
- return true;
- }
- case 3932210: {
- BasicReturn __impl = (BasicReturn) __method;
- HandleBasicReturn(
- __impl.m_replyCode,
- __impl.m_replyText,
- __impl.m_exchange,
- __impl.m_routingKey,
- (RabbitMQ.Client.IBasicProperties) cmd.Header,
- cmd.Body);
- return true;
- }
- case 1310740: {
- ChannelFlow __impl = (ChannelFlow) __method;
- HandleChannelFlow(
- __impl.m_active);
- return true;
- }
- case 1310760: {
- ChannelClose __impl = (ChannelClose) __method;
- HandleChannelClose(
- __impl.m_replyCode,
- __impl.m_replyText,
- __impl.m_classId,
- __impl.m_methodId);
- return true;
- }
- case 1310761: {
- HandleChannelCloseOk();
- return true;
- }
- case 655370: {
- ConnectionStart __impl = (ConnectionStart) __method;
- HandleConnectionStart(
- __impl.m_versionMajor,
- __impl.m_versionMinor,
- __impl.m_serverProperties,
- __impl.m_mechanisms,
- __impl.m_locales);
- return true;
- }
- case 655401: {
- ConnectionOpenOk __impl = (ConnectionOpenOk) __method;
- HandleConnectionOpenOk(
- __impl.m_knownHosts);
- return true;
- }
- case 655410: {
- ConnectionRedirect __impl = (ConnectionRedirect) __method;
- HandleConnectionRedirect(
- __impl.m_host,
- __impl.m_knownHosts);
- return true;
- }
- case 655420: {
- ConnectionClose __impl = (ConnectionClose) __method;
- HandleConnectionClose(
- __impl.m_replyCode,
- __impl.m_replyText,
- __impl.m_classId,
- __impl.m_methodId);
- return true;
- }
- default: return false;
- }
- }
- }
-}
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-9.cs b/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-9.cs
deleted file mode 100644
index fd7df070eae..00000000000
--- a/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-0-9.cs
+++ /dev/null
@@ -1,6956 +0,0 @@
-// Autogenerated code. Do not edit.
-
-using RabbitMQ.Client;
-using RabbitMQ.Client.Exceptions;
-
-namespace RabbitMQ.Client.Framing.v0_9 {
- public class Protocol: RabbitMQ.Client.Framing.Impl.v0_9.ProtocolBase {
- ///<summary>Protocol major version (= 0)</summary>
- public override int MajorVersion { get { return 0; } }
- ///<summary>Protocol minor version (= 9)</summary>
- public override int MinorVersion { get { return 9; } }
- ///<summary>Protocol API name (= AMQP_0_9)</summary>
- public override string ApiName { get { return "AMQP_0_9"; } }
- ///<summary>Default TCP port (= 5672)</summary>
- public override int DefaultPort { get { return 5672; } }
-
- public override RabbitMQ.Client.Impl.MethodBase DecodeMethodFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
- ushort classId = reader.ReadUInt16();
- ushort methodId = reader.ReadUInt16();
-
- switch (classId) {
- case 10: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionStart result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionStart();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionStartOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionStartOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionSecure result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionSecure();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionSecureOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionSecureOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionTune result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionTune();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionTuneOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionTuneOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionOpen result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionOpen();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionOpenOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 42: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionRedirect result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionRedirect();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionClose result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionClose();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 51: {
- RabbitMQ.Client.Framing.Impl.v0_9.ConnectionCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ConnectionCloseOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 20: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.ChannelOpen result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelOpen();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_9.ChannelOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelOpenOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_9.ChannelFlow result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelFlow();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_9.ChannelFlowOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelFlowOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_9.ChannelClose result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelClose();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_9.ChannelCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelCloseOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_9.ChannelResume result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelResume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_9.ChannelPing result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelPing();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 70: {
- RabbitMQ.Client.Framing.Impl.v0_9.ChannelPong result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelPong();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 80: {
- RabbitMQ.Client.Framing.Impl.v0_9.ChannelOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ChannelOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 30: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.AccessRequest result = new RabbitMQ.Client.Framing.Impl.v0_9.AccessRequest();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_9.AccessRequestOk result = new RabbitMQ.Client.Framing.Impl.v0_9.AccessRequestOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 40: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeclare result = new RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeclare();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeclareOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDelete result = new RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDelete();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_9.ExchangeDeleteOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 50: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.QueueDeclare result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueDeclare();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_9.QueueDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueDeclareOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_9.QueueBind result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueBind();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_9.QueueBindOk result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueBindOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_9.QueueUnbind result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueUnbind();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 51: {
- RabbitMQ.Client.Framing.Impl.v0_9.QueueUnbindOk result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueUnbindOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_9.QueuePurge result = new RabbitMQ.Client.Framing.Impl.v0_9.QueuePurge();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_9.QueuePurgeOk result = new RabbitMQ.Client.Framing.Impl.v0_9.QueuePurgeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_9.QueueDelete result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueDelete();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_9.QueueDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_9.QueueDeleteOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 60: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicQos result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicQos();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicQosOk result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicQosOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicConsume result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicConsume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicConsumeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicCancel result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicCancel();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicCancelOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicPublish result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicPublish();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicReturn result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicReturn();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicDeliver result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicDeliver();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 70: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicGet result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicGet();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 71: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicGetOk result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicGetOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 72: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicGetEmpty result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicGetEmpty();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 80: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicAck result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicAck();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 90: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicReject result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicReject();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 100: {
- RabbitMQ.Client.Framing.Impl.v0_9.BasicRecover result = new RabbitMQ.Client.Framing.Impl.v0_9.BasicRecover();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 70: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileQos result = new RabbitMQ.Client.Framing.Impl.v0_9.FileQos();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileQosOk result = new RabbitMQ.Client.Framing.Impl.v0_9.FileQosOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileConsume result = new RabbitMQ.Client.Framing.Impl.v0_9.FileConsume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_9.FileConsumeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileCancel result = new RabbitMQ.Client.Framing.Impl.v0_9.FileCancel();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_9.FileCancelOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileOpen result = new RabbitMQ.Client.Framing.Impl.v0_9.FileOpen();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_9.FileOpenOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileStage result = new RabbitMQ.Client.Framing.Impl.v0_9.FileStage();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_9.FilePublish result = new RabbitMQ.Client.Framing.Impl.v0_9.FilePublish();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 70: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileReturn result = new RabbitMQ.Client.Framing.Impl.v0_9.FileReturn();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 80: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileDeliver result = new RabbitMQ.Client.Framing.Impl.v0_9.FileDeliver();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 90: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileAck result = new RabbitMQ.Client.Framing.Impl.v0_9.FileAck();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 100: {
- RabbitMQ.Client.Framing.Impl.v0_9.FileReject result = new RabbitMQ.Client.Framing.Impl.v0_9.FileReject();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 80: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.StreamQos result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamQos();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_9.StreamQosOk result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamQosOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_9.StreamConsume result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamConsume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_9.StreamConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamConsumeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_9.StreamCancel result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamCancel();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_9.StreamCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamCancelOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_9.StreamPublish result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamPublish();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_9.StreamReturn result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamReturn();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_9.StreamDeliver result = new RabbitMQ.Client.Framing.Impl.v0_9.StreamDeliver();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 90: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.TxSelect result = new RabbitMQ.Client.Framing.Impl.v0_9.TxSelect();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_9.TxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_9.TxSelectOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_9.TxCommit result = new RabbitMQ.Client.Framing.Impl.v0_9.TxCommit();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_9.TxCommitOk result = new RabbitMQ.Client.Framing.Impl.v0_9.TxCommitOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_9.TxRollback result = new RabbitMQ.Client.Framing.Impl.v0_9.TxRollback();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_9.TxRollbackOk result = new RabbitMQ.Client.Framing.Impl.v0_9.TxRollbackOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 100: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.DtxSelect result = new RabbitMQ.Client.Framing.Impl.v0_9.DtxSelect();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_9.DtxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_9.DtxSelectOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_9.DtxStart result = new RabbitMQ.Client.Framing.Impl.v0_9.DtxStart();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_9.DtxStartOk result = new RabbitMQ.Client.Framing.Impl.v0_9.DtxStartOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 110: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.TunnelRequest result = new RabbitMQ.Client.Framing.Impl.v0_9.TunnelRequest();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 120: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageTransfer result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageTransfer();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageConsume result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageConsume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageCancel result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageCancel();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageGet result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageGet();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageRecover result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageRecover();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageOpen result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageOpen();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 70: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageClose result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageClose();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 80: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageAppend result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageAppend();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 90: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageCheckpoint result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageCheckpoint();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 100: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageResume result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageResume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 110: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageQos result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageQos();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 500: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageOk result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 510: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageEmpty result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageEmpty();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 520: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageReject result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageReject();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 530: {
- RabbitMQ.Client.Framing.Impl.v0_9.MessageOffset result = new RabbitMQ.Client.Framing.Impl.v0_9.MessageOffset();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- default: break;
- }
- throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, methodId);
- }
-
- public override RabbitMQ.Client.Impl.ContentHeaderBase DecodeContentHeaderFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
- ushort classId = reader.ReadUInt16();
-
- switch (classId) {
- case 60: return new BasicProperties();
- case 70: return new FileProperties();
- case 80: return new StreamProperties();
- case 110: return new TunnelProperties();
- default: break;
- }
- throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, 0);
- }
- }
- public class Constants {
- ///<summary>(= 1)</summary>
- public const int FrameMethod = 1;
- ///<summary>(= 2)</summary>
- public const int FrameHeader = 2;
- ///<summary>(= 3)</summary>
- public const int FrameBody = 3;
- ///<summary>(= 4)</summary>
- public const int FrameOobMethod = 4;
- ///<summary>(= 5)</summary>
- public const int FrameOobHeader = 5;
- ///<summary>(= 6)</summary>
- public const int FrameOobBody = 6;
- ///<summary>(= 7)</summary>
- public const int FrameTrace = 7;
- ///<summary>(= 8)</summary>
- public const int FrameHeartbeat = 8;
- ///<summary>(= 4096)</summary>
- public const int FrameMinSize = 4096;
- ///<summary>(= 206)</summary>
- public const int FrameEnd = 206;
- ///<summary>(= 200)</summary>
- public const int ReplySuccess = 200;
- ///<summary>(= 310)</summary>
- public const int NotDelivered = 310;
- ///<summary>(= 311)</summary>
- public const int ContentTooLarge = 311;
- ///<summary>(= 312)</summary>
- public const int NoRoute = 312;
- ///<summary>(= 313)</summary>
- public const int NoConsumers = 313;
- ///<summary>(= 320)</summary>
- public const int ConnectionForced = 320;
- ///<summary>(= 402)</summary>
- public const int InvalidPath = 402;
- ///<summary>(= 403)</summary>
- public const int AccessRefused = 403;
- ///<summary>(= 404)</summary>
- public const int NotFound = 404;
- ///<summary>(= 405)</summary>
- public const int ResourceLocked = 405;
- ///<summary>(= 406)</summary>
- public const int PreconditionFailed = 406;
- ///<summary>(= 501)</summary>
- public const int FrameError = 501;
- ///<summary>(= 502)</summary>
- public const int SyntaxError = 502;
- ///<summary>(= 503)</summary>
- public const int CommandInvalid = 503;
- ///<summary>(= 504)</summary>
- public const int ChannelError = 504;
- ///<summary>(= 506)</summary>
- public const int ResourceError = 506;
- ///<summary>(= 530)</summary>
- public const int NotAllowed = 530;
- ///<summary>(= 540)</summary>
- public const int NotImplemented = 540;
- ///<summary>(= 541)</summary>
- public const int InternalError = 541;
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.start".</summary>
- public interface IConnectionStart: IMethod {
- byte VersionMajor { get; }
- byte VersionMinor { get; }
- System.Collections.IDictionary ServerProperties { get; }
- byte[] Mechanisms { get; }
- byte[] Locales { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.start-ok".</summary>
- public interface IConnectionStartOk: IMethod {
- System.Collections.IDictionary ClientProperties { get; }
- string Mechanism { get; }
- byte[] Response { get; }
- string Locale { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.secure".</summary>
- public interface IConnectionSecure: IMethod {
- byte[] Challenge { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.secure-ok".</summary>
- public interface IConnectionSecureOk: IMethod {
- byte[] Response { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.tune".</summary>
- public interface IConnectionTune: IMethod {
- ushort ChannelMax { get; }
- uint FrameMax { get; }
- ushort Heartbeat { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.tune-ok".</summary>
- public interface IConnectionTuneOk: IMethod {
- ushort ChannelMax { get; }
- uint FrameMax { get; }
- ushort Heartbeat { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.open".</summary>
- public interface IConnectionOpen: IMethod {
- string VirtualHost { get; }
- string Capabilities { get; }
- bool Insist { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.open-ok".</summary>
- public interface IConnectionOpenOk: IMethod {
- string KnownHosts { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.redirect".</summary>
- public interface IConnectionRedirect: IMethod {
- string Host { get; }
- string KnownHosts { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.close".</summary>
- public interface IConnectionClose: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- ushort ClassId { get; }
- ushort MethodId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.close-ok".</summary>
- public interface IConnectionCloseOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.open".</summary>
- public interface IChannelOpen: IMethod {
- string OutOfBand { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.open-ok".</summary>
- public interface IChannelOpenOk: IMethod {
- byte[] ChannelId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.flow".</summary>
- public interface IChannelFlow: IMethod {
- bool Active { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.flow-ok".</summary>
- public interface IChannelFlowOk: IMethod {
- bool Active { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.close".</summary>
- public interface IChannelClose: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- ushort ClassId { get; }
- ushort MethodId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.close-ok".</summary>
- public interface IChannelCloseOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.resume".</summary>
- public interface IChannelResume: IMethod {
- byte[] ChannelId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.ping".</summary>
- public interface IChannelPing: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.pong".</summary>
- public interface IChannelPong: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.ok".</summary>
- public interface IChannelOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "access.request".</summary>
- public interface IAccessRequest: IMethod {
- string Realm { get; }
- bool Exclusive { get; }
- bool Passive { get; }
- bool Active { get; }
- bool Write { get; }
- bool Read { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "access.request-ok".</summary>
- public interface IAccessRequestOk: IMethod {
- ushort Ticket { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.declare".</summary>
- public interface IExchangeDeclare: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string Type { get; }
- bool Passive { get; }
- bool Durable { get; }
- bool AutoDelete { get; }
- bool Internal { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.declare-ok".</summary>
- public interface IExchangeDeclareOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.delete".</summary>
- public interface IExchangeDelete: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- bool IfUnused { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.delete-ok".</summary>
- public interface IExchangeDeleteOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.declare".</summary>
- public interface IQueueDeclare: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool Passive { get; }
- bool Durable { get; }
- bool Exclusive { get; }
- bool AutoDelete { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.declare-ok".</summary>
- public interface IQueueDeclareOk: IMethod {
- string Queue { get; }
- uint MessageCount { get; }
- uint ConsumerCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.bind".</summary>
- public interface IQueueBind: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.bind-ok".</summary>
- public interface IQueueBindOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.unbind".</summary>
- public interface IQueueUnbind: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.unbind-ok".</summary>
- public interface IQueueUnbindOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.purge".</summary>
- public interface IQueuePurge: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.purge-ok".</summary>
- public interface IQueuePurgeOk: IMethod {
- uint MessageCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.delete".</summary>
- public interface IQueueDelete: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool IfUnused { get; }
- bool IfEmpty { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.delete-ok".</summary>
- public interface IQueueDeleteOk: IMethod {
- uint MessageCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.qos".</summary>
- public interface IBasicQos: IMethod {
- uint PrefetchSize { get; }
- ushort PrefetchCount { get; }
- bool Global { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.qos-ok".</summary>
- public interface IBasicQosOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.consume".</summary>
- public interface IBasicConsume: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string ConsumerTag { get; }
- bool NoLocal { get; }
- bool NoAck { get; }
- bool Exclusive { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Filter { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.consume-ok".</summary>
- public interface IBasicConsumeOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.cancel".</summary>
- public interface IBasicCancel: IMethod {
- string ConsumerTag { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.cancel-ok".</summary>
- public interface IBasicCancelOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.publish".</summary>
- public interface IBasicPublish: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Mandatory { get; }
- bool Immediate { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.return".</summary>
- public interface IBasicReturn: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.deliver".</summary>
- public interface IBasicDeliver: IMethod {
- string ConsumerTag { get; }
- ulong DeliveryTag { get; }
- bool Redelivered { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.get".</summary>
- public interface IBasicGet: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool NoAck { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.get-ok".</summary>
- public interface IBasicGetOk: IMethod {
- ulong DeliveryTag { get; }
- bool Redelivered { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- uint MessageCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.get-empty".</summary>
- public interface IBasicGetEmpty: IMethod {
- string ClusterId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.ack".</summary>
- public interface IBasicAck: IMethod {
- ulong DeliveryTag { get; }
- bool Multiple { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.reject".</summary>
- public interface IBasicReject: IMethod {
- ulong DeliveryTag { get; }
- bool Requeue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.recover".</summary>
- public interface IBasicRecover: IMethod {
- bool Requeue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.qos".</summary>
- public interface IFileQos: IMethod {
- uint PrefetchSize { get; }
- ushort PrefetchCount { get; }
- bool Global { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.qos-ok".</summary>
- public interface IFileQosOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "file.consume".</summary>
- public interface IFileConsume: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string ConsumerTag { get; }
- bool NoLocal { get; }
- bool NoAck { get; }
- bool Exclusive { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Filter { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.consume-ok".</summary>
- public interface IFileConsumeOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.cancel".</summary>
- public interface IFileCancel: IMethod {
- string ConsumerTag { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.cancel-ok".</summary>
- public interface IFileCancelOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.open".</summary>
- public interface IFileOpen: IMethod {
- string Identifier { get; }
- ulong ContentSize { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.open-ok".</summary>
- public interface IFileOpenOk: IMethod {
- ulong StagedSize { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.stage".</summary>
- public interface IFileStage: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "file.publish".</summary>
- public interface IFilePublish: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Mandatory { get; }
- bool Immediate { get; }
- string Identifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.return".</summary>
- public interface IFileReturn: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.deliver".</summary>
- public interface IFileDeliver: IMethod {
- string ConsumerTag { get; }
- ulong DeliveryTag { get; }
- bool Redelivered { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- string Identifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.ack".</summary>
- public interface IFileAck: IMethod {
- ulong DeliveryTag { get; }
- bool Multiple { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.reject".</summary>
- public interface IFileReject: IMethod {
- ulong DeliveryTag { get; }
- bool Requeue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.qos".</summary>
- public interface IStreamQos: IMethod {
- uint PrefetchSize { get; }
- ushort PrefetchCount { get; }
- uint ConsumeRate { get; }
- bool Global { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.qos-ok".</summary>
- public interface IStreamQosOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.consume".</summary>
- public interface IStreamConsume: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string ConsumerTag { get; }
- bool NoLocal { get; }
- bool Exclusive { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Filter { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.consume-ok".</summary>
- public interface IStreamConsumeOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.cancel".</summary>
- public interface IStreamCancel: IMethod {
- string ConsumerTag { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.cancel-ok".</summary>
- public interface IStreamCancelOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.publish".</summary>
- public interface IStreamPublish: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Mandatory { get; }
- bool Immediate { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.return".</summary>
- public interface IStreamReturn: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.deliver".</summary>
- public interface IStreamDeliver: IMethod {
- string ConsumerTag { get; }
- ulong DeliveryTag { get; }
- string Exchange { get; }
- string Queue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.select".</summary>
- public interface ITxSelect: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.select-ok".</summary>
- public interface ITxSelectOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.commit".</summary>
- public interface ITxCommit: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.commit-ok".</summary>
- public interface ITxCommitOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.rollback".</summary>
- public interface ITxRollback: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.rollback-ok".</summary>
- public interface ITxRollbackOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.select".</summary>
- public interface IDtxSelect: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.select-ok".</summary>
- public interface IDtxSelectOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.start".</summary>
- public interface IDtxStart: IMethod {
- string DtxIdentifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.start-ok".</summary>
- public interface IDtxStartOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tunnel.request".</summary>
- public interface ITunnelRequest: IMethod {
- System.Collections.IDictionary MetaData { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.transfer".</summary>
- public interface IMessageTransfer: IMethod {
- ushort Ticket { get; }
- string Destination { get; }
- bool Redelivered { get; }
- bool Immediate { get; }
- ulong Ttl { get; }
- byte Priority { get; }
- AmqpTimestamp Timestamp { get; }
- byte DeliveryMode { get; }
- AmqpTimestamp Expiration { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- string MessageId { get; }
- string CorrelationId { get; }
- string ReplyTo { get; }
- string ContentType { get; }
- string ContentEncoding { get; }
- string UserId { get; }
- string AppId { get; }
- string TransactionId { get; }
- byte[] SecurityToken { get; }
- System.Collections.IDictionary ApplicationHeaders { get; }
- byte[] Body { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.consume".</summary>
- public interface IMessageConsume: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string Destination { get; }
- bool NoLocal { get; }
- bool NoAck { get; }
- bool Exclusive { get; }
- System.Collections.IDictionary Filter { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.cancel".</summary>
- public interface IMessageCancel: IMethod {
- string Destination { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.get".</summary>
- public interface IMessageGet: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string Destination { get; }
- bool NoAck { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.recover".</summary>
- public interface IMessageRecover: IMethod {
- bool Requeue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.open".</summary>
- public interface IMessageOpen: IMethod {
- byte[] Reference { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.close".</summary>
- public interface IMessageClose: IMethod {
- byte[] Reference { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.append".</summary>
- public interface IMessageAppend: IMethod {
- byte[] Reference { get; }
- byte[] Bytes { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.checkpoint".</summary>
- public interface IMessageCheckpoint: IMethod {
- byte[] Reference { get; }
- string Identifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.resume".</summary>
- public interface IMessageResume: IMethod {
- byte[] Reference { get; }
- string Identifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.qos".</summary>
- public interface IMessageQos: IMethod {
- uint PrefetchSize { get; }
- ushort PrefetchCount { get; }
- bool Global { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.ok".</summary>
- public interface IMessageOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "message.empty".</summary>
- public interface IMessageEmpty: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "message.reject".</summary>
- public interface IMessageReject: IMethod {
- ushort Code { get; }
- string Text { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "message.offset".</summary>
- public interface IMessageOffset: IMethod {
- ulong Value { get; }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "basic"</summary>
- public class BasicProperties: RabbitMQ.Client.Impl.BasicProperties {
- private string m_contentType;
- private string m_contentEncoding;
- private System.Collections.IDictionary m_headers;
- private byte m_deliveryMode;
- private byte m_priority;
- private string m_correlationId;
- private string m_replyTo;
- private string m_expiration;
- private string m_messageId;
- private AmqpTimestamp m_timestamp;
- private string m_type;
- private string m_userId;
- private string m_appId;
- private string m_clusterId;
-
- private bool m_contentType_present = false;
- private bool m_contentEncoding_present = false;
- private bool m_headers_present = false;
- private bool m_deliveryMode_present = false;
- private bool m_priority_present = false;
- private bool m_correlationId_present = false;
- private bool m_replyTo_present = false;
- private bool m_expiration_present = false;
- private bool m_messageId_present = false;
- private bool m_timestamp_present = false;
- private bool m_type_present = false;
- private bool m_userId_present = false;
- private bool m_appId_present = false;
- private bool m_clusterId_present = false;
-
- public override string ContentType {
- get {
- return m_contentType;
- }
- set {
- m_contentType_present = true;
- m_contentType = value;
- }
- }
- public override string ContentEncoding {
- get {
- return m_contentEncoding;
- }
- set {
- m_contentEncoding_present = true;
- m_contentEncoding = value;
- }
- }
- public override System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public override byte DeliveryMode {
- get {
- return m_deliveryMode;
- }
- set {
- m_deliveryMode_present = true;
- m_deliveryMode = value;
- }
- }
- public override byte Priority {
- get {
- return m_priority;
- }
- set {
- m_priority_present = true;
- m_priority = value;
- }
- }
- public override string CorrelationId {
- get {
- return m_correlationId;
- }
- set {
- m_correlationId_present = true;
- m_correlationId = value;
- }
- }
- public override string ReplyTo {
- get {
- return m_replyTo;
- }
- set {
- m_replyTo_present = true;
- m_replyTo = value;
- }
- }
- public override string Expiration {
- get {
- return m_expiration;
- }
- set {
- m_expiration_present = true;
- m_expiration = value;
- }
- }
- public override string MessageId {
- get {
- return m_messageId;
- }
- set {
- m_messageId_present = true;
- m_messageId = value;
- }
- }
- public override AmqpTimestamp Timestamp {
- get {
- return m_timestamp;
- }
- set {
- m_timestamp_present = true;
- m_timestamp = value;
- }
- }
- public override string Type {
- get {
- return m_type;
- }
- set {
- m_type_present = true;
- m_type = value;
- }
- }
- public override string UserId {
- get {
- return m_userId;
- }
- set {
- m_userId_present = true;
- m_userId = value;
- }
- }
- public override string AppId {
- get {
- return m_appId;
- }
- set {
- m_appId_present = true;
- m_appId = value;
- }
- }
- public override string ClusterId {
- get {
- return m_clusterId;
- }
- set {
- m_clusterId_present = true;
- m_clusterId = value;
- }
- }
-
- public override void ClearContentType() { m_contentType_present = false; }
- public override void ClearContentEncoding() { m_contentEncoding_present = false; }
- public override void ClearHeaders() { m_headers_present = false; }
- public override void ClearDeliveryMode() { m_deliveryMode_present = false; }
- public override void ClearPriority() { m_priority_present = false; }
- public override void ClearCorrelationId() { m_correlationId_present = false; }
- public override void ClearReplyTo() { m_replyTo_present = false; }
- public override void ClearExpiration() { m_expiration_present = false; }
- public override void ClearMessageId() { m_messageId_present = false; }
- public override void ClearTimestamp() { m_timestamp_present = false; }
- public override void ClearType() { m_type_present = false; }
- public override void ClearUserId() { m_userId_present = false; }
- public override void ClearAppId() { m_appId_present = false; }
- public override void ClearClusterId() { m_clusterId_present = false; }
-
- public BasicProperties() {}
- public override int ProtocolClassId { get { return 60; } }
- public override string ProtocolClassName { get { return "basic"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_contentType_present = reader.ReadPresence();
- m_contentEncoding_present = reader.ReadPresence();
- m_headers_present = reader.ReadPresence();
- m_deliveryMode_present = reader.ReadPresence();
- m_priority_present = reader.ReadPresence();
- m_correlationId_present = reader.ReadPresence();
- m_replyTo_present = reader.ReadPresence();
- m_expiration_present = reader.ReadPresence();
- m_messageId_present = reader.ReadPresence();
- m_timestamp_present = reader.ReadPresence();
- m_type_present = reader.ReadPresence();
- m_userId_present = reader.ReadPresence();
- m_appId_present = reader.ReadPresence();
- m_clusterId_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_contentType_present) { m_contentType = reader.ReadShortstr(); }
- if (m_contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_deliveryMode_present) { m_deliveryMode = reader.ReadOctet(); }
- if (m_priority_present) { m_priority = reader.ReadOctet(); }
- if (m_correlationId_present) { m_correlationId = reader.ReadShortstr(); }
- if (m_replyTo_present) { m_replyTo = reader.ReadShortstr(); }
- if (m_expiration_present) { m_expiration = reader.ReadShortstr(); }
- if (m_messageId_present) { m_messageId = reader.ReadShortstr(); }
- if (m_timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
- if (m_type_present) { m_type = reader.ReadShortstr(); }
- if (m_userId_present) { m_userId = reader.ReadShortstr(); }
- if (m_appId_present) { m_appId = reader.ReadShortstr(); }
- if (m_clusterId_present) { m_clusterId = reader.ReadShortstr(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_contentType_present);
- writer.WritePresence(m_contentEncoding_present);
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_deliveryMode_present);
- writer.WritePresence(m_priority_present);
- writer.WritePresence(m_correlationId_present);
- writer.WritePresence(m_replyTo_present);
- writer.WritePresence(m_expiration_present);
- writer.WritePresence(m_messageId_present);
- writer.WritePresence(m_timestamp_present);
- writer.WritePresence(m_type_present);
- writer.WritePresence(m_userId_present);
- writer.WritePresence(m_appId_present);
- writer.WritePresence(m_clusterId_present);
- writer.FinishPresence();
- if (m_contentType_present) { writer.WriteShortstr(m_contentType); }
- if (m_contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_deliveryMode_present) { writer.WriteOctet(m_deliveryMode); }
- if (m_priority_present) { writer.WriteOctet(m_priority); }
- if (m_correlationId_present) { writer.WriteShortstr(m_correlationId); }
- if (m_replyTo_present) { writer.WriteShortstr(m_replyTo); }
- if (m_expiration_present) { writer.WriteShortstr(m_expiration); }
- if (m_messageId_present) { writer.WriteShortstr(m_messageId); }
- if (m_timestamp_present) { writer.WriteTimestamp(m_timestamp); }
- if (m_type_present) { writer.WriteShortstr(m_type); }
- if (m_userId_present) { writer.WriteShortstr(m_userId); }
- if (m_appId_present) { writer.WriteShortstr(m_appId); }
- if (m_clusterId_present) { writer.WriteShortstr(m_clusterId); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("content-type="); sb.Append(m_contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
- sb.Append("content-encoding="); sb.Append(m_contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("delivery-mode="); sb.Append(m_deliveryMode_present ? m_deliveryMode.ToString() : "_"); sb.Append(", ");
- sb.Append("priority="); sb.Append(m_priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
- sb.Append("correlation-id="); sb.Append(m_correlationId_present ? (m_correlationId == null ? "(null)" : m_correlationId.ToString()) : "_"); sb.Append(", ");
- sb.Append("reply-to="); sb.Append(m_replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
- sb.Append("expiration="); sb.Append(m_expiration_present ? (m_expiration == null ? "(null)" : m_expiration.ToString()) : "_"); sb.Append(", ");
- sb.Append("message-id="); sb.Append(m_messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
- sb.Append("timestamp="); sb.Append(m_timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
- sb.Append("type="); sb.Append(m_type_present ? (m_type == null ? "(null)" : m_type.ToString()) : "_"); sb.Append(", ");
- sb.Append("user-id="); sb.Append(m_userId_present ? (m_userId == null ? "(null)" : m_userId.ToString()) : "_"); sb.Append(", ");
- sb.Append("app-id="); sb.Append(m_appId_present ? (m_appId == null ? "(null)" : m_appId.ToString()) : "_"); sb.Append(", ");
- sb.Append("cluster-id="); sb.Append(m_clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "file"</summary>
- public class FileProperties: RabbitMQ.Client.Impl.FileProperties {
- private string m_contentType;
- private string m_contentEncoding;
- private System.Collections.IDictionary m_headers;
- private byte m_priority;
- private string m_replyTo;
- private string m_messageId;
- private string m_filename;
- private AmqpTimestamp m_timestamp;
- private string m_clusterId;
-
- private bool m_contentType_present = false;
- private bool m_contentEncoding_present = false;
- private bool m_headers_present = false;
- private bool m_priority_present = false;
- private bool m_replyTo_present = false;
- private bool m_messageId_present = false;
- private bool m_filename_present = false;
- private bool m_timestamp_present = false;
- private bool m_clusterId_present = false;
-
- public override string ContentType {
- get {
- return m_contentType;
- }
- set {
- m_contentType_present = true;
- m_contentType = value;
- }
- }
- public override string ContentEncoding {
- get {
- return m_contentEncoding;
- }
- set {
- m_contentEncoding_present = true;
- m_contentEncoding = value;
- }
- }
- public override System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public override byte Priority {
- get {
- return m_priority;
- }
- set {
- m_priority_present = true;
- m_priority = value;
- }
- }
- public override string ReplyTo {
- get {
- return m_replyTo;
- }
- set {
- m_replyTo_present = true;
- m_replyTo = value;
- }
- }
- public override string MessageId {
- get {
- return m_messageId;
- }
- set {
- m_messageId_present = true;
- m_messageId = value;
- }
- }
- public override string Filename {
- get {
- return m_filename;
- }
- set {
- m_filename_present = true;
- m_filename = value;
- }
- }
- public override AmqpTimestamp Timestamp {
- get {
- return m_timestamp;
- }
- set {
- m_timestamp_present = true;
- m_timestamp = value;
- }
- }
- public override string ClusterId {
- get {
- return m_clusterId;
- }
- set {
- m_clusterId_present = true;
- m_clusterId = value;
- }
- }
-
- public override void ClearContentType() { m_contentType_present = false; }
- public override void ClearContentEncoding() { m_contentEncoding_present = false; }
- public override void ClearHeaders() { m_headers_present = false; }
- public override void ClearPriority() { m_priority_present = false; }
- public override void ClearReplyTo() { m_replyTo_present = false; }
- public override void ClearMessageId() { m_messageId_present = false; }
- public override void ClearFilename() { m_filename_present = false; }
- public override void ClearTimestamp() { m_timestamp_present = false; }
- public override void ClearClusterId() { m_clusterId_present = false; }
-
- public FileProperties() {}
- public override int ProtocolClassId { get { return 70; } }
- public override string ProtocolClassName { get { return "file"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_contentType_present = reader.ReadPresence();
- m_contentEncoding_present = reader.ReadPresence();
- m_headers_present = reader.ReadPresence();
- m_priority_present = reader.ReadPresence();
- m_replyTo_present = reader.ReadPresence();
- m_messageId_present = reader.ReadPresence();
- m_filename_present = reader.ReadPresence();
- m_timestamp_present = reader.ReadPresence();
- m_clusterId_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_contentType_present) { m_contentType = reader.ReadShortstr(); }
- if (m_contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_priority_present) { m_priority = reader.ReadOctet(); }
- if (m_replyTo_present) { m_replyTo = reader.ReadShortstr(); }
- if (m_messageId_present) { m_messageId = reader.ReadShortstr(); }
- if (m_filename_present) { m_filename = reader.ReadShortstr(); }
- if (m_timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
- if (m_clusterId_present) { m_clusterId = reader.ReadShortstr(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_contentType_present);
- writer.WritePresence(m_contentEncoding_present);
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_priority_present);
- writer.WritePresence(m_replyTo_present);
- writer.WritePresence(m_messageId_present);
- writer.WritePresence(m_filename_present);
- writer.WritePresence(m_timestamp_present);
- writer.WritePresence(m_clusterId_present);
- writer.FinishPresence();
- if (m_contentType_present) { writer.WriteShortstr(m_contentType); }
- if (m_contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_priority_present) { writer.WriteOctet(m_priority); }
- if (m_replyTo_present) { writer.WriteShortstr(m_replyTo); }
- if (m_messageId_present) { writer.WriteShortstr(m_messageId); }
- if (m_filename_present) { writer.WriteShortstr(m_filename); }
- if (m_timestamp_present) { writer.WriteTimestamp(m_timestamp); }
- if (m_clusterId_present) { writer.WriteShortstr(m_clusterId); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("content-type="); sb.Append(m_contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
- sb.Append("content-encoding="); sb.Append(m_contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("priority="); sb.Append(m_priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
- sb.Append("reply-to="); sb.Append(m_replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
- sb.Append("message-id="); sb.Append(m_messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
- sb.Append("filename="); sb.Append(m_filename_present ? (m_filename == null ? "(null)" : m_filename.ToString()) : "_"); sb.Append(", ");
- sb.Append("timestamp="); sb.Append(m_timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
- sb.Append("cluster-id="); sb.Append(m_clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "stream"</summary>
- public class StreamProperties: RabbitMQ.Client.Impl.StreamProperties {
- private string m_contentType;
- private string m_contentEncoding;
- private System.Collections.IDictionary m_headers;
- private byte m_priority;
- private AmqpTimestamp m_timestamp;
-
- private bool m_contentType_present = false;
- private bool m_contentEncoding_present = false;
- private bool m_headers_present = false;
- private bool m_priority_present = false;
- private bool m_timestamp_present = false;
-
- public override string ContentType {
- get {
- return m_contentType;
- }
- set {
- m_contentType_present = true;
- m_contentType = value;
- }
- }
- public override string ContentEncoding {
- get {
- return m_contentEncoding;
- }
- set {
- m_contentEncoding_present = true;
- m_contentEncoding = value;
- }
- }
- public override System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public override byte Priority {
- get {
- return m_priority;
- }
- set {
- m_priority_present = true;
- m_priority = value;
- }
- }
- public override AmqpTimestamp Timestamp {
- get {
- return m_timestamp;
- }
- set {
- m_timestamp_present = true;
- m_timestamp = value;
- }
- }
-
- public override void ClearContentType() { m_contentType_present = false; }
- public override void ClearContentEncoding() { m_contentEncoding_present = false; }
- public override void ClearHeaders() { m_headers_present = false; }
- public override void ClearPriority() { m_priority_present = false; }
- public override void ClearTimestamp() { m_timestamp_present = false; }
-
- public StreamProperties() {}
- public override int ProtocolClassId { get { return 80; } }
- public override string ProtocolClassName { get { return "stream"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_contentType_present = reader.ReadPresence();
- m_contentEncoding_present = reader.ReadPresence();
- m_headers_present = reader.ReadPresence();
- m_priority_present = reader.ReadPresence();
- m_timestamp_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_contentType_present) { m_contentType = reader.ReadShortstr(); }
- if (m_contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_priority_present) { m_priority = reader.ReadOctet(); }
- if (m_timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_contentType_present);
- writer.WritePresence(m_contentEncoding_present);
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_priority_present);
- writer.WritePresence(m_timestamp_present);
- writer.FinishPresence();
- if (m_contentType_present) { writer.WriteShortstr(m_contentType); }
- if (m_contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_priority_present) { writer.WriteOctet(m_priority); }
- if (m_timestamp_present) { writer.WriteTimestamp(m_timestamp); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("content-type="); sb.Append(m_contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
- sb.Append("content-encoding="); sb.Append(m_contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("priority="); sb.Append(m_priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
- sb.Append("timestamp="); sb.Append(m_timestamp_present ? m_timestamp.ToString() : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "tunnel"</summary>
- public class TunnelProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
- private System.Collections.IDictionary m_headers;
- private string m_proxyName;
- private string m_dataName;
- private byte m_durable;
- private byte m_broadcast;
-
- private bool m_headers_present = false;
- private bool m_proxyName_present = false;
- private bool m_dataName_present = false;
- private bool m_durable_present = false;
- private bool m_broadcast_present = false;
-
- public System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public string ProxyName {
- get {
- return m_proxyName;
- }
- set {
- m_proxyName_present = true;
- m_proxyName = value;
- }
- }
- public string DataName {
- get {
- return m_dataName;
- }
- set {
- m_dataName_present = true;
- m_dataName = value;
- }
- }
- public byte Durable {
- get {
- return m_durable;
- }
- set {
- m_durable_present = true;
- m_durable = value;
- }
- }
- public byte Broadcast {
- get {
- return m_broadcast;
- }
- set {
- m_broadcast_present = true;
- m_broadcast = value;
- }
- }
-
- public void ClearHeaders() { m_headers_present = false; }
- public void ClearProxyName() { m_proxyName_present = false; }
- public void ClearDataName() { m_dataName_present = false; }
- public void ClearDurable() { m_durable_present = false; }
- public void ClearBroadcast() { m_broadcast_present = false; }
-
- public TunnelProperties() {}
- public override int ProtocolClassId { get { return 110; } }
- public override string ProtocolClassName { get { return "tunnel"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_headers_present = reader.ReadPresence();
- m_proxyName_present = reader.ReadPresence();
- m_dataName_present = reader.ReadPresence();
- m_durable_present = reader.ReadPresence();
- m_broadcast_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_proxyName_present) { m_proxyName = reader.ReadShortstr(); }
- if (m_dataName_present) { m_dataName = reader.ReadShortstr(); }
- if (m_durable_present) { m_durable = reader.ReadOctet(); }
- if (m_broadcast_present) { m_broadcast = reader.ReadOctet(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_proxyName_present);
- writer.WritePresence(m_dataName_present);
- writer.WritePresence(m_durable_present);
- writer.WritePresence(m_broadcast_present);
- writer.FinishPresence();
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_proxyName_present) { writer.WriteShortstr(m_proxyName); }
- if (m_dataName_present) { writer.WriteShortstr(m_dataName); }
- if (m_durable_present) { writer.WriteOctet(m_durable); }
- if (m_broadcast_present) { writer.WriteOctet(m_broadcast); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("proxy-name="); sb.Append(m_proxyName_present ? (m_proxyName == null ? "(null)" : m_proxyName.ToString()) : "_"); sb.Append(", ");
- sb.Append("data-name="); sb.Append(m_dataName_present ? (m_dataName == null ? "(null)" : m_dataName.ToString()) : "_"); sb.Append(", ");
- sb.Append("durable="); sb.Append(m_durable_present ? m_durable.ToString() : "_"); sb.Append(", ");
- sb.Append("broadcast="); sb.Append(m_broadcast_present ? m_broadcast.ToString() : "_");
- sb.Append(")");
- }
- }
-}
-namespace RabbitMQ.Client.Framing.Impl.v0_9 {
- using RabbitMQ.Client.Framing.v0_9;
- public enum ClassId {
- Connection = 10,
- Channel = 20,
- Access = 30,
- Exchange = 40,
- Queue = 50,
- Basic = 60,
- File = 70,
- Stream = 80,
- Tx = 90,
- Dtx = 100,
- Tunnel = 110,
- Message = 120,
- Invalid = -1
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionStart: RabbitMQ.Client.Impl.MethodBase, IConnectionStart {
- public const int ClassId = 10;
- public const int MethodId = 10;
-
- public byte m_versionMajor;
- public byte m_versionMinor;
- public System.Collections.IDictionary m_serverProperties;
- public byte[] m_mechanisms;
- public byte[] m_locales;
-
- byte IConnectionStart.VersionMajor { get { return m_versionMajor; } }
- byte IConnectionStart.VersionMinor { get { return m_versionMinor; } }
- System.Collections.IDictionary IConnectionStart.ServerProperties { get { return m_serverProperties; } }
- byte[] IConnectionStart.Mechanisms { get { return m_mechanisms; } }
- byte[] IConnectionStart.Locales { get { return m_locales; } }
-
- public ConnectionStart() {}
- public ConnectionStart(
- byte initVersionMajor,
- byte initVersionMinor,
- System.Collections.IDictionary initServerProperties,
- byte[] initMechanisms,
- byte[] initLocales)
- {
- m_versionMajor = initVersionMajor;
- m_versionMinor = initVersionMinor;
- m_serverProperties = initServerProperties;
- m_mechanisms = initMechanisms;
- m_locales = initLocales;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "connection.start"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_versionMajor = reader.ReadOctet();
- m_versionMinor = reader.ReadOctet();
- m_serverProperties = reader.ReadTable();
- m_mechanisms = reader.ReadLongstr();
- m_locales = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteOctet(m_versionMajor);
- writer.WriteOctet(m_versionMinor);
- writer.WriteTable(m_serverProperties);
- writer.WriteLongstr(m_mechanisms);
- writer.WriteLongstr(m_locales);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_versionMajor); sb.Append(",");
- sb.Append(m_versionMinor); sb.Append(",");
- sb.Append(m_serverProperties); sb.Append(",");
- sb.Append(m_mechanisms); sb.Append(",");
- sb.Append(m_locales);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionStartOk: RabbitMQ.Client.Impl.MethodBase, IConnectionStartOk {
- public const int ClassId = 10;
- public const int MethodId = 11;
-
- public System.Collections.IDictionary m_clientProperties;
- public string m_mechanism;
- public byte[] m_response;
- public string m_locale;
-
- System.Collections.IDictionary IConnectionStartOk.ClientProperties { get { return m_clientProperties; } }
- string IConnectionStartOk.Mechanism { get { return m_mechanism; } }
- byte[] IConnectionStartOk.Response { get { return m_response; } }
- string IConnectionStartOk.Locale { get { return m_locale; } }
-
- public ConnectionStartOk() {}
- public ConnectionStartOk(
- System.Collections.IDictionary initClientProperties,
- string initMechanism,
- byte[] initResponse,
- string initLocale)
- {
- m_clientProperties = initClientProperties;
- m_mechanism = initMechanism;
- m_response = initResponse;
- m_locale = initLocale;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "connection.start-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_clientProperties = reader.ReadTable();
- m_mechanism = reader.ReadShortstr();
- m_response = reader.ReadLongstr();
- m_locale = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteTable(m_clientProperties);
- writer.WriteShortstr(m_mechanism);
- writer.WriteLongstr(m_response);
- writer.WriteShortstr(m_locale);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_clientProperties); sb.Append(",");
- sb.Append(m_mechanism); sb.Append(",");
- sb.Append(m_response); sb.Append(",");
- sb.Append(m_locale);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionSecure: RabbitMQ.Client.Impl.MethodBase, IConnectionSecure {
- public const int ClassId = 10;
- public const int MethodId = 20;
-
- public byte[] m_challenge;
-
- byte[] IConnectionSecure.Challenge { get { return m_challenge; } }
-
- public ConnectionSecure() {}
- public ConnectionSecure(
- byte[] initChallenge)
- {
- m_challenge = initChallenge;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "connection.secure"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_challenge = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_challenge);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_challenge);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionSecureOk: RabbitMQ.Client.Impl.MethodBase, IConnectionSecureOk {
- public const int ClassId = 10;
- public const int MethodId = 21;
-
- public byte[] m_response;
-
- byte[] IConnectionSecureOk.Response { get { return m_response; } }
-
- public ConnectionSecureOk() {}
- public ConnectionSecureOk(
- byte[] initResponse)
- {
- m_response = initResponse;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "connection.secure-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_response = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_response);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_response);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionTune: RabbitMQ.Client.Impl.MethodBase, IConnectionTune {
- public const int ClassId = 10;
- public const int MethodId = 30;
-
- public ushort m_channelMax;
- public uint m_frameMax;
- public ushort m_heartbeat;
-
- ushort IConnectionTune.ChannelMax { get { return m_channelMax; } }
- uint IConnectionTune.FrameMax { get { return m_frameMax; } }
- ushort IConnectionTune.Heartbeat { get { return m_heartbeat; } }
-
- public ConnectionTune() {}
- public ConnectionTune(
- ushort initChannelMax,
- uint initFrameMax,
- ushort initHeartbeat)
- {
- m_channelMax = initChannelMax;
- m_frameMax = initFrameMax;
- m_heartbeat = initHeartbeat;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "connection.tune"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_channelMax = reader.ReadShort();
- m_frameMax = reader.ReadLong();
- m_heartbeat = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_channelMax);
- writer.WriteLong(m_frameMax);
- writer.WriteShort(m_heartbeat);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_channelMax); sb.Append(",");
- sb.Append(m_frameMax); sb.Append(",");
- sb.Append(m_heartbeat);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionTuneOk: RabbitMQ.Client.Impl.MethodBase, IConnectionTuneOk {
- public const int ClassId = 10;
- public const int MethodId = 31;
-
- public ushort m_channelMax;
- public uint m_frameMax;
- public ushort m_heartbeat;
-
- ushort IConnectionTuneOk.ChannelMax { get { return m_channelMax; } }
- uint IConnectionTuneOk.FrameMax { get { return m_frameMax; } }
- ushort IConnectionTuneOk.Heartbeat { get { return m_heartbeat; } }
-
- public ConnectionTuneOk() {}
- public ConnectionTuneOk(
- ushort initChannelMax,
- uint initFrameMax,
- ushort initHeartbeat)
- {
- m_channelMax = initChannelMax;
- m_frameMax = initFrameMax;
- m_heartbeat = initHeartbeat;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "connection.tune-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_channelMax = reader.ReadShort();
- m_frameMax = reader.ReadLong();
- m_heartbeat = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_channelMax);
- writer.WriteLong(m_frameMax);
- writer.WriteShort(m_heartbeat);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_channelMax); sb.Append(",");
- sb.Append(m_frameMax); sb.Append(",");
- sb.Append(m_heartbeat);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionOpen: RabbitMQ.Client.Impl.MethodBase, IConnectionOpen {
- public const int ClassId = 10;
- public const int MethodId = 40;
-
- public string m_virtualHost;
- public string m_capabilities;
- public bool m_insist;
-
- string IConnectionOpen.VirtualHost { get { return m_virtualHost; } }
- string IConnectionOpen.Capabilities { get { return m_capabilities; } }
- bool IConnectionOpen.Insist { get { return m_insist; } }
-
- public ConnectionOpen() {}
- public ConnectionOpen(
- string initVirtualHost,
- string initCapabilities,
- bool initInsist)
- {
- m_virtualHost = initVirtualHost;
- m_capabilities = initCapabilities;
- m_insist = initInsist;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "connection.open"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_virtualHost = reader.ReadShortstr();
- m_capabilities = reader.ReadShortstr();
- m_insist = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_virtualHost);
- writer.WriteShortstr(m_capabilities);
- writer.WriteBit(m_insist);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_virtualHost); sb.Append(",");
- sb.Append(m_capabilities); sb.Append(",");
- sb.Append(m_insist);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionOpenOk: RabbitMQ.Client.Impl.MethodBase, IConnectionOpenOk {
- public const int ClassId = 10;
- public const int MethodId = 41;
-
- public string m_knownHosts;
-
- string IConnectionOpenOk.KnownHosts { get { return m_knownHosts; } }
-
- public ConnectionOpenOk() {}
- public ConnectionOpenOk(
- string initKnownHosts)
- {
- m_knownHosts = initKnownHosts;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "connection.open-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_knownHosts = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_knownHosts);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_knownHosts);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionRedirect: RabbitMQ.Client.Impl.MethodBase, IConnectionRedirect {
- public const int ClassId = 10;
- public const int MethodId = 42;
-
- public string m_host;
- public string m_knownHosts;
-
- string IConnectionRedirect.Host { get { return m_host; } }
- string IConnectionRedirect.KnownHosts { get { return m_knownHosts; } }
-
- public ConnectionRedirect() {}
- public ConnectionRedirect(
- string initHost,
- string initKnownHosts)
- {
- m_host = initHost;
- m_knownHosts = initKnownHosts;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 42; } }
- public override string ProtocolMethodName { get { return "connection.redirect"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_host = reader.ReadShortstr();
- m_knownHosts = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_host);
- writer.WriteShortstr(m_knownHosts);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_host); sb.Append(",");
- sb.Append(m_knownHosts);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionClose: RabbitMQ.Client.Impl.MethodBase, IConnectionClose {
- public const int ClassId = 10;
- public const int MethodId = 50;
-
- public ushort m_replyCode;
- public string m_replyText;
- public ushort m_classId;
- public ushort m_methodId;
-
- ushort IConnectionClose.ReplyCode { get { return m_replyCode; } }
- string IConnectionClose.ReplyText { get { return m_replyText; } }
- ushort IConnectionClose.ClassId { get { return m_classId; } }
- ushort IConnectionClose.MethodId { get { return m_methodId; } }
-
- public ConnectionClose() {}
- public ConnectionClose(
- ushort initReplyCode,
- string initReplyText,
- ushort initClassId,
- ushort initMethodId)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_classId = initClassId;
- m_methodId = initMethodId;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "connection.close"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_classId = reader.ReadShort();
- m_methodId = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShort(m_classId);
- writer.WriteShort(m_methodId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_classId); sb.Append(",");
- sb.Append(m_methodId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionCloseOk: RabbitMQ.Client.Impl.MethodBase, IConnectionCloseOk {
- public const int ClassId = 10;
- public const int MethodId = 51;
-
-
-
- public ConnectionCloseOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 51; } }
- public override string ProtocolMethodName { get { return "connection.close-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelOpen: RabbitMQ.Client.Impl.MethodBase, IChannelOpen {
- public const int ClassId = 20;
- public const int MethodId = 10;
-
- public string m_outOfBand;
-
- string IChannelOpen.OutOfBand { get { return m_outOfBand; } }
-
- public ChannelOpen() {}
- public ChannelOpen(
- string initOutOfBand)
- {
- m_outOfBand = initOutOfBand;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "channel.open"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_outOfBand = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_outOfBand);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_outOfBand);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelOpenOk: RabbitMQ.Client.Impl.MethodBase, IChannelOpenOk {
- public const int ClassId = 20;
- public const int MethodId = 11;
-
- public byte[] m_channelId;
-
- byte[] IChannelOpenOk.ChannelId { get { return m_channelId; } }
-
- public ChannelOpenOk() {}
- public ChannelOpenOk(
- byte[] initChannelId)
- {
- m_channelId = initChannelId;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "channel.open-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_channelId = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_channelId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_channelId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelFlow: RabbitMQ.Client.Impl.MethodBase, IChannelFlow {
- public const int ClassId = 20;
- public const int MethodId = 20;
-
- public bool m_active;
-
- bool IChannelFlow.Active { get { return m_active; } }
-
- public ChannelFlow() {}
- public ChannelFlow(
- bool initActive)
- {
- m_active = initActive;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "channel.flow"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_active = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteBit(m_active);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_active);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelFlowOk: RabbitMQ.Client.Impl.MethodBase, IChannelFlowOk {
- public const int ClassId = 20;
- public const int MethodId = 21;
-
- public bool m_active;
-
- bool IChannelFlowOk.Active { get { return m_active; } }
-
- public ChannelFlowOk() {}
- public ChannelFlowOk(
- bool initActive)
- {
- m_active = initActive;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "channel.flow-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_active = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteBit(m_active);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_active);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelClose: RabbitMQ.Client.Impl.MethodBase, IChannelClose {
- public const int ClassId = 20;
- public const int MethodId = 40;
-
- public ushort m_replyCode;
- public string m_replyText;
- public ushort m_classId;
- public ushort m_methodId;
-
- ushort IChannelClose.ReplyCode { get { return m_replyCode; } }
- string IChannelClose.ReplyText { get { return m_replyText; } }
- ushort IChannelClose.ClassId { get { return m_classId; } }
- ushort IChannelClose.MethodId { get { return m_methodId; } }
-
- public ChannelClose() {}
- public ChannelClose(
- ushort initReplyCode,
- string initReplyText,
- ushort initClassId,
- ushort initMethodId)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_classId = initClassId;
- m_methodId = initMethodId;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "channel.close"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_classId = reader.ReadShort();
- m_methodId = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShort(m_classId);
- writer.WriteShort(m_methodId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_classId); sb.Append(",");
- sb.Append(m_methodId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelCloseOk: RabbitMQ.Client.Impl.MethodBase, IChannelCloseOk {
- public const int ClassId = 20;
- public const int MethodId = 41;
-
-
-
- public ChannelCloseOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "channel.close-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelResume: RabbitMQ.Client.Impl.MethodBase, IChannelResume {
- public const int ClassId = 20;
- public const int MethodId = 50;
-
- public byte[] m_channelId;
-
- byte[] IChannelResume.ChannelId { get { return m_channelId; } }
-
- public ChannelResume() {}
- public ChannelResume(
- byte[] initChannelId)
- {
- m_channelId = initChannelId;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "channel.resume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_channelId = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_channelId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_channelId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelPing: RabbitMQ.Client.Impl.MethodBase, IChannelPing {
- public const int ClassId = 20;
- public const int MethodId = 60;
-
-
-
- public ChannelPing(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "channel.ping"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelPong: RabbitMQ.Client.Impl.MethodBase, IChannelPong {
- public const int ClassId = 20;
- public const int MethodId = 70;
-
-
-
- public ChannelPong(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 70; } }
- public override string ProtocolMethodName { get { return "channel.pong"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelOk: RabbitMQ.Client.Impl.MethodBase, IChannelOk {
- public const int ClassId = 20;
- public const int MethodId = 80;
-
-
-
- public ChannelOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 80; } }
- public override string ProtocolMethodName { get { return "channel.ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class AccessRequest: RabbitMQ.Client.Impl.MethodBase, IAccessRequest {
- public const int ClassId = 30;
- public const int MethodId = 10;
-
- public string m_realm;
- public bool m_exclusive;
- public bool m_passive;
- public bool m_active;
- public bool m_write;
- public bool m_read;
-
- string IAccessRequest.Realm { get { return m_realm; } }
- bool IAccessRequest.Exclusive { get { return m_exclusive; } }
- bool IAccessRequest.Passive { get { return m_passive; } }
- bool IAccessRequest.Active { get { return m_active; } }
- bool IAccessRequest.Write { get { return m_write; } }
- bool IAccessRequest.Read { get { return m_read; } }
-
- public AccessRequest() {}
- public AccessRequest(
- string initRealm,
- bool initExclusive,
- bool initPassive,
- bool initActive,
- bool initWrite,
- bool initRead)
- {
- m_realm = initRealm;
- m_exclusive = initExclusive;
- m_passive = initPassive;
- m_active = initActive;
- m_write = initWrite;
- m_read = initRead;
- }
-
- public override int ProtocolClassId { get { return 30; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "access.request"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_realm = reader.ReadShortstr();
- m_exclusive = reader.ReadBit();
- m_passive = reader.ReadBit();
- m_active = reader.ReadBit();
- m_write = reader.ReadBit();
- m_read = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_realm);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_passive);
- writer.WriteBit(m_active);
- writer.WriteBit(m_write);
- writer.WriteBit(m_read);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_realm); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_passive); sb.Append(",");
- sb.Append(m_active); sb.Append(",");
- sb.Append(m_write); sb.Append(",");
- sb.Append(m_read);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class AccessRequestOk: RabbitMQ.Client.Impl.MethodBase, IAccessRequestOk {
- public const int ClassId = 30;
- public const int MethodId = 11;
-
- public ushort m_ticket;
-
- ushort IAccessRequestOk.Ticket { get { return m_ticket; } }
-
- public AccessRequestOk() {}
- public AccessRequestOk(
- ushort initTicket)
- {
- m_ticket = initTicket;
- }
-
- public override int ProtocolClassId { get { return 30; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "access.request-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDeclare: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclare {
- public const int ClassId = 40;
- public const int MethodId = 10;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_type;
- public bool m_passive;
- public bool m_durable;
- public bool m_autoDelete;
- public bool m_internal;
- public bool m_nowait;
- public System.Collections.IDictionary m_arguments;
-
- ushort IExchangeDeclare.Ticket { get { return m_ticket; } }
- string IExchangeDeclare.Exchange { get { return m_exchange; } }
- string IExchangeDeclare.Type { get { return m_type; } }
- bool IExchangeDeclare.Passive { get { return m_passive; } }
- bool IExchangeDeclare.Durable { get { return m_durable; } }
- bool IExchangeDeclare.AutoDelete { get { return m_autoDelete; } }
- bool IExchangeDeclare.Internal { get { return m_internal; } }
- bool IExchangeDeclare.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IExchangeDeclare.Arguments { get { return m_arguments; } }
-
- public ExchangeDeclare() {}
- public ExchangeDeclare(
- ushort initTicket,
- string initExchange,
- string initType,
- bool initPassive,
- bool initDurable,
- bool initAutoDelete,
- bool initInternal,
- bool initNowait,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_type = initType;
- m_passive = initPassive;
- m_durable = initDurable;
- m_autoDelete = initAutoDelete;
- m_internal = initInternal;
- m_nowait = initNowait;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "exchange.declare"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_type = reader.ReadShortstr();
- m_passive = reader.ReadBit();
- m_durable = reader.ReadBit();
- m_autoDelete = reader.ReadBit();
- m_internal = reader.ReadBit();
- m_nowait = reader.ReadBit();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_type);
- writer.WriteBit(m_passive);
- writer.WriteBit(m_durable);
- writer.WriteBit(m_autoDelete);
- writer.WriteBit(m_internal);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_type); sb.Append(",");
- sb.Append(m_passive); sb.Append(",");
- sb.Append(m_durable); sb.Append(",");
- sb.Append(m_autoDelete); sb.Append(",");
- sb.Append(m_internal); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDeclareOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclareOk {
- public const int ClassId = 40;
- public const int MethodId = 11;
-
-
-
- public ExchangeDeclareOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "exchange.declare-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDelete: RabbitMQ.Client.Impl.MethodBase, IExchangeDelete {
- public const int ClassId = 40;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_exchange;
- public bool m_ifUnused;
- public bool m_nowait;
-
- ushort IExchangeDelete.Ticket { get { return m_ticket; } }
- string IExchangeDelete.Exchange { get { return m_exchange; } }
- bool IExchangeDelete.IfUnused { get { return m_ifUnused; } }
- bool IExchangeDelete.Nowait { get { return m_nowait; } }
-
- public ExchangeDelete() {}
- public ExchangeDelete(
- ushort initTicket,
- string initExchange,
- bool initIfUnused,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_ifUnused = initIfUnused;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "exchange.delete"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_ifUnused = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteBit(m_ifUnused);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_ifUnused); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDeleteOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeleteOk {
- public const int ClassId = 40;
- public const int MethodId = 21;
-
-
-
- public ExchangeDeleteOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "exchange.delete-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDeclare: RabbitMQ.Client.Impl.MethodBase, IQueueDeclare {
- public const int ClassId = 50;
- public const int MethodId = 10;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_passive;
- public bool m_durable;
- public bool m_exclusive;
- public bool m_autoDelete;
- public bool m_nowait;
- public System.Collections.IDictionary m_arguments;
-
- ushort IQueueDeclare.Ticket { get { return m_ticket; } }
- string IQueueDeclare.Queue { get { return m_queue; } }
- bool IQueueDeclare.Passive { get { return m_passive; } }
- bool IQueueDeclare.Durable { get { return m_durable; } }
- bool IQueueDeclare.Exclusive { get { return m_exclusive; } }
- bool IQueueDeclare.AutoDelete { get { return m_autoDelete; } }
- bool IQueueDeclare.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IQueueDeclare.Arguments { get { return m_arguments; } }
-
- public QueueDeclare() {}
- public QueueDeclare(
- ushort initTicket,
- string initQueue,
- bool initPassive,
- bool initDurable,
- bool initExclusive,
- bool initAutoDelete,
- bool initNowait,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_passive = initPassive;
- m_durable = initDurable;
- m_exclusive = initExclusive;
- m_autoDelete = initAutoDelete;
- m_nowait = initNowait;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "queue.declare"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_passive = reader.ReadBit();
- m_durable = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_autoDelete = reader.ReadBit();
- m_nowait = reader.ReadBit();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_passive);
- writer.WriteBit(m_durable);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_autoDelete);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_passive); sb.Append(",");
- sb.Append(m_durable); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_autoDelete); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDeclareOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeclareOk {
- public const int ClassId = 50;
- public const int MethodId = 11;
-
- public string m_queue;
- public uint m_messageCount;
- public uint m_consumerCount;
-
- string IQueueDeclareOk.Queue { get { return m_queue; } }
- uint IQueueDeclareOk.MessageCount { get { return m_messageCount; } }
- uint IQueueDeclareOk.ConsumerCount { get { return m_consumerCount; } }
-
- public QueueDeclareOk() {}
- public QueueDeclareOk(
- string initQueue,
- uint initMessageCount,
- uint initConsumerCount)
- {
- m_queue = initQueue;
- m_messageCount = initMessageCount;
- m_consumerCount = initConsumerCount;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "queue.declare-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_queue = reader.ReadShortstr();
- m_messageCount = reader.ReadLong();
- m_consumerCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_queue);
- writer.WriteLong(m_messageCount);
- writer.WriteLong(m_consumerCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_messageCount); sb.Append(",");
- sb.Append(m_consumerCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueBind: RabbitMQ.Client.Impl.MethodBase, IQueueBind {
- public const int ClassId = 50;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_exchange;
- public string m_routingKey;
- public bool m_nowait;
- public System.Collections.IDictionary m_arguments;
-
- ushort IQueueBind.Ticket { get { return m_ticket; } }
- string IQueueBind.Queue { get { return m_queue; } }
- string IQueueBind.Exchange { get { return m_exchange; } }
- string IQueueBind.RoutingKey { get { return m_routingKey; } }
- bool IQueueBind.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IQueueBind.Arguments { get { return m_arguments; } }
-
- public QueueBind() {}
- public QueueBind(
- ushort initTicket,
- string initQueue,
- string initExchange,
- string initRoutingKey,
- bool initNowait,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_nowait = initNowait;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "queue.bind"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueBindOk: RabbitMQ.Client.Impl.MethodBase, IQueueBindOk {
- public const int ClassId = 50;
- public const int MethodId = 21;
-
-
-
- public QueueBindOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "queue.bind-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueUnbind: RabbitMQ.Client.Impl.MethodBase, IQueueUnbind {
- public const int ClassId = 50;
- public const int MethodId = 50;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_exchange;
- public string m_routingKey;
- public System.Collections.IDictionary m_arguments;
-
- ushort IQueueUnbind.Ticket { get { return m_ticket; } }
- string IQueueUnbind.Queue { get { return m_queue; } }
- string IQueueUnbind.Exchange { get { return m_exchange; } }
- string IQueueUnbind.RoutingKey { get { return m_routingKey; } }
- System.Collections.IDictionary IQueueUnbind.Arguments { get { return m_arguments; } }
-
- public QueueUnbind() {}
- public QueueUnbind(
- ushort initTicket,
- string initQueue,
- string initExchange,
- string initRoutingKey,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "queue.unbind"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueUnbindOk: RabbitMQ.Client.Impl.MethodBase, IQueueUnbindOk {
- public const int ClassId = 50;
- public const int MethodId = 51;
-
-
-
- public QueueUnbindOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 51; } }
- public override string ProtocolMethodName { get { return "queue.unbind-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueuePurge: RabbitMQ.Client.Impl.MethodBase, IQueuePurge {
- public const int ClassId = 50;
- public const int MethodId = 30;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_nowait;
-
- ushort IQueuePurge.Ticket { get { return m_ticket; } }
- string IQueuePurge.Queue { get { return m_queue; } }
- bool IQueuePurge.Nowait { get { return m_nowait; } }
-
- public QueuePurge() {}
- public QueuePurge(
- ushort initTicket,
- string initQueue,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "queue.purge"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueuePurgeOk: RabbitMQ.Client.Impl.MethodBase, IQueuePurgeOk {
- public const int ClassId = 50;
- public const int MethodId = 31;
-
- public uint m_messageCount;
-
- uint IQueuePurgeOk.MessageCount { get { return m_messageCount; } }
-
- public QueuePurgeOk() {}
- public QueuePurgeOk(
- uint initMessageCount)
- {
- m_messageCount = initMessageCount;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "queue.purge-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_messageCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_messageCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_messageCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDelete: RabbitMQ.Client.Impl.MethodBase, IQueueDelete {
- public const int ClassId = 50;
- public const int MethodId = 40;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_ifUnused;
- public bool m_ifEmpty;
- public bool m_nowait;
-
- ushort IQueueDelete.Ticket { get { return m_ticket; } }
- string IQueueDelete.Queue { get { return m_queue; } }
- bool IQueueDelete.IfUnused { get { return m_ifUnused; } }
- bool IQueueDelete.IfEmpty { get { return m_ifEmpty; } }
- bool IQueueDelete.Nowait { get { return m_nowait; } }
-
- public QueueDelete() {}
- public QueueDelete(
- ushort initTicket,
- string initQueue,
- bool initIfUnused,
- bool initIfEmpty,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_ifUnused = initIfUnused;
- m_ifEmpty = initIfEmpty;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "queue.delete"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_ifUnused = reader.ReadBit();
- m_ifEmpty = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_ifUnused);
- writer.WriteBit(m_ifEmpty);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_ifUnused); sb.Append(",");
- sb.Append(m_ifEmpty); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDeleteOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeleteOk {
- public const int ClassId = 50;
- public const int MethodId = 41;
-
- public uint m_messageCount;
-
- uint IQueueDeleteOk.MessageCount { get { return m_messageCount; } }
-
- public QueueDeleteOk() {}
- public QueueDeleteOk(
- uint initMessageCount)
- {
- m_messageCount = initMessageCount;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "queue.delete-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_messageCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_messageCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_messageCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicQos: RabbitMQ.Client.Impl.MethodBase, IBasicQos {
- public const int ClassId = 60;
- public const int MethodId = 10;
-
- public uint m_prefetchSize;
- public ushort m_prefetchCount;
- public bool m_global;
-
- uint IBasicQos.PrefetchSize { get { return m_prefetchSize; } }
- ushort IBasicQos.PrefetchCount { get { return m_prefetchCount; } }
- bool IBasicQos.Global { get { return m_global; } }
-
- public BasicQos() {}
- public BasicQos(
- uint initPrefetchSize,
- ushort initPrefetchCount,
- bool initGlobal)
- {
- m_prefetchSize = initPrefetchSize;
- m_prefetchCount = initPrefetchCount;
- m_global = initGlobal;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "basic.qos"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_prefetchSize = reader.ReadLong();
- m_prefetchCount = reader.ReadShort();
- m_global = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_prefetchSize);
- writer.WriteShort(m_prefetchCount);
- writer.WriteBit(m_global);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_prefetchSize); sb.Append(",");
- sb.Append(m_prefetchCount); sb.Append(",");
- sb.Append(m_global);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicQosOk: RabbitMQ.Client.Impl.MethodBase, IBasicQosOk {
- public const int ClassId = 60;
- public const int MethodId = 11;
-
-
-
- public BasicQosOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "basic.qos-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicConsume: RabbitMQ.Client.Impl.MethodBase, IBasicConsume {
- public const int ClassId = 60;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_consumerTag;
- public bool m_noLocal;
- public bool m_noAck;
- public bool m_exclusive;
- public bool m_nowait;
- public System.Collections.IDictionary m_filter;
-
- ushort IBasicConsume.Ticket { get { return m_ticket; } }
- string IBasicConsume.Queue { get { return m_queue; } }
- string IBasicConsume.ConsumerTag { get { return m_consumerTag; } }
- bool IBasicConsume.NoLocal { get { return m_noLocal; } }
- bool IBasicConsume.NoAck { get { return m_noAck; } }
- bool IBasicConsume.Exclusive { get { return m_exclusive; } }
- bool IBasicConsume.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IBasicConsume.Filter { get { return m_filter; } }
-
- public BasicConsume() {}
- public BasicConsume(
- ushort initTicket,
- string initQueue,
- string initConsumerTag,
- bool initNoLocal,
- bool initNoAck,
- bool initExclusive,
- bool initNowait,
- System.Collections.IDictionary initFilter)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_consumerTag = initConsumerTag;
- m_noLocal = initNoLocal;
- m_noAck = initNoAck;
- m_exclusive = initExclusive;
- m_nowait = initNowait;
- m_filter = initFilter;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "basic.consume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_consumerTag = reader.ReadShortstr();
- m_noLocal = reader.ReadBit();
- m_noAck = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_nowait = reader.ReadBit();
- m_filter = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_noLocal);
- writer.WriteBit(m_noAck);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_filter);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_noLocal); sb.Append(",");
- sb.Append(m_noAck); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_filter);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicConsumeOk: RabbitMQ.Client.Impl.MethodBase, IBasicConsumeOk {
- public const int ClassId = 60;
- public const int MethodId = 21;
-
- public string m_consumerTag;
-
- string IBasicConsumeOk.ConsumerTag { get { return m_consumerTag; } }
-
- public BasicConsumeOk() {}
- public BasicConsumeOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "basic.consume-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicCancel: RabbitMQ.Client.Impl.MethodBase, IBasicCancel {
- public const int ClassId = 60;
- public const int MethodId = 30;
-
- public string m_consumerTag;
- public bool m_nowait;
-
- string IBasicCancel.ConsumerTag { get { return m_consumerTag; } }
- bool IBasicCancel.Nowait { get { return m_nowait; } }
-
- public BasicCancel() {}
- public BasicCancel(
- string initConsumerTag,
- bool initNowait)
- {
- m_consumerTag = initConsumerTag;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "basic.cancel"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicCancelOk: RabbitMQ.Client.Impl.MethodBase, IBasicCancelOk {
- public const int ClassId = 60;
- public const int MethodId = 31;
-
- public string m_consumerTag;
-
- string IBasicCancelOk.ConsumerTag { get { return m_consumerTag; } }
-
- public BasicCancelOk() {}
- public BasicCancelOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "basic.cancel-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicPublish: RabbitMQ.Client.Impl.MethodBase, IBasicPublish {
- public const int ClassId = 60;
- public const int MethodId = 40;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_routingKey;
- public bool m_mandatory;
- public bool m_immediate;
-
- ushort IBasicPublish.Ticket { get { return m_ticket; } }
- string IBasicPublish.Exchange { get { return m_exchange; } }
- string IBasicPublish.RoutingKey { get { return m_routingKey; } }
- bool IBasicPublish.Mandatory { get { return m_mandatory; } }
- bool IBasicPublish.Immediate { get { return m_immediate; } }
-
- public BasicPublish() {}
- public BasicPublish(
- ushort initTicket,
- string initExchange,
- string initRoutingKey,
- bool initMandatory,
- bool initImmediate)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_mandatory = initMandatory;
- m_immediate = initImmediate;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "basic.publish"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_mandatory = reader.ReadBit();
- m_immediate = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_mandatory);
- writer.WriteBit(m_immediate);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_mandatory); sb.Append(",");
- sb.Append(m_immediate);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicReturn: RabbitMQ.Client.Impl.MethodBase, IBasicReturn {
- public const int ClassId = 60;
- public const int MethodId = 50;
-
- public ushort m_replyCode;
- public string m_replyText;
- public string m_exchange;
- public string m_routingKey;
-
- ushort IBasicReturn.ReplyCode { get { return m_replyCode; } }
- string IBasicReturn.ReplyText { get { return m_replyText; } }
- string IBasicReturn.Exchange { get { return m_exchange; } }
- string IBasicReturn.RoutingKey { get { return m_routingKey; } }
-
- public BasicReturn() {}
- public BasicReturn(
- ushort initReplyCode,
- string initReplyText,
- string initExchange,
- string initRoutingKey)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "basic.return"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicDeliver: RabbitMQ.Client.Impl.MethodBase, IBasicDeliver {
- public const int ClassId = 60;
- public const int MethodId = 60;
-
- public string m_consumerTag;
- public ulong m_deliveryTag;
- public bool m_redelivered;
- public string m_exchange;
- public string m_routingKey;
-
- string IBasicDeliver.ConsumerTag { get { return m_consumerTag; } }
- ulong IBasicDeliver.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicDeliver.Redelivered { get { return m_redelivered; } }
- string IBasicDeliver.Exchange { get { return m_exchange; } }
- string IBasicDeliver.RoutingKey { get { return m_routingKey; } }
-
- public BasicDeliver() {}
- public BasicDeliver(
- string initConsumerTag,
- ulong initDeliveryTag,
- bool initRedelivered,
- string initExchange,
- string initRoutingKey)
- {
- m_consumerTag = initConsumerTag;
- m_deliveryTag = initDeliveryTag;
- m_redelivered = initRedelivered;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "basic.deliver"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_deliveryTag = reader.ReadLonglong();
- m_redelivered = reader.ReadBit();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_redelivered);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_redelivered); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicGet: RabbitMQ.Client.Impl.MethodBase, IBasicGet {
- public const int ClassId = 60;
- public const int MethodId = 70;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_noAck;
-
- ushort IBasicGet.Ticket { get { return m_ticket; } }
- string IBasicGet.Queue { get { return m_queue; } }
- bool IBasicGet.NoAck { get { return m_noAck; } }
-
- public BasicGet() {}
- public BasicGet(
- ushort initTicket,
- string initQueue,
- bool initNoAck)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_noAck = initNoAck;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 70; } }
- public override string ProtocolMethodName { get { return "basic.get"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_noAck = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_noAck);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_noAck);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicGetOk: RabbitMQ.Client.Impl.MethodBase, IBasicGetOk {
- public const int ClassId = 60;
- public const int MethodId = 71;
-
- public ulong m_deliveryTag;
- public bool m_redelivered;
- public string m_exchange;
- public string m_routingKey;
- public uint m_messageCount;
-
- ulong IBasicGetOk.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicGetOk.Redelivered { get { return m_redelivered; } }
- string IBasicGetOk.Exchange { get { return m_exchange; } }
- string IBasicGetOk.RoutingKey { get { return m_routingKey; } }
- uint IBasicGetOk.MessageCount { get { return m_messageCount; } }
-
- public BasicGetOk() {}
- public BasicGetOk(
- ulong initDeliveryTag,
- bool initRedelivered,
- string initExchange,
- string initRoutingKey,
- uint initMessageCount)
- {
- m_deliveryTag = initDeliveryTag;
- m_redelivered = initRedelivered;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_messageCount = initMessageCount;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 71; } }
- public override string ProtocolMethodName { get { return "basic.get-ok"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_redelivered = reader.ReadBit();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_messageCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_redelivered);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteLong(m_messageCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_redelivered); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_messageCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicGetEmpty: RabbitMQ.Client.Impl.MethodBase, IBasicGetEmpty {
- public const int ClassId = 60;
- public const int MethodId = 72;
-
- public string m_clusterId;
-
- string IBasicGetEmpty.ClusterId { get { return m_clusterId; } }
-
- public BasicGetEmpty() {}
- public BasicGetEmpty(
- string initClusterId)
- {
- m_clusterId = initClusterId;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 72; } }
- public override string ProtocolMethodName { get { return "basic.get-empty"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_clusterId = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_clusterId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_clusterId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicAck: RabbitMQ.Client.Impl.MethodBase, IBasicAck {
- public const int ClassId = 60;
- public const int MethodId = 80;
-
- public ulong m_deliveryTag;
- public bool m_multiple;
-
- ulong IBasicAck.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicAck.Multiple { get { return m_multiple; } }
-
- public BasicAck() {}
- public BasicAck(
- ulong initDeliveryTag,
- bool initMultiple)
- {
- m_deliveryTag = initDeliveryTag;
- m_multiple = initMultiple;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 80; } }
- public override string ProtocolMethodName { get { return "basic.ack"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_multiple = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_multiple);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_multiple);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicReject: RabbitMQ.Client.Impl.MethodBase, IBasicReject {
- public const int ClassId = 60;
- public const int MethodId = 90;
-
- public ulong m_deliveryTag;
- public bool m_requeue;
-
- ulong IBasicReject.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicReject.Requeue { get { return m_requeue; } }
-
- public BasicReject() {}
- public BasicReject(
- ulong initDeliveryTag,
- bool initRequeue)
- {
- m_deliveryTag = initDeliveryTag;
- m_requeue = initRequeue;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 90; } }
- public override string ProtocolMethodName { get { return "basic.reject"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_requeue = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_requeue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_requeue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicRecover: RabbitMQ.Client.Impl.MethodBase, IBasicRecover {
- public const int ClassId = 60;
- public const int MethodId = 100;
-
- public bool m_requeue;
-
- bool IBasicRecover.Requeue { get { return m_requeue; } }
-
- public BasicRecover() {}
- public BasicRecover(
- bool initRequeue)
- {
- m_requeue = initRequeue;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 100; } }
- public override string ProtocolMethodName { get { return "basic.recover"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_requeue = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteBit(m_requeue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_requeue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileQos: RabbitMQ.Client.Impl.MethodBase, IFileQos {
- public const int ClassId = 70;
- public const int MethodId = 10;
-
- public uint m_prefetchSize;
- public ushort m_prefetchCount;
- public bool m_global;
-
- uint IFileQos.PrefetchSize { get { return m_prefetchSize; } }
- ushort IFileQos.PrefetchCount { get { return m_prefetchCount; } }
- bool IFileQos.Global { get { return m_global; } }
-
- public FileQos() {}
- public FileQos(
- uint initPrefetchSize,
- ushort initPrefetchCount,
- bool initGlobal)
- {
- m_prefetchSize = initPrefetchSize;
- m_prefetchCount = initPrefetchCount;
- m_global = initGlobal;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "file.qos"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_prefetchSize = reader.ReadLong();
- m_prefetchCount = reader.ReadShort();
- m_global = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_prefetchSize);
- writer.WriteShort(m_prefetchCount);
- writer.WriteBit(m_global);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_prefetchSize); sb.Append(",");
- sb.Append(m_prefetchCount); sb.Append(",");
- sb.Append(m_global);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileQosOk: RabbitMQ.Client.Impl.MethodBase, IFileQosOk {
- public const int ClassId = 70;
- public const int MethodId = 11;
-
-
-
- public FileQosOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "file.qos-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileConsume: RabbitMQ.Client.Impl.MethodBase, IFileConsume {
- public const int ClassId = 70;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_consumerTag;
- public bool m_noLocal;
- public bool m_noAck;
- public bool m_exclusive;
- public bool m_nowait;
- public System.Collections.IDictionary m_filter;
-
- ushort IFileConsume.Ticket { get { return m_ticket; } }
- string IFileConsume.Queue { get { return m_queue; } }
- string IFileConsume.ConsumerTag { get { return m_consumerTag; } }
- bool IFileConsume.NoLocal { get { return m_noLocal; } }
- bool IFileConsume.NoAck { get { return m_noAck; } }
- bool IFileConsume.Exclusive { get { return m_exclusive; } }
- bool IFileConsume.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IFileConsume.Filter { get { return m_filter; } }
-
- public FileConsume() {}
- public FileConsume(
- ushort initTicket,
- string initQueue,
- string initConsumerTag,
- bool initNoLocal,
- bool initNoAck,
- bool initExclusive,
- bool initNowait,
- System.Collections.IDictionary initFilter)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_consumerTag = initConsumerTag;
- m_noLocal = initNoLocal;
- m_noAck = initNoAck;
- m_exclusive = initExclusive;
- m_nowait = initNowait;
- m_filter = initFilter;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "file.consume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_consumerTag = reader.ReadShortstr();
- m_noLocal = reader.ReadBit();
- m_noAck = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_nowait = reader.ReadBit();
- m_filter = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_noLocal);
- writer.WriteBit(m_noAck);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_filter);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_noLocal); sb.Append(",");
- sb.Append(m_noAck); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_filter);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileConsumeOk: RabbitMQ.Client.Impl.MethodBase, IFileConsumeOk {
- public const int ClassId = 70;
- public const int MethodId = 21;
-
- public string m_consumerTag;
-
- string IFileConsumeOk.ConsumerTag { get { return m_consumerTag; } }
-
- public FileConsumeOk() {}
- public FileConsumeOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "file.consume-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileCancel: RabbitMQ.Client.Impl.MethodBase, IFileCancel {
- public const int ClassId = 70;
- public const int MethodId = 30;
-
- public string m_consumerTag;
- public bool m_nowait;
-
- string IFileCancel.ConsumerTag { get { return m_consumerTag; } }
- bool IFileCancel.Nowait { get { return m_nowait; } }
-
- public FileCancel() {}
- public FileCancel(
- string initConsumerTag,
- bool initNowait)
- {
- m_consumerTag = initConsumerTag;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "file.cancel"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileCancelOk: RabbitMQ.Client.Impl.MethodBase, IFileCancelOk {
- public const int ClassId = 70;
- public const int MethodId = 31;
-
- public string m_consumerTag;
-
- string IFileCancelOk.ConsumerTag { get { return m_consumerTag; } }
-
- public FileCancelOk() {}
- public FileCancelOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "file.cancel-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileOpen: RabbitMQ.Client.Impl.MethodBase, IFileOpen {
- public const int ClassId = 70;
- public const int MethodId = 40;
-
- public string m_identifier;
- public ulong m_contentSize;
-
- string IFileOpen.Identifier { get { return m_identifier; } }
- ulong IFileOpen.ContentSize { get { return m_contentSize; } }
-
- public FileOpen() {}
- public FileOpen(
- string initIdentifier,
- ulong initContentSize)
- {
- m_identifier = initIdentifier;
- m_contentSize = initContentSize;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "file.open"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_identifier = reader.ReadShortstr();
- m_contentSize = reader.ReadLonglong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_identifier);
- writer.WriteLonglong(m_contentSize);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_identifier); sb.Append(",");
- sb.Append(m_contentSize);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileOpenOk: RabbitMQ.Client.Impl.MethodBase, IFileOpenOk {
- public const int ClassId = 70;
- public const int MethodId = 41;
-
- public ulong m_stagedSize;
-
- ulong IFileOpenOk.StagedSize { get { return m_stagedSize; } }
-
- public FileOpenOk() {}
- public FileOpenOk(
- ulong initStagedSize)
- {
- m_stagedSize = initStagedSize;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "file.open-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_stagedSize = reader.ReadLonglong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_stagedSize);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_stagedSize);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileStage: RabbitMQ.Client.Impl.MethodBase, IFileStage {
- public const int ClassId = 70;
- public const int MethodId = 50;
-
-
-
- public FileStage(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "file.stage"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FilePublish: RabbitMQ.Client.Impl.MethodBase, IFilePublish {
- public const int ClassId = 70;
- public const int MethodId = 60;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_routingKey;
- public bool m_mandatory;
- public bool m_immediate;
- public string m_identifier;
-
- ushort IFilePublish.Ticket { get { return m_ticket; } }
- string IFilePublish.Exchange { get { return m_exchange; } }
- string IFilePublish.RoutingKey { get { return m_routingKey; } }
- bool IFilePublish.Mandatory { get { return m_mandatory; } }
- bool IFilePublish.Immediate { get { return m_immediate; } }
- string IFilePublish.Identifier { get { return m_identifier; } }
-
- public FilePublish() {}
- public FilePublish(
- ushort initTicket,
- string initExchange,
- string initRoutingKey,
- bool initMandatory,
- bool initImmediate,
- string initIdentifier)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_mandatory = initMandatory;
- m_immediate = initImmediate;
- m_identifier = initIdentifier;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "file.publish"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_mandatory = reader.ReadBit();
- m_immediate = reader.ReadBit();
- m_identifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_mandatory);
- writer.WriteBit(m_immediate);
- writer.WriteShortstr(m_identifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_mandatory); sb.Append(",");
- sb.Append(m_immediate); sb.Append(",");
- sb.Append(m_identifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileReturn: RabbitMQ.Client.Impl.MethodBase, IFileReturn {
- public const int ClassId = 70;
- public const int MethodId = 70;
-
- public ushort m_replyCode;
- public string m_replyText;
- public string m_exchange;
- public string m_routingKey;
-
- ushort IFileReturn.ReplyCode { get { return m_replyCode; } }
- string IFileReturn.ReplyText { get { return m_replyText; } }
- string IFileReturn.Exchange { get { return m_exchange; } }
- string IFileReturn.RoutingKey { get { return m_routingKey; } }
-
- public FileReturn() {}
- public FileReturn(
- ushort initReplyCode,
- string initReplyText,
- string initExchange,
- string initRoutingKey)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 70; } }
- public override string ProtocolMethodName { get { return "file.return"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileDeliver: RabbitMQ.Client.Impl.MethodBase, IFileDeliver {
- public const int ClassId = 70;
- public const int MethodId = 80;
-
- public string m_consumerTag;
- public ulong m_deliveryTag;
- public bool m_redelivered;
- public string m_exchange;
- public string m_routingKey;
- public string m_identifier;
-
- string IFileDeliver.ConsumerTag { get { return m_consumerTag; } }
- ulong IFileDeliver.DeliveryTag { get { return m_deliveryTag; } }
- bool IFileDeliver.Redelivered { get { return m_redelivered; } }
- string IFileDeliver.Exchange { get { return m_exchange; } }
- string IFileDeliver.RoutingKey { get { return m_routingKey; } }
- string IFileDeliver.Identifier { get { return m_identifier; } }
-
- public FileDeliver() {}
- public FileDeliver(
- string initConsumerTag,
- ulong initDeliveryTag,
- bool initRedelivered,
- string initExchange,
- string initRoutingKey,
- string initIdentifier)
- {
- m_consumerTag = initConsumerTag;
- m_deliveryTag = initDeliveryTag;
- m_redelivered = initRedelivered;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_identifier = initIdentifier;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 80; } }
- public override string ProtocolMethodName { get { return "file.deliver"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_deliveryTag = reader.ReadLonglong();
- m_redelivered = reader.ReadBit();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_identifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_redelivered);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteShortstr(m_identifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_redelivered); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_identifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileAck: RabbitMQ.Client.Impl.MethodBase, IFileAck {
- public const int ClassId = 70;
- public const int MethodId = 90;
-
- public ulong m_deliveryTag;
- public bool m_multiple;
-
- ulong IFileAck.DeliveryTag { get { return m_deliveryTag; } }
- bool IFileAck.Multiple { get { return m_multiple; } }
-
- public FileAck() {}
- public FileAck(
- ulong initDeliveryTag,
- bool initMultiple)
- {
- m_deliveryTag = initDeliveryTag;
- m_multiple = initMultiple;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 90; } }
- public override string ProtocolMethodName { get { return "file.ack"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_multiple = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_multiple);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_multiple);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileReject: RabbitMQ.Client.Impl.MethodBase, IFileReject {
- public const int ClassId = 70;
- public const int MethodId = 100;
-
- public ulong m_deliveryTag;
- public bool m_requeue;
-
- ulong IFileReject.DeliveryTag { get { return m_deliveryTag; } }
- bool IFileReject.Requeue { get { return m_requeue; } }
-
- public FileReject() {}
- public FileReject(
- ulong initDeliveryTag,
- bool initRequeue)
- {
- m_deliveryTag = initDeliveryTag;
- m_requeue = initRequeue;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 100; } }
- public override string ProtocolMethodName { get { return "file.reject"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_requeue = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_requeue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_requeue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamQos: RabbitMQ.Client.Impl.MethodBase, IStreamQos {
- public const int ClassId = 80;
- public const int MethodId = 10;
-
- public uint m_prefetchSize;
- public ushort m_prefetchCount;
- public uint m_consumeRate;
- public bool m_global;
-
- uint IStreamQos.PrefetchSize { get { return m_prefetchSize; } }
- ushort IStreamQos.PrefetchCount { get { return m_prefetchCount; } }
- uint IStreamQos.ConsumeRate { get { return m_consumeRate; } }
- bool IStreamQos.Global { get { return m_global; } }
-
- public StreamQos() {}
- public StreamQos(
- uint initPrefetchSize,
- ushort initPrefetchCount,
- uint initConsumeRate,
- bool initGlobal)
- {
- m_prefetchSize = initPrefetchSize;
- m_prefetchCount = initPrefetchCount;
- m_consumeRate = initConsumeRate;
- m_global = initGlobal;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "stream.qos"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_prefetchSize = reader.ReadLong();
- m_prefetchCount = reader.ReadShort();
- m_consumeRate = reader.ReadLong();
- m_global = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_prefetchSize);
- writer.WriteShort(m_prefetchCount);
- writer.WriteLong(m_consumeRate);
- writer.WriteBit(m_global);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_prefetchSize); sb.Append(",");
- sb.Append(m_prefetchCount); sb.Append(",");
- sb.Append(m_consumeRate); sb.Append(",");
- sb.Append(m_global);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamQosOk: RabbitMQ.Client.Impl.MethodBase, IStreamQosOk {
- public const int ClassId = 80;
- public const int MethodId = 11;
-
-
-
- public StreamQosOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "stream.qos-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamConsume: RabbitMQ.Client.Impl.MethodBase, IStreamConsume {
- public const int ClassId = 80;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_consumerTag;
- public bool m_noLocal;
- public bool m_exclusive;
- public bool m_nowait;
- public System.Collections.IDictionary m_filter;
-
- ushort IStreamConsume.Ticket { get { return m_ticket; } }
- string IStreamConsume.Queue { get { return m_queue; } }
- string IStreamConsume.ConsumerTag { get { return m_consumerTag; } }
- bool IStreamConsume.NoLocal { get { return m_noLocal; } }
- bool IStreamConsume.Exclusive { get { return m_exclusive; } }
- bool IStreamConsume.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IStreamConsume.Filter { get { return m_filter; } }
-
- public StreamConsume() {}
- public StreamConsume(
- ushort initTicket,
- string initQueue,
- string initConsumerTag,
- bool initNoLocal,
- bool initExclusive,
- bool initNowait,
- System.Collections.IDictionary initFilter)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_consumerTag = initConsumerTag;
- m_noLocal = initNoLocal;
- m_exclusive = initExclusive;
- m_nowait = initNowait;
- m_filter = initFilter;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "stream.consume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_consumerTag = reader.ReadShortstr();
- m_noLocal = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_nowait = reader.ReadBit();
- m_filter = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_noLocal);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_filter);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_noLocal); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_filter);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamConsumeOk: RabbitMQ.Client.Impl.MethodBase, IStreamConsumeOk {
- public const int ClassId = 80;
- public const int MethodId = 21;
-
- public string m_consumerTag;
-
- string IStreamConsumeOk.ConsumerTag { get { return m_consumerTag; } }
-
- public StreamConsumeOk() {}
- public StreamConsumeOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "stream.consume-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamCancel: RabbitMQ.Client.Impl.MethodBase, IStreamCancel {
- public const int ClassId = 80;
- public const int MethodId = 30;
-
- public string m_consumerTag;
- public bool m_nowait;
-
- string IStreamCancel.ConsumerTag { get { return m_consumerTag; } }
- bool IStreamCancel.Nowait { get { return m_nowait; } }
-
- public StreamCancel() {}
- public StreamCancel(
- string initConsumerTag,
- bool initNowait)
- {
- m_consumerTag = initConsumerTag;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "stream.cancel"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamCancelOk: RabbitMQ.Client.Impl.MethodBase, IStreamCancelOk {
- public const int ClassId = 80;
- public const int MethodId = 31;
-
- public string m_consumerTag;
-
- string IStreamCancelOk.ConsumerTag { get { return m_consumerTag; } }
-
- public StreamCancelOk() {}
- public StreamCancelOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "stream.cancel-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamPublish: RabbitMQ.Client.Impl.MethodBase, IStreamPublish {
- public const int ClassId = 80;
- public const int MethodId = 40;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_routingKey;
- public bool m_mandatory;
- public bool m_immediate;
-
- ushort IStreamPublish.Ticket { get { return m_ticket; } }
- string IStreamPublish.Exchange { get { return m_exchange; } }
- string IStreamPublish.RoutingKey { get { return m_routingKey; } }
- bool IStreamPublish.Mandatory { get { return m_mandatory; } }
- bool IStreamPublish.Immediate { get { return m_immediate; } }
-
- public StreamPublish() {}
- public StreamPublish(
- ushort initTicket,
- string initExchange,
- string initRoutingKey,
- bool initMandatory,
- bool initImmediate)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_mandatory = initMandatory;
- m_immediate = initImmediate;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "stream.publish"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_mandatory = reader.ReadBit();
- m_immediate = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_mandatory);
- writer.WriteBit(m_immediate);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_mandatory); sb.Append(",");
- sb.Append(m_immediate);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamReturn: RabbitMQ.Client.Impl.MethodBase, IStreamReturn {
- public const int ClassId = 80;
- public const int MethodId = 50;
-
- public ushort m_replyCode;
- public string m_replyText;
- public string m_exchange;
- public string m_routingKey;
-
- ushort IStreamReturn.ReplyCode { get { return m_replyCode; } }
- string IStreamReturn.ReplyText { get { return m_replyText; } }
- string IStreamReturn.Exchange { get { return m_exchange; } }
- string IStreamReturn.RoutingKey { get { return m_routingKey; } }
-
- public StreamReturn() {}
- public StreamReturn(
- ushort initReplyCode,
- string initReplyText,
- string initExchange,
- string initRoutingKey)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "stream.return"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamDeliver: RabbitMQ.Client.Impl.MethodBase, IStreamDeliver {
- public const int ClassId = 80;
- public const int MethodId = 60;
-
- public string m_consumerTag;
- public ulong m_deliveryTag;
- public string m_exchange;
- public string m_queue;
-
- string IStreamDeliver.ConsumerTag { get { return m_consumerTag; } }
- ulong IStreamDeliver.DeliveryTag { get { return m_deliveryTag; } }
- string IStreamDeliver.Exchange { get { return m_exchange; } }
- string IStreamDeliver.Queue { get { return m_queue; } }
-
- public StreamDeliver() {}
- public StreamDeliver(
- string initConsumerTag,
- ulong initDeliveryTag,
- string initExchange,
- string initQueue)
- {
- m_consumerTag = initConsumerTag;
- m_deliveryTag = initDeliveryTag;
- m_exchange = initExchange;
- m_queue = initQueue;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "stream.deliver"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_deliveryTag = reader.ReadLonglong();
- m_exchange = reader.ReadShortstr();
- m_queue = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_queue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_queue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxSelect: RabbitMQ.Client.Impl.MethodBase, ITxSelect {
- public const int ClassId = 90;
- public const int MethodId = 10;
-
-
-
- public TxSelect(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "tx.select"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxSelectOk: RabbitMQ.Client.Impl.MethodBase, ITxSelectOk {
- public const int ClassId = 90;
- public const int MethodId = 11;
-
-
-
- public TxSelectOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "tx.select-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxCommit: RabbitMQ.Client.Impl.MethodBase, ITxCommit {
- public const int ClassId = 90;
- public const int MethodId = 20;
-
-
-
- public TxCommit(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "tx.commit"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxCommitOk: RabbitMQ.Client.Impl.MethodBase, ITxCommitOk {
- public const int ClassId = 90;
- public const int MethodId = 21;
-
-
-
- public TxCommitOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "tx.commit-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxRollback: RabbitMQ.Client.Impl.MethodBase, ITxRollback {
- public const int ClassId = 90;
- public const int MethodId = 30;
-
-
-
- public TxRollback(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "tx.rollback"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxRollbackOk: RabbitMQ.Client.Impl.MethodBase, ITxRollbackOk {
- public const int ClassId = 90;
- public const int MethodId = 31;
-
-
-
- public TxRollbackOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "tx.rollback-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxSelect: RabbitMQ.Client.Impl.MethodBase, IDtxSelect {
- public const int ClassId = 100;
- public const int MethodId = 10;
-
-
-
- public DtxSelect(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "dtx.select"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxSelectOk: RabbitMQ.Client.Impl.MethodBase, IDtxSelectOk {
- public const int ClassId = 100;
- public const int MethodId = 11;
-
-
-
- public DtxSelectOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "dtx.select-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxStart: RabbitMQ.Client.Impl.MethodBase, IDtxStart {
- public const int ClassId = 100;
- public const int MethodId = 20;
-
- public string m_dtxIdentifier;
-
- string IDtxStart.DtxIdentifier { get { return m_dtxIdentifier; } }
-
- public DtxStart() {}
- public DtxStart(
- string initDtxIdentifier)
- {
- m_dtxIdentifier = initDtxIdentifier;
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "dtx.start"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_dtxIdentifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_dtxIdentifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_dtxIdentifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxStartOk: RabbitMQ.Client.Impl.MethodBase, IDtxStartOk {
- public const int ClassId = 100;
- public const int MethodId = 21;
-
-
-
- public DtxStartOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "dtx.start-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TunnelRequest: RabbitMQ.Client.Impl.MethodBase, ITunnelRequest {
- public const int ClassId = 110;
- public const int MethodId = 10;
-
- public System.Collections.IDictionary m_metaData;
-
- System.Collections.IDictionary ITunnelRequest.MetaData { get { return m_metaData; } }
-
- public TunnelRequest() {}
- public TunnelRequest(
- System.Collections.IDictionary initMetaData)
- {
- m_metaData = initMetaData;
- }
-
- public override int ProtocolClassId { get { return 110; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "tunnel.request"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_metaData = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteTable(m_metaData);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_metaData);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageTransfer: RabbitMQ.Client.Impl.MethodBase, IMessageTransfer {
- public const int ClassId = 120;
- public const int MethodId = 10;
-
- public ushort m_ticket;
- public string m_destination;
- public bool m_redelivered;
- public bool m_immediate;
- public ulong m_ttl;
- public byte m_priority;
- public AmqpTimestamp m_timestamp;
- public byte m_deliveryMode;
- public AmqpTimestamp m_expiration;
- public string m_exchange;
- public string m_routingKey;
- public string m_messageId;
- public string m_correlationId;
- public string m_replyTo;
- public string m_contentType;
- public string m_contentEncoding;
- public string m_userId;
- public string m_appId;
- public string m_transactionId;
- public byte[] m_securityToken;
- public System.Collections.IDictionary m_applicationHeaders;
- public byte[] m_body;
-
- ushort IMessageTransfer.Ticket { get { return m_ticket; } }
- string IMessageTransfer.Destination { get { return m_destination; } }
- bool IMessageTransfer.Redelivered { get { return m_redelivered; } }
- bool IMessageTransfer.Immediate { get { return m_immediate; } }
- ulong IMessageTransfer.Ttl { get { return m_ttl; } }
- byte IMessageTransfer.Priority { get { return m_priority; } }
- AmqpTimestamp IMessageTransfer.Timestamp { get { return m_timestamp; } }
- byte IMessageTransfer.DeliveryMode { get { return m_deliveryMode; } }
- AmqpTimestamp IMessageTransfer.Expiration { get { return m_expiration; } }
- string IMessageTransfer.Exchange { get { return m_exchange; } }
- string IMessageTransfer.RoutingKey { get { return m_routingKey; } }
- string IMessageTransfer.MessageId { get { return m_messageId; } }
- string IMessageTransfer.CorrelationId { get { return m_correlationId; } }
- string IMessageTransfer.ReplyTo { get { return m_replyTo; } }
- string IMessageTransfer.ContentType { get { return m_contentType; } }
- string IMessageTransfer.ContentEncoding { get { return m_contentEncoding; } }
- string IMessageTransfer.UserId { get { return m_userId; } }
- string IMessageTransfer.AppId { get { return m_appId; } }
- string IMessageTransfer.TransactionId { get { return m_transactionId; } }
- byte[] IMessageTransfer.SecurityToken { get { return m_securityToken; } }
- System.Collections.IDictionary IMessageTransfer.ApplicationHeaders { get { return m_applicationHeaders; } }
- byte[] IMessageTransfer.Body { get { return m_body; } }
-
- public MessageTransfer() {}
- public MessageTransfer(
- ushort initTicket,
- string initDestination,
- bool initRedelivered,
- bool initImmediate,
- ulong initTtl,
- byte initPriority,
- AmqpTimestamp initTimestamp,
- byte initDeliveryMode,
- AmqpTimestamp initExpiration,
- string initExchange,
- string initRoutingKey,
- string initMessageId,
- string initCorrelationId,
- string initReplyTo,
- string initContentType,
- string initContentEncoding,
- string initUserId,
- string initAppId,
- string initTransactionId,
- byte[] initSecurityToken,
- System.Collections.IDictionary initApplicationHeaders,
- byte[] initBody)
- {
- m_ticket = initTicket;
- m_destination = initDestination;
- m_redelivered = initRedelivered;
- m_immediate = initImmediate;
- m_ttl = initTtl;
- m_priority = initPriority;
- m_timestamp = initTimestamp;
- m_deliveryMode = initDeliveryMode;
- m_expiration = initExpiration;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_messageId = initMessageId;
- m_correlationId = initCorrelationId;
- m_replyTo = initReplyTo;
- m_contentType = initContentType;
- m_contentEncoding = initContentEncoding;
- m_userId = initUserId;
- m_appId = initAppId;
- m_transactionId = initTransactionId;
- m_securityToken = initSecurityToken;
- m_applicationHeaders = initApplicationHeaders;
- m_body = initBody;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "message.transfer"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_destination = reader.ReadShortstr();
- m_redelivered = reader.ReadBit();
- m_immediate = reader.ReadBit();
- m_ttl = reader.ReadLonglong();
- m_priority = reader.ReadOctet();
- m_timestamp = reader.ReadTimestamp();
- m_deliveryMode = reader.ReadOctet();
- m_expiration = reader.ReadTimestamp();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_messageId = reader.ReadShortstr();
- m_correlationId = reader.ReadShortstr();
- m_replyTo = reader.ReadShortstr();
- m_contentType = reader.ReadShortstr();
- m_contentEncoding = reader.ReadShortstr();
- m_userId = reader.ReadShortstr();
- m_appId = reader.ReadShortstr();
- m_transactionId = reader.ReadShortstr();
- m_securityToken = reader.ReadLongstr();
- m_applicationHeaders = reader.ReadTable();
- m_body = reader.ReadContent();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_destination);
- writer.WriteBit(m_redelivered);
- writer.WriteBit(m_immediate);
- writer.WriteLonglong(m_ttl);
- writer.WriteOctet(m_priority);
- writer.WriteTimestamp(m_timestamp);
- writer.WriteOctet(m_deliveryMode);
- writer.WriteTimestamp(m_expiration);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteShortstr(m_messageId);
- writer.WriteShortstr(m_correlationId);
- writer.WriteShortstr(m_replyTo);
- writer.WriteShortstr(m_contentType);
- writer.WriteShortstr(m_contentEncoding);
- writer.WriteShortstr(m_userId);
- writer.WriteShortstr(m_appId);
- writer.WriteShortstr(m_transactionId);
- writer.WriteLongstr(m_securityToken);
- writer.WriteTable(m_applicationHeaders);
- writer.WriteContent(m_body);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_destination); sb.Append(",");
- sb.Append(m_redelivered); sb.Append(",");
- sb.Append(m_immediate); sb.Append(",");
- sb.Append(m_ttl); sb.Append(",");
- sb.Append(m_priority); sb.Append(",");
- sb.Append(m_timestamp); sb.Append(",");
- sb.Append(m_deliveryMode); sb.Append(",");
- sb.Append(m_expiration); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_messageId); sb.Append(",");
- sb.Append(m_correlationId); sb.Append(",");
- sb.Append(m_replyTo); sb.Append(",");
- sb.Append(m_contentType); sb.Append(",");
- sb.Append(m_contentEncoding); sb.Append(",");
- sb.Append(m_userId); sb.Append(",");
- sb.Append(m_appId); sb.Append(",");
- sb.Append(m_transactionId); sb.Append(",");
- sb.Append(m_securityToken); sb.Append(",");
- sb.Append(m_applicationHeaders); sb.Append(",");
- sb.Append(m_body);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageConsume: RabbitMQ.Client.Impl.MethodBase, IMessageConsume {
- public const int ClassId = 120;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_destination;
- public bool m_noLocal;
- public bool m_noAck;
- public bool m_exclusive;
- public System.Collections.IDictionary m_filter;
-
- ushort IMessageConsume.Ticket { get { return m_ticket; } }
- string IMessageConsume.Queue { get { return m_queue; } }
- string IMessageConsume.Destination { get { return m_destination; } }
- bool IMessageConsume.NoLocal { get { return m_noLocal; } }
- bool IMessageConsume.NoAck { get { return m_noAck; } }
- bool IMessageConsume.Exclusive { get { return m_exclusive; } }
- System.Collections.IDictionary IMessageConsume.Filter { get { return m_filter; } }
-
- public MessageConsume() {}
- public MessageConsume(
- ushort initTicket,
- string initQueue,
- string initDestination,
- bool initNoLocal,
- bool initNoAck,
- bool initExclusive,
- System.Collections.IDictionary initFilter)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_destination = initDestination;
- m_noLocal = initNoLocal;
- m_noAck = initNoAck;
- m_exclusive = initExclusive;
- m_filter = initFilter;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "message.consume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_destination = reader.ReadShortstr();
- m_noLocal = reader.ReadBit();
- m_noAck = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_filter = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_destination);
- writer.WriteBit(m_noLocal);
- writer.WriteBit(m_noAck);
- writer.WriteBit(m_exclusive);
- writer.WriteTable(m_filter);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_destination); sb.Append(",");
- sb.Append(m_noLocal); sb.Append(",");
- sb.Append(m_noAck); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_filter);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageCancel: RabbitMQ.Client.Impl.MethodBase, IMessageCancel {
- public const int ClassId = 120;
- public const int MethodId = 30;
-
- public string m_destination;
-
- string IMessageCancel.Destination { get { return m_destination; } }
-
- public MessageCancel() {}
- public MessageCancel(
- string initDestination)
- {
- m_destination = initDestination;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "message.cancel"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_destination = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_destination);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_destination);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageGet: RabbitMQ.Client.Impl.MethodBase, IMessageGet {
- public const int ClassId = 120;
- public const int MethodId = 40;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_destination;
- public bool m_noAck;
-
- ushort IMessageGet.Ticket { get { return m_ticket; } }
- string IMessageGet.Queue { get { return m_queue; } }
- string IMessageGet.Destination { get { return m_destination; } }
- bool IMessageGet.NoAck { get { return m_noAck; } }
-
- public MessageGet() {}
- public MessageGet(
- ushort initTicket,
- string initQueue,
- string initDestination,
- bool initNoAck)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_destination = initDestination;
- m_noAck = initNoAck;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "message.get"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_destination = reader.ReadShortstr();
- m_noAck = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_destination);
- writer.WriteBit(m_noAck);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_destination); sb.Append(",");
- sb.Append(m_noAck);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageRecover: RabbitMQ.Client.Impl.MethodBase, IMessageRecover {
- public const int ClassId = 120;
- public const int MethodId = 50;
-
- public bool m_requeue;
-
- bool IMessageRecover.Requeue { get { return m_requeue; } }
-
- public MessageRecover() {}
- public MessageRecover(
- bool initRequeue)
- {
- m_requeue = initRequeue;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "message.recover"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_requeue = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteBit(m_requeue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_requeue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageOpen: RabbitMQ.Client.Impl.MethodBase, IMessageOpen {
- public const int ClassId = 120;
- public const int MethodId = 60;
-
- public byte[] m_reference;
-
- byte[] IMessageOpen.Reference { get { return m_reference; } }
-
- public MessageOpen() {}
- public MessageOpen(
- byte[] initReference)
- {
- m_reference = initReference;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "message.open"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_reference = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_reference);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_reference);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageClose: RabbitMQ.Client.Impl.MethodBase, IMessageClose {
- public const int ClassId = 120;
- public const int MethodId = 70;
-
- public byte[] m_reference;
-
- byte[] IMessageClose.Reference { get { return m_reference; } }
-
- public MessageClose() {}
- public MessageClose(
- byte[] initReference)
- {
- m_reference = initReference;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 70; } }
- public override string ProtocolMethodName { get { return "message.close"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_reference = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_reference);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_reference);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageAppend: RabbitMQ.Client.Impl.MethodBase, IMessageAppend {
- public const int ClassId = 120;
- public const int MethodId = 80;
-
- public byte[] m_reference;
- public byte[] m_bytes;
-
- byte[] IMessageAppend.Reference { get { return m_reference; } }
- byte[] IMessageAppend.Bytes { get { return m_bytes; } }
-
- public MessageAppend() {}
- public MessageAppend(
- byte[] initReference,
- byte[] initBytes)
- {
- m_reference = initReference;
- m_bytes = initBytes;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 80; } }
- public override string ProtocolMethodName { get { return "message.append"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_reference = reader.ReadLongstr();
- m_bytes = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_reference);
- writer.WriteLongstr(m_bytes);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_reference); sb.Append(",");
- sb.Append(m_bytes);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageCheckpoint: RabbitMQ.Client.Impl.MethodBase, IMessageCheckpoint {
- public const int ClassId = 120;
- public const int MethodId = 90;
-
- public byte[] m_reference;
- public string m_identifier;
-
- byte[] IMessageCheckpoint.Reference { get { return m_reference; } }
- string IMessageCheckpoint.Identifier { get { return m_identifier; } }
-
- public MessageCheckpoint() {}
- public MessageCheckpoint(
- byte[] initReference,
- string initIdentifier)
- {
- m_reference = initReference;
- m_identifier = initIdentifier;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 90; } }
- public override string ProtocolMethodName { get { return "message.checkpoint"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_reference = reader.ReadLongstr();
- m_identifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_reference);
- writer.WriteShortstr(m_identifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_reference); sb.Append(",");
- sb.Append(m_identifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageResume: RabbitMQ.Client.Impl.MethodBase, IMessageResume {
- public const int ClassId = 120;
- public const int MethodId = 100;
-
- public byte[] m_reference;
- public string m_identifier;
-
- byte[] IMessageResume.Reference { get { return m_reference; } }
- string IMessageResume.Identifier { get { return m_identifier; } }
-
- public MessageResume() {}
- public MessageResume(
- byte[] initReference,
- string initIdentifier)
- {
- m_reference = initReference;
- m_identifier = initIdentifier;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 100; } }
- public override string ProtocolMethodName { get { return "message.resume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_reference = reader.ReadLongstr();
- m_identifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_reference);
- writer.WriteShortstr(m_identifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_reference); sb.Append(",");
- sb.Append(m_identifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageQos: RabbitMQ.Client.Impl.MethodBase, IMessageQos {
- public const int ClassId = 120;
- public const int MethodId = 110;
-
- public uint m_prefetchSize;
- public ushort m_prefetchCount;
- public bool m_global;
-
- uint IMessageQos.PrefetchSize { get { return m_prefetchSize; } }
- ushort IMessageQos.PrefetchCount { get { return m_prefetchCount; } }
- bool IMessageQos.Global { get { return m_global; } }
-
- public MessageQos() {}
- public MessageQos(
- uint initPrefetchSize,
- ushort initPrefetchCount,
- bool initGlobal)
- {
- m_prefetchSize = initPrefetchSize;
- m_prefetchCount = initPrefetchCount;
- m_global = initGlobal;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 110; } }
- public override string ProtocolMethodName { get { return "message.qos"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_prefetchSize = reader.ReadLong();
- m_prefetchCount = reader.ReadShort();
- m_global = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_prefetchSize);
- writer.WriteShort(m_prefetchCount);
- writer.WriteBit(m_global);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_prefetchSize); sb.Append(",");
- sb.Append(m_prefetchCount); sb.Append(",");
- sb.Append(m_global);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageOk: RabbitMQ.Client.Impl.MethodBase, IMessageOk {
- public const int ClassId = 120;
- public const int MethodId = 500;
-
-
-
- public MessageOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 500; } }
- public override string ProtocolMethodName { get { return "message.ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageEmpty: RabbitMQ.Client.Impl.MethodBase, IMessageEmpty {
- public const int ClassId = 120;
- public const int MethodId = 510;
-
-
-
- public MessageEmpty(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 510; } }
- public override string ProtocolMethodName { get { return "message.empty"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageReject: RabbitMQ.Client.Impl.MethodBase, IMessageReject {
- public const int ClassId = 120;
- public const int MethodId = 520;
-
- public ushort m_code;
- public string m_text;
-
- ushort IMessageReject.Code { get { return m_code; } }
- string IMessageReject.Text { get { return m_text; } }
-
- public MessageReject() {}
- public MessageReject(
- ushort initCode,
- string initText)
- {
- m_code = initCode;
- m_text = initText;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 520; } }
- public override string ProtocolMethodName { get { return "message.reject"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_code = reader.ReadShort();
- m_text = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_code);
- writer.WriteShortstr(m_text);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_code); sb.Append(",");
- sb.Append(m_text);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class MessageOffset: RabbitMQ.Client.Impl.MethodBase, IMessageOffset {
- public const int ClassId = 120;
- public const int MethodId = 530;
-
- public ulong m_value;
-
- ulong IMessageOffset.Value { get { return m_value; } }
-
- public MessageOffset() {}
- public MessageOffset(
- ulong initValue)
- {
- m_value = initValue;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 530; } }
- public override string ProtocolMethodName { get { return "message.offset"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_value = reader.ReadLonglong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_value);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_value);
- sb.Append(")");
- }
- }
-
- public class Model: RabbitMQ.Client.Impl.ModelBase {
- public Model(RabbitMQ.Client.Impl.ISession session): base(session) {}
- public override void _Private_BasicPublish(
- System.String @exchange,
- System.String @routingKey,
- System.Boolean @mandatory,
- System.Boolean @immediate,
- RabbitMQ.Client.IBasicProperties @basicProperties,
- System.Byte[] @body)
- {
- BasicPublish __req = new BasicPublish();
- __req.m_exchange = @exchange;
- __req.m_routingKey = @routingKey;
- __req.m_mandatory = @mandatory;
- __req.m_immediate = @immediate;
- ModelSend(__req, (BasicProperties) basicProperties,body);
- }
- public override void _Private_BasicConsume(
- System.String @queue,
- System.String @consumerTag,
- System.Boolean @noLocal,
- System.Boolean @noAck,
- System.Boolean @exclusive,
- System.Boolean @nowait,
- System.Collections.IDictionary @filter)
- {
- BasicConsume __req = new BasicConsume();
- __req.m_queue = @queue;
- __req.m_consumerTag = @consumerTag;
- __req.m_noLocal = @noLocal;
- __req.m_noAck = @noAck;
- __req.m_exclusive = @exclusive;
- __req.m_nowait = @nowait;
- __req.m_filter = @filter;
- ModelSend(__req,null,null);
- }
- public override void _Private_BasicCancel(
- System.String @consumerTag,
- System.Boolean @nowait)
- {
- BasicCancel __req = new BasicCancel();
- __req.m_consumerTag = @consumerTag;
- __req.m_nowait = @nowait;
- ModelSend(__req,null,null);
- }
- public override void _Private_ChannelOpen(
- System.String @outOfBand)
- {
- ChannelOpen __req = new ChannelOpen();
- __req.m_outOfBand = @outOfBand;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ChannelOpenOk __rep = __repBase as ChannelOpenOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void _Private_ChannelCloseOk()
- {
- ChannelCloseOk __req = new ChannelCloseOk();
- ModelSend(__req,null,null);
- }
- public override void _Private_ChannelClose(
- System.UInt16 @replyCode,
- System.String @replyText,
- System.UInt16 @classId,
- System.UInt16 @methodId)
- {
- ChannelClose __req = new ChannelClose();
- __req.m_replyCode = @replyCode;
- __req.m_replyText = @replyText;
- __req.m_classId = @classId;
- __req.m_methodId = @methodId;
- ModelSend(__req,null,null);
- }
- public override void _Private_BasicGet(
- System.String @queue,
- System.Boolean @noAck)
- {
- BasicGet __req = new BasicGet();
- __req.m_queue = @queue;
- __req.m_noAck = @noAck;
- ModelSend(__req,null,null);
- }
- public override void _Private_ChannelFlowOk()
- {
- ChannelFlowOk __req = new ChannelFlowOk();
- ModelSend(__req,null,null);
- }
- public override RabbitMQ.Client.Impl.ConnectionTuneDetails ConnectionStartOk(
- System.Collections.IDictionary @clientProperties,
- System.String @mechanism,
- System.Byte[] @response,
- System.String @locale)
- {
- ConnectionStartOk __req = new ConnectionStartOk();
- __req.m_clientProperties = @clientProperties;
- __req.m_mechanism = @mechanism;
- __req.m_response = @response;
- __req.m_locale = @locale;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ConnectionTune __rep = __repBase as ConnectionTune;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- RabbitMQ.Client.Impl.ConnectionTuneDetails __result = new RabbitMQ.Client.Impl.ConnectionTuneDetails();
- __result.m_channelMax = __rep.m_channelMax;
- __result.m_frameMax = __rep.m_frameMax;
- __result.m_heartbeat = __rep.m_heartbeat;
- return __result;
- }
- public override void ConnectionTuneOk(
- System.UInt16 @channelMax,
- System.UInt32 @frameMax,
- System.UInt16 @heartbeat)
- {
- ConnectionTuneOk __req = new ConnectionTuneOk();
- __req.m_channelMax = @channelMax;
- __req.m_frameMax = @frameMax;
- __req.m_heartbeat = @heartbeat;
- ModelSend(__req,null,null);
- }
- public override void _Private_ConnectionOpen(
- System.String @virtualHost,
- System.String @capabilities,
- System.Boolean @insist)
- {
- ConnectionOpen __req = new ConnectionOpen();
- __req.m_virtualHost = @virtualHost;
- __req.m_capabilities = @capabilities;
- __req.m_insist = @insist;
- ModelSend(__req,null,null);
- }
- public override void _Private_ConnectionClose(
- System.UInt16 @replyCode,
- System.String @replyText,
- System.UInt16 @classId,
- System.UInt16 @methodId)
- {
- ConnectionClose __req = new ConnectionClose();
- __req.m_replyCode = @replyCode;
- __req.m_replyText = @replyText;
- __req.m_classId = @classId;
- __req.m_methodId = @methodId;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ConnectionCloseOk __rep = __repBase as ConnectionCloseOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void _Private_ConnectionCloseOk()
- {
- ConnectionCloseOk __req = new ConnectionCloseOk();
- ModelSend(__req,null,null);
- }
- public override RabbitMQ.Client.IBasicProperties CreateBasicProperties()
- {
- return new BasicProperties();
- }
- public override RabbitMQ.Client.IFileProperties CreateFileProperties()
- {
- return new FileProperties();
- }
- public override RabbitMQ.Client.IStreamProperties CreateStreamProperties()
- {
- return new StreamProperties();
- }
- public override void ChannelFlow(
- System.Boolean @active)
- {
- ChannelFlow __req = new ChannelFlow();
- __req.m_active = @active;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ChannelFlowOk __rep = __repBase as ChannelFlowOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void ExchangeDeclare(
- System.String @exchange,
- System.String @type,
- System.Boolean @passive,
- System.Boolean @durable,
- System.Boolean @autoDelete,
- System.Boolean @internal,
- System.Boolean @nowait,
- System.Collections.IDictionary @arguments)
- {
- ExchangeDeclare __req = new ExchangeDeclare();
- __req.m_exchange = @exchange;
- __req.m_type = @type;
- __req.m_passive = @passive;
- __req.m_durable = @durable;
- __req.m_autoDelete = @autoDelete;
- __req.m_internal = @internal;
- __req.m_nowait = @nowait;
- __req.m_arguments = @arguments;
- if (nowait) {
- ModelSend(__req,null,null);
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ExchangeDeclareOk __rep = __repBase as ExchangeDeclareOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void ExchangeDelete(
- System.String @exchange,
- System.Boolean @ifUnused,
- System.Boolean @nowait)
- {
- ExchangeDelete __req = new ExchangeDelete();
- __req.m_exchange = @exchange;
- __req.m_ifUnused = @ifUnused;
- __req.m_nowait = @nowait;
- if (nowait) {
- ModelSend(__req,null,null);
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ExchangeDeleteOk __rep = __repBase as ExchangeDeleteOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override System.String QueueDeclare(
- System.String @queue,
- System.Boolean @passive,
- System.Boolean @durable,
- System.Boolean @exclusive,
- System.Boolean @autoDelete,
- System.Boolean @nowait,
- System.Collections.IDictionary @arguments)
- {
- QueueDeclare __req = new QueueDeclare();
- __req.m_queue = @queue;
- __req.m_passive = @passive;
- __req.m_durable = @durable;
- __req.m_exclusive = @exclusive;
- __req.m_autoDelete = @autoDelete;
- __req.m_nowait = @nowait;
- __req.m_arguments = @arguments;
- if (nowait) {
- ModelSend(__req,null,null);
- return null;
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueDeclareOk __rep = __repBase as QueueDeclareOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- return __rep.m_queue;
- }
- public override void QueueBind(
- System.String @queue,
- System.String @exchange,
- System.String @routingKey,
- System.Boolean @nowait,
- System.Collections.IDictionary @arguments)
- {
- QueueBind __req = new QueueBind();
- __req.m_queue = @queue;
- __req.m_exchange = @exchange;
- __req.m_routingKey = @routingKey;
- __req.m_nowait = @nowait;
- __req.m_arguments = @arguments;
- if (nowait) {
- ModelSend(__req,null,null);
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueBindOk __rep = __repBase as QueueBindOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void QueueUnbind(
- System.String @queue,
- System.String @exchange,
- System.String @routingKey,
- System.Collections.IDictionary @arguments)
- {
- QueueUnbind __req = new QueueUnbind();
- __req.m_queue = @queue;
- __req.m_exchange = @exchange;
- __req.m_routingKey = @routingKey;
- __req.m_arguments = @arguments;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueUnbindOk __rep = __repBase as QueueUnbindOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override System.UInt32 QueuePurge(
- System.String @queue,
- System.Boolean @nowait)
- {
- QueuePurge __req = new QueuePurge();
- __req.m_queue = @queue;
- __req.m_nowait = @nowait;
- if (nowait) {
- ModelSend(__req,null,null);
- return 0xFFFFFFFF;
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueuePurgeOk __rep = __repBase as QueuePurgeOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- return __rep.m_messageCount;
- }
- public override System.UInt32 QueueDelete(
- System.String @queue,
- System.Boolean @ifUnused,
- System.Boolean @ifEmpty,
- System.Boolean @nowait)
- {
- QueueDelete __req = new QueueDelete();
- __req.m_queue = @queue;
- __req.m_ifUnused = @ifUnused;
- __req.m_ifEmpty = @ifEmpty;
- __req.m_nowait = @nowait;
- if (nowait) {
- ModelSend(__req,null,null);
- return 0xFFFFFFFF;
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueDeleteOk __rep = __repBase as QueueDeleteOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- return __rep.m_messageCount;
- }
- public override void BasicQos(
- System.UInt32 @prefetchSize,
- System.UInt16 @prefetchCount,
- System.Boolean @global)
- {
- BasicQos __req = new BasicQos();
- __req.m_prefetchSize = @prefetchSize;
- __req.m_prefetchCount = @prefetchCount;
- __req.m_global = @global;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- BasicQosOk __rep = __repBase as BasicQosOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void BasicAck(
- System.UInt64 @deliveryTag,
- System.Boolean @multiple)
- {
- BasicAck __req = new BasicAck();
- __req.m_deliveryTag = @deliveryTag;
- __req.m_multiple = @multiple;
- ModelSend(__req,null,null);
- }
- public override void BasicReject(
- System.UInt64 @deliveryTag,
- System.Boolean @requeue)
- {
- BasicReject __req = new BasicReject();
- __req.m_deliveryTag = @deliveryTag;
- __req.m_requeue = @requeue;
- ModelSend(__req,null,null);
- }
- public override void BasicRecover(
- System.Boolean @requeue)
- {
- BasicRecover __req = new BasicRecover();
- __req.m_requeue = @requeue;
- ModelSend(__req,null,null);
- }
- public override void TxSelect()
- {
- TxSelect __req = new TxSelect();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- TxSelectOk __rep = __repBase as TxSelectOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void TxCommit()
- {
- TxCommit __req = new TxCommit();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- TxCommitOk __rep = __repBase as TxCommitOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void TxRollback()
- {
- TxRollback __req = new TxRollback();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- TxRollbackOk __rep = __repBase as TxRollbackOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void DtxSelect()
- {
- DtxSelect __req = new DtxSelect();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- DtxSelectOk __rep = __repBase as DtxSelectOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void DtxStart(
- System.String @dtxIdentifier)
- {
- DtxStart __req = new DtxStart();
- __req.m_dtxIdentifier = @dtxIdentifier;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- DtxStartOk __rep = __repBase as DtxStartOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override bool DispatchAsynchronous(RabbitMQ.Client.Impl.Command cmd) {
- RabbitMQ.Client.Impl.MethodBase __method = (RabbitMQ.Client.Impl.MethodBase) cmd.Method;
- switch ((__method.ProtocolClassId << 16) | __method.ProtocolMethodId) {
- case 3932181: {
- BasicConsumeOk __impl = (BasicConsumeOk) __method;
- HandleBasicConsumeOk(
- __impl.m_consumerTag);
- return true;
- }
- case 3932191: {
- BasicCancelOk __impl = (BasicCancelOk) __method;
- HandleBasicCancelOk(
- __impl.m_consumerTag);
- return true;
- }
- case 3932231: {
- BasicGetOk __impl = (BasicGetOk) __method;
- HandleBasicGetOk(
- __impl.m_deliveryTag,
- __impl.m_redelivered,
- __impl.m_exchange,
- __impl.m_routingKey,
- __impl.m_messageCount,
- (RabbitMQ.Client.IBasicProperties) cmd.Header,
- cmd.Body);
- return true;
- }
- case 3932232: {
- HandleBasicGetEmpty();
- return true;
- }
- case 3932220: {
- BasicDeliver __impl = (BasicDeliver) __method;
- HandleBasicDeliver(
- __impl.m_consumerTag,
- __impl.m_deliveryTag,
- __impl.m_redelivered,
- __impl.m_exchange,
- __impl.m_routingKey,
- (RabbitMQ.Client.IBasicProperties) cmd.Header,
- cmd.Body);
- return true;
- }
- case 3932210: {
- BasicReturn __impl = (BasicReturn) __method;
- HandleBasicReturn(
- __impl.m_replyCode,
- __impl.m_replyText,
- __impl.m_exchange,
- __impl.m_routingKey,
- (RabbitMQ.Client.IBasicProperties) cmd.Header,
- cmd.Body);
- return true;
- }
- case 1310740: {
- ChannelFlow __impl = (ChannelFlow) __method;
- HandleChannelFlow(
- __impl.m_active);
- return true;
- }
- case 1310760: {
- ChannelClose __impl = (ChannelClose) __method;
- HandleChannelClose(
- __impl.m_replyCode,
- __impl.m_replyText,
- __impl.m_classId,
- __impl.m_methodId);
- return true;
- }
- case 1310761: {
- HandleChannelCloseOk();
- return true;
- }
- case 655370: {
- ConnectionStart __impl = (ConnectionStart) __method;
- HandleConnectionStart(
- __impl.m_versionMajor,
- __impl.m_versionMinor,
- __impl.m_serverProperties,
- __impl.m_mechanisms,
- __impl.m_locales);
- return true;
- }
- case 655401: {
- ConnectionOpenOk __impl = (ConnectionOpenOk) __method;
- HandleConnectionOpenOk(
- __impl.m_knownHosts);
- return true;
- }
- case 655402: {
- ConnectionRedirect __impl = (ConnectionRedirect) __method;
- HandleConnectionRedirect(
- __impl.m_host,
- __impl.m_knownHosts);
- return true;
- }
- case 655410: {
- ConnectionClose __impl = (ConnectionClose) __method;
- HandleConnectionClose(
- __impl.m_replyCode,
- __impl.m_replyText,
- __impl.m_classId,
- __impl.m_methodId);
- return true;
- }
- default: return false;
- }
- }
- }
-}
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-qpid-0-8.cs b/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-qpid-0-8.cs
deleted file mode 100644
index f8e47ad389f..00000000000
--- a/mcs/class/RabbitMQ.Client/docs/specs/autogenerated-api-qpid-0-8.cs
+++ /dev/null
@@ -1,6373 +0,0 @@
-// Autogenerated code. Do not edit.
-
-using RabbitMQ.Client;
-using RabbitMQ.Client.Exceptions;
-
-namespace RabbitMQ.Client.Framing.v0_8qpid {
- public class Protocol: RabbitMQ.Client.Framing.Impl.v0_8qpid.ProtocolBase {
- ///<summary>Protocol major version (= 8)</summary>
- public override int MajorVersion { get { return 8; } }
- ///<summary>Protocol minor version (= 0)</summary>
- public override int MinorVersion { get { return 0; } }
- ///<summary>Protocol API name (= AMQP_0_8_QPID)</summary>
- public override string ApiName { get { return "AMQP_0_8_QPID"; } }
- ///<summary>Default TCP port (= 5672)</summary>
- public override int DefaultPort { get { return 5672; } }
-
- public override RabbitMQ.Client.Impl.MethodBase DecodeMethodFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
- ushort classId = reader.ReadUInt16();
- ushort methodId = reader.ReadUInt16();
-
- switch (classId) {
- case 10: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionStart result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionStart();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionStartOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionStartOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionSecure result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionSecure();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionSecureOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionSecureOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionTune result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionTune();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionTuneOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionTuneOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionOpen result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionOpen();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionOpenOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionRedirect result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionRedirect();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionClose result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionClose();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 61: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ConnectionCloseOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 20: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelOpen result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelOpen();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelOpenOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelFlow result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelFlow();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelFlowOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelFlowOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelAlert result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelAlert();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelClose result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelClose();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelCloseOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ChannelCloseOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 30: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.AccessRequest result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.AccessRequest();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.AccessRequestOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.AccessRequestOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 40: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeclare result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeclare();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeclareOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDelete result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDelete();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeDeleteOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 22: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeBound result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeBound();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 23: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeBoundOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.ExchangeBoundOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 50: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeclare result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeclare();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeclareOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeclareOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueBind result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueBind();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueBindOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueBindOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.QueuePurge result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueuePurge();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.QueuePurgeOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueuePurgeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDelete result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDelete();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeleteOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.QueueDeleteOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 60: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicQos result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicQos();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicQosOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicConsume result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicConsume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicConsumeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicCancel result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicCancel();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicCancelOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicPublish result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicPublish();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicReturn result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicReturn();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicDeliver();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 70: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGet result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGet();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 71: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGetOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGetOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 72: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGetEmpty result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicGetEmpty();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 80: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicAck result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicAck();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 90: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicReject result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicReject();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 100: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicRecover result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicRecover();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 101: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicRecoverOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.BasicRecoverOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 70: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileQos result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileQos();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileQosOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileConsume result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileConsume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileConsumeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileCancel result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileCancel();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileCancelOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileOpen result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileOpen();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileOpenOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileOpenOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileStage result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileStage();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FilePublish result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FilePublish();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 70: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileReturn result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileReturn();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 80: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileDeliver();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 90: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileAck result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileAck();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 100: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.FileReject result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.FileReject();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 80: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamQos result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamQos();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamQosOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamQosOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamConsume result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamConsume();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamConsumeOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamConsumeOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamCancel result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamCancel();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamCancelOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamCancelOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamPublish result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamPublish();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 50: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamReturn result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamReturn();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 60: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamDeliver result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.StreamDeliver();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 90: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TxSelect result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxSelect();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxSelectOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TxCommit result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxCommit();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TxCommitOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxCommitOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TxRollback result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxRollback();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TxRollbackOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TxRollbackOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 100: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxSelect result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxSelect();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxSelectOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxSelectOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxStart result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxStart();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxStartOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.DtxStartOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 110: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TunnelRequest result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TunnelRequest();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- case 120: {
- switch (methodId) {
- case 10: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TestInteger result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestInteger();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 11: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TestIntegerOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestIntegerOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 20: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TestString result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestString();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 21: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TestStringOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestStringOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 30: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TestTable result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestTable();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 31: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TestTableOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestTableOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 40: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TestContent result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestContent();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- case 41: {
- RabbitMQ.Client.Framing.Impl.v0_8qpid.TestContentOk result = new RabbitMQ.Client.Framing.Impl.v0_8qpid.TestContentOk();
- result.ReadArgumentsFrom(new RabbitMQ.Client.Impl.MethodArgumentReader(reader));
- return result;
- }
- default: break;
- }
- break;
- }
- default: break;
- }
- throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, methodId);
- }
-
- public override RabbitMQ.Client.Impl.ContentHeaderBase DecodeContentHeaderFrom(RabbitMQ.Util.NetworkBinaryReader reader) {
- ushort classId = reader.ReadUInt16();
-
- switch (classId) {
- case 60: return new BasicProperties();
- case 70: return new FileProperties();
- case 80: return new StreamProperties();
- case 110: return new TunnelProperties();
- case 120: return new TestProperties();
- default: break;
- }
- throw new RabbitMQ.Client.Impl.UnknownClassOrMethodException(classId, 0);
- }
- }
- public class Constants {
- ///<summary>(= 1)</summary>
- public const int FrameMethod = 1;
- ///<summary>(= 2)</summary>
- public const int FrameHeader = 2;
- ///<summary>(= 3)</summary>
- public const int FrameBody = 3;
- ///<summary>(= 4)</summary>
- public const int FrameOobMethod = 4;
- ///<summary>(= 5)</summary>
- public const int FrameOobHeader = 5;
- ///<summary>(= 6)</summary>
- public const int FrameOobBody = 6;
- ///<summary>(= 7)</summary>
- public const int FrameTrace = 7;
- ///<summary>(= 8)</summary>
- public const int FrameHeartbeat = 8;
- ///<summary>(= 4096)</summary>
- public const int FrameMinSize = 4096;
- ///<summary>(= 206)</summary>
- public const int FrameEnd = 206;
- ///<summary>(= 200)</summary>
- public const int ReplySuccess = 200;
- ///<summary>(= 310)</summary>
- public const int NotDelivered = 310;
- ///<summary>(= 311)</summary>
- public const int ContentTooLarge = 311;
- ///<summary>(= 320)</summary>
- public const int ConnectionForced = 320;
- ///<summary>(= 402)</summary>
- public const int InvalidPath = 402;
- ///<summary>(= 403)</summary>
- public const int AccessRefused = 403;
- ///<summary>(= 404)</summary>
- public const int NotFound = 404;
- ///<summary>(= 405)</summary>
- public const int ResourceLocked = 405;
- ///<summary>(= 501)</summary>
- public const int FrameError = 501;
- ///<summary>(= 502)</summary>
- public const int SyntaxError = 502;
- ///<summary>(= 503)</summary>
- public const int CommandInvalid = 503;
- ///<summary>(= 504)</summary>
- public const int ChannelError = 504;
- ///<summary>(= 506)</summary>
- public const int ResourceError = 506;
- ///<summary>(= 530)</summary>
- public const int NotAllowed = 530;
- ///<summary>(= 540)</summary>
- public const int NotImplemented = 540;
- ///<summary>(= 541)</summary>
- public const int InternalError = 541;
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.start".</summary>
- public interface IConnectionStart: IMethod {
- byte VersionMajor { get; }
- byte VersionMinor { get; }
- System.Collections.IDictionary ServerProperties { get; }
- byte[] Mechanisms { get; }
- byte[] Locales { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.start-ok".</summary>
- public interface IConnectionStartOk: IMethod {
- System.Collections.IDictionary ClientProperties { get; }
- string Mechanism { get; }
- byte[] Response { get; }
- string Locale { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.secure".</summary>
- public interface IConnectionSecure: IMethod {
- byte[] Challenge { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.secure-ok".</summary>
- public interface IConnectionSecureOk: IMethod {
- byte[] Response { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.tune".</summary>
- public interface IConnectionTune: IMethod {
- ushort ChannelMax { get; }
- uint FrameMax { get; }
- ushort Heartbeat { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.tune-ok".</summary>
- public interface IConnectionTuneOk: IMethod {
- ushort ChannelMax { get; }
- uint FrameMax { get; }
- ushort Heartbeat { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.open".</summary>
- public interface IConnectionOpen: IMethod {
- string VirtualHost { get; }
- string Capabilities { get; }
- bool Insist { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.open-ok".</summary>
- public interface IConnectionOpenOk: IMethod {
- string KnownHosts { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.redirect".</summary>
- public interface IConnectionRedirect: IMethod {
- string Host { get; }
- string KnownHosts { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.close".</summary>
- public interface IConnectionClose: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- ushort ClassId { get; }
- ushort MethodId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "connection.close-ok".</summary>
- public interface IConnectionCloseOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.open".</summary>
- public interface IChannelOpen: IMethod {
- string OutOfBand { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.open-ok".</summary>
- public interface IChannelOpenOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.flow".</summary>
- public interface IChannelFlow: IMethod {
- bool Active { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.flow-ok".</summary>
- public interface IChannelFlowOk: IMethod {
- bool Active { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.alert".</summary>
- public interface IChannelAlert: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- System.Collections.IDictionary Details { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.close".</summary>
- public interface IChannelClose: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- ushort ClassId { get; }
- ushort MethodId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "channel.close-ok".</summary>
- public interface IChannelCloseOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "access.request".</summary>
- public interface IAccessRequest: IMethod {
- string Realm { get; }
- bool Exclusive { get; }
- bool Passive { get; }
- bool Active { get; }
- bool Write { get; }
- bool Read { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "access.request-ok".</summary>
- public interface IAccessRequestOk: IMethod {
- ushort Ticket { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.declare".</summary>
- public interface IExchangeDeclare: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string Type { get; }
- bool Passive { get; }
- bool Durable { get; }
- bool AutoDelete { get; }
- bool Internal { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.declare-ok".</summary>
- public interface IExchangeDeclareOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.delete".</summary>
- public interface IExchangeDelete: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- bool IfUnused { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.delete-ok".</summary>
- public interface IExchangeDeleteOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.bound".</summary>
- public interface IExchangeBound: IMethod {
- string Exchange { get; }
- string RoutingKey { get; }
- string Queue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "exchange.bound-ok".</summary>
- public interface IExchangeBoundOk: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.declare".</summary>
- public interface IQueueDeclare: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool Passive { get; }
- bool Durable { get; }
- bool Exclusive { get; }
- bool AutoDelete { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.declare-ok".</summary>
- public interface IQueueDeclareOk: IMethod {
- string Queue { get; }
- uint MessageCount { get; }
- uint ConsumerCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.bind".</summary>
- public interface IQueueBind: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.bind-ok".</summary>
- public interface IQueueBindOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.purge".</summary>
- public interface IQueuePurge: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.purge-ok".</summary>
- public interface IQueuePurgeOk: IMethod {
- uint MessageCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.delete".</summary>
- public interface IQueueDelete: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool IfUnused { get; }
- bool IfEmpty { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "queue.delete-ok".</summary>
- public interface IQueueDeleteOk: IMethod {
- uint MessageCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.qos".</summary>
- public interface IBasicQos: IMethod {
- uint PrefetchSize { get; }
- ushort PrefetchCount { get; }
- bool Global { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.qos-ok".</summary>
- public interface IBasicQosOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.consume".</summary>
- public interface IBasicConsume: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string ConsumerTag { get; }
- bool NoLocal { get; }
- bool NoAck { get; }
- bool Exclusive { get; }
- bool Nowait { get; }
- System.Collections.IDictionary Arguments { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.consume-ok".</summary>
- public interface IBasicConsumeOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.cancel".</summary>
- public interface IBasicCancel: IMethod {
- string ConsumerTag { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.cancel-ok".</summary>
- public interface IBasicCancelOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.publish".</summary>
- public interface IBasicPublish: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Mandatory { get; }
- bool Immediate { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.return".</summary>
- public interface IBasicReturn: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.deliver".</summary>
- public interface IBasicDeliver: IMethod {
- string ConsumerTag { get; }
- ulong DeliveryTag { get; }
- bool Redelivered { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.get".</summary>
- public interface IBasicGet: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- bool NoAck { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.get-ok".</summary>
- public interface IBasicGetOk: IMethod {
- ulong DeliveryTag { get; }
- bool Redelivered { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- uint MessageCount { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.get-empty".</summary>
- public interface IBasicGetEmpty: IMethod {
- string ClusterId { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.ack".</summary>
- public interface IBasicAck: IMethod {
- ulong DeliveryTag { get; }
- bool Multiple { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.reject".</summary>
- public interface IBasicReject: IMethod {
- ulong DeliveryTag { get; }
- bool Requeue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.recover".</summary>
- public interface IBasicRecover: IMethod {
- bool Requeue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "basic.recover-ok".</summary>
- public interface IBasicRecoverOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "file.qos".</summary>
- public interface IFileQos: IMethod {
- uint PrefetchSize { get; }
- ushort PrefetchCount { get; }
- bool Global { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.qos-ok".</summary>
- public interface IFileQosOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "file.consume".</summary>
- public interface IFileConsume: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string ConsumerTag { get; }
- bool NoLocal { get; }
- bool NoAck { get; }
- bool Exclusive { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.consume-ok".</summary>
- public interface IFileConsumeOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.cancel".</summary>
- public interface IFileCancel: IMethod {
- string ConsumerTag { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.cancel-ok".</summary>
- public interface IFileCancelOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.open".</summary>
- public interface IFileOpen: IMethod {
- string Identifier { get; }
- ulong ContentSize { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.open-ok".</summary>
- public interface IFileOpenOk: IMethod {
- ulong StagedSize { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.stage".</summary>
- public interface IFileStage: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "file.publish".</summary>
- public interface IFilePublish: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Mandatory { get; }
- bool Immediate { get; }
- string Identifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.return".</summary>
- public interface IFileReturn: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.deliver".</summary>
- public interface IFileDeliver: IMethod {
- string ConsumerTag { get; }
- ulong DeliveryTag { get; }
- bool Redelivered { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- string Identifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.ack".</summary>
- public interface IFileAck: IMethod {
- ulong DeliveryTag { get; }
- bool Multiple { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "file.reject".</summary>
- public interface IFileReject: IMethod {
- ulong DeliveryTag { get; }
- bool Requeue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.qos".</summary>
- public interface IStreamQos: IMethod {
- uint PrefetchSize { get; }
- ushort PrefetchCount { get; }
- uint ConsumeRate { get; }
- bool Global { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.qos-ok".</summary>
- public interface IStreamQosOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.consume".</summary>
- public interface IStreamConsume: IMethod {
- ushort Ticket { get; }
- string Queue { get; }
- string ConsumerTag { get; }
- bool NoLocal { get; }
- bool Exclusive { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.consume-ok".</summary>
- public interface IStreamConsumeOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.cancel".</summary>
- public interface IStreamCancel: IMethod {
- string ConsumerTag { get; }
- bool Nowait { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.cancel-ok".</summary>
- public interface IStreamCancelOk: IMethod {
- string ConsumerTag { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.publish".</summary>
- public interface IStreamPublish: IMethod {
- ushort Ticket { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- bool Mandatory { get; }
- bool Immediate { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.return".</summary>
- public interface IStreamReturn: IMethod {
- ushort ReplyCode { get; }
- string ReplyText { get; }
- string Exchange { get; }
- string RoutingKey { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "stream.deliver".</summary>
- public interface IStreamDeliver: IMethod {
- string ConsumerTag { get; }
- ulong DeliveryTag { get; }
- string Exchange { get; }
- string Queue { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.select".</summary>
- public interface ITxSelect: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.select-ok".</summary>
- public interface ITxSelectOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.commit".</summary>
- public interface ITxCommit: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.commit-ok".</summary>
- public interface ITxCommitOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.rollback".</summary>
- public interface ITxRollback: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tx.rollback-ok".</summary>
- public interface ITxRollbackOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.select".</summary>
- public interface IDtxSelect: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.select-ok".</summary>
- public interface IDtxSelectOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.start".</summary>
- public interface IDtxStart: IMethod {
- string DtxIdentifier { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "dtx.start-ok".</summary>
- public interface IDtxStartOk: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "tunnel.request".</summary>
- public interface ITunnelRequest: IMethod {
- System.Collections.IDictionary MetaData { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.integer".</summary>
- public interface ITestInteger: IMethod {
- byte Integer1 { get; }
- ushort Integer2 { get; }
- uint Integer3 { get; }
- ulong Integer4 { get; }
- byte Operation { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.integer-ok".</summary>
- public interface ITestIntegerOk: IMethod {
- ulong Result { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.string".</summary>
- public interface ITestString: IMethod {
- string String1 { get; }
- byte[] String2 { get; }
- byte Operation { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.string-ok".</summary>
- public interface ITestStringOk: IMethod {
- byte[] Result { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.table".</summary>
- public interface ITestTable: IMethod {
- System.Collections.IDictionary Table { get; }
- byte IntegerOp { get; }
- byte StringOp { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.table-ok".</summary>
- public interface ITestTableOk: IMethod {
- ulong IntegerResult { get; }
- byte[] StringResult { get; }
- }
- /// <summary>Autogenerated type. AMQP specification method "test.content".</summary>
- public interface ITestContent: IMethod {
- }
- /// <summary>Autogenerated type. AMQP specification method "test.content-ok".</summary>
- public interface ITestContentOk: IMethod {
- uint ContentChecksum { get; }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "basic"</summary>
- public class BasicProperties: RabbitMQ.Client.Impl.BasicProperties {
- private string m_contentType;
- private string m_contentEncoding;
- private System.Collections.IDictionary m_headers;
- private byte m_deliveryMode;
- private byte m_priority;
- private string m_correlationId;
- private string m_replyTo;
- private string m_expiration;
- private string m_messageId;
- private AmqpTimestamp m_timestamp;
- private string m_type;
- private string m_userId;
- private string m_appId;
- private string m_clusterId;
-
- private bool m_contentType_present = false;
- private bool m_contentEncoding_present = false;
- private bool m_headers_present = false;
- private bool m_deliveryMode_present = false;
- private bool m_priority_present = false;
- private bool m_correlationId_present = false;
- private bool m_replyTo_present = false;
- private bool m_expiration_present = false;
- private bool m_messageId_present = false;
- private bool m_timestamp_present = false;
- private bool m_type_present = false;
- private bool m_userId_present = false;
- private bool m_appId_present = false;
- private bool m_clusterId_present = false;
-
- public override string ContentType {
- get {
- return m_contentType;
- }
- set {
- m_contentType_present = true;
- m_contentType = value;
- }
- }
- public override string ContentEncoding {
- get {
- return m_contentEncoding;
- }
- set {
- m_contentEncoding_present = true;
- m_contentEncoding = value;
- }
- }
- public override System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public override byte DeliveryMode {
- get {
- return m_deliveryMode;
- }
- set {
- m_deliveryMode_present = true;
- m_deliveryMode = value;
- }
- }
- public override byte Priority {
- get {
- return m_priority;
- }
- set {
- m_priority_present = true;
- m_priority = value;
- }
- }
- public override string CorrelationId {
- get {
- return m_correlationId;
- }
- set {
- m_correlationId_present = true;
- m_correlationId = value;
- }
- }
- public override string ReplyTo {
- get {
- return m_replyTo;
- }
- set {
- m_replyTo_present = true;
- m_replyTo = value;
- }
- }
- public override string Expiration {
- get {
- return m_expiration;
- }
- set {
- m_expiration_present = true;
- m_expiration = value;
- }
- }
- public override string MessageId {
- get {
- return m_messageId;
- }
- set {
- m_messageId_present = true;
- m_messageId = value;
- }
- }
- public override AmqpTimestamp Timestamp {
- get {
- return m_timestamp;
- }
- set {
- m_timestamp_present = true;
- m_timestamp = value;
- }
- }
- public override string Type {
- get {
- return m_type;
- }
- set {
- m_type_present = true;
- m_type = value;
- }
- }
- public override string UserId {
- get {
- return m_userId;
- }
- set {
- m_userId_present = true;
- m_userId = value;
- }
- }
- public override string AppId {
- get {
- return m_appId;
- }
- set {
- m_appId_present = true;
- m_appId = value;
- }
- }
- public override string ClusterId {
- get {
- return m_clusterId;
- }
- set {
- m_clusterId_present = true;
- m_clusterId = value;
- }
- }
-
- public override void ClearContentType() { m_contentType_present = false; }
- public override void ClearContentEncoding() { m_contentEncoding_present = false; }
- public override void ClearHeaders() { m_headers_present = false; }
- public override void ClearDeliveryMode() { m_deliveryMode_present = false; }
- public override void ClearPriority() { m_priority_present = false; }
- public override void ClearCorrelationId() { m_correlationId_present = false; }
- public override void ClearReplyTo() { m_replyTo_present = false; }
- public override void ClearExpiration() { m_expiration_present = false; }
- public override void ClearMessageId() { m_messageId_present = false; }
- public override void ClearTimestamp() { m_timestamp_present = false; }
- public override void ClearType() { m_type_present = false; }
- public override void ClearUserId() { m_userId_present = false; }
- public override void ClearAppId() { m_appId_present = false; }
- public override void ClearClusterId() { m_clusterId_present = false; }
-
- public BasicProperties() {}
- public override int ProtocolClassId { get { return 60; } }
- public override string ProtocolClassName { get { return "basic"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_contentType_present = reader.ReadPresence();
- m_contentEncoding_present = reader.ReadPresence();
- m_headers_present = reader.ReadPresence();
- m_deliveryMode_present = reader.ReadPresence();
- m_priority_present = reader.ReadPresence();
- m_correlationId_present = reader.ReadPresence();
- m_replyTo_present = reader.ReadPresence();
- m_expiration_present = reader.ReadPresence();
- m_messageId_present = reader.ReadPresence();
- m_timestamp_present = reader.ReadPresence();
- m_type_present = reader.ReadPresence();
- m_userId_present = reader.ReadPresence();
- m_appId_present = reader.ReadPresence();
- m_clusterId_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_contentType_present) { m_contentType = reader.ReadShortstr(); }
- if (m_contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_deliveryMode_present) { m_deliveryMode = reader.ReadOctet(); }
- if (m_priority_present) { m_priority = reader.ReadOctet(); }
- if (m_correlationId_present) { m_correlationId = reader.ReadShortstr(); }
- if (m_replyTo_present) { m_replyTo = reader.ReadShortstr(); }
- if (m_expiration_present) { m_expiration = reader.ReadShortstr(); }
- if (m_messageId_present) { m_messageId = reader.ReadShortstr(); }
- if (m_timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
- if (m_type_present) { m_type = reader.ReadShortstr(); }
- if (m_userId_present) { m_userId = reader.ReadShortstr(); }
- if (m_appId_present) { m_appId = reader.ReadShortstr(); }
- if (m_clusterId_present) { m_clusterId = reader.ReadShortstr(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_contentType_present);
- writer.WritePresence(m_contentEncoding_present);
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_deliveryMode_present);
- writer.WritePresence(m_priority_present);
- writer.WritePresence(m_correlationId_present);
- writer.WritePresence(m_replyTo_present);
- writer.WritePresence(m_expiration_present);
- writer.WritePresence(m_messageId_present);
- writer.WritePresence(m_timestamp_present);
- writer.WritePresence(m_type_present);
- writer.WritePresence(m_userId_present);
- writer.WritePresence(m_appId_present);
- writer.WritePresence(m_clusterId_present);
- writer.FinishPresence();
- if (m_contentType_present) { writer.WriteShortstr(m_contentType); }
- if (m_contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_deliveryMode_present) { writer.WriteOctet(m_deliveryMode); }
- if (m_priority_present) { writer.WriteOctet(m_priority); }
- if (m_correlationId_present) { writer.WriteShortstr(m_correlationId); }
- if (m_replyTo_present) { writer.WriteShortstr(m_replyTo); }
- if (m_expiration_present) { writer.WriteShortstr(m_expiration); }
- if (m_messageId_present) { writer.WriteShortstr(m_messageId); }
- if (m_timestamp_present) { writer.WriteTimestamp(m_timestamp); }
- if (m_type_present) { writer.WriteShortstr(m_type); }
- if (m_userId_present) { writer.WriteShortstr(m_userId); }
- if (m_appId_present) { writer.WriteShortstr(m_appId); }
- if (m_clusterId_present) { writer.WriteShortstr(m_clusterId); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("content type="); sb.Append(m_contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
- sb.Append("content encoding="); sb.Append(m_contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("delivery mode="); sb.Append(m_deliveryMode_present ? m_deliveryMode.ToString() : "_"); sb.Append(", ");
- sb.Append("priority="); sb.Append(m_priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
- sb.Append("correlation id="); sb.Append(m_correlationId_present ? (m_correlationId == null ? "(null)" : m_correlationId.ToString()) : "_"); sb.Append(", ");
- sb.Append("reply to="); sb.Append(m_replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
- sb.Append("expiration="); sb.Append(m_expiration_present ? (m_expiration == null ? "(null)" : m_expiration.ToString()) : "_"); sb.Append(", ");
- sb.Append("message id="); sb.Append(m_messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
- sb.Append("timestamp="); sb.Append(m_timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
- sb.Append("type="); sb.Append(m_type_present ? (m_type == null ? "(null)" : m_type.ToString()) : "_"); sb.Append(", ");
- sb.Append("user id="); sb.Append(m_userId_present ? (m_userId == null ? "(null)" : m_userId.ToString()) : "_"); sb.Append(", ");
- sb.Append("app id="); sb.Append(m_appId_present ? (m_appId == null ? "(null)" : m_appId.ToString()) : "_"); sb.Append(", ");
- sb.Append("cluster id="); sb.Append(m_clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "file"</summary>
- public class FileProperties: RabbitMQ.Client.Impl.FileProperties {
- private string m_contentType;
- private string m_contentEncoding;
- private System.Collections.IDictionary m_headers;
- private byte m_priority;
- private string m_replyTo;
- private string m_messageId;
- private string m_filename;
- private AmqpTimestamp m_timestamp;
- private string m_clusterId;
-
- private bool m_contentType_present = false;
- private bool m_contentEncoding_present = false;
- private bool m_headers_present = false;
- private bool m_priority_present = false;
- private bool m_replyTo_present = false;
- private bool m_messageId_present = false;
- private bool m_filename_present = false;
- private bool m_timestamp_present = false;
- private bool m_clusterId_present = false;
-
- public override string ContentType {
- get {
- return m_contentType;
- }
- set {
- m_contentType_present = true;
- m_contentType = value;
- }
- }
- public override string ContentEncoding {
- get {
- return m_contentEncoding;
- }
- set {
- m_contentEncoding_present = true;
- m_contentEncoding = value;
- }
- }
- public override System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public override byte Priority {
- get {
- return m_priority;
- }
- set {
- m_priority_present = true;
- m_priority = value;
- }
- }
- public override string ReplyTo {
- get {
- return m_replyTo;
- }
- set {
- m_replyTo_present = true;
- m_replyTo = value;
- }
- }
- public override string MessageId {
- get {
- return m_messageId;
- }
- set {
- m_messageId_present = true;
- m_messageId = value;
- }
- }
- public override string Filename {
- get {
- return m_filename;
- }
- set {
- m_filename_present = true;
- m_filename = value;
- }
- }
- public override AmqpTimestamp Timestamp {
- get {
- return m_timestamp;
- }
- set {
- m_timestamp_present = true;
- m_timestamp = value;
- }
- }
- public override string ClusterId {
- get {
- return m_clusterId;
- }
- set {
- m_clusterId_present = true;
- m_clusterId = value;
- }
- }
-
- public override void ClearContentType() { m_contentType_present = false; }
- public override void ClearContentEncoding() { m_contentEncoding_present = false; }
- public override void ClearHeaders() { m_headers_present = false; }
- public override void ClearPriority() { m_priority_present = false; }
- public override void ClearReplyTo() { m_replyTo_present = false; }
- public override void ClearMessageId() { m_messageId_present = false; }
- public override void ClearFilename() { m_filename_present = false; }
- public override void ClearTimestamp() { m_timestamp_present = false; }
- public override void ClearClusterId() { m_clusterId_present = false; }
-
- public FileProperties() {}
- public override int ProtocolClassId { get { return 70; } }
- public override string ProtocolClassName { get { return "file"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_contentType_present = reader.ReadPresence();
- m_contentEncoding_present = reader.ReadPresence();
- m_headers_present = reader.ReadPresence();
- m_priority_present = reader.ReadPresence();
- m_replyTo_present = reader.ReadPresence();
- m_messageId_present = reader.ReadPresence();
- m_filename_present = reader.ReadPresence();
- m_timestamp_present = reader.ReadPresence();
- m_clusterId_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_contentType_present) { m_contentType = reader.ReadShortstr(); }
- if (m_contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_priority_present) { m_priority = reader.ReadOctet(); }
- if (m_replyTo_present) { m_replyTo = reader.ReadShortstr(); }
- if (m_messageId_present) { m_messageId = reader.ReadShortstr(); }
- if (m_filename_present) { m_filename = reader.ReadShortstr(); }
- if (m_timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
- if (m_clusterId_present) { m_clusterId = reader.ReadShortstr(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_contentType_present);
- writer.WritePresence(m_contentEncoding_present);
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_priority_present);
- writer.WritePresence(m_replyTo_present);
- writer.WritePresence(m_messageId_present);
- writer.WritePresence(m_filename_present);
- writer.WritePresence(m_timestamp_present);
- writer.WritePresence(m_clusterId_present);
- writer.FinishPresence();
- if (m_contentType_present) { writer.WriteShortstr(m_contentType); }
- if (m_contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_priority_present) { writer.WriteOctet(m_priority); }
- if (m_replyTo_present) { writer.WriteShortstr(m_replyTo); }
- if (m_messageId_present) { writer.WriteShortstr(m_messageId); }
- if (m_filename_present) { writer.WriteShortstr(m_filename); }
- if (m_timestamp_present) { writer.WriteTimestamp(m_timestamp); }
- if (m_clusterId_present) { writer.WriteShortstr(m_clusterId); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("content type="); sb.Append(m_contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
- sb.Append("content encoding="); sb.Append(m_contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("priority="); sb.Append(m_priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
- sb.Append("reply to="); sb.Append(m_replyTo_present ? (m_replyTo == null ? "(null)" : m_replyTo.ToString()) : "_"); sb.Append(", ");
- sb.Append("message id="); sb.Append(m_messageId_present ? (m_messageId == null ? "(null)" : m_messageId.ToString()) : "_"); sb.Append(", ");
- sb.Append("filename="); sb.Append(m_filename_present ? (m_filename == null ? "(null)" : m_filename.ToString()) : "_"); sb.Append(", ");
- sb.Append("timestamp="); sb.Append(m_timestamp_present ? m_timestamp.ToString() : "_"); sb.Append(", ");
- sb.Append("cluster id="); sb.Append(m_clusterId_present ? (m_clusterId == null ? "(null)" : m_clusterId.ToString()) : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "stream"</summary>
- public class StreamProperties: RabbitMQ.Client.Impl.StreamProperties {
- private string m_contentType;
- private string m_contentEncoding;
- private System.Collections.IDictionary m_headers;
- private byte m_priority;
- private AmqpTimestamp m_timestamp;
-
- private bool m_contentType_present = false;
- private bool m_contentEncoding_present = false;
- private bool m_headers_present = false;
- private bool m_priority_present = false;
- private bool m_timestamp_present = false;
-
- public override string ContentType {
- get {
- return m_contentType;
- }
- set {
- m_contentType_present = true;
- m_contentType = value;
- }
- }
- public override string ContentEncoding {
- get {
- return m_contentEncoding;
- }
- set {
- m_contentEncoding_present = true;
- m_contentEncoding = value;
- }
- }
- public override System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public override byte Priority {
- get {
- return m_priority;
- }
- set {
- m_priority_present = true;
- m_priority = value;
- }
- }
- public override AmqpTimestamp Timestamp {
- get {
- return m_timestamp;
- }
- set {
- m_timestamp_present = true;
- m_timestamp = value;
- }
- }
-
- public override void ClearContentType() { m_contentType_present = false; }
- public override void ClearContentEncoding() { m_contentEncoding_present = false; }
- public override void ClearHeaders() { m_headers_present = false; }
- public override void ClearPriority() { m_priority_present = false; }
- public override void ClearTimestamp() { m_timestamp_present = false; }
-
- public StreamProperties() {}
- public override int ProtocolClassId { get { return 80; } }
- public override string ProtocolClassName { get { return "stream"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_contentType_present = reader.ReadPresence();
- m_contentEncoding_present = reader.ReadPresence();
- m_headers_present = reader.ReadPresence();
- m_priority_present = reader.ReadPresence();
- m_timestamp_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_contentType_present) { m_contentType = reader.ReadShortstr(); }
- if (m_contentEncoding_present) { m_contentEncoding = reader.ReadShortstr(); }
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_priority_present) { m_priority = reader.ReadOctet(); }
- if (m_timestamp_present) { m_timestamp = reader.ReadTimestamp(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_contentType_present);
- writer.WritePresence(m_contentEncoding_present);
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_priority_present);
- writer.WritePresence(m_timestamp_present);
- writer.FinishPresence();
- if (m_contentType_present) { writer.WriteShortstr(m_contentType); }
- if (m_contentEncoding_present) { writer.WriteShortstr(m_contentEncoding); }
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_priority_present) { writer.WriteOctet(m_priority); }
- if (m_timestamp_present) { writer.WriteTimestamp(m_timestamp); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("content type="); sb.Append(m_contentType_present ? (m_contentType == null ? "(null)" : m_contentType.ToString()) : "_"); sb.Append(", ");
- sb.Append("content encoding="); sb.Append(m_contentEncoding_present ? (m_contentEncoding == null ? "(null)" : m_contentEncoding.ToString()) : "_"); sb.Append(", ");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("priority="); sb.Append(m_priority_present ? m_priority.ToString() : "_"); sb.Append(", ");
- sb.Append("timestamp="); sb.Append(m_timestamp_present ? m_timestamp.ToString() : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "tunnel"</summary>
- public class TunnelProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
- private System.Collections.IDictionary m_headers;
- private string m_proxyName;
- private string m_dataName;
- private byte m_durable;
- private byte m_broadcast;
-
- private bool m_headers_present = false;
- private bool m_proxyName_present = false;
- private bool m_dataName_present = false;
- private bool m_durable_present = false;
- private bool m_broadcast_present = false;
-
- public System.Collections.IDictionary Headers {
- get {
- return m_headers;
- }
- set {
- m_headers_present = true;
- m_headers = value;
- }
- }
- public string ProxyName {
- get {
- return m_proxyName;
- }
- set {
- m_proxyName_present = true;
- m_proxyName = value;
- }
- }
- public string DataName {
- get {
- return m_dataName;
- }
- set {
- m_dataName_present = true;
- m_dataName = value;
- }
- }
- public byte Durable {
- get {
- return m_durable;
- }
- set {
- m_durable_present = true;
- m_durable = value;
- }
- }
- public byte Broadcast {
- get {
- return m_broadcast;
- }
- set {
- m_broadcast_present = true;
- m_broadcast = value;
- }
- }
-
- public void ClearHeaders() { m_headers_present = false; }
- public void ClearProxyName() { m_proxyName_present = false; }
- public void ClearDataName() { m_dataName_present = false; }
- public void ClearDurable() { m_durable_present = false; }
- public void ClearBroadcast() { m_broadcast_present = false; }
-
- public TunnelProperties() {}
- public override int ProtocolClassId { get { return 110; } }
- public override string ProtocolClassName { get { return "tunnel"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- m_headers_present = reader.ReadPresence();
- m_proxyName_present = reader.ReadPresence();
- m_dataName_present = reader.ReadPresence();
- m_durable_present = reader.ReadPresence();
- m_broadcast_present = reader.ReadPresence();
- reader.FinishPresence();
- if (m_headers_present) { m_headers = reader.ReadTable(); }
- if (m_proxyName_present) { m_proxyName = reader.ReadShortstr(); }
- if (m_dataName_present) { m_dataName = reader.ReadShortstr(); }
- if (m_durable_present) { m_durable = reader.ReadOctet(); }
- if (m_broadcast_present) { m_broadcast = reader.ReadOctet(); }
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.WritePresence(m_headers_present);
- writer.WritePresence(m_proxyName_present);
- writer.WritePresence(m_dataName_present);
- writer.WritePresence(m_durable_present);
- writer.WritePresence(m_broadcast_present);
- writer.FinishPresence();
- if (m_headers_present) { writer.WriteTable(m_headers); }
- if (m_proxyName_present) { writer.WriteShortstr(m_proxyName); }
- if (m_dataName_present) { writer.WriteShortstr(m_dataName); }
- if (m_durable_present) { writer.WriteOctet(m_durable); }
- if (m_broadcast_present) { writer.WriteOctet(m_broadcast); }
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append("headers="); sb.Append(m_headers_present ? (m_headers == null ? "(null)" : m_headers.ToString()) : "_"); sb.Append(", ");
- sb.Append("proxy name="); sb.Append(m_proxyName_present ? (m_proxyName == null ? "(null)" : m_proxyName.ToString()) : "_"); sb.Append(", ");
- sb.Append("data name="); sb.Append(m_dataName_present ? (m_dataName == null ? "(null)" : m_dataName.ToString()) : "_"); sb.Append(", ");
- sb.Append("durable="); sb.Append(m_durable_present ? m_durable.ToString() : "_"); sb.Append(", ");
- sb.Append("broadcast="); sb.Append(m_broadcast_present ? m_broadcast.ToString() : "_");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. AMQP specification content header properties for content class "test"</summary>
- public class TestProperties: RabbitMQ.Client.Impl.ContentHeaderBase {
-
-
-
-
- public TestProperties() {}
- public override int ProtocolClassId { get { return 120; } }
- public override string ProtocolClassName { get { return "test"; } }
-
- public override void ReadPropertiesFrom(RabbitMQ.Client.Impl.ContentHeaderPropertyReader reader) {
- reader.FinishPresence();
- }
-
- public override void WritePropertiesTo(RabbitMQ.Client.Impl.ContentHeaderPropertyWriter writer) {
- writer.FinishPresence();
- }
-
- public override void AppendPropertyDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
-}
-namespace RabbitMQ.Client.Framing.Impl.v0_8qpid {
- using RabbitMQ.Client.Framing.v0_8qpid;
- public enum ClassId {
- Connection = 10,
- Channel = 20,
- Access = 30,
- Exchange = 40,
- Queue = 50,
- Basic = 60,
- File = 70,
- Stream = 80,
- Tx = 90,
- Dtx = 100,
- Tunnel = 110,
- Test = 120,
- Invalid = -1
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionStart: RabbitMQ.Client.Impl.MethodBase, IConnectionStart {
- public const int ClassId = 10;
- public const int MethodId = 10;
-
- public byte m_versionMajor;
- public byte m_versionMinor;
- public System.Collections.IDictionary m_serverProperties;
- public byte[] m_mechanisms;
- public byte[] m_locales;
-
- byte IConnectionStart.VersionMajor { get { return m_versionMajor; } }
- byte IConnectionStart.VersionMinor { get { return m_versionMinor; } }
- System.Collections.IDictionary IConnectionStart.ServerProperties { get { return m_serverProperties; } }
- byte[] IConnectionStart.Mechanisms { get { return m_mechanisms; } }
- byte[] IConnectionStart.Locales { get { return m_locales; } }
-
- public ConnectionStart() {}
- public ConnectionStart(
- byte initVersionMajor,
- byte initVersionMinor,
- System.Collections.IDictionary initServerProperties,
- byte[] initMechanisms,
- byte[] initLocales)
- {
- m_versionMajor = initVersionMajor;
- m_versionMinor = initVersionMinor;
- m_serverProperties = initServerProperties;
- m_mechanisms = initMechanisms;
- m_locales = initLocales;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "connection.start"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_versionMajor = reader.ReadOctet();
- m_versionMinor = reader.ReadOctet();
- m_serverProperties = reader.ReadTable();
- m_mechanisms = reader.ReadLongstr();
- m_locales = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteOctet(m_versionMajor);
- writer.WriteOctet(m_versionMinor);
- writer.WriteTable(m_serverProperties);
- writer.WriteLongstr(m_mechanisms);
- writer.WriteLongstr(m_locales);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_versionMajor); sb.Append(",");
- sb.Append(m_versionMinor); sb.Append(",");
- sb.Append(m_serverProperties); sb.Append(",");
- sb.Append(m_mechanisms); sb.Append(",");
- sb.Append(m_locales);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionStartOk: RabbitMQ.Client.Impl.MethodBase, IConnectionStartOk {
- public const int ClassId = 10;
- public const int MethodId = 11;
-
- public System.Collections.IDictionary m_clientProperties;
- public string m_mechanism;
- public byte[] m_response;
- public string m_locale;
-
- System.Collections.IDictionary IConnectionStartOk.ClientProperties { get { return m_clientProperties; } }
- string IConnectionStartOk.Mechanism { get { return m_mechanism; } }
- byte[] IConnectionStartOk.Response { get { return m_response; } }
- string IConnectionStartOk.Locale { get { return m_locale; } }
-
- public ConnectionStartOk() {}
- public ConnectionStartOk(
- System.Collections.IDictionary initClientProperties,
- string initMechanism,
- byte[] initResponse,
- string initLocale)
- {
- m_clientProperties = initClientProperties;
- m_mechanism = initMechanism;
- m_response = initResponse;
- m_locale = initLocale;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "connection.start-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_clientProperties = reader.ReadTable();
- m_mechanism = reader.ReadShortstr();
- m_response = reader.ReadLongstr();
- m_locale = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteTable(m_clientProperties);
- writer.WriteShortstr(m_mechanism);
- writer.WriteLongstr(m_response);
- writer.WriteShortstr(m_locale);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_clientProperties); sb.Append(",");
- sb.Append(m_mechanism); sb.Append(",");
- sb.Append(m_response); sb.Append(",");
- sb.Append(m_locale);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionSecure: RabbitMQ.Client.Impl.MethodBase, IConnectionSecure {
- public const int ClassId = 10;
- public const int MethodId = 20;
-
- public byte[] m_challenge;
-
- byte[] IConnectionSecure.Challenge { get { return m_challenge; } }
-
- public ConnectionSecure() {}
- public ConnectionSecure(
- byte[] initChallenge)
- {
- m_challenge = initChallenge;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "connection.secure"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_challenge = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_challenge);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_challenge);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionSecureOk: RabbitMQ.Client.Impl.MethodBase, IConnectionSecureOk {
- public const int ClassId = 10;
- public const int MethodId = 21;
-
- public byte[] m_response;
-
- byte[] IConnectionSecureOk.Response { get { return m_response; } }
-
- public ConnectionSecureOk() {}
- public ConnectionSecureOk(
- byte[] initResponse)
- {
- m_response = initResponse;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "connection.secure-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_response = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_response);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_response);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionTune: RabbitMQ.Client.Impl.MethodBase, IConnectionTune {
- public const int ClassId = 10;
- public const int MethodId = 30;
-
- public ushort m_channelMax;
- public uint m_frameMax;
- public ushort m_heartbeat;
-
- ushort IConnectionTune.ChannelMax { get { return m_channelMax; } }
- uint IConnectionTune.FrameMax { get { return m_frameMax; } }
- ushort IConnectionTune.Heartbeat { get { return m_heartbeat; } }
-
- public ConnectionTune() {}
- public ConnectionTune(
- ushort initChannelMax,
- uint initFrameMax,
- ushort initHeartbeat)
- {
- m_channelMax = initChannelMax;
- m_frameMax = initFrameMax;
- m_heartbeat = initHeartbeat;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "connection.tune"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_channelMax = reader.ReadShort();
- m_frameMax = reader.ReadLong();
- m_heartbeat = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_channelMax);
- writer.WriteLong(m_frameMax);
- writer.WriteShort(m_heartbeat);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_channelMax); sb.Append(",");
- sb.Append(m_frameMax); sb.Append(",");
- sb.Append(m_heartbeat);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionTuneOk: RabbitMQ.Client.Impl.MethodBase, IConnectionTuneOk {
- public const int ClassId = 10;
- public const int MethodId = 31;
-
- public ushort m_channelMax;
- public uint m_frameMax;
- public ushort m_heartbeat;
-
- ushort IConnectionTuneOk.ChannelMax { get { return m_channelMax; } }
- uint IConnectionTuneOk.FrameMax { get { return m_frameMax; } }
- ushort IConnectionTuneOk.Heartbeat { get { return m_heartbeat; } }
-
- public ConnectionTuneOk() {}
- public ConnectionTuneOk(
- ushort initChannelMax,
- uint initFrameMax,
- ushort initHeartbeat)
- {
- m_channelMax = initChannelMax;
- m_frameMax = initFrameMax;
- m_heartbeat = initHeartbeat;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "connection.tune-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_channelMax = reader.ReadShort();
- m_frameMax = reader.ReadLong();
- m_heartbeat = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_channelMax);
- writer.WriteLong(m_frameMax);
- writer.WriteShort(m_heartbeat);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_channelMax); sb.Append(",");
- sb.Append(m_frameMax); sb.Append(",");
- sb.Append(m_heartbeat);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionOpen: RabbitMQ.Client.Impl.MethodBase, IConnectionOpen {
- public const int ClassId = 10;
- public const int MethodId = 40;
-
- public string m_virtualHost;
- public string m_capabilities;
- public bool m_insist;
-
- string IConnectionOpen.VirtualHost { get { return m_virtualHost; } }
- string IConnectionOpen.Capabilities { get { return m_capabilities; } }
- bool IConnectionOpen.Insist { get { return m_insist; } }
-
- public ConnectionOpen() {}
- public ConnectionOpen(
- string initVirtualHost,
- string initCapabilities,
- bool initInsist)
- {
- m_virtualHost = initVirtualHost;
- m_capabilities = initCapabilities;
- m_insist = initInsist;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "connection.open"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_virtualHost = reader.ReadShortstr();
- m_capabilities = reader.ReadShortstr();
- m_insist = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_virtualHost);
- writer.WriteShortstr(m_capabilities);
- writer.WriteBit(m_insist);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_virtualHost); sb.Append(",");
- sb.Append(m_capabilities); sb.Append(",");
- sb.Append(m_insist);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionOpenOk: RabbitMQ.Client.Impl.MethodBase, IConnectionOpenOk {
- public const int ClassId = 10;
- public const int MethodId = 41;
-
- public string m_knownHosts;
-
- string IConnectionOpenOk.KnownHosts { get { return m_knownHosts; } }
-
- public ConnectionOpenOk() {}
- public ConnectionOpenOk(
- string initKnownHosts)
- {
- m_knownHosts = initKnownHosts;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "connection.open-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_knownHosts = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_knownHosts);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_knownHosts);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionRedirect: RabbitMQ.Client.Impl.MethodBase, IConnectionRedirect {
- public const int ClassId = 10;
- public const int MethodId = 50;
-
- public string m_host;
- public string m_knownHosts;
-
- string IConnectionRedirect.Host { get { return m_host; } }
- string IConnectionRedirect.KnownHosts { get { return m_knownHosts; } }
-
- public ConnectionRedirect() {}
- public ConnectionRedirect(
- string initHost,
- string initKnownHosts)
- {
- m_host = initHost;
- m_knownHosts = initKnownHosts;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "connection.redirect"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_host = reader.ReadShortstr();
- m_knownHosts = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_host);
- writer.WriteShortstr(m_knownHosts);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_host); sb.Append(",");
- sb.Append(m_knownHosts);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionClose: RabbitMQ.Client.Impl.MethodBase, IConnectionClose {
- public const int ClassId = 10;
- public const int MethodId = 60;
-
- public ushort m_replyCode;
- public string m_replyText;
- public ushort m_classId;
- public ushort m_methodId;
-
- ushort IConnectionClose.ReplyCode { get { return m_replyCode; } }
- string IConnectionClose.ReplyText { get { return m_replyText; } }
- ushort IConnectionClose.ClassId { get { return m_classId; } }
- ushort IConnectionClose.MethodId { get { return m_methodId; } }
-
- public ConnectionClose() {}
- public ConnectionClose(
- ushort initReplyCode,
- string initReplyText,
- ushort initClassId,
- ushort initMethodId)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_classId = initClassId;
- m_methodId = initMethodId;
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "connection.close"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_classId = reader.ReadShort();
- m_methodId = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShort(m_classId);
- writer.WriteShort(m_methodId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_classId); sb.Append(",");
- sb.Append(m_methodId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ConnectionCloseOk: RabbitMQ.Client.Impl.MethodBase, IConnectionCloseOk {
- public const int ClassId = 10;
- public const int MethodId = 61;
-
-
-
- public ConnectionCloseOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 10; } }
- public override int ProtocolMethodId { get { return 61; } }
- public override string ProtocolMethodName { get { return "connection.close-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelOpen: RabbitMQ.Client.Impl.MethodBase, IChannelOpen {
- public const int ClassId = 20;
- public const int MethodId = 10;
-
- public string m_outOfBand;
-
- string IChannelOpen.OutOfBand { get { return m_outOfBand; } }
-
- public ChannelOpen() {}
- public ChannelOpen(
- string initOutOfBand)
- {
- m_outOfBand = initOutOfBand;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "channel.open"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_outOfBand = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_outOfBand);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_outOfBand);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelOpenOk: RabbitMQ.Client.Impl.MethodBase, IChannelOpenOk {
- public const int ClassId = 20;
- public const int MethodId = 11;
-
-
-
- public ChannelOpenOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "channel.open-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelFlow: RabbitMQ.Client.Impl.MethodBase, IChannelFlow {
- public const int ClassId = 20;
- public const int MethodId = 20;
-
- public bool m_active;
-
- bool IChannelFlow.Active { get { return m_active; } }
-
- public ChannelFlow() {}
- public ChannelFlow(
- bool initActive)
- {
- m_active = initActive;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "channel.flow"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_active = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteBit(m_active);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_active);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelFlowOk: RabbitMQ.Client.Impl.MethodBase, IChannelFlowOk {
- public const int ClassId = 20;
- public const int MethodId = 21;
-
- public bool m_active;
-
- bool IChannelFlowOk.Active { get { return m_active; } }
-
- public ChannelFlowOk() {}
- public ChannelFlowOk(
- bool initActive)
- {
- m_active = initActive;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "channel.flow-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_active = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteBit(m_active);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_active);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelAlert: RabbitMQ.Client.Impl.MethodBase, IChannelAlert {
- public const int ClassId = 20;
- public const int MethodId = 30;
-
- public ushort m_replyCode;
- public string m_replyText;
- public System.Collections.IDictionary m_details;
-
- ushort IChannelAlert.ReplyCode { get { return m_replyCode; } }
- string IChannelAlert.ReplyText { get { return m_replyText; } }
- System.Collections.IDictionary IChannelAlert.Details { get { return m_details; } }
-
- public ChannelAlert() {}
- public ChannelAlert(
- ushort initReplyCode,
- string initReplyText,
- System.Collections.IDictionary initDetails)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_details = initDetails;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "channel.alert"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_details = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteTable(m_details);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_details);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelClose: RabbitMQ.Client.Impl.MethodBase, IChannelClose {
- public const int ClassId = 20;
- public const int MethodId = 40;
-
- public ushort m_replyCode;
- public string m_replyText;
- public ushort m_classId;
- public ushort m_methodId;
-
- ushort IChannelClose.ReplyCode { get { return m_replyCode; } }
- string IChannelClose.ReplyText { get { return m_replyText; } }
- ushort IChannelClose.ClassId { get { return m_classId; } }
- ushort IChannelClose.MethodId { get { return m_methodId; } }
-
- public ChannelClose() {}
- public ChannelClose(
- ushort initReplyCode,
- string initReplyText,
- ushort initClassId,
- ushort initMethodId)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_classId = initClassId;
- m_methodId = initMethodId;
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "channel.close"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_classId = reader.ReadShort();
- m_methodId = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShort(m_classId);
- writer.WriteShort(m_methodId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_classId); sb.Append(",");
- sb.Append(m_methodId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ChannelCloseOk: RabbitMQ.Client.Impl.MethodBase, IChannelCloseOk {
- public const int ClassId = 20;
- public const int MethodId = 41;
-
-
-
- public ChannelCloseOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 20; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "channel.close-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class AccessRequest: RabbitMQ.Client.Impl.MethodBase, IAccessRequest {
- public const int ClassId = 30;
- public const int MethodId = 10;
-
- public string m_realm;
- public bool m_exclusive;
- public bool m_passive;
- public bool m_active;
- public bool m_write;
- public bool m_read;
-
- string IAccessRequest.Realm { get { return m_realm; } }
- bool IAccessRequest.Exclusive { get { return m_exclusive; } }
- bool IAccessRequest.Passive { get { return m_passive; } }
- bool IAccessRequest.Active { get { return m_active; } }
- bool IAccessRequest.Write { get { return m_write; } }
- bool IAccessRequest.Read { get { return m_read; } }
-
- public AccessRequest() {}
- public AccessRequest(
- string initRealm,
- bool initExclusive,
- bool initPassive,
- bool initActive,
- bool initWrite,
- bool initRead)
- {
- m_realm = initRealm;
- m_exclusive = initExclusive;
- m_passive = initPassive;
- m_active = initActive;
- m_write = initWrite;
- m_read = initRead;
- }
-
- public override int ProtocolClassId { get { return 30; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "access.request"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_realm = reader.ReadShortstr();
- m_exclusive = reader.ReadBit();
- m_passive = reader.ReadBit();
- m_active = reader.ReadBit();
- m_write = reader.ReadBit();
- m_read = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_realm);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_passive);
- writer.WriteBit(m_active);
- writer.WriteBit(m_write);
- writer.WriteBit(m_read);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_realm); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_passive); sb.Append(",");
- sb.Append(m_active); sb.Append(",");
- sb.Append(m_write); sb.Append(",");
- sb.Append(m_read);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class AccessRequestOk: RabbitMQ.Client.Impl.MethodBase, IAccessRequestOk {
- public const int ClassId = 30;
- public const int MethodId = 11;
-
- public ushort m_ticket;
-
- ushort IAccessRequestOk.Ticket { get { return m_ticket; } }
-
- public AccessRequestOk() {}
- public AccessRequestOk(
- ushort initTicket)
- {
- m_ticket = initTicket;
- }
-
- public override int ProtocolClassId { get { return 30; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "access.request-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDeclare: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclare {
- public const int ClassId = 40;
- public const int MethodId = 10;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_type;
- public bool m_passive;
- public bool m_durable;
- public bool m_autoDelete;
- public bool m_internal;
- public bool m_nowait;
- public System.Collections.IDictionary m_arguments;
-
- ushort IExchangeDeclare.Ticket { get { return m_ticket; } }
- string IExchangeDeclare.Exchange { get { return m_exchange; } }
- string IExchangeDeclare.Type { get { return m_type; } }
- bool IExchangeDeclare.Passive { get { return m_passive; } }
- bool IExchangeDeclare.Durable { get { return m_durable; } }
- bool IExchangeDeclare.AutoDelete { get { return m_autoDelete; } }
- bool IExchangeDeclare.Internal { get { return m_internal; } }
- bool IExchangeDeclare.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IExchangeDeclare.Arguments { get { return m_arguments; } }
-
- public ExchangeDeclare() {}
- public ExchangeDeclare(
- ushort initTicket,
- string initExchange,
- string initType,
- bool initPassive,
- bool initDurable,
- bool initAutoDelete,
- bool initInternal,
- bool initNowait,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_type = initType;
- m_passive = initPassive;
- m_durable = initDurable;
- m_autoDelete = initAutoDelete;
- m_internal = initInternal;
- m_nowait = initNowait;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "exchange.declare"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_type = reader.ReadShortstr();
- m_passive = reader.ReadBit();
- m_durable = reader.ReadBit();
- m_autoDelete = reader.ReadBit();
- m_internal = reader.ReadBit();
- m_nowait = reader.ReadBit();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_type);
- writer.WriteBit(m_passive);
- writer.WriteBit(m_durable);
- writer.WriteBit(m_autoDelete);
- writer.WriteBit(m_internal);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_type); sb.Append(",");
- sb.Append(m_passive); sb.Append(",");
- sb.Append(m_durable); sb.Append(",");
- sb.Append(m_autoDelete); sb.Append(",");
- sb.Append(m_internal); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDeclareOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeclareOk {
- public const int ClassId = 40;
- public const int MethodId = 11;
-
-
-
- public ExchangeDeclareOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "exchange.declare-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDelete: RabbitMQ.Client.Impl.MethodBase, IExchangeDelete {
- public const int ClassId = 40;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_exchange;
- public bool m_ifUnused;
- public bool m_nowait;
-
- ushort IExchangeDelete.Ticket { get { return m_ticket; } }
- string IExchangeDelete.Exchange { get { return m_exchange; } }
- bool IExchangeDelete.IfUnused { get { return m_ifUnused; } }
- bool IExchangeDelete.Nowait { get { return m_nowait; } }
-
- public ExchangeDelete() {}
- public ExchangeDelete(
- ushort initTicket,
- string initExchange,
- bool initIfUnused,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_ifUnused = initIfUnused;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "exchange.delete"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_ifUnused = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteBit(m_ifUnused);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_ifUnused); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeDeleteOk: RabbitMQ.Client.Impl.MethodBase, IExchangeDeleteOk {
- public const int ClassId = 40;
- public const int MethodId = 21;
-
-
-
- public ExchangeDeleteOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "exchange.delete-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeBound: RabbitMQ.Client.Impl.MethodBase, IExchangeBound {
- public const int ClassId = 40;
- public const int MethodId = 22;
-
- public string m_exchange;
- public string m_routingKey;
- public string m_queue;
-
- string IExchangeBound.Exchange { get { return m_exchange; } }
- string IExchangeBound.RoutingKey { get { return m_routingKey; } }
- string IExchangeBound.Queue { get { return m_queue; } }
-
- public ExchangeBound() {}
- public ExchangeBound(
- string initExchange,
- string initRoutingKey,
- string initQueue)
- {
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_queue = initQueue;
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 22; } }
- public override string ProtocolMethodName { get { return "exchange.bound"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_queue = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteShortstr(m_queue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_queue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class ExchangeBoundOk: RabbitMQ.Client.Impl.MethodBase, IExchangeBoundOk {
- public const int ClassId = 40;
- public const int MethodId = 23;
-
- public ushort m_replyCode;
- public string m_replyText;
-
- ushort IExchangeBoundOk.ReplyCode { get { return m_replyCode; } }
- string IExchangeBoundOk.ReplyText { get { return m_replyText; } }
-
- public ExchangeBoundOk() {}
- public ExchangeBoundOk(
- ushort initReplyCode,
- string initReplyText)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- }
-
- public override int ProtocolClassId { get { return 40; } }
- public override int ProtocolMethodId { get { return 23; } }
- public override string ProtocolMethodName { get { return "exchange.bound-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDeclare: RabbitMQ.Client.Impl.MethodBase, IQueueDeclare {
- public const int ClassId = 50;
- public const int MethodId = 10;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_passive;
- public bool m_durable;
- public bool m_exclusive;
- public bool m_autoDelete;
- public bool m_nowait;
- public System.Collections.IDictionary m_arguments;
-
- ushort IQueueDeclare.Ticket { get { return m_ticket; } }
- string IQueueDeclare.Queue { get { return m_queue; } }
- bool IQueueDeclare.Passive { get { return m_passive; } }
- bool IQueueDeclare.Durable { get { return m_durable; } }
- bool IQueueDeclare.Exclusive { get { return m_exclusive; } }
- bool IQueueDeclare.AutoDelete { get { return m_autoDelete; } }
- bool IQueueDeclare.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IQueueDeclare.Arguments { get { return m_arguments; } }
-
- public QueueDeclare() {}
- public QueueDeclare(
- ushort initTicket,
- string initQueue,
- bool initPassive,
- bool initDurable,
- bool initExclusive,
- bool initAutoDelete,
- bool initNowait,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_passive = initPassive;
- m_durable = initDurable;
- m_exclusive = initExclusive;
- m_autoDelete = initAutoDelete;
- m_nowait = initNowait;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "queue.declare"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_passive = reader.ReadBit();
- m_durable = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_autoDelete = reader.ReadBit();
- m_nowait = reader.ReadBit();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_passive);
- writer.WriteBit(m_durable);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_autoDelete);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_passive); sb.Append(",");
- sb.Append(m_durable); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_autoDelete); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDeclareOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeclareOk {
- public const int ClassId = 50;
- public const int MethodId = 11;
-
- public string m_queue;
- public uint m_messageCount;
- public uint m_consumerCount;
-
- string IQueueDeclareOk.Queue { get { return m_queue; } }
- uint IQueueDeclareOk.MessageCount { get { return m_messageCount; } }
- uint IQueueDeclareOk.ConsumerCount { get { return m_consumerCount; } }
-
- public QueueDeclareOk() {}
- public QueueDeclareOk(
- string initQueue,
- uint initMessageCount,
- uint initConsumerCount)
- {
- m_queue = initQueue;
- m_messageCount = initMessageCount;
- m_consumerCount = initConsumerCount;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "queue.declare-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_queue = reader.ReadShortstr();
- m_messageCount = reader.ReadLong();
- m_consumerCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_queue);
- writer.WriteLong(m_messageCount);
- writer.WriteLong(m_consumerCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_messageCount); sb.Append(",");
- sb.Append(m_consumerCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueBind: RabbitMQ.Client.Impl.MethodBase, IQueueBind {
- public const int ClassId = 50;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_exchange;
- public string m_routingKey;
- public bool m_nowait;
- public System.Collections.IDictionary m_arguments;
-
- ushort IQueueBind.Ticket { get { return m_ticket; } }
- string IQueueBind.Queue { get { return m_queue; } }
- string IQueueBind.Exchange { get { return m_exchange; } }
- string IQueueBind.RoutingKey { get { return m_routingKey; } }
- bool IQueueBind.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IQueueBind.Arguments { get { return m_arguments; } }
-
- public QueueBind() {}
- public QueueBind(
- ushort initTicket,
- string initQueue,
- string initExchange,
- string initRoutingKey,
- bool initNowait,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_nowait = initNowait;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "queue.bind"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueBindOk: RabbitMQ.Client.Impl.MethodBase, IQueueBindOk {
- public const int ClassId = 50;
- public const int MethodId = 21;
-
-
-
- public QueueBindOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "queue.bind-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueuePurge: RabbitMQ.Client.Impl.MethodBase, IQueuePurge {
- public const int ClassId = 50;
- public const int MethodId = 30;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_nowait;
-
- ushort IQueuePurge.Ticket { get { return m_ticket; } }
- string IQueuePurge.Queue { get { return m_queue; } }
- bool IQueuePurge.Nowait { get { return m_nowait; } }
-
- public QueuePurge() {}
- public QueuePurge(
- ushort initTicket,
- string initQueue,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "queue.purge"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueuePurgeOk: RabbitMQ.Client.Impl.MethodBase, IQueuePurgeOk {
- public const int ClassId = 50;
- public const int MethodId = 31;
-
- public uint m_messageCount;
-
- uint IQueuePurgeOk.MessageCount { get { return m_messageCount; } }
-
- public QueuePurgeOk() {}
- public QueuePurgeOk(
- uint initMessageCount)
- {
- m_messageCount = initMessageCount;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "queue.purge-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_messageCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_messageCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_messageCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDelete: RabbitMQ.Client.Impl.MethodBase, IQueueDelete {
- public const int ClassId = 50;
- public const int MethodId = 40;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_ifUnused;
- public bool m_ifEmpty;
- public bool m_nowait;
-
- ushort IQueueDelete.Ticket { get { return m_ticket; } }
- string IQueueDelete.Queue { get { return m_queue; } }
- bool IQueueDelete.IfUnused { get { return m_ifUnused; } }
- bool IQueueDelete.IfEmpty { get { return m_ifEmpty; } }
- bool IQueueDelete.Nowait { get { return m_nowait; } }
-
- public QueueDelete() {}
- public QueueDelete(
- ushort initTicket,
- string initQueue,
- bool initIfUnused,
- bool initIfEmpty,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_ifUnused = initIfUnused;
- m_ifEmpty = initIfEmpty;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "queue.delete"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_ifUnused = reader.ReadBit();
- m_ifEmpty = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_ifUnused);
- writer.WriteBit(m_ifEmpty);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_ifUnused); sb.Append(",");
- sb.Append(m_ifEmpty); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class QueueDeleteOk: RabbitMQ.Client.Impl.MethodBase, IQueueDeleteOk {
- public const int ClassId = 50;
- public const int MethodId = 41;
-
- public uint m_messageCount;
-
- uint IQueueDeleteOk.MessageCount { get { return m_messageCount; } }
-
- public QueueDeleteOk() {}
- public QueueDeleteOk(
- uint initMessageCount)
- {
- m_messageCount = initMessageCount;
- }
-
- public override int ProtocolClassId { get { return 50; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "queue.delete-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_messageCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_messageCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_messageCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicQos: RabbitMQ.Client.Impl.MethodBase, IBasicQos {
- public const int ClassId = 60;
- public const int MethodId = 10;
-
- public uint m_prefetchSize;
- public ushort m_prefetchCount;
- public bool m_global;
-
- uint IBasicQos.PrefetchSize { get { return m_prefetchSize; } }
- ushort IBasicQos.PrefetchCount { get { return m_prefetchCount; } }
- bool IBasicQos.Global { get { return m_global; } }
-
- public BasicQos() {}
- public BasicQos(
- uint initPrefetchSize,
- ushort initPrefetchCount,
- bool initGlobal)
- {
- m_prefetchSize = initPrefetchSize;
- m_prefetchCount = initPrefetchCount;
- m_global = initGlobal;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "basic.qos"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_prefetchSize = reader.ReadLong();
- m_prefetchCount = reader.ReadShort();
- m_global = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_prefetchSize);
- writer.WriteShort(m_prefetchCount);
- writer.WriteBit(m_global);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_prefetchSize); sb.Append(",");
- sb.Append(m_prefetchCount); sb.Append(",");
- sb.Append(m_global);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicQosOk: RabbitMQ.Client.Impl.MethodBase, IBasicQosOk {
- public const int ClassId = 60;
- public const int MethodId = 11;
-
-
-
- public BasicQosOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "basic.qos-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicConsume: RabbitMQ.Client.Impl.MethodBase, IBasicConsume {
- public const int ClassId = 60;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_consumerTag;
- public bool m_noLocal;
- public bool m_noAck;
- public bool m_exclusive;
- public bool m_nowait;
- public System.Collections.IDictionary m_arguments;
-
- ushort IBasicConsume.Ticket { get { return m_ticket; } }
- string IBasicConsume.Queue { get { return m_queue; } }
- string IBasicConsume.ConsumerTag { get { return m_consumerTag; } }
- bool IBasicConsume.NoLocal { get { return m_noLocal; } }
- bool IBasicConsume.NoAck { get { return m_noAck; } }
- bool IBasicConsume.Exclusive { get { return m_exclusive; } }
- bool IBasicConsume.Nowait { get { return m_nowait; } }
- System.Collections.IDictionary IBasicConsume.Arguments { get { return m_arguments; } }
-
- public BasicConsume() {}
- public BasicConsume(
- ushort initTicket,
- string initQueue,
- string initConsumerTag,
- bool initNoLocal,
- bool initNoAck,
- bool initExclusive,
- bool initNowait,
- System.Collections.IDictionary initArguments)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_consumerTag = initConsumerTag;
- m_noLocal = initNoLocal;
- m_noAck = initNoAck;
- m_exclusive = initExclusive;
- m_nowait = initNowait;
- m_arguments = initArguments;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "basic.consume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_consumerTag = reader.ReadShortstr();
- m_noLocal = reader.ReadBit();
- m_noAck = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_nowait = reader.ReadBit();
- m_arguments = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_noLocal);
- writer.WriteBit(m_noAck);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_nowait);
- writer.WriteTable(m_arguments);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_noLocal); sb.Append(",");
- sb.Append(m_noAck); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_nowait); sb.Append(",");
- sb.Append(m_arguments);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicConsumeOk: RabbitMQ.Client.Impl.MethodBase, IBasicConsumeOk {
- public const int ClassId = 60;
- public const int MethodId = 21;
-
- public string m_consumerTag;
-
- string IBasicConsumeOk.ConsumerTag { get { return m_consumerTag; } }
-
- public BasicConsumeOk() {}
- public BasicConsumeOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "basic.consume-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicCancel: RabbitMQ.Client.Impl.MethodBase, IBasicCancel {
- public const int ClassId = 60;
- public const int MethodId = 30;
-
- public string m_consumerTag;
- public bool m_nowait;
-
- string IBasicCancel.ConsumerTag { get { return m_consumerTag; } }
- bool IBasicCancel.Nowait { get { return m_nowait; } }
-
- public BasicCancel() {}
- public BasicCancel(
- string initConsumerTag,
- bool initNowait)
- {
- m_consumerTag = initConsumerTag;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "basic.cancel"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicCancelOk: RabbitMQ.Client.Impl.MethodBase, IBasicCancelOk {
- public const int ClassId = 60;
- public const int MethodId = 31;
-
- public string m_consumerTag;
-
- string IBasicCancelOk.ConsumerTag { get { return m_consumerTag; } }
-
- public BasicCancelOk() {}
- public BasicCancelOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "basic.cancel-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicPublish: RabbitMQ.Client.Impl.MethodBase, IBasicPublish {
- public const int ClassId = 60;
- public const int MethodId = 40;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_routingKey;
- public bool m_mandatory;
- public bool m_immediate;
-
- ushort IBasicPublish.Ticket { get { return m_ticket; } }
- string IBasicPublish.Exchange { get { return m_exchange; } }
- string IBasicPublish.RoutingKey { get { return m_routingKey; } }
- bool IBasicPublish.Mandatory { get { return m_mandatory; } }
- bool IBasicPublish.Immediate { get { return m_immediate; } }
-
- public BasicPublish() {}
- public BasicPublish(
- ushort initTicket,
- string initExchange,
- string initRoutingKey,
- bool initMandatory,
- bool initImmediate)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_mandatory = initMandatory;
- m_immediate = initImmediate;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "basic.publish"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_mandatory = reader.ReadBit();
- m_immediate = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_mandatory);
- writer.WriteBit(m_immediate);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_mandatory); sb.Append(",");
- sb.Append(m_immediate);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicReturn: RabbitMQ.Client.Impl.MethodBase, IBasicReturn {
- public const int ClassId = 60;
- public const int MethodId = 50;
-
- public ushort m_replyCode;
- public string m_replyText;
- public string m_exchange;
- public string m_routingKey;
-
- ushort IBasicReturn.ReplyCode { get { return m_replyCode; } }
- string IBasicReturn.ReplyText { get { return m_replyText; } }
- string IBasicReturn.Exchange { get { return m_exchange; } }
- string IBasicReturn.RoutingKey { get { return m_routingKey; } }
-
- public BasicReturn() {}
- public BasicReturn(
- ushort initReplyCode,
- string initReplyText,
- string initExchange,
- string initRoutingKey)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "basic.return"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicDeliver: RabbitMQ.Client.Impl.MethodBase, IBasicDeliver {
- public const int ClassId = 60;
- public const int MethodId = 60;
-
- public string m_consumerTag;
- public ulong m_deliveryTag;
- public bool m_redelivered;
- public string m_exchange;
- public string m_routingKey;
-
- string IBasicDeliver.ConsumerTag { get { return m_consumerTag; } }
- ulong IBasicDeliver.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicDeliver.Redelivered { get { return m_redelivered; } }
- string IBasicDeliver.Exchange { get { return m_exchange; } }
- string IBasicDeliver.RoutingKey { get { return m_routingKey; } }
-
- public BasicDeliver() {}
- public BasicDeliver(
- string initConsumerTag,
- ulong initDeliveryTag,
- bool initRedelivered,
- string initExchange,
- string initRoutingKey)
- {
- m_consumerTag = initConsumerTag;
- m_deliveryTag = initDeliveryTag;
- m_redelivered = initRedelivered;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "basic.deliver"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_deliveryTag = reader.ReadLonglong();
- m_redelivered = reader.ReadBit();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_redelivered);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_redelivered); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicGet: RabbitMQ.Client.Impl.MethodBase, IBasicGet {
- public const int ClassId = 60;
- public const int MethodId = 70;
-
- public ushort m_ticket;
- public string m_queue;
- public bool m_noAck;
-
- ushort IBasicGet.Ticket { get { return m_ticket; } }
- string IBasicGet.Queue { get { return m_queue; } }
- bool IBasicGet.NoAck { get { return m_noAck; } }
-
- public BasicGet() {}
- public BasicGet(
- ushort initTicket,
- string initQueue,
- bool initNoAck)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_noAck = initNoAck;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 70; } }
- public override string ProtocolMethodName { get { return "basic.get"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_noAck = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteBit(m_noAck);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_noAck);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicGetOk: RabbitMQ.Client.Impl.MethodBase, IBasicGetOk {
- public const int ClassId = 60;
- public const int MethodId = 71;
-
- public ulong m_deliveryTag;
- public bool m_redelivered;
- public string m_exchange;
- public string m_routingKey;
- public uint m_messageCount;
-
- ulong IBasicGetOk.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicGetOk.Redelivered { get { return m_redelivered; } }
- string IBasicGetOk.Exchange { get { return m_exchange; } }
- string IBasicGetOk.RoutingKey { get { return m_routingKey; } }
- uint IBasicGetOk.MessageCount { get { return m_messageCount; } }
-
- public BasicGetOk() {}
- public BasicGetOk(
- ulong initDeliveryTag,
- bool initRedelivered,
- string initExchange,
- string initRoutingKey,
- uint initMessageCount)
- {
- m_deliveryTag = initDeliveryTag;
- m_redelivered = initRedelivered;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_messageCount = initMessageCount;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 71; } }
- public override string ProtocolMethodName { get { return "basic.get-ok"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_redelivered = reader.ReadBit();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_messageCount = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_redelivered);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteLong(m_messageCount);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_redelivered); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_messageCount);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicGetEmpty: RabbitMQ.Client.Impl.MethodBase, IBasicGetEmpty {
- public const int ClassId = 60;
- public const int MethodId = 72;
-
- public string m_clusterId;
-
- string IBasicGetEmpty.ClusterId { get { return m_clusterId; } }
-
- public BasicGetEmpty() {}
- public BasicGetEmpty(
- string initClusterId)
- {
- m_clusterId = initClusterId;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 72; } }
- public override string ProtocolMethodName { get { return "basic.get-empty"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_clusterId = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_clusterId);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_clusterId);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicAck: RabbitMQ.Client.Impl.MethodBase, IBasicAck {
- public const int ClassId = 60;
- public const int MethodId = 80;
-
- public ulong m_deliveryTag;
- public bool m_multiple;
-
- ulong IBasicAck.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicAck.Multiple { get { return m_multiple; } }
-
- public BasicAck() {}
- public BasicAck(
- ulong initDeliveryTag,
- bool initMultiple)
- {
- m_deliveryTag = initDeliveryTag;
- m_multiple = initMultiple;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 80; } }
- public override string ProtocolMethodName { get { return "basic.ack"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_multiple = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_multiple);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_multiple);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicReject: RabbitMQ.Client.Impl.MethodBase, IBasicReject {
- public const int ClassId = 60;
- public const int MethodId = 90;
-
- public ulong m_deliveryTag;
- public bool m_requeue;
-
- ulong IBasicReject.DeliveryTag { get { return m_deliveryTag; } }
- bool IBasicReject.Requeue { get { return m_requeue; } }
-
- public BasicReject() {}
- public BasicReject(
- ulong initDeliveryTag,
- bool initRequeue)
- {
- m_deliveryTag = initDeliveryTag;
- m_requeue = initRequeue;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 90; } }
- public override string ProtocolMethodName { get { return "basic.reject"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_requeue = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_requeue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_requeue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicRecover: RabbitMQ.Client.Impl.MethodBase, IBasicRecover {
- public const int ClassId = 60;
- public const int MethodId = 100;
-
- public bool m_requeue;
-
- bool IBasicRecover.Requeue { get { return m_requeue; } }
-
- public BasicRecover() {}
- public BasicRecover(
- bool initRequeue)
- {
- m_requeue = initRequeue;
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 100; } }
- public override string ProtocolMethodName { get { return "basic.recover"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_requeue = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteBit(m_requeue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_requeue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class BasicRecoverOk: RabbitMQ.Client.Impl.MethodBase, IBasicRecoverOk {
- public const int ClassId = 60;
- public const int MethodId = 101;
-
-
-
- public BasicRecoverOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 60; } }
- public override int ProtocolMethodId { get { return 101; } }
- public override string ProtocolMethodName { get { return "basic.recover-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileQos: RabbitMQ.Client.Impl.MethodBase, IFileQos {
- public const int ClassId = 70;
- public const int MethodId = 10;
-
- public uint m_prefetchSize;
- public ushort m_prefetchCount;
- public bool m_global;
-
- uint IFileQos.PrefetchSize { get { return m_prefetchSize; } }
- ushort IFileQos.PrefetchCount { get { return m_prefetchCount; } }
- bool IFileQos.Global { get { return m_global; } }
-
- public FileQos() {}
- public FileQos(
- uint initPrefetchSize,
- ushort initPrefetchCount,
- bool initGlobal)
- {
- m_prefetchSize = initPrefetchSize;
- m_prefetchCount = initPrefetchCount;
- m_global = initGlobal;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "file.qos"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_prefetchSize = reader.ReadLong();
- m_prefetchCount = reader.ReadShort();
- m_global = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_prefetchSize);
- writer.WriteShort(m_prefetchCount);
- writer.WriteBit(m_global);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_prefetchSize); sb.Append(",");
- sb.Append(m_prefetchCount); sb.Append(",");
- sb.Append(m_global);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileQosOk: RabbitMQ.Client.Impl.MethodBase, IFileQosOk {
- public const int ClassId = 70;
- public const int MethodId = 11;
-
-
-
- public FileQosOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "file.qos-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileConsume: RabbitMQ.Client.Impl.MethodBase, IFileConsume {
- public const int ClassId = 70;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_consumerTag;
- public bool m_noLocal;
- public bool m_noAck;
- public bool m_exclusive;
- public bool m_nowait;
-
- ushort IFileConsume.Ticket { get { return m_ticket; } }
- string IFileConsume.Queue { get { return m_queue; } }
- string IFileConsume.ConsumerTag { get { return m_consumerTag; } }
- bool IFileConsume.NoLocal { get { return m_noLocal; } }
- bool IFileConsume.NoAck { get { return m_noAck; } }
- bool IFileConsume.Exclusive { get { return m_exclusive; } }
- bool IFileConsume.Nowait { get { return m_nowait; } }
-
- public FileConsume() {}
- public FileConsume(
- ushort initTicket,
- string initQueue,
- string initConsumerTag,
- bool initNoLocal,
- bool initNoAck,
- bool initExclusive,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_consumerTag = initConsumerTag;
- m_noLocal = initNoLocal;
- m_noAck = initNoAck;
- m_exclusive = initExclusive;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "file.consume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_consumerTag = reader.ReadShortstr();
- m_noLocal = reader.ReadBit();
- m_noAck = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_noLocal);
- writer.WriteBit(m_noAck);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_noLocal); sb.Append(",");
- sb.Append(m_noAck); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileConsumeOk: RabbitMQ.Client.Impl.MethodBase, IFileConsumeOk {
- public const int ClassId = 70;
- public const int MethodId = 21;
-
- public string m_consumerTag;
-
- string IFileConsumeOk.ConsumerTag { get { return m_consumerTag; } }
-
- public FileConsumeOk() {}
- public FileConsumeOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "file.consume-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileCancel: RabbitMQ.Client.Impl.MethodBase, IFileCancel {
- public const int ClassId = 70;
- public const int MethodId = 30;
-
- public string m_consumerTag;
- public bool m_nowait;
-
- string IFileCancel.ConsumerTag { get { return m_consumerTag; } }
- bool IFileCancel.Nowait { get { return m_nowait; } }
-
- public FileCancel() {}
- public FileCancel(
- string initConsumerTag,
- bool initNowait)
- {
- m_consumerTag = initConsumerTag;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "file.cancel"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileCancelOk: RabbitMQ.Client.Impl.MethodBase, IFileCancelOk {
- public const int ClassId = 70;
- public const int MethodId = 31;
-
- public string m_consumerTag;
-
- string IFileCancelOk.ConsumerTag { get { return m_consumerTag; } }
-
- public FileCancelOk() {}
- public FileCancelOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "file.cancel-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileOpen: RabbitMQ.Client.Impl.MethodBase, IFileOpen {
- public const int ClassId = 70;
- public const int MethodId = 40;
-
- public string m_identifier;
- public ulong m_contentSize;
-
- string IFileOpen.Identifier { get { return m_identifier; } }
- ulong IFileOpen.ContentSize { get { return m_contentSize; } }
-
- public FileOpen() {}
- public FileOpen(
- string initIdentifier,
- ulong initContentSize)
- {
- m_identifier = initIdentifier;
- m_contentSize = initContentSize;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "file.open"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_identifier = reader.ReadShortstr();
- m_contentSize = reader.ReadLonglong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_identifier);
- writer.WriteLonglong(m_contentSize);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_identifier); sb.Append(",");
- sb.Append(m_contentSize);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileOpenOk: RabbitMQ.Client.Impl.MethodBase, IFileOpenOk {
- public const int ClassId = 70;
- public const int MethodId = 41;
-
- public ulong m_stagedSize;
-
- ulong IFileOpenOk.StagedSize { get { return m_stagedSize; } }
-
- public FileOpenOk() {}
- public FileOpenOk(
- ulong initStagedSize)
- {
- m_stagedSize = initStagedSize;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "file.open-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_stagedSize = reader.ReadLonglong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_stagedSize);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_stagedSize);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileStage: RabbitMQ.Client.Impl.MethodBase, IFileStage {
- public const int ClassId = 70;
- public const int MethodId = 50;
-
-
-
- public FileStage(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "file.stage"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FilePublish: RabbitMQ.Client.Impl.MethodBase, IFilePublish {
- public const int ClassId = 70;
- public const int MethodId = 60;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_routingKey;
- public bool m_mandatory;
- public bool m_immediate;
- public string m_identifier;
-
- ushort IFilePublish.Ticket { get { return m_ticket; } }
- string IFilePublish.Exchange { get { return m_exchange; } }
- string IFilePublish.RoutingKey { get { return m_routingKey; } }
- bool IFilePublish.Mandatory { get { return m_mandatory; } }
- bool IFilePublish.Immediate { get { return m_immediate; } }
- string IFilePublish.Identifier { get { return m_identifier; } }
-
- public FilePublish() {}
- public FilePublish(
- ushort initTicket,
- string initExchange,
- string initRoutingKey,
- bool initMandatory,
- bool initImmediate,
- string initIdentifier)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_mandatory = initMandatory;
- m_immediate = initImmediate;
- m_identifier = initIdentifier;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "file.publish"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_mandatory = reader.ReadBit();
- m_immediate = reader.ReadBit();
- m_identifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_mandatory);
- writer.WriteBit(m_immediate);
- writer.WriteShortstr(m_identifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_mandatory); sb.Append(",");
- sb.Append(m_immediate); sb.Append(",");
- sb.Append(m_identifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileReturn: RabbitMQ.Client.Impl.MethodBase, IFileReturn {
- public const int ClassId = 70;
- public const int MethodId = 70;
-
- public ushort m_replyCode;
- public string m_replyText;
- public string m_exchange;
- public string m_routingKey;
-
- ushort IFileReturn.ReplyCode { get { return m_replyCode; } }
- string IFileReturn.ReplyText { get { return m_replyText; } }
- string IFileReturn.Exchange { get { return m_exchange; } }
- string IFileReturn.RoutingKey { get { return m_routingKey; } }
-
- public FileReturn() {}
- public FileReturn(
- ushort initReplyCode,
- string initReplyText,
- string initExchange,
- string initRoutingKey)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 70; } }
- public override string ProtocolMethodName { get { return "file.return"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileDeliver: RabbitMQ.Client.Impl.MethodBase, IFileDeliver {
- public const int ClassId = 70;
- public const int MethodId = 80;
-
- public string m_consumerTag;
- public ulong m_deliveryTag;
- public bool m_redelivered;
- public string m_exchange;
- public string m_routingKey;
- public string m_identifier;
-
- string IFileDeliver.ConsumerTag { get { return m_consumerTag; } }
- ulong IFileDeliver.DeliveryTag { get { return m_deliveryTag; } }
- bool IFileDeliver.Redelivered { get { return m_redelivered; } }
- string IFileDeliver.Exchange { get { return m_exchange; } }
- string IFileDeliver.RoutingKey { get { return m_routingKey; } }
- string IFileDeliver.Identifier { get { return m_identifier; } }
-
- public FileDeliver() {}
- public FileDeliver(
- string initConsumerTag,
- ulong initDeliveryTag,
- bool initRedelivered,
- string initExchange,
- string initRoutingKey,
- string initIdentifier)
- {
- m_consumerTag = initConsumerTag;
- m_deliveryTag = initDeliveryTag;
- m_redelivered = initRedelivered;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_identifier = initIdentifier;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 80; } }
- public override string ProtocolMethodName { get { return "file.deliver"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_deliveryTag = reader.ReadLonglong();
- m_redelivered = reader.ReadBit();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_identifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_redelivered);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteShortstr(m_identifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_redelivered); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_identifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileAck: RabbitMQ.Client.Impl.MethodBase, IFileAck {
- public const int ClassId = 70;
- public const int MethodId = 90;
-
- public ulong m_deliveryTag;
- public bool m_multiple;
-
- ulong IFileAck.DeliveryTag { get { return m_deliveryTag; } }
- bool IFileAck.Multiple { get { return m_multiple; } }
-
- public FileAck() {}
- public FileAck(
- ulong initDeliveryTag,
- bool initMultiple)
- {
- m_deliveryTag = initDeliveryTag;
- m_multiple = initMultiple;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 90; } }
- public override string ProtocolMethodName { get { return "file.ack"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_multiple = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_multiple);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_multiple);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class FileReject: RabbitMQ.Client.Impl.MethodBase, IFileReject {
- public const int ClassId = 70;
- public const int MethodId = 100;
-
- public ulong m_deliveryTag;
- public bool m_requeue;
-
- ulong IFileReject.DeliveryTag { get { return m_deliveryTag; } }
- bool IFileReject.Requeue { get { return m_requeue; } }
-
- public FileReject() {}
- public FileReject(
- ulong initDeliveryTag,
- bool initRequeue)
- {
- m_deliveryTag = initDeliveryTag;
- m_requeue = initRequeue;
- }
-
- public override int ProtocolClassId { get { return 70; } }
- public override int ProtocolMethodId { get { return 100; } }
- public override string ProtocolMethodName { get { return "file.reject"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_deliveryTag = reader.ReadLonglong();
- m_requeue = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteBit(m_requeue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_requeue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamQos: RabbitMQ.Client.Impl.MethodBase, IStreamQos {
- public const int ClassId = 80;
- public const int MethodId = 10;
-
- public uint m_prefetchSize;
- public ushort m_prefetchCount;
- public uint m_consumeRate;
- public bool m_global;
-
- uint IStreamQos.PrefetchSize { get { return m_prefetchSize; } }
- ushort IStreamQos.PrefetchCount { get { return m_prefetchCount; } }
- uint IStreamQos.ConsumeRate { get { return m_consumeRate; } }
- bool IStreamQos.Global { get { return m_global; } }
-
- public StreamQos() {}
- public StreamQos(
- uint initPrefetchSize,
- ushort initPrefetchCount,
- uint initConsumeRate,
- bool initGlobal)
- {
- m_prefetchSize = initPrefetchSize;
- m_prefetchCount = initPrefetchCount;
- m_consumeRate = initConsumeRate;
- m_global = initGlobal;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "stream.qos"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_prefetchSize = reader.ReadLong();
- m_prefetchCount = reader.ReadShort();
- m_consumeRate = reader.ReadLong();
- m_global = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_prefetchSize);
- writer.WriteShort(m_prefetchCount);
- writer.WriteLong(m_consumeRate);
- writer.WriteBit(m_global);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_prefetchSize); sb.Append(",");
- sb.Append(m_prefetchCount); sb.Append(",");
- sb.Append(m_consumeRate); sb.Append(",");
- sb.Append(m_global);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamQosOk: RabbitMQ.Client.Impl.MethodBase, IStreamQosOk {
- public const int ClassId = 80;
- public const int MethodId = 11;
-
-
-
- public StreamQosOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "stream.qos-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamConsume: RabbitMQ.Client.Impl.MethodBase, IStreamConsume {
- public const int ClassId = 80;
- public const int MethodId = 20;
-
- public ushort m_ticket;
- public string m_queue;
- public string m_consumerTag;
- public bool m_noLocal;
- public bool m_exclusive;
- public bool m_nowait;
-
- ushort IStreamConsume.Ticket { get { return m_ticket; } }
- string IStreamConsume.Queue { get { return m_queue; } }
- string IStreamConsume.ConsumerTag { get { return m_consumerTag; } }
- bool IStreamConsume.NoLocal { get { return m_noLocal; } }
- bool IStreamConsume.Exclusive { get { return m_exclusive; } }
- bool IStreamConsume.Nowait { get { return m_nowait; } }
-
- public StreamConsume() {}
- public StreamConsume(
- ushort initTicket,
- string initQueue,
- string initConsumerTag,
- bool initNoLocal,
- bool initExclusive,
- bool initNowait)
- {
- m_ticket = initTicket;
- m_queue = initQueue;
- m_consumerTag = initConsumerTag;
- m_noLocal = initNoLocal;
- m_exclusive = initExclusive;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "stream.consume"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_queue = reader.ReadShortstr();
- m_consumerTag = reader.ReadShortstr();
- m_noLocal = reader.ReadBit();
- m_exclusive = reader.ReadBit();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_queue);
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_noLocal);
- writer.WriteBit(m_exclusive);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_queue); sb.Append(",");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_noLocal); sb.Append(",");
- sb.Append(m_exclusive); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamConsumeOk: RabbitMQ.Client.Impl.MethodBase, IStreamConsumeOk {
- public const int ClassId = 80;
- public const int MethodId = 21;
-
- public string m_consumerTag;
-
- string IStreamConsumeOk.ConsumerTag { get { return m_consumerTag; } }
-
- public StreamConsumeOk() {}
- public StreamConsumeOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "stream.consume-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamCancel: RabbitMQ.Client.Impl.MethodBase, IStreamCancel {
- public const int ClassId = 80;
- public const int MethodId = 30;
-
- public string m_consumerTag;
- public bool m_nowait;
-
- string IStreamCancel.ConsumerTag { get { return m_consumerTag; } }
- bool IStreamCancel.Nowait { get { return m_nowait; } }
-
- public StreamCancel() {}
- public StreamCancel(
- string initConsumerTag,
- bool initNowait)
- {
- m_consumerTag = initConsumerTag;
- m_nowait = initNowait;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "stream.cancel"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_nowait = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteBit(m_nowait);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_nowait);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamCancelOk: RabbitMQ.Client.Impl.MethodBase, IStreamCancelOk {
- public const int ClassId = 80;
- public const int MethodId = 31;
-
- public string m_consumerTag;
-
- string IStreamCancelOk.ConsumerTag { get { return m_consumerTag; } }
-
- public StreamCancelOk() {}
- public StreamCancelOk(
- string initConsumerTag)
- {
- m_consumerTag = initConsumerTag;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "stream.cancel-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamPublish: RabbitMQ.Client.Impl.MethodBase, IStreamPublish {
- public const int ClassId = 80;
- public const int MethodId = 40;
-
- public ushort m_ticket;
- public string m_exchange;
- public string m_routingKey;
- public bool m_mandatory;
- public bool m_immediate;
-
- ushort IStreamPublish.Ticket { get { return m_ticket; } }
- string IStreamPublish.Exchange { get { return m_exchange; } }
- string IStreamPublish.RoutingKey { get { return m_routingKey; } }
- bool IStreamPublish.Mandatory { get { return m_mandatory; } }
- bool IStreamPublish.Immediate { get { return m_immediate; } }
-
- public StreamPublish() {}
- public StreamPublish(
- ushort initTicket,
- string initExchange,
- string initRoutingKey,
- bool initMandatory,
- bool initImmediate)
- {
- m_ticket = initTicket;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- m_mandatory = initMandatory;
- m_immediate = initImmediate;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "stream.publish"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_ticket = reader.ReadShort();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- m_mandatory = reader.ReadBit();
- m_immediate = reader.ReadBit();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_ticket);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- writer.WriteBit(m_mandatory);
- writer.WriteBit(m_immediate);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_ticket); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey); sb.Append(",");
- sb.Append(m_mandatory); sb.Append(",");
- sb.Append(m_immediate);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamReturn: RabbitMQ.Client.Impl.MethodBase, IStreamReturn {
- public const int ClassId = 80;
- public const int MethodId = 50;
-
- public ushort m_replyCode;
- public string m_replyText;
- public string m_exchange;
- public string m_routingKey;
-
- ushort IStreamReturn.ReplyCode { get { return m_replyCode; } }
- string IStreamReturn.ReplyText { get { return m_replyText; } }
- string IStreamReturn.Exchange { get { return m_exchange; } }
- string IStreamReturn.RoutingKey { get { return m_routingKey; } }
-
- public StreamReturn() {}
- public StreamReturn(
- ushort initReplyCode,
- string initReplyText,
- string initExchange,
- string initRoutingKey)
- {
- m_replyCode = initReplyCode;
- m_replyText = initReplyText;
- m_exchange = initExchange;
- m_routingKey = initRoutingKey;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 50; } }
- public override string ProtocolMethodName { get { return "stream.return"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_replyCode = reader.ReadShort();
- m_replyText = reader.ReadShortstr();
- m_exchange = reader.ReadShortstr();
- m_routingKey = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShort(m_replyCode);
- writer.WriteShortstr(m_replyText);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_routingKey);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_replyCode); sb.Append(",");
- sb.Append(m_replyText); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_routingKey);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class StreamDeliver: RabbitMQ.Client.Impl.MethodBase, IStreamDeliver {
- public const int ClassId = 80;
- public const int MethodId = 60;
-
- public string m_consumerTag;
- public ulong m_deliveryTag;
- public string m_exchange;
- public string m_queue;
-
- string IStreamDeliver.ConsumerTag { get { return m_consumerTag; } }
- ulong IStreamDeliver.DeliveryTag { get { return m_deliveryTag; } }
- string IStreamDeliver.Exchange { get { return m_exchange; } }
- string IStreamDeliver.Queue { get { return m_queue; } }
-
- public StreamDeliver() {}
- public StreamDeliver(
- string initConsumerTag,
- ulong initDeliveryTag,
- string initExchange,
- string initQueue)
- {
- m_consumerTag = initConsumerTag;
- m_deliveryTag = initDeliveryTag;
- m_exchange = initExchange;
- m_queue = initQueue;
- }
-
- public override int ProtocolClassId { get { return 80; } }
- public override int ProtocolMethodId { get { return 60; } }
- public override string ProtocolMethodName { get { return "stream.deliver"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_consumerTag = reader.ReadShortstr();
- m_deliveryTag = reader.ReadLonglong();
- m_exchange = reader.ReadShortstr();
- m_queue = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_consumerTag);
- writer.WriteLonglong(m_deliveryTag);
- writer.WriteShortstr(m_exchange);
- writer.WriteShortstr(m_queue);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_consumerTag); sb.Append(",");
- sb.Append(m_deliveryTag); sb.Append(",");
- sb.Append(m_exchange); sb.Append(",");
- sb.Append(m_queue);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxSelect: RabbitMQ.Client.Impl.MethodBase, ITxSelect {
- public const int ClassId = 90;
- public const int MethodId = 10;
-
-
-
- public TxSelect(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "tx.select"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxSelectOk: RabbitMQ.Client.Impl.MethodBase, ITxSelectOk {
- public const int ClassId = 90;
- public const int MethodId = 11;
-
-
-
- public TxSelectOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "tx.select-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxCommit: RabbitMQ.Client.Impl.MethodBase, ITxCommit {
- public const int ClassId = 90;
- public const int MethodId = 20;
-
-
-
- public TxCommit(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "tx.commit"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxCommitOk: RabbitMQ.Client.Impl.MethodBase, ITxCommitOk {
- public const int ClassId = 90;
- public const int MethodId = 21;
-
-
-
- public TxCommitOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "tx.commit-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxRollback: RabbitMQ.Client.Impl.MethodBase, ITxRollback {
- public const int ClassId = 90;
- public const int MethodId = 30;
-
-
-
- public TxRollback(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "tx.rollback"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TxRollbackOk: RabbitMQ.Client.Impl.MethodBase, ITxRollbackOk {
- public const int ClassId = 90;
- public const int MethodId = 31;
-
-
-
- public TxRollbackOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 90; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "tx.rollback-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxSelect: RabbitMQ.Client.Impl.MethodBase, IDtxSelect {
- public const int ClassId = 100;
- public const int MethodId = 10;
-
-
-
- public DtxSelect(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "dtx.select"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxSelectOk: RabbitMQ.Client.Impl.MethodBase, IDtxSelectOk {
- public const int ClassId = 100;
- public const int MethodId = 11;
-
-
-
- public DtxSelectOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "dtx.select-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxStart: RabbitMQ.Client.Impl.MethodBase, IDtxStart {
- public const int ClassId = 100;
- public const int MethodId = 20;
-
- public string m_dtxIdentifier;
-
- string IDtxStart.DtxIdentifier { get { return m_dtxIdentifier; } }
-
- public DtxStart() {}
- public DtxStart(
- string initDtxIdentifier)
- {
- m_dtxIdentifier = initDtxIdentifier;
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "dtx.start"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_dtxIdentifier = reader.ReadShortstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_dtxIdentifier);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_dtxIdentifier);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class DtxStartOk: RabbitMQ.Client.Impl.MethodBase, IDtxStartOk {
- public const int ClassId = 100;
- public const int MethodId = 21;
-
-
-
- public DtxStartOk(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 100; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "dtx.start-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TunnelRequest: RabbitMQ.Client.Impl.MethodBase, ITunnelRequest {
- public const int ClassId = 110;
- public const int MethodId = 10;
-
- public System.Collections.IDictionary m_metaData;
-
- System.Collections.IDictionary ITunnelRequest.MetaData { get { return m_metaData; } }
-
- public TunnelRequest() {}
- public TunnelRequest(
- System.Collections.IDictionary initMetaData)
- {
- m_metaData = initMetaData;
- }
-
- public override int ProtocolClassId { get { return 110; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "tunnel.request"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_metaData = reader.ReadTable();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteTable(m_metaData);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_metaData);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestInteger: RabbitMQ.Client.Impl.MethodBase, ITestInteger {
- public const int ClassId = 120;
- public const int MethodId = 10;
-
- public byte m_integer1;
- public ushort m_integer2;
- public uint m_integer3;
- public ulong m_integer4;
- public byte m_operation;
-
- byte ITestInteger.Integer1 { get { return m_integer1; } }
- ushort ITestInteger.Integer2 { get { return m_integer2; } }
- uint ITestInteger.Integer3 { get { return m_integer3; } }
- ulong ITestInteger.Integer4 { get { return m_integer4; } }
- byte ITestInteger.Operation { get { return m_operation; } }
-
- public TestInteger() {}
- public TestInteger(
- byte initInteger1,
- ushort initInteger2,
- uint initInteger3,
- ulong initInteger4,
- byte initOperation)
- {
- m_integer1 = initInteger1;
- m_integer2 = initInteger2;
- m_integer3 = initInteger3;
- m_integer4 = initInteger4;
- m_operation = initOperation;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 10; } }
- public override string ProtocolMethodName { get { return "test.integer"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_integer1 = reader.ReadOctet();
- m_integer2 = reader.ReadShort();
- m_integer3 = reader.ReadLong();
- m_integer4 = reader.ReadLonglong();
- m_operation = reader.ReadOctet();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteOctet(m_integer1);
- writer.WriteShort(m_integer2);
- writer.WriteLong(m_integer3);
- writer.WriteLonglong(m_integer4);
- writer.WriteOctet(m_operation);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_integer1); sb.Append(",");
- sb.Append(m_integer2); sb.Append(",");
- sb.Append(m_integer3); sb.Append(",");
- sb.Append(m_integer4); sb.Append(",");
- sb.Append(m_operation);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestIntegerOk: RabbitMQ.Client.Impl.MethodBase, ITestIntegerOk {
- public const int ClassId = 120;
- public const int MethodId = 11;
-
- public ulong m_result;
-
- ulong ITestIntegerOk.Result { get { return m_result; } }
-
- public TestIntegerOk() {}
- public TestIntegerOk(
- ulong initResult)
- {
- m_result = initResult;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 11; } }
- public override string ProtocolMethodName { get { return "test.integer-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_result = reader.ReadLonglong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_result);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_result);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestString: RabbitMQ.Client.Impl.MethodBase, ITestString {
- public const int ClassId = 120;
- public const int MethodId = 20;
-
- public string m_string1;
- public byte[] m_string2;
- public byte m_operation;
-
- string ITestString.String1 { get { return m_string1; } }
- byte[] ITestString.String2 { get { return m_string2; } }
- byte ITestString.Operation { get { return m_operation; } }
-
- public TestString() {}
- public TestString(
- string initString1,
- byte[] initString2,
- byte initOperation)
- {
- m_string1 = initString1;
- m_string2 = initString2;
- m_operation = initOperation;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 20; } }
- public override string ProtocolMethodName { get { return "test.string"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_string1 = reader.ReadShortstr();
- m_string2 = reader.ReadLongstr();
- m_operation = reader.ReadOctet();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteShortstr(m_string1);
- writer.WriteLongstr(m_string2);
- writer.WriteOctet(m_operation);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_string1); sb.Append(",");
- sb.Append(m_string2); sb.Append(",");
- sb.Append(m_operation);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestStringOk: RabbitMQ.Client.Impl.MethodBase, ITestStringOk {
- public const int ClassId = 120;
- public const int MethodId = 21;
-
- public byte[] m_result;
-
- byte[] ITestStringOk.Result { get { return m_result; } }
-
- public TestStringOk() {}
- public TestStringOk(
- byte[] initResult)
- {
- m_result = initResult;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 21; } }
- public override string ProtocolMethodName { get { return "test.string-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_result = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLongstr(m_result);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_result);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestTable: RabbitMQ.Client.Impl.MethodBase, ITestTable {
- public const int ClassId = 120;
- public const int MethodId = 30;
-
- public System.Collections.IDictionary m_table;
- public byte m_integerOp;
- public byte m_stringOp;
-
- System.Collections.IDictionary ITestTable.Table { get { return m_table; } }
- byte ITestTable.IntegerOp { get { return m_integerOp; } }
- byte ITestTable.StringOp { get { return m_stringOp; } }
-
- public TestTable() {}
- public TestTable(
- System.Collections.IDictionary initTable,
- byte initIntegerOp,
- byte initStringOp)
- {
- m_table = initTable;
- m_integerOp = initIntegerOp;
- m_stringOp = initStringOp;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 30; } }
- public override string ProtocolMethodName { get { return "test.table"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_table = reader.ReadTable();
- m_integerOp = reader.ReadOctet();
- m_stringOp = reader.ReadOctet();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteTable(m_table);
- writer.WriteOctet(m_integerOp);
- writer.WriteOctet(m_stringOp);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_table); sb.Append(",");
- sb.Append(m_integerOp); sb.Append(",");
- sb.Append(m_stringOp);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestTableOk: RabbitMQ.Client.Impl.MethodBase, ITestTableOk {
- public const int ClassId = 120;
- public const int MethodId = 31;
-
- public ulong m_integerResult;
- public byte[] m_stringResult;
-
- ulong ITestTableOk.IntegerResult { get { return m_integerResult; } }
- byte[] ITestTableOk.StringResult { get { return m_stringResult; } }
-
- public TestTableOk() {}
- public TestTableOk(
- ulong initIntegerResult,
- byte[] initStringResult)
- {
- m_integerResult = initIntegerResult;
- m_stringResult = initStringResult;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 31; } }
- public override string ProtocolMethodName { get { return "test.table-ok"; } }
- public override bool HasContent { get { return false; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_integerResult = reader.ReadLonglong();
- m_stringResult = reader.ReadLongstr();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLonglong(m_integerResult);
- writer.WriteLongstr(m_stringResult);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_integerResult); sb.Append(",");
- sb.Append(m_stringResult);
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestContent: RabbitMQ.Client.Impl.MethodBase, ITestContent {
- public const int ClassId = 120;
- public const int MethodId = 40;
-
-
-
- public TestContent(
-)
- {
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 40; } }
- public override string ProtocolMethodName { get { return "test.content"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(")");
- }
- }
- /// <summary>Autogenerated type. Private implementation class - do not use directly.</summary>
- public class TestContentOk: RabbitMQ.Client.Impl.MethodBase, ITestContentOk {
- public const int ClassId = 120;
- public const int MethodId = 41;
-
- public uint m_contentChecksum;
-
- uint ITestContentOk.ContentChecksum { get { return m_contentChecksum; } }
-
- public TestContentOk() {}
- public TestContentOk(
- uint initContentChecksum)
- {
- m_contentChecksum = initContentChecksum;
- }
-
- public override int ProtocolClassId { get { return 120; } }
- public override int ProtocolMethodId { get { return 41; } }
- public override string ProtocolMethodName { get { return "test.content-ok"; } }
- public override bool HasContent { get { return true; } }
-
- public override void ReadArgumentsFrom(RabbitMQ.Client.Impl.MethodArgumentReader reader) {
- m_contentChecksum = reader.ReadLong();
- }
-
- public override void WriteArgumentsTo(RabbitMQ.Client.Impl.MethodArgumentWriter writer) {
- writer.WriteLong(m_contentChecksum);
- }
-
- public override void AppendArgumentDebugStringTo(System.Text.StringBuilder sb) {
- sb.Append("(");
- sb.Append(m_contentChecksum);
- sb.Append(")");
- }
- }
-
- public class Model: RabbitMQ.Client.Impl.ModelBase {
- public Model(RabbitMQ.Client.Impl.ISession session): base(session) {}
- public override void _Private_BasicPublish(
- System.String @exchange,
- System.String @routingKey,
- System.Boolean @mandatory,
- System.Boolean @immediate,
- RabbitMQ.Client.IBasicProperties @basicProperties,
- System.Byte[] @body)
- {
- BasicPublish __req = new BasicPublish();
- __req.m_exchange = @exchange;
- __req.m_routingKey = @routingKey;
- __req.m_mandatory = @mandatory;
- __req.m_immediate = @immediate;
- ModelSend(__req, (BasicProperties) basicProperties,body);
- }
- public override void _Private_BasicConsume(
- System.String @queue,
- System.String @consumerTag,
- System.Boolean @noLocal,
- System.Boolean @noAck,
- System.Boolean @exclusive,
- System.Boolean @nowait,
- System.Collections.IDictionary @filter)
- {
- BasicConsume __req = new BasicConsume();
- __req.m_queue = @queue;
- __req.m_consumerTag = @consumerTag;
- __req.m_noLocal = @noLocal;
- __req.m_noAck = @noAck;
- __req.m_exclusive = @exclusive;
- __req.m_nowait = @nowait;
- __req.m_arguments = @filter;
- ModelSend(__req,null,null);
- }
- public override void _Private_BasicCancel(
- System.String @consumerTag,
- System.Boolean @nowait)
- {
- BasicCancel __req = new BasicCancel();
- __req.m_consumerTag = @consumerTag;
- __req.m_nowait = @nowait;
- ModelSend(__req,null,null);
- }
- public override void _Private_ChannelOpen(
- System.String @outOfBand)
- {
- ChannelOpen __req = new ChannelOpen();
- __req.m_outOfBand = @outOfBand;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ChannelOpenOk __rep = __repBase as ChannelOpenOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void _Private_ChannelCloseOk()
- {
- ChannelCloseOk __req = new ChannelCloseOk();
- ModelSend(__req,null,null);
- }
- public override void _Private_ChannelClose(
- System.UInt16 @replyCode,
- System.String @replyText,
- System.UInt16 @classId,
- System.UInt16 @methodId)
- {
- ChannelClose __req = new ChannelClose();
- __req.m_replyCode = @replyCode;
- __req.m_replyText = @replyText;
- __req.m_classId = @classId;
- __req.m_methodId = @methodId;
- ModelSend(__req,null,null);
- }
- public override void _Private_BasicGet(
- System.String @queue,
- System.Boolean @noAck)
- {
- BasicGet __req = new BasicGet();
- __req.m_queue = @queue;
- __req.m_noAck = @noAck;
- ModelSend(__req,null,null);
- }
- public override void _Private_ChannelFlowOk()
- {
- ChannelFlowOk __req = new ChannelFlowOk();
- ModelSend(__req,null,null);
- }
- public override RabbitMQ.Client.Impl.ConnectionTuneDetails ConnectionStartOk(
- System.Collections.IDictionary @clientProperties,
- System.String @mechanism,
- System.Byte[] @response,
- System.String @locale)
- {
- ConnectionStartOk __req = new ConnectionStartOk();
- __req.m_clientProperties = @clientProperties;
- __req.m_mechanism = @mechanism;
- __req.m_response = @response;
- __req.m_locale = @locale;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ConnectionTune __rep = __repBase as ConnectionTune;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- RabbitMQ.Client.Impl.ConnectionTuneDetails __result = new RabbitMQ.Client.Impl.ConnectionTuneDetails();
- __result.m_channelMax = __rep.m_channelMax;
- __result.m_frameMax = __rep.m_frameMax;
- __result.m_heartbeat = __rep.m_heartbeat;
- return __result;
- }
- public override void ConnectionTuneOk(
- System.UInt16 @channelMax,
- System.UInt32 @frameMax,
- System.UInt16 @heartbeat)
- {
- ConnectionTuneOk __req = new ConnectionTuneOk();
- __req.m_channelMax = @channelMax;
- __req.m_frameMax = @frameMax;
- __req.m_heartbeat = @heartbeat;
- ModelSend(__req,null,null);
- }
- public override void _Private_ConnectionOpen(
- System.String @virtualHost,
- System.String @capabilities,
- System.Boolean @insist)
- {
- ConnectionOpen __req = new ConnectionOpen();
- __req.m_virtualHost = @virtualHost;
- __req.m_capabilities = @capabilities;
- __req.m_insist = @insist;
- ModelSend(__req,null,null);
- }
- public override void _Private_ConnectionClose(
- System.UInt16 @replyCode,
- System.String @replyText,
- System.UInt16 @classId,
- System.UInt16 @methodId)
- {
- ConnectionClose __req = new ConnectionClose();
- __req.m_replyCode = @replyCode;
- __req.m_replyText = @replyText;
- __req.m_classId = @classId;
- __req.m_methodId = @methodId;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ConnectionCloseOk __rep = __repBase as ConnectionCloseOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void _Private_ConnectionCloseOk()
- {
- ConnectionCloseOk __req = new ConnectionCloseOk();
- ModelSend(__req,null,null);
- }
- public override RabbitMQ.Client.IBasicProperties CreateBasicProperties()
- {
- return new BasicProperties();
- }
- public override RabbitMQ.Client.IFileProperties CreateFileProperties()
- {
- return new FileProperties();
- }
- public override RabbitMQ.Client.IStreamProperties CreateStreamProperties()
- {
- return new StreamProperties();
- }
- public override void ChannelFlow(
- System.Boolean @active)
- {
- ChannelFlow __req = new ChannelFlow();
- __req.m_active = @active;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ChannelFlowOk __rep = __repBase as ChannelFlowOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void ExchangeDeclare(
- System.String @exchange,
- System.String @type,
- System.Boolean @passive,
- System.Boolean @durable,
- System.Boolean @autoDelete,
- System.Boolean @internal,
- System.Boolean @nowait,
- System.Collections.IDictionary @arguments)
- {
- ExchangeDeclare __req = new ExchangeDeclare();
- __req.m_exchange = @exchange;
- __req.m_type = @type;
- __req.m_passive = @passive;
- __req.m_durable = @durable;
- __req.m_autoDelete = @autoDelete;
- __req.m_internal = @internal;
- __req.m_nowait = @nowait;
- __req.m_arguments = @arguments;
- if (nowait) {
- ModelSend(__req,null,null);
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ExchangeDeclareOk __rep = __repBase as ExchangeDeclareOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void ExchangeDelete(
- System.String @exchange,
- System.Boolean @ifUnused,
- System.Boolean @nowait)
- {
- ExchangeDelete __req = new ExchangeDelete();
- __req.m_exchange = @exchange;
- __req.m_ifUnused = @ifUnused;
- __req.m_nowait = @nowait;
- if (nowait) {
- ModelSend(__req,null,null);
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- ExchangeDeleteOk __rep = __repBase as ExchangeDeleteOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override System.String QueueDeclare(
- System.String @queue,
- System.Boolean @passive,
- System.Boolean @durable,
- System.Boolean @exclusive,
- System.Boolean @autoDelete,
- System.Boolean @nowait,
- System.Collections.IDictionary @arguments)
- {
- QueueDeclare __req = new QueueDeclare();
- __req.m_queue = @queue;
- __req.m_passive = @passive;
- __req.m_durable = @durable;
- __req.m_exclusive = @exclusive;
- __req.m_autoDelete = @autoDelete;
- __req.m_nowait = @nowait;
- __req.m_arguments = @arguments;
- if (nowait) {
- ModelSend(__req,null,null);
- return null;
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueDeclareOk __rep = __repBase as QueueDeclareOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- return __rep.m_queue;
- }
- public override void QueueBind(
- System.String @queue,
- System.String @exchange,
- System.String @routingKey,
- System.Boolean @nowait,
- System.Collections.IDictionary @arguments)
- {
- QueueBind __req = new QueueBind();
- __req.m_queue = @queue;
- __req.m_exchange = @exchange;
- __req.m_routingKey = @routingKey;
- __req.m_nowait = @nowait;
- __req.m_arguments = @arguments;
- if (nowait) {
- ModelSend(__req,null,null);
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueBindOk __rep = __repBase as QueueBindOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void QueueUnbind(
- System.String @queue,
- System.String @exchange,
- System.String @routingKey,
- System.Collections.IDictionary @arguments)
- {
- throw new UnsupportedMethodException("QueueUnbind");
- }
- public override System.UInt32 QueuePurge(
- System.String @queue,
- System.Boolean @nowait)
- {
- QueuePurge __req = new QueuePurge();
- __req.m_queue = @queue;
- __req.m_nowait = @nowait;
- if (nowait) {
- ModelSend(__req,null,null);
- return 0xFFFFFFFF;
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueuePurgeOk __rep = __repBase as QueuePurgeOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- return __rep.m_messageCount;
- }
- public override System.UInt32 QueueDelete(
- System.String @queue,
- System.Boolean @ifUnused,
- System.Boolean @ifEmpty,
- System.Boolean @nowait)
- {
- QueueDelete __req = new QueueDelete();
- __req.m_queue = @queue;
- __req.m_ifUnused = @ifUnused;
- __req.m_ifEmpty = @ifEmpty;
- __req.m_nowait = @nowait;
- if (nowait) {
- ModelSend(__req,null,null);
- return 0xFFFFFFFF;
- }
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- QueueDeleteOk __rep = __repBase as QueueDeleteOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- return __rep.m_messageCount;
- }
- public override void BasicQos(
- System.UInt32 @prefetchSize,
- System.UInt16 @prefetchCount,
- System.Boolean @global)
- {
- BasicQos __req = new BasicQos();
- __req.m_prefetchSize = @prefetchSize;
- __req.m_prefetchCount = @prefetchCount;
- __req.m_global = @global;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- BasicQosOk __rep = __repBase as BasicQosOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void BasicAck(
- System.UInt64 @deliveryTag,
- System.Boolean @multiple)
- {
- BasicAck __req = new BasicAck();
- __req.m_deliveryTag = @deliveryTag;
- __req.m_multiple = @multiple;
- ModelSend(__req,null,null);
- }
- public override void BasicReject(
- System.UInt64 @deliveryTag,
- System.Boolean @requeue)
- {
- BasicReject __req = new BasicReject();
- __req.m_deliveryTag = @deliveryTag;
- __req.m_requeue = @requeue;
- ModelSend(__req,null,null);
- }
- public override void BasicRecover(
- System.Boolean @requeue)
- {
- BasicRecover __req = new BasicRecover();
- __req.m_requeue = @requeue;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- BasicRecoverOk __rep = __repBase as BasicRecoverOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void TxSelect()
- {
- TxSelect __req = new TxSelect();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- TxSelectOk __rep = __repBase as TxSelectOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void TxCommit()
- {
- TxCommit __req = new TxCommit();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- TxCommitOk __rep = __repBase as TxCommitOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void TxRollback()
- {
- TxRollback __req = new TxRollback();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- TxRollbackOk __rep = __repBase as TxRollbackOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void DtxSelect()
- {
- DtxSelect __req = new DtxSelect();
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- DtxSelectOk __rep = __repBase as DtxSelectOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override void DtxStart(
- System.String @dtxIdentifier)
- {
- DtxStart __req = new DtxStart();
- __req.m_dtxIdentifier = @dtxIdentifier;
- RabbitMQ.Client.Impl.MethodBase __repBase = ModelRpc(__req,null,null);
- DtxStartOk __rep = __repBase as DtxStartOk;
- if (__rep == null) throw new UnexpectedMethodException(__repBase);
- }
- public override bool DispatchAsynchronous(RabbitMQ.Client.Impl.Command cmd) {
- RabbitMQ.Client.Impl.MethodBase __method = (RabbitMQ.Client.Impl.MethodBase) cmd.Method;
- switch ((__method.ProtocolClassId << 16) | __method.ProtocolMethodId) {
- case 3932181: {
- BasicConsumeOk __impl = (BasicConsumeOk) __method;
- HandleBasicConsumeOk(
- __impl.m_consumerTag);
- return true;
- }
- case 3932191: {
- BasicCancelOk __impl = (BasicCancelOk) __method;
- HandleBasicCancelOk(
- __impl.m_consumerTag);
- return true;
- }
- case 3932231: {
- BasicGetOk __impl = (BasicGetOk) __method;
- HandleBasicGetOk(
- __impl.m_deliveryTag,
- __impl.m_redelivered,
- __impl.m_exchange,
- __impl.m_routingKey,
- __impl.m_messageCount,
- (RabbitMQ.Client.IBasicProperties) cmd.Header,
- cmd.Body);
- return true;
- }
- case 3932232: {
- HandleBasicGetEmpty();
- return true;
- }
- case 3932220: {
- BasicDeliver __impl = (BasicDeliver) __method;
- HandleBasicDeliver(
- __impl.m_consumerTag,
- __impl.m_deliveryTag,
- __impl.m_redelivered,
- __impl.m_exchange,
- __impl.m_routingKey,
- (RabbitMQ.Client.IBasicProperties) cmd.Header,
- cmd.Body);
- return true;
- }
- case 3932210: {
- BasicReturn __impl = (BasicReturn) __method;
- HandleBasicReturn(
- __impl.m_replyCode,
- __impl.m_replyText,
- __impl.m_exchange,
- __impl.m_routingKey,
- (RabbitMQ.Client.IBasicProperties) cmd.Header,
- cmd.Body);
- return true;
- }
- case 1310740: {
- ChannelFlow __impl = (ChannelFlow) __method;
- HandleChannelFlow(
- __impl.m_active);
- return true;
- }
- case 1310760: {
- ChannelClose __impl = (ChannelClose) __method;
- HandleChannelClose(
- __impl.m_replyCode,
- __impl.m_replyText,
- __impl.m_classId,
- __impl.m_methodId);
- return true;
- }
- case 1310761: {
- HandleChannelCloseOk();
- return true;
- }
- case 655370: {
- ConnectionStart __impl = (ConnectionStart) __method;
- HandleConnectionStart(
- __impl.m_versionMajor,
- __impl.m_versionMinor,
- __impl.m_serverProperties,
- __impl.m_mechanisms,
- __impl.m_locales);
- return true;
- }
- case 655401: {
- ConnectionOpenOk __impl = (ConnectionOpenOk) __method;
- HandleConnectionOpenOk(
- __impl.m_knownHosts);
- return true;
- }
- case 655410: {
- ConnectionRedirect __impl = (ConnectionRedirect) __method;
- HandleConnectionRedirect(
- __impl.m_host,
- __impl.m_knownHosts);
- return true;
- }
- case 655420: {
- ConnectionClose __impl = (ConnectionClose) __method;
- HandleConnectionClose(
- __impl.m_replyCode,
- __impl.m_replyText,
- __impl.m_classId,
- __impl.m_methodId);
- return true;
- }
- default: return false;
- }
- }
- }
-}
diff --git a/mcs/class/RabbitMQ.Client/docs/specs/qpid-amqp.0-8.stripped.xml b/mcs/class/RabbitMQ.Client/docs/specs/qpid-amqp.0-8.stripped.xml
new file mode 100644
index 00000000000..e1878890f8b
--- /dev/null
+++ b/mcs/class/RabbitMQ.Client/docs/specs/qpid-amqp.0-8.stripped.xml
@@ -0,0 +1,773 @@
+<?xml version="1.0"?>
+<!--
+Copyright (c) 2009 AMQP Working Group.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<amqp major="8" minor="0" port="5672">
+ <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"/>
+ <constant name="not delivered" value="310" class="soft error"/>
+ <constant name="content too large" value="311" class="soft error"/>
+ <constant name="connection forced" value="320" class="hard error"/>
+ <constant name="invalid path" value="402" class="hard error"/>
+ <constant name="access refused" value="403" class="soft error"/>
+ <constant name="not found" value="404" class="soft error"/>
+ <constant name="resource locked" value="405" class="soft error"/>
+ <constant name="frame error" value="501" class="hard error"/>
+ <constant name="syntax error" value="502" class="hard error"/>
+ <constant name="command invalid" value="503" class="hard error"/>
+ <constant name="channel error" value="504" class="hard error"/>
+ <constant name="resource error" value="506" class="hard error"/>
+ <constant name="not allowed" value="530" class="hard error"/>
+ <constant name="not implemented" value="540" class="hard error"/>
+ <constant name="internal error" value="541" class="hard error"/>
+ <domain name="access ticket" type="short">
+ <assert check="ne" value="0"/>
+ </domain>
+ <domain name="class id" type="short"/>
+ <domain name="consumer tag" type="shortstr"/>
+ <domain name="delivery tag" type="longlong"/>
+ <domain name="exchange name" type="shortstr">
+ <assert check="length" value="127"/>
+ </domain>
+ <domain name="known hosts" type="shortstr"/>
+ <domain name="method id" type="short"/>
+ <domain name="no ack" type="bit"/>
+ <domain name="no local" type="bit"/>
+ <domain name="path" type="shortstr">
+ <assert check="notnull"/>
+ <assert check="syntax" rule="path"/>
+ <assert check="length" value="127"/>
+ </domain>
+ <domain name="peer properties" type="table"/>
+ <domain name="queue name" type="shortstr">
+ <assert check="length" value="127"/>
+ </domain>
+ <domain name="redelivered" type="bit"/>
+ <domain name="reply code" type="short">
+ <assert check="notnull"/>
+ </domain>
+ <domain name="reply text" type="shortstr">
+ <assert check="notnull"/>
+ </domain>
+ <class name="connection" handler="connection" index="10">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="start" synchronous="1" index="10">
+ <chassis name="client" implement="MUST"/>
+ <response name="start-ok"/>
+ <field name="version major" type="octet"/>
+ <field name="version minor" type="octet"/>
+ <field name="server properties" domain="peer properties"/>
+ <field name="mechanisms" type="longstr">
+ <see name="security mechanisms"/>
+ <assert check="notnull"/>
+ </field>
+ <field name="locales" type="longstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="start-ok" synchronous="1" index="11">
+ <chassis name="server" implement="MUST"/>
+ <field name="client properties" domain="peer properties"/>
+ <field name="mechanism" type="shortstr">
+ <assert check="notnull"/>
+ </field>
+ <field name="response" type="longstr">
+ <assert check="notnull"/>
+ </field>
+ <field name="locale" type="shortstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="secure" synchronous="1" index="20">
+ <chassis name="client" implement="MUST"/>
+ <response name="secure-ok"/>
+ <field name="challenge" type="longstr">
+ <see name="security mechanisms"/>
+ </field>
+ </method>
+ <method name="secure-ok" synchronous="1" index="21">
+ <chassis name="server" implement="MUST"/>
+ <field name="response" type="longstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="tune" synchronous="1" index="30">
+ <chassis name="client" implement="MUST"/>
+ <response name="tune-ok"/>
+ <field name="channel max" type="short"/>
+ <field name="frame max" type="long"/>
+ <field name="heartbeat" type="short"/>
+ </method>
+ <method name="tune-ok" synchronous="1" index="31">
+ <chassis name="server" implement="MUST"/>
+ <field name="channel max" type="short">
+ <assert check="notnull"/>
+ <assert check="le" method="tune" field="channel max"/>
+ </field>
+ <field name="frame max" type="long"/>
+ <field name="heartbeat" type="short"/>
+ </method>
+ <method name="open" synchronous="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <response name="open-ok"/>
+ <response name="redirect"/>
+ <field name="virtual host" domain="path">
+ <assert check="regexp" value="^[a-zA-Z0-9/-_]+$"/>
+ </field>
+ <field name="capabilities" type="shortstr"/>
+ <field name="insist" type="bit"/>
+ </method>
+ <method name="open-ok" synchronous="1" index="41">
+ <chassis name="client" implement="MUST"/>
+ <field name="known hosts" domain="known hosts"/>
+ </method>
+ <method name="redirect" synchronous="1" index="50">
+ <chassis name="client" implement="MAY"/>
+ <field name="host" type="shortstr">
+ <assert check="notnull"/>
+ </field>
+ <field name="known hosts" domain="known hosts"/>
+ </method>
+ <method name="close" synchronous="1" index="60">
+ <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"/>
+ <field name="method id" domain="class id"/>
+ </method>
+ <method name="close-ok" synchronous="1" index="61">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ </method>
+ </class>
+ <class name="channel" handler="channel" index="20">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="open" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="open-ok"/>
+ <field name="out of band" type="shortstr">
+ <assert check="null"/>
+ </field>
+ </method>
+ <method name="open-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="flow" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <response name="flow-ok"/>
+ <field name="active" type="bit"/>
+ </method>
+ <method name="flow-ok" index="21">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <field name="active" type="bit"/>
+ </method>
+ <method name="alert" index="30">
+ <chassis name="client" implement="MUST"/>
+ <field name="reply code" domain="reply code"/>
+ <field name="reply text" domain="reply text"/>
+ <field name="details" type="table"/>
+ </method>
+ <method name="close" synchronous="1" index="40">
+ <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"/>
+ <field name="method id" domain="method id"/>
+ </method>
+ <method name="close-ok" synchronous="1" index="41">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ </method>
+ </class>
+ <class name="access" handler="connection" index="30">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="request" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="request-ok"/>
+ <field name="realm" domain="path"/>
+ <field name="exclusive" type="bit"/>
+ <field name="passive" type="bit"/>
+ <field name="active" type="bit"/>
+ <field name="write" type="bit"/>
+ <field name="read" type="bit"/>
+ </method>
+ <method name="request-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ <field name="ticket" domain="access ticket"/>
+ </method>
+ </class>
+ <class name="exchange" handler="channel" index="40">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="declare" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="declare-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="exchange" domain="exchange name">
+ <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
+ </field>
+ <field name="type" type="shortstr">
+ <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
+ </field>
+ <field name="passive" type="bit"/>
+ <field name="durable" type="bit"/>
+ <field name="auto delete" type="bit"/>
+ <field name="internal" type="bit"/>
+ <field name="nowait" type="bit"/>
+ <field name="arguments" type="table"/>
+ </method>
+ <method name="declare-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="delete" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="delete-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="exchange" domain="exchange name">
+ <assert check="notnull"/>
+ </field>
+ <field name="if unused" type="bit"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="delete-ok" synchronous="1" index="21">
+ <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"/>
+ <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">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <method name="declare" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="declare-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name">
+ <assert check="regexp" value="^[a-zA-Z0-9-_.:]*$"/>
+ </field>
+ <field name="passive" type="bit"/>
+ <field name="durable" type="bit"/>
+ <field name="exclusive" type="bit"/>
+ <field name="auto delete" type="bit"/>
+ <field name="nowait" type="bit"/>
+ <field name="arguments" type="table"/>
+ </method>
+ <method name="declare-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ <field name="queue" domain="queue name">
+ <assert check="notnull"/>
+ </field>
+ <field name="message count" type="long"/>
+ <field name="consumer count" type="long"/>
+ </method>
+ <method name="bind" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="bind-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="nowait" type="bit"/>
+ <field name="arguments" type="table"/>
+ </method>
+ <method name="bind-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="purge" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="purge-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="purge-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="message count" type="long"/>
+ </method>
+ <method name="delete" synchronous="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <response name="delete-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="if unused" type="bit"/>
+ <field name="if empty" type="bit">
+ <test/>
+ </field>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="delete-ok" synchronous="1" index="41">
+ <chassis name="client" implement="MUST"/>
+ <field name="message count" type="long"/>
+ </method>
+ </class>
+ <class name="basic" handler="channel" index="60">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="content type" type="shortstr"/>
+ <field name="content encoding" type="shortstr"/>
+ <field name="headers" type="table"/>
+ <field name="delivery mode" type="octet"/>
+ <field name="priority" type="octet"/>
+ <field name="correlation id" type="shortstr"/>
+ <field name="reply to" type="shortstr"/>
+ <field name="expiration" type="shortstr"/>
+ <field name="message id" type="shortstr"/>
+ <field name="timestamp" type="timestamp"/>
+ <field name="type" type="shortstr"/>
+ <field name="user id" type="shortstr"/>
+ <field name="app id" type="shortstr"/>
+ <field name="cluster id" type="shortstr"/>
+ <method name="qos" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="qos-ok"/>
+ <field name="prefetch size" type="long"/>
+ <field name="prefetch count" type="short"/>
+ <field name="global" type="bit"/>
+ </method>
+ <method name="qos-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="consume" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="consume-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="no local" domain="no local"/>
+ <field name="no ack" domain="no ack"/>
+ <field name="exclusive" type="bit"/>
+ <field name="nowait" type="bit"/>
+ <field name="arguments" type="table"/>
+ </method>
+ <method name="consume-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="cancel" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="cancel-ok"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="cancel-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="publish" content="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="mandatory" type="bit"/>
+ <field name="immediate" type="bit"/>
+ </method>
+ <method name="return" content="1" index="50">
+ <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"/>
+ <field name="routing key" type="shortstr"/>
+ </method>
+ <method name="deliver" content="1" index="60">
+ <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"/>
+ <field name="routing key" type="shortstr"/>
+ </method>
+ <method name="get" synchronous="1" index="70">
+ <response name="get-ok"/>
+ <response name="get-empty"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="no ack" domain="no ack"/>
+ </method>
+ <method name="get-ok" synchronous="1" content="1" index="71">
+ <chassis name="client" implement="MAY"/>
+ <field name="delivery tag" domain="delivery tag"/>
+ <field name="redelivered" domain="redelivered"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="message count" type="long"/>
+ </method>
+ <method name="get-empty" synchronous="1" index="72">
+ <chassis name="client" implement="MAY"/>
+ <field name="cluster id" type="shortstr"/>
+ </method>
+ <method name="ack" index="80">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery tag" domain="delivery tag"/>
+ <field name="multiple" type="bit"/>
+ </method>
+ <method name="reject" index="90">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery tag" domain="delivery tag"/>
+ <field name="requeue" type="bit"/>
+ </method>
+ <method name="recover" index="100">
+ <chassis name="server" implement="MUST"/>
+ <field name="requeue" type="bit"/>
+ <response name="recover-ok"/>
+ </method>
+ <method name="recover-ok" synchronous="1" index="101">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ </class>
+ <class name="file" handler="channel" index="70">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="content type" type="shortstr"/>
+ <field name="content encoding" type="shortstr"/>
+ <field name="headers" type="table"/>
+ <field name="priority" type="octet"/>
+ <field name="reply to" type="shortstr"/>
+ <field name="message id" type="shortstr"/>
+ <field name="filename" type="shortstr"/>
+ <field name="timestamp" type="timestamp"/>
+ <field name="cluster id" type="shortstr"/>
+ <method name="qos" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="qos-ok"/>
+ <field name="prefetch size" type="long"/>
+ <field name="prefetch count" type="short"/>
+ <field name="global" type="bit"/>
+ </method>
+ <method name="qos-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="consume" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="consume-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="no local" domain="no local"/>
+ <field name="no ack" domain="no ack"/>
+ <field name="exclusive" type="bit"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="consume-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="cancel" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="cancel-ok"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="cancel-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="open" synchronous="1" index="40">
+ <response name="open-ok"/>
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <field name="identifier" type="shortstr"/>
+ <field name="content size" type="longlong"/>
+ </method>
+ <method name="open-ok" synchronous="1" index="41">
+ <response name="stage"/>
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ <field name="staged size" type="longlong"/>
+ </method>
+ <method name="stage" content="1" index="50">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="publish" index="60">
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="mandatory" type="bit"/>
+ <field name="immediate" type="bit"/>
+ <field name="identifier" type="shortstr"/>
+ </method>
+ <method name="return" content="1" index="70">
+ <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"/>
+ <field name="routing key" type="shortstr"/>
+ </method>
+ <method name="deliver" index="80">
+ <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"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="identifier" type="shortstr"/>
+ </method>
+ <method name="ack" index="90">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery tag" domain="delivery tag"/>
+ <field name="multiple" type="bit"/>
+ </method>
+ <method name="reject" index="100">
+ <chassis name="server" implement="MUST"/>
+ <field name="delivery tag" domain="delivery tag"/>
+ <field name="requeue" type="bit"/>
+ </method>
+ </class>
+ <class name="stream" handler="channel" index="80">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="content type" type="shortstr"/>
+ <field name="content encoding" type="shortstr"/>
+ <field name="headers" type="table"/>
+ <field name="priority" type="octet"/>
+ <field name="timestamp" type="timestamp"/>
+ <method name="qos" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="qos-ok"/>
+ <field name="prefetch size" type="long"/>
+ <field name="prefetch count" type="short"/>
+ <field name="consume rate" type="long"/>
+ <field name="global" type="bit"/>
+ </method>
+ <method name="qos-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="consume" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="consume-ok"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="queue" domain="queue name"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="no local" domain="no local"/>
+ <field name="exclusive" type="bit"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="consume-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="cancel" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="cancel-ok"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ <field name="nowait" type="bit"/>
+ </method>
+ <method name="cancel-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <field name="consumer tag" domain="consumer tag"/>
+ </method>
+ <method name="publish" content="1" index="40">
+ <chassis name="server" implement="MUST"/>
+ <field name="ticket" domain="access ticket"/>
+ <field name="exchange" domain="exchange name"/>
+ <field name="routing key" type="shortstr"/>
+ <field name="mandatory" type="bit"/>
+ <field name="immediate" type="bit"/>
+ </method>
+ <method name="return" content="1" index="50">
+ <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"/>
+ <field name="routing key" type="shortstr"/>
+ </method>
+ <method name="deliver" content="1" index="60">
+ <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"/>
+ <field name="queue" domain="queue name">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ </class>
+ <class name="tx" handler="channel" index="90">
+ <chassis name="server" implement="SHOULD"/>
+ <chassis name="client" implement="MAY"/>
+ <method name="select" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="select-ok"/>
+ </method>
+ <method name="select-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="commit" synchronous="1" index="20">
+ <chassis name="server" implement="MUST"/>
+ <response name="commit-ok"/>
+ </method>
+ <method name="commit-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="rollback" synchronous="1" index="30">
+ <chassis name="server" implement="MUST"/>
+ <response name="rollback-ok"/>
+ </method>
+ <method name="rollback-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ </class>
+ <class name="dtx" handler="channel" index="100">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <method name="select" synchronous="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <response name="select-ok"/>
+ </method>
+ <method name="select-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ <method name="start" synchronous="1" index="20">
+ <chassis name="server" implement="MAY"/>
+ <response name="start-ok"/>
+ <field name="dtx identifier" type="shortstr">
+ <assert check="notnull"/>
+ </field>
+ </method>
+ <method name="start-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ </method>
+ </class>
+ <class name="tunnel" handler="tunnel" index="110">
+ <chassis name="server" implement="MAY"/>
+ <chassis name="client" implement="MAY"/>
+ <field name="headers" type="table"/>
+ <field name="proxy name" type="shortstr"/>
+ <field name="data name" type="shortstr"/>
+ <field name="durable" type="octet"/>
+ <field name="broadcast" type="octet"/>
+ <method name="request" content="1" index="10">
+ <chassis name="server" implement="MUST"/>
+ <field name="meta data" type="table"/>
+ </method>
+ </class>
+ <class name="test" handler="channel" index="120">
+ <chassis name="server" implement="MUST"/>
+ <chassis name="client" implement="SHOULD"/>
+ <method name="integer" synchronous="1" index="10">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <response name="integer-ok"/>
+ <field name="integer 1" type="octet"/>
+ <field name="integer 2" type="short"/>
+ <field name="integer 3" type="long"/>
+ <field name="integer 4" type="longlong"/>
+ <field name="operation" type="octet">
+ <assert check="enum">
+ <value name="add"/>
+ <value name="min"/>
+ <value name="max"/>
+ </assert>
+ </field>
+ </method>
+ <method name="integer-ok" synchronous="1" index="11">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="result" type="longlong"/>
+ </method>
+ <method name="string" synchronous="1" index="20">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <response name="string-ok"/>
+ <field name="string 1" type="shortstr"/>
+ <field name="string 2" type="longstr"/>
+ <field name="operation" type="octet">
+ <assert check="enum">
+ <value name="add"/>
+ <value name="min"/>
+ <value name="max"/>
+ </assert>
+ </field>
+ </method>
+ <method name="string-ok" synchronous="1" index="21">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="result" type="longstr"/>
+ </method>
+ <method name="table" synchronous="1" index="30">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <response name="table-ok"/>
+ <field name="table" type="table"/>
+ <field name="integer op" type="octet">
+ <assert check="enum">
+ <value name="add"/>
+ <value name="min"/>
+ <value name="max"/>
+ </assert>
+ </field>
+ <field name="string op" type="octet">
+ <assert check="enum">
+ <value name="add"/>
+ <value name="min"/>
+ <value name="max"/>
+ </assert>
+ </field>
+ </method>
+ <method name="table-ok" synchronous="1" index="31">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="integer result" type="longlong"/>
+ <field name="string result" type="longstr"/>
+ </method>
+ <method name="content" synchronous="1" content="1" index="40">
+ <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">
+ <chassis name="client" implement="MUST"/>
+ <chassis name="server" implement="MUST"/>
+ <field name="content checksum" type="long"/>
+ </method>
+ </class>
+</amqp>
diff --git a/mcs/class/System.Configuration/System.Configuration/ChangeLog b/mcs/class/System.Configuration/System.Configuration/ChangeLog
index 1a3fb0da100..b40e1810ed5 100644
--- a/mcs/class/System.Configuration/System.Configuration/ChangeLog
+++ b/mcs/class/System.Configuration/System.Configuration/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-09 Marek Habersack <mhabersack@novell.com>
+
+ * ConfigurationLocation.cs: trailing / characters are removed from
+ the path.
+
+ * Configuration.cs: instances created for locations inherit
+ ConfigPath from their containing document.
+ Host.GetConfigPathFromLocationSubPath must be called with current
+ instance's configPath, not LocationConfigPath.
+ Locations are sought for using paths relative to the current
+ instance's configPath, not to the root path.
+ All of the above is part of fix for bug #568441
+
2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
* Configuration.cs: make this work again with bundled configuration
diff --git a/mcs/class/System.Configuration/System.Configuration/Configuration.cs b/mcs/class/System.Configuration/System.Configuration/Configuration.cs
index f50ad8b5387..95d2d60c4de 100644
--- a/mcs/class/System.Configuration/System.Configuration/Configuration.cs
+++ b/mcs/class/System.Configuration/System.Configuration/Configuration.cs
@@ -63,13 +63,14 @@ namespace System.Configuration {
this.system = parent.system;
this.rootGroup = parent.rootGroup;
this.locationSubPath = locationSubPath;
+ this.configPath = parent.ConfigPath;
}
internal Configuration (InternalConfigurationSystem system, string locationSubPath)
{
hasFile = true;
this.system = system;
-
+
system.InitForConfiguration (ref locationSubPath, out configPath, out locationConfigPath);
Configuration parent = null;
@@ -85,18 +86,21 @@ namespace System.Configuration {
internal Configuration FindLocationConfiguration (string relativePath, Configuration defaultConfiguration)
{
- ConfigurationLocation loc = Locations.Find (relativePath);
-
Configuration parentConfig = defaultConfiguration;
-
- if (LocationConfigPath != null) {
+
+ if (!String.IsNullOrEmpty (LocationConfigPath)) {
Configuration parentFile = GetParentWithFile ();
if (parentFile != null) {
- string parentRelativePath = system.Host.GetConfigPathFromLocationSubPath (LocationConfigPath, relativePath);
+ string parentRelativePath = system.Host.GetConfigPathFromLocationSubPath (configPath, relativePath);
parentConfig = parentFile.FindLocationConfiguration (parentRelativePath, defaultConfiguration);
}
}
+ string relConfigPath = configPath.Substring (1) + "/";
+ if (relativePath.StartsWith (relConfigPath, StringComparison.Ordinal))
+ relativePath = relativePath.Substring (relConfigPath.Length);
+
+ ConfigurationLocation loc = Locations.Find (relativePath);
if (loc == null)
return parentConfig;
diff --git a/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs b/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs
index b151da2d077..f796569a7c7 100644
--- a/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs
+++ b/mcs/class/System.Configuration/System.Configuration/ConfigurationLocation.cs
@@ -36,6 +36,8 @@ namespace System.Configuration {
public class ConfigurationLocation
{
+ static readonly char[] pathTrimChars = { '/' };
+
string path;
Configuration configuration;
Configuration parent;
@@ -57,6 +59,8 @@ namespace System.Configuration {
case '\\':
throw new ConfigurationErrorsException ("<location> path attribute must be a relative virtual path. It cannot start with any of ' ' '.' '/' or '\\'.");
}
+
+ path = path.TrimEnd (pathTrimChars);
}
this.path = path;
diff --git a/mcs/class/System.Core/System.Linq.Expressions/ChangeLog b/mcs/class/System.Core/System.Linq.Expressions/ChangeLog
index e834cd996cd..82c62437e7f 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/ChangeLog
+++ b/mcs/class/System.Core/System.Linq.Expressions/ChangeLog
@@ -1,3 +1,10 @@
+2010-01-08 Jb Evain <jbevain@novell.com>
+
+ * Expression.cs (Call): properly deal with zero length array
+ of type arguments for non generic methods. Fixes #568989.
+
+ backport r149241.
+
2009-12-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
* Expression.cs: expression can be null for static getters. Patch from
diff --git a/mcs/class/System.Core/System.Linq.Expressions/Expression.cs b/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
index 78ed9ead2e0..b87a634af86 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
@@ -1043,7 +1043,7 @@ namespace System.Linq.Expressions {
if (method == null)
return null;
- if (!method.IsGenericMethod && args == null)
+ if (!method.IsGenericMethod && (args == null || args.Length == 0))
return method;
if (args.Length == method.GetGenericArguments ().Length)
@@ -2097,7 +2097,7 @@ namespace System.Linq.Expressions {
throw new ArgumentNullException ("expression");
if (!expression.Type.IsAssignableTo (propertyAccessor.DeclaringType))
throw new ArgumentException ("expression");
- }
+ }
//
// .NET does not mandate that if the property is static, that the expression must be null
// fixes a bug exposed by Orchard's ContentItemRecordAlteration.Alteration
diff --git a/mcs/class/System.Core/System/ChangeLog b/mcs/class/System.Core/System/ChangeLog
index 408f0bd2179..00500a8a6c9 100644
--- a/mcs/class/System.Core/System/ChangeLog
+++ b/mcs/class/System.Core/System/ChangeLog
@@ -1,3 +1,10 @@
+2010-01-04 Jb Evain <jbevain@novell.com>
+
+ * TimeZoneInfo.AdjustmentRule.cs, TimeZoneInfo.TransitionTime.cs:
+ Do not include in both mscorlib and System.Core for a NET_2_1 profile.
+
+ backport r149020.
+
2009-07-16 Sebastien Pouliot <sebastien@ximian.com>
* InvalidTimeZoneException.cs, TimeZoneInfo.AdjustmentRule.cs,
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs b/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs
index 748f7698f21..97b535e837a 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs
@@ -24,7 +24,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#if (INSIDE_CORLIB && NET_4_0) || NET_2_1 || (NET_3_5 && !NET_4_0 && !BOOTSTRAP_NET_4_0)
+#if (INSIDE_CORLIB && NET_4_0) || (NET_2_1 && !INSIDE_CORLIB) || (NET_3_5 && !NET_4_0 && !BOOTSTRAP_NET_4_0)
using System.Runtime.Serialization;
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs b/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
index 3be2e13709e..59e608c700f 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
@@ -24,7 +24,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#if (INSIDE_CORLIB && (NET_4_0 || BOOTSTRAP_NET_4_0)) || NET_2_1 || (NET_3_5 && !NET_4_0 && !BOOTSTRAP_NET_4_0)
+#if (INSIDE_CORLIB && (NET_4_0 || BOOTSTRAP_NET_4_0)) || (NET_2_1 && !INSIDE_CORLIB) || (NET_3_5 && !NET_4_0 && !BOOTSTRAP_NET_4_0)
using System.Runtime.Serialization;
diff --git a/mcs/class/System.Data.Linq/ChangeLog b/mcs/class/System.Data.Linq/ChangeLog
index 49bee36403b..5e2ffba0f6c 100755
--- a/mcs/class/System.Data.Linq/ChangeLog
+++ b/mcs/class/System.Data.Linq/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-18 Jonathan Pryor <jpryor@novell.com>
+
+ * src/**/*: Sync with DbLinq r1294. This is DbLinq 0.19. Fixes
+ DataContext.Transaction.
+
2009-12-08 Jonathan Pryor <jpryor@novell.com>
* src/**/*, examples/**/*: Sync with DbLinq r1293. This adds
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs b/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs
index ac0af182bff..838d2b02167 100644
--- a/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs
+++ b/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs
@@ -394,53 +394,73 @@ namespace DbLinq.Data.Linq
if (this.objectTrackingEnabled == false)
throw new InvalidOperationException("Object tracking is not enabled for the current data context instance.");
using (DatabaseContext.OpenConnection()) //ConnMgr will close connection for us
- using (IDatabaseTransaction transaction = DatabaseContext.Transaction())
{
- var queryContext = new QueryContext(this);
-
- // There's no sense in updating an entity when it's going to
- // be deleted in the current transaction, so do deletes first.
- foreach (var entityTrack in CurrentTransactionEntities.EnumerateAll().ToList())
+ if (Transaction != null)
+ SubmitChangesImpl(failureMode);
+ else
{
- switch (entityTrack.EntityState)
+ using (IDatabaseTransaction transaction = DatabaseContext.Transaction())
{
- case EntityState.ToDelete:
- var deleteQuery = QueryBuilder.GetDeleteQuery(entityTrack.Entity, queryContext);
- QueryRunner.Delete(entityTrack.Entity, deleteQuery);
-
- UnregisterDelete(entityTrack.Entity);
- AllTrackedEntities.RegisterToDelete(entityTrack.Entity);
- AllTrackedEntities.RegisterDeleted(entityTrack.Entity);
- break;
- default:
- // ignore.
- break;
+ try
+ {
+ Transaction = (DbTransaction) transaction.Transaction;
+ SubmitChangesImpl(failureMode);
+ // TODO: handle conflicts (which can only occur when concurrency mode is implemented)
+ transaction.Commit();
+ }
+ finally
+ {
+ Transaction = null;
+ }
}
}
- foreach (var entityTrack in CurrentTransactionEntities.EnumerateAll()
- .Concat(AllTrackedEntities.EnumerateAll())
- .ToList())
+ }
+ }
+
+ void SubmitChangesImpl(ConflictMode failureMode)
+ {
+ var queryContext = new QueryContext(this);
+
+ // There's no sense in updating an entity when it's going to
+ // be deleted in the current transaction, so do deletes first.
+ foreach (var entityTrack in CurrentTransactionEntities.EnumerateAll().ToList())
+ {
+ switch (entityTrack.EntityState)
{
- switch (entityTrack.EntityState)
- {
- case EntityState.ToInsert:
- foreach (var toInsert in GetReferencedObjects(entityTrack.Entity))
- {
- InsertEntity(toInsert, queryContext);
- }
- break;
- case EntityState.ToWatch:
- foreach (var toUpdate in GetReferencedObjects(entityTrack.Entity))
- {
- UpdateEntity(toUpdate, queryContext);
- }
- break;
- default:
- throw new ArgumentOutOfRangeException();
- }
+ case EntityState.ToDelete:
+ var deleteQuery = QueryBuilder.GetDeleteQuery(entityTrack.Entity, queryContext);
+ QueryRunner.Delete(entityTrack.Entity, deleteQuery);
+
+ UnregisterDelete(entityTrack.Entity);
+ AllTrackedEntities.RegisterToDelete(entityTrack.Entity);
+ AllTrackedEntities.RegisterDeleted(entityTrack.Entity);
+ break;
+ default:
+ // ignore.
+ break;
+ }
+ }
+ foreach (var entityTrack in CurrentTransactionEntities.EnumerateAll()
+ .Concat(AllTrackedEntities.EnumerateAll())
+ .ToList())
+ {
+ switch (entityTrack.EntityState)
+ {
+ case EntityState.ToInsert:
+ foreach (var toInsert in GetReferencedObjects(entityTrack.Entity))
+ {
+ InsertEntity(toInsert, queryContext);
+ }
+ break;
+ case EntityState.ToWatch:
+ foreach (var toUpdate in GetReferencedObjects(entityTrack.Entity))
+ {
+ UpdateEntity(toUpdate, queryContext);
+ }
+ break;
+ default:
+ throw new ArgumentOutOfRangeException();
}
- // TODO: handle conflicts (which can only occur when concurrency mode is implemented)
- transaction.Commit();
}
}
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Database/Implementation/TransactionalCommand.cs b/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Database/Implementation/TransactionalCommand.cs
index 80aef599271..f4a147511a4 100644
--- a/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Database/Implementation/TransactionalCommand.cs
+++ b/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Database/Implementation/TransactionalCommand.cs
@@ -50,6 +50,9 @@ namespace DbLinq.Data.Linq.Database.Implementation
private readonly IDatabaseTransaction _transaction;
private readonly IDbCommand _command;
+
+ private readonly bool haveHigherTransaction;
+
/// <summary>
/// Gets the command.
/// </summary>
@@ -81,7 +84,8 @@ namespace DbLinq.Data.Linq.Database.Implementation
public void Commit()
{
// TODO: do not commit if participating in a higher transaction
- _transaction.Commit();
+ if (!haveHigherTransaction)
+ _transaction.Commit();
}
public TransactionalCommand(string commandText, bool createTransaction, DataContext dataContext)
@@ -90,13 +94,18 @@ namespace DbLinq.Data.Linq.Database.Implementation
// the OpenConnection() checks that the connection is already open
// TODO: see if we can move this here (in theory the final DataContext shouldn't use)
_connection = dataContext.DatabaseContext.OpenConnection();
+
+ _command = dataContext.DatabaseContext.CreateCommand();
+ haveHigherTransaction = dataContext.Transaction != null;
// the transaction is optional
- if (createTransaction)
+ if (createTransaction && !haveHigherTransaction)
+ {
_transaction = dataContext.DatabaseContext.Transaction();
- _command = dataContext.DatabaseContext.CreateCommand();
+ _command.Transaction = _transaction.Transaction;
+ }
+ else
+ _command.Transaction = dataContext.Transaction;
Command.CommandText = commandText;
- if (createTransaction)
- Command.Transaction = _transaction.Transaction;
}
}
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Linq_101_Samples/Insert_Update_Delete.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Linq_101_Samples/Insert_Update_Delete.cs
index b7640fbbfa1..0d7948af277 100644
--- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Linq_101_Samples/Insert_Update_Delete.cs
+++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Linq_101_Samples/Insert_Update_Delete.cs
@@ -249,9 +249,6 @@ using nwind;
}
-#if !DEBUG && (POSTGRES || (MSSQL && !L2SQL))
- [Explicit]
-#endif
[Linq101SamplesModified("Console and ObjectDummper references deleted")]
[Test(Description = "Delete - Simple. This sample uses the Remove method to delete an OrderDetail from the OrderDetails Table object. The call to SubmitChanges persists this deletion to the database.")]
public void LinqToSqlInsert06()
@@ -298,9 +295,6 @@ using nwind;
//db.SubmitChanges();
}
-#if !DEBUG && (POSTGRES || (MSSQL && !L2SQL))
- [Explicit]
-#endif
[Linq101SamplesModified("Console and ObjectDummper references deleted")]
[Test(Description = "Delete - One-to-Many. This sample uses the Remove method to delete an Order and Order Detail from the Order Details and Orders tables. First deleting Order Details and then deleting from Orders. The call to SubmitChanges persists this deletion to the database.")]
public void LinqToSqlInsert07()
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Transactions.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Transactions.cs
index d4da0bbe36c..406550ff997 100644
--- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Transactions.cs
+++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Transactions.cs
@@ -58,9 +58,6 @@ using nwind;
}
}
-#if !DEBUG && (SQLITE || POSTGRES || (MSSQL && !L2SQL))
- [Explicit]
-#endif
[Test]
public void TransactionRollbackDelete()
{
diff --git a/mcs/class/System.Json/System.Json/ChangeLog b/mcs/class/System.Json/System.Json/ChangeLog
index 2b49ba57a5e..8e9a6896c53 100644
--- a/mcs/class/System.Json/System.Json/ChangeLog
+++ b/mcs/class/System.Json/System.Json/ChangeLog
@@ -1,3 +1,7 @@
+2009-10-05 Atsushi Enomoto <atsushi@ximian.com>
+
+ * JsonReader.cs : \uXXXX parser was totally wrong, giving wrong #.
+
2009-09-22 Atsushi Enomoto <atsushi@ximian.com>
* JsonValue.cs, JsonReader.cs, JsonPrimitive.cs :
diff --git a/mcs/class/System.Json/System.Json/JsonReader.cs b/mcs/class/System.Json/System.Json/JsonReader.cs
index 601b69f946f..414ab7b0fe3 100644
--- a/mcs/class/System.Json/System.Json/JsonReader.cs
+++ b/mcs/class/System.Json/System.Json/JsonReader.cs
@@ -279,13 +279,14 @@ namespace System.Json
case 'u':
ushort cp = 0;
for (int i = 0; i < 4; i++) {
+ cp <<= 4;
if ((c = ReadChar ()) < 0)
throw JsonError ("Incomplete unicode character escape literal");
- if ('0' >= c && c <= '9')
+ if ('0' <= c && c <= '9')
cp += (ushort) (c - '0');
- if ('A' >= c && c <= 'F')
+ if ('A' <= c && c <= 'F')
cp += (ushort) (c - 'A' + 10);
- if ('a' >= c && c <= 'f')
+ if ('a' <= c && c <= 'f')
cp += (ushort) (c - 'a' + 10);
}
vb.Append ((char) cp);
diff --git a/mcs/class/System.Net/ChangeLog b/mcs/class/System.Net/ChangeLog
index 1fd4a2aa51f..dcf41a16dff 100644
--- a/mcs/class/System.Net/ChangeLog
+++ b/mcs/class/System.Net/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-25 Sebastien Pouliot <sebastien@ximian.com>
+
+ * System.Net.dll.sources: Add UdpAnySourceMulticastClient and
+ UdpSingleSourceMulticastClient stubs (with some validations)
+ for SL4 (required to compile tests)
+ [Backport r150127]
+
+2010-01-11 Sebastien Pouliot <sebastien@ximian.com>
+
+ * System.Net.dll.sources: Add InternalWebRequestStreamWrapper.cs
+ * Makefile: Add reference to System.Core (for Action<T>)
+ [Backport r149327]
+
2009-12-05 Sebastien Pouliot <sebastien@ximian.com>
* System.Net.dll.sources: Remove (almost) everything. This
diff --git a/mcs/class/System.Net/Makefile b/mcs/class/System.Net/Makefile
index 89a625fba8e..9beaba3a6d0 100644
--- a/mcs/class/System.Net/Makefile
+++ b/mcs/class/System.Net/Makefile
@@ -3,7 +3,7 @@ SUBDIRS =
include ../../build/rules.make
LIBRARY = System.Net.dll
-LIB_MCS_FLAGS = -unsafe -r:System.dll -d:NET_2_1 -d:NET_2_0 -d:NET_1_1
+LIB_MCS_FLAGS = -unsafe -r:System.dll -r:System.Core.dll -d:NET_2_1 -d:NET_2_0 -d:NET_1_1
ifneq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:NET_3_5 -nowarn:1720
diff --git a/mcs/class/System.Net/System.Net.Sockets/UdpAnySourceMulticastClient.cs b/mcs/class/System.Net/System.Net.Sockets/UdpAnySourceMulticastClient.cs
new file mode 100644
index 00000000000..d44f7be28a6
--- /dev/null
+++ b/mcs/class/System.Net/System.Net.Sockets/UdpAnySourceMulticastClient.cs
@@ -0,0 +1,170 @@
+//
+// UdpAnySourceMulticastClient (Moonlight 4.0)
+//
+// Author:
+// Sebastien Pouliot <sebastien@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_1
+
+namespace System.Net.Sockets {
+
+ [MonoTODO ("stub (with some validations) to allow SL4 tests compilation")]
+ public class UdpAnySourceMulticastClient : IDisposable {
+
+ const string ObjectDisposed = "UdpAnySourceMulticastClient instance was disposed.";
+ bool disposed;
+
+ public UdpAnySourceMulticastClient (IPAddress groupAddress, int localPort)
+ {
+ if (groupAddress == null)
+ throw new ArgumentNullException ("groupAddress");
+ if ((localPort < 0) || (localPort > 65535))
+ throw new ArgumentOutOfRangeException ("localPort");
+ if (localPort < 1024)
+ throw new SocketException ();
+
+ throw new NotImplementedException ();
+ }
+
+ public bool MulticastLoopback { get; set; }
+ public int ReceiveBufferSize { get; set; }
+ public int SendBufferSize { get; set; }
+
+ public IAsyncResult BeginJoinGroup (AsyncCallback callback, object state)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+
+ // check policy
+ //throw new SocketException ((int) SocketError.AccessDenied);
+ throw new NotImplementedException ();
+ // callback called if join operation is completed
+ }
+
+ public void EndJoinGroup (IAsyncResult result)
+ {
+ if (result == null)
+ throw new ArgumentNullException ("result");
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+
+ throw new NotImplementedException ();
+ }
+
+ public IAsyncResult BeginReceiveFromGroup (byte [] buffer, int offset, int count, AsyncCallback callback, object state)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+ if (buffer == null)
+ throw new ArgumentNullException ("buffer");
+ if ((offset < 0) || (offset > buffer.Length))
+ throw new ArgumentOutOfRangeException ("offset");
+ if ((count < 0) || (count > buffer.Length - offset))
+ throw new ArgumentOutOfRangeException ("count");
+
+ throw new NotImplementedException ();
+ }
+
+ public int EndReceiveFromGroup (IAsyncResult result, out IPEndPoint source)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+
+ throw new NotImplementedException ();
+ }
+
+ public IAsyncResult BeginSendTo (byte [] buffer, int offset, int count, IPEndPoint remoteEndPoint, AsyncCallback callback, object state)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+ if (buffer == null)
+ throw new ArgumentNullException ("buffer");
+ if ((offset < 0) || (offset > buffer.Length))
+ throw new ArgumentOutOfRangeException ("offset");
+ if ((count < 0) || (count > buffer.Length - offset))
+ throw new ArgumentOutOfRangeException ("count");
+
+ throw new NotImplementedException ();
+ }
+
+ public void EndSendTo (IAsyncResult result)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+ if (result == null)
+ throw new ArgumentNullException ("result");
+
+ throw new NotImplementedException ();
+ }
+
+ public IAsyncResult BeginSendToGroup (byte [] buffer, int offset, int count, AsyncCallback callback, object state)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+ if (buffer == null)
+ throw new ArgumentNullException ("buffer");
+ if ((offset < 0) || (offset > buffer.Length))
+ throw new ArgumentOutOfRangeException ("offset");
+ if ((count < 0) || (count > buffer.Length - offset))
+ throw new ArgumentOutOfRangeException ("count");
+
+ throw new NotImplementedException ();
+ }
+
+ public void EndSendToGroup (IAsyncResult result)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+ if (result == null)
+ throw new ArgumentNullException ("result");
+
+ throw new NotImplementedException ();
+ }
+
+ public void BlockSource (IPAddress sourceAddress)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+
+ throw new NotImplementedException ();
+ }
+
+ public void UnblockSource (IPAddress sourceAddress)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+
+ throw new NotImplementedException ();
+ }
+
+ public void Dispose ()
+ {
+ disposed = true;
+ }
+ }
+}
+
+#endif
+
diff --git a/mcs/class/System.Net/System.Net.Sockets/UdpSingleSourceMulticastClient.cs b/mcs/class/System.Net/System.Net.Sockets/UdpSingleSourceMulticastClient.cs
new file mode 100644
index 00000000000..c33c24f3794
--- /dev/null
+++ b/mcs/class/System.Net/System.Net.Sockets/UdpSingleSourceMulticastClient.cs
@@ -0,0 +1,128 @@
+//
+// UdpSingleSourceMulticastClient (Moonlight 4.0)
+//
+// Author:
+// Sebastien Pouliot <sebastien@ximian.com>
+//
+// Copyright (C) 2010 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_1
+
+namespace System.Net.Sockets {
+
+ [MonoTODO ("stub (with some validations) to allow SL4 tests compilation")]
+ public class UdpSingleSourceMulticastClient : IDisposable {
+
+ const string ObjectDisposed = "UdpSingleSourceMulticastClient instance was disposed.";
+ bool disposed;
+
+ public UdpSingleSourceMulticastClient (IPAddress sourceAddress, IPAddress groupAddress, int localPort)
+ {
+ if (sourceAddress == null)
+ throw new ArgumentNullException ("sourceAddress");
+ if (groupAddress == null)
+ throw new ArgumentNullException ("groupAddress");
+ if ((localPort < 0) || (localPort > 65535))
+ throw new ArgumentOutOfRangeException ("localPort");
+ if (localPort < 1024)
+ throw new SocketException ();
+
+ throw new NotImplementedException ();
+ }
+
+ public int ReceiveBufferSize { get; set; }
+ public int SendBufferSize { get; set; }
+
+ public IAsyncResult BeginJoinGroup (AsyncCallback callback, object state)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+
+ throw new NotImplementedException ();
+ }
+
+ public void EndJoinGroup (IAsyncResult result)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+
+ throw new NotImplementedException ();
+ }
+
+ public IAsyncResult BeginReceiveFromSource (byte [] buffer, int offset, int count, AsyncCallback callback, object state)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+ if (buffer == null)
+ throw new ArgumentNullException ("buffer");
+ if ((offset < 0) || (offset > buffer.Length))
+ throw new ArgumentOutOfRangeException ("offset");
+ if ((count < 0) || (count > buffer.Length - offset))
+ throw new ArgumentOutOfRangeException ("count");
+
+ throw new NotImplementedException ();
+ }
+
+ public int EndReceiveFromSource (IAsyncResult result, out int sourcePort)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+ if (result == null)
+ throw new ArgumentNullException ("result");
+
+ throw new NotImplementedException ();
+ }
+
+ public IAsyncResult BeginSendToSource (byte [] buffer, int offset, int count, int remotePort, AsyncCallback callback, object state)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+ if (buffer == null)
+ throw new ArgumentNullException ("buffer");
+ if ((offset < 0) || (offset > buffer.Length))
+ throw new ArgumentOutOfRangeException ("offset");
+ if ((count < 0) || (count > buffer.Length - offset))
+ throw new ArgumentOutOfRangeException ("count");
+
+ throw new NotImplementedException ();
+ }
+
+ public void EndSendToSource (IAsyncResult result)
+ {
+ if (disposed)
+ throw new ObjectDisposedException (ObjectDisposed);
+ if (result == null)
+ throw new ArgumentNullException ("result");
+
+ throw new NotImplementedException ();
+ }
+
+ public void Dispose ()
+ {
+ disposed = true;
+ }
+ }
+}
+
+#endif
+
diff --git a/mcs/class/System.Net/System.Net/ChangeLog b/mcs/class/System.Net/System.Net/ChangeLog
index 66be1cf5017..11e380d5764 100644
--- a/mcs/class/System.Net/System.Net/ChangeLog
+++ b/mcs/class/System.Net/System.Net/ChangeLog
@@ -1,3 +1,44 @@
+2010-01-25 Sebastien Pouliot <sebastien@ximian.com>
+
+ * UdpAnySourceMulticastClient.cs: New. Stub for SL4
+ * UdpSingleSourceMulticastClient.cs: New. Stub for SL4
+ [Backport r150127]
+
+2010-01-13 Sebastien Pouliot <sebastien@ximian.com>
+
+ * HttpWebRequest_2_1.cs: Throw for CookieContainer. It is
+ implemented only in the client http stack (and for a limited
+ time in the browser stack too ;-)
+ * InternalWebRequestStreamWrapper.cs: Keep the MemoryStream data
+ available after closing/disposing (by user) since our own code
+ will need it later (e.g. when posting like DRT287)
+ * WebHeaderCollection_2_1.cs: Provide an argument to
+ ArgumentException. Found by Gendarme's ArgumentException
+ InstantiateArgumentExceptionCorrectlyRule
+ [Backport r149484]
+
+2010-01-12 Sebastien Pouliot <sebastien@ximian.com>
+
+ * WebRequest_2_1.cs: Rework registration wrt the two, browser
+ and client, stacks offered in SL3. Only global works now.
+ [Backport r149423]
+
+2010-01-11 Sebastien Pouliot <sebastien@ximian.com>
+
+ * InternalWebRequestStreamWrapper.cs: New. Moved (and adapted)
+ from Moonlight System.Windows.Browser assembly.
+ * InternalWebResponseStreamWrapper.cs: New. Moved (and adapted)
+ from Moonlight System.Windows.Browser assembly.
+ * WebClient_2_1.cs: Remove custom delegate declaration (Gendarme's
+ AvoidDeclaringCustomDelegatesRule). Remove locking over a variable
+ (Gendarme's ReviewLockUsedOnlyForOperationsOnVariablesRule).
+ Avoid potential race with event handlers (Gendarme's
+ ProtectCallsToEventDelegatesRule). Implement OnWriteStreamClosed
+ * WebRequest_2_1.cs: Signature change from delegate to
+ Action<long,long,object>. Found using Gendarme's
+ AvoidDeclaringCustomDelegatesRule
+ [Backport r149327]
+
2009-12-12 Rolf Bjarne Kvinge <RKvinge@novell.com>
* WebClient_2_1.cs: When creating the request we need to copy over
diff --git a/mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs b/mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs
index 85c1b3c7058..da8e8b6e593 100644
--- a/mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs
+++ b/mcs/class/System.Net/System.Net/HttpWebRequest_2_1.cs
@@ -92,10 +92,9 @@ namespace System.Net {
}
}
- // FIXME: should throw NIE - but that will break some sites until we have really splitted browser/client stacks
public virtual CookieContainer CookieContainer {
- get;
- set;
+ get { throw NotImplemented (); }
+ set { throw NotImplemented (); }
}
public override string Method {
diff --git a/mcs/class/System.Net/System.Net/InternalWebRequestStreamWrapper.cs b/mcs/class/System.Net/System.Net/InternalWebRequestStreamWrapper.cs
new file mode 100644
index 00000000000..1c1c5c406f9
--- /dev/null
+++ b/mcs/class/System.Net/System.Net/InternalWebRequestStreamWrapper.cs
@@ -0,0 +1,124 @@
+/*
+ * InternalWebRequestStreamWrapper.cs.
+ *
+ * Contact:
+ * Moonlight List (moonlight-list@lists.ximian.com)
+ *
+ * Copyright 2008,2010 Novell, Inc. (http://www.novell.com)
+ *
+ * See the LICENSE file included with the distribution for details.
+ *
+ */
+
+using System.IO;
+
+namespace System.Net {
+
+ internal sealed class InternalWebRequestStreamWrapper : Stream {
+
+ MemoryStream stream;
+ byte[] data;
+
+ internal InternalWebRequestStreamWrapper (MemoryStream s)
+ {
+ stream = s;
+ }
+
+ public override bool CanRead {
+ get {
+ return stream.CanRead;
+ }
+ }
+
+ public override bool CanSeek {
+ get {
+ return stream.CanSeek;
+ }
+ }
+
+ public override bool CanWrite {
+ get {
+ return stream.CanWrite;
+ }
+ }
+
+ public override long Length {
+ get {
+ return stream.Length;
+ }
+ }
+
+ public override long Position {
+ get {
+ return stream.Position;
+ }
+ set {
+ stream.Position = value;
+ }
+ }
+
+ public override void Flush ()
+ {
+ stream.Flush ();
+ }
+
+ public override void Close ()
+ {
+ try {
+ // When we POST data then the actual bytes are needed after the stream is closed (e.g. DRT287)
+ // However a MemoryStream will clear itself and throw ObjectDisposedException in such case
+ data = stream.ToArray ();
+ stream.Close ();
+ }
+ finally {
+ // if used from WebClient then notify that the stream was closed
+ if (WebClient != null)
+ WebClient.WriteStreamClosedCallback ();
+ }
+ }
+
+ public override void SetLength (long value)
+ {
+ stream.SetLength (value);
+ }
+
+ public override int Read (byte [] buffer, int offset, int count)
+ {
+ return stream.Read (buffer, offset, count);
+ }
+
+ public override void Write (byte [] buffer, int offset, int count)
+ {
+ // make sure we start with a new line
+ if ((count > 0) && (Length == 0))
+ stream.WriteByte ((byte) '\n');
+
+ stream.Write (buffer, offset, count);
+ }
+
+ public override void WriteByte (byte value)
+ {
+ stream.WriteByte (value);
+ }
+
+ public override long Seek (long offset, SeekOrigin origin)
+ {
+ return stream.Seek (offset, origin);
+ }
+
+ internal byte[] GetData ()
+ {
+ // hold a copy of the data if the stream was closed
+ return data;
+ }
+
+ internal MemoryStream InnerStream {
+ get { return stream; }
+ }
+
+ internal WebClient WebClient {
+ get; set;
+ }
+ }
+}
+
diff --git a/mcs/class/System.Net/System.Net/InternalWebResponseStreamWrapper.cs b/mcs/class/System.Net/System.Net/InternalWebResponseStreamWrapper.cs
new file mode 100644
index 00000000000..00d44faa1c8
--- /dev/null
+++ b/mcs/class/System.Net/System.Net/InternalWebResponseStreamWrapper.cs
@@ -0,0 +1,100 @@
+/*
+ * InternalWebResponseStreamWrapper.cs.
+ *
+ * Contact:
+ * Moonlight List (moonlight-list@lists.ximian.com)
+ *
+ * Copyright 2008,2010 Novell, Inc. (http://www.novell.com)
+ *
+ * See the LICENSE file included with the distribution for details.
+ *
+ */
+
+using System.IO;
+
+namespace System.Net {
+
+ // simply a read-only wrapper around a stream + a no-op Close
+ internal sealed class InternalWebResponseStreamWrapper : Stream {
+
+ private Stream stream;
+
+ internal InternalWebResponseStreamWrapper (Stream s)
+ {
+ stream = s;
+ }
+
+ public override bool CanRead {
+ get {
+ return stream.CanRead;
+ }
+ }
+
+ public override bool CanSeek {
+ get {
+ return stream.CanSeek;
+ }
+ }
+
+ public override bool CanWrite {
+ get {
+ return false;
+ }
+ }
+
+ public override long Length {
+ get {
+ return stream.Length;
+ }
+ }
+
+ public override long Position {
+ get {
+ return stream.Position;
+ }
+ set {
+ stream.Position = value;
+ }
+ }
+
+ public override void Flush ()
+ {
+ throw new NotSupportedException ();
+ }
+
+ public override void Close ()
+ {
+ // We cannot call "stream.Close" on a memory stream since it deletes the data
+ }
+
+ public override void SetLength (long value)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public override int Read (byte [] buffer, int offset, int count)
+ {
+ return stream.Read (buffer, offset, count);
+ }
+
+ public override void Write (byte [] buffer, int offset, int count)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public override void WriteByte (byte value)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public override long Seek (long offset, SeekOrigin origin)
+ {
+ return stream.Seek (offset, origin);
+ }
+
+ internal Stream InnerStream {
+ get { return stream; }
+ }
+ }
+}
+
diff --git a/mcs/class/System.Net/System.Net/WebClient_2_1.cs b/mcs/class/System.Net/System.Net/WebClient_2_1.cs
index 8a474ce168b..a099979f3bc 100644
--- a/mcs/class/System.Net/System.Net/WebClient_2_1.cs
+++ b/mcs/class/System.Net/System.Net/WebClient_2_1.cs
@@ -9,7 +9,7 @@
// Stephane Delcroix (sdelcroix@novell.com)
//
// Copyright 2003 Ximian, Inc. (http://www.ximian.com)
-// Copyright 2006, 2008, 2009 Novell, Inc. (http://www.novell.com)
+// Copyright 2006, 2008, 2009-2010 Novell, Inc. (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -40,8 +40,6 @@ namespace System.Net {
// note: this type is effectively sealed to transparent code since it's default .ctor is marked with [SecuritySafeCritical]
public class WebClient {
- private delegate void ProgressChangedDelegate (long read, long length, object state);
-
WebHeaderCollection headers;
WebHeaderCollection responseHeaders;
string baseAddress;
@@ -190,9 +188,7 @@ namespace System.Net {
void CompleteAsync ()
{
- lock (locker) {
- is_busy = false;
- }
+ is_busy = false;
}
// DownloadStringAsync
@@ -336,6 +332,7 @@ namespace System.Net {
bool cancel = false;
try {
stream = request.EndGetRequestStream (result);
+ (stream as InternalWebRequestStreamWrapper).WebClient = this;
}
catch (WebException web) {
cancel = (web.Status == WebExceptionStatus.RequestCanceled);
@@ -350,6 +347,27 @@ namespace System.Net {
}
}
+ internal void WriteStreamClosedCallback ()
+ {
+ try {
+ request.BeginGetResponse (OpenWriteAsyncResponseCallback, null);
+ }
+ catch (Exception e) {
+ OnWriteStreamClosed (new WriteStreamClosedEventArgs (e));
+ }
+ }
+
+ private void OpenWriteAsyncResponseCallback (IAsyncResult result)
+ {
+ try {
+ WebResponse response = request.EndGetResponse (result);
+ ProcessResponse (response);
+ }
+ catch (Exception e) {
+ OnWriteStreamClosed (new WriteStreamClosedEventArgs (e));
+ }
+ }
+
// UploadStringAsync
public void UploadStringAsync (Uri address, string data)
@@ -432,50 +450,56 @@ namespace System.Net {
protected virtual void OnDownloadProgressChanged (DownloadProgressChangedEventArgs e)
{
- if (DownloadProgressChanged != null) {
- DownloadProgressChanged (this, e);
- }
+ DownloadProgressChangedEventHandler handler = DownloadProgressChanged;
+ if (handler != null)
+ handler (this, e);
}
protected virtual void OnOpenReadCompleted (OpenReadCompletedEventArgs args)
{
CompleteAsync ();
- if (OpenReadCompleted != null) {
- OpenReadCompleted (this, args);
- }
+ OpenReadCompletedEventHandler handler = OpenReadCompleted;
+ if (handler != null)
+ handler (this, args);
}
protected virtual void OnDownloadStringCompleted (DownloadStringCompletedEventArgs args)
{
CompleteAsync ();
- if (DownloadStringCompleted != null) {
- DownloadStringCompleted (this, args);
- }
+ DownloadStringCompletedEventHandler handler = DownloadStringCompleted;
+ if (handler != null)
+ handler (this, args);
}
protected virtual void OnOpenWriteCompleted (OpenWriteCompletedEventArgs args)
{
CompleteAsync ();
- if (OpenWriteCompleted != null)
- OpenWriteCompleted (this, args);
+ OpenWriteCompletedEventHandler handler = OpenWriteCompleted;
+ if (handler != null)
+ handler (this, args);
}
protected virtual void OnUploadProgressChanged (UploadProgressChangedEventArgs e)
{
- if (UploadProgressChanged != null)
- UploadProgressChanged (this, e);
+ UploadProgressChangedEventHandler handler = UploadProgressChanged;
+ if (handler != null)
+ handler (this, e);
}
protected virtual void OnUploadStringCompleted (UploadStringCompletedEventArgs args)
{
CompleteAsync ();
- if (UploadStringCompleted != null)
- UploadStringCompleted (this, args);
+ UploadStringCompletedEventHandler handler = UploadStringCompleted;
+ if (handler != null)
+ handler (this, args);
}
protected virtual void OnWriteStreamClosed (WriteStreamClosedEventArgs e)
{
- throw new NotImplementedException ();
+ CompleteAsync ();
+ WriteStreamClosedEventHandler handler = WriteStreamClosed;
+ if (handler != null)
+ handler (this, e);
}
protected virtual WebRequest GetWebRequest (Uri address)
@@ -488,7 +512,7 @@ namespace System.Net {
WebRequest request = WebRequest.Create (uri);
- request.SetupProgressDelegate ((ProgressChangedDelegate) delegate (long read, long length, object state) {
+ request.SetupProgressDelegate (delegate (long read, long length, object state) {
OnDownloadProgressChanged (new DownloadProgressChangedEventArgs (read, length, state));
});
return request;
diff --git a/mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs b/mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs
index cfba887369b..81e28973728 100644
--- a/mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs
+++ b/mcs/class/System.Net/System.Net/WebHeaderCollection_2_1.cs
@@ -259,7 +259,7 @@ namespace System.Net {
case "vary":
case "www-authenticate":
case "x-flash-version":
- throw new ArgumentException ();
+ throw new ArgumentException ("header");
default:
return;
}
diff --git a/mcs/class/System.Net/System.Net/WebRequest_2_1.cs b/mcs/class/System.Net/System.Net/WebRequest_2_1.cs
index c06cf6da17a..9ec8fba4983 100644
--- a/mcs/class/System.Net/System.Net/WebRequest_2_1.cs
+++ b/mcs/class/System.Net/System.Net/WebRequest_2_1.cs
@@ -5,7 +5,7 @@
// Jb Evain <jbevain@novell.com>
// Sebastien Pouliot <sebastien@ximian.com>
//
-// Copyright (C) 2008-2009 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2008-2010 Novell, Inc (http://www.novell.com)
//
//
@@ -40,7 +40,7 @@ namespace System.Net {
public abstract class WebRequest {
- static Type browser_http_request;
+ static IWebRequestCreate default_creator;
static Dictionary<string, IWebRequestCreate> registred_prefixes;
public abstract string ContentType { get; set; }
@@ -48,6 +48,7 @@ namespace System.Net {
public abstract string Method { get; set; }
public abstract Uri RequestUri { get; }
+ // custom registered prefixes return null (unless they override this)
public virtual IWebRequestCreate CreatorInstance {
get { return null; }
}
@@ -89,36 +90,34 @@ namespace System.Net {
if (!uri.IsAbsoluteUri)
throw new InvalidOperationException ("Uri is not absolute.");
- switch (uri.Scheme) {
- case "http":
- case "https":
- // we don't use whatever has been registred but our own
- return CreateBrowserWebRequest (uri);
- default:
- IWebRequestCreate creator;
- if (registred_prefixes.TryGetValue (uri.Scheme, out creator)) {
- return creator.Create (uri);
- } else {
- throw new NotSupportedException (string.Format ("Scheme {0} not supported", uri.Scheme));
+ IWebRequestCreate creator = null;
+ if (!registred_prefixes.TryGetValue (uri.Scheme, out creator)) {
+ switch (uri.Scheme) {
+ case "http":
+ case "https":
+ creator = default_creator;
+ break;
}
}
+
+ if (creator == null)
+ throw new NotSupportedException (string.Format ("Scheme {0} not supported", uri.Scheme));
+
+ return creator.Create (uri);
}
- static WebRequest CreateBrowserWebRequest (Uri uri)
+ internal static void RegisterDefaultStack (IWebRequestCreate creator)
{
- if (browser_http_request == null) {
- var assembly = Assembly.Load ("System.Windows.Browser, Version=2.0.5.0, Culture=Neutral, PublicKeyToken=7cec85d7bea7798e");
- if (assembly == null)
- throw new InvalidOperationException ("Can not load System.Windows.Browser");
-
- browser_http_request = assembly.GetType ("System.Windows.Browser.Net.BrowserHttpWebRequest");
- if (browser_http_request == null)
- throw new InvalidOperationException ("Can not get BrowserHttpWebRequest");
- }
-
- return (WebRequest) Activator.CreateInstance (browser_http_request, new object [] { uri });
+ default_creator = creator;
}
+ // We can register for
+ // * a protocol (e.g. http) for all requests
+ // * a protocol (e.g. https) for a domain
+ // * a protocol (e.g. http) for a single request
+ //
+ // See "How to: Specify Browser or Client HTTP Handling" for more details
+ // http://msdn.microsoft.com/en-us/library/dd920295%28VS.95%29.aspx
public static bool RegisterPrefix (string prefix, IWebRequestCreate creator)
{
if (prefix == null)
@@ -126,8 +125,6 @@ namespace System.Net {
if (creator == null)
throw new ArgumentNullException ("creator");
- // LAMESPEC: according to doc registering http or https will fail. Actually this is not true
- // the registration works but the class being registred won't be used for http[s]
if (registred_prefixes.ContainsKey (prefix))
return false;
@@ -135,11 +132,11 @@ namespace System.Net {
return true;
}
- internal void SetupProgressDelegate (Delegate progress_delegate)
+ internal void SetupProgressDelegate (Action<long,long,object> progress)
{
- FieldInfo fi = GetType ().GetField ("progress_delegate", BindingFlags.Instance | BindingFlags.NonPublic);
+ FieldInfo fi = GetType ().GetField ("progress", BindingFlags.Instance | BindingFlags.NonPublic);
if (fi != null)
- fi.SetValue (this, progress_delegate);
+ fi.SetValue (this, progress);
}
static Exception NotImplemented ()
diff --git a/mcs/class/System.Net/net_2_1_raw_System.Net.dll.sources b/mcs/class/System.Net/net_2_1_raw_System.Net.dll.sources
index f1cddaa9df3..8a9658eeddf 100644
--- a/mcs/class/System.Net/net_2_1_raw_System.Net.dll.sources
+++ b/mcs/class/System.Net/net_2_1_raw_System.Net.dll.sources
@@ -6,6 +6,8 @@ System.Net/Dns_2_1.cs
System.Net/DnsEndPoint_2_1.cs
System.Net/HttpWebRequest_2_1.cs
System.Net/HttpWebResponse_2_1.cs
+System.Net/InternalWebRequestStreamWrapper.cs
+System.Net/InternalWebResponseStreamWrapper.cs
System.Net/WebExceptionStatus_2_1.cs
System.Net/WebHeaderCollection_2_1.cs
System.Net/WebClient_2_1.cs
@@ -18,6 +20,8 @@ System.Net.Sockets/SocketException_2_1.cs
System.Net.Sockets/ProtocolType_2_1.cs
System.Net.Sockets/SocketAsyncOperation_2_1.cs
System.Net.Sockets/SocketType_2_1.cs
+System.Net.Sockets/UdpAnySourceMulticastClient.cs
+System.Net.Sockets/UdpSingleSourceMulticastClient.cs
System.Net.NetworkInformation/NetworkChange_2_1.cs
System.Net.NetworkInformation/NetworkInterface_2_1.cs
../System/System.Net/Cookie.cs
diff --git a/mcs/class/System.Runtime.Serialization/ChangeLog b/mcs/class/System.Runtime.Serialization/ChangeLog
index cd0eabd6661..6a08a647e59 100644
--- a/mcs/class/System.Runtime.Serialization/ChangeLog
+++ b/mcs/class/System.Runtime.Serialization/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * net_4_0_System.Runtime.Serialization.dll : 4.0 dll contains
+ JSON serializer (moved from Sys.SM.Web).
+
2009-10-23 Atsushi Enomoto <atsushi@ximian.com>
* monotouch_System.Runtime.Serialization.dll.sources :
diff --git a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/ChangeLog b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/ChangeLog
index 4901c656d3e..2dd79149ff4 100755
--- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/ChangeLog
+++ b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/ChangeLog
@@ -1,8 +1,13 @@
+2010-01-08 Atsushi Enomoto <atsushi@ximian.com>
+
+ * SerializationMap.cs, KnownTypeCollection.cs : differentiate
+ [DataContract(Namespace=null)] and [DataContract(Namespace="")].
+ Fixed bug #568763.
+
2009-12-01 Sebastien Pouliot <sebastien@ximian.com>
* DataContractSerializer.cs: Add two missing methods for FX3.0
and SL2/SL3.
- [Backport r147280]
2009-10-22 Atsushi Enomoto <atsushi@ximian.com>
diff --git a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs
index 4ff2d0e8719..3690c5ae4c7 100644
--- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs
+++ b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs
@@ -527,7 +527,7 @@ namespace System.Runtime.Serialization
ns = DefaultClrNamespaceBase + type.Namespace;
if (name == null)
- name = type.Namespace == null || type.Namespace.Length == 0 ? type.Name : type.FullName.Substring (type.Namespace.Length + 1).Replace ('+', '.');
+ name = type.Namespace == null ? type.Name : type.FullName.Substring (type.Namespace.Length + 1).Replace ('+', '.');
return new QName (name, ns);
}
diff --git a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/SerializationMap.cs b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/SerializationMap.cs
index 70df5fe82ef..81211da0ef3 100644
--- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/SerializationMap.cs
+++ b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/SerializationMap.cs
@@ -100,9 +100,9 @@ namespace System.Runtime.Serialization
{
KnownTypes = knownTypes;
RuntimeType = type;
- if (qname.Namespace == String.Empty)
+ if (qname.Namespace == null)
qname = new QName (qname.Name,
- "http://schemas.datacontract.org/2004/07/" + type.Namespace);
+ KnownTypeCollection.DefaultClrNamespaceBase + type.Namespace);
XmlName = qname;
Members = new List<DataMemberInfo> ();
diff --git a/mcs/class/System.Runtime.Serialization/System.Xml/ChangeLog b/mcs/class/System.Runtime.Serialization/System.Xml/ChangeLog
index 7040db311a8..437e7ee4527 100755
--- a/mcs/class/System.Runtime.Serialization/System.Xml/ChangeLog
+++ b/mcs/class/System.Runtime.Serialization/System.Xml/ChangeLog
@@ -1,8 +1,11 @@
+2009-12-22 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlBinaryDictionaryReader.cs : slightly more descriptive errmsg.
+
2009-12-01 Sebastien Pouliot <sebastien@ximian.com>
* XmlDictionaryReader.cs: Fix ReadValueAsBase64 return value and
remove NET_2_1 (gui-compare shows this in our 3.0 SP1 profile)
- [Backport r147250]
2009-09-21 Sebastien Pouliot <sebastien@ximian.com>
diff --git a/mcs/class/System.Runtime.Serialization/System.Xml/XmlBinaryDictionaryReader.cs b/mcs/class/System.Runtime.Serialization/System.Xml/XmlBinaryDictionaryReader.cs
index 1acd22391cb..07b47c1b5cd 100644
--- a/mcs/class/System.Runtime.Serialization/System.Xml/XmlBinaryDictionaryReader.cs
+++ b/mcs/class/System.Runtime.Serialization/System.Xml/XmlBinaryDictionaryReader.cs
@@ -1091,7 +1091,7 @@ namespace System.Xml
case BF.Int32:
return (int) current.TypedValue;
}
- throw new InvalidOperationException ("Current content is not an integer");
+ throw new InvalidOperationException (String.Format ("Current content is not an integer. (Internal value type:{0:X02})", (int) node.ValueType));
}
public override long ReadContentAsLong ()
diff --git a/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/ChangeLog b/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/ChangeLog
index cdb7628c345..ec7eecefa87 100644
--- a/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/ChangeLog
+++ b/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-08 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlObjectSrializerTest.cs : added test for bug #568763.
+
2009-09-28 Atsushi Enomoto <atsushi@ximian.com>
* XsdDataContractExporterTest.cs : disable some tests that started
diff --git a/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/XmlObjectSerializerTest.cs b/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/XmlObjectSerializerTest.cs
index 30a8ca87329..8cf3e245774 100644
--- a/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/XmlObjectSerializerTest.cs
+++ b/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/XmlObjectSerializerTest.cs
@@ -227,6 +227,23 @@ namespace MonoTests.System.Runtime.Serialization
Assert.AreEqual (expected, sw.ToString ());
}
+ // DCEmpty
+
+ [Test]
+ public void SerializeEmptyNoNSClass ()
+ {
+ var ser = new DataContractSerializer (typeof (DCEmptyNoNS));
+ SerializeEmptyNoNSClass (ser, "<DCEmptyNoNS xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" />");
+ }
+
+ void SerializeEmptyNoNSClass (XmlObjectSerializer ser, string expected)
+ {
+ var sw = new StringWriter ();
+ using (var w = XmlWriter.Create (sw, settings)) {
+ ser.WriteObject (w, new DCEmptyNoNS ());
+ }
+ Assert.AreEqual (expected, sw.ToString ());
+ }
// string (primitive)
[Test]
@@ -1438,6 +1455,11 @@ namespace MonoTests.System.Runtime.Serialization
public string Foo = "TEST";
}
+ [DataContract (Namespace = "")]
+ public class DCEmptyNoNS
+ {
+ }
+
[DataContract]
public class DCSimple1
{
diff --git a/mcs/class/System.Runtime.Serialization/net_4_0_System.Runtime.Serialization.dll.sources b/mcs/class/System.Runtime.Serialization/net_4_0_System.Runtime.Serialization.dll.sources
new file mode 100644
index 00000000000..1a04edc86aa
--- /dev/null
+++ b/mcs/class/System.Runtime.Serialization/net_4_0_System.Runtime.Serialization.dll.sources
@@ -0,0 +1,11 @@
+#include System.Runtime.Serialization.dll.sources
+
+../System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer.cs
+../System.ServiceModel.Web/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.cs
+../System.ServiceModel.Web/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.cs
+../System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonReader.cs
+../System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonReaderWriterFactory.cs
+../System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonSerializationReader.cs
+../System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonSerializationWriter.cs
+../System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonWriter.cs
+../System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs
diff --git a/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
index 6fe2ef441fe..435052c7da8 100644
--- a/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
@@ -33,29 +33,29 @@ using System.Security;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about the System.ServiceModel assembly
+// General Information about the System.ServiceModel.Web assembly
[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyTitle ("System.ServiceModel.Web.dll")]
[assembly: AssemblyDescription ("System.ServiceModel.Web.dll")]
-[assembly: AssemblyConfiguration ("Development version")]
[assembly: AssemblyCompany ("MONO development team")]
[assembly: AssemblyProduct ("MONO CLI")]
[assembly: AssemblyCopyright ("(c) 2003 Various Authors")]
-[assembly: AssemblyTrademark ("")]
[assembly: CLSCompliant (true)]
[assembly: AssemblyDefaultAlias ("System.ServiceModel.Web.dll")]
-[assembly: AssemblyInformationalVersion ("3.5.594.0")]
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: ComVisible (false)]
[assembly: AssemblyDelaySign (true)]
#if NET_2_1
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: AssemblyKeyFile ("../silverlight.pub")]
#else
+[assembly: AssemblyInformationalVersion ("3.5.594.0")]
[assembly: AssemblyKeyFile("../winfx.pub")]
#endif
diff --git a/mcs/class/System.ServiceModel.Web/Assembly/ChangeLog b/mcs/class/System.ServiceModel.Web/Assembly/ChangeLog
index 85579efe91d..014f905bbfd 100644
--- a/mcs/class/System.ServiceModel.Web/Assembly/ChangeLog
+++ b/mcs/class/System.ServiceModel.Web/Assembly/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-25 Sebastien Pouliot <sebastien@ximian.com>
+
+ * AssemblyInfo.cs: Fix attributes for Moonlight
+ [Backport r150147]
+
2009-01-14 Jb Evain <jbevain@novell.com>
* AssemblyInfo.cs: fix the public key for the NET_2_1 case.
diff --git a/mcs/class/System.ServiceModel.Web/ChangeLog b/mcs/class/System.ServiceModel.Web/ChangeLog
index 3f4c7f3aae4..11f91ba8b7f 100644
--- a/mcs/class/System.ServiceModel.Web/ChangeLog
+++ b/mcs/class/System.ServiceModel.Web/ChangeLog
@@ -1,3 +1,26 @@
+2010-01-26 Sebastien Pouliot <sebastien@ximian.com>
+
+ * monotouch_System.ServiceModel.Web.dll.sources: Don't inherit from
+ net_2_1_raw*.sources when you require a superset of moonlight API
+ [Backport r150214]
+
+2010-01-25 Sebastien Pouliot <sebastien@ximian.com>
+
+ * net_2_1_raw_System.ServiceModel.Web.dll.sources: Use custom
+ version of DataContractJsonSerializer for Moonlight
+ [Backport r150153]
+
+2009-11-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * common_System.ServiceModel.Web.dll.sources,
+ net_2_0_System.ServiceModel.Web.dll.sources,
+ net_4_0_System.ServiceModel.Web.dll.sources :
+
+ in 4.0 profile, some types are moved from this
+ assembly, so extract common basis and include
+ it in 2.0 and 4.0 profile sources (4.0 is
+ equivalent to common so far).
+
2009-10-23 Atsushi Enomoto <atsushi@ximian.com>
* monotouch_System.ServiceModel.Web.dll.sources:
diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/ChangeLog b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/ChangeLog
index 93da84a991e..e157a04f853 100644
--- a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/ChangeLog
+++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/ChangeLog
@@ -1,3 +1,27 @@
+2010-01-26 Sebastien Pouliot <sebastien@ximian.com>
+
+ * DataContractJsonSerializer_2_1.cs: Don't hide [Field|Method]
+ AccessException inside a SerializationException but in a
+ SecurityException.
+ [Backport r150219]
+
+2010-01-25 Sebastien Pouliot <sebastien@ximian.com>
+
+ * DataContractJsonSerializer_2_1.cs: New. Simpler version for
+ Moonlight since it does not inherit from the same base type nor
+ does it overrides any base methods.
+ [Backport r150149]
+
+2010-01-08 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TypeMap.cs : forward port r145077 (see change line for 2009-10-29).
+
+2009-12-14 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TypeMap.cs : handle [Serializable] objects such as KeyValuePair<,>
+ like we do in 2.0. Removed previous workarounds. (Do not serialize
+ and deserialize nonpublic members in "default" mappings.)
+
2009-12-11 Chris Toshok <toshok@ximian.com>
* TypeMap.cs (CreateDefaultTypeMap): only include non-public
@@ -5,6 +29,11 @@
the way MS handles it, but we emulate things much better with this
hack.
+2009-12-11 Atsushi Enomoto <atsushi@ximian.com>
+
+ * JsonReader.cs : e- and e+ was resulting in wrong parse error.
+ This should fix part of bug #531904.
+
2009-12-08 Chris Toshok <toshok@ximian.com>
* JsonSerializationReader.cs (DeserializeGenericCollection): in
@@ -49,7 +78,7 @@
named, e.g., "falsifiable", and we'd need 4 characters worth of
pushback to recognize that correctly.
-2009-11-17 Atsushi Enomoto <atsushi@ximian.com>
+2009-11-20 Atsushi Enomoto <atsushi@ximian.com>
* DataContractJsonSerializer.cs, JsonReader.cs : Silverlight uses
LAME parser that allows object member name as *raw* string
@@ -60,6 +89,11 @@
* JsonSerializationReader.cs : reuse generic collection search
logic in KnownTypeCollection.cs. Fixed bug #551671.
+2009-10-30 Andreia Gaita <avidigal@novell.com>
+
+ * DataContractJsonSerializer.cs: SL accepts keys without "", so tweak
+ the data to fix the quotes before passing it to the deserializer
+
2009-10-29 Chris Toshok <toshok@ximian.com>
* TypeMap.cs (Deserialize): use
@@ -67,10 +101,7 @@
Activator.CreateInstance, since we shouldn't be invoking the
default ctor.
-2009-10-30 Andreia Gaita <avidigal@novell.com>
-
- * DataContractJsonSerializer.cs: SL accepts keys without "", so tweak
- the data to fix the quotes before passing it to the deserializer
+ (forward ported to trunk on 2010-01-08 by atsushi)
2009-10-23 Atsushi Enomoto <atsushi@ximian.com>
diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer_2_1.cs b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer_2_1.cs
new file mode 100644
index 00000000000..794ab9ce68d
--- /dev/null
+++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer_2_1.cs
@@ -0,0 +1,117 @@
+//
+// DataContractJsonSerializer.cs (for Moonlight profile)
+//
+// Authors:
+// Atsushi Enomoto <atsushi@ximian.com>
+// Sebastien Pouliot <sebastien@ximian.com>
+//
+// Copyright (C) 2007-2008, 2010 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.Security;
+using System.Xml;
+
+namespace System.Runtime.Serialization.Json {
+
+ public sealed class DataContractJsonSerializer {
+
+ private Type type;
+ private ReadOnlyCollection<Type> known_types;
+
+ public DataContractJsonSerializer (Type type) :
+ this (type, null)
+ {
+ }
+
+ [MonoTODO ("The 'knownTypes' parameter is unused (except as a property)")]
+ public DataContractJsonSerializer (Type type, IEnumerable<Type> knownTypes)
+ {
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
+ this.type = type;
+ List<Type> types = new List<Type> ();
+ if (knownTypes != null)
+ types.AddRange (knownTypes);
+ known_types = new ReadOnlyCollection<Type> (types);
+ }
+
+ public ReadOnlyCollection<Type> KnownTypes {
+ get { return known_types; }
+ }
+
+ // used by JsonSerializationReader.cs
+ internal int MaxItemsInObjectGraph {
+ get { return Int32.MaxValue; }
+ }
+
+ public object ReadObject (Stream stream)
+ {
+ var r = (JsonReader) JsonReaderWriterFactory.CreateJsonReader (stream, XmlDictionaryReaderQuotas.Max);
+ r.LameSilverlightLiteralParser = true;
+
+ try {
+ r.MoveToContent ();
+ if (!r.IsStartElement ("root", String.Empty)) {
+ throw new SerializationException (
+ String.Format ("Expected element was '{0}', but the actual input element was '{1}' in namespace '{2}'",
+ "root", r.LocalName, r.NamespaceURI));
+ }
+ return new JsonSerializationReader (this, r, type, true).ReadRoot ();
+ } catch (FieldAccessException fae) {
+ throw new SecurityException ("Deserialization has failed", fae);
+ } catch (MethodAccessException mae) {
+ throw new SecurityException ("Deserialization has failed", mae);
+ } catch (SerializationException) {
+ throw;
+ } catch (Exception ex) {
+ throw new SerializationException ("Deserialization has failed", ex);
+ }
+ }
+
+ public void WriteObject (Stream stream, object graph)
+ {
+ using (var writer = JsonReaderWriterFactory.CreateJsonWriter (stream)) {
+ try {
+ writer.WriteStartElement ("root");
+ new JsonSerializationWriter (this, writer, type, false).WriteObjectContent (graph, true, false);
+ writer.WriteEndElement ();
+ } catch (FieldAccessException fae) {
+ throw new SecurityException ("Serialization has failed", fae);
+ } catch (MethodAccessException mae) {
+ throw new SecurityException ("Serialization has failed", mae);
+ } catch (NotImplementedException) {
+ throw;
+ } catch (InvalidDataContractException) {
+ throw;
+ } catch (Exception ex) {
+ throw new SerializationException (String.Format ("There was an error during serialization for object of type {0}", graph != null ? graph.GetType () : null), ex);
+ }
+ }
+ }
+ }
+}
+
diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonReader.cs b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonReader.cs
index 2b811241f46..ba713c34987 100644
--- a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonReader.cs
+++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonReader.cs
@@ -126,13 +126,11 @@ namespace System.Runtime.Serialization.Json
public JsonReader (byte [] buffer, int offset, int count, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
{
SetInput (buffer, offset, count, encoding, quotas, onClose);
- LameSilverlightLiteralParser = true;
}
public JsonReader (Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
{
SetInput (stream, encoding, quotas, onClose);
- LameSilverlightLiteralParser = true;
}
internal bool LameSilverlightLiteralParser { get; set; }
@@ -689,6 +687,11 @@ namespace System.Runtime.Serialization.Json
throw XmlError ("Invalid JSON number token. '.' must not occur after 'E' or 'e'");
floating = true;
break;
+ case '+':
+ case '-':
+ if (prev == 'E' || prev == 'e')
+ break;
+ goto default;
default:
if (!IsNumber (ch)) {
PushbackChar (ch);
diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs
index 3de71da515e..16d2a8fe6c0 100644
--- a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs
+++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs
@@ -59,11 +59,9 @@ namespace System.Runtime.Serialization.Json
if (atts.Length == 1)
return CreateTypeMap (type, (DataContractAttribute) atts [0]);
-#if !NET_2_1
atts = type.GetCustomAttributes (typeof (SerializableAttribute), false);
if (atts.Length == 1)
return CreateTypeMap (type, null);
-#endif
if (IsPrimitiveType (type))
return null;
@@ -85,28 +83,9 @@ namespace System.Runtime.Serialization.Json
var l = new List<TypeMapMember> ();
foreach (var fi in type.GetFields ())
l.Add (new TypeMapField (fi, null));
-
- PropertyInfo[] properties;
-
- // FIXME: this hack for property visibility
- // emulates some of the special case code MS
- // has. a stack trace seen in testing showed
- // a method called
- // ReadKeyValuePairOfstringstringFromJson, so
- // presumably they're dynamically creating
- // methods to deserialize certain (possibly
- // all generic?) types from json.
-
- // see DataContractJsonSerializerTest.TestNonpublicDeserialization.
- if (type == typeof (KeyValuePair<,>))
- properties = type.GetProperties (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
- else
- properties = type.GetProperties ();
-
- foreach (var pi in properties) {
+ foreach (var pi in type.GetProperties ())
if (pi.CanRead && pi.CanWrite)
l.Add (new TypeMapProperty (pi, null));
- }
l.Sort ((x, y) => x.Order != y.Order ? x.Order - y.Order : String.Compare (x.Name, y.Name, StringComparison.Ordinal));
return new TypeMap (type, null, l.ToArray ());
}
@@ -161,7 +140,7 @@ namespace System.Runtime.Serialization.Json
}
}
- members.Sort (delegate (TypeMapMember m1, TypeMapMember m2) { return m1.Order - m2.Order; });
+ members.Sort (delegate (TypeMapMember m1, TypeMapMember m2) { return m1.Order != m2.Order ? m1.Order - m2.Order : String.CompareOrdinal (m1.Name, m2.Name); });
return new TypeMap (type, dca == null ? null : dca.Name, members.ToArray ());
}
@@ -295,7 +274,6 @@ namespace System.Runtime.Serialization.Json
public override void SetMemberValue (object owner, object value)
{
- Console.Error.WriteLine ("SetMemberValue ({0},{1}", property, value);
property.SetValue (owner, value, null);
}
}
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/ChangeLog b/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/ChangeLog
index 6c8571983d5..616fad8d976 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/ChangeLog
+++ b/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/ChangeLog
@@ -1,9 +1,20 @@
+2010-01-25 Sebastien Pouliot <sebastien@ximian.com>
+
+ * DataContractJsonSerializerTest.cs: Add non-working test cases
+ for null-string, known types and handling floating point special
+ values
+ [Backport r150141]
+
2009-12-11 Chris Toshok <toshok@ximian.com>
* DataContractJsonSerializerTest.cs: add a test case for
non-public properties.
-2009-11-17 Atsushi Enomoto <atsushi@ximian.com>
+2009-12-11 Atsushi Enomoto <atsushi@ximian.com>
+
+ * JsonReaderTest.cs : another number parse case.
+
+2009-11-20 Atsushi Enomoto <atsushi@ximian.com>
* DataContractJsonSerializerTest.cs : added ignored test case that
verifies 2.1 behavior (with another case that justifies removal
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs
index 46a07eb652d..08de91a4fbe 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs
@@ -1282,6 +1282,65 @@ namespace MonoTests.System.Runtime.Serialization.Json
string s2 = @"{FooMember:"" \""{dummy:string}\""""}";
ds.ReadObject (new MemoryStream (Encoding.UTF8.GetBytes (s2)));
}
+
+ [Test]
+ [Category ("NotWorking")]
+ public void TypeIsNotPartsOfKnownTypes ()
+ {
+ DataContractJsonSerializer dcjs = new DataContractJsonSerializer (typeof (string));
+ Assert.AreEqual (0, dcjs.KnownTypes.Count, "KnownTypes");
+ }
+
+ [Test]
+ [Category ("NotWorking")]
+ public void ReadWriteNullObject ()
+ {
+ DataContractJsonSerializer dcjs = new DataContractJsonSerializer (typeof (string));
+ using (MemoryStream ms = new MemoryStream ()) {
+ dcjs.WriteObject (ms, null);
+ ms.Position = 0;
+ using (StreamReader sr = new StreamReader (ms)) {
+ string data = sr.ReadToEnd ();
+ Assert.AreEqual ("null", data, "WriteObject(stream,null)");
+
+ ms.Position = 0;
+ Assert.IsNull (dcjs.ReadObject (ms), "ReadObject(stream)");
+ }
+ };
+ }
+
+ object ReadWriteObject (Type type, object obj, string expected)
+ {
+ using (MemoryStream ms = new MemoryStream ()) {
+ DataContractJsonSerializer dcjs = new DataContractJsonSerializer (type);
+ dcjs.WriteObject (ms, obj);
+ ms.Position = 0;
+ using (StreamReader sr = new StreamReader (ms)) {
+ Assert.AreEqual (expected, sr.ReadToEnd (), "WriteObject");
+
+ ms.Position = 0;
+ return dcjs.ReadObject (ms);
+ }
+ }
+ }
+
+ [Test]
+ [Category ("NotWorking")]
+ public void ReadWriteObject_Single_SpecialCases ()
+ {
+ Assert.IsTrue (Single.IsNaN ((float) ReadWriteObject (typeof (float), Single.NaN, "NaN")));
+ Assert.IsTrue (Single.IsNegativeInfinity ((float) ReadWriteObject (typeof (float), Single.NegativeInfinity, "-INF")));
+ Assert.IsTrue (Single.IsPositiveInfinity ((float) ReadWriteObject (typeof (float), Single.PositiveInfinity, "INF")));
+ }
+
+ [Test]
+ [Category ("NotWorking")]
+ public void ReadWriteObject_Double_SpecialCases ()
+ {
+ Assert.IsTrue (Double.IsNaN ((double) ReadWriteObject (typeof (double), Double.NaN, "NaN")));
+ Assert.IsTrue (Double.IsNegativeInfinity ((double) ReadWriteObject (typeof (double), Double.NegativeInfinity, "-INF")));
+ Assert.IsTrue (Double.IsPositiveInfinity ((double) ReadWriteObject (typeof (double), Double.PositiveInfinity, "INF")));
+ }
}
public class TestData
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/JsonReaderTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/JsonReaderTest.cs
index de37a417294..94b39597df0 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/JsonReaderTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/JsonReaderTest.cs
@@ -683,6 +683,12 @@ namespace MonoTests.System.Runtime.Serialization.Json
}
[Test]
+ public void ReadInvalidNumber10 () // bug #531904
+ {
+ ReadToEnd (CreateReader ("4.29153442382814E-05"));
+ }
+
+ [Test]
[ExpectedException (typeof (XmlException))]
public void ReadInvalidObjectContent ()
{
diff --git a/mcs/class/System.ServiceModel.Web/common_System.ServiceModel.Web.dll.sources b/mcs/class/System.ServiceModel.Web/common_System.ServiceModel.Web.dll.sources
new file mode 100644
index 00000000000..ae726bc6b95
--- /dev/null
+++ b/mcs/class/System.ServiceModel.Web/common_System.ServiceModel.Web.dll.sources
@@ -0,0 +1,44 @@
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.ServiceModel.Activation/WebScriptServiceHostFactory.cs
+System.ServiceModel.Activation/WebServiceHostFactory.cs
+System.ServiceModel.Channels/WebBodyFormatMessageProperty.cs
+System.ServiceModel.Channels/WebContentFormat.cs
+System.ServiceModel.Channels/WebContentTypeMapper.cs
+System.ServiceModel.Channels/WebMessageEncoder.cs
+System.ServiceModel.Channels/WebMessageEncoderFactory.cs
+System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs
+System.ServiceModel.Configuration/WebHttpBindingCollectionElement.cs
+System.ServiceModel.Configuration/WebHttpBindingElement.cs
+System.ServiceModel.Configuration/WebHttpElement.cs
+System.ServiceModel.Configuration/WebHttpSecurityElement.cs
+System.ServiceModel.Configuration/WebMessageEncodingElement.cs
+System.ServiceModel.Configuration/WebScriptEnablingElement.cs
+System.ServiceModel.Description/WebHttpBehavior.cs
+System.ServiceModel.Description/WebScriptEnablingBehavior.cs
+System.ServiceModel.Dispatcher/JsonQueryStringConverter.cs
+System.ServiceModel.Dispatcher/QueryStringConverter.cs
+System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelector.cs
+System.ServiceModel.Dispatcher/WebMessageFormatter.cs
+System.ServiceModel.Web/IncomingWebRequestContext.cs
+System.ServiceModel.Web/IncomingWebResponseContext.cs
+System.ServiceModel.Web/OutgoingWebRequestContext.cs
+System.ServiceModel.Web/OutgoingWebResponseContext.cs
+System.ServiceModel.Web/WebAttributeInfo.cs
+System.ServiceModel.Web/WebChannelFactory.cs
+System.ServiceModel.Web/WebGetAttribute.cs
+System.ServiceModel.Web/WebInvokeAttribute.cs
+System.ServiceModel.Web/WebMessageBodyStyle.cs
+System.ServiceModel.Web/WebMessageFormat.cs
+System.ServiceModel.Web/WebOperationContext.cs
+System.ServiceModel.Web/WebServiceHost.cs
+System.ServiceModel/WebHttpBinding.cs
+System.ServiceModel/WebHttpSecurity.cs
+System.ServiceModel/WebHttpSecurityMode.cs
+System/UriTemplate.cs
+System/UriTemplateEquivalenceComparer.cs
+System/UriTemplateMatch.cs
+System/UriTemplateMatchException.cs
+System/UriTemplateTable.cs
diff --git a/mcs/class/System.ServiceModel.Web/monotouch_System.ServiceModel.Web.dll.sources b/mcs/class/System.ServiceModel.Web/monotouch_System.ServiceModel.Web.dll.sources
index 460cd75a5dc..63a3ec2d271 100644
--- a/mcs/class/System.ServiceModel.Web/monotouch_System.ServiceModel.Web.dll.sources
+++ b/mcs/class/System.ServiceModel.Web/monotouch_System.ServiceModel.Web.dll.sources
@@ -1,4 +1,13 @@
-#include net_2_1_raw_System.ServiceModel.Web.dll.sources
+Assembly/AssemblyInfo.cs
+System.Runtime.Serialization.Json/DataContractJsonSerializer.cs
+System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.cs
+System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.cs
+System.Runtime.Serialization.Json/JsonReader.cs
+System.Runtime.Serialization.Json/JsonReaderWriterFactory.cs
+System.Runtime.Serialization.Json/JsonSerializationReader.cs
+System.Runtime.Serialization.Json/JsonSerializationWriter.cs
+System.Runtime.Serialization.Json/JsonWriter.cs
+System.Runtime.Serialization.Json/TypeMap.cs
System.ServiceModel.Channels/WebBodyFormatMessageProperty.cs
System.ServiceModel.Channels/WebContentFormat.cs
System.ServiceModel.Channels/WebContentTypeMapper.cs
diff --git a/mcs/class/System.ServiceModel.Web/net_2_0_System.ServiceModel.Web.dll.sources b/mcs/class/System.ServiceModel.Web/net_2_0_System.ServiceModel.Web.dll.sources
new file mode 100644
index 00000000000..a87970f693b
--- /dev/null
+++ b/mcs/class/System.ServiceModel.Web/net_2_0_System.ServiceModel.Web.dll.sources
@@ -0,0 +1,46 @@
+#include common_System.ServiceModel.Web.dll.sources
+System.Runtime.Serialization.Json/DataContractJsonSerializer.cs
+System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.cs
+System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.cs
+System.Runtime.Serialization.Json/JsonReader.cs
+System.Runtime.Serialization.Json/JsonReaderWriterFactory.cs
+System.Runtime.Serialization.Json/JsonSerializationReader.cs
+System.Runtime.Serialization.Json/JsonSerializationWriter.cs
+System.Runtime.Serialization.Json/JsonWriter.cs
+System.Runtime.Serialization.Json/TypeMap.cs
+System.ServiceModel.Syndication/Atom10FeedFormatter.cs
+System.ServiceModel.Syndication/Atom10FeedFormatter_1.cs
+System.ServiceModel.Syndication/Atom10ItemFormatter.cs
+System.ServiceModel.Syndication/Atom10ItemFormatter_1.cs
+System.ServiceModel.Syndication/AtomPub10CategoriesDocumentFormatter.cs
+System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatter.cs
+System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatter_1.cs
+System.ServiceModel.Syndication/CategoriesDocument.cs
+System.ServiceModel.Syndication/CategoriesDocumentFormatter.cs
+System.ServiceModel.Syndication/ISyndicationElement.cs
+System.ServiceModel.Syndication/InlineCategoriesDocument.cs
+System.ServiceModel.Syndication/ReferencedCategoriesDocument.cs
+System.ServiceModel.Syndication/ResourceCollectionInfo.cs
+System.ServiceModel.Syndication/Rss20FeedFormatter.cs
+System.ServiceModel.Syndication/Rss20FeedFormatter_1.cs
+System.ServiceModel.Syndication/Rss20ItemFormatter.cs
+System.ServiceModel.Syndication/Rss20ItemFormatter_1.cs
+System.ServiceModel.Syndication/ServiceDocument.cs
+System.ServiceModel.Syndication/ServiceDocumentFormatter.cs
+System.ServiceModel.Syndication/SyndicationCategory.cs
+System.ServiceModel.Syndication/SyndicationContent.cs
+System.ServiceModel.Syndication/SyndicationElementExtension.cs
+System.ServiceModel.Syndication/SyndicationElementExtensionCollection.cs
+System.ServiceModel.Syndication/SyndicationExtensions.cs
+System.ServiceModel.Syndication/SyndicationFeed.cs
+System.ServiceModel.Syndication/SyndicationFeedFormatter.cs
+System.ServiceModel.Syndication/SyndicationItem.cs
+System.ServiceModel.Syndication/SyndicationItemFormatter.cs
+System.ServiceModel.Syndication/SyndicationLink.cs
+System.ServiceModel.Syndication/SyndicationPerson.cs
+System.ServiceModel.Syndication/SyndicationVersions.cs
+System.ServiceModel.Syndication/TextSyndicationContent.cs
+System.ServiceModel.Syndication/TextSyndicationContentKind.cs
+System.ServiceModel.Syndication/UrlSyndicationContent.cs
+System.ServiceModel.Syndication/Workspace.cs
+System.ServiceModel.Syndication/XmlSyndicationContent.cs
diff --git a/mcs/class/System.ServiceModel.Web/net_2_1_raw_System.ServiceModel.Web.dll.sources b/mcs/class/System.ServiceModel.Web/net_2_1_raw_System.ServiceModel.Web.dll.sources
index 5101cb52338..02c3693b85a 100644
--- a/mcs/class/System.ServiceModel.Web/net_2_1_raw_System.ServiceModel.Web.dll.sources
+++ b/mcs/class/System.ServiceModel.Web/net_2_1_raw_System.ServiceModel.Web.dll.sources
@@ -1,5 +1,5 @@
Assembly/AssemblyInfo.cs
-System.Runtime.Serialization.Json/DataContractJsonSerializer.cs
+System.Runtime.Serialization.Json/DataContractJsonSerializer_2_1.cs
System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.cs
System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.cs
System.Runtime.Serialization.Json/JsonReader.cs
diff --git a/mcs/class/System.ServiceModel.Web/net_4_0_System.ServiceModel.Web.dll.sources b/mcs/class/System.ServiceModel.Web/net_4_0_System.ServiceModel.Web.dll.sources
new file mode 100644
index 00000000000..60e0dbb9933
--- /dev/null
+++ b/mcs/class/System.ServiceModel.Web/net_4_0_System.ServiceModel.Web.dll.sources
@@ -0,0 +1 @@
+#include common_System.ServiceModel.Web.dll.sources
diff --git a/mcs/class/System.ServiceModel/ChangeLog b/mcs/class/System.ServiceModel/ChangeLog
index cbdb376d96a..ca2229d61c9 100755
--- a/mcs/class/System.ServiceModel/ChangeLog
+++ b/mcs/class/System.ServiceModel/ChangeLog
@@ -1,3 +1,38 @@
+2010-01-07 Astushi Enomoto <atsushi@ximian.com>
+
+ * System.ServiceModel_test.dll.sources : ended up to remove
+ *all* mannerless serialization tests.
+
+2010-01-06 Astushi Enomoto <atsushi@ximian.com>
+
+ * System.ServiceModel_test.dll.sources : ended up to remove
+ mannerless tests that block other tests.
+
+2009-12-03 Astushi Enomoto <atsushi@ximian.com>
+
+ * System.ServiceModel_test.dll.sources:
+ added HttpsTransportBindingElementTest.cs.
+
+2009-11-26 Astushi Enomoto <atsushi@ximian.com>
+
+ * net_2_1_raw_System.ServiceModel.dll.sources : fix file name case,
+ which was not caught on windows.
+
+2009-11-25 Astushi Enomoto <atsushi@ximian.com>
+
+ * net_2_1_raw_System.ServiceModel.dll.sources, Dummy_2_1.cs:
+ reflected a couple of SL3 updates.
+
+2009-11-17 Astushi Enomoto <atsushi@ximian.com>
+
+ * net_2_1_System.ServiceModel.dll.sources :
+ add binary message encoder support.
+
+2009-11-12 Astushi Enomoto <atsushi@ximian.com>
+
+ * net_4_0_System.ServiceModel.dll.sources : 4.0 dll contains
+ syndication stuff (moved from Sys.SM.Web.dll).
+
2009-10-07 Astushi Enomoto <atsushi@ximian.com>
* net_2_1_System.ServiceModel.dll.sources :
diff --git a/mcs/class/System.ServiceModel/Dummy_2_1.cs b/mcs/class/System.ServiceModel/Dummy_2_1.cs
index 292ff720c34..0be15540a77 100644
--- a/mcs/class/System.ServiceModel/Dummy_2_1.cs
+++ b/mcs/class/System.ServiceModel/Dummy_2_1.cs
@@ -10,8 +10,6 @@ namespace System.ServiceModel
}
namespace System.ServiceModel.Channels
{
- [DataContract]
- public class EndpointAddress10 {}
public interface ITransportTokenAssertionProvider {}
}
namespace System.ServiceModel.Configuration
@@ -30,7 +28,6 @@ namespace System.ServiceModel.Description
}
namespace System.ServiceModel.Dispatcher
{
- public interface IDispatchMessageFormatter {}
}
namespace System.ServiceModel.Security
{
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/ChangeLog b/mcs/class/System.ServiceModel/Mono.CodeGeneration/ChangeLog
index 47b3c9b773b..4c6af3d0045 100755
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/ChangeLog
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/ChangeLog
@@ -2,6 +2,7 @@
* CodeModule.cs: Silverlight does not allow AssemblyBuilderAccess.
RunAndSave so we reduce it to AssemblyBuilderAccess.Run
+ [Foreport r144715]
2009-04-08 Atsushi Enomoto <atsushi@ximian.com>
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncoder.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncoder.cs
index 9197e33f30c..70f6928701d 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncoder.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncoder.cs
@@ -245,6 +245,19 @@ namespace System.ServiceModel.Channels
if (contentType != ContentType)
throw new ProtocolException ("Only content type 'application/soap+msbin1' is allowed.");
+ // FIXME: remove this extraneous buffering. It is somehow required for HTTP + binary encoding binding. The culprit is probably in binary xml reader or writer, but not sure.
+ if (!stream.CanSeek) {
+ var tmpms = new MemoryStream ();
+ var bytes = new byte [4096];
+ int len;
+ do {
+ len = stream.Read (bytes, 0, bytes.Length);
+ tmpms.Write (bytes, 0, len);
+ } while (len > 0);
+ tmpms.Seek (0, SeekOrigin.Begin);
+ stream = tmpms;
+ }
+
return Message.CreateMessage (
XmlDictionaryReader.CreateBinaryReader (stream, soap_dictionary, owner != null ? owner.Owner.ReaderQuotas : new XmlDictionaryReaderQuotas (), session ? CurrentReaderSession : null),
maxSizeOfHeaders, MessageVersion);
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
index 135db6e7270..60156ac393b 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
@@ -58,7 +58,11 @@ namespace System.ServiceModel.Channels
public override MessageVersion MessageVersion {
get { return version; }
- set { version = value; }
+ set {
+ if (!version.Envelope.Equals (EnvelopeVersion.Soap12))
+ throw new InvalidOperationException ("Binary message encoding binding element only supports SOAP 1.2.");
+ version = value;
+ }
}
public int MaxSessionSize {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
index beb866cdb6c..9435288bd32 100755
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
@@ -1,3 +1,143 @@
+2010-01-07 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TcpBinaryFrameManager.cs : treat EOF as interrupted stream too (it
+ does not happen when communicating with .NET client but happens with
+ mono). Seealso FIXME comment.
+ * TcpDuplexSessionChannel.cs : do not try to close session when it
+ failed to read sized message. The connection is already dead.
+
+ Fixed bug #567949.
+
+2010-01-07 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TcpDuplexSessionChannel.cs :
+ Write EndRecord only when the connection is available.
+ Remove hack - do let ChannelDispatcher close the channel.
+ * TcpBinaryFrameManager.cs :
+ The socket may be disconnected when trying to read a sized message,
+ so check some socket exceptions.
+ In case the client silently shuts down without EndRecord and
+ reconnects to the server with preamble while expecting a sized
+ message (which is so lame, but that's what .NET often does), refresh
+ preamble and continue.
+
+ This fixes some cases of bug #567949 but not all.
+
+2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * BinaryMessageEncoder.cs : enable workaround buffering only when
+ the argument stream does *not* support seek. This fixes some
+ net.tcp connection problem.
+
+2009-12-26 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TcpBinaryFrameManager.cs : If preamble byte is not available from
+ the client stream, detect it to close the reply or input channel.
+ * TcpRequestChannel.cs : send preamble at each request time.
+ It differentiates communication behavior on such cases that involve
+ single open and multiple requests.
+ * TcpReplyChannel.cs : close the channel only when the channel is
+ oeprated to close i.e. do not close the socket every time.
+ Process preambles on each request (the same as request channel).
+
+2009-12-26 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TcpBinaryFrameManager.cs : unsized envelope record may have more
+ than one data block, so consume them accordingly. This should fix
+ large buffer consumption.
+
+2009-12-21 Atsushi Enomoto <atsushi@ximian.com>
+
+ * MessageFault.cs : support EnvelopeVersion.None as well, as almost
+ the same as SOAP12.
+
+2009-12-17 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpRequestContext.cs : for DestinationUnreachable message, this
+ channel returns 400 in .NET.
+
+2009-12-16 Atsushi Enomoto <atsushi@ximian.com>
+
+ * BinaryMessageEncoder.cs : added workaround for strange stream
+ consumption error raised by HttpTransport + Binary encoder example.
+ * BinaryMessageEncodingBindingElement.cs:
+ only SOAP 1.2 is allowed for this encoder.
+
+2009-12-14 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlReaderBodyWriter.cs : don't try to write empty xml.
+
+2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpRequestChannel.cs : avoid adding duplicate headers. Basically
+ default WebHeaderCollection items are overwritten.
+
+2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpRequestChannel.cs : when HTTP response was error, do not try
+ to read message but just raise an error.
+
+2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * MessageHeaders.cs : null can be set as a WS-Addressing header item.
+
+2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpRequestChannel.cs : WebException.Response might be null.
+
+2009-12-04 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ReplyChannelBase.cs : added listener property.
+ * SecurityChannelListener.cs : quick async impl, as ServiceHost has
+ been updated to prefer async by default, a while ago.
+
+2009-12-04 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpTransportBindingElement.cs : finished all GetProperty() values.
+
+2009-12-04 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpRequestChannel.cs : disabled carelessly added
+ "UseDefaultCredentials = false" line. It blocked basic auth.
+
+2009-12-04 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpRequestChannel.cs, HttpChannelFactory.cs,
+ HttpChannelListener.cs, HttpListenerManager.cs :
+ implemented http client authentication and some of corresponding
+ service code. Only client works so far.
+
+2009-12-03 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpsTransportBindingElement.cs, HttpChannelListener.cs :
+ added URI scheme check.
+
+2009-12-03 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TransportSecurityBindingElement.cs : fix 2.1 build.
+
+2009-12-03 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpsTransportBindingElement.cs :
+ RequireClientCertificate is false by default.
+ Remove extra #if NET_2_1.
+ * SecurityBindingElement.cs :
+ Implement some transport security factory methods.
+ * TransportSecurityBindingElement.cs :
+ It is not ISecurityCapabilities anymore.
+
+2009-11-25 Atsushi Enomoto <atsushi@ximian.com>
+
+ * MessageHeaders.cs
+ SecurityBindingElement.cs
+ LocalClientSecuritySettings.cs
+ TransportSecurityBindingElement.cs
+ FaultConverter.cs : They are now part of SL3 API.
+
+2009-11-17 Atsushi Enomoto <atsushi@ximian.com>
+
+ * BinaryMessageEncodingBindingElement.cs : changes for 2.1 build.
+
2009-11-05 Geoff Norton <gnorton@novell.com>
* HttpsTransportBindingElement.cs: Implement basic https transport
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs
index ee7411c81cb..ef383290328 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/FaultConverter.cs
@@ -77,12 +77,14 @@ namespace System.ServiceModel.Channels
"FIXME_InternalError",
version.Addressing.Namespace);
+#if !NET_2_1
// FIXME: set correct fault reason.
if (ctx.EndpointDispatcher.ChannelDispatcher.IncludeExceptionDetailInFaults) {
ExceptionDetail detail = new ExceptionDetail (error);
return Message.CreateMessage (version, fc,
"error occured", detail, ctx.IncomingMessageHeaders != null ? ctx.IncomingMessageHeaders.Action : null);
}
+#endif
return Message.CreateMessage (version, fc, "error occured", ctx.IncomingMessageHeaders.Action);
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs
index 921db7f3a5c..d61bc952148 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs
@@ -44,6 +44,7 @@ namespace System.ServiceModel.Channels
public HttpChannelFactory (HttpTransportBindingElement source, BindingContext ctx)
: base (source, ctx)
{
+ ClientCredentials = ctx.BindingParameters.Find<ClientCredentials> ();
foreach (BindingElement be in ctx.RemainingBindingElements) {
MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
if (mbe != null) {
@@ -59,6 +60,8 @@ namespace System.ServiceModel.Channels
get { return encoder; }
}
+ public ClientCredentials ClientCredentials { get; private set; }
+
protected override TChannel OnCreateChannel (
EndpointAddress address, Uri via)
{
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelListener.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelListener.cs
index b2524cb7231..540a5318064 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelListener.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelListener.cs
@@ -66,7 +66,7 @@ namespace System.ServiceModel.Channels
protected override HttpListenerManager CreateListenerManager ()
{
- return new HttpSimpleListenerManager (this);
+ return new HttpSimpleListenerManager (this, Source);
}
}
@@ -93,14 +93,13 @@ namespace System.ServiceModel.Channels
protected override HttpListenerManager CreateListenerManager ()
{
- return new AspNetListenerManager (this);
+ return new AspNetListenerManager (this, Source);
}
}
internal abstract class HttpChannelListenerBase<TChannel> : InternalChannelListenerBase<TChannel>
where TChannel : class, IChannel
{
- HttpTransportBindingElement source;
BindingContext context;
List<TChannel> channels = new List<TChannel> ();
MessageEncoder encoder;
@@ -110,6 +109,12 @@ namespace System.ServiceModel.Channels
BindingContext context)
: base (context)
{
+ this.Source = source;
+ // The null Uri check looks weird, but it seems the listener can be built without it.
+ // See HttpTransportBindingElementTest.BuildChannelListenerWithoutListenUri().
+ if (Uri != null && source.Scheme != Uri.Scheme)
+ throw new ArgumentException (String.Format ("Requested listen uri scheme must be {0}, but was {1}.", source.Scheme, Uri.Scheme));
+
foreach (BindingElement be in context.RemainingBindingElements) {
MessageEncodingBindingElement mbe = be as MessageEncodingBindingElement;
if (mbe != null) {
@@ -121,6 +126,8 @@ namespace System.ServiceModel.Channels
encoder = new TextMessageEncoder (MessageVersion.Default, Encoding.UTF8);
}
+ public HttpTransportBindingElement Source { get; private set; }
+
public HttpListenerManager ListenerManager {
get { return httpChannelManager; }
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpListenerManager.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpListenerManager.cs
index 41ac9d4e576..07ba90ce00b 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpListenerManager.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpListenerManager.cs
@@ -111,8 +111,8 @@ namespace System.ServiceModel.Channels
opened_listeners = new Dictionary<Uri, HttpListener> ();
}
- public HttpSimpleListenerManager (IChannelListener channelListener)
- : base (channelListener)
+ public HttpSimpleListenerManager (IChannelListener channelListener, HttpTransportBindingElement source)
+ : base (channelListener, source)
{
}
@@ -121,6 +121,9 @@ namespace System.ServiceModel.Channels
lock (opened_listeners) {
if (!opened_listeners.ContainsKey (channelListener.Uri)) {
HttpListener listener = new HttpListener ();
+ listener.AuthenticationSchemes = Source.AuthenticationScheme;
+ listener.Realm = Source.Realm;
+ listener.UnsafeConnectionNtlmAuthentication = Source.UnsafeConnectionNtlmAuthentication;
string uriString = channelListener.Uri.ToString ();
if (!uriString.EndsWith ("/", StringComparison.Ordinal))
@@ -167,8 +170,8 @@ namespace System.ServiceModel.Channels
{
SvcHttpHandler http_handler;
- public AspNetListenerManager (IChannelListener channelListener)
- : base (channelListener)
+ public AspNetListenerManager (IChannelListener channelListener, HttpTransportBindingElement source)
+ : base (channelListener, source)
{
http_handler = SvcHttpHandlerFactory.GetHandlerForListener (channelListener);
}
@@ -209,19 +212,21 @@ namespace System.ServiceModel.Channels
AutoResetEvent wait_http_ctx = new AutoResetEvent (false);
List<HttpContextInfo> pending = new List<HttpContextInfo> ();
-public MetadataPublishingInfo MexInfo { get { return mex_info; } }
+ public MetadataPublishingInfo MexInfo { get { return mex_info; } }
+ public HttpTransportBindingElement Source { get; private set; }
static HttpListenerManager ()
{
registered_channels = new Dictionary<Uri, List<IChannelListener>> ();
}
- protected HttpListenerManager (IChannelListener channelListener)
+ protected HttpListenerManager (IChannelListener channelListener, HttpTransportBindingElement source)
{
this.channel_listener = channelListener;
// FIXME: this cast should not be required, but current JIT somehow causes an internal error.
mex_info = ((IChannelListener) channelListener).GetProperty<MetadataPublishingInfo> ();
wsdl_instance = mex_info != null ? mex_info.Instance : null;
+ Source = source;
}
public void Open (TimeSpan timeout)
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs
index 4770b46c33e..1a5cb757b88 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs
@@ -87,6 +87,38 @@ namespace System.ServiceModel.Channels
web_request.Method = "POST";
web_request.ContentType = Encoder.ContentType;
+#if !NET_2_1 // until we support NetworkCredential like SL4 will do.
+ // client authentication (while SL3 has NetworkCredential class, it is not implemented yet. So, it is non-SL only.)
+ var httpbe = (HttpTransportBindingElement) source.Source;
+ string authType = null;
+ switch (httpbe.AuthenticationScheme) {
+ // AuthenticationSchemes.Anonymous is the default, ignored.
+ case AuthenticationSchemes.Basic:
+ authType = "Basic";
+ break;
+ case AuthenticationSchemes.Digest:
+ authType = "Digest";
+ break;
+ case AuthenticationSchemes.Ntlm:
+ authType = "Ntlm";
+ break;
+ case AuthenticationSchemes.Negotiate:
+ authType = "Negotiate";
+ break;
+ }
+ if (authType != null) {
+ var cred = source.ClientCredentials;
+ string user = cred != null ? cred.UserName.UserName : null;
+ string pwd = cred != null ? cred.UserName.Password : null;
+ if (String.IsNullOrEmpty (user))
+ throw new InvalidOperationException (String.Format ("Use ClientCredentials to specify a user name for required HTTP {0} authentication.", authType));
+ var nc = new NetworkCredential (user, pwd);
+ web_request.Credentials = nc;
+ // FIXME: it is said required in SL4, but it blocks full WCF.
+ //web_request.UseDefaultCredentials = false;
+ }
+#endif
+
#if !NET_2_1 // FIXME: implement this to not depend on Timeout property
web_request.Timeout = (int) timeout.TotalMilliseconds;
#endif
@@ -106,6 +138,7 @@ namespace System.ServiceModel.Channels
string pname = HttpRequestMessageProperty.Name;
if (message.Properties.ContainsKey (pname)) {
HttpRequestMessageProperty hp = (HttpRequestMessageProperty) message.Properties [pname];
+ web_request.Headers.Clear ();
web_request.Headers.Add (hp.Headers);
web_request.Method = hp.Method;
// FIXME: do we have to handle hp.QueryString ?
@@ -152,6 +185,10 @@ namespace System.ServiceModel.Channels
resstr = res.GetResponseStream ();
} catch (WebException we) {
res = we.Response;
+ if (res == null) {
+ channelResult.Complete (we);
+ return;
+ }
try {
// The response might contain SOAP fault. It might not.
resstr = res.GetResponseStream ();
@@ -160,7 +197,12 @@ namespace System.ServiceModel.Channels
return;
}
}
-
+
+ var hrr = (HttpWebResponse) res;
+ if ((int) hrr.StatusCode >= 400) {
+ channelResult.Complete (new WebException (String.Format ("There was an error on processing web request: Status code {0}({1}): {2}", (int) hrr.StatusCode, hrr.StatusCode, hrr.StatusDescription)));
+ }
+
try {
using (var responseStream = resstr) {
MemoryStream ms = new MemoryStream ();
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestContext.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestContext.cs
index ee78e5c13a7..2919454e8be 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestContext.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestContext.cs
@@ -56,6 +56,19 @@ namespace System.ServiceModel.Channels
if (msg == null)
throw new ArgumentNullException ("msg");
+ // Handle DestinationUnreacheable as 400 (it is what .NET does).
+ if (msg.IsFault) {
+ // FIXME: isn't there any better way?
+ var mb = msg.CreateBufferedCopy (0x10000);
+ var fault = MessageFault.CreateFault (mb.CreateMessage (), 0x10000);
+ if (fault.Code.Name == "DestinationUnreachable") {
+ ctx.Response.StatusCode = 400;
+ return;
+ }
+ else
+ msg = mb.CreateMessage ();
+ }
+
// FIXME: should this be done here?
if (channel.MessageVersion.Addressing.Equals (AddressingVersion.None))
msg.Headers.Action = null; // prohibited
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
index 489618d5e76..9376700f0a6 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
@@ -181,15 +181,14 @@ namespace System.ServiceModel.Channels
return new HttpTransportBindingElement (this);
}
- [MonoTODO]
public override T GetProperty<T> (BindingContext context)
{
// http://blogs.msdn.com/drnick/archive/2007/04/10/interfaces-for-getproperty-part-1.aspx
#if !NET_2_1
if (typeof (T) == typeof (ISecurityCapabilities))
- throw new NotImplementedException ();
+ return (T) (object) new HttpBindingProperties (this);
if (typeof (T) == typeof (IBindingDeliveryCapabilities))
- throw new NotImplementedException ();
+ return (T) (object) new HttpBindingProperties (this);
#endif
if (typeof (T) == typeof (TransferMode))
return (T) (object) TransferMode;
@@ -218,6 +217,61 @@ namespace System.ServiceModel.Channels
{
throw new NotImplementedException ();
}
+
+ class HttpBindingProperties : ISecurityCapabilities, IBindingDeliveryCapabilities
+ {
+ HttpTransportBindingElement source;
+
+ public HttpBindingProperties (HttpTransportBindingElement source)
+ {
+ this.source = source;
+ }
+
+ public bool AssuresOrderedDelivery {
+ get { return false; }
+ }
+
+ public bool QueuedDelivery {
+ get { return false; }
+ }
+
+ public ProtectionLevel SupportedRequestProtectionLevel {
+ get { return ProtectionLevel.None; }
+ }
+
+ public ProtectionLevel SupportedResponseProtectionLevel {
+ get { return ProtectionLevel.None; }
+ }
+
+ public bool SupportsClientAuthentication {
+ get { return source.AuthenticationScheme != AuthenticationSchemes.Anonymous; }
+ }
+
+ public bool SupportsServerAuthentication {
+ get {
+ switch (source.AuthenticationScheme) {
+ case AuthenticationSchemes.Negotiate:
+ return true;
+ default:
+ return false;
+ }
+ }
+ }
+
+ public bool SupportsClientWindowsIdentity {
+ get {
+ switch (source.AuthenticationScheme) {
+ case AuthenticationSchemes.Basic:
+ case AuthenticationSchemes.Digest: // hmm... why? but they return true on .NET
+ case AuthenticationSchemes.Negotiate:
+ case AuthenticationSchemes.Ntlm:
+ return true;
+ default:
+ return false;
+ }
+ }
+ }
+ }
#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs
index cbf0ac11858..396a4276574 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpsTransportBindingElement.cs
@@ -40,7 +40,7 @@ namespace System.ServiceModel.Channels
: HttpTransportBindingElement, ITransportTokenAssertionProvider,
IPolicyExportExtension, IWsdlExportExtension
{
- bool req_cli_cert = true;
+ bool req_cli_cert = false;
public HttpsTransportBindingElement ()
{
@@ -50,11 +50,7 @@ namespace System.ServiceModel.Channels
HttpsTransportBindingElement other)
: base (other)
{
-#if NET_2_1
req_cli_cert = other.req_cli_cert;
-#else
- throw new NotImplementedException ();
-#endif
}
public bool RequireClientCertificate {
@@ -66,15 +62,10 @@ namespace System.ServiceModel.Channels
get { return Uri.UriSchemeHttps; }
}
- [MonoTODO]
public override IChannelFactory<TChannel> BuildChannelFactory<TChannel> (
BindingContext context)
{
-#if NET_2_1
return base.BuildChannelFactory <TChannel> (context);
-#else
- throw new NotImplementedException ();
-#endif
}
#if !NET_2_1
@@ -83,7 +74,7 @@ namespace System.ServiceModel.Channels
BuildChannelListener<TChannel> (
BindingContext context)
{
- throw new NotImplementedException ();
+ return base.BuildChannelListener <TChannel> (context);
}
#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/LocalClientSecuritySettings.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/LocalClientSecuritySettings.cs
index fec4a3475ae..ef58f946dff 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/LocalClientSecuritySettings.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/LocalClientSecuritySettings.cs
@@ -33,23 +33,30 @@ namespace System.ServiceModel.Channels
[MonoTODO]
public sealed class LocalClientSecuritySettings
{
+#if !NET_2_1
bool cache_cookies = true;
int cookie_renewal = 60;
bool detect_replays = true;
IdentityVerifier verifier = IdentityVerifier.CreateDefault ();
- TimeSpan max_clock_skew = TimeSpan.FromMinutes (5);
TimeSpan max_cookie_cache_time = TimeSpan.MaxValue;
bool reconnect = true;
int replay_cache_size = 900000;
- TimeSpan replay_window = TimeSpan.FromMinutes (5);
TimeSpan renewal_interval = TimeSpan.FromHours (10);
TimeSpan rollover_interval = TimeSpan.FromMinutes (5);
- TimeSpan validity_duration = TimeSpan.FromMinutes (5);
+#endif
public LocalClientSecuritySettings ()
{
+ MaxClockSkew = TimeSpan.FromMinutes (5);
+ ReplayWindow = TimeSpan.FromMinutes (5);
+ TimestampValidityDuration = TimeSpan.FromMinutes (5);
}
+ public TimeSpan MaxClockSkew { get; set; }
+ public TimeSpan ReplayWindow { get; set; }
+ public TimeSpan TimestampValidityDuration { get; set; }
+
+#if !NET_2_1
public bool CacheCookies {
get { return cache_cookies; }
set { cache_cookies = value; }
@@ -66,10 +73,6 @@ namespace System.ServiceModel.Channels
get { return verifier; }
set { verifier = value; }
}
- public TimeSpan MaxClockSkew {
- get { return max_clock_skew; }
- set { max_clock_skew = value; }
- }
public TimeSpan MaxCookieCachingTime {
get { return max_cookie_cache_time; }
set { max_cookie_cache_time = value; }
@@ -82,10 +85,6 @@ namespace System.ServiceModel.Channels
get { return replay_cache_size; }
set { replay_cache_size = value; }
}
- public TimeSpan ReplayWindow {
- get { return replay_window; }
- set { replay_window = value; }
- }
public TimeSpan SessionKeyRenewalInterval {
get { return renewal_interval; }
set { renewal_interval = value; }
@@ -94,11 +93,7 @@ namespace System.ServiceModel.Channels
get { return rollover_interval; }
set { rollover_interval = value; }
}
-
- public TimeSpan TimestampValidityDuration {
- get { return validity_duration; }
- set { validity_duration = value; }
- }
+#endif
[MonoTODO ("What happens to IdentityVerifier?")]
public LocalClientSecuritySettings Clone ()
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageFault.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageFault.cs
index fed33e16f30..727667df90c 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageFault.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageFault.cs
@@ -42,8 +42,8 @@ namespace System.ServiceModel.Channels
try {
if (message.Version.Envelope == EnvelopeVersion.Soap11)
return CreateFault11 (message, maxBufferSize);
- else if (message.Version.Envelope == EnvelopeVersion.Soap12)
- return CreateFault12 (message, maxBufferSize);
+ else // common to None and SOAP12
+ return CreateFault (message, maxBufferSize, message.Version.Envelope.Namespace);
} catch (XmlException ex) {
throw new CommunicationException ("Received an invalid SOAP Fault message", ex);
}
@@ -90,21 +90,21 @@ namespace System.ServiceModel.Channels
return CreateFault (fc, fr, details);
}
- static MessageFault CreateFault12 (Message message, int maxBufferSize)
+ static MessageFault CreateFault (Message message, int maxBufferSize, string ns)
{
FaultCode fc = null;
FaultReason fr = null;
XmlDictionaryReader r = message.GetReaderAtBodyContents ();
- r.ReadStartElement ("Fault", message.Version.Envelope.Namespace);
+ r.ReadStartElement ("Fault", ns);
r.MoveToContent ();
while (r.NodeType != XmlNodeType.EndElement) {
switch (r.LocalName) {
case "Code":
- fc = ReadFaultCode12 (r, message.Version.Envelope.Namespace);
+ fc = ReadFaultCode (r, ns);
break;
case "Reason":
- fr = ReadFaultReason12 (r, message.Version.Envelope.Namespace);
+ fr = ReadFaultReason (r, ns);
break;
default:
throw new XmlException (String.Format ("Unexpected node {0} name {1}", r.NodeType, r.Name));
@@ -142,7 +142,7 @@ namespace System.ServiceModel.Channels
return new FaultCode (value.Name, value.Namespace, subcode);
}
- static FaultCode ReadFaultCode12 (XmlDictionaryReader r, string ns)
+ static FaultCode ReadFaultCode (XmlDictionaryReader r, string ns)
{
FaultCode subcode = null;
XmlQualifiedName value = XmlQualifiedName.Empty;
@@ -155,7 +155,7 @@ namespace System.ServiceModel.Channels
while (r.NodeType != XmlNodeType.EndElement) {
switch (r.LocalName) {
case "Subcode":
- subcode = ReadFaultCode12 (r, ns);
+ subcode = ReadFaultCode (r, ns);
break;
case "Value":
value = (XmlQualifiedName) r.ReadElementContentAs (typeof (XmlQualifiedName), r as IXmlNamespaceResolver, "Value", ns);
@@ -170,7 +170,7 @@ namespace System.ServiceModel.Channels
return new FaultCode (value.Name, value.Namespace, subcode);
}
- static FaultReason ReadFaultReason12 (XmlDictionaryReader r, string ns)
+ static FaultReason ReadFaultReason (XmlDictionaryReader r, string ns)
{
List<FaultReasonText> l = new List<FaultReasonText> ();
if (r.IsEmptyElement)
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs
index 1b5e0b5c1d1..2cbb37bf211 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs
@@ -332,14 +332,13 @@ namespace System.ServiceModel.Channels
get { return l.Count; }
}
-#if !NET_2_1
public EndpointAddress FaultTo {
get {
int idx = FindHeader ("FaultTo", Constants.WSA1);
return idx < 0 ? null : GetHeader<EndpointAddress> (idx);
}
set {
- if (version.Addressing == AddressingVersion.None)
+ if (version.Addressing == AddressingVersion.None && value != null)
throw new InvalidOperationException ("WS-Addressing header is not allowed for AddressingVersion.None");
RemoveAll ("FaultTo", Constants.WSA1);
@@ -354,7 +353,7 @@ namespace System.ServiceModel.Channels
return idx < 0 ? null : GetHeader<EndpointAddress> (idx);
}
set {
- if (version.Addressing == AddressingVersion.None)
+ if (version.Addressing == AddressingVersion.None && value != null)
throw new InvalidOperationException ("WS-Addressing header is not allowed for AddressingVersion.None");
RemoveAll ("From", Constants.WSA1);
@@ -362,7 +361,6 @@ namespace System.ServiceModel.Channels
Add (MessageHeader.CreateHeader ("From", Constants.WSA1, EndpointAddress10.FromEndpointAddress (value)));
}
}
-#endif
public MessageHeaderInfo this [int index] {
get { return l [index]; }
@@ -374,7 +372,7 @@ namespace System.ServiceModel.Channels
return idx < 0 ? null : new UniqueId (GetHeader<string> (idx));
}
set {
- if (version.Addressing == AddressingVersion.None)
+ if (version.Addressing == AddressingVersion.None && value != null)
throw new InvalidOperationException ("WS-Addressing header is not allowed for AddressingVersion.None");
RemoveAll ("MessageID", Constants.WSA1);
@@ -391,7 +389,7 @@ namespace System.ServiceModel.Channels
return idx < 0 ? null : new UniqueId (GetHeader<string> (idx));
}
set {
- if (version.Addressing == AddressingVersion.None)
+ if (version.Addressing == AddressingVersion.None && value != null)
throw new InvalidOperationException ("WS-Addressing header is not allowed for AddressingVersion.None");
RemoveAll ("MessageID", Constants.WSA1);
@@ -401,14 +399,13 @@ namespace System.ServiceModel.Channels
}
-#if !NET_2_1
public EndpointAddress ReplyTo {
get {
int idx = FindHeader ("ReplyTo", Constants.WSA1);
return idx < 0 ? null : GetHeader<EndpointAddress> (idx);
}
set {
- if (version.Addressing == AddressingVersion.None)
+ if (version.Addressing == AddressingVersion.None && value != null)
throw new InvalidOperationException ("WS-Addressing header is not allowed for AddressingVersion.None");
RemoveAll ("ReplyTo", Constants.WSA1);
@@ -416,7 +413,6 @@ namespace System.ServiceModel.Channels
Add (MessageHeader.CreateHeader ("ReplyTo", Constants.WSA1, EndpointAddress10.FromEndpointAddress (value)));
}
}
-#endif
public Uri To {
get {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReplyChannelBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReplyChannelBase.cs
index 5fccdfda7b4..580545f703f 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReplyChannelBase.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ReplyChannelBase.cs
@@ -62,6 +62,10 @@ namespace System.ServiceModel.Channels
ChannelListenerBase listener;
+ public ChannelListenerBase Listener {
+ get { return listener; }
+ }
+
public abstract EndpointAddress LocalAddress { get; }
public override T GetProperty<T> ()
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
index 463803ad6b4..2bbcb6a759d 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityBindingElement.cs
@@ -27,12 +27,14 @@
//
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.IdentityModel.Selectors;
-using System.IdentityModel.Tokens;
using System.ServiceModel.Description;
using System.ServiceModel.Channels;
using System.ServiceModel.Security;
+#if !NET_2_1
+using System.IdentityModel.Selectors;
+using System.IdentityModel.Tokens;
using System.ServiceModel.Security.Tokens;
+#endif
namespace System.ServiceModel.Channels
{
@@ -40,22 +42,24 @@ namespace System.ServiceModel.Channels
{
internal SecurityBindingElement ()
{
+#if !NET_2_1
DefaultAlgorithmSuite = SecurityAlgorithmSuite.Default;
MessageSecurityVersion = MessageSecurityVersion.Default;
- IncludeTimestamp = true;
KeyEntropyMode = SecurityKeyEntropyMode.CombinedEntropy;
endpoint = new SupportingTokenParameters ();
operation = new Dictionary<string,SupportingTokenParameters> ();
opt_endpoint = new SupportingTokenParameters ();
opt_operation = new Dictionary<string,SupportingTokenParameters> ();
- client_settings = new LocalClientSecuritySettings ();
service_settings = new LocalServiceSecuritySettings ();
+#endif
+ IncludeTimestamp = true;
+ LocalClientSettings = new LocalClientSecuritySettings ();
}
internal SecurityBindingElement (SecurityBindingElement other)
{
+#if !NET_2_1
alg_suite = other.alg_suite;
- include_timestamp = other.include_timestamp;
key_entropy_mode = other.key_entropy_mode;
security_header_layout = other.security_header_layout;
msg_security_version = other.msg_security_version;
@@ -67,39 +71,37 @@ namespace System.ServiceModel.Channels
opt_operation = new Dictionary<string,SupportingTokenParameters> ();
foreach (KeyValuePair<string,SupportingTokenParameters> p in other.opt_operation)
opt_operation.Add (p.Key, p.Value.Clone ());
- client_settings = other.client_settings.Clone ();
service_settings = other.service_settings.Clone ();
+#endif
+ IncludeTimestamp = other.IncludeTimestamp;
+ LocalClientSettings = other.LocalClientSettings.Clone ();
}
+#if !NET_2_1
SecurityAlgorithmSuite alg_suite;
- bool include_timestamp;
SecurityKeyEntropyMode key_entropy_mode;
SecurityHeaderLayout security_header_layout;
MessageSecurityVersion msg_security_version;
SupportingTokenParameters endpoint, opt_endpoint;
IDictionary<string,SupportingTokenParameters> operation, opt_operation;
- LocalClientSecuritySettings client_settings;
LocalServiceSecuritySettings service_settings;
+#endif
+ public bool IncludeTimestamp { get; set; }
+
+ public LocalClientSecuritySettings LocalClientSettings { get; private set; }
+
+#if !NET_2_1
public SecurityAlgorithmSuite DefaultAlgorithmSuite {
get { return alg_suite; }
set { alg_suite = value; }
}
- public bool IncludeTimestamp {
- get { return include_timestamp; }
- set { include_timestamp = value; }
- }
-
public SecurityKeyEntropyMode KeyEntropyMode {
get { return key_entropy_mode; }
set { key_entropy_mode = value; }
}
- public LocalClientSecuritySettings LocalClientSettings {
- get { return client_settings; }
- }
-
public LocalServiceSecuritySettings LocalServiceSettings {
get { return service_settings; }
}
@@ -129,6 +131,7 @@ namespace System.ServiceModel.Channels
public IDictionary<string,SupportingTokenParameters> OptionalOperationSupportingTokenParameters {
get { return opt_operation; }
}
+#endif
[MonoTODO ("It supports only IRequestSessionChannel")]
public override bool CanBuildChannelFactory<TChannel> (BindingContext context)
@@ -136,24 +139,32 @@ namespace System.ServiceModel.Channels
return context.CanBuildInnerChannelFactory<TChannel> ();
}
- [MonoTODO ("It probably supports only IReplySessionChannel")]
- public override bool CanBuildChannelListener<TChannel> (BindingContext context)
- {
- return context.CanBuildInnerChannelListener<TChannel> ();
- }
-
public override IChannelFactory<TChannel> BuildChannelFactory<TChannel> (
BindingContext context)
{
return BuildChannelFactoryCore<TChannel> (context);
}
+ protected abstract IChannelFactory<TChannel>
+ BuildChannelFactoryCore<TChannel> (BindingContext context);
+
+#if !NET_2_1
+ [MonoTODO ("It probably supports only IReplySessionChannel")]
+ public override bool CanBuildChannelListener<TChannel> (BindingContext context)
+ {
+ return context.CanBuildInnerChannelListener<TChannel> ();
+ }
+
public override IChannelListener<TChannel> BuildChannelListener<TChannel> (
BindingContext context)
{
return BuildChannelListenerCore<TChannel> (context);
}
+ protected abstract IChannelListener<TChannel>
+ BuildChannelListenerCore<TChannel> (BindingContext context)
+ where TChannel : class, IChannel;
+
public virtual void SetKeyDerivation (bool requireDerivedKeys)
{
endpoint.SetKeyDerivation (requireDerivedKeys);
@@ -169,15 +180,16 @@ namespace System.ServiceModel.Channels
{
return base.ToString ();
}
-
- protected abstract IChannelFactory<TChannel>
- BuildChannelFactoryCore<TChannel> (BindingContext context);
-
- protected abstract IChannelListener<TChannel>
- BuildChannelListenerCore<TChannel> (BindingContext context)
- where TChannel : class, IChannel;
+#else
+ [MonoTODO]
+ public override T GetProperty<T> (BindingContext context)
+ {
+ return null;
+ }
+#endif
#region Factory methods
+#if !NET_2_1
public static SymmetricSecurityBindingElement
CreateAnonymousForCertificateBindingElement ()
{
@@ -197,7 +209,9 @@ namespace System.ServiceModel.Channels
public static TransportSecurityBindingElement
CreateCertificateOverTransportBindingElement (MessageSecurityVersion version)
{
- throw new NotImplementedException ();
+ var be = new TransportSecurityBindingElement () { MessageSecurityVersion = version };
+ be.EndpointSupportingTokenParameters.SignedEncrypted.Add (new X509SecurityTokenParameters ());
+ return be;
}
[MonoTODO]
@@ -431,15 +445,21 @@ namespace System.ServiceModel.Channels
be.EndpointSupportingTokenParameters.SignedEncrypted.Add (utp);
return be;
}
+#endif
[MonoTODO]
public static TransportSecurityBindingElement
CreateUserNameOverTransportBindingElement ()
{
- throw new NotImplementedException ();
+ var be = new TransportSecurityBindingElement ();
+#if !NET_2_1 // FIXME: there should be whatever else to do for 2.1 instead.
+ be.EndpointSupportingTokenParameters.SignedEncrypted.Add (new UserNameSecurityTokenParameters ());
+#endif
+ return be;
}
#endregion
+#if !NET_2_1
// It seems almost internal, hardcoded like this (I tried
// custom parameters that sets IssuedTokenSecurityTokenParameters
// like below ones, but that didn't trigger this method).
@@ -454,5 +474,6 @@ namespace System.ServiceModel.Channels
parameters.IssuerBindingContext = issuerBindingContext;
}
}
+#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityChannelListener.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityChannelListener.cs
index 05c52ef814b..de19c64f3f3 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityChannelListener.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/SecurityChannelListener.cs
@@ -157,69 +157,62 @@ namespace System.ServiceModel.Channels
}
}
- internal class SecurityReplyChannel : LayeredReplyChannel
+ internal class SecurityReplyChannel : InternalReplyChannelBase
{
- SecurityChannelListener<IReplyChannel> source;
+ IReplyChannel inner;
public SecurityReplyChannel (
SecurityChannelListener<IReplyChannel> source,
IReplyChannel innerChannel)
- : base (innerChannel)
+ : base (source)
{
- this.source = source;
- }
-
- public override ChannelListenerBase Listener {
- get { return source; }
+ this.inner = innerChannel;
}
public SecurityChannelListener<IReplyChannel> Source {
- get { return source; }
+ get { return (SecurityChannelListener<IReplyChannel>) Listener; }
}
// IReplyChannel
- public override IAsyncResult BeginReceiveRequest (
- TimeSpan timeout, AsyncCallback callback, object state)
- {
- throw new NotImplementedException ();
- }
-
- public override IAsyncResult BeginTryReceiveRequest (
- TimeSpan timeout, AsyncCallback callback, object state)
- {
- throw new NotImplementedException ();
- }
-
- public override RequestContext EndReceiveRequest (IAsyncResult result)
+ protected override void OnOpen (TimeSpan timeout)
{
- throw new NotImplementedException ();
+ inner.Open (timeout);
}
- public override bool EndTryReceiveRequest (IAsyncResult result, out RequestContext context)
+ protected override void OnClose (TimeSpan timeout)
{
- throw new NotImplementedException ();
+ inner.Close (timeout);
}
- public override RequestContext ReceiveRequest (TimeSpan timeout)
+ public override RequestContext ReceiveRequest (TimeSpan timeout)
{
- return new SecurityRequestContext (this, base.ReceiveRequest (timeout));
+ RequestContext ctx;
+ if (TryReceiveRequest (timeout, out ctx))
+ return ctx;
+ throw new TimeoutException ("Failed to receive request context");
}
public override bool TryReceiveRequest (TimeSpan timeout, out RequestContext context)
{
- if (!base.TryReceiveRequest (timeout, out context))
+ if (!inner.TryReceiveRequest (timeout, out context))
return false;
context = new SecurityRequestContext (this, context);
return true;
}
+ [MonoTODO]
+ public override bool WaitForRequest (TimeSpan timeout)
+ {
+ throw new NotImplementedException ();
+ }
+
// IChannel
public override T GetProperty<T> ()
{
// FIXME: implement
- return base.GetProperty<T> ();
+ return inner.GetProperty<T> ();
}
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpBinaryFrameManager.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpBinaryFrameManager.cs
index 444b9f39c3d..466719e25af 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpBinaryFrameManager.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpBinaryFrameManager.cs
@@ -151,10 +151,14 @@ namespace System.ServiceModel.Channels
writer = new MyBinaryWriter (buffer);
}
+ static readonly byte [] empty_bytes = new byte [0];
+
public byte [] ReadSizedChunk ()
{
int length = reader.ReadVariableInt ();
-
+ if (length == 0)
+ return empty_bytes;
+
if (length > 65536)
throw new InvalidOperationException ("The message is too large.");
@@ -207,11 +211,17 @@ namespace System.ServiceModel.Channels
s.WriteByte (PreambleAckRecord);
}
- public void ProcessPreambleRecipient ()
+ public bool ProcessPreambleRecipient ()
+ {
+ return ProcessPreambleRecipient (-1);
+ }
+ bool ProcessPreambleRecipient (int initialByte)
{
bool preambleEnd = false;
while (!preambleEnd) {
- int b = s.ReadByte ();
+ int b = initialByte < 0 ? s.ReadByte () : initialByte;
+ if (b < 0)
+ return false;
switch (b) {
case VersionRecord:
if (s.ReadByte () != 1)
@@ -242,6 +252,7 @@ namespace System.ServiceModel.Channels
throw new ProtocolException (String.Format ("Unexpected record type {0:X2}", b));
}
}
+ return true;
}
XmlBinaryReaderSession reader_session;
@@ -251,11 +262,31 @@ namespace System.ServiceModel.Channels
{
// FIXME: implement full [MC-NMF].
- var packetType = s.ReadByte ();
+ int packetType;
+ try {
+ packetType = s.ReadByte ();
+ } catch (IOException) {
+ // it is already disconnected
+ return null;
+ } catch (SocketException) {
+ // it is already disconnected
+ return null;
+ }
+ // FIXME: .NET never results in -1, so there may be implementation mismatch in Socket (but might be in other places)
+ if (packetType == -1)
+ return null;
+ // FIXME: The client should wait for EndRecord, but if we try to send it, the socket blocks and becomes unable to work anymore.
if (packetType == EndRecord)
return null;
- if (packetType != SizedEnvelopeRecord)
- throw new NotImplementedException (String.Format ("Packet type {0:X} is not implemented", packetType));
+ if (packetType != SizedEnvelopeRecord) {
+ if (is_service_side) {
+ // reconnect
+ ProcessPreambleRecipient (packetType);
+ ProcessPreambleAckRecipient ();
+ }
+ else
+ throw new NotImplementedException (String.Format ("Packet type {0:X} is not implemented", packetType));
+ }
byte [] buffer = ReadSizedChunk ();
@@ -292,6 +323,10 @@ namespace System.ServiceModel.Channels
// FIXME: support timeout
public Message ReadUnsizedMessage (TimeSpan timeout)
{
+ // Encoding type 7 is expected
+ if (EncodingRecord != EncodingBinary)
+ throw new NotImplementedException (String.Format ("Message encoding {0:X} is not implemented yet", EncodingRecord));
+
var packetType = s.ReadByte ();
if (packetType == EndRecord)
@@ -299,19 +334,17 @@ namespace System.ServiceModel.Channels
if (packetType != UnsizedEnvelopeRecord)
throw new NotImplementedException (String.Format ("Packet type {0:X} is not implemented", packetType));
- // Encoding type 7 is expected
- if (EncodingRecord != EncodingBinary)
- throw new NotImplementedException (String.Format ("Message encoding {0:X} is not implemented yet", EncodingRecord));
-
- byte [] buffer = ReadSizedChunk ();
- var ms = new MemoryStream (buffer, 0, buffer.Length);
-
- // FIXME: supply maxSizeOfHeaders.
- Message msg = Encoder.ReadMessage (ms, 0x10000);
+ var ms = new MemoryStream ();
+ while (true) {
+ byte [] buffer = ReadSizedChunk ();
+ if (buffer.Length == 0) // i.e. it is UnsizedMessageTerminator (which is '0')
+ break;
+ ms.Write (buffer, 0, buffer.Length);
+ }
+ ms.Seek (0, SeekOrigin.Begin);
- var terminator = s.ReadByte ();
- if (terminator != UnsizedMessageTerminator)
- throw new InvalidOperationException (String.Format ("Unsized message terminator is expected. Got '{0}' (&#x{1:X};).", (char) terminator, terminator));
+ // FIXME: supply correct maxSizeOfHeaders.
+ Message msg = Encoder.ReadMessage (ms, (int) ms.Length);
return msg;
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpDuplexSessionChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpDuplexSessionChannel.cs
index 5984629eb9f..0ffcf8837e2 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpDuplexSessionChannel.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpDuplexSessionChannel.cs
@@ -124,7 +124,8 @@ namespace System.ServiceModel.Channels
void DiscardSession ()
{
- frame.WriteEndRecord ();
+ if (client.Connected)
+ frame.WriteEndRecord ();
session = null;
}
@@ -164,7 +165,11 @@ namespace System.ServiceModel.Channels
if (timeout <= TimeSpan.Zero)
throw new ArgumentException (String.Format ("Timeout value must be positive value. It was {0}", timeout));
client.ReceiveTimeout = (int) timeout.TotalMilliseconds;
- return frame.ReadSizedMessage ();
+ var ret = frame.ReadSizedMessage ();
+ // FIXME: this may not be precise, but connection might be reused for some weird socket state transition (that's what happens). So as a workaround, avoid closing the session by sending EndRecord from this channel at OnClose().
+ if (ret == null)
+ session = null;
+ return ret;
}
public override bool TryReceive (TimeSpan timeout, out Message message)
@@ -174,9 +179,6 @@ namespace System.ServiceModel.Channels
message = Receive (timeout);
if (message != null)
return true;
- // received EndRecord, so close the session and return false instead.
- // (Closing channel here might not be a good idea, but right now I have no better way.)
- Close (timeout - (DateTime.Now - start));
return false;
} catch (TimeoutException) {
message = null;
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpReplyChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpReplyChannel.cs
index 4f6dfdf7fc4..8148012eeb6 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpReplyChannel.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpReplyChannel.cs
@@ -55,13 +55,22 @@ namespace System.ServiceModel.Channels
public override RequestContext ReceiveRequest (TimeSpan timeout)
{
- // It is used while it is already closed.
- if (client == null || !client.Connected)
+ DateTime start = DateTime.Now;
+
+ if (client == null)
return null;
if (timeout <= TimeSpan.Zero)
throw new ArgumentException (String.Format ("Timeout value must be positive value. It was {0}", timeout));
+
+ // FIXME: use timeout
+ if (!frame.ProcessPreambleRecipient ())
+ return null;
+ frame.ProcessPreambleAckRecipient ();
+
var msg = frame.ReadUnsizedMessage (timeout);
+ // LAMESPEC: it contradicts the protocol explanation at section 3.1.1.1.1 in [MC-NMF].
+ // Moving ReadEndRecord() after context's WriteUnsizedMessage() causes TCP connection blocking.
frame.ReadEndRecord ();
return new TcpRequestContext (this, msg);
}
@@ -98,9 +107,8 @@ namespace System.ServiceModel.Channels
DateTime start = DateTime.Now;
owner.frame.WriteUnsizedMessage (message, timeout);
+ // FIXME: consider timeout here too.
owner.frame.WriteEndRecord ();
- owner.client.Close ();
- owner.client = null;
}
}
@@ -110,7 +118,9 @@ namespace System.ServiceModel.Channels
DateTime start = DateTime.Now;
context = ReceiveRequest (timeout);
return context != null;
- } catch (TimeoutException) {
+ } catch (Exception ex) {
+ // FIXME: log it?
+ // Console.WriteLine (ex);
context = null;
return false;
}
@@ -123,19 +133,18 @@ namespace System.ServiceModel.Channels
protected override void OnClose (TimeSpan timeout)
{
+ client.Close ();
+ client = null;
+ base.OnClose (timeout);
}
protected override void OnOpen (TimeSpan timeout)
{
- DateTime start = DateTime.Now;
+ // FIXME: use timeout
if (client == null)
client = ((TcpChannelListener<IReplyChannel>) Manager).AcceptTcpClient (timeout);
-
- // FIXME: use timeout
NetworkStream ns = client.GetStream ();
frame = new TcpBinaryFrameManager (TcpBinaryFrameManager.SingletonUnsizedMode, ns, true) { Encoder = this.Encoder, EncodingRecord = TcpBinaryFrameManager.EncodingBinary };
- frame.ProcessPreambleRecipient ();
- frame.ProcessPreambleAckRecipient ();
}
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpRequestChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpRequestChannel.cs
index 833c0e0ea3f..6ce9f7c6b07 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpRequestChannel.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpRequestChannel.cs
@@ -66,6 +66,7 @@ namespace System.ServiceModel.Channels
protected override void OnOpen (TimeSpan timeout)
{
+ CreateClient (timeout);
}
void CreateClient (TimeSpan timeout)
@@ -78,15 +79,15 @@ namespace System.ServiceModel.Channels
Encoder = this.Encoder,
Via = this.Via,
EncodingRecord = TcpBinaryFrameManager.EncodingBinary };
- frame.ProcessPreambleInitiator ();
- frame.ProcessPreambleAckInitiator ();
}
public override Message Request (Message input, TimeSpan timeout)
{
DateTime start = DateTime.Now;
- CreateClient (timeout);
+ // FIXME: use timeouts.
+ frame.ProcessPreambleInitiator ();
+ frame.ProcessPreambleAckInitiator ();
if (input.Headers.To == null)
input.Headers.To = RemoteAddress.Uri;
@@ -95,6 +96,8 @@ namespace System.ServiceModel.Channels
frame.WriteUnsizedMessage (input, timeout - (DateTime.Now - start));
+ // LAMESPEC: it contradicts the protocol described at section 3.1.1.1.1 in [MC-NMF].
+ // Moving this WriteEndRecord() after ReadUnsizedMessage() causes TCP connection blocking.
frame.WriteEndRecord ();
var ret = frame.ReadUnsizedMessage (timeout - (DateTime.Now - start));
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs
index 2088624ab36..a366b168045 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransportSecurityBindingElement.cs
@@ -36,8 +36,11 @@ using System.ServiceModel.Security.Tokens;
namespace System.ServiceModel.Channels
{
public sealed class TransportSecurityBindingElement
- : SecurityBindingElement,
- ISecurityCapabilities, IPolicyExportExtension
+#if NET_2_1
+ : SecurityBindingElement
+#else
+ : SecurityBindingElement, IPolicyExportExtension
+#endif
{
public TransportSecurityBindingElement ()
{
@@ -47,7 +50,11 @@ namespace System.ServiceModel.Channels
TransportSecurityBindingElement other)
: base (other)
{
- throw new NotImplementedException ();
+ }
+
+ public override BindingElement Clone ()
+ {
+ return new TransportSecurityBindingElement (this);
}
[MonoTODO]
@@ -58,6 +65,7 @@ namespace System.ServiceModel.Channels
throw new NotImplementedException ();
}
+#if !NET_2_1
[MonoTODO]
protected override IChannelListener<TChannel>
BuildChannelListenerCore<TChannel> (
@@ -67,43 +75,11 @@ namespace System.ServiceModel.Channels
}
[MonoTODO]
- public override BindingElement Clone ()
- {
- return new TransportSecurityBindingElement (this);
- }
-
- [MonoTODO]
public override T GetProperty<T> (BindingContext context)
{
throw new NotImplementedException ();
}
- #region explicit interface implementations
- [MonoTODO]
- ProtectionLevel ISecurityCapabilities.SupportedRequestProtectionLevel {
- get { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- ProtectionLevel ISecurityCapabilities.SupportedResponseProtectionLevel {
- get { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- bool ISecurityCapabilities.SupportsClientAuthentication {
- get { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- bool ISecurityCapabilities.SupportsClientWindowsIdentity {
- get { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- bool ISecurityCapabilities.SupportsServerAuthentication {
- get { throw new NotImplementedException (); }
- }
-
[MonoTODO]
void IPolicyExportExtension.ExportPolicy (
MetadataExporter exporter,
@@ -111,6 +87,6 @@ namespace System.ServiceModel.Channels
{
throw new NotImplementedException ();
}
- #endregion
+#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/XmlReaderBodyWriter.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/XmlReaderBodyWriter.cs
index 1e4a185eae8..b2220d1b485 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/XmlReaderBodyWriter.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/XmlReaderBodyWriter.cs
@@ -64,6 +64,8 @@ namespace System.ServiceModel.Channels
protected override void OnWriteBodyContents (
XmlDictionaryWriter writer)
{
+ if (reader == null && String.IsNullOrEmpty (xml))
+ return;
XmlReader r = reader ?? XmlReader.Create (new StringReader (xml));
r.MoveToContent ();
writer.WriteNode (r, false);
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog
index 6139121a97c..3cd44b966f6 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog
@@ -1,3 +1,27 @@
+2009-12-18 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ServiceContractGenerator.cs :
+ EventArgs are not nested classes.
+ Result property of EventArgs is not IAsyncResult. It should be
+ pulled from EndXxx() method, not from BeginXxx().
+
+2009-12-18 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ServiceContractGenerator.cs :
+ add support for EventBasedAsynchronousMethods (3.5 SP1 / 2.1).
+
+2009-12-18 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ServiceMetadataExtension.cs : added a couple of FIXME comments.
+
+2009-12-01 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ClientCredentials.cs : more SL3 changes.
+
+2009-11-25 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ClientCredentials.cs : it is part of SL3 API, so adjusted for it.
+
2009-10-22 Atsushi Enomoto <atsushi@ximian.com>
* ServiceMetadataExtension.cs : channelDispatchers is keyed by URL,
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs
index 0e21b838f88..7aaf39028ce 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ClientCredentials.cs
@@ -27,18 +27,24 @@
//
using System;
using System.Collections.Generic;
-using System.IdentityModel.Selectors;
-using System.IdentityModel.Tokens;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
using System.ServiceModel.Security;
+#if !NET_2_1
+using System.IdentityModel.Selectors;
+using System.IdentityModel.Tokens;
using System.ServiceModel.Security.Tokens;
+#endif
namespace System.ServiceModel.Description
{
public class ClientCredentials
+#if NET_2_1
+ : IEndpointBehavior
+#else
: SecurityCredentialsManager, IEndpointBehavior
+#endif
{
public ClientCredentials ()
{
@@ -50,6 +56,9 @@ namespace System.ServiceModel.Description
throw new NotImplementedException ();
}
+ UserNamePasswordClientCredential userpass =
+ new UserNamePasswordClientCredential ();
+#if !NET_2_1
IssuedTokenClientCredential issued_token =
new IssuedTokenClientCredential ();
HttpDigestClientCredential digest =
@@ -58,8 +67,6 @@ namespace System.ServiceModel.Description
new X509CertificateInitiatorClientCredential ();
X509CertificateRecipientClientCredential recipient =
new X509CertificateRecipientClientCredential ();
- UserNamePasswordClientCredential userpass =
- new UserNamePasswordClientCredential ();
WindowsClientCredential windows =
new WindowsClientCredential ();
PeerCredential peer = new PeerCredential ();
@@ -90,13 +97,14 @@ namespace System.ServiceModel.Description
set { support_interactive = value; }
}
- public UserNamePasswordClientCredential UserName {
- get { return userpass; }
- }
-
public WindowsClientCredential Windows {
get { return windows; }
}
+#endif
+
+ public UserNamePasswordClientCredential UserName {
+ get { return userpass; }
+ }
public ClientCredentials Clone ()
{
@@ -111,6 +119,7 @@ namespace System.ServiceModel.Description
return new ClientCredentials (this);
}
+#if !NET_2_1
public override SecurityTokenManager CreateSecurityTokenManager ()
{
return new ClientCredentialsSecurityTokenManager (this);
@@ -152,5 +161,6 @@ namespace System.ServiceModel.Description
{
// documented as reserved for future use.
}
+#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs
index ff29d0c1a56..f63703a346b 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs
@@ -29,12 +29,15 @@ using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.ComponentModel;
using System.Configuration;
+using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Configuration;
+using System.Threading;
using System.Xml.Schema;
using System.Xml.Serialization;
@@ -103,7 +106,11 @@ namespace System.ServiceModel.Description
}
bool GenerateAsync {
- get { return (options & ServiceContractGenerationOptions.AsynchronousMethods) != 0; }
+ get { return GenerateEventBasedAsync || (options & ServiceContractGenerationOptions.AsynchronousMethods) != 0; }
+ }
+
+ bool GenerateEventBasedAsync {
+ get { return (options & ServiceContractGenerationOptions.EventBasedAsynchronousMethods) != 0; }
}
public Dictionary<ContractDescription,Type> ReferencedTypes {
@@ -255,6 +262,10 @@ namespace System.ServiceModel.Description
// service contract methods
AddImplementationClientMethods (type, cd);
+
+ if (GenerateEventBasedAsync)
+ foreach (var od in cd.Operations)
+ GenerateEventBasedAsyncSupport (type, od, cns);
}
void GenerateChannelInterface (ContractDescription cd, CodeNamespace cns)
@@ -470,6 +481,215 @@ namespace System.ServiceModel.Description
}
}
+ CodeMemberMethod FindByName (CodeTypeDeclaration type, string name)
+ {
+ foreach (var m in type.Members) {
+ var method = m as CodeMemberMethod;
+ if (method != null && method.Name == name)
+ return method;
+ }
+ return null;
+ }
+
+ void GenerateEventBasedAsyncSupport (CodeTypeDeclaration type, OperationDescription od, CodeNamespace cns)
+ {
+ var method = FindByName (type, od.Name) ?? FindByName (type, "Begin" + od.Name);
+ var endMethod = method.Name == od.Name ? null : FindByName (type, "End" + od.Name);
+ bool methodAsync = method.Name.StartsWith ("Begin", StringComparison.Ordinal);
+
+ var thisExpr = new CodeThisReferenceExpression ();
+ var baseExpr = new CodeBaseReferenceExpression ();
+ var nullExpr = new CodePrimitiveExpression (null);
+ var asyncResultType = new CodeTypeReference (typeof (IAsyncResult));
+
+ // OnBeginXxx() implementation
+ var cm = new CodeMemberMethod () {
+ Name = "OnBegin" + od.Name,
+ Attributes = MemberAttributes.Private | MemberAttributes.Final,
+ ReturnType = asyncResultType
+ };
+ type.Members.Add (cm);
+
+ AddMethodParam (cm, typeof (object []), "args");
+ AddMethodParam (cm, typeof (AsyncCallback), "asyncCallback");
+ AddMethodParam (cm, typeof (object), "userState");
+
+ var call = new CodeMethodInvokeExpression (
+ thisExpr,
+ "Begin" + od.Name);
+ for (int idx = 0; idx < method.Parameters.Count - (methodAsync ? 2 : 0); idx++) {
+ var p = method.Parameters [idx];
+ cm.Statements.Add (new CodeVariableDeclarationStatement (p.Type, p.Name, new CodeCastExpression (p.Type, new CodeArrayIndexerExpression (new CodeArgumentReferenceExpression ("args"), new CodePrimitiveExpression (idx)))));
+ call.Parameters.Add (new CodeVariableReferenceExpression (p.Name));
+ }
+ call.Parameters.Add (new CodeArgumentReferenceExpression ("asyncCallback"));
+ call.Parameters.Add (new CodeArgumentReferenceExpression ("userState"));
+ cm.Statements.Add (new CodeMethodReturnStatement (call));
+
+ // OnEndXxx() implementation
+ cm = new CodeMemberMethod () {
+ Name = "OnEnd" + od.Name,
+ Attributes = MemberAttributes.Private | MemberAttributes.Final,
+ ReturnType = new CodeTypeReference (typeof (object [])) };
+ type.Members.Add (cm);
+
+ AddMethodParam (cm, typeof (IAsyncResult), "result");
+
+ var outArgRefs = new List<CodeVariableReferenceExpression> ();
+
+ for (int idx = 0; idx < method.Parameters.Count; idx++) {
+ var p = method.Parameters [idx];
+ if (p.Direction != FieldDirection.In) {
+ cm.Statements.Add (new CodeVariableDeclarationStatement (p.Type, p.Name));
+ outArgRefs.Add (new CodeVariableReferenceExpression (p.Name)); // FIXME: should this work? They need "out" or "ref" modifiers.
+ }
+ }
+
+ call = new CodeMethodInvokeExpression (
+ thisExpr,
+ "End" + od.Name,
+ new CodeArgumentReferenceExpression ("result"));
+ call.Parameters.AddRange (outArgRefs.Cast<CodeExpression> ().ToArray ()); // questionable
+
+ cm.Statements.Add (new CodeVariableDeclarationStatement (typeof (object), "__ret", call));
+ var retCreate = new CodeArrayCreateExpression (typeof (object));
+ retCreate.Initializers.Add (new CodeVariableReferenceExpression ("__ret"));
+ foreach (var outArgRef in outArgRefs)
+ retCreate.Initializers.Add (new CodeVariableReferenceExpression (outArgRef.VariableName));
+
+ cm.Statements.Add (new CodeMethodReturnStatement (retCreate));
+
+ // OnXxxCompleted() implementation
+ cm = new CodeMemberMethod () {
+ Name = "On" + od.Name + "Completed",
+ Attributes = MemberAttributes.Private | MemberAttributes.Final };
+ type.Members.Add (cm);
+
+ AddMethodParam (cm, typeof (object), "state");
+
+ var iaargs = new CodeTypeReference ("InvokeAsyncCompletedEventArgs"); // avoid messy System.Type instance for generic nested type :|
+ var iaref = new CodeVariableReferenceExpression ("args");
+ var methodEventArgs = new CodeObjectCreateExpression (new CodeTypeReference (od.Name + "CompletedEventArgs"),
+ new CodePropertyReferenceExpression (iaref, "Results"),
+ new CodePropertyReferenceExpression (iaref, "Error"),
+ new CodePropertyReferenceExpression (iaref, "Cancelled"),
+ new CodePropertyReferenceExpression (iaref, "UserState"));
+ cm.Statements.Add (new CodeConditionStatement (
+ new CodeBinaryOperatorExpression (
+ new CodeEventReferenceExpression (thisExpr, od.Name + "Completed"), CodeBinaryOperatorType.IdentityInequality, nullExpr),
+ new CodeVariableDeclarationStatement (iaargs, "args", new CodeCastExpression (iaargs, new CodeArgumentReferenceExpression ("state"))),
+ new CodeExpressionStatement (new CodeMethodInvokeExpression (thisExpr, od.Name + "Completed", thisExpr, methodEventArgs))));
+
+ // delegate fields
+ type.Members.Add (new CodeMemberField (new CodeTypeReference ("BeginOperationDelegate"), "onBegin" + od.Name + "Delegate"));
+ type.Members.Add (new CodeMemberField (new CodeTypeReference ("EndOperationDelegate"), "onEnd" + od.Name + "Delegate"));
+ type.Members.Add (new CodeMemberField (new CodeTypeReference (typeof (SendOrPostCallback)), "on" + od.Name + "CompletedDelegate"));
+
+ // XxxCompletedEventArgs class
+ var argsType = new CodeTypeDeclaration (od.Name + "CompletedEventArgs");
+ argsType.BaseTypes.Add (new CodeTypeReference (typeof (AsyncCompletedEventArgs)));
+ cns.Types.Add (argsType);
+
+ var argsCtor = new CodeConstructor () {
+ Attributes = MemberAttributes.Public | MemberAttributes.Final };
+ argsCtor.Parameters.Add (new CodeParameterDeclarationExpression (typeof (object []), "results"));
+ argsCtor.Parameters.Add (new CodeParameterDeclarationExpression (typeof (Exception), "error"));
+ argsCtor.Parameters.Add (new CodeParameterDeclarationExpression (typeof (bool), "cancelled"));
+ argsCtor.Parameters.Add (new CodeParameterDeclarationExpression (typeof (object), "userState"));
+ argsCtor.BaseConstructorArgs.Add (new CodeArgumentReferenceExpression ("error"));
+ argsCtor.BaseConstructorArgs.Add (new CodeArgumentReferenceExpression ("cancelled"));
+ argsCtor.BaseConstructorArgs.Add (new CodeArgumentReferenceExpression ("userState"));
+ var resultsField = new CodeFieldReferenceExpression (thisExpr, "results");
+ argsCtor.Statements.Add (new CodeAssignStatement (resultsField, new CodeArgumentReferenceExpression ("results")));
+ argsType.Members.Add (argsCtor);
+
+ argsType.Members.Add (new CodeMemberField (typeof (object []), "results"));
+
+ var resultProp = new CodeMemberProperty {
+ Name = "Result",
+ Type = endMethod != null ? endMethod.ReturnType : method.ReturnType,
+ Attributes = MemberAttributes.Public | MemberAttributes.Final };
+ resultProp.GetStatements.Add (new CodeMethodReturnStatement (new CodeCastExpression (resultProp.Type, new CodeArrayIndexerExpression (resultsField, new CodePrimitiveExpression (0)))));
+ argsType.Members.Add (resultProp);
+
+ // event field
+ var handlerType = new CodeTypeReference (typeof (EventHandler<>));
+ handlerType.TypeArguments.Add (new CodeTypeReference (argsType.Name));
+ type.Members.Add (new CodeMemberEvent () {
+ Name = od.Name + "Completed",
+ Type = handlerType,
+ Attributes = MemberAttributes.Public | MemberAttributes.Final });
+
+ // XxxAsync() implementations
+ bool hasAsync = false;
+ foreach (int __x in Enumerable.Range (0, 2)) {
+ cm = new CodeMemberMethod ();
+ type.Members.Add (cm);
+ cm.Name = od.Name + "Async";
+ cm.Attributes = MemberAttributes.Public
+ | MemberAttributes.Final;
+
+ var inArgs = new List<CodeParameterDeclarationExpression > ();
+
+ for (int idx = 0; idx < method.Parameters.Count - (methodAsync ? 2 : 0); idx++) {
+ var pd = method.Parameters [idx];
+ inArgs.Add (pd);
+ cm.Parameters.Add (pd);
+ }
+
+ // First one is overload without asyncState arg.
+ if (!hasAsync) {
+ call = new CodeMethodInvokeExpression (thisExpr, cm.Name, inArgs.ConvertAll<CodeExpression> (decl => new CodeArgumentReferenceExpression (decl.Name)).ToArray ());
+ call.Parameters.Add (nullExpr);
+ cm.Statements.Add (new CodeExpressionStatement (call));
+ hasAsync = true;
+ continue;
+ }
+
+ // Second one is the primary one.
+
+ cm.Parameters.Add (new CodeParameterDeclarationExpression (typeof (object), "userState"));
+
+ // if (onBeginBarOperDelegate == null) onBeginBarOperDelegate = new BeginOperationDelegate (OnBeginBarOper);
+ // if (onEndBarOperDelegate == null) onEndBarOperDelegate = new EndOperationDelegate (OnEndBarOper);
+ // if (onBarOperCompletedDelegate == null) onBarOperCompletedDelegate = new BeginOperationDelegate (OnBarOperCompleted);
+ var beginOperDelegateRef = new CodeFieldReferenceExpression (thisExpr, "onBegin" + od.Name + "Delegate");
+ var endOperDelegateRef = new CodeFieldReferenceExpression (thisExpr, "onEnd" + od.Name + "Delegate");
+ var operCompletedDelegateRef = new CodeFieldReferenceExpression (thisExpr, "on" + od.Name + "CompletedDelegate");
+
+ var ifstmt = new CodeConditionStatement (
+ new CodeBinaryOperatorExpression (beginOperDelegateRef, CodeBinaryOperatorType.IdentityEquality, nullExpr),
+ new CodeAssignStatement (beginOperDelegateRef, new CodeDelegateCreateExpression (new CodeTypeReference ("BeginOperationDelegate"), thisExpr, "OnBegin" + od.Name)));
+ cm.Statements.Add (ifstmt);
+ ifstmt = new CodeConditionStatement (
+ new CodeBinaryOperatorExpression (endOperDelegateRef, CodeBinaryOperatorType.IdentityEquality, nullExpr),
+ new CodeAssignStatement (endOperDelegateRef, new CodeDelegateCreateExpression (new CodeTypeReference ("EndOperationDelegate"), thisExpr, "OnEnd" + od.Name)));
+ cm.Statements.Add (ifstmt);
+ ifstmt = new CodeConditionStatement (
+ new CodeBinaryOperatorExpression (operCompletedDelegateRef, CodeBinaryOperatorType.IdentityEquality, nullExpr),
+ new CodeAssignStatement (operCompletedDelegateRef, new CodeDelegateCreateExpression (new CodeTypeReference (typeof (SendOrPostCallback)), thisExpr, "On" + od.Name + "Completed")));
+ cm.Statements.Add (ifstmt);
+
+ // InvokeAsync (onBeginBarOperDelegate, inValues, onEndBarOperDelegate, onBarOperCompletedDelegate, userState);
+
+ inArgs.Add (new CodeParameterDeclarationExpression (typeof (object), "userState"));
+
+ var args = new List<CodeExpression> ();
+ args.Add (beginOperDelegateRef);
+ args.Add (new CodeArrayCreateExpression (typeof (object), inArgs.ConvertAll<CodeExpression> (decl => new CodeArgumentReferenceExpression (decl.Name)).ToArray ()));
+ args.Add (endOperDelegateRef);
+ args.Add (new CodeFieldReferenceExpression (thisExpr, "on" + od.Name + "CompletedDelegate"));
+ args.Add (new CodeArgumentReferenceExpression ("userState"));
+ call = new CodeMethodInvokeExpression (baseExpr, "InvokeAsync", args.ToArray ());
+ cm.Statements.Add (new CodeExpressionStatement (call));
+ }
+ }
+
+ void AddMethodParam (CodeMemberMethod cm, Type type, string name)
+ {
+ cm.Parameters.Add (new CodeParameterDeclarationExpression (new CodeTypeReference (type), name));
+ }
+
private CodeExpression[] ExportMessages (MessageDescriptionCollection messages, CodeMemberMethod method, bool return_args)
{
CodeExpression [] args = null;
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataExtension.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataExtension.cs
index a009641a2ec..36b7fdc8f63 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataExtension.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataExtension.cs
@@ -93,6 +93,9 @@ namespace System.ServiceModel.Description
}
// FIXME: distinguish HTTP and HTTPS in the Url properties.
+ // FIXME: reject such ServiceDescription that has no HTTP(S) binding.
+ // FIXME: it should not use the binding that is used in the ServiceEndpoint. For example, WSDL results have to be given as text, not binary.
+ // FIXME: if the ServiceDescription has a base address (e.g. http://localhost:8080) and HttpGetUrl is empty, it returns UnknownDestination while it is expected to return the HTTP help page.
internal void EnsureChannelDispatcher (bool isMex, string scheme, Uri uri, WCFBinding binding)
{
if (isMex)
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
index e5c20bd2937..568c7bf9fc4 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
@@ -1,3 +1,39 @@
+2010-01-07 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ChannelDispatcher.cs : make sure to unlock channel acceptor wait
+ handle when the delegated method resulted in an error.
+
+2009-12-26 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ChannelDispatcher.cs : close such channels that failed to receive
+ request or input.
+
+2009-12-26 Atsushi Enomoto <atsushi@ximian.com>
+
+ * DispatchRuntime.cs : shortened code and scattered monotodos.
+
+2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * OperationInvokerHandler.cs : fix async operation handling. Since
+ the entire handler chain is designed to be in synchronous, one
+ single handler must not leave its work incomplete (async). Just
+ wait for the async process completion within the handler.
+
+2009-12-07 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ChannelDispatcher.cs : fix regression; ServiceBehaviorAttribute
+ could be set explicitly null.
+
+2009-12-07 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ChannelDispatcher.cs : handle AddressFilterMode (.Any only yet).
+ * OperationInvokerHandler.cs : fix wrong IAsyncResult use.
+
+2009-12-07 Atsushi Enomoto <atsushi@ximian.com>
+
+ * InstanceBehavior.cs : allow nonpublic instance.
+ * DefaultOperationInvoker.cs : do use IsSynchronous correctly.
+
2009-10-22 Atsushi Enomoto <atsushi@ximian.com>
* ChannelDispatcher.cs : disable concurrent channel acceptance
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs
index 71eb8a7f14f..3d467dcccd2 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs
@@ -334,10 +334,14 @@ namespace System.ServiceModel.Dispatcher
TimeSpan close_timeout;
Func<IAsyncResult> channel_acceptor;
List<IChannel> channels = new List<IChannel> ();
+ AddressFilterMode address_filter_mode;
public ListenerLoopManager (ChannelDispatcher owner)
{
this.owner = owner;
+ var sba = owner.Host != null ? owner.Host.Description.Behaviors.Find<ServiceBehaviorAttribute> () : null;
+ if (sba != null)
+ address_filter_mode = sba.AddressFilterMode;
}
public void Setup (TimeSpan openTimeout)
@@ -374,6 +378,7 @@ namespace System.ServiceModel.Dispatcher
} catch (Exception ex) {
Console.WriteLine ("Exception during finishing channel acceptance.");
Console.WriteLine (ex);
+ creator_handle.Set ();
}
};
return delegate {
@@ -543,6 +548,8 @@ namespace System.ServiceModel.Dispatcher
var reply = (IReplyChannel) result.AsyncState;
if (reply.EndTryReceiveRequest (result, out rc))
ProcessRequest (reply, rc);
+ else
+ reply.Close ();
}
void TryReceiveDone (IAsyncResult result)
@@ -551,6 +558,8 @@ namespace System.ServiceModel.Dispatcher
var input = (IInputChannel) result.AsyncState;
if (input.EndTryReceive (result, out msg))
ProcessInput (input, msg);
+ else
+ input.Close ();
}
void SendEndpointNotFound (RequestContext rc, EndpointNotFoundException ex)
@@ -623,9 +632,11 @@ namespace System.ServiceModel.Dispatcher
bool MessageMatchesEndpointDispatcher (Message req, EndpointDispatcher endpoint)
{
+ // FIXME: handle AddressFilterMode.Prefix too.
+
Uri to = req.Headers.To;
if (to == null)
- return false;
+ return address_filter_mode == AddressFilterMode.Any;
if (to.AbsoluteUri == Constants.WsaAnonymousUri)
return false;
return endpoint.AddressFilter.Match (req) && endpoint.ContractFilter.Match (req);
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DefaultOperationInvoker.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DefaultOperationInvoker.cs
index 5568ff91ae0..27ecfce48e3 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DefaultOperationInvoker.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DefaultOperationInvoker.cs
@@ -38,10 +38,12 @@ namespace System.ServiceModel.Dispatcher
{
readonly OperationDescription od;
readonly ParameterInfo [] in_params, out_params;
+ readonly bool is_synchronous;
public DefaultOperationInvoker (OperationDescription od)
{
this.od = od;
+ is_synchronous = od.SyncMethod != null;
var mi = od.SyncMethod ?? od.BeginMethod;
var il = new List<ParameterInfo> ();
var ol = new List<ParameterInfo> ();
@@ -59,7 +61,7 @@ namespace System.ServiceModel.Dispatcher
}
public bool IsSynchronous {
- get { return true; }
+ get { return is_synchronous; }
}
public object [] AllocateInputs ()
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs
index 758f54a590a..025526b2ebc 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs
@@ -39,74 +39,44 @@ using System.Web.Security;
namespace System.ServiceModel.Dispatcher
{
- [MonoTODO]
public sealed class DispatchRuntime
{
- EndpointDispatcher endpoint_dispatcher;
- AuditLogLocation audit_log_location;
- bool automatic_input_session_shutdown = true;
- bool suppress_audio_failure = true;
- bool completes_tx_on_close, ignore_tx_msg_props, inpersonate;
- bool release_tx_complete;
- bool validate_must_understand = true;
ClientRuntime callback_client_runtime;
- ConcurrencyMode concurrency_mode;
- InstanceContext instance_context;
- IInstanceProvider instance_provider;
- IInstanceContextProvider instance_context_provider;
- AuditLevel msg_auth_audit_level, svc_auth_audit_level;
- IDispatchOperationSelector operation_selector;
- PrincipalPermissionMode perm_mode =
- PrincipalPermissionMode.UseWindowsGroups;
- SynchronizationContext sync_context;
- Type type;
- DispatchOperation unhandled_dispatch_oper;
- RoleProvider role_provider;
- ServiceAuthorizationManager auth_manager;
-
- SynchronizedCollection<IInputSessionShutdown>
- shutdown_handlers =
- new SynchronizedCollection<IInputSessionShutdown> ();
- SynchronizedCollection<IInstanceContextInitializer>
- inst_ctx_initializers =
- new SynchronizedCollection<IInstanceContextInitializer> ();
- SynchronizedCollection<IDispatchMessageInspector>
- msg_inspectors =
- new SynchronizedCollection<IDispatchMessageInspector> ();
+
DispatchOperation.DispatchOperationCollection operations =
new DispatchOperation.DispatchOperationCollection ();
- ReadOnlyCollection<IAuthorizationPolicy> ext_auth_policies;
internal DispatchRuntime (EndpointDispatcher dispatcher)
{
- endpoint_dispatcher = dispatcher;
- unhandled_dispatch_oper = new DispatchOperation (
+ EndpointDispatcher = dispatcher;
+ UnhandledDispatchOperation = new DispatchOperation (
this, "*", "*", "*");
- }
- public AuditLogLocation SecurityAuditLogLocation {
- get { return audit_log_location; }
- set { audit_log_location = value; }
- }
+ AutomaticInputSessionShutdown = true;
+ PrincipalPermissionMode = PrincipalPermissionMode.UseWindowsGroups; // silly default value for us.
+ SuppressAuditFailure = true;
+ ValidateMustUnderstand = true;
- public bool AutomaticInputSessionShutdown {
- get { return automatic_input_session_shutdown; }
- set { automatic_input_session_shutdown = value; }
+ InputSessionShutdownHandlers = new SynchronizedCollection<IInputSessionShutdown> ();
+ InstanceContextInitializers = new SynchronizedCollection<IInstanceContextInitializer> ();
+ MessageInspectors = new SynchronizedCollection<IDispatchMessageInspector> ();
}
+ [MonoTODO]
+ public AuditLogLocation SecurityAuditLogLocation { get; set; }
+
+ [MonoTODO]
+ public bool AutomaticInputSessionShutdown { get; set; }
+
public ChannelDispatcher ChannelDispatcher {
- get { return endpoint_dispatcher.ChannelDispatcher; }
+ get { return EndpointDispatcher.ChannelDispatcher; }
}
- public ConcurrencyMode ConcurrencyMode {
- get { return concurrency_mode; }
- set { concurrency_mode = value; }
- }
+ [MonoTODO]
+ public ConcurrencyMode ConcurrencyMode { get; set; }
- public EndpointDispatcher EndpointDispatcher {
- get { return endpoint_dispatcher; }
- }
+ public EndpointDispatcher EndpointDispatcher { get; private set; }
// FIXME: this is somewhat compromized solution to workaround
// an issue that this runtime-creation-logic could result in
@@ -125,116 +95,66 @@ namespace System.ServiceModel.Dispatcher
internal set { callback_client_runtime = value; }
}
- public ReadOnlyCollection<IAuthorizationPolicy> ExternalAuthorizationPolicies {
- get { return ext_auth_policies; }
- set { ext_auth_policies = value; }
- }
+ [MonoTODO]
+ public ReadOnlyCollection<IAuthorizationPolicy> ExternalAuthorizationPolicies { get; set; }
- public bool IgnoreTransactionMessageProperty {
- get { return ignore_tx_msg_props; }
- set { ignore_tx_msg_props = value; }
- }
+ [MonoTODO]
+ public bool IgnoreTransactionMessageProperty { get; set; }
- public bool ImpersonateCallerForAllOperations {
- get { return inpersonate; }
- set { inpersonate = value; }
- }
+ [MonoTODO]
+ public bool ImpersonateCallerForAllOperations { get; set; }
- public SynchronizedCollection<IInputSessionShutdown>
- InputSessionShutdownHandlers {
- get { return shutdown_handlers; }
- }
+ [MonoTODO]
+ public SynchronizedCollection<IInputSessionShutdown> InputSessionShutdownHandlers { get; private set; }
- public SynchronizedCollection<IInstanceContextInitializer> InstanceContextInitializers {
- get { return inst_ctx_initializers; }
- }
+ [MonoTODO]
+ public SynchronizedCollection<IInstanceContextInitializer> InstanceContextInitializers { get; private set; }
- public IInstanceProvider InstanceProvider {
- get { return instance_provider; }
- set { instance_provider = value; }
- }
+ public IInstanceProvider InstanceProvider { get; set; }
- public IInstanceContextProvider InstanceContextProvider {
- get { return instance_context_provider; }
- set { instance_context_provider = value; }
- }
+ public IInstanceContextProvider InstanceContextProvider { get; set; }
- public AuditLevel MessageAuthenticationAuditLevel {
- get { return msg_auth_audit_level; }
- set { msg_auth_audit_level = value; }
- }
+ [MonoTODO]
+ public AuditLevel MessageAuthenticationAuditLevel { get; set; }
- public SynchronizedCollection<IDispatchMessageInspector> MessageInspectors {
- get { return msg_inspectors; }
- }
+ public SynchronizedCollection<IDispatchMessageInspector> MessageInspectors { get; private set; }
public SynchronizedKeyedCollection<string,DispatchOperation> Operations {
get { return operations; }
}
- public IDispatchOperationSelector OperationSelector {
- get { return operation_selector; }
- set { operation_selector = value; }
- }
+ public IDispatchOperationSelector OperationSelector { get; set; }
- public PrincipalPermissionMode PrincipalPermissionMode {
- get { return perm_mode; }
- set { perm_mode = value; }
- }
+ [MonoTODO]
+ public PrincipalPermissionMode PrincipalPermissionMode { get; set; }
- public bool ReleaseServiceInstanceOnTransactionComplete {
- get { return release_tx_complete; }
- set { release_tx_complete = value; }
- }
+ [MonoTODO]
+ public bool ReleaseServiceInstanceOnTransactionComplete { get; set; }
- public RoleProvider RoleProvider {
- get { return role_provider; }
- set { role_provider = value; }
- }
+ [MonoTODO]
+ public RoleProvider RoleProvider { get; set; }
- public AuditLevel ServiceAuthorizationAuditLevel {
- get { return svc_auth_audit_level; }
- set { svc_auth_audit_level = value; }
- }
+ [MonoTODO]
+ public AuditLevel ServiceAuthorizationAuditLevel { get; set; }
- public ServiceAuthorizationManager ServiceAuthorizationManager {
- get { return auth_manager; }
- set { auth_manager = value; }
- }
+ [MonoTODO]
+ public ServiceAuthorizationManager ServiceAuthorizationManager { get; set; }
- public InstanceContext SingletonInstanceContext {
- get { return instance_context; }
- set { instance_context = value; }
- }
+ public InstanceContext SingletonInstanceContext { get; set; }
- public bool SuppressAuditFailure {
- get { return suppress_audio_failure; }
- set { suppress_audio_failure = value; }
- }
+ [MonoTODO]
+ public bool SuppressAuditFailure { get; set; }
- public SynchronizationContext SynchronizationContext {
- get { return sync_context; }
- set { sync_context = value; }
- }
+ [MonoTODO]
+ public SynchronizationContext SynchronizationContext { get; set; }
- public bool TransactionAutoCompleteOnSessionClose {
- get { return completes_tx_on_close; }
- set { completes_tx_on_close = value; }
- }
+ [MonoTODO]
+ public bool TransactionAutoCompleteOnSessionClose { get; set; }
- public Type Type {
- get { return type; }
- set { type = value; }
- }
+ public Type Type { get; set; }
- public DispatchOperation UnhandledDispatchOperation {
- get { return unhandled_dispatch_oper; }
- set { unhandled_dispatch_oper = value; }
- }
+ public DispatchOperation UnhandledDispatchOperation { get; set; }
- public bool ValidateMustUnderstand {
- get { return validate_must_understand; }
- set { validate_must_understand = value; }
- }
+ public bool ValidateMustUnderstand { get; set; }
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/InstanceBehavior.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/InstanceBehavior.cs
index f3dd48fdf7a..1574c6c98ea 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/InstanceBehavior.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/InstanceBehavior.cs
@@ -1,5 +1,6 @@
-ļ»æusing System;
+using System;
using System.Collections.Generic;
+using System.Reflection;
using System.ServiceModel;
using System.ServiceModel.Dispatcher;
using System.ServiceModel.Channels;
@@ -34,7 +35,7 @@ namespace System.ServiceModel.Dispatcher
}
createdByUserProvider = false;
return Activator.CreateInstance (
- dispatch_runtime.ChannelDispatcher.Host.Description.ServiceType);
+ dispatch_runtime.ChannelDispatcher.Host.Description.ServiceType, true);
}
internal IInstanceContextProvider InstanceContextProvider {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/OperationInvokerHandler.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/OperationInvokerHandler.cs
index c016087a68f..f5504c8c181 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/OperationInvokerHandler.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/OperationInvokerHandler.cs
@@ -4,6 +4,7 @@ using System.Text;
using System.ServiceModel.Channels;
using System.ServiceModel;
using System.Reflection;
+using System.Threading;
namespace System.ServiceModel.Dispatcher
{
@@ -24,8 +25,6 @@ namespace System.ServiceModel.Dispatcher
mrc.Operation = operation;
try {
DoProcessRequest (mrc);
- if (!operation.Invoker.IsSynchronous)
- return true;
if (!mrc.Operation.IsOneWay)
Reply (mrc, true);
} catch (TargetInvocationException ex) {
@@ -49,30 +48,11 @@ namespace System.ServiceModel.Dispatcher
if (operation.Invoker.IsSynchronous) {
object result = operation.Invoker.Invoke (instance, parameters, out outParams);
HandleInvokeResult (mrc, outParams, result);
- } else {// asynchronous
- InvokeAsynchronous (mrc, instance, parameters);
- }
- }
-
- void InvokeAsynchronous (MessageProcessingContext mrc, object instance, object [] parameters)
- {
- DispatchOperation operation = mrc.Operation;
- DispatchRuntime dispatchRuntime = mrc.OperationContext.EndpointDispatcher.DispatchRuntime;
- operation.Invoker.InvokeBegin (instance, parameters,
- delegate (IAsyncResult res) {
- try {
- object result;
- result = operation.Invoker.InvokeEnd (instance, out parameters, res);
- HandleInvokeResult (mrc, parameters, result);
- Reply (mrc, true);
- } catch (Exception ex) {
- mrc.ReplyMessage = BuildExceptionMessage (mrc, ex, dispatchRuntime.ChannelDispatcher.IncludeExceptionDetailInFaults);
- if (!mrc.Operation.IsOneWay)
- Reply (mrc, false);
- ProcessCustomErrorHandlers (mrc, ex);
- }
- },
- null);
+ } else {
+ var ar = operation.Invoker.InvokeBegin (instance, parameters, null, null);
+ object result = operation.Invoker.InvokeEnd (instance, out outParams, ar);
+ HandleInvokeResult (mrc, outParams, result);
+ }
}
void Reply (MessageProcessingContext mrc, bool useTimeout)
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs b/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
index 73065cf8f8b..262abe47914 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
@@ -369,6 +369,7 @@ namespace System.ServiceModel.Description
InternalTypes = 4,
ClientClass = 8,
TypedMessages = 16,
+ EventBasedAsynchronousMethods = 32,
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs
index 5a665d25dea..e805b0fc0a6 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs
@@ -27,6 +27,7 @@
//
using System;
using System.Collections.Generic;
+using System.Net;
using System.Net.Security;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
@@ -178,14 +179,17 @@ namespace System.ServiceModel
switch (Security.Mode) {
#if !NET_2_1
case BasicHttpSecurityMode.Message:
- case BasicHttpSecurityMode.TransportWithMessageCredential:
if (Security.Message.ClientCredentialType != BasicHttpMessageCredentialType.Certificate)
throw new InvalidOperationException ("When Message security is enabled in a BasicHttpBinding, the message security credential type must be BasicHttpMessageCredentialType.Certificate.");
- return new BindingElementCollection (new BindingElement [] {
+ goto case BasicHttpSecurityMode.TransportWithMessageCredential;
+ case BasicHttpSecurityMode.TransportWithMessageCredential:
+ SecurityBindingElement sec;
+ if (Security.Message.ClientCredentialType != BasicHttpMessageCredentialType.Certificate)
// FIXME: pass proper security token parameters.
- new AsymmetricSecurityBindingElement (),
- BuildMessageEncodingBindingElement (),
- GetTransport ()});
+ sec = SecurityBindingElement.CreateCertificateOverTransportBindingElement ();
+ else
+ sec = new AsymmetricSecurityBindingElement ();
+ return new BindingElementCollection (new BindingElement [] {sec, BuildMessageEncodingBindingElement (), GetTransport ()});
#endif
default:
return new BindingElementCollection (new BindingElement [] {
@@ -216,30 +220,59 @@ namespace System.ServiceModel
TransportBindingElement GetTransport ()
{
- HttpTransportBindingElement transportBindingElement;
+ HttpTransportBindingElement h;
switch (Security.Mode) {
case BasicHttpSecurityMode.Transport:
case BasicHttpSecurityMode.TransportWithMessageCredential:
- transportBindingElement
- = new HttpsTransportBindingElement ();
+ h = new HttpsTransportBindingElement ();
break;
default:
- transportBindingElement
- = new HttpTransportBindingElement ();
+ h = new HttpTransportBindingElement ();
break;
}
- transportBindingElement.AllowCookies = AllowCookies;
- transportBindingElement.BypassProxyOnLocal = BypassProxyOnLocal;
- transportBindingElement.HostNameComparisonMode = HostNameComparisonMode;
- transportBindingElement.MaxBufferPoolSize = MaxBufferPoolSize;
- transportBindingElement.MaxBufferSize = MaxBufferSize;
- transportBindingElement.MaxReceivedMessageSize = MaxReceivedMessageSize;
- transportBindingElement.ProxyAddress = ProxyAddress;
- transportBindingElement.UseDefaultWebProxy = UseDefaultWebProxy;
- transportBindingElement.TransferMode = TransferMode;
-
- return transportBindingElement;
+ h.AllowCookies = AllowCookies;
+ h.BypassProxyOnLocal = BypassProxyOnLocal;
+ h.HostNameComparisonMode = HostNameComparisonMode;
+ h.MaxBufferPoolSize = MaxBufferPoolSize;
+ h.MaxBufferSize = MaxBufferSize;
+ h.MaxReceivedMessageSize = MaxReceivedMessageSize;
+ h.ProxyAddress = ProxyAddress;
+ h.UseDefaultWebProxy = UseDefaultWebProxy;
+ h.TransferMode = TransferMode;
+
+#if !NET_2_1
+ switch (Security.Mode) {
+ case BasicHttpSecurityMode.Transport:
+ switch (Security.Transport.ClientCredentialType) {
+ case HttpClientCredentialType.Certificate:
+ var https = (HttpsTransportBindingElement) h;
+ https.RequireClientCertificate = true;
+ break;
+ }
+ break;
+ case BasicHttpSecurityMode.TransportCredentialOnly:
+ switch (Security.Transport.ClientCredentialType) {
+ case HttpClientCredentialType.Basic:
+ h.AuthenticationScheme = AuthenticationSchemes.Basic;
+ break;
+ case HttpClientCredentialType.Ntlm:
+ h.AuthenticationScheme = AuthenticationSchemes.Ntlm;
+ break;
+ case HttpClientCredentialType.Windows:
+ h.AuthenticationScheme = AuthenticationSchemes.Negotiate;
+ break;
+ case HttpClientCredentialType.Digest:
+ h.AuthenticationScheme = AuthenticationSchemes.Digest;
+ break;
+ case HttpClientCredentialType.Certificate:
+ throw new InvalidOperationException ("Certificate-based client authentication is not supported by 'TransportCredentialOnly' mode.");
+ }
+ break;
+ }
+#endif
+
+ return h;
}
// explicit interface implementations
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog b/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
index a9a0d288064..814a061a3b2 100755
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
@@ -1,10 +1,32 @@
+2009-12-18 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ClientBase.cs : remove extra CWLs.
+
+2009-12-18 Atsushi Enomoto <atsushi@ximian.com>
+
+ * AllEnums.cs :
+ added ServiceContractGenerationOptions.EventBasedAsynchronousMethods.
+
+2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ClientRuntimeChannel.cs : a bit more kindful error message.
+ * ClientProxyGenerator.cs : fix async parameter offset.
+
+2009-12-07 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ServiceHostBase.cs : in AddBaseAddress(), use base_addresses
+ instead of Description. It could be called in InitializeDescription.
+
+2009-12-03 Atsushi Enomoto <atsushi@ximian.com>
+
+ * BasicHttpBinding.cs : handle transport security properties.
+
2009-12-02 Sebastien Pouliot <sebastien@ximian.com>
* CommunicationObjectAbortedException.cs, ServerTooBusyException.cs,
ServiceActivationException.cs: Fix base class
* ServiceKnownTypeAttribute.cs: Seal type and add missing
[AttributeUsage] attribute
- [Backport r147513]
2009-12-01 Atsushi Enomoto <atsushi@ximian.com>
@@ -12,9 +34,18 @@
2009-12-01 Atsushi Enomoto <atsushi@ximian.com>
+ * ClientBase.cs, ChannelFactory_1.cs, ChannelFactory.cs :
+ more SL3 changes.
+
+2009-12-01 Atsushi Enomoto <atsushi@ximian.com>
+
* SilverlightClientConfigLoader.cs : do not enter infinite loop at
empty <binding> element.
+2009-11-25 Atsushi Enomoto <atsushi@ximian.com>
+
+ * EndpointAddress10.cs : added it to the 2.1 build for SL3 API.
+
2009-11-05 Geoff Norton <gnorton@novell.com>
* ClientRuntimeChannel.cs: Support OperationContext in async calls
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
index 996e70cbc86..c59abe44320 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
@@ -67,11 +67,9 @@ namespace System.ServiceModel
get { return service_endpoint; }
}
-#if !NET_2_1
public ClientCredentials Credentials {
get { return Endpoint.Behaviors.Find<ClientCredentials> (); }
}
-#endif
protected internal override TimeSpan DefaultCloseTimeout {
get { return Endpoint.Binding.CloseTimeout; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs
index a16b5850756..4eab5c3347b 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs
@@ -154,9 +154,7 @@ namespace System.ServiceModel
{
ContractDescription cd = ContractDescription.GetContract (typeof (TChannel));
ServiceEndpoint ep = new ServiceEndpoint (cd);
-#if !NET_2_1
ep.Behaviors.Add (new ClientCredentials ());
-#endif
return ep;
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
index 3c13bbfc824..13f66b28ec1 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
@@ -173,11 +173,9 @@ namespace System.ServiceModel
}
}
-#if !NET_2_1
public ClientCredentials ClientCredentials {
get { return ChannelFactory.Credentials; }
}
-#endif
public ServiceEndpoint Endpoint {
get { return factory.Endpoint; }
@@ -234,9 +232,9 @@ namespace System.ServiceModel
EventHandler a = delegate {
try {
callback (args);
- Console.WriteLine ("ClientBase<TChannel>: operationCompletedCallback is successfully done (unless the callback has further async operations)");
+ //Console.WriteLine ("ClientBase<TChannel>: operationCompletedCallback is successfully done (unless the callback has further async operations)");
} catch (Exception ex) {
- Console.WriteLine ("ClientBase<TChannel> caught an error during operationCompletedCallback: " + ex);
+ //Console.WriteLine ("ClientBase<TChannel> caught an error during operationCompletedCallback: " + ex);
throw;
}
};
@@ -268,10 +266,10 @@ namespace System.ServiceModel
if (operationCompletedCallback != null)
RunCompletedCallback (operationCompletedCallback, new InvokeAsyncCompletedEventArgs (results, error, cancelled, userState));
} catch (Exception ex) {
- Console.WriteLine ("Exception during operationCompletedCallback" + ex);
+ //Console.WriteLine ("Exception during operationCompletedCallback" + ex);
throw;
}
- Console.WriteLine ("System.ServiceModel.ClientBase<TChannel>: web service invocation is successfully done (operationCompletedCallback may not be).");
+ //Console.WriteLine ("System.ServiceModel.ClientBase<TChannel>: web service invocation is successfully done (operationCompletedCallback may not be).");
};
begin_async_result = beginOperationDelegate (inValues, cb, userState);
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs
index a8288910948..25944ccd089 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs
@@ -170,7 +170,7 @@ namespace System.ServiceModel
if (!par.IsOut)
b.Assign (
new CodeArrayItem (paramsRef, new CodeLiteral (i)),
- new CodeCast (typeof (object), m.GetArg (i + 1)));
+ new CodeCast (typeof (object), m.GetArg (i)));
}
CodeMethodCall argMethodInfo = new CodeMethodCall (typeof (MethodBase), "GetCurrentMethod");
CodeLiteral argOperName = new CodeLiteral (name);
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
index 53e15d46b97..083c6d780b5 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
@@ -553,8 +553,13 @@ namespace System.ServiceModel
if (op.SerializeRequest)
msg = op.GetFormatter ().SerializeRequest (
version, parameters);
- else
+ else {
+ if (parameters.Length != 1)
+ throw new ArgumentException (String.Format ("Argument parameters does not match the expected input. It should contain only a Message, but has {0} parameters", parameters.Length));
+ if (!(parameters [0] is Message))
+ throw new ArgumentException (String.Format ("Argument should be only a Message, but has {0}", parameters [0] != null ? parameters [0].GetType ().FullName : "null"));
msg = (Message) parameters [0];
+ }
context = context ?? OperationContext.Current;
if (context != null) {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress10.cs b/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress10.cs
index 8d7ae773c68..27576c56b50 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress10.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress10.cs
@@ -31,20 +31,26 @@ using System.Collections.ObjectModel;
using System.Net.Security;
using System.Reflection;
using System.Runtime.Serialization;
-using System.Security.Cryptography.X509Certificates;
-using System.Security.Cryptography.Xml;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
+#if !NET_2_1
+using System.Security.Cryptography.X509Certificates;
+using System.Security.Cryptography.Xml;
+#endif
namespace System.ServiceModel
{
[XmlSchemaProvider ("GetSchema")]
[XmlRoot ("EndpointReference", Namespace = "http://www.w3.org/2005/08/addressing")]
+#if NET_2_1
+ internal class EndpointAddress10 : IXmlSerializable
+#else
public class EndpointAddress10 : IXmlSerializable
+#endif
{
static readonly Uri w3c_anonymous = new Uri (Constants.WsaAnonymousUri);
EndpointAddress address;
@@ -63,6 +69,7 @@ namespace System.ServiceModel
return new EndpointAddress10 (address);
}
+#if !NET_2_1
public static XmlQualifiedName GetSchema (XmlSchemaSet xmlSchemaSet)
{
if (xmlSchemaSet == null)
@@ -70,6 +77,7 @@ namespace System.ServiceModel
xmlSchemaSet.Add (XmlSchema.Read (typeof (EndpointAddress10).Assembly.GetManifestResourceStream ("ws-addr.xsd"), null));
return new XmlQualifiedName ("EndpointReferenceType", Constants.WSA1);
}
+#endif
public EndpointAddress ToEndpointAddress ()
{
@@ -102,6 +110,7 @@ namespace System.ServiceModel
ah.WriteAddressHeader (writer);
writer.WriteStartElement ("Identity", Constants.WsaIdentityUri);
+#if !NET_2_1
X509CertificateEndpointIdentity x509 =
address.Identity as X509CertificateEndpointIdentity;
if (x509 != null) {
@@ -115,6 +124,7 @@ namespace System.ServiceModel
DataContractSerializer ds = new DataContractSerializer (address.Identity.IdentityClaim.GetType ());
ds.WriteObject (writer, address.Identity.IdentityClaim);
}
+#endif
writer.WriteEndElement ();
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs
index 3ccf838c2b4..73f8c3ad5e8 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs
@@ -163,7 +163,7 @@ namespace System.ServiceModel
protected void AddBaseAddress (Uri baseAddress)
{
- if (Description != null)
+ if (base_addresses == null)
throw new InvalidOperationException ("Base addresses must be added before the service description is initialized");
base_addresses.Add (baseAddress);
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources b/mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources
index b99f46016eb..635026ec5f3 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources
+++ b/mcs/class/System.ServiceModel/System.ServiceModel_test.dll.sources
@@ -17,6 +17,7 @@ System.ServiceModel.Channels/HandlerBodyWriter.cs
System.ServiceModel.Channels/HandlerTransportBindingElement.cs
System.ServiceModel.Channels/HttpRequestMessagePropertyTest.cs
System.ServiceModel.Channels/HttpTransportBindingElementTest.cs
+System.ServiceModel.Channels/HttpsTransportBindingElementTest.cs
System.ServiceModel.Channels/InterceptorBindingElement.cs
System.ServiceModel.Channels/InvalidBindingElement.cs
System.ServiceModel.Channels/LocalClientSecuritySettingsTest.cs
@@ -163,8 +164,4 @@ FeatureBased/Features.Client/UntypedMessageTesterProxy.cs
FeatureBased/Features.Contracts/FaultsTester.cs
FeatureBased/Features.Contracts/KnownTypeTester.cs
FeatureBased/Features.Contracts/UntypedMessageTester.cs
-FeatureBased/Features.Serialization/FaultsTest.cs
-FeatureBased/Features.Serialization/KnownTypeTest.cs
-FeatureBased/Features.Serialization/MessageContractTest.cs
-FeatureBased/Features.Serialization/UntypedMessageTest.cs
FeatureBased/Features.Serialization/XmlComparer.cs
diff --git a/mcs/class/System.ServiceModel/Test/FeatureBased/ChangeLog b/mcs/class/System.ServiceModel/Test/FeatureBased/ChangeLog
index a817d810699..3fc80367a4c 100644
--- a/mcs/class/System.ServiceModel/Test/FeatureBased/ChangeLog
+++ b/mcs/class/System.ServiceModel/Test/FeatureBased/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TestFixtureBase.cs : try to fix this mannerless set of tests that
+ leaves comm objects open.
+
2008-10-07 Atsushi Enomoto <atsushi@ximian.com>
* TestFixtureBase.cs : until I sort out what's causing failure on
diff --git a/mcs/class/System.ServiceModel/Test/FeatureBased/TestFixtureBase.cs b/mcs/class/System.ServiceModel/Test/FeatureBased/TestFixtureBase.cs
index 5ebe51bfe71..211627b39c6 100644
--- a/mcs/class/System.ServiceModel/Test/FeatureBased/TestFixtureBase.cs
+++ b/mcs/class/System.ServiceModel/Test/FeatureBased/TestFixtureBase.cs
@@ -76,9 +76,19 @@ namespace MonoTests.Features
public abstract class TestFixtureBase<TClient, TServer, IServer> where TClient : new() where TServer: new()
{
ServiceHost _hostBase;
+ ChannelFactory<IServer> factory;
protected TestFixtureBase () { }
+ [TearDown]
+ public void TearDown ()
+ {
+ if (_hostBase != null)
+ _hostBase.Close ();
+ if (factory != null)
+ factory.Close ();
+ }
+
[SetUp]
public virtual void Run (){
bool runServer = true;
@@ -169,7 +179,7 @@ namespace MonoTests.Features
public IServer Client {
get {
- ChannelFactory<IServer> factory = new ChannelFactory<IServer> (new BasicHttpBinding (), new EndpointAddress (getEndpoint ()));
+ factory = new ChannelFactory<IServer> (new BasicHttpBinding (), new EndpointAddress (getEndpoint ()));
return factory.CreateChannel ();
}
}
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/BinaryMessageEncodingBindingElementTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/BinaryMessageEncodingBindingElementTest.cs
index 57742b0d37b..9c51d150f40 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/BinaryMessageEncodingBindingElementTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/BinaryMessageEncodingBindingElementTest.cs
@@ -28,6 +28,7 @@
using System;
using System.Collections.ObjectModel;
using System.IO;
+using System.Net.Sockets;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
@@ -183,6 +184,92 @@ namespace MonoTests.System.ServiceModel.Channels
}
}
+ [Test]
+ public void ConnectionTcpTransport ()
+ {
+ var host = new ServiceHost (typeof (Foo));
+ var bindingsvc = new CustomBinding (new BindingElement [] {
+ new BinaryMessageEncodingBindingElement (),
+ new TcpTransportBindingElement () });
+ host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "net.tcp://localhost:37564/");
+ host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().IncludeExceptionDetailInFaults = true;
+ host.Open (TimeSpan.FromSeconds (5));
+ try {
+ for (int i = 0; i < 2; i++) {
+ var bindingcli = new NetTcpBinding ();
+ bindingcli.Security.Mode = SecurityMode.None;
+ var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("net.tcp://localhost:37564/")).CreateChannel ();
+ Assert.AreEqual ("test for echo", cli.Echo ("TEST FOR ECHO"), "#1");
+ var sid = cli.SessionId;
+ Assert.AreEqual (3000, cli.Add (1000, 2000), "#2");
+ Assert.AreEqual (sid, cli.SessionId, "#3");
+ cli.Close ();
+ }
+ } finally {
+ host.Close (TimeSpan.FromSeconds (5));
+ var t = new TcpListener (37564);
+ t.Start ();
+ t.Stop ();
+ }
+ }
+
+ [Test]
+ public void ConnectionHttpTransport ()
+ {
+ var host = new ServiceHost (typeof (Foo));
+ var bindingsvc = new CustomBinding (new BindingElement [] {
+ new BinaryMessageEncodingBindingElement (),
+ new HttpTransportBindingElement () });
+ host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "http://localhost:37564/");
+ host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().IncludeExceptionDetailInFaults = true;
+ host.Open (TimeSpan.FromSeconds (5));
+ try {
+ for (int i = 0; i < 2; i++) {
+ var bindingcli = new CustomBinding (new BindingElement [] {
+ new BinaryMessageEncodingBindingElement (),
+ new HttpTransportBindingElement () });
+ var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("http://localhost:37564/")).CreateChannel ();
+ Assert.AreEqual ("test for echo", cli.Echo ("TEST FOR ECHO"), "#1");
+ var sid = cli.SessionId;
+ Assert.AreEqual (3000, cli.Add (1000, 2000), "#2");
+ Assert.AreEqual (sid, cli.SessionId, "#3");
+ cli.Close ();
+ }
+ } finally {
+ host.Close (TimeSpan.FromSeconds (5));
+ var t = new TcpListener (37564);
+ t.Start ();
+ t.Stop ();
+ }
+ }
+
+ public interface IFooClient : IFoo, IClientChannel
+ {
+ }
+
+ [ServiceContract]
+ public interface IFoo
+ {
+ [OperationContract]
+ string Echo (string msg);
+
+ [OperationContract]
+ uint Add (uint v1, uint v2);
+ }
+
+ class Foo : IFoo
+ {
+ public string Echo (string msg)
+ {
+ return msg.ToLower ();
+ }
+
+ public uint Add (uint v1, uint v2)
+ {
+ return v1 + v2;
+ }
+ }
+
void AssertNode (XmlReader reader, int depth, XmlNodeType nodeType, string prefix, string localName, string ns, string value, string label)
{
Assert.AreEqual (nodeType, reader.NodeType, label + ".NodeType");
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/ChangeLog b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/ChangeLog
index 486f7ab41ab..9055cb41ef7 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/ChangeLog
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/ChangeLog
@@ -1,3 +1,35 @@
+2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * BinaryMessageEncodingBindingElementTest.cs : added test for
+ connection-based tests for both TCP and HTTP (they give difference:
+ see BinaryMessageEncoder.cs change too).
+
+2009-12-21 Atsushi Enomoto <atsushi@ximian.com>
+
+ * MessageFaultTest.cs : add CreateFault test with MessageVersion.None.
+
+2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * MessageHeadersTest.cs : added another CopyHeadersFrom() test to
+ make sure there is no duplicate.
+
+2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * MessageHeadersTest.cs : enable working test and remove old comment.
+
+2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
+
+ * MessageHeadersTest.cs : make sure null can be set as a
+ WS-Addressing header when version is None.
+
+2009-12-04 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpTransportBindingElementTest.cs : added GetProperty() tests.
+
+2009-12-03 Atsushi Enomoto <atsushi@ximian.com>
+
+ * HttpsTransportBindingElementTest.cs : new test.
+
2009-09-14 Atsushi Enomoto <atsushi@ximian.com>
* MessagePropertiesTest.cs : new test.
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpTransportBindingElementTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpTransportBindingElementTest.cs
index 9cb37118cd0..3d0112fcad9 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpTransportBindingElementTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpTransportBindingElementTest.cs
@@ -224,6 +224,69 @@ namespace MonoTests.System.ServiceModel.Channels
}
}
+ [Test]
+ public void GetPrpertyBindingDeliveryCapabilities ()
+ {
+ var be = new HttpTransportBindingElement ();
+ var dc = be.GetProperty<IBindingDeliveryCapabilities> (new BindingContext (new CustomBinding (), empty_params));
+ Assert.IsFalse (dc.AssuresOrderedDelivery, "#1");
+ Assert.IsFalse (dc.QueuedDelivery, "#2");
+ }
+
+ [Test]
+ public void GetPrpertySecurityCapabilities ()
+ {
+ var be = new HttpTransportBindingElement ();
+ var sec = be.GetProperty<ISecurityCapabilities> (new BindingContext (new CustomBinding (), empty_params));
+ Assert.IsNotNull (sec, "#1.1");
+ Assert.AreEqual (ProtectionLevel.None, sec.SupportedRequestProtectionLevel, "#1.2");
+ Assert.AreEqual (ProtectionLevel.None, sec.SupportedResponseProtectionLevel, "#1.3");
+ Assert.IsFalse (sec.SupportsClientAuthentication, "#1.4");
+ Assert.IsFalse (sec.SupportsClientWindowsIdentity, "#1.5");
+ Assert.IsFalse (sec.SupportsServerAuthentication , "#1.6");
+
+ be = new HttpTransportBindingElement ();
+ be.AuthenticationScheme = AuthenticationSchemes.Negotiate;
+ sec = be.GetProperty<ISecurityCapabilities> (new BindingContext (new CustomBinding (), empty_params));
+ Assert.IsNotNull (sec, "#2.1");
+ Assert.AreEqual (ProtectionLevel.None, sec.SupportedRequestProtectionLevel, "#2.2");
+ Assert.AreEqual (ProtectionLevel.None, sec.SupportedResponseProtectionLevel, "#2.3");
+ Assert.IsTrue (sec.SupportsClientAuthentication, "#2.4");
+ Assert.IsTrue (sec.SupportsClientWindowsIdentity, "#2.5");
+ Assert.IsTrue (sec.SupportsServerAuthentication , "#2.6");
+
+ // almost the same, only differ at SupportsServerAuth
+ be = new HttpTransportBindingElement ();
+ be.AuthenticationScheme = AuthenticationSchemes.Ntlm;
+ sec = be.GetProperty<ISecurityCapabilities> (new BindingContext (new CustomBinding (), empty_params));
+ Assert.IsNotNull (sec, "#3.1");
+ Assert.AreEqual (ProtectionLevel.None, sec.SupportedRequestProtectionLevel, "#3.2");
+ Assert.AreEqual (ProtectionLevel.None, sec.SupportedResponseProtectionLevel, "#3.3");
+ Assert.IsTrue (sec.SupportsClientAuthentication, "#3.4");
+ Assert.IsTrue (sec.SupportsClientWindowsIdentity, "#3.5");
+ Assert.IsFalse (sec.SupportsServerAuthentication , "#3.6");
+
+ be = new HttpTransportBindingElement ();
+ be.AuthenticationScheme = AuthenticationSchemes.Basic;
+ sec = be.GetProperty<ISecurityCapabilities> (new BindingContext (new CustomBinding (), empty_params));
+ Assert.IsNotNull (sec, "#4.1");
+ Assert.AreEqual (ProtectionLevel.None, sec.SupportedRequestProtectionLevel, "#4.2");
+ Assert.AreEqual (ProtectionLevel.None, sec.SupportedResponseProtectionLevel, "#4.3");
+ Assert.IsTrue (sec.SupportsClientAuthentication, "#4.4");
+ Assert.IsTrue (sec.SupportsClientWindowsIdentity, "#4.5");
+ Assert.IsFalse (sec.SupportsServerAuthentication , "#4.6");
+
+ be = new HttpTransportBindingElement ();
+ be.AuthenticationScheme = AuthenticationSchemes.Digest;
+ sec = be.GetProperty<ISecurityCapabilities> (new BindingContext (new CustomBinding (), empty_params));
+ Assert.IsNotNull (sec, "#5.1");
+ Assert.AreEqual (ProtectionLevel.None, sec.SupportedRequestProtectionLevel, "#5.2");
+ Assert.AreEqual (ProtectionLevel.None, sec.SupportedResponseProtectionLevel, "#5.3");
+ Assert.IsTrue (sec.SupportsClientAuthentication, "#5.4");
+ Assert.IsTrue (sec.SupportsClientWindowsIdentity, "#5.5");
+ Assert.IsFalse (sec.SupportsServerAuthentication , "#5.6");
+ }
+
#region contracts
[ServiceContract]
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpsTransportBindingElementTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpsTransportBindingElementTest.cs
new file mode 100644
index 00000000000..0e827a934bb
--- /dev/null
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/HttpsTransportBindingElementTest.cs
@@ -0,0 +1,66 @@
+//
+// HttpTransportBindingElementTest.cs
+//
+// Author:
+// Atsushi Enomoto <atsushi@ximian.com>
+//
+// Copyright (C) 2005 Novell, Inc. http://www.novell.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Net;
+using System.Net.Security;
+using System.Reflection;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Description;
+using System.Threading;
+using System.Xml;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Channels
+{
+ [TestFixture]
+ public class HttpsTransportBindingElementTest
+ {
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void BuildChannelFactoryForHttpEndpoint ()
+ {
+ var b = new BasicHttpBinding ();
+ b.Security.Mode = BasicHttpSecurityMode.Transport;
+ var cf = b.BuildChannelFactory<IRequestChannel> ();
+ cf.Open ();
+ cf.CreateChannel (new EndpointAddress ("http://localhost:8080"));
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void BuildChannelListenerForHttpEndpoint ()
+ {
+ var b = new BasicHttpBinding ();
+ b.Security.Mode = BasicHttpSecurityMode.Transport;
+ b.BuildChannelListener<IReplyChannel> (new Uri ("http://localhost:8080"));
+ }
+ }
+}
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageFaultTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageFaultTest.cs
index 15f47fbe452..791dee7f7d9 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageFaultTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageFaultTest.cs
@@ -21,6 +21,15 @@ namespace MonoTests.System.ServiceModel.Channels
}
[Test]
+ public void CreateFaultMessageVersionNone ()
+ {
+ var msg = Message.CreateMessage (MessageVersion.None, new FaultCode ("DestinationUnreachable"), "typical error", null);
+ var fault = MessageFault.CreateFault (msg, 0x10000);
+ Assert.AreEqual ("DestinationUnreachable", fault.Code.Name, "#1");
+ Assert.AreEqual ("typical error", fault.Reason.ToString (), "#2");
+ }
+
+ [Test]
[ExpectedException (typeof (CommunicationException))]
public void CreateFaultIncomplete ()
{
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageHeadersTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageHeadersTest.cs
index 9a9403635f7..da3c11542a4 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageHeadersTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/MessageHeadersTest.cs
@@ -126,6 +126,17 @@ namespace MonoTests.System.ServiceModel.Channels
}
[Test]
+ public void SetWSAddressingHeadersNullToNonSoap ()
+ {
+ Message m = Message.CreateMessage (MessageVersion.None, "test", 1);
+ m.Headers.From = null;
+ m.Headers.MessageId = null;
+ m.Headers.ReplyTo = null;
+ m.Headers.FaultTo = null;
+ m.Headers.RelatesTo = null;
+ }
+
+ [Test]
public void TestInsert ()
{
Message m = Message.CreateMessage (MessageVersion.Default, "test", 1);
@@ -320,13 +331,8 @@ namespace MonoTests.System.ServiceModel.Channels
h.GetReaderAtHeader (0);
}
- // I doubt things wrt this work fine on WinFX; sometimes it
- // does *not* raise an error, while sometimes it does. And it
- // is basically consistent on every run against the same
- // *_test.dll binary. Huh.
[Test]
[ExpectedException (typeof (MessageHeaderException))] // multiple headers: "Action"
- [Category ("NotWorking")]
public void CopyHeadersFrom ()
{
Message msg = Message.CreateMessage (MessageVersion.Default, "urn:myaction");
@@ -336,6 +342,16 @@ namespace MonoTests.System.ServiceModel.Channels
}
[Test]
+ public void CopyHeadersFrom2 ()
+ {
+ Message msg = Message.CreateMessage (MessageVersion.Default, "urn:myaction");
+ Message msg2 = Message.CreateMessage (MessageVersion.Default, "urn:myaction2");
+ msg2.Headers.Action = null;
+ msg2.Headers.CopyHeadersFrom (msg);
+ Assert.AreEqual ("urn:myaction", msg2.Headers.Action);
+ }
+
+ [Test]
public void AddressingNoneAndAction ()
{
MessageHeaders h = new MessageHeaders (MessageVersion.Soap12);
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ChangeLog b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ChangeLog
index 3e5b1e884ed..e4b4919dc79 100755
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ChangeLog
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ServiceDebugBehaviorTest.cs : make sure to close hosts.
+
2009-10-01 Atsushi Enomoto <atsushi@ximian.com>
* ServiceContractGeneratorTest.cs : new test.
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceDebugBehaviorTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceDebugBehaviorTest.cs
index 86683b44754..c0bed57047d 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceDebugBehaviorTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceDebugBehaviorTest.cs
@@ -70,7 +70,7 @@ namespace MonoTests.System.ServiceModel.Description
host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "e1");
Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1");
-
+ try {
host.Open ();
Assert.AreEqual (2, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #2");
@@ -95,8 +95,9 @@ namespace MonoTests.System.ServiceModel.Description
DispatchRuntime dr = ed.DispatchRuntime;
// TODO
-
+ } finally {
host.Close ();
+ }
}
}
@@ -108,11 +109,14 @@ namespace MonoTests.System.ServiceModel.Description
Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1");
+ try {
host.Open ();
Assert.AreEqual (1, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #2");
+ } finally {
host.Close ();
+ }
}
}
@@ -124,11 +128,13 @@ namespace MonoTests.System.ServiceModel.Description
Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1");
+ try {
host.Open ();
Assert.AreEqual (1, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #2");
-
+ } finally {
host.Close ();
+ }
}
}
@@ -140,6 +146,7 @@ namespace MonoTests.System.ServiceModel.Description
Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1");
+ try {
host.Open ();
Assert.AreEqual (2, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #2");
@@ -171,8 +178,9 @@ namespace MonoTests.System.ServiceModel.Description
Assert.AreEqual ("*", dispOp.ReplyAction, "Operation.ReplyAction");
Assert.AreEqual ("Get", dispOp.Name, "Operation.Name");
//Assert.IsNotNull (dispOp.Invoker, "Operation.Invoker");
-
+ } finally {
host.Close ();
+ }
}
}
@@ -181,13 +189,14 @@ namespace MonoTests.System.ServiceModel.Description
using (ServiceHost host = new ServiceHost (typeof (MyService), CreateUri ("http://localhost:37564"))) {
host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "");
host.Description.Behaviors.Find<ServiceDebugBehavior> ().HttpHelpPageUrl = new Uri ("http://localhost:37564/help");
-
+ try {
host.Open ();
Assert.IsNotNull (host.Extensions.Find<ServiceMetadataExtension> (), "ServiceMetadataExtension #1");
Assert.AreEqual (1, host.Extensions.FindAll<ServiceMetadataExtension> ().Count, "ServiceMetadataExtension #2");
-
+ } finally {
host.Close ();
+ }
}
}
@@ -200,13 +209,15 @@ namespace MonoTests.System.ServiceModel.Description
ServiceMetadataExtension extension = new ServiceMetadataExtension ();
host.Extensions.Add (extension);
+ try {
host.Open ();
Assert.IsNotNull (host.Extensions.Find<ServiceMetadataExtension> (), "ServiceMetadataExtension #1");
Assert.AreEqual (1, host.Extensions.FindAll<ServiceMetadataExtension> ().Count, "ServiceMetadataExtension #2");
Assert.AreEqual (extension, host.Extensions.Find<ServiceMetadataExtension> (), "ServiceMetadataExtension #3");
-
+ } finally {
host.Close ();
+ }
}
}
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChangeLog b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChangeLog
index 0668294045d..31051bdbee8 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChangeLog
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ChannelDispatcherTest.cs : format message correctly.
+
+2009-12-02 Atsushi Enomoto <atsushi@ximian.com>
+
+ * DispatchRuntimeTest.cs :
+ I have to disable a lot of connective tests that somehow blocks
+ test runs. No idea why it started to happen though.
+
2009-09-17 Atsushi Enomoto <atsushi@ximian.com>
* ChannelDispatcherTest.cs : add a test to make sure that
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChannelDispatcherTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChannelDispatcherTest.cs
index 77d31f0f9cb..08e64e675ac 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChannelDispatcherTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/ChannelDispatcherTest.cs
@@ -23,7 +23,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
t.Start ();
t.Stop ();
} catch (Exception ex) {
- Assert.Fail ("Port {0} is not open. It is likely previous tests have failed and the port is kept opened");
+ Assert.Fail (String.Format ("Port {0} is not open. It is likely previous tests have failed and the port is kept opened", uri.Port));
}
return uri;
}
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs
index ffaa9a99628..e6eeaacf662 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs
@@ -92,6 +92,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
public void TestInstanceBehavior1()
{
@@ -107,6 +108,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
public void TestInstanceBehavior2 ()
{
Result res = new Result ();
@@ -121,6 +123,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
public void TestInstanceBehavior3 ()
{
Result res = new Result ();
@@ -168,7 +171,6 @@ namespace MonoTests.System.ServiceModel.Dispatcher
//let ther server finish his work
Thread.Sleep (100);
-Console.WriteLine (actual.string_res);
Assert.AreEqual (expected, actual.string_res);
actual.Done = true;
}
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/ChangeLog b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/ChangeLog
index dfea850a2c4..cd47b63758d 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/ChangeLog
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/ChangeLog
@@ -1,3 +1,11 @@
+2009-12-02 Atsushi Enomoto <atsushi@ximian.com>
+
+ * CustomPeerResolverServiceTest.cs :
+ I have to disable a lot of connective tests that somehow blocks
+ test runs. No idea why it started to happen though.
+ (It internally uses HTTP binding, which is the indirect source of
+ the problem here.)
+
2009-07-14 Atsushi Enomoto <atsushi@ximian.com>
* PeerResolverSerializationTest.cs : fix test name/namespace.
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs
index 9a55d6a6e0b..fd92f7854e1 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs
@@ -30,6 +30,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
public void CloseTest ()
{
cprs.Open ();
@@ -37,6 +38,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (InvalidOperationException))]
public void CloseTest1 ()
{
@@ -44,6 +46,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (InvalidOperationException))]
public void GetServiceSettingsTest ()
{
@@ -53,12 +56,14 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
public void OpenTest ()
{
cprs.Open ();
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (ArgumentException))]
public void OpenTest1 ()
{
@@ -67,6 +72,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (ArgumentException))]
public void OpenTest2 ()
{
@@ -75,6 +81,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (ArgumentException))]
public void OpenTest3 ()
{
@@ -84,6 +91,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (InvalidOperationException))]
public void OpenTest4 ()
{
@@ -92,6 +100,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (ArgumentException))]
public void RefreshTest ()
{
@@ -99,6 +108,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (InvalidOperationException))]
public void RefreshTest1 ()
{
@@ -113,6 +123,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
//}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof( ArgumentException))]
public void RegisterTest ()
{
@@ -120,6 +131,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (InvalidOperationException))]
public void RegisterTest1 ()
{
@@ -134,6 +146,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
//}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (ArgumentException))]
public void ResolveTest ()
{
@@ -141,6 +154,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (InvalidOperationException))]
public void ResolveTest1 ()
{
@@ -155,6 +169,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
//}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (ArgumentException))]
public void UnregisterTest ()
{
@@ -162,6 +177,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (InvalidOperationException))]
public void UnregisterTest1 ()
{
@@ -176,6 +192,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
//}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (ArgumentException))]
public void UpdateTest ()
{
@@ -183,6 +200,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")] // It somehow stopped working properly recently in Nov. 2009, not sure where the source of the problem lies.
[ExpectedException (typeof (InvalidOperationException))]
public void UpdateTest1 ()
{
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security.Tokens/ChangeLog b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security.Tokens/ChangeLog
index 5202ce4f4cf..7610103142f 100755
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security.Tokens/ChangeLog
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security.Tokens/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-14 Atsushi Enomoto <atsushi@ximian.com>
+
+ * IssuedSecurityTokenProviderTest.cs : disable this failing niche too.
+
2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
* IssuedSecurityTokenParametersTest.cs :
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security.Tokens/IssuedSecurityTokenProviderTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security.Tokens/IssuedSecurityTokenProviderTest.cs
index 16aebab5552..42981c8ae52 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security.Tokens/IssuedSecurityTokenProviderTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security.Tokens/IssuedSecurityTokenProviderTest.cs
@@ -118,6 +118,7 @@ namespace MonoTests.System.ServiceModel.Security.Tokens
}
[Test]
+ [Category ("NotWorking")]
public void Open ()
{
IssuedSecurityTokenProvider p = SetupProvider (new BasicHttpBinding ());
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/ChangeLog b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/ChangeLog
index ddaf2a90b47..cb0ba913dc7 100755
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/ChangeLog
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-14 Atsushi Enomoto <atsushi@ximian.com>
+
+ * WSSecurityTokenSerializerTest.cs : disable non-working test that
+ needs several fixes or updates.
+
2008-02-28 Eyal Alaluf <eyala@mainsoft.com>
* WSSecurityTokenSerializerTest.cs: Fixed test run on Windows (failed also
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/TransportSecurityBindingElementTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/TransportSecurityBindingElementTest.cs
new file mode 100755
index 00000000000..c9d7e2a150d
--- /dev/null
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/TransportSecurityBindingElementTest.cs
@@ -0,0 +1,51 @@
+//
+// TransportSecurityBindingElementTest.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.ObjectModel;
+using System.Net;
+using System.Net.Security;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Security;
+using System.ServiceModel.Security.Tokens;
+using System.Security.Cryptography.Xml;
+using NUnit.Framework;
+
+namespace MonoTests.System.ServiceModel.Security
+{
+ [TestFixture]
+ public class TransportSecurityBindingElementTest
+ {
+ [Test]
+ public void DefaultValues ()
+ {
+ var be = new TransportSecurityBindingElement ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/WSSecurityTokenSerializerTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/WSSecurityTokenSerializerTest.cs
index a0374656e29..05e07afab2b 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/WSSecurityTokenSerializerTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Security/WSSecurityTokenSerializerTest.cs
@@ -723,6 +723,7 @@ namespace MonoTests.System.ServiceModel.Security
}
[Test]
+ [Category ("NotWorking")] // SslNegoCookieResolver needs updates and/or fixes.
public void ReadSslnegoSCTNoStateEncoder ()
{
string cookie = "QgBCAoNCBpkrdXVpZC03MDlhYjYwOC0yMDA0LTQ0ZDUtYjM5Mi1mM2M1YmY3YzY3ZmItMUIErZ3da7enifVFg+e0dObwRLNCCJ4egLowfrwP4Hgn0lOSqlA2fr0k4NAKgRZX+0BVs2EOnwJ6xkIOjzCAEnLHQMkIQhCPMJC+QxtByQhCFI8wgBJyx0DJCEIWjzCQvkMbQckIAQ==";
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel/BasicHttpBindingTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel/BasicHttpBindingTest.cs
index efd2208f9c2..8ccd21c004d 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel/BasicHttpBindingTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel/BasicHttpBindingTest.cs
@@ -27,6 +27,7 @@
//
using System;
using System.Collections.ObjectModel;
+using System.Net;
using System.Net.Security;
using System.ServiceModel;
using System.ServiceModel.Channels;
@@ -248,6 +249,71 @@ namespace MonoTests.System.ServiceModel
Assert.AreEqual (false, t.UseDefaultWebProxy, "#16");
}
+ [Test]
+ public void SecurityMode ()
+ {
+ // hmm, against my expectation, those modes does not give Http(s)TransportBindingElement property differences..
+ var modes = new HttpClientCredentialType [] {HttpClientCredentialType.None, HttpClientCredentialType.Basic, HttpClientCredentialType.Digest, HttpClientCredentialType.Ntlm, HttpClientCredentialType.Windows, HttpClientCredentialType.Certificate};
+ foreach (var m in modes) {
+ var b = new BasicHttpBinding ();
+ b.Security.Mode = BasicHttpSecurityMode.Transport;
+ b.Security.Transport.ClientCredentialType = m;
+ var bec = b.CreateBindingElements ();
+ Assert.AreEqual (2, bec.Count, "#1." + m);
+ Assert.IsTrue (bec [1] is HttpsTransportBindingElement, "#2." + m);
+ var tbe = (HttpsTransportBindingElement) bec [1];
+ if (m == HttpClientCredentialType.Certificate)
+ Assert.IsTrue (tbe.RequireClientCertificate, "#3." + m);
+ else
+ Assert.IsFalse (tbe.RequireClientCertificate, "#3." + m);
+ }
+ }
+
+ [Test]
+ public void SecurityMode2 ()
+ {
+ var modes = new HttpClientCredentialType [] {HttpClientCredentialType.None, HttpClientCredentialType.Basic, HttpClientCredentialType.Digest, HttpClientCredentialType.Ntlm, HttpClientCredentialType.Windows, HttpClientCredentialType.Certificate};
+ foreach (var m in modes) {
+ var b = new BasicHttpBinding ();
+ b.Security.Mode = BasicHttpSecurityMode.TransportWithMessageCredential; // gives WS-Security message security.
+ b.Security.Transport.ClientCredentialType = m;
+ var bec = b.CreateBindingElements ();
+ Assert.AreEqual (3, bec.Count, "#1." + m);
+ Assert.IsTrue (bec [0] is TransportSecurityBindingElement, "#2." + m);
+ Assert.IsTrue (bec [2] is HttpsTransportBindingElement, "#3." + m);
+ var tbe = (HttpsTransportBindingElement) bec [2];
+ Assert.IsFalse (tbe.RequireClientCertificate, "#4." + m);
+ }
+ }
+
+ [Test]
+ public void SecurityMode3 ()
+ {
+ var modes = new HttpClientCredentialType [] {HttpClientCredentialType.None, HttpClientCredentialType.Basic, HttpClientCredentialType.Digest, HttpClientCredentialType.Ntlm, HttpClientCredentialType.Windows};
+ var auths = new AuthenticationSchemes [] { AuthenticationSchemes.Anonymous, AuthenticationSchemes.Basic, AuthenticationSchemes.Digest, AuthenticationSchemes.Ntlm, AuthenticationSchemes.Negotiate }; // specifically, none->anonymous, and windows->negotiate
+ for (int i = 0; i < modes.Length; i++) {
+ var m = modes [i];
+ var b = new BasicHttpBinding ();
+ b.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly; // gives WS-Security message security.
+ b.Security.Transport.ClientCredentialType = m;
+ var bec = b.CreateBindingElements ();
+ Assert.AreEqual (2, bec.Count, "#1." + m);
+ Assert.IsTrue (bec [1] is HttpTransportBindingElement, "#2." + m);
+ var tbe = (HttpTransportBindingElement) bec [1];
+ Assert.AreEqual (auths [i], tbe.AuthenticationScheme, "#3." + m);
+ }
+ }
+
+ [Test]
+ [ExpectedException (typeof (InvalidOperationException))]
+ public void SecurityMode4 ()
+ {
+ var b = new BasicHttpBinding ();
+ b.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly; // gives WS-Security message security.
+ b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
+ var bec = b.CreateBindingElements ();
+ }
+
private BasicHttpBinding CreateBindingFromConfig ()
{
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/basicHttpBinding").GetSectionGroup ("system.serviceModel");
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChangeLog b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChangeLog
index b5e94eed994..987d2b8705e 100755
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChangeLog
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChangeLog
@@ -1,3 +1,30 @@
+2010-01-07 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ServiceHostBaseTest.cs : another mannerless test here.
+
+2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * NetTcpBindingTest.cs : enable some tests and added streamed mode
+ test. Commented on these changes.
+
+2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ChannelFactory_1Test.cs : ignore another couple of blocking tests.
+
+2009-12-14 Atsushi Enomoto <atsushi@ximian.com>
+
+ * WSHttpBindingTest.cs : leave non-working test to get fixed later.
+
+2009-12-03 Atsushi Enomoto <atsushi@ximian.com>
+
+ * BasicHttpBindingTest.cs : added transport security related tests.
+
+2009-12-02 Atsushi Enomoto <atsushi@ximian.com>
+
+ * NetTcpBindingTest.cs :
+ I have to disable a lot of connective tests that somehow blocks
+ test runs. No idea why it started to happen though.
+
2009-10-15 Atsushi Enomoto <atsushi@ximian.com>
* ServiceHostBaseTest.cs : add test for checking non-mex contract
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs
index 31e793dda90..ea1ba135f33 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs
@@ -386,6 +386,7 @@ namespace MonoTests.System.ServiceModel
}
[Test]
+ [Ignore ("This somehow results in an infinite loop")]
public void XmlInvokeFooComplex ()
{
ITestServiceXml ts = CreateChannel<ITestServiceXml> (
@@ -438,6 +439,7 @@ namespace MonoTests.System.ServiceModel
}
[Test]
+ [Ignore ("This somehow results in an infinite loop")]
public void XmlInvokeFooComplexMC ()
{
ITestServiceXml ts = CreateFooComplexMC_Channel<ITestServiceXml> (true);
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel/NetTcpBindingTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel/NetTcpBindingTest.cs
index 7d00d48a32d..693c1b26ccf 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel/NetTcpBindingTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel/NetTcpBindingTest.cs
@@ -58,16 +58,52 @@ namespace MonoTests.System.ServiceModel
Assert.IsNotNull (tx, "#tx1");
}
+ // Those connection tests are somehow blocked by some tests
+ // I disabled recently (see svn history) but while those broken
+ // tests examine almost nothing, these tests below does, so I
+ // rather enabled them.
+ //
+ // Those tests somehow got broken in Nov. 2009 probably because
+ // of some underlying net layer and not due to those ignored
+ // tests though. But those tests leave channels open, so they
+ // are bad enough to be disabled.
+
+ [Test]
+ public void BufferedConnection ()
+ {
+ var host = new ServiceHost (typeof (Foo));
+ var bindingsvc = new NetTcpBinding ();
+ bindingsvc.Security.Mode = SecurityMode.None;
+ host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "net.tcp://localhost/");
+ host.Open (TimeSpan.FromSeconds (5));
+ try {
+ var bindingcli = new NetTcpBinding ();
+ bindingcli.Security.Mode = SecurityMode.None;
+ var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("net.tcp://localhost/")).CreateChannel ();
+ Assert.AreEqual (5, cli.Add (1, 4));
+ Assert.AreEqual ("monkey science", cli.Join ("monkey", "science"));
+ } finally {
+ host.Close (TimeSpan.FromSeconds (5));
+ var t = new TcpListener (808);
+ t.Start ();
+ t.Stop ();
+ }
+ Assert.IsTrue (Foo.AddCalled, "#1");
+ Assert.IsTrue (Foo.JoinCalled, "#2");
+ }
+
[Test]
- public void SimpleConnection ()
+ public void StreamedConnection ()
{
var host = new ServiceHost (typeof (Foo));
var bindingsvc = new NetTcpBinding ();
+ bindingsvc.TransferMode = TransferMode.Streamed;
bindingsvc.Security.Mode = SecurityMode.None;
host.AddServiceEndpoint (typeof (IFoo), bindingsvc, "net.tcp://localhost/");
host.Open (TimeSpan.FromSeconds (5));
try {
var bindingcli = new NetTcpBinding ();
+ bindingcli.TransferMode = TransferMode.Streamed;
bindingcli.Security.Mode = SecurityMode.None;
var cli = new ChannelFactory<IFooClient> (bindingcli, new EndpointAddress ("net.tcp://localhost/")).CreateChannel ();
Assert.AreEqual (5, cli.Add (1, 4));
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs
index 99f1fa95b54..6bb6982e675 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs
@@ -166,6 +166,7 @@ namespace MonoTests.System.ServiceModel
b.HttpHelpPageEnabled = false;
h.Open ();
+ try {
Assert.AreEqual (h.ChannelDispatchers.Count, 1);
ChannelDispatcher channelDispatcher = h.ChannelDispatchers[0] as ChannelDispatcher;
Assert.IsNotNull (channelDispatcher, "#1");
@@ -175,7 +176,9 @@ namespace MonoTests.System.ServiceModel
Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:8080/address")), "#4");
Assert.IsFalse (filter.IncludeHostNameInComparison, "#5");
Assert.IsTrue (channelDispatcher.Endpoints [0].ContractFilter is MatchAllMessageFilter, "#6");
+ } finally {
h.Close ();
+ }
}
[Test]
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel/WSHttpBindingTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel/WSHttpBindingTest.cs
index 0e5cb97d321..9e918d5820c 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel/WSHttpBindingTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel/WSHttpBindingTest.cs
@@ -446,13 +446,14 @@ namespace MonoTests.System.ServiceModel
[Test]
[ExpectedException (typeof (InvalidOperationException))]
+ [Category ("NotWorking")]
public void BuildListenerWithoutServiceCertificate ()
{
ServiceHost host = new ServiceHost (typeof (Foo));
WSHttpBinding binding = new WSHttpBinding ();
binding.Security.Message.ClientCredentialType =
MessageCredentialType.IssuedToken;
- host.AddServiceEndpoint ("Foo", binding, "http://localhost:8080");
+ host.AddServiceEndpoint (typeof (Foo).FullName, binding, "http://localhost:8080");
host.Open ();
}
diff --git a/mcs/class/System.ServiceModel/net_2_1_raw_System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/net_2_1_raw_System.ServiceModel.dll.sources
index 46235798d4a..7e08332a1ce 100755
--- a/mcs/class/System.ServiceModel/net_2_1_raw_System.ServiceModel.dll.sources
+++ b/mcs/class/System.ServiceModel/net_2_1_raw_System.ServiceModel.dll.sources
@@ -71,6 +71,7 @@ System.ServiceModel.Channels/ChannelParameterCollection.cs
System.ServiceModel.Channels/ChannelPoolSettings.cs
System.ServiceModel.Channels/CommunicationObject.cs
System.ServiceModel.Channels/CustomBinding.cs
+System.ServiceModel.Channels/FaultConverter.cs
System.ServiceModel.Channels/HtmlizedException.cs
System.ServiceModel.Channels/HttpChannelFactory.cs
System.ServiceModel.Channels/HttpRequestChannel.cs
@@ -100,6 +101,7 @@ System.ServiceModel.Channels/ISessionChannel.cs
System.ServiceModel.Channels/LayeredCommunicationObject.cs
System.ServiceModel.Channels/LayeredOutputChannel.cs
System.ServiceModel.Channels/LayeredRequestChannel.cs
+System.ServiceModel.Channels/LocalClientSecuritySettings.cs
System.ServiceModel.Channels/Message.cs
System.ServiceModel.Channels/MessageBuffer_2_1.cs
System.ServiceModel.Channels/MessageBufferImpl.cs
@@ -117,13 +119,16 @@ System.ServiceModel.Channels/MessageVersion.cs
System.ServiceModel.Channels/OutputChannelBase.cs
System.ServiceModel.Channels/RequestChannelBase.cs
System.ServiceModel.Channels/RequestContext.cs
+System.ServiceModel.Channels/SecurityBindingElement.cs
System.ServiceModel.Channels/TextMessageEncoder.cs
System.ServiceModel.Channels/TextMessageEncoderFactory.cs
System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs
System.ServiceModel.Channels/TransportBindingElement.cs
+System.ServiceModel.Channels/TransportSecurityBindingElement.cs
System.ServiceModel.Channels/UnderstoodHeaders.cs
System.ServiceModel.Channels/XmlObjectSerializerBodyWriter.cs
System.ServiceModel.Channels/XmlReaderBodyWriter.cs
+System.ServiceModel.Description/ClientCredentials.cs
System.ServiceModel.Description/ContractDescription.cs
System.ServiceModel.Description/ContractDescriptionGenerator.cs
System.ServiceModel.Description/FaultDescription.cs
@@ -147,8 +152,12 @@ System.ServiceModel.Dispatcher/IChannelInitializer.cs
System.ServiceModel.Dispatcher/IClientMessageFormatter.cs
System.ServiceModel.Dispatcher/IClientMessageInspector.cs
System.ServiceModel.Dispatcher/IClientOperationSelector.cs
+System.ServiceModel.Dispatcher/IDispatchMessageFormatter.cs
System.ServiceModel.Dispatcher/IInteractiveChannelInitializer.cs
System.ServiceModel.Dispatcher/IParameterInspector.cs
+System.ServiceModel.Security/MessageSecurityException.cs
+System.ServiceModel.Security/SecurityAccessDeniedException.cs
+System.ServiceModel.Security/UserNamePasswordClientCredential.cs
System.ServiceModel/ActionNotSupportedException.cs
System.ServiceModel/AllEnums.cs
System.ServiceModel/BasicHttpBinding.cs
@@ -166,6 +175,7 @@ System.ServiceModel/DataContractFormatAttribute.cs
System.ServiceModel/DefaultCommunicationTimeouts.cs
System.ServiceModel/Dummy.cs
System.ServiceModel/EndpointAddress.cs
+System.ServiceModel/EndpointAddress10.cs
System.ServiceModel/EndpointNotFoundException.cs
System.ServiceModel/EnvelopeVersion.cs
System.ServiceModel/ExceptionDetail.cs
diff --git a/mcs/class/System.ServiceModel/net_4_0_System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/net_4_0_System.ServiceModel.dll.sources
new file mode 100644
index 00000000000..550ccf05bd4
--- /dev/null
+++ b/mcs/class/System.ServiceModel/net_4_0_System.ServiceModel.dll.sources
@@ -0,0 +1,40 @@
+../../build/common/Consts.cs
+../../build/common/MonoTODOAttribute.cs
+#include System.ServiceModel.dll.sources
+
+../System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter_1.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10ItemFormatter.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10ItemFormatter_1.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/AtomPub10CategoriesDocumentFormatter.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatter.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatter_1.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/CategoriesDocument.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/CategoriesDocumentFormatter.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/ISyndicationElement.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/InlineCategoriesDocument.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/ReferencedCategoriesDocument.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/ResourceCollectionInfo.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/Rss20FeedFormatter.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/Rss20FeedFormatter_1.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/Rss20ItemFormatter.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/Rss20ItemFormatter_1.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/ServiceDocument.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/ServiceDocumentFormatter.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationCategory.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationContent.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationElementExtension.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationElementExtensionCollection.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationExtensions.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationFeed.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationFeedFormatter.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationItem.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationItemFormatter.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationLink.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationPerson.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationVersions.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/TextSyndicationContent.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/TextSyndicationContentKind.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/UrlSyndicationContent.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/Workspace.cs
+../System.ServiceModel.Web/System.ServiceModel.Syndication/XmlSyndicationContent.cs
diff --git a/mcs/class/System.Transactions/System.Transactions/ChangeLog b/mcs/class/System.Transactions/System.Transactions/ChangeLog
index 40130e5b330..c1744ae9761 100644
--- a/mcs/class/System.Transactions/System.Transactions/ChangeLog
+++ b/mcs/class/System.Transactions/System.Transactions/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-03 Zoltan Varga <vargaz@gmail.com>
+
+ * TransactionAbortedException.cs: Make the default ctor public. Fixes #567872.
+
2009-02-02 Raja R Harinath <harinath@hurrynot.org>
Fix #463999
diff --git a/mcs/class/System.Transactions/System.Transactions/TransactionAbortedException.cs b/mcs/class/System.Transactions/System.Transactions/TransactionAbortedException.cs
index 1188b24e939..feca6fed6e5 100644
--- a/mcs/class/System.Transactions/System.Transactions/TransactionAbortedException.cs
+++ b/mcs/class/System.Transactions/System.Transactions/TransactionAbortedException.cs
@@ -15,7 +15,7 @@ namespace System.Transactions
[Serializable]
public class TransactionAbortedException : TransactionException
{
- protected TransactionAbortedException ()
+ public TransactionAbortedException ()
{
}
diff --git a/mcs/class/System.Web.DynamicData/ChangeLog b/mcs/class/System.Web.DynamicData/ChangeLog
index a73a0687409..95000c3970d 100644
--- a/mcs/class/System.Web.DynamicData/ChangeLog
+++ b/mcs/class/System.Web.DynamicData/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-18 Marek Habersack <mhabersack@novell.com>
+
+ * Makefile (EXTRA_DISTFILES): include test resources in
+ dist. Fixes bug #564987
+
2009-09-18 Marek Habersack <mhabersack@novell.com>
* Makefile (TEST_RESOURCE_FILES): added
diff --git a/mcs/class/System.Web.DynamicData/Makefile b/mcs/class/System.Web.DynamicData/Makefile
index 0ecb9566017..60e5a081a5c 100644
--- a/mcs/class/System.Web.DynamicData/Makefile
+++ b/mcs/class/System.Web.DynamicData/Makefile
@@ -168,7 +168,7 @@ NUNIT_RESOURCE_FILES = $(TEST_RESOURCE_FILES)
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -r:System.ComponentModel.DataAnnotations.dll -r:System.Configuration.dll $(NUNIT_RESOURCE_FILES:%=/resource:%) -r:SystemWebTestShim.dll
-EXTRA_DISTFILES =
+EXTRA_DISTFILES = $(foreach resource,$(TEST_RESOURCE_FILES), $(shell echo $(subst \`,\\\`,$(resource)) | cut -d ',' -f 1))
# This is a .NET 3.5+ assembly
VALID_PROFILE := $(filter net_2_0 net_4_0, $(PROFILE))
diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Services/ChangeLog b/mcs/class/System.Web.Extensions/System.Web.Script.Services/ChangeLog
index fc1dac2f1ca..81013c4703b 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Script.Services/ChangeLog
+++ b/mcs/class/System.Web.Extensions/System.Web.Script.Services/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-18 Marek Habersack <mhabersack@novell.com>
+
+ * LogicalTypeInfo.cs: partial revert of r146547. The 'd' wrapper
+ (and thus the JsonResult class) is needed after all. Fixes bug
+ #571365
+
+2009-11-19 Marek Habersack <mhabersack@novell.com>
+
+ * LogicalTypeInfo.cs: removed the JsonResult class - it has no use
+
2009-11-19 Marek Habersack <mhabersack@novell.com>
* LogicalTypeInfo.cs: removed the JsonResult class - it has no use
diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs b/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
index a3fc0924690..4c301e6dd7e 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
@@ -110,8 +110,12 @@ namespace System.Web.Script.Services
XmlTextWriter xwriter = new XmlTextWriter (writer);
xwriter.Formatting = Formatting.None;
_xmlSer.Serialize (xwriter, result);
- } else
+ }
+ else
+ {
+ result = new JsonResult (result);
LogicalTypeInfo.JSSerializer.Serialize (result, writer);
+ }
}
bool HasParameters { get { return _params != null && _params.Length > 0; } }
@@ -484,5 +488,13 @@ Type.registerNamespace('{0}');",
return tm;
}
+
+ sealed class JsonResult
+ {
+ public readonly object d;
+ public JsonResult (object result) {
+ d = result;
+ }
+ }
}
}
diff --git a/mcs/class/System.Web/ChangeLog b/mcs/class/System.Web/ChangeLog
index 2cf6b721101..e320faab9f3 100644
--- a/mcs/class/System.Web/ChangeLog
+++ b/mcs/class/System.Web/ChangeLog
@@ -1,3 +1,28 @@
+2010-01-19 Marek Habersack <mhabersack@novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx
+ and
+ Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx
+
+2010-01-15 Marek Habersack <mhabersack@novell.com>
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx
+
+2009-12-18 Marek Habersack <mhabersack@novell.com>
+
+ * System.Web_test.dll.sources: added
+ mainsoft/NunitWeb/NunitWeb/Tests/Author.cs
+ mainsoft/NunitWeb/NunitWeb/Tests/AuthorConverter.cs
+ mainsoft/NunitWeb/NunitWeb/Tests/Book.cs
+ mainsoft/NunitWeb/NunitWeb/Tests/BookType.cs
+
+ * Makefile (TEST_RESOURCE_FILES): added
+ Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx
+ Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx
+ Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs
+
2009-12-14 Marek Habersack <mhabersack@novell.com>
* Makefile (TEST_RESOURCE_FILES): added
diff --git a/mcs/class/System.Web/Makefile b/mcs/class/System.Web/Makefile
index b40a9dd7f67..49fc7a9561d 100644
--- a/mcs/class/System.Web/Makefile
+++ b/mcs/class/System.Web/Makefile
@@ -96,6 +96,7 @@ TEST_RESOURCE_FILES = \
Test/mainsoft/NunitWeb/NunitWeb/Resources/test_map_09.sitemap \
Test/mainsoft/NunitWebResources/App_GlobalResources/Common.resx \
Test/mainsoft/NunitWebResources/App_GlobalResources/Common.fr-FR.resx \
+ Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx \
Test/mainsoft/NunitWebResources/menuclass.aspx \
Test/mainsoft/NunitWebResources/FormView.aspx \
Test/mainsoft/NunitWebResources/PostBackMenuTest.aspx \
@@ -195,7 +196,12 @@ TEST_RESOURCE_FILES = \
Test/mainsoft/NunitWebResources/GlobalResourcesLocalization.aspx \
Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx \
Test/mainsoft/NunitWebResources/TableSections_Bug551666.aspx.cs \
- Test/mainsoft/NunitWebResources/NestedParserFileText.aspx
+ Test/mainsoft/NunitWebResources/NestedParserFileText.aspx \
+ Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx \
+ Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx \
+ Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs \
+ Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx \
+ Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx
RESX_DIST = resources/TranslationResources.resx
ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
diff --git a/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.cs
index 26224ce1881..dcdefa20f50 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.cs
@@ -278,7 +278,7 @@ namespace System.Web.Compilation
{
this.isGlobal = true;
this.files = new AppResourceFilesCollection (context);
- this.cultureFiles = new Dictionary <string, List <string>> ();
+ this.cultureFiles = new Dictionary <string, List <string>> (StringComparer.OrdinalIgnoreCase);
}
public AppResourcesCompiler (string virtualPath)
@@ -287,7 +287,7 @@ namespace System.Web.Compilation
this.virtualPath = virtualPath;
this.isGlobal = false;
this.files = new AppResourceFilesCollection (HttpContext.Current.Request.MapPath (virtualPath));
- this.cultureFiles = new Dictionary <string, List <string>> ();
+ this.cultureFiles = new Dictionary <string, List <string>> (StringComparer.OrdinalIgnoreCase);
}
static Assembly LoadAssembly (string asmPath)
diff --git a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
index 5ec02539812..079de78b561 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
@@ -216,7 +216,7 @@ namespace System.Web.Compilation
internal static Regex DirectiveRegex = new Regex (@"<%\s*@(\s*(?<attrname>\w[\w:]*(?=\W))(\s*(?<equal>=)\s*""(?<attrval>[^""]*)""|\s*(?<equal>=)\s*'(?<attrval>[^']*)'|\s*(?<equal>=)\s*(?<attrval>[^\s%>]*)|(?<equal>)(?<attrval>\s*?)))*\s*?%>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
#endif
- static readonly Regex runatServer = new Regex (@"<[\w:\.]+.*?runat=[""']?server[""']?.*?/?>",
+ static readonly Regex runatServer = new Regex (@"<[\w:\.]+.*?runat=[""']?server[""']?.*(?:/>|>)",
RegexOptions.Compiled | RegexOptions.Singleline |
RegexOptions.Multiline | RegexOptions.IgnoreCase |
RegexOptions.CultureInvariant);
diff --git a/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs b/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
index 3ca27ff2faf..74f1d5e7d64 100644
--- a/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
@@ -569,8 +569,13 @@ namespace System.Web.Compilation {
try {
bp.GenerateCode (abuilder);
} catch (Exception ex) {
- if (String.Compare (bvp, vpabsolute, stringComparer) == 0)
+ if (String.Compare (bvp, vpabsolute, stringComparer) == 0) {
+ if (ex is CompilationException || ex is ParseException)
+ throw;
+
throw new HttpException ("Code generation failed.", ex);
+ }
+
if (failedBuildProviders == null)
failedBuildProviders = new List <BuildProvider> ();
failedBuildProviders.Add (bp);
diff --git a/mcs/class/System.Web/System.Web.Compilation/BuildManagerDirectoryBuilder.cs b/mcs/class/System.Web/System.Web.Compilation/BuildManagerDirectoryBuilder.cs
index 00402540947..1afd6636dc0 100644
--- a/mcs/class/System.Web/System.Web.Compilation/BuildManagerDirectoryBuilder.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/BuildManagerDirectoryBuilder.cs
@@ -186,6 +186,7 @@ namespace System.Web.Compilation
depDir = VirtualPathUtility.GetDirectory (s); // dependencies are assumed to contain absolute paths
if (cache.ContainsKey (depDir))
continue;
+ cache.Add (depDir, true);
AddVirtualDir (GetVirtualDirectory (s), bpcoll, cache);
}
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/ChangeLog b/mcs/class/System.Web/System.Web.Compilation/ChangeLog
index 754082d863a..750d813e3d5 100644
--- a/mcs/class/System.Web/System.Web.Compilation/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Compilation/ChangeLog
@@ -1,3 +1,32 @@
+2010-01-19 Marek Habersack <mhabersack@novell.com>
+
+ * AspGenerator.cs: modified the runatServer regex to correctly
+ match embedded server tags which end in a sequence like: "%>"/>
+ Fixes bug #568631
+
+2010-01-06 Marek Habersack <mhabersack@novell.com>
+
+ * BuildManagerDirectoryBuilder.cs: AddVirtualDir properly caches
+ processed directories to prevent endless loops. Fixes bug #568366
+ Patch from Hubert FONGARNAND <informatique.internet@fiducial.fr>,
+ thanks!
+
+2010-01-05 Marek Habersack <mhabersack@novell.com>
+
+ * PageCompiler.cs: improved CreatePropertyAssign, it doesn't
+ always use CodePrimitiveExpression now.
+
+ * BuildManager.cs: in GenerateAssembly, if compilation fails for
+ the requested path and exception thrown is of type
+ CompilationException or ParseException, do not wrap it in
+ HttpException, just rethrow.
+
+ * AppResourcesCompiler.cs: the culture files dictionary is
+ case-insensitive now. Otherwise culture files with culture name
+ cased differently will cause overlapped i/o on response files
+ while building satellite assemblies and, in effect, compilation
+ will fail.
+
2009-12-14 Marek Habersack <mhabersack@novell.com>
* BuildManager.cs: RemoveFailedAssemblies ignores warnings to
diff --git a/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs
index 2a4642e9ea5..5c3fdc24c56 100644
--- a/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs
@@ -205,13 +205,38 @@ namespace System.Web.Compilation
mainClass.Members.Add (method);
}
+ static CodeExpression GetExpressionForValueAndType (object value, Type valueType)
+ {
+ // Put short circuit types here
+ if (valueType == typeof (TimeSpan)) {
+ CodeMethodReferenceExpression mref = new CodeMethodReferenceExpression (
+ new CodeTypeReferenceExpression (typeof (TimeSpan)),
+ "Parse");
+
+ return new CodeMethodInvokeExpression (
+ mref,
+ new CodeExpression[] { new CodePrimitiveExpression (((TimeSpan) value).ToString ()) }
+ );
+ }
+
+ throw new HttpException (String.Format ("Unable to create assign expression for type '{0}'.", valueType));
+ }
+
static CodeAssignStatement CreatePropertyAssign (CodeExpression expr, string name, object value)
{
- CodePropertyReferenceExpression prop;
- prop = new CodePropertyReferenceExpression (expr, name);
- CodePrimitiveExpression prim;
- prim = new CodePrimitiveExpression (value);
- return new CodeAssignStatement (prop, prim);
+ CodeExpression rhs;
+ if (value == null || value is string)
+ rhs = new CodePrimitiveExpression (value);
+ else {
+ Type vt = value.GetType ();
+
+ if (vt.IsPrimitive)
+ rhs = new CodePrimitiveExpression (value);
+ else
+ rhs = GetExpressionForValueAndType (value, vt);
+ }
+
+ return new CodeAssignStatement (new CodePropertyReferenceExpression (expr, name), rhs);
}
static CodeAssignStatement CreatePropertyAssign (string name, object value)
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
index 73a04162147..b5d909f1e81 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-09 Marek Habersack <mhabersack@novell.com>
+
+ * WebConfigurationManager.cs: GetSection properly handles looking
+ up and caching of <location> instances. Part of fix for bug
+ #568441
+
+ * WebConfigurationHost.cs: GetConfigPathFromLocationSubPath
+ calculatesthe path relative to the current config file path. Part
+ of fix for bug #568441
+
2009-12-02 Marek Habersack <mhabersack@novell.com>
* CompilationSection.cs: added new property -
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
index c8b0cda9159..552efa4cdb3 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationHost.cs
@@ -3,6 +3,7 @@
//
// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
+// Marek Habersack <mhabersack@novell.com>
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -23,7 +24,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2009 Novell, Inc (http://www.novell.com)
//
#if NET_2_0
@@ -87,9 +88,19 @@ namespace System.Web.Configuration
throw new NotImplementedException ();
}
- public virtual string GetConfigPathFromLocationSubPath (string configPath, string locatinSubPath)
+ public virtual string GetConfigPathFromLocationSubPath (string configPath, string locationSubPath)
{
- return configPath + "/" + locatinSubPath;
+ if (!String.IsNullOrEmpty (locationSubPath) && !String.IsNullOrEmpty (configPath)) {
+ string relConfigPath = configPath.Length == 1 ? null : configPath.Substring (1) + "/";
+ if (relConfigPath != null && locationSubPath.StartsWith (relConfigPath, StringComparison.Ordinal))
+ locationSubPath = locationSubPath.Substring (relConfigPath.Length);
+ }
+
+ string ret = configPath + "/" + locationSubPath;
+ if (!String.IsNullOrEmpty (ret) && ret [0] == '/')
+ return ret.Substring (1);
+
+ return ret;
}
public virtual Type GetConfigType (string typeName, bool throwOnError)
@@ -185,17 +196,14 @@ namespace System.Web.Configuration
locationConfigPath = null;
} else {
int i;
- if (locationSubPath == null)
- {
+ if (locationSubPath == null) {
configPath = fullPath;
if (configPath.Length > 1)
configPath = VirtualPathUtility.RemoveTrailingSlash (configPath);
- }
- else
+ } else
configPath = locationSubPath;
-
- if (configPath == HttpRuntime.AppDomainAppVirtualPath
- || configPath == "/")
+
+ if (configPath == HttpRuntime.AppDomainAppVirtualPath || configPath == "/")
i = -1;
else
i = configPath.LastIndexOf ("/");
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
index 18c5a686493..802039b93bb 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs
@@ -4,6 +4,7 @@
// Authors:
// Lluis Sanchez Gual (lluis@novell.com)
// Chris Toshok (toshok@ximian.com)
+// Marek Habersack <mhabersack@novell.com>
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -24,7 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2009 Novell, Inc (http://www.novell.com)
//
#if NET_2_0
@@ -50,7 +51,8 @@ namespace System.Web.Configuration {
public static class WebConfigurationManager
{
const int SAVE_LOCATIONS_CHECK_INTERVAL = 6000; // milliseconds
-
+
+ static readonly char[] pathTrimChars = { '/' };
static readonly object suppressAppReloadLock = new object ();
static readonly object saveLocationsCacheLock = new object ();
#if SYSTEMCORE_DEP
@@ -411,30 +413,58 @@ namespace System.Web.Configuration {
return GetSection (sectionName, path, HttpContext.Current);
}
+ static bool LookUpLocation (string relativePath, ref _Configuration defaultConfiguration)
+ {
+ if (String.IsNullOrEmpty (relativePath))
+ return false;
+
+ _Configuration cnew = defaultConfiguration.FindLocationConfiguration (relativePath, defaultConfiguration);
+ if (cnew == defaultConfiguration)
+ return false;
+
+ defaultConfiguration = cnew;
+ return true;
+ }
+
internal static object GetSection (string sectionName, string path, HttpContext context)
{
- // FindWebConfig must not be used here with its result being passed to
- // OpenWebConfiguration below. The reason is that if we have a request for
- // ~/somepath/, but FindWebConfig returns ~/ and the ~/web.config contains
- // <location path="somepath"> then OpenWebConfiguration will NOT return the
- // contents of <location>, thus leading to bugs (ignored authorization
- // section for instance)
- string config_vdir = FindWebConfig (path);
- if (String.IsNullOrEmpty (config_vdir))
- config_vdir = "/";
-
- int sectionCacheKey = GetSectionCacheKey (sectionName, config_vdir);
- object cachedSection;
+ if (String.IsNullOrEmpty (sectionName))
+ return null;
+
+ _Configuration c = OpenWebConfiguration (path, null, null, null, null, null, false);
+ string configPath = c.ConfigPath;
+ int baseCacheKey = 0;
+ int cacheKey;
+ bool pathPresent = !String.IsNullOrEmpty (path);
+ string locationPath = null;
bool locked = false;
+ if (pathPresent)
+ locationPath = "location_" + path;
+
+ baseCacheKey = sectionName.GetHashCode ();
+ if (configPath != null)
+ baseCacheKey ^= configPath.GetHashCode ();
+
try {
#if SYSTEMCORE_DEP
sectionCacheLock.EnterReadLock ();
#endif
locked = true;
- if (sectionCache.TryGetValue (sectionCacheKey, out cachedSection) && cachedSection != null)
- return cachedSection;
+ object o;
+ if (pathPresent) {
+ cacheKey = baseCacheKey ^ locationPath.GetHashCode ();
+ if (sectionCache.TryGetValue (cacheKey, out o))
+ return o;
+
+ cacheKey = baseCacheKey ^ path.GetHashCode ();
+ if (sectionCache.TryGetValue (cacheKey, out o))
+ return o;
+ }
+
+ if (sectionCache.TryGetValue (baseCacheKey, out o))
+ return o;
} finally {
#if SYSTEMCORE_DEP
if (locked)
@@ -442,14 +472,38 @@ namespace System.Web.Configuration {
#endif
}
- HttpRequest req = context != null ? context.Request : null;
- _Configuration c = OpenWebConfiguration (path, /* path */
- null, /* site */
- req != null ? VirtualPathUtility.GetDirectory (req.Path) : null, /* locationSubPath */
- null, /* server */
- null, /* userName */
- null, /* password */
- false /* path from FindWebConfig */);
+ string cachePath = null;
+ if (pathPresent) {
+ string relPath;
+
+ if (VirtualPathUtility.IsRooted (path)) {
+ if (path [0] == '~')
+ relPath = path.Substring (2);
+ else if (path [0] == '/')
+ relPath = path.Substring (1);
+ else
+ relPath = path;
+ } else
+ relPath = path;
+
+ _Configuration cnew;
+
+ HttpRequest req = context != null ? context.Request : null;
+ if (req != null) {
+ string vdir = VirtualPathUtility.GetDirectory (req.Path);
+ if (vdir != null) {
+ vdir = vdir.TrimEnd (pathTrimChars);
+ if (String.Compare (c.ConfigPath, vdir, StringComparison.Ordinal) != 0 && LookUpLocation (vdir.Trim (pathTrimChars), ref c))
+ cachePath = path;
+ }
+ }
+
+ if (LookUpLocation (relPath, ref c))
+ cachePath = locationPath;
+ else
+ cachePath = path;
+ }
+
ConfigurationSection section = c.GetSection (sectionName);
if (section == null)
return null;
@@ -461,18 +515,20 @@ namespace System.Web.Configuration {
collection = new KeyValueMergedCollection (HttpContext.Current, (NameValueCollection) value);
value = collection;
}
-
- AddSectionToCache (sectionCacheKey, value);
- return value;
#else
#if MONOWEB_DEP
object value = SettingsMappingManager.MapSection (get_runtime_object.Invoke (section, new object [0]));
#else
object value = null;
#endif
- AddSectionToCache (sectionCacheKey, value);
- return value;
#endif
+ if (cachePath != null)
+ cacheKey = baseCacheKey ^ cachePath.GetHashCode ();
+ else
+ cacheKey = baseCacheKey;
+
+ AddSectionToCache (cacheKey, value);
+ return value;
}
static string MapPath (HttpRequest req, string virtualPath)
@@ -638,13 +694,6 @@ namespace System.Web.Configuration {
#endif
}
}
-
- static int GetSectionCacheKey (string sectionName, string vdir)
- {
- return (sectionName != null ? sectionName.GetHashCode () : 0) ^
- ((vdir != null ? vdir.GetHashCode () : 0) + 37);
- }
-
#region stuff copied from WebConfigurationSettings
#if TARGET_J2EE
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
index 8599ca18265..3b3073158da 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-22 Marek Habersack <mhabersack@novell.com>
+
+ * HtmlForm.cs: RenderChildren is slightly more efficient now.
+
2009-11-13 Marek Habersack <mhabersack@novell.com>
* HtmlForm.cs: reverted part of the previous patch - action is not
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
index b78619f09de..0cfe9632593 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
@@ -406,15 +406,19 @@ namespace System.Web.UI.HtmlControls
#endif
override void RenderChildren (HtmlTextWriter w)
{
- if (!inited) {
- Page.RegisterViewStateHandler ();
+ Page page = Page;
+
+ if (!inited && page != null) {
+ page.RegisterViewStateHandler ();
#if NET_2_0
- Page.RegisterForm (this);
+ page.RegisterForm (this);
#endif
}
- Page.OnFormRender (w, ClientID);
+ if (page != null)
+ page.OnFormRender (w, ClientID);
base.RenderChildren (w);
- Page.OnFormPostRender (w, ClientID);
+ if (page != null)
+ page.OnFormPostRender (w, ClientID);
}
#if NET_2_0
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
index d362b2c0e03..26a67246b31 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-18 Marek Habersack <mhabersack@novell.com>
+
+ * Parameter.cs: added missing 3.5 APIs - constructors taking
+ DbType as one of the parameters, ConvertDbTypeToTypeCode,
+ ConvertTypeCodeToDbType and GetDatabaseType. Fixes bug #567850
+
+2010-01-15 Marek Habersack <mhabersack@novell.com>
+
+ * ChangePassword.cs: BaseChangePasswordContainer forwards
+ EnsureChildControls call to its owner, so that finding controls in
+ the container works correctly.
+
2009-11-30 Marek Habersack <mhabersack@novell.com>
* WebControl.cs: HasAttributes made available as internal for 1.1
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs b/mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs
index 64c019b0e38..5d29f05fcd2 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs
@@ -1148,7 +1148,7 @@ namespace System.Web.UI.WebControls
#endregion
- class BaseChangePasswordContainer : Table, INamingContainer, INonBindingContainer
+ class BaseChangePasswordContainer : Table, INamingContainer, INonBindingContainer
{
protected readonly ChangePassword _owner = null;
TableCell _containerCell = null;
@@ -1183,6 +1183,15 @@ namespace System.Web.UI.WebControls
ApplyStyle (_owner.ControlStyle);
base.OnPreRender (e);
}
+
+ protected override void EnsureChildControls ()
+ {
+ base.EnsureChildControls ();
+
+ // it's the owner who adds controls, not us
+ if (_owner != null)
+ _owner.EnsureChildControls ();
+ }
}
sealed class ChangePasswordContainer : BaseChangePasswordContainer
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs b/mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs
index c64bb93c9cd..0c14622f03d 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs
@@ -31,6 +31,7 @@
#if NET_2_0
using System.Collections;
using System.Collections.Specialized;
+using System.Data;
using System.Text;
using System.ComponentModel;
using System.Reflection;
@@ -66,6 +67,12 @@ namespace System.Web.UI.WebControls {
ControlID = controlID;
PropertyName = propertyName;
}
+
+ public ControlParameter (string name, DbType dbType, string controlID, string propertyName) : base (name, dbType)
+ {
+ ControlID = controlID;
+ PropertyName = propertyName;
+ }
protected override Parameter Clone ()
{
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs
index 79a8d05037e..81faca7b4bb 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs
@@ -68,6 +68,149 @@ namespace System.Web.UI.WebControls {
{
this.DefaultValue = defaultValue;
}
+
+ public Parameter (string name, DbType dbType) : this (name)
+ {
+ this.DbType = dbType;
+ }
+
+ public Parameter (string name, DbType dbType, string defaultValue) : this (name, dbType)
+ {
+ this.DefaultValue = defaultValue;
+ }
+
+ public static TypeCode ConvertDbTypeToTypeCode (DbType dbType)
+ {
+ switch (dbType) {
+ case DbType.AnsiString:
+ case DbType.AnsiStringFixedLength:
+ case DbType.StringFixedLength:
+ case DbType.String:
+ return TypeCode.String;
+
+ case DbType.Binary:
+ case DbType.Guid:
+ case DbType.Object:
+ case DbType.Xml:
+ case DbType.DateTimeOffset:
+ return TypeCode.Object;
+
+ case DbType.Byte:
+ return TypeCode.Byte;
+
+ case DbType.Boolean:
+ return TypeCode.Boolean;
+
+ case DbType.Currency:
+ case DbType.Decimal:
+ case DbType.VarNumeric:
+ return TypeCode.Decimal;
+
+ case DbType.Date:
+ case DbType.DateTime:
+ case DbType.DateTime2:
+ case DbType.Time:
+ return TypeCode.DateTime;
+
+ case DbType.Double:
+ return TypeCode.Double;
+
+ case DbType.Int16:
+ return TypeCode.Int16;
+
+ case DbType.Int32:
+ return TypeCode.Int32;
+
+ case DbType.Int64:
+ return TypeCode.Int64;
+
+ case DbType.SByte:
+ return TypeCode.SByte;
+
+ case DbType.Single:
+ return TypeCode.Single;
+
+ case DbType.UInt16:
+ return TypeCode.UInt16;
+
+ case DbType.UInt32:
+ return TypeCode.UInt32;
+
+ case DbType.UInt64:
+ return TypeCode.UInt64;
+
+ default:
+ return TypeCode.Object;
+ }
+ }
+
+ public static DbType ConvertTypeCodeToDbType (TypeCode typeCode)
+ {
+ switch (typeCode) {
+ case TypeCode.Empty:
+ case TypeCode.Object:
+ case TypeCode.DBNull:
+ return DbType.Object;
+
+ case TypeCode.Boolean:
+ return DbType.Boolean;
+
+ case TypeCode.Char:
+ return DbType.StringFixedLength;
+
+ case TypeCode.SByte:
+ return DbType.SByte;
+
+ case TypeCode.Byte:
+ return DbType.Byte;
+
+ case TypeCode.Int16:
+ return DbType.Int16;
+
+ case TypeCode.UInt16:
+ return DbType.UInt16;
+
+ case TypeCode.Int32:
+ return DbType.Int32;
+
+ case TypeCode.UInt32:
+ return DbType.UInt32;
+
+ case TypeCode.Int64:
+ return DbType.Int64;
+
+ case TypeCode.UInt64:
+ return DbType.UInt64;
+
+ case TypeCode.Single:
+ return DbType.Single;
+
+ case TypeCode.Double:
+ return DbType.Double;
+
+ case TypeCode.Decimal:
+ return DbType.Decimal;
+
+ case TypeCode.DateTime:
+ return DbType.DateTime;
+
+ case TypeCode.String:
+ return DbType.String;
+
+ default:
+ return DbType.Object;
+ }
+ }
+
+ public DbType GetDatabaseType ()
+ {
+ DbType dt = this.DbType;
+
+ if (dt != DbType.Object)
+ throw new InvalidOperationException ("The DbType property is already set to a value other than DbType.Object.");
+
+ return ConvertTypeCodeToDbType (this.Type);
+ }
protected virtual Parameter Clone ()
{
@@ -224,8 +367,7 @@ namespace System.Web.UI.WebControls {
[DefaultValueAttribute (TypeCode.Empty)]
[WebCategoryAttribute ("Parameter"),
WebSysDescriptionAttribute("Represents type of the parameter.")]
- public TypeCode Type
- {
+ public TypeCode Type {
get { return (TypeCode) ViewState.GetInt ("Type", (int)TypeCode.Empty); }
set {
diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog
index 4800a4e86e7..b5fa0fb6488 100644
--- a/mcs/class/System.Web/System.Web.UI/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI/ChangeLog
@@ -1,3 +1,28 @@
+2010-01-20 Marek Habersack <mhabersack@novell.com>
+
+ * ObjectStateFormatter.cs: implemented support for IndexedString
+ on top of the existing StringFormatter.
+
+ * IndexedString.cs: implemented
+
+2009-12-22 Marek Habersack <mhabersack@novell.com>
+
+ * Page.cs: form javascript declaration block is rendered only if
+ necessary. Fixes bug #566541
+
+ * ClientScriptManager.cs: added internal property ScriptsPresent
+ used to determine if it is necessary to render form javascript
+ declaration block.
+ Hidden fields block is output without indenting the controls and
+ without rendering trailing empty line.
+ Made Write{Begin,End}ScriptBlock slightly faster.
+
+2009-12-18 Marek Habersack <mhabersack@novell.com>
+
+ * ObjectStateFormatter.cs: ObjectFormatter.WriteObject checks
+ whether candidate converter can convert from string now. Fixes bug
+ #565547
+
2009-11-14 Marek Habersack <mhabersack@novell.com>
* TemplateControl.cs: if writer is null in
diff --git a/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs b/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
index e7d4a7c5bc1..60d8c302b49 100644
--- a/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
+++ b/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
@@ -66,6 +66,21 @@ namespace System.Web.UI
bool _hasRegisteredForEventValidationOnCallback;
bool _pageInRender;
bool _initCallBackRegistered;
+ bool _webFormClientScriptRendered;
+ bool _webFormClientScriptRequired;
+
+ internal bool ScriptsPresent {
+ get {
+ return _webFormClientScriptRequired ||
+ _initCallBackRegistered ||
+ _hasRegisteredForEventValidationOnCallback ||
+ clientScriptBlocks != null ||
+ startupScriptBlocks != null ||
+ submitStatements != null ||
+ registeredArrayDeclares != null ||
+ expandoAttributes != null;
+ }
+ }
#endif
internal ClientScriptManager (Page page)
@@ -181,9 +196,6 @@ namespace System.Web.UI
_webFormClientScriptRequired = true;
}
- bool _webFormClientScriptRendered;
- bool _webFormClientScriptRequired;
-
internal void WriteWebFormClientScript (HtmlTextWriter writer) {
if (!_webFormClientScriptRendered && _webFormClientScriptRequired) {
writer.WriteLine ();
@@ -309,6 +321,7 @@ namespace System.Web.UI
registeredArrayDeclares.Add (arrayName, new ArrayList());
((ArrayList) registeredArrayDeclares[arrayName]).Add(arrayValue);
+ page.RequiresFormScriptDeclaration ();
}
void RegisterScript (ref ScriptEntry scriptList, Type type, string key, string script, bool addScriptTags)
@@ -627,25 +640,22 @@ namespace System.Web.UI
#if NET_2_0
internal const string SCRIPT_BLOCK_START = "//<![CDATA[";
internal const string SCRIPT_BLOCK_END = "//]]>";
+ internal const string SCRIPT_ELEMENT_START = @"<script type=""text/javascript"">" + SCRIPT_BLOCK_START;
#else
internal const string SCRIPT_BLOCK_START = "<!--";
internal const string SCRIPT_BLOCK_END ="// -->";
+ internal const string SCRIPT_ELEMENT_START = @"<script language=""javascript"" type=""text/javascript"">" + SCRIPT_BLOCK_START;
#endif
+ internal const string SCRIPT_ELEMENT_END = SCRIPT_BLOCK_END + "</script>";
internal static void WriteBeginScriptBlock (HtmlTextWriter writer)
{
- writer.WriteLine ("<script"+
-#if !NET_2_0
- " language=\"javascript\""+
-#endif
- " type=\"text/javascript\">");
- writer.WriteLine (SCRIPT_BLOCK_START);
+ writer.WriteLine (SCRIPT_ELEMENT_START);
}
internal static void WriteEndScriptBlock (HtmlTextWriter writer)
{
- writer.WriteLine (SCRIPT_BLOCK_END);
- writer.WriteLine ("</script>");
+ writer.WriteLine (SCRIPT_ELEMENT_END);
}
internal void WriteHiddenFields (HtmlTextWriter writer)
@@ -654,18 +664,28 @@ namespace System.Web.UI
return;
#if NET_2_0
+ writer.WriteLine ();
writer.RenderBeginTag (HtmlTextWriterTag.Div);
+ int oldIndent = writer.Indent;
+ writer.Indent = 0;
#endif
+ bool first = true;
foreach (string key in hiddenFields.Keys) {
string value = hiddenFields [key] as string;
+ if (first)
+ first = false;
+ else
+ writer.WriteLine ();
#if NET_2_0
- writer.WriteLine ("<input type=\"hidden\" name=\"{0}\" id=\"{0}\" value=\"{1}\" />", key, HttpUtility.HtmlAttributeEncode (value));
+ writer.Write ("<input type=\"hidden\" name=\"{0}\" id=\"{0}\" value=\"{1}\" />", key, HttpUtility.HtmlAttributeEncode (value));
#else
- writer.WriteLine ("<input type=\"hidden\" name=\"{0}\" value=\"{1}\" />", key, HttpUtility.HtmlAttributeEncode (value));
+ writer.Write ("<input type=\"hidden\" name=\"{0}\" value=\"{1}\" />", key, HttpUtility.HtmlAttributeEncode (value));
#endif
}
#if NET_2_0
+ writer.Indent = oldIndent;
writer.RenderEndTag (); // DIV
+ writer.WriteLine ();
#endif
hiddenFields = null;
}
diff --git a/mcs/class/System.Web/System.Web.UI/IndexedString.cs b/mcs/class/System.Web/System.Web.UI/IndexedString.cs
index 24441fee8ef..da40d236cae 100644
--- a/mcs/class/System.Web/System.Web.UI/IndexedString.cs
+++ b/mcs/class/System.Web/System.Web.UI/IndexedString.cs
@@ -29,6 +29,8 @@
//
#if NET_2_0
+using System;
+
namespace System.Web.UI
{
[SerializableAttribute]
@@ -36,10 +38,16 @@ namespace System.Web.UI
{
public IndexedString (string s)
{
- throw new NotImplementedException ();
+ if (String.IsNullOrEmpty (s))
+ throw new ArgumentNullException ("s");
+
+ Value = s;
}
- public string Value { get { throw new NotImplementedException (); } }
+ public string Value {
+ get;
+ private set;
+ }
}
}
#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs b/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs
index f8f7ce656e9..a73e4af89ed 100644
--- a/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs
+++ b/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs
@@ -6,7 +6,7 @@
// Gonzalo Paniagua (gonzalo@ximian.com)
//
// (C) 2003 Ben Maurer
-// (c) Copyright 2004-2008 Novell, Inc. (http://www.novell.com)
+// (c) Copyright 2004-2010 Novell, Inc. (http://www.novell.com)
//
//
@@ -254,7 +254,7 @@ namespace System.Web.UI {
#region Object Readers/Writers
- class WriterContext
+ sealed class WriterContext
{
Hashtable cache;
short nextKey = 0;
@@ -286,7 +286,7 @@ namespace System.Web.UI {
}
}
- class ReaderContext
+ sealed class ReaderContext
{
ArrayList cache;
@@ -331,6 +331,9 @@ namespace System.Web.UI {
new ObjectArrayFormatter ().Register ();
new UnitFormatter ().Register ();
new FontUnitFormatter ().Register ();
+#if NET_2_0
+ new IndexedStringFormatter ().Register ();
+#endif
new ColorFormatter ().Register ();
@@ -439,7 +442,8 @@ namespace System.Web.UI {
// consisting of a call to ToString() with no
// reverse conversion supported. This leads to
// problems when deserializing the object.
- if (converter == null || converter.GetType () == typeof (TypeConverter) || !converter.CanConvertTo (typeof (string)))
+ if (converter == null || converter.GetType () == typeof (TypeConverter) ||
+ !converter.CanConvertTo (typeof (string)) || !converter.CanConvertFrom (typeof (string)))
fmt = binaryObjectFormatter;
else {
typeConverterFormatter.Converter = converter;
@@ -531,7 +535,37 @@ namespace System.Web.UI {
get { return 2; }
}
}
-
+#if NET_2_0
+ class IndexedStringFormatter : StringFormatter
+ {
+ protected override void Write (BinaryWriter w, object o, WriterContext ctx)
+ {
+ IndexedString s = o as IndexedString;
+
+ if (s == null)
+ throw new InvalidOperationException ("object is not of the IndexedString type");
+
+ base.Write (w, s.Value, ctx);
+ }
+
+ protected override object Read (byte token, BinaryReader r, ReaderContext ctx)
+ {
+ string s = base.Read (token, r, ctx) as string;
+ if (String.IsNullOrEmpty (s))
+ throw new InvalidOperationException ("string must not be null or empty.");
+
+ return new IndexedString (s);
+ }
+
+ protected override Type Type {
+ get { return typeof (IndexedString); }
+ }
+
+ protected override int NumberOfIds {
+ get { return 2; }
+ }
+ }
+#endif
class Int64Formatter : ObjectFormatter
{
protected override void Write (BinaryWriter w, object o, WriterContext ctx)
diff --git a/mcs/class/System.Web/System.Web.UI/Page.cs b/mcs/class/System.Web/System.Web.UI/Page.cs
index bfbeca58dc5..2148abd64db 100644
--- a/mcs/class/System.Web/System.Web.UI/Page.cs
+++ b/mcs/class/System.Web/System.Web.UI/Page.cs
@@ -99,6 +99,8 @@ public partial class Page : TemplateControl, IHttpHandler
NameValueCollection secondPostData;
bool requiresPostBackScript;
bool postBackScriptRendered;
+ bool requiresFormScriptDeclaration;
+ bool formScriptDeclarationRendered;
bool handleViewState;
string viewStateUserKey;
NameValueCollection _requestValueCollection;
@@ -945,6 +947,11 @@ public partial class Page : TemplateControl, IHttpHandler
return scriptManager.GetPostBackEventReference (control, argument);
}
+ internal void RequiresFormScriptDeclaration ()
+ {
+ requiresFormScriptDeclaration = true;
+ }
+
internal void RequiresPostBackScript ()
{
#if NET_2_0
@@ -954,6 +961,7 @@ public partial class Page : TemplateControl, IHttpHandler
ClientScript.RegisterHiddenField (postEventArgumentID, String.Empty);
#endif
requiresPostBackScript = true;
+ RequiresFormScriptDeclaration ();
}
[EditorBrowsable (EditorBrowsableState.Never)]
@@ -1147,7 +1155,7 @@ public partial class Page : TemplateControl, IHttpHandler
ClientScriptManager.WriteBeginScriptBlock (writer);
-#if ONLY_1_1
+#if NET_1_1
RenderClientScriptFormDeclaration (writer, formUniqueID);
#endif
#if NET_2_0
@@ -1167,6 +1175,9 @@ public partial class Page : TemplateControl, IHttpHandler
void RenderClientScriptFormDeclaration (HtmlTextWriter writer, string formUniqueID)
{
+ if (formScriptDeclarationRendered)
+ return;
+
#if NET_2_0
if (PageAdapter != null) {
writer.WriteLine ("\tvar {0} = {1};\n", theForm, PageAdapter.GetPostBackFormReference(formUniqueID));
@@ -1183,6 +1194,7 @@ public partial class Page : TemplateControl, IHttpHandler
writer.WriteLine ("\twindow.TARGET_J2EE = true;");
writer.WriteLine ("\twindow.IsMultiForm = {0};", IsMultiForm ? "true" : "false");
#endif
+ formScriptDeclarationRendered = true;
}
internal void OnFormRender (HtmlTextWriter writer, string formUniqueID)
@@ -1194,9 +1206,11 @@ public partial class Page : TemplateControl, IHttpHandler
writer.WriteLine ();
#if NET_2_0
- ClientScriptManager.WriteBeginScriptBlock (writer);
- RenderClientScriptFormDeclaration (writer, formUniqueID);
- ClientScriptManager.WriteEndScriptBlock (writer);
+ if (requiresFormScriptDeclaration || (scriptManager != null && scriptManager.ScriptsPresent) || PageAdapter != null) {
+ ClientScriptManager.WriteBeginScriptBlock (writer);
+ RenderClientScriptFormDeclaration (writer, formUniqueID);
+ ClientScriptManager.WriteEndScriptBlock (writer);
+ }
#endif
if (handleViewState)
diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog
index f95f1085c91..3b507fb589a 100644
--- a/mcs/class/System.Web/System.Web/ChangeLog
+++ b/mcs/class/System.Web/System.Web/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-19 Marek Habersack <mhabersack@novell.com>
+
+ * StaticSiteMapProvider.cs: AddNode checks the url of node
+ returned by FindSiteMapNode to see if it indeed was a
+ duplicate. It is necessary if application derives from
+ StaticSiteMapProvider and overrides FindSiteMapNode to return
+ RootNode if rawUrl doesn't match any existing node. Fixes bug
+ #570194
+
+2010-01-09 Marek Habersack <mhabersack@novell.com>
+
+ * VirtualPathUtility.cs: small optimizations for GetDirectory
+
2009-11-23 Marek Habersack <mhabersack@novell.com>
* HttpRequest.cs: PathInfo returns an empty string when worker
diff --git a/mcs/class/System.Web/System.Web/StaticSiteMapProvider.cs b/mcs/class/System.Web/System.Web/StaticSiteMapProvider.cs
index 705fecccd1f..ff666c9bede 100644
--- a/mcs/class/System.Web/System.Web/StaticSiteMapProvider.cs
+++ b/mcs/class/System.Web/System.Web/StaticSiteMapProvider.cs
@@ -39,11 +39,13 @@ namespace System.Web
{
public abstract class StaticSiteMapProvider : SiteMapProvider
{
+ static readonly StringComparison stringComparison = HttpRuntime.CaseInsensitive ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
+
Dictionary<string, SiteMapNode> keyToNode;
Dictionary<SiteMapNode, SiteMapNode> nodeToParent;
Dictionary<SiteMapNode, SiteMapNodeCollection> nodeToChildren;
Dictionary<string, SiteMapNode> urlToNode;
-
+
protected StaticSiteMapProvider ()
{
keyToNode = new Dictionary<string, SiteMapNode> ();
@@ -58,13 +60,15 @@ namespace System.Web
throw new ArgumentNullException ("node");
lock (this_lock) {
- if (FindSiteMapNodeFromKey (node.Key) != null && node.Provider == this)
- throw new InvalidOperationException (string.Format ("A node with key '{0}' already exists.",node.Key));
-
- if (!String.IsNullOrEmpty (node.Url)) {
- string url = MapUrl (node.Url);
-
- if (FindSiteMapNode (url) != null)
+ string nodeKey = node.Key;
+ if (FindSiteMapNodeFromKey (nodeKey) != null && node.Provider == this)
+ throw new InvalidOperationException (string.Format ("A node with key '{0}' already exists.",nodeKey));
+
+ string nodeUrl = node.Url;
+ if (!String.IsNullOrEmpty (nodeUrl)) {
+ string url = MapUrl (nodeUrl);
+ SiteMapNode foundNode = FindSiteMapNode (url);
+ if (foundNode != null && String.Compare (foundNode.Url, url, stringComparison) == 0)
throw new InvalidOperationException (String.Format (
"Multiple nodes with the same URL '{0}' were found. " +
"StaticSiteMapProvider requires that sitemap nodes have unique URLs.",
@@ -73,7 +77,7 @@ namespace System.Web
urlToNode.Add (url, node);
}
- keyToNode.Add (node.Key, node);
+ keyToNode.Add (nodeKey, node);
if (node == RootNode)
return;
@@ -113,10 +117,10 @@ namespace System.Web
SiteMapNode node;
if (VirtualPathUtility.IsAppRelative (rawUrl))
rawUrl = VirtualPathUtility.ToAbsolute (rawUrl, HttpRuntime.AppDomainAppVirtualPath, false);
-
+
if (!urlToNode.TryGetValue (rawUrl, out node))
return null;
-
+
return CheckAccessibility (node);
}
diff --git a/mcs/class/System.Web/System.Web/VirtualPathUtility.cs b/mcs/class/System.Web/System.Web/VirtualPathUtility.cs
index c8bf66a7689..1e6900c4e90 100644
--- a/mcs/class/System.Web/System.Web/VirtualPathUtility.cs
+++ b/mcs/class/System.Web/System.Web/VirtualPathUtility.cs
@@ -102,15 +102,16 @@ namespace System.Web {
if (normalize)
virtualPath = Normalize (virtualPath);
- if (IsAppRelative (virtualPath) && virtualPath.Length < 3) { // "~" or "~/"
+ int vpLen = virtualPath.Length;
+ if (IsAppRelative (virtualPath) && vpLen < 3) { // "~" or "~/"
virtualPath = ToAbsolute (virtualPath);
+ vpLen = virtualPath.Length;
}
- if (virtualPath.Length == 1 && virtualPath [0] == '/') { // "/"
+ if (vpLen == 1 && virtualPath [0] == '/') // "/"
return null;
- }
- int last = virtualPath.LastIndexOf ('/', virtualPath.Length - 2, virtualPath.Length - 2);
+ int last = virtualPath.LastIndexOf ('/', vpLen - 2, vpLen - 2);
if (last > 0)
return virtualPath.Substring (0, last + 1);
else
diff --git a/mcs/class/System.Web/System.Web_test.dll.sources b/mcs/class/System.Web/System.Web_test.dll.sources
index 99de2ed3a05..d8585f72d92 100644
--- a/mcs/class/System.Web/System.Web_test.dll.sources
+++ b/mcs/class/System.Web/System.Web_test.dll.sources
@@ -38,6 +38,10 @@ mainsoft/NunitWeb/NunitWeb/WebTest.cs
mainsoft/NunitWeb/NunitWeb/WebTestResourcesSetupAttribute.cs
mainsoft/NunitWeb/NunitWeb/Tests/TagsNestedInClientTag.cs
mainsoft/NunitWeb/NunitWeb/Tests/TestSiteMapProvider.cs
+mainsoft/NunitWeb/NunitWeb/Tests/Author.cs
+mainsoft/NunitWeb/NunitWeb/Tests/AuthorConverter.cs
+mainsoft/NunitWeb/NunitWeb/Tests/Book.cs
+mainsoft/NunitWeb/NunitWeb/Tests/BookType.cs
System.Web/AppBrowsersTest.cs
System.Web/HttpBrowserCapabilitiesTest.cs
System.Web/HttpCacheVaryByContentEncodingsTest.cs
@@ -134,6 +138,7 @@ System.Web.UI.HtmlControls/HtmlTextAreaTest.cs
System.Web.UI/DataSourceSelectArgumentsTest.cs
System.Web.UI/HtmlTextWriterTest.cs
System.Web.UI/MinimizableAttributeTypeConverterTest.cs
+System.Web.UI/ObjectStateFormatterTest.cs
System.Web.UI/OutputCacheParametersTest.cs
System.Web.UI/PageParserTest.cs
System.Web.UI/PageParserFilterTest.cs
diff --git a/mcs/class/System.Web/Test/System.Web.Compilation/ChangeLog b/mcs/class/System.Web/Test/System.Web.Compilation/ChangeLog
index ffc517f9ae6..d059f5858af 100644
--- a/mcs/class/System.Web/Test/System.Web.Compilation/ChangeLog
+++ b/mcs/class/System.Web/Test/System.Web.Compilation/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-19 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateControlCompilerTest.cs: added test for bug #568631
+
2009-08-26 Marek Habersack <mhabersack@novell.com>
* TemplateControlCompilerTest.cs: added test for bug #400807
diff --git a/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs b/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs
index add5e421c6f..eb8efdff217 100644
--- a/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs
@@ -81,6 +81,7 @@ namespace MonoTests.System.Web.Compilation {
WebTest.CopyResource (GetType (), "PreprocessorDirectivesInMarkup.aspx", "PreprocessorDirectivesInMarkup.aspx");
WebTest.CopyResource (GetType (), "OneLetterIdentifierInCodeRender.aspx", "OneLetterIdentifierInCodeRender.aspx");
WebTest.CopyResource (GetType (), "NestedParserFileText.aspx", "NestedParserFileText.aspx");
+ WebTest.CopyResource (GetType (), "TagWithExpressionWithinAttribute.aspx", "TagWithExpressionWithinAttribute.aspx");
#endif
}
@@ -254,6 +255,13 @@ namespace MonoTests.System.Web.Compilation {
// Just test if it doesn't throw an exception
new WebTest ("NestedParserFileText.aspx").Run ();
}
+
+ [Test (Description="Bug #568631")]
+ public void TagWithExpressionWithinAttribute ()
+ {
+ // Just test if it doesn't throw an exception
+ new WebTest ("TagWithExpressionWithinAttribute.aspx").Run ();
+ }
#endif
[Test (Description="Bug #323719")]
public void TagsNestedInClientTag ()
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
index c6ba9e7acd2..797dbd7b7dc 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-18 Marek Habersack <mhabersack@novell.com>
+
+ * ParameterTest.cs: added tests for ConvertDbTypeToTypeCode,
+ ConvertTypeCodeToDbType and constructors taking DbType as one of
+ the parameters.
+
+2010-01-15 Marek Habersack <mhabersack@novell.com>
+
+ * ChangePasswordTest.cs: added test for looking for controls in
+ ChangePassword template containers.
+
2009-11-16 Marek Habersack <mhabersack@novell.com>
* TreeNodeTest.cs: added test for a situation when a
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangePasswordTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangePasswordTest.cs
index 87b9d90c67d..6850a906c05 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangePasswordTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangePasswordTest.cs
@@ -132,6 +132,7 @@ namespace MonoTests.System.Web.UI.WebControls
[TestFixtureSetUp]
public void CopyTestResources ()
{
+ WebTest.CopyResource (GetType (), "ChangePasswordContainer_FindControl.aspx", "ChangePasswordContainer_FindControl.aspx");
}
[Test]
@@ -794,6 +795,23 @@ namespace MonoTests.System.Web.UI.WebControls
Assert.AreEqual (Membership.Provider.GetType (), typeof (FakeMembershipProvider), "Membership.Provider.GetType ()");
}
+ [Test]
+ public void ChangePasswordContainer_FindControl ()
+ {
+ WebTest t = new WebTest ("ChangePasswordContainer_FindControl.aspx");
+ t.Invoker = PageInvoker.CreateOnLoad (new PageDelegate (ChangePasswordContainer_FindControl_OnLoad));
+ t.Run ();
+ }
+
+ public static void ChangePasswordContainer_FindControl_OnLoad (Page p)
+ {
+ ChangePassword cp = p.FindControl ("ChangePassword1") as ChangePassword;
+ Assert.IsNotNull (cp, "#A1");
+
+ RequiredFieldValidator rfv = cp.ChangePasswordTemplateContainer.FindControl ("text1required") as RequiredFieldValidator;
+ Assert.IsNotNull (rfv, "#A2");
+ }
+
[TestFixtureTearDown]
public void TearDown ()
{
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ParameterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ParameterTest.cs
index f41739d3a33..7e0399b0bd9 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ParameterTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ParameterTest.cs
@@ -274,6 +274,80 @@ namespace MonoTests.System.Web.UI.WebControls
Assert.AreEqual ("ID", copy.Name, "Name");
}
+
+ [Test]
+ public void Parameter_DbTypeConstructors ()
+ {
+ int counter = 1;
+
+ foreach (var e in Enum.GetValues (typeof (DbType))) {
+ var p = new Parameter ("name", (DbType)e);
+ Assert.AreEqual (p.DbType, (DbType)e, "#A" + counter.ToString ());
+ counter++;
+ }
+
+ counter = 1;
+ foreach (var e in Enum.GetValues (typeof (DbType))) {
+ var p = new Parameter ("name", (DbType)e, "default");
+ Assert.AreEqual (p.DbType, (DbType)e, "#B" + counter.ToString ());
+ counter++;
+ }
+ }
+
+ [Test]
+ public void Parameter_ConvertTypeCodeToDbType ()
+ {
+ Assert.AreEqual (DbType.Object, Parameter.ConvertTypeCodeToDbType (TypeCode.Empty), "#A1");
+ Assert.AreEqual (DbType.Object, Parameter.ConvertTypeCodeToDbType (TypeCode.Object), "#A2");
+ Assert.AreEqual (DbType.Object, Parameter.ConvertTypeCodeToDbType (TypeCode.DBNull), "#A3");
+ Assert.AreEqual (DbType.Boolean, Parameter.ConvertTypeCodeToDbType (TypeCode.Boolean), "#A4");
+ Assert.AreEqual (DbType.StringFixedLength, Parameter.ConvertTypeCodeToDbType (TypeCode.Char), "#A5");
+ Assert.AreEqual (DbType.SByte, Parameter.ConvertTypeCodeToDbType (TypeCode.SByte), "#A6");
+ Assert.AreEqual (DbType.Byte, Parameter.ConvertTypeCodeToDbType (TypeCode.Byte), "#A7");
+ Assert.AreEqual (DbType.Int16, Parameter.ConvertTypeCodeToDbType (TypeCode.Int16), "#A8");
+ Assert.AreEqual (DbType.UInt16, Parameter.ConvertTypeCodeToDbType (TypeCode.UInt16), "#A9");
+ Assert.AreEqual (DbType.Int32, Parameter.ConvertTypeCodeToDbType (TypeCode.Int32), "#A10");
+ Assert.AreEqual (DbType.UInt32, Parameter.ConvertTypeCodeToDbType (TypeCode.UInt32), "#A11");
+ Assert.AreEqual (DbType.Int64, Parameter.ConvertTypeCodeToDbType (TypeCode.Int64), "#A12");
+ Assert.AreEqual (DbType.UInt64, Parameter.ConvertTypeCodeToDbType (TypeCode.UInt64), "#A13");
+ Assert.AreEqual (DbType.Single, Parameter.ConvertTypeCodeToDbType (TypeCode.Single), "#A14");
+ Assert.AreEqual (DbType.Double, Parameter.ConvertTypeCodeToDbType (TypeCode.Double), "#A15");
+ Assert.AreEqual (DbType.Decimal, Parameter.ConvertTypeCodeToDbType (TypeCode.Decimal), "#A16");
+ Assert.AreEqual (DbType.DateTime, Parameter.ConvertTypeCodeToDbType (TypeCode.DateTime), "#A17");
+ Assert.AreEqual (DbType.String, Parameter.ConvertTypeCodeToDbType (TypeCode.String), "#A18");
+ }
+
+ [Test]
+ public void Parameter_ConvertDbTypeToTypeCode ()
+ {
+ Assert.AreEqual (TypeCode.String, Parameter.ConvertDbTypeToTypeCode (DbType.AnsiString), "#A1");
+ Assert.AreEqual (TypeCode.Object, Parameter.ConvertDbTypeToTypeCode (DbType.Binary), "#A2");
+ Assert.AreEqual (TypeCode.Byte, Parameter.ConvertDbTypeToTypeCode (DbType.Byte), "#A3");
+ Assert.AreEqual (TypeCode.Boolean, Parameter.ConvertDbTypeToTypeCode (DbType.Boolean), "#A4");
+ Assert.AreEqual (TypeCode.Decimal, Parameter.ConvertDbTypeToTypeCode (DbType.Currency), "#A5");
+ Assert.AreEqual (TypeCode.DateTime, Parameter.ConvertDbTypeToTypeCode (DbType.Date), "#A6");
+ Assert.AreEqual (TypeCode.DateTime, Parameter.ConvertDbTypeToTypeCode (DbType.DateTime), "#A7");
+ Assert.AreEqual (TypeCode.Decimal, Parameter.ConvertDbTypeToTypeCode (DbType.Decimal), "#A8");
+ Assert.AreEqual (TypeCode.Double, Parameter.ConvertDbTypeToTypeCode (DbType.Double), "#A9");
+ Assert.AreEqual (TypeCode.Object, Parameter.ConvertDbTypeToTypeCode (DbType.Guid), "#A10");
+ Assert.AreEqual (TypeCode.Int16, Parameter.ConvertDbTypeToTypeCode (DbType.Int16), "#A11");
+ Assert.AreEqual (TypeCode.Int32, Parameter.ConvertDbTypeToTypeCode (DbType.Int32), "#A12");
+ Assert.AreEqual (TypeCode.Int64, Parameter.ConvertDbTypeToTypeCode (DbType.Int64), "#A13");
+ Assert.AreEqual (TypeCode.Object, Parameter.ConvertDbTypeToTypeCode (DbType.Object), "#A14");
+ Assert.AreEqual (TypeCode.SByte, Parameter.ConvertDbTypeToTypeCode (DbType.SByte), "#A15");
+ Assert.AreEqual (TypeCode.Single, Parameter.ConvertDbTypeToTypeCode (DbType.Single), "#A16");
+ Assert.AreEqual (TypeCode.String, Parameter.ConvertDbTypeToTypeCode (DbType.String), "#A17");
+ Assert.AreEqual (TypeCode.DateTime, Parameter.ConvertDbTypeToTypeCode (DbType.Time), "#A18");
+ Assert.AreEqual (TypeCode.UInt16, Parameter.ConvertDbTypeToTypeCode (DbType.UInt16), "#A19");
+ Assert.AreEqual (TypeCode.UInt32, Parameter.ConvertDbTypeToTypeCode (DbType.UInt32), "#A20");
+ Assert.AreEqual (TypeCode.UInt64, Parameter.ConvertDbTypeToTypeCode (DbType.UInt64), "#A21");
+ Assert.AreEqual (TypeCode.Decimal, Parameter.ConvertDbTypeToTypeCode (DbType.VarNumeric), "#A22");
+ Assert.AreEqual (TypeCode.String, Parameter.ConvertDbTypeToTypeCode (DbType.AnsiStringFixedLength), "#A23");
+ Assert.AreEqual (TypeCode.String, Parameter.ConvertDbTypeToTypeCode (DbType.StringFixedLength), "#A24");
+ Assert.AreEqual (TypeCode.Object, Parameter.ConvertDbTypeToTypeCode (DbType.Xml), "#A25");
+ Assert.AreEqual (TypeCode.DateTime, Parameter.ConvertDbTypeToTypeCode (DbType.DateTime2), "#A26");
+ Assert.AreEqual (TypeCode.Object, Parameter.ConvertDbTypeToTypeCode (DbType.DateTimeOffset), "#A27");
+ }
}
}
#endif
diff --git a/mcs/class/System.Web/Test/System.Web.UI/ChangeLog b/mcs/class/System.Web/Test/System.Web.UI/ChangeLog
index 3a58dd2580e..1e6a577df86 100644
--- a/mcs/class/System.Web/Test/System.Web.UI/ChangeLog
+++ b/mcs/class/System.Web/Test/System.Web.UI/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-18 Marek Habersack <mhabersack@novell.com>
+
+ * ObjectStateFormatterTest.cs: added.
+
2009-07-06 Raja R Harinath <harinath@hurrynot.org>
* PageParserTest.cs (MissingMasterFile): Don't use 'typeof' on a
diff --git a/mcs/class/System.Web/Test/System.Web.UI/ObjectStateFormatterTest.cs b/mcs/class/System.Web/Test/System.Web.UI/ObjectStateFormatterTest.cs
new file mode 100644
index 00000000000..7417c95da4f
--- /dev/null
+++ b/mcs/class/System.Web/Test/System.Web.UI/ObjectStateFormatterTest.cs
@@ -0,0 +1,106 @@
+//
+// Tests for System.Web.UI.ObjectStateFormatter
+//
+// Authors:
+// 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.
+//
+
+#if NET_2_0
+using System;
+using System.Web;
+using System.Web.UI;
+
+using MonoTests.SystemWeb.Framework;
+using MonoTests.stand_alone.WebHarness;
+using NUnit.Framework;
+
+namespace MonoTests.System.Web.UI
+{
+ [TestFixture]
+ public class ObjectStateFormatterTest
+ {
+ [TestFixtureSetUp]
+ public void SetUp ()
+ {
+ Type t = GetType ();
+
+ WebTest.CopyResource (t, "StateFormatter_CorrectConverter.aspx", "StateFormatter_CorrectConverter.aspx");
+ WebTest.CopyResource (t, "StateFormatter_CollectionConverter.aspx", "StateFormatter_CollectionConverter.aspx");
+ WebTest.CopyResource (t, "StateFormatter_CollectionConverter.aspx.cs", "StateFormatter_CollectionConverter.aspx.cs");
+ }
+
+ [Test (Description="Bug #545979")]
+ public void StateFormatter_CorrectConverter ()
+ {
+ // We test only if it doesn't throw exception on postback
+ WebTest t = new WebTest ("StateFormatter_CorrectConverter.aspx");
+ t.Run ();
+
+ var fr = new FormRequest (t.Response, "Form1");
+ fr.Controls.Add ("Button1");
+ fr.Controls ["Button1"].Value = "Change";
+ t.Request = fr;
+ t.Run ();
+
+ fr = new FormRequest (t.Response, "Form1");
+ fr.Controls.Add ("Button2");
+ fr.Controls ["Button2"].Value = "Refresh";
+ }
+
+ [Test (Description="Bug #565547")]
+ public void StateFormatter_CollectionFormatter ()
+ {
+ WebTest t = new WebTest ("StateFormatter_CollectionConverter.aspx");
+ t.Run ();
+
+ var fr = new FormRequest (t.Response, "form1");
+ fr.Controls.Add ("btnSearch");
+ fr.Controls.Add ("ddlDate");
+ fr.Controls.Add ("txtSearchValue");
+
+ fr.Controls ["btnSearch"].Value = "Search";
+ fr.Controls ["ddlDate"].Value = "2009";
+
+ t.Request = fr;
+ string pageHtml = t.Run ();
+ string renderedHtml = HtmlDiff.GetControlFromPageHtml (pageHtml);
+ string originalHtml = @"<div>
+
+ <table id=""gvECCN"" cellspacing=""0"" rules=""all"" border=""1"" style=""border-collapse:collapse;"">
+ <tr>
+ <th align=""left"" scope=""col"">&nbsp;</th><th align=""left"" scope=""col"">Schedule B</th><th align=""left"" scope=""col"">Count</th><th align=""left"" scope=""col"">Total</th><th align=""left"" scope=""col"">Percent</th>
+ </tr><tr>
+ <td style=""height:18px;width:30px;"">1</td><td style=""width:140px;"">test</td><td style=""width:90px;"">1</td><td style=""width:100px;"">100</td><td style=""width:90px;"">250.00 %</td>
+
+ </tr>
+ </table>
+ </div>";
+
+ HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1");
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/Author.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/Author.cs
new file mode 100644
index 00000000000..b6bc31b7aaf
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/Author.cs
@@ -0,0 +1,106 @@
+#if NET_2_0
+// Author.cs
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Globalization;
+using System.Web.UI;
+
+namespace Samples.AspNet.CS.Controls
+{
+ [
+ TypeConverter(typeof(AuthorConverter))
+ ]
+ public class Author
+ {
+ private string firstnameValue;
+ private string lastnameValue;
+ private string middlenameValue;
+
+ public Author()
+ :
+ this(String.Empty, String.Empty, String.Empty)
+ {
+ }
+
+ public Author(string firstname, string lastname)
+ :
+ this(firstname, String.Empty, lastname)
+ {
+ }
+
+ public Author(string firstname,
+ string middlename, string lastname)
+ {
+ firstnameValue = firstname;
+ middlenameValue = middlename;
+ lastnameValue = lastname;
+ }
+
+ [
+ Category("Behavior"),
+ DefaultValue(""),
+ Description("First name of author."),
+ NotifyParentProperty(true),
+ ]
+ public virtual String FirstName
+ {
+ get
+ {
+ return firstnameValue;
+ }
+ set
+ {
+ firstnameValue = value;
+ }
+ }
+
+ [
+ Category("Behavior"),
+ DefaultValue(""),
+ Description("Last name of author."),
+ NotifyParentProperty(true)
+ ]
+ public virtual String LastName
+ {
+ get
+ {
+ return lastnameValue;
+ }
+ set
+ {
+ lastnameValue = value;
+ }
+ }
+
+ [
+ Category("Behavior"),
+ DefaultValue(""),
+ Description("Middle name of author."),
+ NotifyParentProperty(true)
+ ]
+ public virtual String MiddleName
+ {
+ get
+ {
+ return middlenameValue;
+ }
+ set
+ {
+ middlenameValue = value;
+ }
+ }
+
+ public override string ToString()
+ {
+ return ToString(CultureInfo.InvariantCulture);
+ }
+
+ public string ToString(CultureInfo culture)
+ {
+ return TypeDescriptor.GetConverter(
+ GetType()).ConvertToString(null, culture, this);
+ }
+ }
+}
+#endif
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/AuthorConverter.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/AuthorConverter.cs
new file mode 100644
index 00000000000..4dab68c7055
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/AuthorConverter.cs
@@ -0,0 +1,116 @@
+#if NET_2_0
+// AuthorConverter.cs
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Design.Serialization;
+using System.Globalization;
+using System.Reflection;
+
+namespace Samples.AspNet.CS.Controls
+{
+ public class AuthorConverter : ExpandableObjectConverter
+ {
+ public override bool CanConvertFrom(
+ ITypeDescriptorContext context, Type sourceType)
+ {
+ if (sourceType == typeof(string))
+ {
+ return true;
+ }
+ return base.CanConvertFrom(context, sourceType);
+ }
+
+ public override bool CanConvertTo(
+ ITypeDescriptorContext context, Type destinationType)
+ {
+ if (destinationType == typeof(string))
+ {
+ return true;
+ }
+ return base.CanConvertTo(context, destinationType);
+ }
+
+ public override object ConvertFrom(ITypeDescriptorContext
+ context, CultureInfo culture, object value)
+ {
+ if (value == null)
+ {
+ return new Author();
+ }
+
+ if (value is string)
+ {
+ string s = (string)value;
+ if (s.Length == 0)
+ {
+ return new Author();
+ }
+
+ string[] parts = s.Split(' ');
+
+ // Determine if name is stored as first and
+ // last; first, middle, and last;
+ // or is in error.
+ if ((parts.Length < 2) || (parts.Length > 3))
+ {
+ throw new ArgumentException(
+ "Name must have 2 or 3 parts.", "value");
+ }
+
+ if (parts.Length == 2)
+ {
+ return new Author(parts[0], parts[1]);
+ }
+
+ if (parts.Length == 3)
+ {
+ return new Author(parts[0], parts[1], parts[2]);
+ }
+ }
+
+ return base.ConvertFrom(context, culture, value);
+ }
+
+ public override object ConvertTo(
+ ITypeDescriptorContext context,
+ CultureInfo culture, object value, Type destinationType)
+ {
+ if (value != null)
+ {
+ if (!(value is Author))
+ {
+ throw new ArgumentException(
+ "Invalid Author", "value");
+ }
+ }
+
+ if (destinationType == typeof(string))
+ {
+ if (value == null)
+ {
+ return String.Empty;
+ }
+
+ Author auth = (Author)value;
+
+ if (auth.MiddleName != String.Empty)
+ {
+ return String.Format("{0} {1} {2}",
+ auth.FirstName,
+ auth.MiddleName,
+ auth.LastName);
+ }
+ else
+ {
+ return String.Format("{0} {1}",
+ auth.FirstName,
+ auth.LastName);
+ }
+ }
+
+ return base.ConvertTo(context, culture, value,
+ destinationType);
+ }
+ }
+}
+#endif
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/Book.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/Book.cs
new file mode 100644
index 00000000000..4924565d4ee
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/Book.cs
@@ -0,0 +1,196 @@
+#if NET_2_0
+// Book.cs
+using System;
+using System.ComponentModel;
+using System.Security.Permissions;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace Samples.AspNet.CS.Controls
+{
+ [
+ AspNetHostingPermission(SecurityAction.Demand,
+ Level = AspNetHostingPermissionLevel.Minimal),
+ AspNetHostingPermission(SecurityAction.InheritanceDemand,
+ Level=AspNetHostingPermissionLevel.Minimal),
+ DefaultProperty("Title"),
+ ToolboxData("<{0}:Book runat=\"server\"> </{0}:Book>")
+ ]
+ public class Book : WebControl
+ {
+ private Author authorValue;
+ private String initialAuthorString;
+
+ [
+ Bindable(true),
+ Category("Appearance"),
+ DefaultValue(""),
+ Description("The name of the author."),
+ DesignerSerializationVisibility(
+ DesignerSerializationVisibility.Content),
+ PersistenceMode(PersistenceMode.InnerProperty),
+ ]
+ public virtual Author Author
+ {
+ get
+ {
+ if (authorValue == null)
+ {
+ authorValue = new Author();
+ }
+ return authorValue;
+ }
+
+ }
+
+ [
+ Bindable(true),
+ Category("Appearance"),
+ DefaultValue(BookType.NotDefined),
+ Description("Fiction or Not"),
+ ]
+ public virtual BookType BookType
+ {
+ get
+ {
+ object t = ViewState["BookType"];
+ return (t == null) ? BookType.NotDefined : (BookType)t;
+ }
+ set
+ {
+ ViewState["BookType"] = value;
+ }
+ }
+
+ [
+ Bindable(true),
+ Category("Appearance"),
+ DefaultValue(""),
+ Description("The symbol for the currency."),
+ Localizable(true)
+ ]
+ public virtual string CurrencySymbol
+ {
+ get
+ {
+ string s = (string)ViewState["CurrencySymbol"];
+ return (s == null) ? String.Empty : s;
+ }
+ set
+ {
+ ViewState["CurrencySymbol"] = value;
+ }
+ }
+
+
+ [
+ Bindable(true),
+ Category("Appearance"),
+ DefaultValue("0.00"),
+ Description("The price of the book."),
+ Localizable(true)
+ ]
+ public virtual Decimal Price
+ {
+ get
+ {
+ object price = ViewState["Price"];
+ return (price == null) ? Decimal.Zero : (Decimal)price;
+ }
+ set
+ {
+ ViewState["Price"] = value;
+ }
+ }
+
+ [
+ Bindable(true),
+ Category("Appearance"),
+ DefaultValue(""),
+ Description("The title of the book."),
+ Localizable(true)
+ ]
+ public virtual string Title
+ {
+ get
+ {
+ string s = (string)ViewState["Title"];
+ return (s == null) ? String.Empty : s;
+ }
+ set
+ {
+ ViewState["Title"] = value;
+ }
+ }
+
+ protected override void RenderContents(HtmlTextWriter writer)
+ {
+ writer.RenderBeginTag(HtmlTextWriterTag.Table);
+
+ writer.RenderBeginTag(HtmlTextWriterTag.Tr);
+ writer.RenderBeginTag(HtmlTextWriterTag.Td);
+ writer.WriteEncodedText(Title);
+ writer.RenderEndTag();
+ writer.RenderEndTag();
+
+ writer.RenderBeginTag(HtmlTextWriterTag.Tr);
+ writer.RenderBeginTag(HtmlTextWriterTag.Td);
+ writer.WriteEncodedText(Author.ToString());
+ writer.RenderEndTag();
+ writer.RenderEndTag();
+
+ writer.RenderBeginTag(HtmlTextWriterTag.Tr);
+ writer.RenderBeginTag(HtmlTextWriterTag.Td);
+ writer.WriteEncodedText(BookType.ToString());
+ writer.RenderEndTag();
+ writer.RenderEndTag();
+
+ writer.RenderBeginTag(HtmlTextWriterTag.Tr);
+ writer.RenderBeginTag(HtmlTextWriterTag.Td);
+ writer.Write(CurrencySymbol);
+ writer.Write("&nbsp;");
+ writer.Write(String.Format("{0:F2}", Price));
+ writer.RenderEndTag();
+ writer.RenderEndTag();
+
+ writer.RenderEndTag();
+ }
+
+ protected override void LoadViewState(object savedState)
+ {
+ base.LoadViewState(savedState);
+
+ Author auth = (Author)ViewState["Author"];
+ if (auth != null)
+ {
+ authorValue = auth;
+ }
+ }
+
+ protected override object SaveViewState()
+ {
+ if (authorValue != null)
+ {
+ String currentAuthorString = authorValue.ToString();
+ if (!(currentAuthorString.Equals(initialAuthorString)))
+ {
+ ViewState["Author"] = authorValue;
+ }
+ }
+
+ return base.SaveViewState();
+ }
+
+ protected override void TrackViewState()
+ {
+ if (authorValue != null)
+ {
+ initialAuthorString = authorValue.ToString();
+ }
+ base.TrackViewState();
+ }
+
+ }
+}
+#endif
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/BookType.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/BookType.cs
new file mode 100644
index 00000000000..5a03dcf030e
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/BookType.cs
@@ -0,0 +1,14 @@
+#if NET_2_0
+// BookType.cs
+using System;
+
+namespace Samples.AspNet.CS.Controls
+{
+ public enum BookType
+ {
+ NotDefined = 0,
+ Fiction = 1,
+ NonFiction = 2
+ }
+}
+#endif
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs
index 6baef004227..3916caa652b 100644
--- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs
@@ -555,6 +555,7 @@ namespace MonoTests.SystemWeb.Framework
#if INSIDE_SYSTEM_WEB
CopyResource (typeof (WebTest), "Common.resx", "App_GlobalResources/Common.resx");
CopyResource (typeof (WebTest), "Common.fr-FR.resx", "App_GlobalResources/Common.fr-FR.resx");
+ CopyResource (typeof (WebTest), "Resource1.resx", "App_GlobalResources/Resource1.resx");
#endif
CopyResource (typeof (WebTest), "Web.mono.config", "Web.config");
CopyResource (typeof (WebTest), "MyPage.aspx", "MyPage.aspx");
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx
new file mode 100644
index 00000000000..59a3c3758b8
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/App_GlobalResources/Resource1.resx
@@ -0,0 +1,123 @@
+ļ»æ<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="TestString" xml:space="preserve">
+ <value>Test</value>
+ </data>
+</root> \ No newline at end of file
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx
new file mode 100644
index 00000000000..3a09ae67b58
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/ChangePasswordContainer_FindControl.aspx
@@ -0,0 +1,27 @@
+<%@ Page Language="C#" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
+<html><head><title>Change password</title></head>
+<body>
+ <form runat="server">
+ Test: <asp:Label runat="server" id="test"/><br/>
+ <asp:ChangePassword ID="ChangePassword1" runat="server">
+ <ChangePasswordTemplate>
+ <table>
+ <tr>
+ <td>
+ <asp:TextBox runat="server" id="CurrentPassword" TextMode="Password"/>
+ <asp:RequiredFieldValidator runat="server" id="text1required" ControlToValidate="CurrentPassword"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <asp:TextBox runat="server" id="NewPassword" TextMode="Password"/>
+ <asp:RequiredFieldValidator runat="server" id="text2required" ControlToValidate="NewPassword"/>
+ </td>
+ </tr>
+ </table>
+ </ChangePasswordTemplate>
+ </asp:ChangePassword>
+ </form>
+</body>
+</html>
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx
new file mode 100644
index 00000000000..22f545206b6
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx
@@ -0,0 +1,89 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StateFormatter_CollectionConverter.aspx.cs" Inherits="Sections_ECCN_test" Title="ECCN Finder" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head id="Head1" runat="server"></head>
+<body>
+ <form id="form1" runat="server">
+<asp:ObjectDataSource runat="server" ID="odsYear"
+ TypeName="App.Test.ECCN"
+ SelectMethod="GetECCNYearList" />
+<asp:ObjectDataSource runat="server" ID="odsECCNSummary"
+ TypeName="App.Test.ECCN"
+ SelectMethod="GetECCNSummaryWithFilter"
+ SelectCountMethod="GetECCNSummaryCountWithFilter"
+ EnablePaging="true">
+ <SelectParameters>
+ <asp:ControlParameter ControlID="ddlDate" Name="year" Type="Int32" />
+ <asp:ControlParameter ControlID="txtSearchValue" Name="eccn" Type="String" />
+ </SelectParameters>
+</asp:ObjectDataSource>
+<asp:Panel runat="server" ID="pnlModule">
+ <table cellpadding="3" cellspacing="0" border="0">
+ <tr>
+ <td width="1px"></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td valign="top">
+ <table cellpadding="1" cellspacing="0" width="355px" border="0">
+ <tr>
+ <td colspan="3" style="height:12px;"></td>
+ </tr>
+ <tr>
+ <td>Date Filter</td>
+ <td colspan="2">Enter a Schedule B or ECCN Code:</td>
+ </tr>
+ <tr>
+ <td><asp:DropDownList runat="server" ID="ddlDate" CssClass="ddlECCN" DataSourceID="odsYear" DataTextField="yearText" DataValueField="year"></asp:DropDownList></td>
+ <td style="width:190px;"><asp:TextBox runat="server" ID="txtSearchValue" MaxLength="14" Width="180px" /></td>
+ <td align="left"><asp:Button runat="server" ID="btnSearch" Text="Search" OnClick="btnSearch_Click" /></td>
+ </tr>
+ <tr>
+ <td colspan="3" style="height:3px;"></td>
+ </tr>
+ </table>
+ <table cellpadding="0" cellspacing="0" border="0" >
+ <tr>
+ <td>
+ <div style="margin: 5px;">
+ <%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:GridView ID="gvECCN" runat="server" DataSourceID="odsECCNSummary"
+ AutoGenerateColumns="false" AllowPaging="true" Visible="false" PageSize="10"
+ PagerStyle-HorizontalAlign="Center" >
+ <Columns>
+ <asp:BoundField DataField="rownum" HeaderText="" SortExpression="rownum">
+ <HeaderStyle HorizontalAlign="Left" />
+ <ItemStyle Width="30px" Height="18" />
+ </asp:BoundField>
+ <asp:BoundField DataField="sched_b" HeaderText="Schedule B" SortExpression="sched_b" >
+ <HeaderStyle HorizontalAlign="Left" />
+ <ItemStyle Width="140px" />
+ </asp:BoundField>
+ <asp:BoundField DataField="count" HeaderText="Count" SortExpression="count" DataFormatString="{0:###,###,###}">
+ <HeaderStyle HorizontalAlign="Left" />
+ <ItemStyle Width="90px" />
+ </asp:BoundField>
+ <asp:BoundField DataField="total" HeaderText="Total" SortExpression="total" DataFormatString="{0:###,###,###}">
+ <HeaderStyle HorizontalAlign="Left" />
+ <ItemStyle Width="100px" />
+ </asp:BoundField>
+ <asp:BoundField DataField="percent" HeaderText="Percent" SortExpression="percent" DataFormatString="{0:P}">
+ <HeaderStyle HorizontalAlign="Left" />
+ <ItemStyle Width="90px" />
+ </asp:BoundField>
+ </Columns>
+ </asp:GridView><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" height="15px"></td>
+ </tr>
+ </table>
+</asp:Panel>
+ </form>
+</body>
+</html>
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs
new file mode 100644
index 00000000000..7528180d8f6
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CollectionConverter.aspx.cs
@@ -0,0 +1,178 @@
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Net;
+using System.Net.Mail;
+using System.Text;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+
+using MonoTests.SystemWeb.Framework;
+
+public partial class Sections_ECCN_test : System.Web.UI.Page
+{
+ //protected override void OnPreInit (EventArgs e)
+ public Sections_ECCN_test ()
+ {
+ WebTest t = WebTest.CurrentTest;
+ if (t != null)
+ t.Invoke (this);
+ }
+
+ public override void VerifyRenderingInServerForm (Control c)
+ {
+
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ }
+
+ protected void btnSearch_Click(object sender, System.EventArgs e)
+ {
+
+ gvECCN.Visible = true;
+ }
+
+}
+
+namespace App.Test
+{
+
+ public class ECCNYearList
+ {
+
+ private Int32 _year = 0;
+ public Int32 year
+ {
+ get { return _year; }
+ set { _year = value; }
+ }
+
+ private String _yearText = "";
+ public String yearText
+ {
+ get { return _yearText; }
+ set { _yearText = value; }
+ }
+
+ public ECCNYearList() { }
+
+ public ECCNYearList(Int32 p_year) { year = p_year; yearText = p_year.ToString(); }
+ }
+
+ /// <summary>
+ /// Class to get a list of US States
+ /// </summary>
+ [Serializable]
+ public class ECCN
+ {
+ #region Public/Private properties
+
+ private Int32 _year = 0;
+ public Int32 year
+ {
+ get { return _year; }
+ set { _year = value; }
+ }
+
+ private String _eccn = "";
+ public String eccn
+ {
+ get { return _eccn; }
+ set { _eccn = value; }
+ }
+
+ private String _sched_b = "";
+ public String sched_b
+ {
+ get { return _sched_b; }
+ set { _sched_b = value; }
+ }
+
+ private Int32 _count = 0;
+ public Int32 count
+ {
+ get { return _count; }
+ set { _count = value; }
+ }
+
+ private Double _percent = 0.0;
+ public Double percent
+ {
+ get { return _percent; }
+ set { _percent = value; }
+ }
+
+ private Int32 _rownum = 0;
+ public Int32 rownum
+ {
+ get { return _rownum; }
+ set { _rownum = value; }
+ }
+
+ private Int32 _total = 0;
+ public Int32 total
+ {
+ get { return _total; }
+ set { _total = value; }
+ }
+
+ #endregion
+
+ #region Constructors
+
+ public ECCN() { }
+
+ public ECCN(Int32 p_year, String p_eccn, String p_sched_b, Int32 p_count, Double p_percent, Int32 p_rownum, Int32 p_total)
+ {
+
+ year = p_year;
+ eccn = p_eccn.Trim().ToUpper();
+ sched_b = p_sched_b.Trim();
+ count = p_count;
+ percent = p_percent;
+ rownum = p_rownum;
+ total = p_total;
+ }
+
+ #endregion
+
+ public static List<ECCN> GetECCNSummaryWithFilter(Int32 startRowIndex, Int32 maximumRows, Int32 year, String eccn)
+ {
+
+ List<ECCN> summary = new List<ECCN>();
+
+ summary.Add(new ECCN(2009, "test", "test", 1, 2.5, 1, 100));
+
+ return summary;
+
+ }
+
+ public static Int32 GetECCNSummaryCountWithFilter(Int32 year, String eccn)
+ {
+ return 1;
+ }
+
+
+ public static List<ECCNYearList> GetECCNYearList()
+ {
+
+ List<ECCNYearList> result = new List<ECCNYearList>();
+
+ result.Add(new ECCNYearList(2009));
+ result.Add(new ECCNYearList(2008));
+ return result;
+
+ }
+
+ }
+
+}
+
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx
new file mode 100644
index 00000000000..222018c0be9
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/StateFormatter_CorrectConverter.aspx
@@ -0,0 +1,37 @@
+<%@ Page Language="C#" Debug="true" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
+<%@ Register Namespace="Samples.AspNet.CS.Controls" Assembly="System.Web_test_net_2_0" TagPrefix="aspSample" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<script runat="server">
+ void Button_Click(object sender, EventArgs e)
+ {
+ Book1.Author.FirstName = "Bob";
+ Book1.Author.LastName = "Kelly";
+ Book1.Title = "Contoso Stories";
+ Book1.Price = 39.95M;
+ Button1.Visible = false;
+ }
+</script>
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head id="Head1" runat="server">
+ <title>Bug #545979</title>
+ </head>
+ <body>
+ <form id="Form1" runat="server">
+ <aspSample:Book ID="Book1" Runat="server"
+ Title="Tailspin Toys Stories" CurrencySymbol="$"
+ BackColor="#FFE0C0" Font-Names="Tahoma"
+ Price="16" BookType="Fiction">
+ <Author FirstName="Judy" LastName="Lew" />
+ </aspSample:Book>
+ <br />
+ <asp:Button ID="Button1" OnClick="Button_Click"
+ Runat="server" Text="Change" />
+ <asp:Button ID="Button2" Runat="server" Text="Refresh" />
+ <br />
+ <br />
+ <asp:HyperLink ID="Hyperlink1" NavigateUrl="BookTest.aspx"
+ Runat="server">
+ Reload Page</asp:HyperLink>
+ </form>
+ </body>
+</html>
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx
new file mode 100644
index 00000000000..15da25fdc80
--- /dev/null
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWebResources/TagWithExpressionWithinAttribute.aspx
@@ -0,0 +1,21 @@
+<%@ Page Language="C#" AutoEventWireup="true" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<script runat="server">
+ void Page_Load (object sender, EventArgs e)
+ {
+// Literal2.Text = "Test";
+ }
+</script>
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head runat="server">
+ <title>Bug #568631</title>
+</head>
+<body>
+ <form id="form1" runat="server">
+ <div>
+ <img alt='<asp:Literal ID="Literal2" runat="server" text="<%$Resources:Resource1, TestString %>"/>' src="../images/ok_16x16.png" />
+
+ </div>
+ </form>
+</body>
+</html> \ No newline at end of file
diff --git a/mcs/class/System.XML/ChangeLog b/mcs/class/System.XML/ChangeLog
index 6383114d430..d5c2b8052ba 100644
--- a/mcs/class/System.XML/ChangeLog
+++ b/mcs/class/System.XML/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * System.Xml.dll.sources : added NamespaceHandling which is kept
+ internal in 2.0 (to simplify its support in XmlTextWriter).
+
2009-08-01 Miguel de Icaza <miguel@novell.com>
* Various changes to support the non-XAP XmlSchema resolution on
diff --git a/mcs/class/System.XML/System.Xml.Serialization/ChangeLog b/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
index f7e2f13c08a..db7e0049e11 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
+++ b/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * SerializationCodeGenerator.cs : enum value identifiers should be
+ escaped with '@'. Fixed bug #566370.
+
2009-03-13 Atsushi Enomoto <atsushi@ximian.com>
* XmlRootAttribute.cs : it is also expected to have
diff --git a/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs b/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs
index f05514016b3..25803d3d8b3 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs
@@ -586,7 +586,7 @@ namespace System.Xml.Serialization
WriteLineInd ("switch (val) {");
for (int i = 0; i < emap.EnumNames.Length; i++)
- WriteLine ("case " + map.TypeData.CSharpFullName + "." + emap.EnumNames[i] + ": return " + GetLiteral (emap.XmlNames[i]) + ";");
+ WriteLine ("case " + map.TypeData.CSharpFullName + ".@" + emap.EnumNames[i] + ": return " + GetLiteral (emap.XmlNames[i]) + ";");
if (emap.IsFlags) {
WriteLineInd ("default:");
@@ -2421,7 +2421,7 @@ namespace System.Xml.Serialization
WriteLineInd ("{");
foreach (EnumMap.EnumMapMember mem in map.Members)
{
- WriteLine ("case " + GetLiteral (mem.XmlName) + ": return " + typeMap.TypeData.CSharpFullName + "." + mem.EnumName + ";");
+ WriteLine ("case " + GetLiteral (mem.XmlName) + ": return " + typeMap.TypeData.CSharpFullName + ".@" + mem.EnumName + ";");
}
WriteLineInd ("default:");
WriteLine ("throw CreateUnknownConstantException (" + val + ", typeof(" + typeMap.TypeData.CSharpFullName + "));");
diff --git a/mcs/class/System.XML/System.Xml.dll.sources b/mcs/class/System.XML/System.Xml.dll.sources
index 3d0f0f41c88..483d6823a83 100644
--- a/mcs/class/System.XML/System.Xml.dll.sources
+++ b/mcs/class/System.XML/System.Xml.dll.sources
@@ -1,6 +1,7 @@
Assembly/AssemblyInfo.cs
../../build/common/Consts.cs
../../build/common/Locale.cs
+../../build/common/MonoTODOAttribute.cs
Mono.Xml.Schema/XmlSchemaValidatingReader.cs
Mono.Xml.Schema/XsdIdentityPath.cs
Mono.Xml.Schema/XsdIdentityState.cs
@@ -91,9 +92,9 @@ System.Xml/IHasXmlChildNode.cs
System.Xml/IXmlNamespaceResolver.cs
System.Xml/MonoFIXAttribute.cs
System.Xml/NameTable.cs
+System.Xml/NamespaceHandling.cs
System.Xml/NewLineHandling.cs
System.Xml/ReadState.cs
-../../build/common/MonoTODOAttribute.cs
System.Xml/ValidationType.cs
System.Xml/WhitespaceHandling.cs
System.Xml/WriteState.cs
@@ -382,4 +383,3 @@ System.Xml.Serialization.Configuration/SchemaImporterExtensionsSection.cs
System.Xml.Serialization.Configuration/SerializationSectionGroup.cs
System.Xml.Serialization.Configuration/XmlSerializerSection.cs
System.Xml/XQueryConvert.cs
-
diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog
index 6f19ab5afd2..dc695527600 100644
--- a/mcs/class/System.XML/System.Xml/ChangeLog
+++ b/mcs/class/System.XML/System.Xml/ChangeLog
@@ -1,3 +1,76 @@
+2010-01-25 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : convert TimeSpan.MinValue to correct string.
+ Patch by Tiaan Geldenhuys.
+
+2010-01-22 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlDocument.cs : fix type check for optimal node creation.
+ Fixed bug #571336, #571226 and #572738.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : Do not ignore ticks which are less than a
+ millisecond. Remove trailing zeros for milliseconds and ticks.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : trim spaces when parsing TimeSpan.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : shorten format string patterns.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : DateTimeOffset parse is sloppy.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : handle Infinity and -Infinity here due to the
+ commented reason.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : ToSingle(string) should do the same as ToDouble().
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : ToDouble(string) should handle NaN, INF and -INF
+ with whitespace allowed.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : ToDouble(string) and ToIntXX(string) allows
+ whitespaces.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : ToString(DateTimeOffset) does not emit extra
+ fraction numbers.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : fix some cosmetic compatibility bugs:
+ ArgumentException -> FormatException.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlWriter.cs : handle a corner case for empty string handling
+ difference between XmlTextWriter and XmlWriter.Create().
+
+2009-11-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * NamespaceHandling.cs, XmlWriterSettings.cs, XmlTextWriter2.cs:
+ implement NamespaceHandling support for Moonlight.
+
+2009-11-17 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvert.cs : fix DateTimeOffset roundtrip by giving format
+ strings in refined order. Patch by Santa Marta, at:
+ http://irc.gimite.net/channel/mono-jp/archive/20091105
+ ( http://smdn.invisiblefulmoon.net/misc/forum/programming/#n10 )
+
2009-11-13 Andreia Gaita <avidigal@novell.com>
* XmlNamespaceManager.cs: XmlReader.Read calls LookupNamespace via
diff --git a/mcs/class/System.XML/System.Xml/NamespaceHandling.cs b/mcs/class/System.XML/System.Xml/NamespaceHandling.cs
index 64f52031dd1..b305cf1e8cd 100644
--- a/mcs/class/System.XML/System.Xml/NamespaceHandling.cs
+++ b/mcs/class/System.XML/System.Xml/NamespaceHandling.cs
@@ -21,15 +21,16 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_1
-
namespace System.Xml {
[Flags]
- public enum NamespaceHandling {
+#if NET_2_1
+ public
+#else
+ internal
+#endif
+ enum NamespaceHandling {
Default,
OmitDuplicates = 1,
}
}
-
-#endif
diff --git a/mcs/class/System.XML/System.Xml/XmlConvert.cs b/mcs/class/System.XML/System.Xml/XmlConvert.cs
index 396cd5eb934..4d08f180ac1 100644
--- a/mcs/class/System.XML/System.Xml/XmlConvert.cs
+++ b/mcs/class/System.XML/System.Xml/XmlConvert.cs
@@ -44,18 +44,30 @@ namespace System.Xml {
const NumberStyles floatStyle = NumberStyles.AllowCurrencySymbol |
NumberStyles.AllowExponent |
NumberStyles.AllowDecimalPoint |
- NumberStyles.AllowLeadingSign;
+ NumberStyles.AllowLeadingSign |
+ NumberStyles.AllowLeadingWhite |
+ NumberStyles.AllowTrailingWhite;
+ const NumberStyles integerStyle = NumberStyles.Integer |
+ NumberStyles.AllowLeadingWhite |
+ NumberStyles.AllowTrailingWhite;
+
static readonly string [] datetimeFormats = {
// dateTime
+#if NET_2_0
+ "yyyy-MM-ddTHH:mm:sszzz",
+ "yyyy-MM-ddTHH:mm:ss.FFFFFFFzzz",
+ "yyyy-MM-ddTHH:mm:ssZ",
+ "yyyy-MM-ddTHH:mm:ss.FFFFFFFZ",
"yyyy-MM-ddTHH:mm:ss",
- "yyyy-MM-ddTHH:mm:ss.f",
- "yyyy-MM-ddTHH:mm:ss.ff",
- "yyyy-MM-ddTHH:mm:ss.fff",
- "yyyy-MM-ddTHH:mm:ss.ffff",
- "yyyy-MM-ddTHH:mm:ss.fffff",
- "yyyy-MM-ddTHH:mm:ss.ffffff",
- "yyyy-MM-ddTHH:mm:ss.fffffff",
+ "yyyy-MM-ddTHH:mm:ss.FFFFFFF",
+ "HH:mm:ss",
+ "HH:mm:ss.FFFFFFF",
+ "HH:mm:sszzz",
+ "HH:mm:ss.FFFFFFFzzz",
+ "HH:mm:ssZ",
+ "HH:mm:ss.FFFFFFFZ",
+#else // it is not required in trunk but should make it easy to backport...
"yyyy-MM-ddTHH:mm:sszzz",
"yyyy-MM-ddTHH:mm:ss.fzzz",
"yyyy-MM-ddTHH:mm:ss.ffzzz",
@@ -72,6 +84,14 @@ namespace System.Xml {
"yyyy-MM-ddTHH:mm:ss.fffffZ",
"yyyy-MM-ddTHH:mm:ss.ffffffZ",
"yyyy-MM-ddTHH:mm:ss.fffffffZ",
+ "yyyy-MM-ddTHH:mm:ss",
+ "yyyy-MM-ddTHH:mm:ss.f",
+ "yyyy-MM-ddTHH:mm:ss.ff",
+ "yyyy-MM-ddTHH:mm:ss.fff",
+ "yyyy-MM-ddTHH:mm:ss.ffff",
+ "yyyy-MM-ddTHH:mm:ss.fffff",
+ "yyyy-MM-ddTHH:mm:ss.ffffff",
+ "yyyy-MM-ddTHH:mm:ss.fffffff",
// time
"HH:mm:ss",
"HH:mm:ss.f",
@@ -97,6 +117,7 @@ namespace System.Xml {
"HH:mm:ss.fffffZ",
"HH:mm:ss.ffffffZ",
"HH:mm:ss.fffffffZ",
+#endif
// date
"yyyy-MM-dd",
"yyyy-MM-ddzzz",
@@ -390,15 +411,44 @@ namespace System.Xml {
{
if (s == null)
throw new ArgumentNullException();
- if (s == "INF")
- return Double.PositiveInfinity;
- if (s == "-INF")
- return Double.NegativeInfinity;
- if (s == "NaN")
- return Double.NaN;
+
+ float f = TryParseStringFloatConstants (s);
+ if (f != 0)
+ return f;
+
return Double.Parse (s, floatStyle, CultureInfo.InvariantCulture);
}
+ static float TryParseStringFloatConstants (string s)
+ {
+ int sidx = 0;
+ while (sidx < s.Length && Char.IsWhiteSpace (s [sidx]))
+ sidx++;
+ if (sidx == s.Length)
+ throw new FormatException ();
+ int sEndPos = s.Length - 1;
+ while (Char.IsWhiteSpace (s [sEndPos]))
+ sEndPos--;
+
+ if (TryParseStringConstant ("NaN", s, sidx, sEndPos))
+ return Single.NaN;
+ if (TryParseStringConstant ("INF", s, sidx, sEndPos))
+ return Single.PositiveInfinity;
+ if (TryParseStringConstant ("-INF", s, sidx, sEndPos))
+ return Single.NegativeInfinity;
+ // Handle these here because Single.Parse("Infinity") is invalid while XmlConvert.ToSingle("Infinity") is valid.
+ if (TryParseStringConstant ("Infinity", s, sidx, sEndPos))
+ return Single.PositiveInfinity;
+ if (TryParseStringConstant ("-Infinity", s, sidx, sEndPos))
+ return Single.NegativeInfinity;
+ return 0;
+ }
+
+ static bool TryParseStringConstant (string format, string s, int start, int end)
+ {
+ return end - start + 1 == format.Length && String.CompareOrdinal (format, 0, s, start, format.Length) == 0;
+ }
+
public static Guid ToGuid (string s)
{
try {
@@ -410,35 +460,34 @@ namespace System.Xml {
public static short ToInt16(string s)
{
- return Int16.Parse (s, NumberStyles.Integer, CultureInfo.InvariantCulture);
+ return Int16.Parse (s, integerStyle, CultureInfo.InvariantCulture);
}
public static int ToInt32(string s)
{
- return Int32.Parse (s, NumberStyles.Integer, CultureInfo.InvariantCulture);
+ return Int32.Parse (s, integerStyle, CultureInfo.InvariantCulture);
}
public static long ToInt64(string s)
{
- return Int64.Parse (s, NumberStyles.Integer, CultureInfo.InvariantCulture);
+ return Int64.Parse (s, integerStyle, CultureInfo.InvariantCulture);
}
[CLSCompliant (false)]
public static SByte ToSByte(string s)
{
- return SByte.Parse(s, NumberStyles.Integer, CultureInfo.InvariantCulture);
+ return SByte.Parse(s, integerStyle, CultureInfo.InvariantCulture);
}
public static float ToSingle(string s)
{
if (s == null)
throw new ArgumentNullException();
- if (s == "INF")
- return Single.PositiveInfinity;
- if (s == "-INF")
- return Single.NegativeInfinity;
- if (s == "NaN")
- return Single.NaN;
+
+ float f = TryParseStringFloatConstants (s);
+ if (f != 0)
+ return f;
+
return Single.Parse(s, floatStyle, CultureInfo.InvariantCulture);
}
@@ -508,19 +557,25 @@ namespace System.Xml {
builder.Append ('P');
if (value.Days > 0)
builder.Append (value.Days).Append ('D');
- if (value.Days > 0 || value.Hours > 0 || value.Minutes > 0 || value.Seconds > 0 || value.Milliseconds > 0) {
+ long ticks = value.Ticks % TimeSpan.TicksPerMillisecond;
+ if (value.Days > 0 || value.Hours > 0 || value.Minutes > 0 || value.Seconds > 0 || value.Milliseconds > 0 || ticks > 0) {
builder.Append('T');
if (value.Hours > 0)
builder.Append (value.Hours).Append ('H');
if (value.Minutes > 0)
builder.Append (value.Minutes).Append ('M');
- if (value.Seconds > 0 || value.Milliseconds > 0) {
+ if (value.Seconds > 0 || value.Milliseconds > 0 || ticks > 0) {
builder.Append (value.Seconds);
- long ticks = value.Ticks % TimeSpan.TicksPerMillisecond;
+ bool trimZero = true;
if (ticks > 0)
builder.Append ('.').AppendFormat ("{0:0000000}", value.Ticks % TimeSpan.TicksPerSecond);
else if (value.Milliseconds > 0)
builder.Append ('.').AppendFormat ("{0:000}", value.Milliseconds);
+ else
+ trimZero = false;
+ if (trimZero)
+ while (builder [builder.Length - 1] == '0')
+ builder.Remove (builder.Length - 1, 1);
builder.Append ('S');
}
@@ -601,8 +656,9 @@ namespace System.Xml {
public static TimeSpan ToTimeSpan(string s)
{
+ s = s.Trim (XmlChar.WhitespaceChars);
if (s.Length == 0)
- throw new ArgumentException ("Invalid format string for duration schema datatype.");
+ throw new FormatException ("Invalid format string for duration schema datatype.");
int start = 0;
if (s [0] == '-')
@@ -610,7 +666,7 @@ namespace System.Xml {
bool minusValue = (start == 1);
if (s [start] != 'P')
- throw new ArgumentException ("Invalid format string for duration schema datatype.");
+ throw new FormatException ("Invalid format string for duration schema datatype.");
start++;
int parseStep = 0;
@@ -705,7 +761,7 @@ namespace System.Xml {
start = i;
}
if (error)
- throw new ArgumentException ("Invalid format string for duration schema datatype.");
+ throw new FormatException ("Invalid format string for duration schema datatype.");
TimeSpan ts = new TimeSpan (days, hours, minutes, seconds);
if (minusValue)
return TimeSpan.FromTicks (- (ts.Ticks + ticks));
@@ -837,12 +893,15 @@ namespace System.Xml {
public static DateTimeOffset ToDateTimeOffset (string s, string [] formats)
{
- return DateTimeOffset.ParseExact (s, formats, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal);
+ DateTimeStyles style = DateTimeStyles.AllowLeadingWhite |
+ DateTimeStyles.AllowTrailingWhite |
+ DateTimeStyles.AssumeUniversal;
+ return DateTimeOffset.ParseExact (s, formats, CultureInfo.InvariantCulture, style);
}
public static string ToString (DateTimeOffset value)
{
- return ToString (value, "yyyy-MM-ddTHH:mm:ss.fffffffzzz");
+ return ToString (value, "yyyy-MM-ddTHH:mm:ss.FFFFFFFzzz");
}
public static string ToString (DateTimeOffset value, string format)
diff --git a/mcs/class/System.XML/System.Xml/XmlDocument.cs b/mcs/class/System.XML/System.Xml/XmlDocument.cs
index c10c9ac79a6..9469b3259da 100644
--- a/mcs/class/System.XML/System.Xml/XmlDocument.cs
+++ b/mcs/class/System.XML/System.Xml/XmlDocument.cs
@@ -104,8 +104,8 @@ namespace System.Xml
resolver = new XmlUrlResolver ();
Type type = GetType ();
- optimal_create_element = type.GetMethod ("CreateElement", optimal_create_types).DeclaringType == type;
- optimal_create_attribute = type.GetMethod ("CreateAttribute", optimal_create_types).DeclaringType == type;
+ optimal_create_element = type.GetMethod ("CreateElement", optimal_create_types).DeclaringType == typeof (XmlDocument);
+ optimal_create_attribute = type.GetMethod ("CreateAttribute", optimal_create_types).DeclaringType == typeof (XmlDocument);
}
#endregion
diff --git a/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs b/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs
index 306b686d996..edb537a3982 100644
--- a/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs
+++ b/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs
@@ -229,6 +229,7 @@ namespace Mono.Xml
XmlNodeInfo [] elements = new XmlNodeInfo [10];
Stack new_local_namespaces = new Stack ();
ArrayList explicit_nsdecls = new ArrayList ();
+ NamespaceHandling namespace_handling;
bool indent;
int indent_count = 2;
@@ -308,6 +309,7 @@ namespace Mono.Xml
check_character_validity = settings.CheckCharacters;
newline_handling = settings.NewLineHandling;
+ namespace_handling = settings.NamespaceHandling;
}
#endif
@@ -969,7 +971,11 @@ namespace Mono.Xml
value.Length == 0)
throw ArgumentError ("Non-empty prefix must be mapped to non-empty namespace URI.");
string existing = nsmanager.LookupNamespace (preserved_name, false);
- explicit_nsdecls.Add (preserved_name);
+
+ // consider OmitDuplicates here.
+ if ((namespace_handling & NamespaceHandling.OmitDuplicates) == 0 || existing != value)
+ explicit_nsdecls.Add (preserved_name);
+
if (open_count > 0) {
if (v2 &&
@@ -1096,7 +1102,7 @@ namespace Mono.Xml
public override void WriteString (string text)
{
- if (text == null || text.Length == 0)
+ if (text == null || (text.Length == 0 && !v2))
return; // do nothing, including state transition.
ShiftStateContent ("Text", true);
diff --git a/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs b/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs
index d3c8712d10a..be365f22a27 100644
--- a/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs
+++ b/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs
@@ -145,10 +145,13 @@ namespace System.Xml
get { return outputMethod; }
//set { outputMethod = value; }
}
+
#if NET_2_1 && !MONOTOUCH
- [MonoTODO]
- public NamespaceHandling NamespaceHandling { get; set; }
+ public
+#else
+ internal
#endif
+ NamespaceHandling NamespaceHandling { get; set; }
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/ChangeLog b/mcs/class/System.XML/Test/System.Xml.Serialization/ChangeLog
index 6822646623c..ede0e23644e 100644
--- a/mcs/class/System.XML/Test/System.Xml.Serialization/ChangeLog
+++ b/mcs/class/System.XML/Test/System.Xml.Serialization/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlSerializerTests.cs : added test for #566370.
+
2008-11-05 Atsushi Enomoto <atsushi@ximian.com>
* XmlReflectionImporterTests.cs : added test for #430759.
diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs
index f4f85543dd4..c536fa233a6 100644
--- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs
@@ -2412,6 +2412,35 @@ namespace MonoTests.System.XmlSerialization
new XmlSerializer (typeof (XmlSerializableImplicitConvertible), attrOverrides).Serialize (TextWriter.Null, x);
}
+ [Test] // bug #566370
+ public void SerializeEnumWithCSharpKeyword ()
+ {
+ var ser = new XmlSerializer (typeof (DoxCompoundKind));
+ for (int i = 0; i < 100; i++) // test serialization code generator
+ ser.Serialize (Console.Out, DoxCompoundKind.@class);
+ }
+
+ public enum DoxCompoundKind
+ {
+ [XmlEnum("class")]
+ @class,
+ [XmlEnum("struct")]
+ @struct,
+ union,
+ [XmlEnum("interface")]
+ @interface,
+ protocol,
+ category,
+ exception,
+ file,
+ [XmlEnum("namespace")]
+ @namespace,
+ group,
+ page,
+ example,
+ dir
+ }
+
#region GenericsSeralizationTests
#if NET_2_0
diff --git a/mcs/class/System.XML/Test/System.Xml/ChangeLog b/mcs/class/System.XML/Test/System.Xml/ChangeLog
index 0ea8c18abfe..136ebddcce6 100644
--- a/mcs/class/System.XML/Test/System.Xml/ChangeLog
+++ b/mcs/class/System.XML/Test/System.Xml/ChangeLog
@@ -1,3 +1,49 @@
+2010-01-25 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvertTest.cs : test convert TimeSpan.MinValue to string.
+ Patch by Tiaan Geldenhuys.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvertTests.cs : add test for ToString(TimeSpan) with small
+ ticks.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvertTests.cs : add test for ToTimeSpan() with spaces.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvertTests.cs : add test for ToDateTimeOffset() with date
+ string with spaces.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvertTests.cs : added commented-out tests for the remaining
+ parse tests by Tiaan Geldenhuys for XLinq, with the reason why.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvertTests.cs : float parse should do the same. Fix NaN test.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvertTests.cs : another double parse test for string with
+ spaces, for string constants such as NaN.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvertTests.cs : add double parse test for string with spaces.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlWriterTests.cs : added a corner case test for empty string handling
+ difference between XmlTextWriter and XmlWriter.Create().
+
+2009-11-17 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlConvertTests.cs : add test for DateTimeOffset roundtrip.
+
2009-11-13 Andreia Gaita <avidigal@novell.com>
* XmlTextReaderTests.cs: Added ParsingWithNSMgrSubclass test to check
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlConvertTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlConvertTests.cs
index 50b5ab5d73a..f8d698e9c94 100644
--- a/mcs/class/System.XML/Test/System.Xml/XmlConvertTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml/XmlConvertTests.cs
@@ -207,6 +207,12 @@ namespace MonoTests.System.Xml
Assert.AreEqual (-1.0d/0.0d, XmlConvert.ToDouble ("-INF"));
Assert.AreEqual (0.0d/0.0d, XmlConvert.ToDouble ("NaN"));
Assert.AreEqual (789324, XmlConvert.ToDouble ("789324"));
+ Assert.AreEqual (42, XmlConvert.ToDouble (" 42 "));
+ Assert.AreEqual (double.NaN, XmlConvert.ToDouble (" NaN "));
+ Assert.AreEqual (double.PositiveInfinity, XmlConvert.ToDouble (" Infinity "));
+ Assert.AreEqual (double.NegativeInfinity, XmlConvert.ToDouble (" -Infinity "));
+ Assert.AreEqual (double.PositiveInfinity, XmlConvert.ToDouble (" INF"));
+ Assert.AreEqual (double.NegativeInfinity, XmlConvert.ToDouble (" -INF "));
}
[Test]
@@ -334,9 +340,18 @@ namespace MonoTests.System.Xml
}
[Test]
- public void ToSingle ()//not done
+ public void ToSingle ()
{
-
+ Assert.AreEqual (1.0d/0.0d, XmlConvert.ToSingle ("INF"));
+ Assert.AreEqual (-1.0d/0.0d, XmlConvert.ToSingle ("-INF"));
+ Assert.AreEqual (0.0d/0.0d, XmlConvert.ToSingle ("NaN"));
+ Assert.AreEqual (789324, XmlConvert.ToSingle ("789324"));
+ Assert.AreEqual (42, XmlConvert.ToSingle (" 42 "));
+ Assert.AreEqual (float.NaN, XmlConvert.ToSingle (" NaN "));
+ Assert.AreEqual (float.PositiveInfinity, XmlConvert.ToSingle (" Infinity "));
+ Assert.AreEqual (float.NegativeInfinity, XmlConvert.ToSingle (" -Infinity "));
+ Assert.AreEqual (float.PositiveInfinity, XmlConvert.ToSingle (" INF"));
+ Assert.AreEqual (float.NegativeInfinity, XmlConvert.ToSingle (" -INF "));
}
[Test]
@@ -347,6 +362,9 @@ namespace MonoTests.System.Xml
XmlConvert.ToString (new DateTime (2003, 5, 5));
Assert.AreEqual (33, dateString.Length);
Assert.AreEqual (dateString.Substring (0, 27), "2003-05-05T00:00:00.0000000");
+
+ // Must not throw an exception...
+ Assert.IsNotNull ("-P10675199DT2H48M5.4775808S", XmlConvert.ToString (TimeSpan.MinValue));
}
[Test]
@@ -355,7 +373,13 @@ namespace MonoTests.System.Xml
// bug #77252
TimeSpan t1 = TimeSpan.FromTicks (
TimeSpan.TicksPerSecond + 1);
- Assert.AreEqual ("PT1.0000001S", XmlConvert.ToString (t1));
+ Assert.AreEqual ("PT1.0000001S", XmlConvert.ToString (t1), "#1");
+
+ // XAttributeTest.CastTimeSpans():#5d
+ t1 = new TimeSpan (2710L);
+ Assert.AreEqual ("PT0.000271S", XmlConvert.ToString (t1), "#2");
+ t1 = new TimeSpan (27100000L);
+ Assert.AreEqual ("PT2.71S", XmlConvert.ToString (t1), "#3");
}
[Test]
@@ -374,6 +398,8 @@ namespace MonoTests.System.Xml
Assert.AreEqual (TimeSpan.MinValue, XmlConvert.ToTimeSpan ("-P10675199DT2H48M5.4775808S"), "#7");
Assert.AreEqual (TimeSpan.MaxValue, XmlConvert.ToTimeSpan ("P10675199DT2H48M5.4775807S"), "#8");
+
+ Assert.AreEqual (TimeSpan.FromDays (2), XmlConvert.ToTimeSpan (" \r\n \tP2D "), "#9");
}
[Test]
@@ -402,6 +428,16 @@ namespace MonoTests.System.Xml
Assert.Fail ("0x10000");
} catch (FormatException) {
}
+ // LAMESPEC: it is not fixable as there is no public
+ // member of UInt16 that treats this as FormatException
+ // while others above as either OverflowException or
+ // FormatException respectively.
+ // (.NET uses internal member in UInt16 here);
+ //try {
+ // XmlConvert.ToUInt16 ("-101");
+ // Assert.Fail ("-101");
+ //} catch (FormatException) {
+ //}
}
[Test]
@@ -430,6 +466,16 @@ namespace MonoTests.System.Xml
Assert.Fail ("0x10000");
} catch (FormatException) {
}
+ // LAMESPEC: it is not fixable as there is no public
+ // member of UInt32 that treats this as FormatException
+ // while others above as either OverflowException or
+ // FormatException respectively.
+ // (.NET uses internal member in UInt32 here);
+ //try {
+ // XmlConvert.ToUInt32 ("-101");
+ // Assert.Fail ("-101");
+ //} catch (FormatException) {
+ //}
}
[Test]
@@ -458,6 +504,16 @@ namespace MonoTests.System.Xml
Assert.Fail ("0x10000");
} catch (FormatException) {
}
+ // LAMESPEC: it is not fixable as there is no public
+ // member of UInt64 that treats this as FormatException
+ // while others above as either OverflowException or
+ // FormatException respectively.
+ // (.NET uses internal member in UInt64 here);
+ //try {
+ // XmlConvert.ToUInt64 ("-101");
+ // Assert.Fail ("-101");
+ //} catch (FormatException) {
+ //}
}
[Test]
@@ -687,6 +743,19 @@ namespace MonoTests.System.Xml
} catch (FormatException) {
}
}
+
+ [Test] // see http://smdn.invisiblefulmoon.net/misc/forum/programming/#n10
+ public void DateTimeOffsetTimezoneRoundtrip ()
+ {
+ Assert.AreEqual (new DateTimeOffset (2009, 11, 05, 20, 16, 22, TimeSpan.FromHours (9)), XmlConvert.ToDateTimeOffset ("2009-11-05T20:16:22+09:00"), "#1");
+ }
+
+ [Test]
+ public void DateTimeOffsetWithWhitespace ()
+ {
+ var s = " 2010-01-02T00:00:00Z \t";
+ XmlConvert.ToDateTime (s);
+ }
#endif
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs
index 21c49abfff6..96ad062bb85 100644
--- a/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs
@@ -1305,6 +1305,7 @@ namespace MonoTests.System.Xml
xtr.Read ();
}
+#if NET_2_0
[Test]
public void ParsingWithNSMgrSubclass ()
{
@@ -1321,7 +1322,6 @@ namespace MonoTests.System.Xml
}
-
// The MyNS subclass chains namespace lookups
class MyNS : XmlNamespaceManager {
private XmlReader xr;
@@ -1341,5 +1341,6 @@ namespace MonoTests.System.Xml
return String.Empty;
}
}
+#endif
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs
index df575dcbd05..2b3885d4187 100644
--- a/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs
@@ -559,6 +559,21 @@ namespace MonoTests.System.Xml
w.Close ();
AssertType.AreEqual ("<hoge />", sw.ToString ());
}
+
+ [Test]
+ public void WriteStringDifferentBehavior ()
+ {
+ // Messy implementation difference.
+ // from XmlTextWriter -> <foo />
+ // from XmlWriter.XCreate() -> <foo></foo>
+ var sw = new StringWriter ();
+ var xw = XmlWriter.Create (sw);
+ xw.WriteStartElement ("foo");
+ xw.WriteString ("");
+ xw.WriteEndElement ();
+ xw.Close ();
+ AssertType.AreEqual ("<?xml version='1.0' encoding='utf-16'?><foo></foo>".Replace ('\'', '"'), sw.ToString ());
+ }
#endif
}
diff --git a/mcs/class/System.XML/monotouch_System.Xml.dll.sources b/mcs/class/System.XML/monotouch_System.Xml.dll.sources
index 24beac20c47..01db9956b27 100644
--- a/mcs/class/System.XML/monotouch_System.Xml.dll.sources
+++ b/mcs/class/System.XML/monotouch_System.Xml.dll.sources
@@ -91,6 +91,7 @@ System.Xml/IHasXmlChildNode.cs
System.Xml/IXmlNamespaceResolver.cs
System.Xml/MonoFIXAttribute.cs
System.Xml/NameTable.cs
+System.Xml/NamespaceHandling.cs
System.Xml/NewLineHandling.cs
System.Xml/ReadState.cs
../../build/common/MonoTODOAttribute.cs
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog b/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
index 7c07946c4e4..ea23a28f03a 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
@@ -1,3 +1,39 @@
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XAttribute.cs : escape whitespace chars in ToString().
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XUtil.cs : for DateTimeOffset, use XmlConvert to format string.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XUtil.cs : format float and double values as round-trippable.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XUtil.cs : to create an XNode from an object, do not use ToString()
+ directly. Handle TimeSpan in xsd manner.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XUtil.cs, XElement.cs, XAttribute.cs : unlike XmlConvert, casts to
+ DateTime seem also support general conversion (parse) from strings.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XUtil.cs, XElement.cs, XAttribute.cs : unlike XmlConvert, casts to
+ boolean seem also to handle case-insensitive true/false strings.
+
+2010-01-09 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XElement.cs : add DateTimeOffset implicit operator.
+ Patch by Tiaan Geldenhuys.
+
+2009-11-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XNodeWriter.cs : avoid prefix NRE on WriteStartAttribute().
+
2009-11-17 Atsushi Enomoto <atsushi@ximian.com>
* XContainer.cs : when replacing nodes, add contents first and then
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XAttribute.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XAttribute.cs
index 6b5025c72d3..02a2c66f423 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XAttribute.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XAttribute.cs
@@ -64,7 +64,7 @@ namespace System.Xml.Linq
{
if (attribute == null)
throw new ArgumentNullException ("attribute");
- return XmlConvert.ToBoolean (attribute.value);
+ return XUtil.ConvertToBoolean (attribute.value);
}
public static explicit operator bool? (XAttribute attribute)
@@ -72,14 +72,14 @@ namespace System.Xml.Linq
if (attribute == null)
return null;
- return attribute.value == null ? (bool?) null : XmlConvert.ToBoolean (attribute.value);
+ return attribute.value == null ? (bool?) null : XUtil.ConvertToBoolean (attribute.value);
}
public static explicit operator DateTime (XAttribute attribute)
{
if (attribute == null)
throw new ArgumentNullException ("attribute");
- return XmlConvert.ToDateTime (attribute.value, XmlDateTimeSerializationMode.RoundtripKind);
+ return XUtil.ToDateTime (attribute.value);
}
public static explicit operator DateTime? (XAttribute attribute)
@@ -87,9 +87,28 @@ namespace System.Xml.Linq
if (attribute == null)
return null;
- return attribute.value == null ? (DateTime?) null : XmlConvert.ToDateTime (attribute.value, XmlDateTimeSerializationMode.RoundtripKind);
+ return attribute.value == null ? (DateTime?) null : XUtil.ToDateTime (attribute.value);
}
+#if !TARGET_JVM // Same as for System.Xml.XmlConvert.ToDateTimeOffset
+
+ public static explicit operator DateTimeOffset (XAttribute attribute)
+ {
+ if (attribute == null)
+ throw new ArgumentNullException ("attribute");
+ return XmlConvert.ToDateTimeOffset (attribute.value);
+ }
+
+ public static explicit operator DateTimeOffset? (XAttribute attribute)
+ {
+ if (attribute == null)
+ return null;
+
+ return attribute.value == null ? (DateTimeOffset?) null : XmlConvert.ToDateTimeOffset (attribute.value);
+ }
+
+#endif
+
public static explicit operator decimal (XAttribute attribute)
{
if (attribute == null)
@@ -288,7 +307,7 @@ namespace System.Xml.Linq
this.value = XUtil.ToString (value);
}
- static readonly char [] escapeChars = new char [] {'<', '>', '&', '"'};
+ static readonly char [] escapeChars = new char [] {'<', '>', '&', '"', '\r', '\n', '\t'};
public override string ToString ()
{
@@ -312,6 +331,9 @@ namespace System.Xml.Linq
case '<': sb.Append ("&lt;"); break;
case '>': sb.Append ("&gt;"); break;
case '"': sb.Append ("&quot;"); break;
+ case '\r': sb.Append ("&#xD;"); break;
+ case '\n': sb.Append ("&#xA;"); break;
+ case '\t': sb.Append ("&#x9;"); break;
}
start = idx + 1;
} while (true);
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
index 043005e36ed..9740915d0e9 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
@@ -83,7 +83,7 @@ namespace System.Xml.Linq
{
if (element == null)
throw new ArgumentNullException ("element");
- return XmlConvert.ToBoolean (element.Value);
+ return XUtil.ConvertToBoolean (element.Value);
}
public static explicit operator bool? (XElement element)
@@ -91,14 +91,14 @@ namespace System.Xml.Linq
if (element == null)
return null;
- return element.Value == null ? (bool?) null : XmlConvert.ToBoolean (element.Value);
+ return element.Value == null ? (bool?) null : XUtil.ConvertToBoolean (element.Value);
}
public static explicit operator DateTime (XElement element)
{
if (element == null)
throw new ArgumentNullException ("element");
- return XmlConvert.ToDateTime (element.Value, XmlDateTimeSerializationMode.RoundtripKind);
+ return XUtil.ToDateTime (element.Value);
}
public static explicit operator DateTime? (XElement element)
@@ -106,9 +106,28 @@ namespace System.Xml.Linq
if (element == null)
return null;
- return element.Value == null ? (DateTime?) null : XmlConvert.ToDateTime (element.Value, XmlDateTimeSerializationMode.RoundtripKind);
+ return element.Value == null ? (DateTime?) null : XUtil.ToDateTime (element.Value);
}
+#if !TARGET_JVM // Same as for System.Xml.XmlConvert.ToDateTimeOffset
+
+ public static explicit operator DateTimeOffset (XElement element)
+ {
+ if (element == null)
+ throw new ArgumentNullException ("element");
+ return XmlConvert.ToDateTimeOffset (element.Value);
+ }
+
+ public static explicit operator DateTimeOffset? (XElement element)
+ {
+ if (element == null)
+ return null;
+
+ return element.Value == null ? (DateTimeOffset?) null : XmlConvert.ToDateTimeOffset (element.Value);
+ }
+
+#endif
+
public static explicit operator decimal (XElement element)
{
if (element == null)
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeWriter.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeWriter.cs
index ed89b974aef..d77ae72c460 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeWriter.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeWriter.cs
@@ -273,6 +273,8 @@ namespace System.Xml.Linq
XElement el = current as XElement;
if (el == null)
throw new InvalidOperationException ("Current state is not acceptable for startAttribute.");
+ if (prefix == null)
+ prefix = String.Empty;
// special case: in XmlWriter context, xmlns="blah" is
// passeed as localName = "xmlns", ns = w3c_xmlns.
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XUtil.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XUtil.cs
index d445240aa06..4555650b25d 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XUtil.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XUtil.cs
@@ -40,7 +40,20 @@ namespace System.Xml.Linq
public const string XmlnsNamespace =
"http://www.w3.org/2000/xmlns/";
- // FIXME: implement
+ public static bool ConvertToBoolean (string s)
+ {
+ return XmlConvert.ToBoolean (s.ToLowerInvariant ());
+ }
+
+ public static DateTime ToDateTime (string s)
+ {
+ try {
+ return XmlConvert.ToDateTime (s, XmlDateTimeSerializationMode.RoundtripKind);
+ } catch {
+ return DateTime.Parse (s);
+ }
+ }
+
public static string ToString (object o)
{
if (o == null)
@@ -51,7 +64,18 @@ namespace System.Xml.Linq
return (string) o;
case TypeCode.DateTime:
return XmlConvert.ToString ((DateTime) o, XmlDateTimeSerializationMode.RoundtripKind);
+ case TypeCode.Double:
+ return ((double) o).ToString ("r");
+ case TypeCode.Single:
+ return ((float) o).ToString ("r");
+ case TypeCode.Boolean:
+ // Valid XML values are `true' and `false', not `True' and `False' that boolean returns
+ return o.ToString().ToLower();
default:
+ if (o is TimeSpan)
+ return XmlConvert.ToString ((TimeSpan) o);
+ if (o is DateTimeOffset)
+ return XmlConvert.ToString ((DateTimeOffset) o);
return o.ToString ();
}
}
@@ -91,7 +115,7 @@ namespace System.Xml.Linq
else if (o is string)
return new XText ((string) o);
else
- return new XText (o.ToString ());
+ return new XText (ToString (o));
}
public static object GetDetachedObject (XObject child)
diff --git a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/ChangeLog b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/ChangeLog
index 2762e7a78b8..344f6a2fcaf 100644
--- a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/ChangeLog
+++ b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/ChangeLog
@@ -1,3 +1,18 @@
+2010-01-25 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XElementTest.cs, XAttributeTest.cs : add corner case value conversion
+ for numeric and TimeSpan values. Patch by Tiaan Geldenhuys.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XElementTest.cs, XAttributeTest.cs : add another set of extensive
+ tests by Tiaan Geldenhuys.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XElementTest.cs : add extensive tests by Tiaan Geldenhuys, with
+ one sort of comment-out as stated in r149388.
+
2009-11-17 Atsushi Enomoto <atsushi@ximian.com>
* XElementTest.cs : added test for bug #541098.
diff --git a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XAttributeTest.cs b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XAttributeTest.cs
index 8e82a8702c0..03f942d2a8b 100644
--- a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XAttributeTest.cs
+++ b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XAttributeTest.cs
@@ -119,13 +119,15 @@ namespace MonoTests.System.Xml.Linq
Assert.AreEqual (date, value);
}
+#pragma warning disable 219
[Test]
- public void NullCasts ()
+ public void CastNulls ()
{
- XAttribute a = null;
+ const XAttribute a = null;
Assert.AreEqual (null, (bool?) a, "bool?");
Assert.AreEqual (null, (DateTime?) a, "DateTime?");
+ Assert.AreEqual (null, (DateTimeOffset?) a, "DateTimeOffset?");
Assert.AreEqual (null, (decimal?) a, "decimal?");
Assert.AreEqual (null, (double?) a, "double?");
Assert.AreEqual (null, (float?) a, "float?");
@@ -136,6 +138,912 @@ namespace MonoTests.System.Xml.Linq
Assert.AreEqual (null, (ulong?) a, "ulong?");
Assert.AreEqual (null, (TimeSpan?) a, "TimeSpan?");
Assert.AreEqual (null, (string) a, "string");
+ AssertThrows<ArgumentNullException> (() => { bool z = (bool) a; }, "bool");
+ AssertThrows<ArgumentNullException> (() => { DateTime z = (DateTime) a; }, "DateTime");
+ AssertThrows<ArgumentNullException> (() => { DateTimeOffset z = (DateTimeOffset) a; }, "DateTimeOffset");
+ AssertThrows<ArgumentNullException> (() => { decimal z = (decimal) a; }, "decimal");
+ AssertThrows<ArgumentNullException> (() => { double z = (double) a; }, "double");
+ AssertThrows<ArgumentNullException> (() => { float z = (float) a; }, "float");
+ AssertThrows<ArgumentNullException> (() => { Guid z = (Guid) a; }, "Guid");
+ AssertThrows<ArgumentNullException> (() => { int z = (int) a; }, "int");
+ AssertThrows<ArgumentNullException> (() => { long z = (long) a; }, "long");
+ AssertThrows<ArgumentNullException> (() => { uint z = (uint) a; }, "uint");
+ AssertThrows<ArgumentNullException> (() => { ulong z = (ulong) a; }, "ulong");
+ AssertThrows<ArgumentNullException> (() => { TimeSpan z = (TimeSpan) a; }, "TimeSpan");
}
+
+ /// <remarks>
+ /// Provides functionality similar to Assert.Throws that is available on newer versions of NUnit.
+ /// </remarks>
+ private static T AssertThrows<T> (Action code, string message, params object[] args) where T : Exception
+ {
+ Exception actual = null;
+ try {
+ code ();
+ } catch (Exception exception) {
+ actual = exception;
+ }
+ Assert.That (actual, new NUnit.Framework.Constraints.ExactTypeConstraint (typeof (T)), message, args);
+ return (T) actual;
+ }
+
+ [Test]
+ public void CastEmptiesOrBlanks ()
+ {
+ XAttribute a = new XAttribute ("a", String.Empty);
+
+ // Verify expected "cloning" and "empty/blank" behaviour as prerequisites
+ Assert.AreEqual (String.Empty, a.Value, "#1-1");
+ Assert.AreEqual (String.Empty, new XAttribute (a).Value, "#1-2");
+ Assert.AreNotSame (a, new XAttribute (a), "#2-1");
+ Assert.AreEqual (a.ToString (), new XAttribute (a).ToString (), "#2-2");
+ Assert.AreEqual ("a=\"\"", a.ToString (), "#2-3");
+
+ // Execute the primary assertions of this test
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (a); }, "bool?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (a); }, "DateTime?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (a); }, "DateTimeOffset?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XAttribute (a); }, "decimal?");
+ AssertThrows<FormatException> (() => { double? z = (double?) new XAttribute (a); }, "double?");
+ AssertThrows<FormatException> (() => { float? z = (float?) new XAttribute (a); }, "float?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (a); }, "Guid?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XAttribute (a); }, "int?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XAttribute (a); }, "long?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XAttribute (a); }, "uint?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XAttribute (a); }, "ulong?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (a); }, "TimeSpan?");
+ Assert.AreEqual (String.Empty, (string) new XAttribute (a), "string");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (a); }, "bool");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (a); }, "DateTime");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (a); }, "DateTimeOffset");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XAttribute (a); }, "decimal");
+ AssertThrows<FormatException> (() => { double z = (double) new XAttribute (a); }, "double");
+ AssertThrows<FormatException> (() => { float z = (float) new XAttribute (a); }, "float");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (a); }, "Guid");
+ AssertThrows<FormatException> (() => { int z = (int) new XAttribute (a); }, "int");
+ AssertThrows<FormatException> (() => { long z = (long) new XAttribute (a); }, "long");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XAttribute (a); }, "uint");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XAttribute (a); }, "ulong");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (a); }, "TimeSpan");
+ }
+
+ [Test]
+ public void CastSpaces ()
+ {
+ XAttribute a = new XAttribute ("a", " ");
+
+ // Verify expected "cloning" and "space" behaviour as prerequisites
+ Assert.AreEqual (" ", a.Value, "#1-1");
+ Assert.AreEqual (" ", new XAttribute (a).Value, "#1-2");
+ Assert.AreNotSame (a, new XAttribute (a), "#2-1");
+ Assert.AreEqual (a.ToString (), new XAttribute (a).ToString (), "#2-2");
+ Assert.AreEqual ("a=\" \"", a.ToString (), "#2-3");
+ Assert.AreEqual (a.ToString (), new XAttribute ("a", ' ').ToString (), "#2-4");
+
+ // Execute the primary assertions of this test
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (a); }, "bool?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (a); }, "DateTime?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (a); }, "DateTimeOffset?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XAttribute (a); }, "decimal?");
+ AssertThrows<FormatException> (() => { double? z = (double?) new XAttribute (a); }, "double?");
+ AssertThrows<FormatException> (() => { float? z = (float?) new XAttribute (a); }, "float?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (a); }, "Guid?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XAttribute (a); }, "int?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XAttribute (a); }, "long?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XAttribute (a); }, "uint?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XAttribute (a); }, "ulong?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (a); }, "TimeSpan?");
+ Assert.AreEqual (" ", (string) new XAttribute (a), "string");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (a); }, "bool");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (a); }, "DateTime");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (a); }, "DateTimeOffset");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XAttribute (a); }, "decimal");
+ AssertThrows<FormatException> (() => { double z = (double) new XAttribute (a); }, "double");
+ AssertThrows<FormatException> (() => { float z = (float) new XAttribute (a); }, "float");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (a); }, "Guid");
+ AssertThrows<FormatException> (() => { int z = (int) new XAttribute (a); }, "int");
+ AssertThrows<FormatException> (() => { long z = (long) new XAttribute (a); }, "long");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XAttribute (a); }, "uint");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XAttribute (a); }, "ulong");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (a); }, "TimeSpan");
+ }
+
+ [Test]
+ public void CastNumbers ()
+ {
+ XAttribute a = new XAttribute ("a", "7");
+ XAttribute b = new XAttribute ("b", " 42 ");
+ XAttribute c = new XAttribute ("c", " \n\r 123 \t ");
+ XAttribute d = new XAttribute ("d", -101);
+ XAttribute o = new XAttribute ("o", "0");
+ XAttribute l = new XAttribute ("l", "1");
+ XAttribute I = new XAttribute ("I", "\t INF ");
+ XAttribute i = new XAttribute ("i", "Infinity");
+ XAttribute M = new XAttribute ("M", "-INF");
+ XAttribute m = new XAttribute ("m", " -Infinity ");
+ XAttribute n = new XAttribute ("n", "NaN");
+
+ // Verify expected "cloning" and basic conversion behaviour as prerequisites
+ Assert.AreEqual (" \n\r 123 \t ", c.Value, "#1-1");
+ Assert.AreEqual ("-101", new XAttribute (d).Value, "#1-2");
+ Assert.AreNotSame (o, new XAttribute (o), "#2-1");
+ Assert.AreEqual (l.ToString (), new XAttribute (l).ToString (), "#2-2");
+ Assert.AreEqual ("a=\"7\"", a.ToString (), "#2-3a");
+ Assert.AreEqual ("b=\" 42 \"", b.ToString (), "#2-3b");
+ Assert.AreEqual ("c=\" &#xA;&#xD; 123 &#x9; \"", c.ToString (), "#2-3c");
+ Assert.AreEqual ("d=\"-101\"", d.ToString (), "#2-3d");
+ Assert.AreEqual ("o=\"0\"", new XAttribute ("o", 0.0).ToString (), "#2-3o");
+ Assert.AreEqual ("l=\"1\"", new XAttribute ("l", 1.0f).ToString (), "#2-3l");
+ Assert.AreEqual ("n=\"NaN\"", new XAttribute ("n", double.NaN).ToString (), "#2-3n");
+ Assert.AreEqual (a.ToString (), new XAttribute ("a", '7').ToString (), "#2-4a");
+ Assert.AreEqual (d.ToString (), new XAttribute ("d", "-101").ToString (), "#2-4d");
+ Assert.AreEqual (o.ToString (), new XAttribute ("o", 0L).ToString (), "#2-4o");
+ Assert.AreEqual (l.ToString (), new XAttribute ("l", 1m).ToString (), "#2-4l");
+
+ // Execute the primary assertions of this test
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (a); }, "a:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (b); }, "b:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (c); }, "c:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (d); }, "d:bool?");
+ Assert.IsNotNull ((bool?) new XAttribute (o), "o:bool?:null");
+ Assert.AreEqual (false, ((bool?) new XAttribute (o)).Value, "o:bool?:value");
+ Assert.IsNotNull ((bool?) new XAttribute (l), "l:bool?:null");
+ Assert.AreEqual (true, ((bool?) new XAttribute (l)).Value, "l:bool?:value");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (I); }, "I:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (i); }, "i:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (M); }, "M:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (m); }, "m:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XAttribute (n); }, "n:bool?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (a); }, "a:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (b); }, "b:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (c); }, "c:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (d); }, "d:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (o); }, "o:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (l); }, "l:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (I); }, "I:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (i); }, "i:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (M); }, "M:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (m); }, "m:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XAttribute (n); }, "n:DateTime?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (a); }, "a:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (b); }, "b:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (c); }, "c:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (d); }, "d:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (o); }, "o:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (l); }, "l:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (I); }, "I:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (i); }, "i:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (M); }, "M:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (m); }, "m:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XAttribute (n); }, "n:DateTimeOffset?");
+ Assert.IsNotNull ((decimal?) new XAttribute (a), "a:decimal?:null");
+ Assert.AreEqual (7m, ((decimal?) new XAttribute (a)).Value, "a:decimal?:value");
+ Assert.IsNotNull ((decimal?) new XAttribute (b), "b:decimal?:null");
+ Assert.AreEqual (42m, ((decimal?) new XAttribute (b)).Value, "b:decimal?:value");
+ Assert.IsNotNull ((decimal?) new XAttribute (c), "c:decimal?:null");
+ Assert.AreEqual (123m, ((decimal?) new XAttribute (c)).Value, "c:decimal?:value");
+ Assert.IsNotNull ((decimal?) new XAttribute (d), "d:decimal?:null");
+ Assert.AreEqual (-101m, ((decimal?) new XAttribute (d)).Value, "d:decimal?:value");
+ Assert.IsNotNull ((decimal?) new XAttribute (o), "o:decimal?:null");
+ Assert.AreEqual (0m, ((decimal?) new XAttribute (o)).Value, "o:decimal?:value");
+ Assert.IsNotNull ((decimal?) new XAttribute (l), "l:decimal?:null");
+ Assert.AreEqual (1m, ((decimal?) new XAttribute (l)).Value, "l:decimal?:value");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XAttribute (I); }, "I:decimal?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XAttribute (i); }, "i:decimal?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XAttribute (M); }, "M:decimal?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XAttribute (m); }, "m:decimal?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XAttribute (n); }, "n:decimal?");
+ Assert.IsNotNull ((double?) new XAttribute (a), "a:double?:null");
+ Assert.AreEqual (7d, ((double?) new XAttribute (a)).Value, "a:double?:value");
+ Assert.IsNotNull ((double?) new XAttribute (b), "b:double?:null");
+ Assert.AreEqual (42d, ((double?) new XAttribute (b)).Value, "b:double?:value");
+ Assert.IsNotNull ((double?) new XAttribute (c), "c:double?:null");
+ Assert.AreEqual (123d, ((double?) new XAttribute (c)).Value, "c:double?:value");
+ Assert.IsNotNull ((double?) new XAttribute (d), "d:double?:null");
+ Assert.AreEqual (-101d, ((double?) new XAttribute (d)).Value, "d:double?:value");
+ Assert.IsNotNull ((double?) new XAttribute (o), "o:double?:null");
+ Assert.AreEqual (0d, ((double?) new XAttribute (o)).Value, "o:double?:value");
+ Assert.IsNotNull ((double?) new XAttribute (l), "l:double?:null");
+ Assert.AreEqual (1d, ((double?) new XAttribute (l)).Value, "l:double?:value");
+ Assert.IsNotNull ((double?) new XAttribute (I), "I:double?:null");
+ Assert.AreEqual (double.PositiveInfinity, ((double?) new XAttribute (I)).Value, "I:double?:value");
+ Assert.IsNotNull ((double?) new XAttribute (i), "i:double?:null");
+ Assert.AreEqual (double.PositiveInfinity, ((double?) new XAttribute (i)).Value, "i:double?:value");
+ Assert.IsNotNull ((double?) new XAttribute (M), "M:double?:null");
+ Assert.AreEqual (double.NegativeInfinity, ((double?) new XAttribute (M)).Value, "M:double?:value");
+ Assert.IsNotNull ((double?) new XAttribute (m), "m:double?:null");
+ Assert.AreEqual (double.NegativeInfinity, ((double?) new XAttribute (m)).Value, "m:double?:value");
+ Assert.IsNotNull ((double?) new XAttribute (n), "n:double?:null");
+ Assert.IsNaN (((double?) new XAttribute (n)).Value, "n:double?:value");
+ Assert.IsNotNull ((float?) new XAttribute (a), "a:float?:null");
+ Assert.AreEqual (7f, ((float?) new XAttribute (a)).Value, "a:float?:value");
+ Assert.IsNotNull ((float?) new XAttribute (b), "b:float?:null");
+ Assert.AreEqual (42f, ((float?) new XAttribute (b)).Value, "b:float?:value");
+ Assert.IsNotNull ((float?) new XAttribute (c), "c:float?:null");
+ Assert.AreEqual (123f, ((float?) new XAttribute (c)).Value, "c:float?:value");
+ Assert.IsNotNull ((float?) new XAttribute (d), "d:float?:null");
+ Assert.AreEqual (-101f, ((float?) new XAttribute (d)).Value, "d:float?:value");
+ Assert.IsNotNull ((float?) new XAttribute (o), "o:float?:null");
+ Assert.AreEqual (0f, ((float?) new XAttribute (o)).Value, "o:float?:value");
+ Assert.IsNotNull ((float?) new XAttribute (l), "l:float?:null");
+ Assert.AreEqual (1f, ((float?) new XAttribute (l)).Value, "l:float?:value");
+ Assert.IsNotNull ((float?) new XAttribute (I), "I:float?:null");
+ Assert.AreEqual (float.PositiveInfinity, ((float?) new XAttribute (I)).Value, "I:float?:value");
+ Assert.IsNotNull ((float?) new XAttribute (i), "i:float?:null");
+ Assert.AreEqual (float.PositiveInfinity, ((float?) new XAttribute (i)).Value, "i:float?:value");
+ Assert.IsNotNull ((float?) new XAttribute (M), "M:float?:null");
+ Assert.AreEqual (float.NegativeInfinity, ((float?) new XAttribute (M)).Value, "M:float?:value");
+ Assert.IsNotNull ((float?) new XAttribute (m), "m:float?:null");
+ Assert.AreEqual (float.NegativeInfinity, ((float?) new XAttribute (m)).Value, "m:float?:value");
+ Assert.IsNotNull ((float?) new XAttribute (n), "n:float?:null");
+ Assert.IsNaN (((float?) new XAttribute (n)).Value, "n:float?:value");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (a); }, "a:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (b); }, "b:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (c); }, "c:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (d); }, "d:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (o); }, "o:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (l); }, "l:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (I); }, "I:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (i); }, "i:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (M); }, "M:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (m); }, "m:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (n); }, "n:Guid?");
+ Assert.IsNotNull ((int?) new XAttribute (a), "a:int?:null");
+ Assert.AreEqual (7, ((int?) new XAttribute (a)).Value, "a:int?:value");
+ Assert.IsNotNull ((int?) new XAttribute (b), "b:int?:null");
+ Assert.AreEqual (42, ((int?) new XAttribute (b)).Value, "b:int?:value");
+ Assert.IsNotNull ((int?) new XAttribute (c), "c:int?:null");
+ Assert.AreEqual (123, ((int?) new XAttribute (c)).Value, "c:int?:value");
+ Assert.IsNotNull ((int?) new XAttribute (d), "d:int?:null");
+ Assert.AreEqual (-101, ((int?) new XAttribute (d)).Value, "d:int?:value");
+ Assert.IsNotNull ((int?) new XAttribute (o), "o:int?:null");
+ Assert.AreEqual (0, ((int?) new XAttribute (o)).Value, "o:int?:value");
+ Assert.IsNotNull ((int?) new XAttribute (l), "l:int?:null");
+ Assert.AreEqual (1, ((int?) new XAttribute (l)).Value, "l:int?:value");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XAttribute (I); }, "I:int?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XAttribute (i); }, "i:int?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XAttribute (M); }, "M:int?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XAttribute (m); }, "m:int?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XAttribute (n); }, "n:int?");
+ Assert.IsNotNull ((long?) new XAttribute (a), "a:long?:null");
+ Assert.AreEqual (7L, ((long?) new XAttribute (a)).Value, "a:long?:value");
+ Assert.IsNotNull ((long?) new XAttribute (b), "b:long?:null");
+ Assert.AreEqual (42L, ((long?) new XAttribute (b)).Value, "b:long?:value");
+ Assert.IsNotNull ((long?) new XAttribute (c), "c:long?:null");
+ Assert.AreEqual (123L, ((long?) new XAttribute (c)).Value, "c:long?:value");
+ Assert.IsNotNull ((long?) new XAttribute (d), "d:long?:null");
+ Assert.AreEqual (-101L, ((long?) new XAttribute (d)).Value, "d:long?:value");
+ Assert.IsNotNull ((long?) new XAttribute (o), "o:long?:null");
+ Assert.AreEqual (0L, ((long?) new XAttribute (o)).Value, "o:long?:value");
+ Assert.IsNotNull ((long?) new XAttribute (l), "l:long?:null");
+ Assert.AreEqual (1L, ((long?) new XAttribute (l)).Value, "l:long?:value");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XAttribute (I); }, "I:long?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XAttribute (i); }, "i:long?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XAttribute (M); }, "M:long?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XAttribute (m); }, "m:long?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XAttribute (n); }, "n:long?");
+ Assert.IsNotNull ((uint?) new XAttribute (a), "a:uint?:null");
+ Assert.AreEqual (7u, ((uint?) new XAttribute (a)).Value, "a:uint?:value");
+ Assert.IsNotNull ((uint?) new XAttribute (b), "b:uint?:null");
+ Assert.AreEqual (42u, ((uint?) new XAttribute (b)).Value, "b:uint?:value");
+ Assert.IsNotNull ((uint?) new XAttribute (c), "c:uint?:null");
+ Assert.AreEqual (123u, ((uint?) new XAttribute (c)).Value, "c:uint?:value");
+ // LAMESPEC: see XmlConvertTests.ToUInt32().
+ //AssertThrows<FormatException> (() => { uint? z = (uint?) new XAttribute (d); }, "d:uint?");
+ Assert.IsNotNull ((uint?) new XAttribute (o), "o:uint?:null");
+ Assert.AreEqual (0u, ((uint?) new XAttribute (o)).Value, "o:uint?:value");
+ Assert.IsNotNull ((uint?) new XAttribute (l), "l:uint?:null");
+ Assert.AreEqual (1u, ((uint?) new XAttribute (l)).Value, "l:uint?:value");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XAttribute (I); }, "I:uint?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XAttribute (i); }, "i:uint?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XAttribute (M); }, "M:uint?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XAttribute (m); }, "m:uint?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XAttribute (n); }, "n:uint?");
+ Assert.IsNotNull ((ulong?) new XAttribute (a), "a:ulong?:null");
+ Assert.AreEqual (7UL, ((ulong?) new XAttribute (a)).Value, "a:ulong?:value");
+ Assert.IsNotNull ((ulong?) new XAttribute (b), "b:ulong?:null");
+ Assert.AreEqual (42UL, ((ulong?) new XAttribute (b)).Value, "b:ulong?:value");
+ Assert.IsNotNull ((ulong?) new XAttribute (c), "c:ulong?:null");
+ Assert.AreEqual (123UL, ((ulong?) new XAttribute (c)).Value, "c:ulong?:value");
+ // LAMESPEC: see XmlConvertTests.ToUInt64().
+ //AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XAttribute (d); }, "d:ulong?");
+ Assert.IsNotNull ((ulong?) new XAttribute (o), "o:ulong?:null");
+ Assert.AreEqual (0UL, ((ulong?) new XAttribute (o)).Value, "o:ulong?:value");
+ Assert.IsNotNull ((ulong?) new XAttribute (l), "l:ulong?:null");
+ Assert.AreEqual (1UL, ((ulong?) new XAttribute (l)).Value, "l:ulong?:value");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XAttribute (I); }, "I:ulong?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XAttribute (i); }, "i:ulong?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XAttribute (M); }, "M:ulong?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XAttribute (m); }, "m:ulong?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XAttribute (n); }, "n:ulong?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (a); }, "a:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (b); }, "b:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (c); }, "c:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (d); }, "d:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (o); }, "o:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (l); }, "l:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (I); }, "I:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (i); }, "i:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (M); }, "M:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (m); }, "m:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XAttribute (n); }, "n:TimeSpan?");
+ Assert.AreEqual ("7", (string) new XAttribute (a), "a:string");
+ Assert.AreEqual (" 42 ", (string) new XAttribute (b), "b:string");
+ Assert.AreEqual (" \n\r 123 \t ", (string) new XAttribute (c), "c:string");
+ Assert.AreEqual ("-101", (string) new XAttribute (d), "d:string");
+ Assert.AreEqual ("0", (string) new XAttribute (o), "o:string");
+ Assert.AreEqual ("1", (string) new XAttribute (l), "l:string");
+ Assert.AreEqual ("\t INF ", (string) new XAttribute (I), "I:string");
+ Assert.AreEqual ("Infinity", (string) new XAttribute (i), "i:string");
+ Assert.AreEqual ("-INF", (string) new XAttribute (M), "M:string");
+ Assert.AreEqual (" -Infinity ", (string) new XAttribute (m), "m:string");
+ Assert.AreEqual ("NaN", (string) new XAttribute (n), "n:string");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (a); }, "a:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (b); }, "b:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (c); }, "c:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (d); }, "d:bool");
+ Assert.AreEqual (false, (bool) new XAttribute (o), "o:bool");
+ Assert.AreEqual (true, (bool) new XAttribute (l), "l:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (I); }, "I:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (i); }, "i:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (M); }, "M:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (m); }, "m:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XAttribute (n); }, "n:bool");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (a); }, "a:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (b); }, "b:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (c); }, "c:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (d); }, "d:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (o); }, "o:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (l); }, "l:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (I); }, "I:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (i); }, "i:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (M); }, "M:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (m); }, "m:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XAttribute (n); }, "n:DateTime");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (a); }, "a:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (b); }, "b:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (c); }, "c:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (d); }, "d:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (o); }, "o:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (l); }, "l:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (I); }, "I:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (i); }, "i:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (M); }, "M:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (m); }, "m:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XAttribute (n); }, "n:DateTimeOffset");
+ Assert.AreEqual (7m, (decimal) new XAttribute (a), "a:decimal");
+ Assert.AreEqual (42m, (decimal) new XAttribute (b), "b:decimal");
+ Assert.AreEqual (123m, (decimal) new XAttribute (c), "c:decimal");
+ Assert.AreEqual (-101m, (decimal) new XAttribute (d), "d:decimal");
+ Assert.AreEqual (0m, (decimal) new XAttribute (o), "o:decimal");
+ Assert.AreEqual (1m, (decimal) new XAttribute (l), "l:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XAttribute (I); }, "I:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XAttribute (i); }, "i:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XAttribute (M); }, "M:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XAttribute (m); }, "m:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XAttribute (n); }, "n:decimal");
+ Assert.AreEqual (7d, (double) new XAttribute (a), "a:double");
+ Assert.AreEqual (42d, (double) new XAttribute (b), "b:double");
+ Assert.AreEqual (123d, (double) new XAttribute (c), "c:double");
+ Assert.AreEqual (-101d, (double) new XAttribute (d), "d:double");
+ Assert.AreEqual (0d, (double) new XAttribute (o), "o:double");
+ Assert.AreEqual (1d, (double) new XAttribute (l), "l:double");
+ Assert.AreEqual (double.PositiveInfinity, (double) new XAttribute (I), "I:double");
+ Assert.AreEqual (double.PositiveInfinity, (double) new XAttribute (i), "i:double");
+ Assert.AreEqual (double.NegativeInfinity, (double) new XAttribute (M), "M:double");
+ Assert.AreEqual (double.NegativeInfinity, (double) new XAttribute (m), "m:double");
+ Assert.IsNaN (((double) new XAttribute (n)), "n:double");
+ Assert.AreEqual (7f, (float) new XAttribute (a), "a:float");
+ Assert.AreEqual (42f, (float) new XAttribute (b), "b:float");
+ Assert.AreEqual (123f, (float) new XAttribute (c), "c:float");
+ Assert.AreEqual (-101f, (float) new XAttribute (d), "d:float");
+ Assert.AreEqual (0f, (float) new XAttribute (o), "o:float");
+ Assert.AreEqual (1f, (float) new XAttribute (l), "l:float");
+ Assert.AreEqual (float.PositiveInfinity, (float) new XAttribute (I), "I:float");
+ Assert.AreEqual (float.PositiveInfinity, (float) new XAttribute (i), "i:float");
+ Assert.AreEqual (float.NegativeInfinity, (float) new XAttribute (M), "M:float");
+ Assert.AreEqual (float.NegativeInfinity, (float) new XAttribute (m), "m:float");
+ Assert.IsNaN (((float) new XAttribute (n)), "n:float");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (a); }, "a:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (b); }, "b:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (c); }, "c:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (d); }, "d:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (o); }, "o:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (l); }, "l:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (I); }, "I:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (i); }, "i:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (M); }, "M:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (m); }, "m:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (n); }, "n:Guid");
+ Assert.AreEqual (7, (int) new XAttribute (a), "a:int");
+ Assert.AreEqual (42, (int) new XAttribute (b), "b:int");
+ Assert.AreEqual (123, (int) new XAttribute (c), "c:int");
+ Assert.AreEqual (-101, (int) new XAttribute (d), "d:int");
+ Assert.AreEqual (0, (int) new XAttribute (o), "o:int");
+ Assert.AreEqual (1, (int) new XAttribute (l), "l:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XAttribute (I); }, "I:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XAttribute (i); }, "i:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XAttribute (M); }, "M:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XAttribute (m); }, "m:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XAttribute (n); }, "n:int");
+ Assert.AreEqual (7L, (long) new XAttribute (a), "a:long");
+ Assert.AreEqual (42L, (long) new XAttribute (b), "b:long");
+ Assert.AreEqual (123L, (long) new XAttribute (c), "c:long");
+ Assert.AreEqual (-101L, (long) new XAttribute (d), "d:long");
+ Assert.AreEqual (0L, (long) new XAttribute (o), "o:long");
+ Assert.AreEqual (1L, (long) new XAttribute (l), "l:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XAttribute (I); }, "I:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XAttribute (i); }, "i:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XAttribute (M); }, "M:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XAttribute (m); }, "m:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XAttribute (n); }, "n:long");
+ Assert.AreEqual (7u, (uint) new XAttribute (a), "a:uint");
+ Assert.AreEqual (42u, (uint) new XAttribute (b), "b:uint");
+ Assert.AreEqual (123u, (uint) new XAttribute (c), "c:uint");
+ // LAMESPEC: see XmlConvertTests.ToUInt32().
+ //AssertThrows<FormatException> (() => { uint z = (uint) new XAttribute (d); }, "d:uint");
+ Assert.AreEqual (0u, (uint) new XAttribute (o), "o:uint");
+ Assert.AreEqual (1u, (uint) new XAttribute (l), "l:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XAttribute (I); }, "I:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XAttribute (i); }, "i:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XAttribute (M); }, "M:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XAttribute (m); }, "m:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XAttribute (n); }, "n:uint");
+ Assert.AreEqual (7UL, (ulong) new XAttribute (a), "a:ulong");
+ Assert.AreEqual (42UL, (ulong) new XAttribute (b), "b:ulong");
+ Assert.AreEqual (123UL, (ulong) new XAttribute (c), "c:ulong");
+ // LAMESPEC: see XmlConvertTests.ToUInt64().
+ //AssertThrows<FormatException> (() => { ulong z = (ulong) new XAttribute (d); }, "d:ulong");
+ Assert.AreEqual (0UL, (ulong) new XAttribute (o), "o:ulong");
+ Assert.AreEqual (1UL, (ulong) new XAttribute (l), "l:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XAttribute (I); }, "I:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XAttribute (i); }, "i:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XAttribute (M); }, "M:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XAttribute (m); }, "m:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XAttribute (n); }, "n:ulong");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (a); }, "a:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (b); }, "b:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (c); }, "c:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (d); }, "d:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (o); }, "o:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (l); }, "l:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (I); }, "I:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (i); }, "i:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (M); }, "M:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (m); }, "m:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XAttribute (n); }, "n:TimeSpan");
+
+ // Perform some round-trip tests with numbers
+ XAttribute x;
+ const decimal @decimal = -41051609414188012238960097189m;
+ const double @double = 8.5506609919892972E+307d;
+ const float @float = -1.70151961E+37f;
+ const int @int = -1051251773;
+ const long @long = 4596767133891939716L;
+ const uint @uint = 4106628142u;
+ const ulong @ulong = 10713797297298255927UL;
+ x = new XAttribute ("x", @decimal);
+ Assert.IsNotNull ((decimal?) new XAttribute (x), "x:decimal?:null");
+ Assert.AreEqual (@decimal, ((decimal?) new XAttribute (x)).Value, "x:decimal?:value");
+ Assert.AreEqual (@decimal, (decimal) new XAttribute (x), "x:decimal");
+ x = new XAttribute ("x", @double);
+ Assert.IsNotNull ((double?) new XAttribute (x), "x:double?:null");
+ Assert.AreEqual (@double, ((double?) new XAttribute (x)).Value, "x:double?:value");
+ Assert.AreEqual (@double, (double) new XAttribute (x), "x:double");
+ x = new XAttribute ("x", @float);
+ Assert.IsNotNull ((float?) new XAttribute (x), "x:float?:null");
+ Assert.AreEqual (@float, ((float?) new XAttribute (x)).Value, "x:float?:value");
+ Assert.AreEqual (@float, (float) new XAttribute (x), "x:float");
+ x = new XAttribute ("x", @int);
+ Assert.IsNotNull ((int?) new XAttribute (x), "x:int?:null");
+ Assert.AreEqual (@int, ((int?) new XAttribute (x)).Value, "x:int?:value");
+ Assert.AreEqual (@int, (int) new XAttribute (x), "x:int");
+ x = new XAttribute ("x", @long);
+ Assert.IsNotNull ((long?) new XAttribute (x), "x:long?:null");
+ Assert.AreEqual (@long, ((long?) new XAttribute (x)).Value, "x:long?:value");
+ Assert.AreEqual (@long, (long) new XAttribute (x), "x:long");
+ x = new XAttribute ("x", @uint);
+ Assert.IsNotNull ((uint?) new XAttribute (x), "x:uint?:null");
+ Assert.AreEqual (@uint, ((uint?) new XAttribute (x)).Value, "x:uint?:value");
+ Assert.AreEqual (@uint, (uint) new XAttribute (x), "x:uint");
+ x = new XAttribute ("x", @ulong);
+ Assert.IsNotNull ((ulong?) new XAttribute (x), "x:ulong?:null");
+ Assert.AreEqual (@ulong, ((ulong?) new XAttribute (x)).Value, "x:ulong?:value");
+ Assert.AreEqual (@ulong, (ulong) new XAttribute (x), "x:ulong");
+ x = new XAttribute ("x", double.NaN);
+ Assert.IsNotNull ((double?) new XAttribute (x), "NaN:double?:null");
+ Assert.AreEqual (double.NaN, ((double?) new XAttribute (x)).Value, "NaN:double?:value");
+ Assert.AreEqual (double.NaN, (double) new XAttribute (x), "NaN:double");
+ x = new XAttribute ("x", float.NaN);
+ Assert.IsNotNull ((float?) new XAttribute (x), "NaN:float?:null");
+ Assert.AreEqual (float.NaN, ((float?) new XAttribute (x)).Value, "NaN:float?:value");
+ Assert.AreEqual (float.NaN, (float) new XAttribute (x), "NaN:float");
+ x = new XAttribute ("x", double.PositiveInfinity);
+ Assert.IsNotNull ((double?) new XAttribute (x), "+Inf:double?:null");
+ Assert.AreEqual (double.PositiveInfinity, ((double?) new XAttribute (x)).Value, "+Inf:double?:value");
+ Assert.AreEqual (double.PositiveInfinity, (double) new XAttribute (x), "+Inf:double");
+ x = new XAttribute ("x", float.PositiveInfinity);
+ Assert.IsNotNull ((float?) new XAttribute (x), "+Inf:float?:null");
+ Assert.AreEqual (float.PositiveInfinity, ((float?) new XAttribute (x)).Value, "+Inf:float?:value");
+ Assert.AreEqual (float.PositiveInfinity, (float) new XAttribute (x), "+Inf:float");
+ x = new XAttribute ("x", double.NegativeInfinity);
+ Assert.IsNotNull ((double?) new XAttribute (x), "-Inf:double?:null");
+ Assert.AreEqual (double.NegativeInfinity, ((double?) new XAttribute (x)).Value, "-Inf:double?:value");
+ Assert.AreEqual (double.NegativeInfinity, (double) new XAttribute (x), "-Inf:double");
+ x = new XAttribute ("x", float.NegativeInfinity);
+ Assert.IsNotNull ((float?) new XAttribute (x), "-Inf:float?:null");
+ Assert.AreEqual (float.NegativeInfinity, ((float?) new XAttribute (x)).Value, "-Inf:float?:value");
+ Assert.AreEqual (float.NegativeInfinity, (float) new XAttribute (x), "-Inf:float");
+
+ // Perform overflow tests with numbers
+ AssertThrows<OverflowException> (() => { decimal z = (decimal) new XAttribute ("z", "91051609414188012238960097189"); }, "z:decimal");
+ AssertThrows<OverflowException> (() => { decimal? z = (decimal?) new XAttribute ("z", "91051609414188012238960097189"); }, "z:decimal?");
+ AssertThrows<OverflowException> (() => { double z = (double) new XAttribute ("z", "8.5506609919892972E+654"); }, "z:double");
+ AssertThrows<OverflowException> (() => { double? z = (double?) new XAttribute ("z", "8.5506609919892972E+654"); }, "z:double?");
+ AssertThrows<OverflowException> (() => { float z = (float) new XAttribute ("z", @double); }, "z:float");
+ AssertThrows<OverflowException> (() => { float? z = (float?) new XAttribute ("z", @double); }, "z:float?");
+ AssertThrows<OverflowException> (() => { int z = (int) new XAttribute ("z", @long); }, "z:int");
+ AssertThrows<OverflowException> (() => { int? z = (int?) new XAttribute ("z", @long); }, "z:int?");
+ AssertThrows<OverflowException> (() => { long z = (long) new XAttribute ("z", @decimal); }, "z:long");
+ AssertThrows<OverflowException> (() => { long? z = (long?) new XAttribute ("z", @decimal); }, "z:long?");
+ AssertThrows<OverflowException> (() => { uint z = (uint) new XAttribute ("z", @ulong); }, "z:uint");
+ AssertThrows<OverflowException> (() => { uint? z = (uint?) new XAttribute ("z", @ulong); }, "z:uint?");
+ AssertThrows<OverflowException> (() => { ulong z = (ulong) new XAttribute ("z", -@decimal); }, "z:ulong");
+ AssertThrows<OverflowException> (() => { ulong? z = (ulong?) new XAttribute ("z", -@decimal); }, "z:ulong?");
+ }
+
+ [Test]
+ public void CastExtremes ()
+ {
+ // Test extremes/constants where round-trips should work in specific ways
+ Assert.AreEqual (decimal.MaxValue, (decimal) new XAttribute ("k", decimal.MaxValue), "MaxValue:decimal");
+ Assert.AreEqual (decimal.MinValue, (decimal) new XAttribute ("k", decimal.MinValue), "MinValue:decimal");
+ Assert.AreEqual (decimal.MinusOne, (decimal) new XAttribute ("k", decimal.MinusOne), "MinusOne:decimal");
+ Assert.AreEqual (decimal.One, (decimal) new XAttribute ("k", decimal.One), "One:decimal");
+ Assert.AreEqual (decimal.Zero, (decimal) new XAttribute ("k", decimal.Zero), "Zero:decimal");
+ Assert.AreEqual (double.MaxValue, (double) new XAttribute ("k", double.MaxValue), "MaxValue:double");
+ Assert.AreEqual (double.MinValue, (double) new XAttribute ("k", double.MinValue), "MinValue:double");
+ Assert.AreEqual (double.Epsilon, (double) new XAttribute ("k", double.Epsilon), "Epsilon:double");
+ Assert.AreEqual (double.NaN, (double) new XAttribute ("k", double.NaN), "NaN:double");
+ Assert.AreEqual (double.NegativeInfinity, (double) new XAttribute ("k", double.NegativeInfinity), "-Inf:double");
+ Assert.AreEqual (double.PositiveInfinity, (double) new XAttribute ("k", double.PositiveInfinity), "+Inf:double");
+ Assert.AreEqual (float.MaxValue, (float) new XAttribute ("k", float.MaxValue), "MaxValue:float");
+ Assert.AreEqual (float.MinValue, (float) new XAttribute ("k", float.MinValue), "MinValue:float");
+ Assert.AreEqual (float.Epsilon, (float) new XAttribute ("k", float.Epsilon), "Epsilon:float");
+ Assert.AreEqual (float.NaN, (float) new XAttribute ("k", float.NaN), "NaN:float");
+ Assert.AreEqual (float.NegativeInfinity, (float) new XAttribute ("k", float.NegativeInfinity), "-Inf:float");
+ Assert.AreEqual (float.PositiveInfinity, (float) new XAttribute ("k", float.PositiveInfinity), "+Inf:float");
+ Assert.AreEqual (int.MaxValue, (int) new XAttribute ("k", int.MaxValue), "MaxValue:int");
+ Assert.AreEqual (int.MinValue, (int) new XAttribute ("k", int.MinValue), "MinValue:int");
+ Assert.AreEqual (long.MaxValue, (long) new XAttribute ("k", long.MaxValue), "MaxValue:long");
+ Assert.AreEqual (long.MinValue, (long) new XAttribute ("k", long.MinValue), "MinValue:long");
+ Assert.AreEqual (uint.MaxValue, (uint) new XAttribute ("k", uint.MaxValue), "MaxValue:uint");
+ Assert.AreEqual (uint.MinValue, (uint) new XAttribute ("k", uint.MinValue), "MinValue:uint");
+ Assert.AreEqual (ulong.MaxValue, (ulong) new XAttribute ("k", ulong.MaxValue), "MaxValue:ulong");
+ Assert.AreEqual (ulong.MinValue, (ulong) new XAttribute ("k", ulong.MinValue), "MinValue:ulong");
+ Assert.AreEqual (decimal.MaxValue, (decimal?) new XAttribute ("k", decimal.MaxValue), "MaxValue:decimal?");
+ Assert.AreEqual (decimal.MinValue, (decimal?) new XAttribute ("k", decimal.MinValue), "MinValue:decimal?");
+ Assert.AreEqual (decimal.MinusOne, (decimal?) new XAttribute ("k", decimal.MinusOne), "MinusOne:decimal?");
+ Assert.AreEqual (decimal.One, (decimal?) new XAttribute ("k", decimal.One), "One:decimal?");
+ Assert.AreEqual (decimal.Zero, (decimal?) new XAttribute ("k", decimal.Zero), "Zero:decimal?");
+ Assert.AreEqual (double.MaxValue, (double?) new XAttribute ("k", double.MaxValue), "MaxValue:double?");
+ Assert.AreEqual (double.MinValue, (double?) new XAttribute ("k", double.MinValue), "MinValue:double?");
+ Assert.AreEqual (double.Epsilon, (double?) new XAttribute ("k", double.Epsilon), "Epsilon:double?");
+ Assert.AreEqual (double.NaN, (double?) new XAttribute ("k", double.NaN), "NaN:double?");
+ Assert.AreEqual (double.NegativeInfinity, (double?) new XAttribute ("k", double.NegativeInfinity), "-Inf:double?");
+ Assert.AreEqual (double.PositiveInfinity, (double?) new XAttribute ("k", double.PositiveInfinity), "+Inf:double?");
+ Assert.AreEqual (float.MaxValue, (float?) new XAttribute ("k", float.MaxValue), "MaxValue:float?");
+ Assert.AreEqual (float.MinValue, (float?) new XAttribute ("k", float.MinValue), "MinValue:float?");
+ Assert.AreEqual (float.Epsilon, (float?) new XAttribute ("k", float.Epsilon), "Epsilon:float?");
+ Assert.AreEqual (float.NaN, (float?) new XAttribute ("k", float.NaN), "NaN:float?");
+ Assert.AreEqual (float.NegativeInfinity, (float?) new XAttribute ("k", float.NegativeInfinity), "-Inf:float?");
+ Assert.AreEqual (float.PositiveInfinity, (float?) new XAttribute ("k", float.PositiveInfinity), "+Inf:float?");
+ Assert.AreEqual (int.MaxValue, (int?) new XAttribute ("k", int.MaxValue), "MaxValue:int?");
+ Assert.AreEqual (int.MinValue, (int?) new XAttribute ("k", int.MinValue), "MinValue:int?");
+ Assert.AreEqual (long.MaxValue, (long?) new XAttribute ("k", long.MaxValue), "MaxValue:long?");
+ Assert.AreEqual (long.MinValue, (long?) new XAttribute ("k", long.MinValue), "MinValue:long?");
+ Assert.AreEqual (uint.MaxValue, (uint?) new XAttribute ("k", uint.MaxValue), "MaxValue:uint?");
+ Assert.AreEqual (uint.MinValue, (uint?) new XAttribute ("k", uint.MinValue), "MinValue:uint?");
+ Assert.AreEqual (ulong.MaxValue, (ulong?) new XAttribute ("k", ulong.MaxValue), "MaxValue:ulong?");
+ Assert.AreEqual (ulong.MinValue, (ulong?) new XAttribute ("k", ulong.MinValue), "MinValue:ulong?");
+ Assert.AreEqual (DateTime.MaxValue, (DateTime) new XAttribute ("k", DateTime.MaxValue), "MaxValue:DateTime");
+ Assert.AreEqual (DateTime.MinValue, (DateTime) new XAttribute ("k", DateTime.MinValue), "MinValue:DateTime");
+ Assert.AreEqual (DateTime.MaxValue, (DateTime?) new XAttribute ("k", DateTime.MaxValue), "MaxValue:DateTime?");
+ Assert.AreEqual (DateTime.MinValue, (DateTime?) new XAttribute ("k", DateTime.MinValue), "MinValue:DateTime?");
+ Assert.AreEqual (DateTimeOffset.MaxValue, (DateTimeOffset) new XAttribute ("k", DateTimeOffset.MaxValue), "MaxValue:DateTimeOffset");
+ Assert.AreEqual (DateTimeOffset.MinValue, (DateTimeOffset) new XAttribute ("k", DateTimeOffset.MinValue), "MinValue:DateTimeOffset");
+ Assert.AreEqual (DateTimeOffset.MaxValue, (DateTimeOffset?) new XAttribute ("k", DateTimeOffset.MaxValue), "MaxValue:DateTimeOffset?");
+ Assert.AreEqual (DateTimeOffset.MinValue, (DateTimeOffset?) new XAttribute ("k", DateTimeOffset.MinValue), "MinValue:DateTimeOffset?");
+ Assert.AreEqual (TimeSpan.MaxValue, (TimeSpan) new XAttribute ("k", TimeSpan.MaxValue), "MaxValue:TimeSpan");
+ Assert.AreEqual (TimeSpan.MinValue, (TimeSpan) new XAttribute ("k", TimeSpan.MinValue), "MinValue:TimeSpan");
+ Assert.AreEqual (TimeSpan.MaxValue, (TimeSpan?) new XAttribute ("k", TimeSpan.MaxValue), "MaxValue:TimeSpan?");
+ Assert.AreEqual (TimeSpan.MinValue, (TimeSpan?) new XAttribute ("k", TimeSpan.MinValue), "MinValue:TimeSpan?");
+ }
+
+ [Test]
+ public void CastBooleans ()
+ {
+ Assert.IsNotNull ((bool?) new XAttribute ("fq", "false"), "#1a");
+ Assert.AreEqual (false, ((bool?) new XAttribute ("fq", "false")).Value, "#1b");
+ Assert.IsNotNull ((bool?) new XAttribute ("tq", "true"), "#2a");
+ Assert.AreEqual (true, ((bool?) new XAttribute ("tq", "true")).Value, "#2b");
+ Assert.IsNotNull ((bool?) new XAttribute ("Fq", "False"), "#3a");
+ Assert.AreEqual (false, ((bool?) new XAttribute ("Fq", "False")).Value, "#3b");
+ Assert.IsNotNull ((bool?) new XAttribute ("Tq", "True"), "#4a");
+ Assert.AreEqual (true, ((bool?) new XAttribute ("Tq", "True")).Value, "#4b");
+ Assert.IsNotNull ((bool?) new XAttribute ("Fs", " False \t \r "), "#5a");
+ Assert.AreEqual (false, ((bool?) new XAttribute ("Fs", " False \t \r ")).Value, "#5b");
+ Assert.IsNotNull ((bool?) new XAttribute ("Ts", " \t True \n "), "#6a");
+ Assert.AreEqual (true, ((bool?) new XAttribute ("Ts", " \t True \n ")).Value, "#6b");
+ Assert.AreEqual (false, (bool) new XAttribute ("f", "false"), "#7");
+ Assert.AreEqual (true, (bool) new XAttribute ("t", "true"), "#8");
+ Assert.AreEqual (false, (bool) new XAttribute ("F", "False"), "#9");
+ Assert.AreEqual (true, (bool) new XAttribute ("T", "True"), "#10");
+ Assert.AreEqual (false, (bool)new XAttribute ("fs", " false "), "#11");
+ Assert.AreEqual (true, (bool)new XAttribute ("ts", " true "), "#12");
+ Assert.IsNotNull ((bool?) new XAttribute ("x", true), "#13a");
+ Assert.IsTrue (((bool?) new XAttribute ("x", true)).Value, "#13b");
+ Assert.IsTrue ((bool) new XAttribute ("x", true), "#13c");
+ Assert.IsNotNull ((bool?) new XAttribute ("x", false), "#14a");
+ Assert.IsFalse (((bool?) new XAttribute ("x", false)).Value, "#14b");
+ Assert.IsFalse ((bool) new XAttribute ("x", false), "#14c");
+ Assert.IsTrue ((bool) new XAttribute ("x", bool.TrueString), "#15a");
+ Assert.IsFalse ((bool) new XAttribute ("x", bool.FalseString), "#15b");
+ }
+
+ [Test]
+ public void CastGuids ()
+ {
+ Guid rb = new Guid (new byte[16] { 0x9A, 0xBF, 0xCE, 0x7E, 0x07, 0x29, 0x9C, 0x43, 0x80, 0x7D, 0x48, 0x20, 0xB9, 0x19, 0xEA, 0x57 });
+ Guid rd = new Guid (new byte[16] { 0x21, 0x5B, 0x57, 0x26, 0xCD, 0x14, 0x5E, 0x44, 0x8F, 0xFA, 0xE2, 0xBC, 0x24, 0x7B, 0x2E, 0xC9 });
+ Guid rn = new Guid (new byte[16] { 0xF9, 0x46, 0x41, 0xA8, 0xA5, 0x03, 0xF1, 0x4A, 0xAD, 0x97, 0x7B, 0xC7, 0x79, 0x57, 0x2B, 0x79 });
+ Guid rp = new Guid (new byte[16] { 0x51, 0x6B, 0x8A, 0x17, 0xEF, 0x11, 0xFB, 0x48, 0x83, 0xBD, 0x57, 0xB4, 0x99, 0xF9, 0xC1, 0xE6 });
+ Guid rz = Guid.Empty;
+ Guid rx = Guid.NewGuid ();
+
+ XAttribute b = new XAttribute ("b", "{7ECEBF9A-2907-439c-807D-4820B919EA57}");
+ XAttribute d = new XAttribute ("d", " 26575b21-14cd-445e-8ffa-e2bc247b2ec9");
+ XAttribute n = new XAttribute ("n", " a84146f903A54af1ad977bC779572b79 \t ");
+ XAttribute p = new XAttribute ("p", " \t \n (178a6b51-11ef-48fb-83bd-57b499f9c1e6) ");
+ XAttribute z = new XAttribute ("z", "00000000-0000-0000-0000-000000000000\r\n");
+ XAttribute x = new XAttribute ("x", rx);
+
+ Assert.IsNotNull ((Guid?) new XAttribute (b), "#1a");
+ Assert.AreEqual (rb, ((Guid?) new XAttribute (b)).Value, "#1b");
+ Assert.AreEqual (rb, (Guid) new XAttribute (b), "#1c");
+ Assert.AreEqual (rb, (Guid) new XAttribute ("r", rb), "#1d");
+ Assert.IsNotNull ((Guid?) new XAttribute ("r", rb), "#1e");
+ Assert.AreEqual (rb, ((Guid?) new XAttribute ("r", rb)).Value, "#1f");
+
+ Assert.IsNotNull ((Guid?) new XAttribute (d), "#2a");
+ Assert.AreEqual (rd, ((Guid?) new XAttribute (d)).Value, "#2b");
+ Assert.AreEqual (rd, (Guid) new XAttribute (d), "#2c");
+ Assert.AreEqual (rd, (Guid) new XAttribute ("r", rd), "#2d");
+ Assert.IsNotNull ((Guid?) new XAttribute ("r", rd), "#2e");
+ Assert.AreEqual (rd, ((Guid?) new XAttribute ("r", rd)).Value, "#2f");
+
+ Assert.IsNotNull ((Guid?) new XAttribute (n), "#3a");
+ Assert.AreEqual (rn, ((Guid?) new XAttribute (n)).Value, "#3b");
+ Assert.AreEqual (rn, (Guid) new XAttribute (n), "#3c");
+ Assert.AreEqual (rn, (Guid) new XAttribute ("r", rn), "#3d");
+ Assert.IsNotNull ((Guid?) new XAttribute ("r", rn), "#3e");
+ Assert.AreEqual (rn, ((Guid?) new XAttribute ("r", rn)).Value, "#3f");
+
+ Assert.IsNotNull ((Guid?) new XAttribute (p), "#4a");
+ Assert.AreEqual (rp, ((Guid?) new XAttribute (p)).Value, "#4b");
+ Assert.AreEqual (rp, (Guid) new XAttribute (p), "#4c");
+ Assert.AreEqual (rp, (Guid) new XAttribute ("r", rp), "#4d");
+ Assert.IsNotNull ((Guid?) new XAttribute ("r", rp), "#4e");
+ Assert.AreEqual (rp, ((Guid?) new XAttribute ("r", rp)).Value, "#4f");
+
+ Assert.IsNotNull ((Guid?) new XAttribute (z), "#5a");
+ Assert.AreEqual (rz, ((Guid?) new XAttribute (z)).Value, "#5b");
+ Assert.AreEqual (rz, (Guid) new XAttribute (z), "#5c");
+
+ Assert.IsNotNull ((Guid?) new XAttribute (x), "#6a");
+ Assert.AreEqual (rx, ((Guid?) new XAttribute (x)).Value, "#6b");
+ Assert.AreEqual (rx, (Guid) new XAttribute (x), "#6c");
+ }
+
+ [Test]
+ public void CastDateTimes ()
+ {
+ const long weirdTicks = 8070L; // Examples of problematic fractions of seconds on Mono 2.6.1: xxx.8796082, xxx.7332000, xxx.0050300, xxx.5678437, xxx.0008070, xxx.0769000 and xxx.2978530 (about 1 in 8 of all possible fractions seem to fail)
+ DateTime ra = new DateTime (1987, 1, 23, 21, 45, 36, 89, DateTimeKind.Unspecified);
+ DateTime rb = new DateTime (2001, 2, 3, 4, 5, 6, 789, DateTimeKind.Local);
+ DateTime rc = new DateTime (2010, 1, 2, 0, 0, 0, 0, DateTimeKind.Utc) + TimeSpan.FromTicks (weirdTicks);
+ DateTime rd = new DateTime (1956, 11, 2, 0, 34, 0);
+ DateTime re = new DateTime (DateTime.Today.Ticks + 619917654321L);
+ DateTime rx = DateTime.Now;
+ DateTime rz = DateTime.UtcNow;
+
+ XAttribute a = new XAttribute ("a", "1987-01-23T21:45:36.089");
+ XAttribute b = new XAttribute ("b", " \n 2001-02-03T04:05:06.789" + DateTime.Now.ToString ("zzz") + " \r ");
+ XAttribute c = new XAttribute ("c", "2010-01-02T00:00:00." + weirdTicks.ToString ("d7").TrimEnd ('0') + "Z");
+ XAttribute d = new XAttribute ("d", " Nov 2, 1956 12:34 AM \r\n \t");
+ XAttribute e = new XAttribute ("e", " \t 17:13:11.7654321 ");
+ XAttribute x = new XAttribute ("x", rx);
+ XAttribute z = new XAttribute ("z", rz);
+
+ Assert.IsNotNull ((DateTime?) new XAttribute (a), "#1a");
+ Assert.AreEqual (ra, ((DateTime?) new XAttribute (a)).Value, "#1b");
+ Assert.AreEqual (ra, (DateTime) new XAttribute (a), "#1c");
+ Assert.AreEqual (ra, (DateTime) new XAttribute ("r", ra), "#1d");
+ Assert.IsNotNull ((DateTime?) new XAttribute ("r", ra), "#1e");
+ Assert.AreEqual (ra, ((DateTime?) new XAttribute ("r", ra)).Value, "#1f");
+
+ Assert.IsNotNull ((DateTime?) new XAttribute (b), "#2a");
+ Assert.AreEqual (rb, ((DateTime?) new XAttribute (b)).Value, "#2b");
+ Assert.AreEqual (rb, (DateTime) new XAttribute (b), "#2c");
+ Assert.AreEqual (rb, (DateTime) new XAttribute ("r", rb), "#2d");
+ Assert.IsNotNull ((DateTime?) new XAttribute ("r", rb), "#2e");
+ Assert.AreEqual (rb, ((DateTime?) new XAttribute ("r", rb)).Value, "#2f");
+
+ Assert.AreEqual (10000000L, TimeSpan.TicksPerSecond, "#3a"); // Should be same on all platforms (sanity check for next logical step)
+ Assert.AreEqual (weirdTicks, rc.Ticks % TimeSpan.TicksPerSecond, "#3b"); // Prerequisite: No ticks lost in raw data
+ Assert.IsNotNull ((DateTime?) new XAttribute (c), "#3c");
+ Assert.AreEqual (weirdTicks, ((DateTime?) new XAttribute (c)).Value.Ticks % TimeSpan.TicksPerSecond, "#3d"); // Did casting lose any ticks belonging to fractional seconds?
+ Assert.AreEqual (rc, ((DateTime?) new XAttribute (c)).Value, "#3e");
+ Assert.AreEqual (weirdTicks, ((DateTime) new XAttribute (c)).Ticks % TimeSpan.TicksPerSecond, "#3f");
+ Assert.AreEqual (rc, (DateTime) new XAttribute (c), "#3g");
+ Assert.AreEqual (rc, (DateTime) new XAttribute ("r", rc), "#3h");
+ Assert.IsNotNull ((DateTime?) new XAttribute ("r", rc), "#3i");
+ Assert.AreEqual (rc, ((DateTime?) new XAttribute ("r", rc)).Value, "#3j");
+
+ Assert.IsNotNull ((DateTime?) new XAttribute (d), "#4a");
+ Assert.AreEqual (rd, ((DateTime?) new XAttribute (d)).Value, "#4b");
+ Assert.AreEqual (rd, (DateTime) new XAttribute (d), "#4c");
+ Assert.AreEqual (rd, (DateTime) new XAttribute ("r", rd), "#4d");
+ Assert.IsNotNull ((DateTime?) new XAttribute ("r", rd), "#4e");
+ Assert.AreEqual (rd, ((DateTime?) new XAttribute ("r", rd)).Value, "#4f");
+
+ Assert.IsNotNull ((DateTime?) new XAttribute (e), "#5a");
+ Assert.AreEqual (re, ((DateTime?) new XAttribute (e)).Value, "#5b");
+ Assert.AreEqual (re, (DateTime) new XAttribute (e), "#5c");
+ Assert.AreEqual (re, (DateTime) new XAttribute ("r", re), "#5d");
+ Assert.IsNotNull ((DateTime?) new XAttribute ("r", re), "#5e");
+ Assert.AreEqual (re, ((DateTime?) new XAttribute ("r", re)).Value, "#5f");
+
+ Assert.IsNotNull ((DateTime?) new XAttribute (x), "#6a");
+ Assert.AreEqual (rx, ((DateTime?) new XAttribute (x)).Value, "#6b");
+ Assert.AreEqual (rx, (DateTime) new XAttribute (x), "#6c");
+
+ Assert.IsNotNull ((DateTime?) new XAttribute (z), "#7a");
+ Assert.AreEqual (rz, ((DateTime?) new XAttribute (z)).Value, "#7b");
+ Assert.AreEqual (rz, (DateTime) new XAttribute (z), "#7c");
+ }
+
+ [Test]
+ public void CastDateTimeOffsets ()
+ {
+ DateTimeOffset ra = new DateTimeOffset (1987, 1, 23, 21, 45, 36, 89, TimeSpan.FromHours (+13.75)); // e.g., Chatham Islands (daylight-savings time)
+ DateTimeOffset rb = new DateTimeOffset (2001, 2, 3, 4, 5, 6, 789, DateTimeOffset.Now.Offset); // Local time
+ DateTimeOffset rc = new DateTimeOffset (2010, 1, 2, 0, 0, 0, 0, TimeSpan.Zero); // UTC, and midnight
+ DateTimeOffset rd = new DateTimeOffset (1956, 11, 2, 12, 34, 10, TimeSpan.FromHours (-3.5));
+ DateTimeOffset re = new DateTimeOffset (630646468231147764, TimeSpan.FromHours (2)); // UTC+2, and with full resolution
+ DateTimeOffset rf = new DateTimeOffset (643392740967552000, TimeSpan.Zero); // UTC, and with a potentially problematic fractional second that might lose a tick on Mono 2.6.1
+ DateTimeOffset rx = DateTimeOffset.Now;
+ DateTimeOffset rz = DateTimeOffset.UtcNow;
+
+ XAttribute a = new XAttribute ("a", "1987-01-23T21:45:36.089+13:45");
+ XAttribute b = new XAttribute ("b", "2001-02-03T04:05:06.789" + DateTimeOffset.Now.ToString ("zzz"));
+ XAttribute c = new XAttribute ("c", " 2010-01-02T00:00:00Z \t");
+ XAttribute d = new XAttribute ("d", " Nov 2, 1956 12:34:10 PM -3:30 \r\n \t");
+ XAttribute e = new XAttribute ("e", "1999-06-10T21:27:03.1147764+02:00");
+ XAttribute f = new XAttribute ("f", "2039-10-31T12:34:56.7552+00:00");
+ XAttribute x = new XAttribute ("x", rx);
+ XAttribute z = new XAttribute ("z", rz);
+
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute (a), "#1a");
+ Assert.AreEqual (ra, ((DateTimeOffset?) new XAttribute (a)).Value, "#1b");
+ Assert.AreEqual (ra, (DateTimeOffset) new XAttribute (a), "#1c");
+ Assert.AreEqual (ra, (DateTimeOffset) new XAttribute ("r", ra), "#1d");
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute ("r", ra), "#1e");
+ Assert.AreEqual (ra, ((DateTimeOffset?) new XAttribute ("r", ra)).Value, "#1f");
+
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute (b), "#2a");
+ Assert.AreEqual (rb, ((DateTimeOffset?) new XAttribute (b)).Value, "#2b");
+ Assert.AreEqual (rb, (DateTimeOffset) new XAttribute (b), "#2c");
+ Assert.AreEqual (rb, (DateTimeOffset) new XAttribute ("r", rb), "#2d");
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute ("r", rb), "#2e");
+ Assert.AreEqual (rb, ((DateTimeOffset?) new XAttribute ("r", rb)).Value, "#2f");
+
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute (c), "#3a");
+ Assert.AreEqual (rc, ((DateTimeOffset?) new XAttribute (c)).Value, "#3b");
+ Assert.AreEqual (rc, (DateTimeOffset) new XAttribute (c), "#3c");
+ Assert.AreEqual (rc, (DateTimeOffset) new XAttribute ("r", rc), "#3d");
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute ("r", rc), "#3e");
+ Assert.AreEqual (rc, ((DateTimeOffset?) new XAttribute ("r", rc)).Value, "#3f");
+
+ AssertThrows<FormatException> (() => { DateTimeOffset? r = (DateTimeOffset?) new XAttribute (d); }, "#4a");
+ AssertThrows<FormatException> (() => { DateTimeOffset r = (DateTimeOffset) new XAttribute (d); }, "#4b");
+ Assert.AreEqual (rd, DateTimeOffset.Parse (d.Value), "#4c"); // Sanity check: Okay for standalone DateTimeOffset but not as XML as in above
+
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute (e), "#5a");
+ Assert.AreEqual (re, ((DateTimeOffset?) new XAttribute (e)).Value, "#5b");
+ Assert.AreEqual (re, (DateTimeOffset) new XAttribute (e), "#5c");
+ Assert.AreEqual (re, (DateTimeOffset) new XAttribute ("r", re), "#5d");
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute ("r", re), "#5e");
+ Assert.AreEqual (re, ((DateTimeOffset?) new XAttribute ("r", re)).Value, "#5f");
+
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute (f), "#6a");
+ Assert.AreEqual (rf, ((DateTimeOffset?) new XAttribute (f)).Value, "#6b");
+ Assert.AreEqual (rf, (DateTimeOffset) new XAttribute (f), "#6c");
+ Assert.AreEqual (rf, (DateTimeOffset) new XAttribute ("r", rf), "#6d");
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute ("r", rf), "#6e");
+ Assert.AreEqual (rf, ((DateTimeOffset?) new XAttribute ("r", rf)).Value, "#6f");
+
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute (x), "#7a");
+ Assert.AreEqual (rx, ((DateTimeOffset?) new XAttribute (x)).Value, "#7b");
+ Assert.AreEqual (rx, (DateTimeOffset) new XAttribute (x), "#7c");
+
+ Assert.IsNotNull ((DateTimeOffset?) new XAttribute (z), "#8a");
+ Assert.AreEqual (rz, ((DateTimeOffset?) new XAttribute (z)).Value, "#8b");
+ Assert.AreEqual (rz, (DateTimeOffset) new XAttribute (z), "#8c");
+ }
+
+ [Test]
+ public void CastTimeSpans ()
+ {
+ TimeSpan ra = new TimeSpan (23, 21, 45, 36, 89);
+ TimeSpan rb = -new TimeSpan (3, 4, 5, 6, 789);
+ TimeSpan rc = new TimeSpan (2, 0, 0, 0, 0);
+ TimeSpan rd = new TimeSpan (26798453L); // in ticks, using full resolution and longer than a second
+ TimeSpan re = new TimeSpan (2710L); // in ticks, a sub-millisecond interval
+ TimeSpan rx = new TimeSpan (0, 3, 8, 29, 734);
+ TimeSpan rz = TimeSpan.Zero;
+
+ XAttribute a = new XAttribute ("a", "P23DT21H45M36.089S");
+ XAttribute b = new XAttribute ("b", "-P3DT4H5M6.789S");
+ XAttribute c = new XAttribute ("c", " \r\n \tP2D ");
+ XAttribute d = new XAttribute ("d", "PT2.6798453S");
+ XAttribute e = new XAttribute ("e", "PT0.000271S");
+ XAttribute x = new XAttribute ("x", rx);
+ XAttribute z = new XAttribute ("z", rz);
+
+ Assert.IsNotNull ((TimeSpan?) new XAttribute (a), "#1a");
+ Assert.AreEqual (ra, ((TimeSpan?) new XAttribute (a)).Value, "#1b");
+ Assert.AreEqual (ra, (TimeSpan) new XAttribute (a), "#1c");
+ Assert.AreEqual (ra, (TimeSpan) new XAttribute ("r", ra), "#1d");
+ Assert.IsNotNull ((TimeSpan?) new XAttribute ("r", ra), "#1e");
+ Assert.AreEqual (ra, ((TimeSpan?) new XAttribute ("r", ra)).Value, "#1f");
+
+ Assert.IsNotNull ((TimeSpan?) new XAttribute (b), "#2a");
+ Assert.AreEqual (rb, ((TimeSpan?) new XAttribute (b)).Value, "#2b");
+ Assert.AreEqual (rb, (TimeSpan) new XAttribute (b), "#2c");
+ Assert.AreEqual (rb, (TimeSpan) new XAttribute ("r", rb), "#2d");
+ Assert.IsNotNull ((TimeSpan?) new XAttribute ("r", rb), "#2e");
+ Assert.AreEqual (rb, ((TimeSpan?) new XAttribute ("r", rb)).Value, "#2f");
+
+ Assert.IsNotNull ((TimeSpan?) new XAttribute (c), "#3a");
+ Assert.AreEqual (rc, ((TimeSpan?) new XAttribute (c)).Value, "#3b");
+ Assert.AreEqual (rc, (TimeSpan) new XAttribute (c), "#3c");
+ Assert.AreEqual (rc, (TimeSpan) new XAttribute ("r", rc), "#3d");
+ Assert.IsNotNull ((TimeSpan?) new XAttribute ("r", rc), "#3e");
+ Assert.AreEqual (rc, ((TimeSpan?) new XAttribute ("r", rc)).Value, "#3f");
+
+ Assert.IsNotNull ((TimeSpan?) new XAttribute (d), "#4a");
+ Assert.AreEqual (rd, ((TimeSpan?) new XAttribute (d)).Value, "#4b");
+ Assert.AreEqual (rd, (TimeSpan) new XAttribute (d), "#4c");
+ Assert.AreEqual (rd, (TimeSpan) new XAttribute ("r", rd), "#4d");
+ Assert.IsNotNull ((TimeSpan?) new XAttribute ("r", rd), "#4e");
+ Assert.AreEqual (rd, ((TimeSpan?) new XAttribute ("r", rd)).Value, "#4f");
+
+ Assert.IsNotNull ((TimeSpan?) new XAttribute (e), "#5a");
+ Assert.AreEqual (re, ((TimeSpan?) new XAttribute (e)).Value, "#5b");
+ Assert.AreEqual (re, (TimeSpan) new XAttribute (e), "#5c");
+ Assert.AreEqual (re, (TimeSpan) new XAttribute ("r", re), "#5d");
+ Assert.IsNotNull ((TimeSpan?) new XAttribute ("r", re), "#5e");
+ Assert.AreEqual (re, ((TimeSpan?) new XAttribute ("r", re)).Value, "#5f");
+
+ Assert.IsNotNull ((TimeSpan?) new XAttribute (x), "#6a");
+ Assert.AreEqual (rx, ((TimeSpan?) new XAttribute (x)).Value, "#6b");
+ Assert.AreEqual (rx, (TimeSpan) new XAttribute (x), "#6c");
+
+ Assert.IsNotNull ((TimeSpan?) new XAttribute (z), "#7a");
+ Assert.AreEqual (rz, ((TimeSpan?) new XAttribute (z)).Value, "#7b");
+ Assert.AreEqual (rz, (TimeSpan) new XAttribute (z), "#7c");
+ }
+#pragma warning restore 219
}
}
diff --git a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
index 773d40612b4..ef3b5df9e62 100644
--- a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
+++ b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
@@ -417,13 +417,15 @@ namespace MonoTests.System.Xml.Linq
Assert.AreEqual (null, ((XElement) bar.FirstNode).GetPrefixOfNamespace (ns1), "#5-3");
}
+#pragma warning disable 219
[Test]
- public void NullCasts ()
+ public void CastNulls ()
{
- XElement a = null;
+ const XElement a = null;
Assert.AreEqual (null, (bool?) a, "bool?");
Assert.AreEqual (null, (DateTime?) a, "DateTime?");
+ Assert.AreEqual (null, (DateTimeOffset?) a, "DateTimeOffset?");
Assert.AreEqual (null, (decimal?) a, "decimal?");
Assert.AreEqual (null, (double?) a, "double?");
Assert.AreEqual (null, (float?) a, "float?");
@@ -434,8 +436,1031 @@ namespace MonoTests.System.Xml.Linq
Assert.AreEqual (null, (ulong?) a, "ulong?");
Assert.AreEqual (null, (TimeSpan?) a, "TimeSpan?");
Assert.AreEqual (null, (string) a, "string");
+ AssertThrows<ArgumentNullException> (() => { bool z = (bool) a; }, "bool");
+ AssertThrows<ArgumentNullException> (() => { DateTime z = (DateTime) a; }, "DateTime");
+ AssertThrows<ArgumentNullException> (() => { DateTimeOffset z = (DateTimeOffset) a; }, "DateTimeOffset");
+ AssertThrows<ArgumentNullException> (() => { decimal z = (decimal) a; }, "decimal");
+ AssertThrows<ArgumentNullException> (() => { double z = (double) a; }, "double");
+ AssertThrows<ArgumentNullException> (() => { float z = (float) a; }, "float");
+ AssertThrows<ArgumentNullException> (() => { Guid z = (Guid) a; }, "Guid");
+ AssertThrows<ArgumentNullException> (() => { int z = (int) a; }, "int");
+ AssertThrows<ArgumentNullException> (() => { long z = (long) a; }, "long");
+ AssertThrows<ArgumentNullException> (() => { uint z = (uint) a; }, "uint");
+ AssertThrows<ArgumentNullException> (() => { ulong z = (ulong) a; }, "ulong");
+ AssertThrows<ArgumentNullException> (() => { TimeSpan z = (TimeSpan) a; }, "TimeSpan");
}
+ /// <remarks>
+ /// Provides functionality similar to Assert.Throws that is available on newer versions of NUnit.
+ /// </remarks>
+ private static T AssertThrows<T> (Action code, string message, params object[] args) where T : Exception
+ {
+ Exception actual = null;
+ try {
+ code ();
+ } catch (Exception exception) {
+ actual = exception;
+ }
+ Assert.That (actual, new NUnit.Framework.Constraints.ExactTypeConstraint (typeof (T)), message, args);
+ return (T) actual;
+ }
+
+ [Test]
+ public void CastEmpties ()
+ {
+ XElement a = new XElement ("a");
+
+ // Verify expected "cloning" and "empty" behaviour as prerequisites
+ Assert.IsTrue (a.IsEmpty, "#1-1");
+ Assert.IsTrue (new XElement (a).IsEmpty, "#1-2");
+ Assert.AreEqual (String.Empty, a.Value, "#2-1");
+ Assert.AreEqual (String.Empty, new XElement (a).Value, "#2-2");
+ Assert.AreNotSame (a, new XElement (a), "#3-1");
+ Assert.AreEqual (a.ToString (), new XElement (a).ToString (), "#3-2");
+ Assert.AreEqual ("<a />", a.ToString (), "#3-3");
+ Assert.AreEqual (a.ToString (), new XElement ("a", null).ToString (), "#3-4");
+
+ // Execute the primary assertions of this test
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (a); }, "bool?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (a); }, "DateTime?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (a); }, "DateTimeOffset?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XElement (a); }, "decimal?");
+ AssertThrows<FormatException> (() => { double? z = (double?) new XElement (a); }, "double?");
+ AssertThrows<FormatException> (() => { float? z = (float?) new XElement (a); }, "float?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (a); }, "Guid?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XElement (a); }, "int?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XElement (a); }, "long?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (a); }, "uint?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (a); }, "ulong?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (a); }, "TimeSpan?");
+ Assert.AreEqual (String.Empty, (string) new XElement (a), "string");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (a); }, "bool");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (a); }, "DateTime");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (a); }, "DateTimeOffset");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XElement (a); }, "decimal");
+ AssertThrows<FormatException> (() => { double z = (double) new XElement (a); }, "double");
+ AssertThrows<FormatException> (() => { float z = (float) new XElement (a); }, "float");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (a); }, "Guid");
+ AssertThrows<FormatException> (() => { int z = (int) new XElement (a); }, "int");
+ AssertThrows<FormatException> (() => { long z = (long) new XElement (a); }, "long");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XElement (a); }, "uint");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (a); }, "ulong");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (a); }, "TimeSpan");
+ }
+
+ [Test]
+ public void CastBlanks ()
+ {
+ XElement a = new XElement ("a", String.Empty);
+ XElement b = new XElement ("b", new XCData (string.Empty));
+
+ // Verify expected "cloning" and "blank" behaviour as prerequisites
+ Assert.IsFalse (a.IsEmpty, "#1-1a");
+ Assert.IsFalse (b.IsEmpty, "#1-1b");
+ Assert.IsFalse (new XElement (a).IsEmpty, "#1-2a");
+ Assert.IsFalse (new XElement (b).IsEmpty, "#1-2b");
+ Assert.AreEqual (String.Empty, a.Value, "#2-1a");
+ Assert.AreEqual (String.Empty, b.Value, "#2-1b");
+ Assert.AreEqual (String.Empty, new XElement (a).Value, "#2-2a");
+ Assert.AreEqual (String.Empty, new XElement (b).Value, "#2-2b");
+ Assert.AreNotSame (a, new XElement (a), "#3-1a");
+ Assert.AreNotSame (b, new XElement (b), "#3-1b");
+ Assert.AreEqual (a.ToString (), new XElement (a).ToString (), "#3-2a");
+ Assert.AreEqual (b.ToString (), new XElement (b).ToString (), "#3-2b");
+ Assert.AreEqual ("<a></a>", a.ToString (), "#3-3a");
+ Assert.AreEqual ("<b><![CDATA[]]></b>", b.ToString (), "#3-3b");
+ Assert.AreEqual (a.ToString (), new XElement ("a", "").ToString (), "#3-4a");
+ Assert.AreEqual (b.ToString (), new XElement ("b", new XCData ("")).ToString (), "#3-4b");
+
+ // Execute the primary assertions of this test
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (a); }, "a:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (b); }, "b:bool?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (a); }, "a:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (b); }, "b:DateTime?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (a); }, "a:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (b); }, "b:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XElement (a); }, "a:decimal?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XElement (b); }, "b:decimal?");
+ AssertThrows<FormatException> (() => { double? z = (double?) new XElement (a); }, "a:double?");
+ AssertThrows<FormatException> (() => { double? z = (double?) new XElement (b); }, "b:double?");
+ AssertThrows<FormatException> (() => { float? z = (float?) new XElement (a); }, "a:float?");
+ AssertThrows<FormatException> (() => { float? z = (float?) new XElement (b); }, "b:float?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (a); }, "a:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (b); }, "b:Guid?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XElement (a); }, "a:int?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XElement (b); }, "b:int?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XElement (a); }, "a:long?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XElement (b); }, "b:long?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (a); }, "a:uint?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (b); }, "b:uint?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (a); }, "a:ulong?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (b); }, "b:ulong?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (a); }, "a:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (b); }, "b:TimeSpan?");
+ Assert.AreEqual (String.Empty, (string) new XElement (a), "a:string");
+ Assert.AreEqual (String.Empty, (string) new XElement (b), "b:string");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (a); }, "a:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (b); }, "b:bool");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (a); }, "a:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (b); }, "b:DateTime");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (a); }, "a:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (b); }, "b:DateTimeOffset");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XElement (a); }, "a:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XElement (b); }, "b:decimal");
+ AssertThrows<FormatException> (() => { double z = (double) new XElement (a); }, "a:double");
+ AssertThrows<FormatException> (() => { double z = (double) new XElement (b); }, "b:double");
+ AssertThrows<FormatException> (() => { float z = (float) new XElement (a); }, "a:float");
+ AssertThrows<FormatException> (() => { float z = (float) new XElement (b); }, "b:float");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (a); }, "a:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (b); }, "b:Guid");
+ AssertThrows<FormatException> (() => { int z = (int) new XElement (a); }, "a:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XElement (b); }, "b:int");
+ AssertThrows<FormatException> (() => { long z = (long) new XElement (a); }, "a:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XElement (b); }, "b:long");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XElement (a); }, "a:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XElement (b); }, "b:uint");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (a); }, "a:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (b); }, "b:ulong");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (a); }, "a:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (b); }, "b:TimeSpan");
+ }
+
+ [Test]
+ public void CastSpaces ()
+ {
+ XElement a = new XElement ("a", " ");
+ XElement b = new XElement ("b", new XCData (" "));
+
+ // Verify expected "cloning" and "space" behaviour as prerequisites
+ Assert.IsFalse (a.IsEmpty, "#1-1a");
+ Assert.IsFalse (b.IsEmpty, "#1-1b");
+ Assert.IsFalse (new XElement (a).IsEmpty, "#1-2a");
+ Assert.IsFalse (new XElement (b).IsEmpty, "#1-2b");
+ Assert.AreEqual (" ", a.Value, "#2-1a");
+ Assert.AreEqual (" ", b.Value, "#2-1b");
+ Assert.AreEqual (" ", new XElement (a).Value, "#2-2a");
+ Assert.AreEqual (" ", new XElement (b).Value, "#2-2b");
+ Assert.AreNotSame (a, new XElement (a), "#3-1a");
+ Assert.AreNotSame (b, new XElement (b), "#3-1b");
+ Assert.AreEqual (a.ToString (), new XElement (a).ToString (), "#3-2a");
+ Assert.AreEqual (b.ToString (), new XElement (b).ToString (), "#3-2b");
+ Assert.AreEqual ("<a> </a>", a.ToString (), "#3-3a");
+ Assert.AreEqual ("<b><![CDATA[ ]]></b>", b.ToString (), "#3-3b");
+ Assert.AreEqual (a.ToString (), new XElement ("a", ' ').ToString (), "#3-4");
+
+ // Execute the primary assertions of this test
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (a); }, "a:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (b); }, "b:bool?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (a); }, "a:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (b); }, "b:DateTime?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (a); }, "a:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (b); }, "b:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XElement (a); }, "a:decimal?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XElement (b); }, "b:decimal?");
+ AssertThrows<FormatException> (() => { double? z = (double?) new XElement (a); }, "a:double?");
+ AssertThrows<FormatException> (() => { double? z = (double?) new XElement (b); }, "b:double?");
+ AssertThrows<FormatException> (() => { float? z = (float?) new XElement (a); }, "a:float?");
+ AssertThrows<FormatException> (() => { float? z = (float?) new XElement (b); }, "b:float?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (a); }, "a:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (b); }, "b:Guid?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XElement (a); }, "a:int?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XElement (b); }, "b:int?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XElement (a); }, "a:long?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XElement (b); }, "b:long?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (a); }, "a:uint?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (b); }, "b:uint?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (a); }, "a:ulong?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (b); }, "b:ulong?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (a); }, "a:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (b); }, "b:TimeSpan?");
+ Assert.AreEqual (" ", (string) new XElement (a), "a:string");
+ Assert.AreEqual (" ", (string) new XElement (b), "b:string");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (a); }, "a:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (b); }, "b:bool");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (a); }, "a:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (b); }, "b:DateTime");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (a); }, "a:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (b); }, "b:DateTimeOffset");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XElement (a); }, "a:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XElement (b); }, "b:decimal");
+ AssertThrows<FormatException> (() => { double z = (double) new XElement (a); }, "a:double");
+ AssertThrows<FormatException> (() => { double z = (double) new XElement (b); }, "b:double");
+ AssertThrows<FormatException> (() => { float z = (float) new XElement (a); }, "a:float");
+ AssertThrows<FormatException> (() => { float z = (float) new XElement (b); }, "b:float");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (a); }, "a:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (b); }, "b:Guid");
+ AssertThrows<FormatException> (() => { int z = (int) new XElement (a); }, "a:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XElement (b); }, "b:int");
+ AssertThrows<FormatException> (() => { long z = (long) new XElement (a); }, "a:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XElement (b); }, "b:long");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XElement (a); }, "a:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XElement (b); }, "b:uint");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (a); }, "a:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (b); }, "b:ulong");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (a); }, "a:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (b); }, "b:TimeSpan");
+ }
+
+ [Test]
+ public void CastNumbers ()
+ {
+ XElement a = new XElement ("a", "7");
+ XElement b = new XElement ("b", new XCData (" 42 "));
+ XElement c = new XElement ("c", " \r\n 13 \t ");
+ XElement d = new XElement ("d", -101);
+ XElement o = new XElement ("o", "0");
+ XElement l = new XElement ("l", "1");
+ XElement I = new XElement ("I", "INF");
+ XElement i = new XElement ("i", " Infinity ");
+ XElement M = new XElement ("M", " -INF ");
+ XElement m = new XElement ("m", "-Infinity");
+ XElement n = new XElement ("n", "\t NaN ");
+
+ // Verify expected "cloning" and basic conversion behaviour as prerequisites
+ Assert.IsFalse (a.IsEmpty, "#1-1");
+ Assert.IsFalse (new XElement (b).IsEmpty, "#1-2");
+ Assert.AreEqual (" \r\n 13 \t ", c.Value, "#2-1");
+ Assert.AreEqual ("-101", new XElement (d).Value, "#2-2");
+ Assert.AreNotSame (o, new XElement (o), "#3-1");
+ Assert.AreEqual (l.ToString (), new XElement (l).ToString (), "#3-2");
+ Assert.AreEqual ("<a>7</a>", a.ToString (), "#3-3a");
+ Assert.AreEqual ("<b><![CDATA[ 42 ]]></b>", b.ToString (), "#3-3b");
+ Assert.AreEqual ("<c> \r\n 13 \t </c>", c.ToString (), "#3-3c");
+ Assert.AreEqual ("<d>-101</d>", d.ToString (), "#3-3d");
+ Assert.AreEqual ("<o>0</o>", new XElement ("o", 0.0).ToString (), "#3-3o");
+ Assert.AreEqual ("<l>1</l>", new XElement ("l", 1.0f).ToString (), "#3-3l");
+ Assert.AreEqual ("<n>NaN</n>", new XElement ("n", double.NaN).ToString (), "#3-3n");
+ Assert.AreEqual (a.ToString (), new XElement ("a", '7').ToString (), "#3-4a");
+ Assert.AreEqual (d.ToString (), new XElement ("d", "-101").ToString (), "#3-4d");
+ Assert.AreEqual (o.ToString (), new XElement ("o", 0L).ToString (), "#3-4o");
+ Assert.AreEqual (l.ToString (), new XElement ("l", 1m).ToString (), "#3-4l");
+
+ // Execute the primary assertions of this test
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (a); }, "a:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (b); }, "b:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (c); }, "c:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (d); }, "d:bool?");
+ Assert.IsNotNull ((bool?) new XElement (o), "o:bool?:null");
+ Assert.AreEqual (false, ((bool?) new XElement (o)).Value, "o:bool?:value");
+ Assert.IsNotNull ((bool?) new XElement (l), "l:bool?:null");
+ Assert.AreEqual (true, ((bool?) new XElement (l)).Value, "l:bool?:value");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (I); }, "I:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (i); }, "i:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (M); }, "M:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (m); }, "m:bool?");
+ AssertThrows<FormatException> (() => { bool? z = (bool?) new XElement (n); }, "n:bool?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (a); }, "a:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (b); }, "b:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (c); }, "c:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (d); }, "d:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (o); }, "o:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (l); }, "l:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (I); }, "I:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (i); }, "i:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (M); }, "M:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (m); }, "m:DateTime?");
+ AssertThrows<FormatException> (() => { DateTime? z = (DateTime?) new XElement (n); }, "n:DateTime?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (a); }, "a:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (b); }, "b:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (c); }, "c:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (d); }, "d:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (o); }, "o:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (l); }, "l:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (I); }, "I:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (i); }, "i:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (M); }, "M:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (m); }, "m:DateTimeOffset?");
+ AssertThrows<FormatException> (() => { DateTimeOffset? z = (DateTimeOffset?) new XElement (n); }, "n:DateTimeOffset?");
+ Assert.IsNotNull ((decimal?) new XElement (a), "a:decimal?:null");
+ Assert.AreEqual (7m, ((decimal?) new XElement (a)).Value, "a:decimal?:value");
+ Assert.IsNotNull ((decimal?) new XElement (b), "b:decimal?:null");
+ Assert.AreEqual (42m, ((decimal?) new XElement (b)).Value, "b:decimal?:value");
+ Assert.IsNotNull ((decimal?) new XElement (c), "c:decimal?:null");
+ Assert.AreEqual (13m, ((decimal?) new XElement (c)).Value, "c:decimal?:value");
+ Assert.IsNotNull ((decimal?) new XElement (d), "d:decimal?:null");
+ Assert.AreEqual (-101m, ((decimal?) new XElement (d)).Value, "d:decimal?:value");
+ Assert.IsNotNull ((decimal?) new XElement (o), "o:decimal?:null");
+ Assert.AreEqual (0m, ((decimal?) new XElement (o)).Value, "o:decimal?:value");
+ Assert.IsNotNull ((decimal?) new XElement (l), "l:decimal?:null");
+ Assert.AreEqual (1m, ((decimal?) new XElement (l)).Value, "l:decimal?:value");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XElement (I); }, "I:decimal?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XElement (i); }, "i:decimal?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XElement (M); }, "M:decimal?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XElement (m); }, "m:decimal?");
+ AssertThrows<FormatException> (() => { decimal? z = (decimal?) new XElement (n); }, "n:decimal?");
+ Assert.IsNotNull ((double?) new XElement (a), "a:double?:null");
+ Assert.AreEqual (7d, ((double?) new XElement (a)).Value, "a:double?:value");
+ Assert.IsNotNull ((double?) new XElement (b), "b:double?:null");
+ Assert.AreEqual (42d, ((double?) new XElement (b)).Value, "b:double?:value");
+ Assert.IsNotNull ((double?) new XElement (c), "c:double?:null");
+ Assert.AreEqual (13d, ((double?) new XElement (c)).Value, "c:double?:value");
+ Assert.IsNotNull ((double?) new XElement (d), "d:double?:null");
+ Assert.AreEqual (-101d, ((double?) new XElement (d)).Value, "d:double?:value");
+ Assert.IsNotNull ((double?) new XElement (o), "o:double?:null");
+ Assert.AreEqual (0d, ((double?) new XElement (o)).Value, "o:double?:value");
+ Assert.IsNotNull ((double?) new XElement (l), "l:double?:null");
+ Assert.AreEqual (1d, ((double?) new XElement (l)).Value, "l:double?:value");
+ Assert.IsNotNull ((double?) new XElement (I), "I:double?:null");
+ Assert.AreEqual (double.PositiveInfinity, ((double?) new XElement (I)).Value, "I:double?:value");
+ Assert.IsNotNull ((double?) new XElement (i), "i:double?:null");
+ Assert.AreEqual (double.PositiveInfinity, ((double?) new XElement (i)).Value, "i:double?:value");
+ Assert.IsNotNull ((double?) new XElement (M), "M:double?:null");
+ Assert.AreEqual (double.NegativeInfinity, ((double?) new XElement (M)).Value, "M:double?:value");
+ Assert.IsNotNull ((double?) new XElement (m), "m:double?:null");
+ Assert.AreEqual (double.NegativeInfinity, ((double?) new XElement (m)).Value, "m:double?:value");
+ Assert.IsNotNull ((double?) new XElement (n), "n:double?:null");
+ Assert.IsNaN (((double?) new XElement (n)).Value, "n:double?:value");
+ Assert.IsNotNull ((float?) new XElement (a), "a:float?:null");
+ Assert.AreEqual (7f, ((float?) new XElement (a)).Value, "a:float?:value");
+ Assert.IsNotNull ((float?) new XElement (b), "b:float?:null");
+ Assert.AreEqual (42f, ((float?) new XElement (b)).Value, "b:float?:value");
+ Assert.IsNotNull ((float?) new XElement (c), "c:float?:null");
+ Assert.AreEqual (13f, ((float?) new XElement (c)).Value, "c:float?:value");
+ Assert.IsNotNull ((float?) new XElement (d), "d:float?:null");
+ Assert.AreEqual (-101f, ((float?) new XElement (d)).Value, "d:float?:value");
+ Assert.IsNotNull ((float?) new XElement (o), "o:float?:null");
+ Assert.AreEqual (0f, ((float?) new XElement (o)).Value, "o:float?:value");
+ Assert.IsNotNull ((float?) new XElement (l), "l:float?:null");
+ Assert.AreEqual (1f, ((float?) new XElement (l)).Value, "l:float?:value");
+ Assert.IsNotNull ((float?) new XElement (I), "I:float?:null");
+ Assert.AreEqual (float.PositiveInfinity, ((float?) new XElement (I)).Value, "I:float?:value");
+ Assert.IsNotNull ((float?) new XElement (i), "i:float?:null");
+ Assert.AreEqual (float.PositiveInfinity, ((float?) new XElement (i)).Value, "i:float?:value");
+ Assert.IsNotNull ((float?) new XElement (M), "M:float?:null");
+ Assert.AreEqual (float.NegativeInfinity, ((float?) new XElement (M)).Value, "M:float?:value");
+ Assert.IsNotNull ((float?) new XElement (m), "m:float?:null");
+ Assert.AreEqual (float.NegativeInfinity, ((float?) new XElement (m)).Value, "m:float?:value");
+ Assert.IsNotNull ((float?) new XElement (n), "n:float?:null");
+ Assert.IsNaN (((float?) new XElement (n)).Value, "n:float?:value");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (a); }, "a:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (b); }, "b:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (c); }, "c:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (d); }, "d:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (o); }, "o:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (l); }, "l:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (I); }, "I:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (i); }, "i:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (M); }, "M:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (m); }, "m:Guid?");
+ AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (n); }, "n:Guid?");
+ Assert.IsNotNull ((int?) new XElement (a), "a:int?:null");
+ Assert.AreEqual (7, ((int?) new XElement (a)).Value, "a:int?:value");
+ Assert.IsNotNull ((int?) new XElement (b), "b:int?:null");
+ Assert.AreEqual (42, ((int?) new XElement (b)).Value, "b:int?:value");
+ Assert.IsNotNull ((int?) new XElement (c), "c:int?:null");
+ Assert.AreEqual (13, ((int?) new XElement (c)).Value, "c:int?:value");
+ Assert.IsNotNull ((int?) new XElement (d), "d:int?:null");
+ Assert.AreEqual (-101, ((int?) new XElement (d)).Value, "d:int?:value");
+ Assert.IsNotNull ((int?) new XElement (o), "o:int?:null");
+ Assert.AreEqual (0, ((int?) new XElement (o)).Value, "o:int?:value");
+ Assert.IsNotNull ((int?) new XElement (l), "l:int?:null");
+ Assert.AreEqual (1, ((int?) new XElement (l)).Value, "l:int?:value");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XElement (I); }, "I:int?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XElement (i); }, "i:int?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XElement (M); }, "M:int?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XElement (m); }, "m:int?");
+ AssertThrows<FormatException> (() => { int? z = (int?) new XElement (n); }, "n:int?");
+ Assert.IsNotNull ((long?) new XElement (a), "a:long?:null");
+ Assert.AreEqual (7L, ((long?) new XElement (a)).Value, "a:long?:value");
+ Assert.IsNotNull ((long?) new XElement (b), "b:long?:null");
+ Assert.AreEqual (42L, ((long?) new XElement (b)).Value, "b:long?:value");
+ Assert.IsNotNull ((long?) new XElement (c), "c:long?:null");
+ Assert.AreEqual (13L, ((long?) new XElement (c)).Value, "c:long?:value");
+ Assert.IsNotNull ((long?) new XElement (d), "d:long?:null");
+ Assert.AreEqual (-101L, ((long?) new XElement (d)).Value, "d:long?:value");
+ Assert.IsNotNull ((long?) new XElement (o), "o:long?:null");
+ Assert.AreEqual (0L, ((long?) new XElement (o)).Value, "o:long?:value");
+ Assert.IsNotNull ((long?) new XElement (l), "l:long?:null");
+ Assert.AreEqual (1L, ((long?) new XElement (l)).Value, "l:long?:value");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XElement (I); }, "I:long?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XElement (i); }, "i:long?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XElement (M); }, "M:long?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XElement (m); }, "m:long?");
+ AssertThrows<FormatException> (() => { long? z = (long?) new XElement (n); }, "n:long?");
+ Assert.IsNotNull ((uint?) new XElement (a), "a:uint?:null");
+ Assert.AreEqual (7u, ((uint?) new XElement (a)).Value, "a:uint?:value");
+ Assert.IsNotNull ((uint?) new XElement (b), "b:uint?:null");
+ Assert.AreEqual (42u, ((uint?) new XElement (b)).Value, "b:uint?:value");
+ Assert.IsNotNull ((uint?) new XElement (c), "c:uint?:null");
+ Assert.AreEqual (13u, ((uint?) new XElement (c)).Value, "c:uint?:value");
+ // LAMESPEC: see XmlConvertTests.ToUInt32().
+ //AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (d); }, "d:uint?");
+ Assert.IsNotNull ((uint?) new XElement (o), "o:uint?:null");
+ Assert.AreEqual (0u, ((uint?) new XElement (o)).Value, "o:uint?:value");
+ Assert.IsNotNull ((uint?) new XElement (l), "l:uint?:null");
+ Assert.AreEqual (1u, ((uint?) new XElement (l)).Value, "l:uint?:value");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (I); }, "I:uint?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (i); }, "i:uint?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (M); }, "M:uint?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (m); }, "m:uint?");
+ AssertThrows<FormatException> (() => { uint? z = (uint?) new XElement (n); }, "n:uint?");
+ Assert.IsNotNull ((ulong?) new XElement (a), "a:ulong?:null");
+ Assert.AreEqual (7UL, ((ulong?) new XElement (a)).Value, "a:ulong?:value");
+ Assert.IsNotNull ((ulong?) new XElement (b), "b:ulong?:null");
+ Assert.AreEqual (42UL, ((ulong?) new XElement (b)).Value, "b:ulong?:value");
+ Assert.IsNotNull ((ulong?) new XElement (c), "c:ulong?:null");
+ Assert.AreEqual (13UL, ((ulong?) new XElement (c)).Value, "c:ulong?:value");
+ // LAMESPEC: see XmlConvertTests.ToUInt64().
+ //AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (d); }, "d:ulong?");
+ Assert.IsNotNull ((ulong?) new XElement (o), "o:ulong?:null");
+ Assert.AreEqual (0UL, ((ulong?) new XElement (o)).Value, "o:ulong?:value");
+ Assert.IsNotNull ((ulong?) new XElement (l), "l:ulong?:null");
+ Assert.AreEqual (1UL, ((ulong?) new XElement (l)).Value, "l:ulong?:value");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (I); }, "I:ulong?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (i); }, "i:ulong?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (M); }, "M:ulong?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (m); }, "m:ulong?");
+ AssertThrows<FormatException> (() => { ulong? z = (ulong?) new XElement (n); }, "n:ulong?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (a); }, "a:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (b); }, "b:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (c); }, "c:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (d); }, "d:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (o); }, "o:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (l); }, "l:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (I); }, "I:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (i); }, "i:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (M); }, "M:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (m); }, "m:TimeSpan?");
+ AssertThrows<FormatException> (() => { TimeSpan? z = (TimeSpan?) new XElement (n); }, "n:TimeSpan?");
+ Assert.AreEqual ("7", (string) new XElement (a), "a:string");
+ Assert.AreEqual (" 42 ", (string) new XElement (b), "b:string");
+ Assert.AreEqual (" \r\n 13 \t ", (string) new XElement (c), "c:string");
+ Assert.AreEqual ("-101", (string) new XElement (d), "d:string");
+ Assert.AreEqual ("0", (string) new XElement (o), "o:string");
+ Assert.AreEqual ("1", (string) new XElement (l), "l:string");
+ Assert.AreEqual ("INF", (string) new XElement (I), "I:string");
+ Assert.AreEqual (" Infinity ", (string) new XElement (i), "i:string");
+ Assert.AreEqual (" -INF ", (string) new XElement (M), "M:string");
+ Assert.AreEqual ("-Infinity", (string) new XElement (m), "m:string");
+ Assert.AreEqual ("\t NaN ", (string) new XElement (n), "n:string");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (a); }, "a:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (b); }, "b:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (c); }, "c:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (d); }, "d:bool");
+ Assert.AreEqual (false, (bool) new XElement (o), "o:bool");
+ Assert.AreEqual (true, (bool) new XElement (l), "l:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (I); }, "I:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (i); }, "i:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (M); }, "M:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (m); }, "m:bool");
+ AssertThrows<FormatException> (() => { bool z = (bool) new XElement (n); }, "n:bool");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (a); }, "a:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (b); }, "b:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (c); }, "c:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (d); }, "d:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (o); }, "o:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (l); }, "l:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (I); }, "I:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (i); }, "i:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (M); }, "M:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (m); }, "m:DateTime");
+ AssertThrows<FormatException> (() => { DateTime z = (DateTime) new XElement (n); }, "n:DateTime");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (a); }, "a:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (b); }, "b:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (c); }, "c:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (d); }, "d:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (o); }, "o:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (l); }, "l:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (I); }, "I:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (i); }, "i:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (M); }, "M:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (m); }, "m:DateTimeOffset");
+ AssertThrows<FormatException> (() => { DateTimeOffset z = (DateTimeOffset) new XElement (n); }, "n:DateTimeOffset");
+ Assert.AreEqual (7m, (decimal) new XElement (a), "a:decimal");
+ Assert.AreEqual (42m, (decimal) new XElement (b), "b:decimal");
+ Assert.AreEqual (13m, (decimal) new XElement (c), "c:decimal");
+ Assert.AreEqual (-101m, (decimal) new XElement (d), "d:decimal");
+ Assert.AreEqual (0m, (decimal) new XElement (o), "o:decimal");
+ Assert.AreEqual (1m, (decimal) new XElement (l), "l:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XElement (I); }, "I:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XElement (i); }, "i:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XElement (M); }, "M:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XElement (m); }, "m:decimal");
+ AssertThrows<FormatException> (() => { decimal z = (decimal) new XElement (n); }, "n:decimal");
+ Assert.AreEqual (7d, (double) new XElement (a), "a:double");
+ Assert.AreEqual (42d, (double) new XElement (b), "b:double");
+ Assert.AreEqual (13d, (double) new XElement (c), "c:double");
+ Assert.AreEqual (-101d, (double) new XElement (d), "d:double");
+ Assert.AreEqual (0d, (double) new XElement (o), "o:double");
+ Assert.AreEqual (1d, (double) new XElement (l), "l:double");
+ Assert.AreEqual (double.PositiveInfinity, (double) new XElement (I), "I:double");
+ Assert.AreEqual (double.PositiveInfinity, (double) new XElement (i), "i:double");
+ Assert.AreEqual (double.NegativeInfinity, (double) new XElement (M), "M:double");
+ Assert.AreEqual (double.NegativeInfinity, (double) new XElement (m), "m:double");
+ Assert.IsNaN (((double) new XElement (n)), "n:double");
+ Assert.AreEqual (7f, (float) new XElement (a), "a:float");
+ Assert.AreEqual (42f, (float) new XElement (b), "b:float");
+ Assert.AreEqual (13f, (float) new XElement (c), "c:float");
+ Assert.AreEqual (-101f, (float) new XElement (d), "d:float");
+ Assert.AreEqual (0f, (float) new XElement (o), "o:float");
+ Assert.AreEqual (1f, (float) new XElement (l), "l:float");
+ Assert.AreEqual (float.PositiveInfinity, (float) new XElement (I), "I:float");
+ Assert.AreEqual (float.PositiveInfinity, (float) new XElement (i), "i:float");
+ Assert.AreEqual (float.NegativeInfinity, (float) new XElement (M), "M:float");
+ Assert.AreEqual (float.NegativeInfinity, (float) new XElement (m), "m:float");
+ Assert.IsNaN (((float) new XElement (n)), "n:float");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (a); }, "a:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (b); }, "b:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (c); }, "c:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (d); }, "d:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (o); }, "o:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (l); }, "l:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (I); }, "I:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (i); }, "i:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (M); }, "M:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (m); }, "m:Guid");
+ AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (n); }, "n:Guid");
+ Assert.AreEqual (7, (int) new XElement (a), "a:int");
+ Assert.AreEqual (42, (int) new XElement (b), "b:int");
+ Assert.AreEqual (13, (int) new XElement (c), "c:int");
+ Assert.AreEqual (-101, (int) new XElement (d), "d:int");
+ Assert.AreEqual (0, (int) new XElement (o), "o:int");
+ Assert.AreEqual (1, (int) new XElement (l), "l:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XElement (I); }, "I:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XElement (i); }, "i:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XElement (M); }, "M:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XElement (m); }, "m:int");
+ AssertThrows<FormatException> (() => { int z = (int) new XElement (n); }, "n:int");
+ Assert.AreEqual (7L, (long) new XElement (a), "a:long");
+ Assert.AreEqual (42L, (long) new XElement (b), "b:long");
+ Assert.AreEqual (13L, (long) new XElement (c), "c:long");
+ Assert.AreEqual (-101L, (long) new XElement (d), "d:long");
+ Assert.AreEqual (0L, (long) new XElement (o), "o:long");
+ Assert.AreEqual (1L, (long) new XElement (l), "l:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XElement (I); }, "I:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XElement (i); }, "i:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XElement (M); }, "M:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XElement (m); }, "m:long");
+ AssertThrows<FormatException> (() => { long z = (long) new XElement (n); }, "n:long");
+ Assert.AreEqual (7u, (uint) new XElement (a), "a:uint");
+ Assert.AreEqual (42u, (uint) new XElement (b), "b:uint");
+ Assert.AreEqual (13u, (uint) new XElement (c), "c:uint");
+ // LAMESPEC: see XmlConvertTests.ToUInt32().
+ //AssertThrows<FormatException> (() => { uint z = (uint) new XElement (d); }, "d:uint");
+ Assert.AreEqual (0u, (uint) new XElement (o), "o:uint");
+ Assert.AreEqual (1u, (uint) new XElement (l), "l:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XElement (I); }, "I:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XElement (i); }, "i:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XElement (M); }, "M:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XElement (m); }, "m:uint");
+ AssertThrows<FormatException> (() => { uint z = (uint) new XElement (n); }, "n:uint");
+ Assert.AreEqual (7UL, (ulong) new XElement (a), "a:ulong");
+ Assert.AreEqual (42UL, (ulong) new XElement (b), "b:ulong");
+ Assert.AreEqual (13UL, (ulong) new XElement (c), "c:ulong");
+ // LAMESPEC: see XmlConvertTests.ToUInt64().
+ //AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (d); }, "d:ulong");
+ Assert.AreEqual (0UL, (ulong) new XElement (o), "o:ulong");
+ Assert.AreEqual (1UL, (ulong) new XElement (l), "l:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (I); }, "I:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (i); }, "i:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (M); }, "M:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (m); }, "m:ulong");
+ AssertThrows<FormatException> (() => { ulong z = (ulong) new XElement (n); }, "n:ulong");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (a); }, "a:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (b); }, "b:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (c); }, "c:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (d); }, "d:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (o); }, "o:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (l); }, "l:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (I); }, "I:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (i); }, "i:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (M); }, "M:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (m); }, "m:TimeSpan");
+ AssertThrows<FormatException> (() => { TimeSpan z = (TimeSpan) new XElement (n); }, "n:TimeSpan");
+
+ // Perform some round-trip tests with numbers
+ XElement x;
+ const decimal @decimal = -41051609414188012238960097189m;
+ const double @double = 8.5506609919892972E+307d;
+ const float @float = -1.70151961E+37f;
+ const int @int = -1051251773;
+ const long @long = 4596767133891939716L;
+ const uint @uint = 4106628142u;
+ const ulong @ulong = 10713797297298255927UL;
+ x = new XElement ("x", @decimal);
+ Assert.IsNotNull ((decimal?) new XElement (x), "x:decimal?:null");
+ Assert.AreEqual (@decimal, ((decimal?) new XElement (x)).Value, "x:decimal?:value");
+ Assert.AreEqual (@decimal, (decimal) new XElement (x), "x:decimal");
+ x = new XElement ("x", @double);
+ Assert.IsNotNull ((double?) new XElement (x), "x:double?:null");
+ Assert.AreEqual (@double, ((double?) new XElement (x)).Value, "x:double?:value");
+ Assert.AreEqual (@double, (double) new XElement (x), "x:double");
+ x = new XElement ("x", @float);
+ Assert.IsNotNull ((float?) new XElement (x), "x:float?:null");
+ Assert.AreEqual (@float, ((float?) new XElement (x)).Value, "x:float?:value");
+ Assert.AreEqual (@float, (float) new XElement (x), "x:float");
+ x = new XElement ("x", @int);
+ Assert.IsNotNull ((int?) new XElement (x), "x:int?:null");
+ Assert.AreEqual (@int, ((int?) new XElement (x)).Value, "x:int?:value");
+ Assert.AreEqual (@int, (int) new XElement (x), "x:int");
+ x = new XElement ("x", @long);
+ Assert.IsNotNull ((long?) new XElement (x), "x:long?:null");
+ Assert.AreEqual (@long, ((long?) new XElement (x)).Value, "x:long?:value");
+ Assert.AreEqual (@long, (long) new XElement (x), "x:long");
+ x = new XElement ("x", @uint);
+ Assert.IsNotNull ((uint?) new XElement (x), "x:uint?:null");
+ Assert.AreEqual (@uint, ((uint?) new XElement (x)).Value, "x:uint?:value");
+ Assert.AreEqual (@uint, (uint) new XElement (x), "x:uint");
+ x = new XElement ("x", @ulong);
+ Assert.IsNotNull ((ulong?) new XElement (x), "x:ulong?:null");
+ Assert.AreEqual (@ulong, ((ulong?) new XElement (x)).Value, "x:ulong?:value");
+ Assert.AreEqual (@ulong, (ulong) new XElement (x), "x:ulong");
+ x = new XElement ("x", double.NaN);
+ Assert.IsNotNull ((double?) new XElement (x), "NaN:double?:null");
+ Assert.AreEqual (double.NaN, ((double?) new XElement (x)).Value, "NaN:double?:value");
+ Assert.AreEqual (double.NaN, (double) new XElement (x), "NaN:double");
+ x = new XElement ("x", float.NaN);
+ Assert.IsNotNull ((float?) new XElement (x), "NaN:float?:null");
+ Assert.AreEqual (float.NaN, ((float?) new XElement (x)).Value, "NaN:float?:value");
+ Assert.AreEqual (float.NaN, (float) new XElement (x), "NaN:float");
+ x = new XElement ("x", double.PositiveInfinity);
+ Assert.IsNotNull ((double?) new XElement (x), "+Inf:double?:null");
+ Assert.AreEqual (double.PositiveInfinity, ((double?) new XElement (x)).Value, "+Inf:double?:value");
+ Assert.AreEqual (double.PositiveInfinity, (double) new XElement (x), "+Inf:double");
+ x = new XElement ("x", float.PositiveInfinity);
+ Assert.IsNotNull ((float?) new XElement (x), "+Inf:float?:null");
+ Assert.AreEqual (float.PositiveInfinity, ((float?) new XElement (x)).Value, "+Inf:float?:value");
+ Assert.AreEqual (float.PositiveInfinity, (float) new XElement (x), "+Inf:float");
+ x = new XElement ("x", double.NegativeInfinity);
+ Assert.IsNotNull ((double?) new XElement (x), "-Inf:double?:null");
+ Assert.AreEqual (double.NegativeInfinity, ((double?) new XElement (x)).Value, "-Inf:double?:value");
+ Assert.AreEqual (double.NegativeInfinity, (double) new XElement (x), "-Inf:double");
+ x = new XElement ("x", float.NegativeInfinity);
+ Assert.IsNotNull ((float?) new XElement (x), "-Inf:float?:null");
+ Assert.AreEqual (float.NegativeInfinity, ((float?) new XElement (x)).Value, "-Inf:float?:value");
+ Assert.AreEqual (float.NegativeInfinity, (float) new XElement (x), "-Inf:float");
+
+ // Perform overflow tests with numbers
+ AssertThrows<OverflowException> (() => { decimal z = (decimal) new XElement ("z", "91051609414188012238960097189"); }, "z:decimal");
+ AssertThrows<OverflowException> (() => { decimal? z = (decimal?) new XElement ("z", "91051609414188012238960097189"); }, "z:decimal?");
+ AssertThrows<OverflowException> (() => { double z = (double) new XElement ("z", "8.5506609919892972E+654"); }, "z:double");
+ AssertThrows<OverflowException> (() => { double? z = (double?) new XElement ("z", "8.5506609919892972E+654"); }, "z:double?");
+ AssertThrows<OverflowException> (() => { float z = (float) new XElement ("z", @double); }, "z:float");
+ AssertThrows<OverflowException> (() => { float? z = (float?) new XElement ("z", @double); }, "z:float?");
+ AssertThrows<OverflowException> (() => { int z = (int) new XElement ("z", @long); }, "z:int");
+ AssertThrows<OverflowException> (() => { int? z = (int?) new XElement ("z", @long); }, "z:int?");
+ AssertThrows<OverflowException> (() => { long z = (long) new XElement ("z", @decimal); }, "z:long");
+ AssertThrows<OverflowException> (() => { long? z = (long?) new XElement ("z", @decimal); }, "z:long?");
+ AssertThrows<OverflowException> (() => { uint z = (uint) new XElement ("z", @ulong); }, "z:uint");
+ AssertThrows<OverflowException> (() => { uint? z = (uint?) new XElement ("z", @ulong); }, "z:uint?");
+ AssertThrows<OverflowException> (() => { ulong z = (ulong) new XElement ("z", -@decimal); }, "z:ulong");
+ AssertThrows<OverflowException> (() => { ulong? z = (ulong?) new XElement ("z", -@decimal); }, "z:ulong?");
+ }
+
+ [Test]
+ public void CastExtremes ()
+ {
+ // Test extremes/constants where round-trips should work in specific ways
+ Assert.AreEqual (decimal.MaxValue, (decimal) new XElement ("k", decimal.MaxValue), "MaxValue:decimal");
+ Assert.AreEqual (decimal.MinValue, (decimal) new XElement ("k", decimal.MinValue), "MinValue:decimal");
+ Assert.AreEqual (decimal.MinusOne, (decimal) new XElement ("k", decimal.MinusOne), "MinusOne:decimal");
+ Assert.AreEqual (decimal.One, (decimal) new XElement ("k", decimal.One), "One:decimal");
+ Assert.AreEqual (decimal.Zero, (decimal) new XElement ("k", decimal.Zero), "Zero:decimal");
+ Assert.AreEqual (double.MaxValue, (double) new XElement ("k", double.MaxValue), "MaxValue:double");
+ Assert.AreEqual (double.MinValue, (double) new XElement ("k", double.MinValue), "MinValue:double");
+ Assert.AreEqual (double.Epsilon, (double) new XElement ("k", double.Epsilon), "Epsilon:double");
+ Assert.AreEqual (double.NaN, (double) new XElement ("k", double.NaN), "NaN:double");
+ Assert.AreEqual (double.NegativeInfinity, (double) new XElement ("k", double.NegativeInfinity), "-Inf:double");
+ Assert.AreEqual (double.PositiveInfinity, (double) new XElement ("k", double.PositiveInfinity), "+Inf:double");
+ Assert.AreEqual (float.MaxValue, (float) new XElement ("k", float.MaxValue), "MaxValue:float");
+ Assert.AreEqual (float.MinValue, (float) new XElement ("k", float.MinValue), "MinValue:float");
+ Assert.AreEqual (float.Epsilon, (float) new XElement ("k", float.Epsilon), "Epsilon:float");
+ Assert.AreEqual (float.NaN, (float) new XElement ("k", float.NaN), "NaN:float");
+ Assert.AreEqual (float.NegativeInfinity, (float) new XElement ("k", float.NegativeInfinity), "-Inf:float");
+ Assert.AreEqual (float.PositiveInfinity, (float) new XElement ("k", float.PositiveInfinity), "+Inf:float");
+ Assert.AreEqual (int.MaxValue, (int) new XElement ("k", int.MaxValue), "MaxValue:int");
+ Assert.AreEqual (int.MinValue, (int) new XElement ("k", int.MinValue), "MinValue:int");
+ Assert.AreEqual (long.MaxValue, (long) new XElement ("k", long.MaxValue), "MaxValue:long");
+ Assert.AreEqual (long.MinValue, (long) new XElement ("k", long.MinValue), "MinValue:long");
+ Assert.AreEqual (uint.MaxValue, (uint) new XElement ("k", uint.MaxValue), "MaxValue:uint");
+ Assert.AreEqual (uint.MinValue, (uint) new XElement ("k", uint.MinValue), "MinValue:uint");
+ Assert.AreEqual (ulong.MaxValue, (ulong) new XElement ("k", ulong.MaxValue), "MaxValue:ulong");
+ Assert.AreEqual (ulong.MinValue, (ulong) new XElement ("k", ulong.MinValue), "MinValue:ulong");
+ Assert.AreEqual (decimal.MaxValue, (decimal?) new XElement ("k", decimal.MaxValue), "MaxValue:decimal?");
+ Assert.AreEqual (decimal.MinValue, (decimal?) new XElement ("k", decimal.MinValue), "MinValue:decimal?");
+ Assert.AreEqual (decimal.MinusOne, (decimal?) new XElement ("k", decimal.MinusOne), "MinusOne:decimal?");
+ Assert.AreEqual (decimal.One, (decimal?) new XElement ("k", decimal.One), "One:decimal?");
+ Assert.AreEqual (decimal.Zero, (decimal?) new XElement ("k", decimal.Zero), "Zero:decimal?");
+ Assert.AreEqual (double.MaxValue, (double?) new XElement ("k", double.MaxValue), "MaxValue:double?");
+ Assert.AreEqual (double.MinValue, (double?) new XElement ("k", double.MinValue), "MinValue:double?");
+ Assert.AreEqual (double.Epsilon, (double?) new XElement ("k", double.Epsilon), "Epsilon:double?");
+ Assert.AreEqual (double.NaN, (double?) new XElement ("k", double.NaN), "NaN:double?");
+ Assert.AreEqual (double.NegativeInfinity, (double?) new XElement ("k", double.NegativeInfinity), "-Inf:double?");
+ Assert.AreEqual (double.PositiveInfinity, (double?) new XElement ("k", double.PositiveInfinity), "+Inf:double?");
+ Assert.AreEqual (float.MaxValue, (float?) new XElement ("k", float.MaxValue), "MaxValue:float?");
+ Assert.AreEqual (float.MinValue, (float?) new XElement ("k", float.MinValue), "MinValue:float?");
+ Assert.AreEqual (float.Epsilon, (float?) new XElement ("k", float.Epsilon), "Epsilon:float?");
+ Assert.AreEqual (float.NaN, (float?) new XElement ("k", float.NaN), "NaN:float?");
+ Assert.AreEqual (float.NegativeInfinity, (float?) new XElement ("k", float.NegativeInfinity), "-Inf:float?");
+ Assert.AreEqual (float.PositiveInfinity, (float?) new XElement ("k", float.PositiveInfinity), "+Inf:float?");
+ Assert.AreEqual (int.MaxValue, (int?) new XElement ("k", int.MaxValue), "MaxValue:int?");
+ Assert.AreEqual (int.MinValue, (int?) new XElement ("k", int.MinValue), "MinValue:int?");
+ Assert.AreEqual (long.MaxValue, (long?) new XElement ("k", long.MaxValue), "MaxValue:long?");
+ Assert.AreEqual (long.MinValue, (long?) new XElement ("k", long.MinValue), "MinValue:long?");
+ Assert.AreEqual (uint.MaxValue, (uint?) new XElement ("k", uint.MaxValue), "MaxValue:uint?");
+ Assert.AreEqual (uint.MinValue, (uint?) new XElement ("k", uint.MinValue), "MinValue:uint?");
+ Assert.AreEqual (ulong.MaxValue, (ulong?) new XElement ("k", ulong.MaxValue), "MaxValue:ulong?");
+ Assert.AreEqual (ulong.MinValue, (ulong?) new XElement ("k", ulong.MinValue), "MinValue:ulong?");
+ Assert.AreEqual (DateTime.MaxValue, (DateTime) new XElement ("k", DateTime.MaxValue), "MaxValue:DateTime");
+ Assert.AreEqual (DateTime.MinValue, (DateTime) new XElement ("k", DateTime.MinValue), "MinValue:DateTime");
+ Assert.AreEqual (DateTime.MaxValue, (DateTime?) new XElement ("k", DateTime.MaxValue), "MaxValue:DateTime?");
+ Assert.AreEqual (DateTime.MinValue, (DateTime?) new XElement ("k", DateTime.MinValue), "MinValue:DateTime?");
+ Assert.AreEqual (DateTimeOffset.MaxValue, (DateTimeOffset) new XElement ("k", DateTimeOffset.MaxValue), "MaxValue:DateTimeOffset");
+ Assert.AreEqual (DateTimeOffset.MinValue, (DateTimeOffset) new XElement ("k", DateTimeOffset.MinValue), "MinValue:DateTimeOffset");
+ Assert.AreEqual (DateTimeOffset.MaxValue, (DateTimeOffset?) new XElement ("k", DateTimeOffset.MaxValue), "MaxValue:DateTimeOffset?");
+ Assert.AreEqual (DateTimeOffset.MinValue, (DateTimeOffset?) new XElement ("k", DateTimeOffset.MinValue), "MinValue:DateTimeOffset?");
+ Assert.AreEqual (TimeSpan.MaxValue, (TimeSpan) new XElement ("k", TimeSpan.MaxValue), "MaxValue:TimeSpan");
+ Assert.AreEqual (TimeSpan.MinValue, (TimeSpan) new XElement ("k", TimeSpan.MinValue), "MinValue:TimeSpan");
+ Assert.AreEqual (TimeSpan.MaxValue, (TimeSpan?) new XElement ("k", TimeSpan.MaxValue), "MaxValue:TimeSpan?");
+ Assert.AreEqual (TimeSpan.MinValue, (TimeSpan?) new XElement ("k", TimeSpan.MinValue), "MinValue:TimeSpan?");
+ }
+
+ [Test]
+ public void CastBooleans ()
+ {
+ Assert.IsNotNull ((bool?) new XElement ("fq", "false"), "#1a");
+ Assert.AreEqual (false, ((bool?) new XElement ("fq", "false")).Value, "#1b");
+ Assert.IsNotNull ((bool?) new XElement ("tq", "true"), "#2a");
+ Assert.AreEqual (true, ((bool?) new XElement ("tq", "true")).Value, "#2b");
+ Assert.IsNotNull ((bool?) new XElement ("Fq", "False"), "#3a");
+ Assert.AreEqual (false, ((bool?) new XElement ("Fq", "False")).Value, "#3b");
+ Assert.IsNotNull ((bool?) new XElement ("Tq", "True"), "#4a");
+ Assert.AreEqual (true, ((bool?) new XElement ("Tq", "True")).Value, "#4b");
+ Assert.IsNotNull ((bool?) new XElement ("Fs", " False \t \r "), "#5a");
+ Assert.AreEqual (false, ((bool?) new XElement ("Fs", " False \t \r ")).Value, "#5b");
+ Assert.IsNotNull ((bool?) new XElement ("Ts", " \t True \n "), "#6a");
+ Assert.AreEqual (true, ((bool?) new XElement ("Ts", " \t True \n ")).Value, "#6b");
+ Assert.AreEqual (false, (bool) new XElement ("f", "false"), "#7");
+ Assert.AreEqual (true, (bool) new XElement ("t", "true"), "#8");
+ Assert.AreEqual (false, (bool) new XElement ("F", "False"), "#9");
+ Assert.AreEqual (true, (bool) new XElement ("T", "True"), "#10");
+ Assert.AreEqual (false, (bool)new XElement ("fs", " false "), "#11");
+ Assert.AreEqual (true, (bool)new XElement ("ts", " true "), "#12");
+ Assert.IsNotNull ((bool?) new XElement ("Tc", new XCData (" \t True \n ")), "#13a");
+ Assert.AreEqual (true, ((bool?) new XElement ("Tc", new XCData (" \t True \n "))).Value, "#13b");
+ Assert.AreEqual (false, (bool)new XElement ("fc", new XCData (" false ")), "#14");
+ Assert.IsNotNull ((bool?) new XElement ("x", true), "#15a");
+ Assert.IsTrue (((bool?) new XElement ("x", true)).Value, "#15b");
+ Assert.IsTrue ((bool) new XElement ("x", true), "#15c");
+ Assert.IsNotNull ((bool?) new XElement ("x", false), "#16a");
+ Assert.IsFalse (((bool?) new XElement ("x", false)).Value, "#16b");
+ Assert.IsFalse ((bool) new XElement ("x", false), "#16c");
+ Assert.IsTrue ((bool) new XElement ("x", bool.TrueString), "#17a");
+ Assert.IsFalse ((bool) new XElement ("x", bool.FalseString), "#17b");
+ Assert.IsTrue ((bool) new XElement ("x", new XCData (bool.TrueString)), "#18a");
+ Assert.IsFalse ((bool) new XElement ("x", new XCData (bool.FalseString)), "#18b");
+ }
+
+ [Test]
+ public void CastGuids ()
+ {
+ Guid rb = new Guid (new byte[16] { 0x9A, 0xBF, 0xCE, 0x7E, 0x07, 0x29, 0x9C, 0x43, 0x80, 0x7D, 0x48, 0x20, 0xB9, 0x19, 0xEA, 0x57 });
+ Guid rd = new Guid (new byte[16] { 0x21, 0x5B, 0x57, 0x26, 0xCD, 0x14, 0x5E, 0x44, 0x8F, 0xFA, 0xE2, 0xBC, 0x24, 0x7B, 0x2E, 0xC9 });
+ Guid rn = new Guid (new byte[16] { 0xF9, 0x46, 0x41, 0xA8, 0xA5, 0x03, 0xF1, 0x4A, 0xAD, 0x97, 0x7B, 0xC7, 0x79, 0x57, 0x2B, 0x79 });
+ Guid rp = new Guid (new byte[16] { 0x51, 0x6B, 0x8A, 0x17, 0xEF, 0x11, 0xFB, 0x48, 0x83, 0xBD, 0x57, 0xB4, 0x99, 0xF9, 0xC1, 0xE6 });
+ Guid rz = Guid.Empty;
+ Guid rx = Guid.NewGuid ();
+
+ XElement b = new XElement ("b", " {7ECEBF9A-2907-439c-807D-4820B919EA57}");
+ XElement d = new XElement ("d", "26575b21-14cd-445e-8ffa-e2bc247b2ec9");
+ XElement n = new XElement ("n", "a84146f903A54af1ad977bC779572b79\r\n");
+ XElement p = new XElement ("p", " (178a6b51-11ef-48fb-83bd-57b499f9c1e6) \t ");
+ XElement z = new XElement ("z", " \t \n 00000000-0000-0000-0000-000000000000 ");
+ XElement x = new XElement ("x", rx);
+
+ Assert.IsNotNull ((Guid?) new XElement (b), "#1a");
+ Assert.AreEqual (rb, ((Guid?) new XElement (b)).Value, "#1b");
+ Assert.AreEqual (rb, (Guid) new XElement (b), "#1c");
+ Assert.AreEqual (rb, (Guid) new XElement ("r", rb), "#1d");
+ Assert.IsNotNull ((Guid?) new XElement ("r", rb), "#1e");
+ Assert.AreEqual (rb, ((Guid?) new XElement ("r", rb)).Value, "#1f");
+
+ Assert.IsNotNull ((Guid?) new XElement (d), "#2a");
+ Assert.AreEqual (rd, ((Guid?) new XElement (d)).Value, "#2b");
+ Assert.AreEqual (rd, (Guid) new XElement (d), "#2c");
+ Assert.AreEqual (rd, (Guid) new XElement ("r", rd), "#2d");
+ Assert.IsNotNull ((Guid?) new XElement ("r", rd), "#2e");
+ Assert.AreEqual (rd, ((Guid?) new XElement ("r", rd)).Value, "#2f");
+
+ Assert.IsNotNull ((Guid?) new XElement (n), "#3a");
+ Assert.AreEqual (rn, ((Guid?) new XElement (n)).Value, "#3b");
+ Assert.AreEqual (rn, (Guid) new XElement (n), "#3c");
+ Assert.AreEqual (rn, (Guid) new XElement ("r", rn), "#3d");
+ Assert.IsNotNull ((Guid?) new XElement ("r", rn), "#3e");
+ Assert.AreEqual (rn, ((Guid?) new XElement ("r", rn)).Value, "#3f");
+
+ Assert.IsNotNull ((Guid?) new XElement (p), "#4a");
+ Assert.AreEqual (rp, ((Guid?) new XElement (p)).Value, "#4b");
+ Assert.AreEqual (rp, (Guid) new XElement (p), "#4c");
+ Assert.AreEqual (rp, (Guid) new XElement ("r", rp), "#4d");
+ Assert.IsNotNull ((Guid?) new XElement ("r", rp), "#4e");
+ Assert.AreEqual (rp, ((Guid?) new XElement ("r", rp)).Value, "#4f");
+
+ Assert.IsNotNull ((Guid?) new XElement (z), "#5a");
+ Assert.AreEqual (rz, ((Guid?) new XElement (z)).Value, "#5b");
+ Assert.AreEqual (rz, (Guid) new XElement (z), "#5c");
+
+ Assert.IsNotNull ((Guid?) new XElement (x), "#6a");
+ Assert.AreEqual (rx, ((Guid?) new XElement (x)).Value, "#6b");
+ Assert.AreEqual (rx, (Guid) new XElement (x), "#6c");
+ }
+
+ [Test]
+ public void CastDateTimes ()
+ {
+ DateTime ra = new DateTime (1987, 1, 23, 21, 45, 36, 89, DateTimeKind.Unspecified);
+ DateTime rb = new DateTime (2001, 2, 3, 4, 5, 6, 789, DateTimeKind.Local);
+ DateTime rc = new DateTime (2010, 1, 2, 0, 0, 0, 0, DateTimeKind.Utc);
+ DateTime rd = new DateTime (1956, 11, 2, 0, 34, 0);
+ DateTime re = new DateTime (635085111683456297L, DateTimeKind.Utc);
+ DateTime rf = re.ToLocalTime ();
+ DateTime rx = DateTime.Now;
+ DateTime rz = DateTime.UtcNow;
+
+ XElement a = new XElement ("a", "1987-01-23T21:45:36.089");
+ XElement b = new XElement ("b", "2001-02-03T04:05:06.789" + DateTime.Now.ToString ("zzz"));
+ XElement c = new XElement ("c", "2010-01-02T00:00:00Z");
+ XElement d = new XElement ("d", " Nov 2, 1956 12:34 AM \r\n \t");
+ XElement e = new XElement ("e", " 2013-07-04T05:06:08.3456297Z "); // UTC, all the way
+ XElement f = new XElement ("f", " 2013-07-04T05:06:08.3456297+00:00 "); // UTC initially, but should be converted automatically to local time
+ XElement x = new XElement ("x", rx);
+ XElement z = new XElement ("z", rz);
+
+ Assert.IsNotNull ((DateTime?) new XElement (a), "#1a");
+ Assert.AreEqual (ra, ((DateTime?) new XElement (a)).Value, "#1b");
+ Assert.AreEqual (ra, (DateTime) new XElement (a), "#1c");
+ Assert.AreEqual (ra, (DateTime) new XElement ("r", ra), "#1d");
+ Assert.IsNotNull ((DateTime?) new XElement ("r", ra), "#1e");
+ Assert.AreEqual (ra, ((DateTime?) new XElement ("r", ra)).Value, "#1f");
+
+ Assert.IsNotNull ((DateTime?) new XElement (b), "#2a");
+ Assert.AreEqual (rb, ((DateTime?) new XElement (b)).Value, "#2b");
+ Assert.AreEqual (rb, (DateTime) new XElement (b), "#2c");
+ Assert.AreEqual (rb, (DateTime) new XElement ("r", rb), "#2d");
+ Assert.IsNotNull ((DateTime?) new XElement ("r", rb), "#2e");
+ Assert.AreEqual (rb, ((DateTime?) new XElement ("r", rb)).Value, "#2f");
+
+ Assert.IsNotNull ((DateTime?) new XElement (c), "#3a");
+ Assert.AreEqual (rc, ((DateTime?) new XElement (c)).Value, "#3b");
+ Assert.AreEqual (rc, (DateTime) new XElement (c), "#3c");
+ Assert.AreEqual (rc, (DateTime) new XElement ("r", rc), "#3d");
+ Assert.IsNotNull ((DateTime?) new XElement ("r", rc), "#3e");
+ Assert.AreEqual (rc, ((DateTime?) new XElement ("r", rc)).Value, "#3f");
+
+ Assert.IsNotNull ((DateTime?) new XElement (d), "#4a");
+ Assert.AreEqual (rd, ((DateTime?) new XElement (d)).Value, "#4b");
+ Assert.AreEqual (rd, (DateTime) new XElement (d), "#4c");
+ Assert.AreEqual (rd, (DateTime) new XElement ("r", rd), "#4d");
+ Assert.IsNotNull ((DateTime?) new XElement ("r", rd), "#4e");
+ Assert.AreEqual (rd, ((DateTime?) new XElement ("r", rd)).Value, "#4f");
+
+ Assert.IsNotNull ((DateTime?) new XElement (x), "#5a");
+ Assert.AreEqual (rx, ((DateTime?) new XElement (x)).Value, "#5b");
+ Assert.AreEqual (rx, (DateTime) new XElement (x), "#5c");
+
+ Assert.IsNotNull ((DateTime?) new XElement (z), "#6a");
+ Assert.AreEqual (rz, ((DateTime?) new XElement (z)).Value, "#6b");
+ Assert.AreEqual (rz, (DateTime) new XElement (z), "#6c");
+
+ Assert.IsNotNull ((DateTime?) new XElement (e), "#7a");
+ Assert.AreEqual (re, ((DateTime?) new XElement (e)).Value, "#7b");
+ Assert.AreEqual (re, (DateTime) new XElement (e), "#7c");
+ Assert.AreEqual (re, (DateTime) new XElement ("r", re), "#7d");
+ Assert.IsNotNull ((DateTime?) new XElement ("r", re), "#7e");
+ Assert.AreEqual (re, ((DateTime?) new XElement ("r", re)).Value, "#7f");
+
+ Assert.IsNotNull ((DateTime?) new XElement (f), "#8a");
+ Assert.AreEqual (rf, ((DateTime?) new XElement (f)).Value, "#8b");
+ Assert.AreEqual (rf, (DateTime) new XElement (f), "#8c");
+ Assert.AreEqual (rf, (DateTime) new XElement ("r", rf), "#8d");
+ Assert.IsNotNull ((DateTime?) new XElement ("r", rf), "#8e");
+ Assert.AreEqual (rf, ((DateTime?) new XElement ("r", rf)).Value, "#8f");
+ }
+
+ [Test]
+ public void CastDateTimeOffsets ()
+ {
+ DateTimeOffset ra = new DateTimeOffset (1987, 1, 23, 21, 45, 36, 89, TimeSpan.FromHours (+13.75)); // e.g., Chatham Islands (daylight-savings time)
+ DateTimeOffset rb = new DateTimeOffset (2001, 2, 3, 4, 5, 6, 789, DateTimeOffset.Now.Offset); // Local time
+ DateTimeOffset rc = new DateTimeOffset (2010, 1, 2, 0, 0, 0, 0, TimeSpan.Zero); // UTC
+ DateTimeOffset rd = new DateTimeOffset (1956, 11, 2, 12, 34, 10, TimeSpan.FromHours (-3.5));
+ DateTimeOffset re = new DateTimeOffset (630646468235678363, TimeSpan.FromHours (-1)); // UTC-1, also with full resolution and a fractional second that might lose a tick on Mono 2.6.1
+ DateTimeOffset rx = DateTimeOffset.Now;
+ DateTimeOffset rz = DateTimeOffset.UtcNow;
+
+ XElement a = new XElement ("a", "1987-01-23T21:45:36.089+13:45");
+ XElement b = new XElement ("b", "2001-02-03T04:05:06.789" + DateTimeOffset.Now.ToString ("zzz"));
+ XElement c = new XElement ("c", "2010-01-02T00:00:00Z");
+ XElement d = new XElement ("d", " Nov 2, 1956 12:34:10 PM -3:30 \r\n \t");
+ XElement e = new XElement ("e", " \t \n 1999-06-10T21:27:03.5678363-01:00 ");
+ XElement x = new XElement ("x", rx);
+ XElement z = new XElement ("z", rz);
+
+ Assert.IsNotNull ((DateTimeOffset?) new XElement (a), "#1a");
+ Assert.AreEqual (ra, ((DateTimeOffset?) new XElement (a)).Value, "#1b");
+ Assert.AreEqual (ra, (DateTimeOffset) new XElement (a), "#1c");
+ Assert.AreEqual (ra, (DateTimeOffset) new XElement ("r", ra), "#1d");
+ Assert.IsNotNull ((DateTimeOffset?) new XElement ("r", ra), "#1e");
+ Assert.AreEqual (ra, ((DateTimeOffset?) new XElement ("r", ra)).Value, "#1f");
+
+ Assert.IsNotNull ((DateTimeOffset?) new XElement (b), "#2a");
+ Assert.AreEqual (rb, ((DateTimeOffset?) new XElement (b)).Value, "#2b");
+ Assert.AreEqual (rb, (DateTimeOffset) new XElement (b), "#2c");
+ Assert.AreEqual (rb, (DateTimeOffset) new XElement ("r", rb), "#2d");
+ Assert.IsNotNull ((DateTimeOffset?) new XElement ("r", rb), "#2e");
+ Assert.AreEqual (rb, ((DateTimeOffset?) new XElement ("r", rb)).Value, "#2f");
+
+ Assert.IsNotNull ((DateTimeOffset?) new XElement (c), "#3a");
+ Assert.AreEqual (rc, ((DateTimeOffset?) new XElement (c)).Value, "#3b");
+ Assert.AreEqual (rc, (DateTimeOffset) new XElement (c), "#3c");
+ Assert.AreEqual (rc, (DateTimeOffset) new XElement ("r", rc), "#3d");
+ Assert.IsNotNull ((DateTimeOffset?) new XElement ("r", rc), "#3e");
+ Assert.AreEqual (rc, ((DateTimeOffset?) new XElement ("r", rc)).Value, "#3f");
+
+ AssertThrows<FormatException> (() => { DateTimeOffset? r = (DateTimeOffset?) new XElement (d); }, "#4a");
+ AssertThrows<FormatException> (() => { DateTimeOffset r = (DateTimeOffset) new XElement (d); }, "#4b");
+ Assert.AreEqual (rd, DateTimeOffset.Parse (d.Value), "#4c"); // Sanity check: Okay for standalone DateTimeOffset but not as XML as in above
+
+ Assert.IsNotNull ((DateTimeOffset?) new XElement (x), "#5a");
+ Assert.AreEqual (rx, ((DateTimeOffset?) new XElement (x)).Value, "#5b");
+ Assert.AreEqual (rx, (DateTimeOffset) new XElement (x), "#5c");
+
+ Assert.IsNotNull ((DateTimeOffset?) new XElement (z), "#6a");
+ Assert.AreEqual (rz, ((DateTimeOffset?) new XElement (z)).Value, "#6b");
+ Assert.AreEqual (rz, (DateTimeOffset) new XElement (z), "#6c");
+
+ Assert.IsNotNull ((DateTimeOffset?) new XElement (e), "#7a");
+ Assert.AreEqual (re, ((DateTimeOffset?) new XElement (e)).Value, "#7b");
+ Assert.AreEqual (re, (DateTimeOffset) new XElement (e), "#7c");
+ Assert.AreEqual (re, (DateTimeOffset) new XElement ("r", re), "#7d");
+ Assert.IsNotNull ((DateTimeOffset?) new XElement ("r", re), "#7e");
+ Assert.AreEqual (re, ((DateTimeOffset?) new XElement ("r", re)).Value, "#7f");
+ }
+
+ [Test]
+ public void CastTimeSpans ()
+ {
+ TimeSpan ra = new TimeSpan (23, 21, 45, 36, 89);
+ TimeSpan rb = -new TimeSpan (3, 4, 5, 6, 789);
+ TimeSpan rc = new TimeSpan (2, 0, 0, 0, 0);
+ TimeSpan rd = new TimeSpan (0, 0, 0, 1);
+ TimeSpan re = new TimeSpan (1L); // one tick, the smallest interval
+ TimeSpan rx = DateTimeOffset.Now.Offset;
+ TimeSpan rz = TimeSpan.Zero;
+
+ XElement a = new XElement ("a", "P23DT21H45M36.089S");
+ XElement b = new XElement ("b", "-P3DT4H5M6.789S");
+ XElement c = new XElement ("c", "P2D");
+ XElement d = new XElement ("d", "PT1S");
+ XElement e = new XElement ("e", " PT0.0000001S \t \n ");
+ XElement x = new XElement ("x", rx);
+ XElement z = new XElement ("z", rz);
+
+ Assert.IsNotNull ((TimeSpan?) new XElement (a), "#1a");
+ Assert.AreEqual (ra, ((TimeSpan?) new XElement (a)).Value, "#1b");
+ Assert.AreEqual (ra, (TimeSpan) new XElement (a), "#1c");
+ Assert.AreEqual (ra, (TimeSpan) new XElement ("r", ra), "#1d");
+ Assert.IsNotNull ((TimeSpan?) new XElement ("r", ra), "#1e");
+ Assert.AreEqual (ra, ((TimeSpan?) new XElement ("r", ra)).Value, "#1f");
+
+ Assert.IsNotNull ((TimeSpan?) new XElement (b), "#2a");
+ Assert.AreEqual (rb, ((TimeSpan?) new XElement (b)).Value, "#2b");
+ Assert.AreEqual (rb, (TimeSpan) new XElement (b), "#2c");
+ Assert.AreEqual (rb, (TimeSpan) new XElement ("r", rb), "#2d");
+ Assert.IsNotNull ((TimeSpan?) new XElement ("r", rb), "#2e");
+ Assert.AreEqual (rb, ((TimeSpan?) new XElement ("r", rb)).Value, "#2f");
+
+ Assert.IsNotNull ((TimeSpan?) new XElement (c), "#3a");
+ Assert.AreEqual (rc, ((TimeSpan?) new XElement (c)).Value, "#3b");
+ Assert.AreEqual (rc, (TimeSpan) new XElement (c), "#3c");
+ Assert.AreEqual (rc, (TimeSpan) new XElement ("r", rc), "#3d");
+ Assert.IsNotNull ((TimeSpan?) new XElement ("r", rc), "#3e");
+ Assert.AreEqual (rc, ((TimeSpan?) new XElement ("r", rc)).Value, "#3f");
+
+ Assert.IsNotNull ((TimeSpan?) new XElement (d), "#4a");
+ Assert.AreEqual (rd, ((TimeSpan?) new XElement (d)).Value, "#4b");
+ Assert.AreEqual (rd, (TimeSpan) new XElement (d), "#4c");
+ Assert.AreEqual (rd, (TimeSpan) new XElement ("r", rd), "#4d");
+ Assert.IsNotNull ((TimeSpan?) new XElement ("r", rd), "#4e");
+ Assert.AreEqual (rd, ((TimeSpan?) new XElement ("r", rd)).Value, "#4f");
+
+ Assert.IsNotNull ((TimeSpan?) new XElement (x), "#5a");
+ Assert.AreEqual (rx, ((TimeSpan?) new XElement (x)).Value, "#5b");
+ Assert.AreEqual (rx, (TimeSpan) new XElement (x), "#5c");
+
+ Assert.IsNotNull ((TimeSpan?) new XElement (z), "#6a");
+ Assert.AreEqual (rz, ((TimeSpan?) new XElement (z)).Value, "#6b");
+ Assert.AreEqual (rz, (TimeSpan) new XElement (z), "#6c");
+
+ Assert.IsNotNull ((TimeSpan?) new XElement (e), "#7a");
+ Assert.AreEqual (re, ((TimeSpan?) new XElement (e)).Value, "#7b");
+ Assert.AreEqual (re, (TimeSpan) new XElement (e), "#7c");
+ Assert.AreEqual (re, (TimeSpan) new XElement ("r", re), "#7d");
+ Assert.IsNotNull ((TimeSpan?) new XElement ("r", re), "#7e");
+ Assert.AreEqual (re, ((TimeSpan?) new XElement ("r", re)).Value, "#7f");
+ }
+#pragma warning restore 219
+
[Test]
public void Value ()
{
diff --git a/mcs/class/System/ChangeLog b/mcs/class/System/ChangeLog
index b225a869ac5..c738f61edd1 100644
--- a/mcs/class/System/ChangeLog
+++ b/mcs/class/System/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-12 Sebastien Pouliot <sebastien@ximian.com>
+
+ * System_test.dll.sources: Add NetworkCredentialTest.cs to the tests
+ [Backport r149401]
+
2009-12-01 Sebastien Pouliot <sebastien@ximian.com>
* net_2_1_raw_System.dll.sources: Add existing files that are
diff --git a/mcs/class/System/System.ComponentModel/BaseNumberConverter.cs b/mcs/class/System/System.ComponentModel/BaseNumberConverter.cs
index 5519c24f5e0..8f2aa19fbae 100644
--- a/mcs/class/System/System.ComponentModel/BaseNumberConverter.cs
+++ b/mcs/class/System/System.ComponentModel/BaseNumberConverter.cs
@@ -48,17 +48,12 @@ namespace System.ComponentModel
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
- if (sourceType == typeof (string))
- return true;
- return base.CanConvertFrom (context, sourceType);
+ return sourceType == typeof (string) || base.CanConvertFrom (context, sourceType);
}
public override bool CanConvertTo(ITypeDescriptorContext context, Type t)
{
- if (t == typeof (string))
- return true;
-
- return base.CanConvertTo (context, t);
+ return t.IsPrimitive || base.CanConvertTo (context, t);
}
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
@@ -110,6 +105,9 @@ namespace System.ComponentModel
}
#endif
+ if(destinationType.IsPrimitive)
+ return Convert.ChangeType(value, destinationType, culture);
+
return base.ConvertTo (context, culture, value, destinationType);
}
diff --git a/mcs/class/System/System.ComponentModel/ChangeLog b/mcs/class/System/System.ComponentModel/ChangeLog
index a0f512ed625..8652253df3d 100644
--- a/mcs/class/System/System.ComponentModel/ChangeLog
+++ b/mcs/class/System/System.ComponentModel/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-15 Alexandre Gomes <alexmipego@gmail.com>
+
+ * BaseNumberConverter.cs: Fixed CanConvertTo and ConvertTo when
+ targeting primitive types.
+
2009-11-30 Sebastien Pouliot <sebastien@ximian.com>
* TypeConverterAttribute.cs: Add missing [ComVisible] for SL2/3 builds
diff --git a/mcs/class/System/System.IO.Compression/ChangeLog b/mcs/class/System/System.IO.Compression/ChangeLog
index 0a63cf70c37..b1c585ef9bd 100644
--- a/mcs/class/System/System.IO.Compression/ChangeLog
+++ b/mcs/class/System/System.IO.Compression/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-23 Geoff Norton <gnorton@novell.com>
+
+ * DeflateStream.cs: Ensure our callbacks go into the correct
+ static methods.
+
2009-09-14 Jonathan Pryor <jpryor@novell.com>
* DeflateStream.cs: MonoTouch reverse callbacks need to be static
diff --git a/mcs/class/System/System.IO.Compression/DeflateStream.cs b/mcs/class/System/System.IO.Compression/DeflateStream.cs
index f07a6f6a99d..53fc3b189c1 100644
--- a/mcs/class/System/System.IO.Compression/DeflateStream.cs
+++ b/mcs/class/System/System.IO.Compression/DeflateStream.cs
@@ -42,7 +42,7 @@ namespace System.IO.Compression {
public class DeflateStream : Stream
{
const int BufferSize = 4096;
- delegate int UnmanagedReadOrWrite (IntPtr buffer, int length);
+ delegate int UnmanagedReadOrWrite (IntPtr buffer, int length, IntPtr data);
delegate int ReadMethod (byte[] array, int offset, int count);
delegate void WriteMethod (byte[] array, int offset, int count);
diff --git a/mcs/class/System/System.Net.Mail/ChangeLog b/mcs/class/System/System.Net.Mail/ChangeLog
index 8ff18dac234..240f3b0dd38 100644
--- a/mcs/class/System/System.Net.Mail/ChangeLog
+++ b/mcs/class/System/System.Net.Mail/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * SmtpClient.cs: rethrow inner exception so that
+ AsyncCompletedEventArgs.Error gets the right value on error. Patch
+ by Dimitar Dobrev.
+
2009-08-20 Sebastien Pouliot <sebastien@ximian.com>
* SmtpClient.cs: Honor ServicePointManager.
diff --git a/mcs/class/System/System.Net.Mail/SmtpClient.cs b/mcs/class/System/System.Net.Mail/SmtpClient.cs
index 62fd6e32437..67dcc506266 100644
--- a/mcs/class/System/System.Net.Mail/SmtpClient.cs
+++ b/mcs/class/System/System.Net.Mail/SmtpClient.cs
@@ -749,6 +749,7 @@ namespace System.Net.Mail {
Send (message);
} catch (Exception ex) {
ea.Result = ex;
+ throw ex;
}
};
worker.WorkerSupportsCancellation = true;
diff --git a/mcs/class/System/System.Net.Sockets/ChangeLog b/mcs/class/System/System.Net.Sockets/ChangeLog
index aaa2cf8d2f8..20c4898c288 100644
--- a/mcs/class/System/System.Net.Sockets/ChangeLog
+++ b/mcs/class/System/System.Net.Sockets/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-21 Sebastien Pouliot <sebastien@ximian.com>
+
+ * SocketAsyncEventArgs.cs: Apply Gendarme's ProtectCallToEventDelegatesRule
+ [Backport r150033]
+
2009-12-04 Sebastien Pouliot <sebastien@ximian.com>
* SocketAsyncEventArgs.cs: Implement ConnectByNameError for
diff --git a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
index 7fef0a89bd5..0609c035a65 100644
--- a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
+++ b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
@@ -158,8 +158,9 @@ namespace System.Net.Sockets
if (e == null)
return;
- if (e.Completed != null)
- e.Completed (e.curSocket, e);
+ EventHandler<SocketAsyncEventArgs> handler = e.Completed;
+ if (handler != null)
+ handler (e.curSocket, e);
}
public void SetBuffer (int offset, int count)
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog
index f16f46d2147..6e4139bfa97 100644
--- a/mcs/class/System/System.Net/ChangeLog
+++ b/mcs/class/System/System.Net/ChangeLog
@@ -1,3 +1,45 @@
+2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * IPEndPoint.cs: When throwing an ArgumentException in Create()
+ because of a mismatch in the address family, use a more informative
+ message. Patch by Juho VƤhƤ-Herttu<juhovh@iki.fi>.
+ Fixes #505105.
+
+2010-01-21 Sebastien Pouliot <sebastien@ximian.com>
+
+ * CookieContainer.cs: Fix to cloning and expiration. Patch
+ by Tom Philpot <tom.philpot@logos.com>
+ [Backport r149976 + NET_1_1 fixes]
+
+2010-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * HttpWebRequest.cs: when the server returns several different
+ authentication methods, pick the one that works.
+ Fixes bug #562043.
+
+2010-01-12 Sebastien Pouliot <sebastien@ximian.com>
+
+ * NetworkCredential.cs: Fix properties to never return null.
+
+2009-12-28 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Cookie.cs: Don't use automatic properties to let older mcs
+ (e.g. bootstrap) compile this for NET_1_1 profile
+
+2009-12-24 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Cookie.cs: Re-work ToString to be useable in more cases. Fix
+ some issues found by Gendarme.
+ * CookieContainer.cs: Fix 2.0 NonWorking (and new) unit tests.
+ Implement removing oldest cookies when limits are reached.
+ * CookieCollection.cs: Fix sort to be closer to MS implementation
+ (but still not 100% identical). Fix some issues found by Gendarme
+
+2009-12-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * WebConnectionGroup.cs:
+ * ServicePoint.cs: implemented CloseConnectionGroup().
+
2009-11-30 Sebastien Pouliot <sebastien@ximian.com>
* CookieCollection.cs: Seal inner CookieCollectionPathComparer
diff --git a/mcs/class/System/System.Net/Cookie.cs b/mcs/class/System/System.Net/Cookie.cs
index 02bd572f98d..937df8d7420 100644
--- a/mcs/class/System/System.Net/Cookie.cs
+++ b/mcs/class/System/System.Net/Cookie.cs
@@ -5,8 +5,9 @@
// Lawrence Pit (loz@cable.a2000.nl)
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
// Daniel Nauck (dna(at)mono-project(dot)de)
+// Sebastien Pouliot <sebastien@ximian.com>
//
-// (c) Copyright 2004 Novell, Inc. (http://www.ximian.com)
+// Copyright (C) 2004,2009 Novell, Inc (http://www.novell.com)
//
//
@@ -48,11 +49,10 @@ namespace System.Net {
Uri commentUri;
bool discard;
string domain;
-// bool expired;
DateTime expires;
-#if NET_2_0
+#if NET_2_0
bool httpOnly;
-#endif
+#endif
string name;
string path;
string port;
@@ -70,11 +70,11 @@ namespace System.Net {
{
expires = DateTime.MinValue;
timestamp = DateTime.Now;
- domain = "";
- name = "";
- val = "";
- comment = "";
- port = "";
+ domain = String.Empty;
+ name = String.Empty;
+ val = String.Empty;
+ comment = String.Empty;
+ port = String.Empty;
}
public Cookie (string name, string value)
@@ -113,7 +113,22 @@ namespace System.Net {
public string Domain {
get { return domain; }
- set { domain = value == null ? String.Empty : value; }
+ set {
+ if (IsNullOrEmpty (value)) {
+ domain = String.Empty;
+ ExactDomain = true;
+ } else {
+ domain = value;
+ ExactDomain = (value [0] != '.');
+ }
+ }
+ }
+
+ private bool exact_domain;
+
+ internal bool ExactDomain {
+ get { return exact_domain; }
+ set { exact_domain = value; }
}
public bool Expired {
@@ -131,21 +146,17 @@ namespace System.Net {
get { return expires; }
set { expires = value; }
}
-
-#if NET_2_0
- public bool HttpOnly
- {
+#if NET_2_0
+ public bool HttpOnly {
get { return httpOnly; }
set { httpOnly = value; }
}
#endif
-
public string Name {
get { return name; }
set {
- if (value == null || value.Length == 0) {
+ if (IsNullOrEmpty (value))
throw new CookieException ("Name cannot be empty");
- }
if (value [0] == '$' || value.IndexOfAny (reservedCharsName) != -1) {
// see CookieTest, according to MS implementation
@@ -159,14 +170,14 @@ namespace System.Net {
}
public string Path {
- get { return (path == null || path == "") ? String.Empty : path; }
+ get { return (path == null) ? String.Empty : path; }
set { path = (value == null) ? String.Empty : value; }
}
public string Port {
get { return port; }
set {
- if (value == null || value.Length == 0) {
+ if (IsNullOrEmpty (value)) {
port = String.Empty;
return;
}
@@ -265,6 +276,11 @@ namespace System.Net {
// see also bug #316017
public override string ToString ()
{
+ return ToString (null);
+ }
+
+ internal string ToString (Uri uri)
+ {
if (name.Length == 0)
return String.Empty;
@@ -278,10 +294,13 @@ namespace System.Net {
if (version == 0)
return result.ToString ();
- if (path != null && path.Length != 0)
+ if (!IsNullOrEmpty (path))
result.Append ("; $Path=").Append (path);
-
- if (domain != null && domain.Length != 0)
+ else if (uri != null)
+ result.Append ("; $Path=/").Append (path);
+
+ bool append_domain = (uri == null) || (uri.Host != domain);
+ if (append_domain && !IsNullOrEmpty (domain))
result.Append ("; $Domain=").Append (domain);
if (port != null && port.Length != 0)
@@ -333,6 +352,11 @@ namespace System.Net {
}
return true;
}
+
+ static bool IsNullOrEmpty (string s)
+ {
+ return ((s == null) || (s.Length == 0));
+ }
}
}
diff --git a/mcs/class/System/System.Net/CookieCollection.cs b/mcs/class/System/System.Net/CookieCollection.cs
index 4c5b30f6d5f..bed862b12d3 100644
--- a/mcs/class/System/System.Net/CookieCollection.cs
+++ b/mcs/class/System/System.Net/CookieCollection.cs
@@ -4,8 +4,9 @@
// Authors:
// Lawrence Pit (loz@cable.a2000.nl)
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+// Sebastien Pouliot <sebastien@ximian.com>
//
-// (c) Copyright 2004 Novell, Inc. (http://www.novell.com)
+// Copyright (C) 2004,2009 Novell, Inc (http://www.novell.com)
//
//
@@ -29,10 +30,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.Collections;
using System.Globalization;
using System.Runtime.Serialization;
+#if NET_2_0
+using System.Collections.Generic;
+#endif
namespace System.Net
{
@@ -42,25 +45,49 @@ namespace System.Net
#else
public class CookieCollection : ICollection, IEnumerable {
#endif
- sealed class CookieCollectionPathComparer : IComparer
- {
- int IComparer.Compare (object p1, object p2)
+ // not 100% identical to MS implementation
+#if NET_2_0
+ sealed class CookieCollectionComparer : IComparer<Cookie> {
+ public int Compare (Cookie x, Cookie y)
{
- Cookie c1 = p1 as Cookie;
- Cookie c2 = p2 as Cookie;
+ if (x == null || y == null)
+ return 0;
+
+ int c1 = x.Name.Length + x.Value.Length;
+ int c2 = y.Name.Length + y.Value.Length;
- if (c1 == null || c2 == null)
+ return (c1 - c2);
+ }
+ }
+
+ List<Cookie> list = new List<Cookie> ();
+
+ internal IList<Cookie> List {
+ get { return list; }
+ }
+#else
+ sealed class CookieCollectionComparer : IComparer {
+ public int Compare (object x, object y)
+ {
+ if (x == null || y == null)
return 0;
- return (c2.Path.Length - c1.Path.Length);
+ Cookie c1 = (Cookie) x;
+ Cookie c2 = (Cookie) y;
+
+ return (c1.Name.Length + c1.Value.Length - c2.Name.Length - c2.Value.Length);
}
}
-
- ArrayList list = new ArrayList (4);
- internal ArrayList List {
+ ArrayList list = new ArrayList ();
+
+ internal IList List {
get { return list; }
}
+#endif
+
+ static CookieCollectionComparer Comparer = new CookieCollectionComparer ();
+
// ICollection
public int Count {
get { return list.Count; }
@@ -74,17 +101,15 @@ namespace System.Net
get { return this; }
}
- public void CopyTo (Array array, int arrayIndex)
+ public void CopyTo (Array array, int index)
{
- list.CopyTo (array, arrayIndex);
+ (list as IList).CopyTo (array, index);
}
-#if NET_2_0
public void CopyTo (Cookie [] array, int index)
{
list.CopyTo (array, index);
}
-#endif
// IEnumerable
public IEnumerator GetEnumerator ()
@@ -113,12 +138,10 @@ namespace System.Net
list [pos] = cookie;
}
- internal void SortByPath ()
+ internal void Sort ()
{
- if (list == null || list.Count == 0)
- return;
-
- list.Sort (new CookieCollectionPathComparer ());
+ if (list.Count > 0)
+ list.Sort (Comparer);
}
int SearchCookie (Cookie cookie)
diff --git a/mcs/class/System/System.Net/CookieContainer.cs b/mcs/class/System/System.Net/CookieContainer.cs
index d8a1222e407..4f126fba575 100644
--- a/mcs/class/System/System.Net/CookieContainer.cs
+++ b/mcs/class/System/System.Net/CookieContainer.cs
@@ -4,10 +4,11 @@
// Authors:
// Lawrence Pit (loz@cable.a2000.nl)
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+// Sebastien Pouliot <sebastien@ximian.com>
//
// (c) 2003 Ximian, Inc. (http://www.ximian.com)
// (c) Copyright 2004 Ximian, Inc. (http://www.ximian.com)
-//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -35,11 +36,11 @@ using System.Collections;
using System.Globalization;
using System.Runtime.Serialization;
using System.Text;
+using System.Text.RegularExpressions;
namespace System.Net
{
[Serializable]
- [MonoTODO ("Need to remove older/unused cookies if it reaches the maximum capacity")]
#if NET_2_1
public sealed class CookieContainer {
#else
@@ -49,7 +50,6 @@ namespace System.Net
public const int DefaultCookieLimit = 300;
public const int DefaultPerDomainCookieLimit = 20;
- int count;
int capacity = DefaultCookieLimit;
int perDomainCapacity = DefaultPerDomainCookieLimit;
int maxCookieSize = DefaultCookieLengthLimit;
@@ -99,7 +99,7 @@ namespace System.Net
// properties
public int Count {
- get { return count; }
+ get { return (cookies == null) ? 0 : cookies.Count; }
}
public int Capacity {
@@ -137,7 +137,7 @@ namespace System.Net
if (cookie == null)
throw new ArgumentNullException ("cookie");
- if (cookie.Domain == "")
+ if (cookie.Domain.Length == 0)
#if NET_2_0
throw new ArgumentException ("Cookie domain not set.", "cookie.Domain");
#else
@@ -147,7 +147,16 @@ namespace System.Net
if (cookie.Value.Length > maxCookieSize)
throw new CookieException ("value is larger than MaxCookieSize.");
- AddCookie (cookie);
+ // .NET's Add (Cookie) is fundamentally broken and does not copy properties
+ // like Secure, HttpOnly and Expires so we clone the parts that .NET
+ // does keep before calling AddCookie
+ Cookie c = new Cookie (cookie.Name, cookie.Value);
+ c.Path = (cookie.Path.Length == 0) ? "/" : cookie.Path;
+ c.Domain = cookie.Domain;
+ c.ExactDomain = cookie.ExactDomain;
+ c.Version = cookie.Version;
+
+ AddCookie (c);
}
void AddCookie (Cookie cookie)
@@ -155,37 +164,69 @@ namespace System.Net
if (cookies == null)
cookies = new CookieCollection ();
- if (count + 1 > capacity)
- throw new CookieException ("Capacity exceeded");
+ if (cookies.Count >= capacity)
+ RemoveOldest (null);
+
+ // try to avoid counting per-domain
+ if (cookies.Count >= perDomainCapacity) {
+ if (CountDomain (cookie.Domain) >= perDomainCapacity)
+ RemoveOldest (cookie.Domain);
+ }
+
+ // clone the important parts of the cookie
+ Cookie c = new Cookie (cookie.Name, cookie.Value);
+ c.Path = (cookie.Path.Length == 0) ? "/" : cookie.Path;
+ c.Domain = cookie.Domain;
+ c.ExactDomain = cookie.ExactDomain;
+ c.Version = cookie.Version;
+ c.Expires = cookie.Expires;
+ c.CommentUri = cookie.CommentUri;
+ c.Comment = cookie.Comment;
+ c.Discard = cookie.Discard;
+#if NET_2_0
+ c.HttpOnly = cookie.HttpOnly;
+#endif
+ c.Secure = cookie.Secure;
- cookies.Add (cookie);
- count = cookies.Count;
+ cookies.Add (c);
CheckExpiration ();
}
+ int CountDomain (string domain)
+ {
+ int count = 0;
+ foreach (Cookie c in cookies) {
+ if (CheckDomain (domain, c.Domain, true))
+ count++;
+ }
+ return count;
+ }
+
+ void RemoveOldest (string domain)
+ {
+ int n = 0;
+ DateTime oldest = DateTime.MaxValue;
+ for (int i = 0; i < cookies.Count; i++) {
+ Cookie c = cookies [i];
+ if ((c.TimeStamp < oldest) && ((domain == null) || (domain == c.Domain))) {
+ oldest = c.TimeStamp;
+ n = i;
+ }
+ }
+ cookies.List.RemoveAt (n);
+ }
+
// Only needs to be called from AddCookie (Cookie) and GetCookies (Uri)
void CheckExpiration ()
{
if (cookies == null)
return;
- ArrayList removed = null;
for (int i = cookies.Count - 1; i >= 0; i--) {
Cookie cookie = cookies [i];
- if (cookie.Expired) {
- if (removed == null)
- removed = new ArrayList ();
- removed.Add (i);
- }
- }
-
- if (removed != null) {
- // We went backwards above, so this works.
- ArrayList list = cookies.List;
- foreach (int n in removed) {
- list.RemoveAt (n);
- }
+ if (cookie.Expired)
+ cookies.List.RemoveAt (i);
}
}
@@ -200,16 +241,16 @@ namespace System.Net
void Cook (Uri uri, Cookie cookie)
{
- if (cookie.Name == null || cookie.Name == "")
+ if (IsNullOrEmpty (cookie.Name))
throw new CookieException ("Invalid cookie: name");
if (cookie.Value == null)
throw new CookieException ("Invalid cookie: value");
- if (uri != null && cookie.Domain == "")
+ if (uri != null && cookie.Domain.Length == 0)
cookie.Domain = uri.Host;
- if (cookie.Version == 0 && (cookie.Path == null || cookie.Path == "")) {
+ if (cookie.Version == 0 && IsNullOrEmpty (cookie.Path)) {
if (uri != null) {
cookie.Path = uri.AbsolutePath;
} else {
@@ -217,7 +258,7 @@ namespace System.Net
}
}
- if (cookie.Port == "" && uri != null && !uri.IsDefaultPort) {
+ if (cookie.Port.Length == 0 && uri != null && !uri.IsDefaultPort) {
cookie.Port = "\"" + uri.Port.ToString () + "\"";
}
}
@@ -230,8 +271,10 @@ namespace System.Net
if (cookie == null)
throw new ArgumentNullException ("cookie");
- Cook (uri, cookie);
- AddCookie (cookie);
+ if (!cookie.Expired) {
+ Cook (uri, cookie);
+ AddCookie (cookie);
+ }
}
public void Add (Uri uri, CookieCollection cookies)
@@ -242,9 +285,11 @@ namespace System.Net
if (cookies == null)
throw new ArgumentNullException ("cookies");
- foreach (Cookie c in cookies) {
- Cook (uri, c);
- AddCookie (c);
+ foreach (Cookie cookie in cookies) {
+ if (!cookie.Expired) {
+ Cook (uri, cookie);
+ AddCookie (cookie);
+ }
}
}
@@ -259,7 +304,9 @@ namespace System.Net
StringBuilder result = new StringBuilder ();
foreach (Cookie cookie in coll) {
- result.Append (cookie.ToString ());
+ // don't include the domain since it can be infered from the URI
+ // include empty path as '/'
+ result.Append (cookie.ToString (uri));
result.Append ("; ");
}
@@ -269,26 +316,25 @@ namespace System.Net
return result.ToString ();
}
- static bool CheckDomain (string domain, string host)
+ static bool CheckDomain (string domain, string host, bool exact)
{
- if (domain == String.Empty)
- return false;
-
- int hlen = host.Length;
- int dlen = domain.Length;
- if (hlen < dlen)
+ if (domain.Length == 0)
return false;
- if (hlen == dlen)
- return (String.Compare (domain, host, true, CultureInfo.InvariantCulture) == 0);
+ if (exact)
+ return (String.Compare (host, domain, true, CultureInfo.InvariantCulture) == 0);
- if (domain [0] != '.') {
- domain = "." + domain;
- dlen++;
- }
+ // check for allowed sub-domains - without string allocations
+ if (!CultureInfo.InvariantCulture.CompareInfo.IsSuffix (host, domain, CompareOptions.IgnoreCase))
+ return false;
- string subdomain = host.Substring (hlen - dlen);
- return (String.Compare (subdomain, domain, true, CultureInfo.InvariantCulture) == 0);
+ // mono.com -> www.mono.com is OK but supermono.com NOT OK
+ if (domain [0] == '.')
+ return true;
+ int p = host.Length - domain.Length - 1;
+ if (p < 0)
+ return false;
+ return (host [p] == '.');
}
public CookieCollection GetCookies (Uri uri)
@@ -303,10 +349,10 @@ namespace System.Net
foreach (Cookie cookie in cookies) {
string domain = cookie.Domain;
- if (!CheckDomain (domain, uri.Host))
+ if (!CheckDomain (domain, uri.Host, cookie.ExactDomain))
continue;
- if (cookie.Port != "" && cookie.Ports != null && uri.Port != -1) {
+ if (cookie.Port.Length > 0 && cookie.Ports != null && uri.Port != -1) {
if (Array.IndexOf (cookie.Ports, uri.Port) == -1)
continue;
}
@@ -330,7 +376,7 @@ namespace System.Net
coll.Add (cookie);
}
- coll.SortByPath ();
+ coll.Sort ();
return coll;
}
@@ -340,120 +386,119 @@ namespace System.Net
throw new ArgumentNullException ("uri");
if (cookieHeader == null)
- throw new ArgumentNullException ("cookieHeader");
+ throw new ArgumentNullException ("cookieHeader");
- ParseAndAddCookies (uri, cookieHeader);
- }
-
- // GetCookieValue, GetCookieName and ParseAndAddCookies copied from HttpRequest.cs
- static string GetCookieValue (string str, int length, ref int i)
- {
- if (i >= length)
- return null;
-
- int k = i;
- while (k < length && Char.IsWhiteSpace (str [k]))
- k++;
-
- int begin = k;
- while (k < length && str [k] != ';')
- k++;
-
- i = k;
- return str.Substring (begin, i - begin).Trim ();
- }
+ if (cookieHeader.Length == 0)
+ return;
+
+ // Cookies must be separated by ',' (like documented on MSDN)
+ // but expires uses DAY, DD-MMM-YYYY HH:MM:SS GMT, so simple ',' search is wrong.
+ // See http://msdn.microsoft.com/en-us/library/aa384321%28VS.85%29.aspx
+ string [] jar = cookieHeader.Split (',');
+ string tmpCookie;
+ for (int i = 0; i < jar.Length; i++) {
+ tmpCookie = jar [i];
+
+ if (jar.Length > i + 1
+ && Regex.IsMatch (jar[i],
+ @".*expires\s*=\s*(Mon|Tue|Wed|Thu|Fri|Sat|Sun)",
+ RegexOptions.IgnoreCase)
+ && Regex.IsMatch (jar[i+1],
+ @"\s\d{2}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-\d{4} \d{2}:\d{2}:\d{2} GMT",
+ RegexOptions.IgnoreCase)) {
+ tmpCookie = new StringBuilder (tmpCookie).Append (",").Append (jar [++i]).ToString ();
+ }
- static string GetCookieName (string str, int length, ref int i)
- {
- if (i >= length)
- return null;
+ try {
+ Cookie c = Parse (tmpCookie);
- int k = i;
- while (k < length && Char.IsWhiteSpace (str [k]))
- k++;
+ // add default values from URI if missing from the string
+ if (c.Path.Length == 0) {
+ c.Path = uri.AbsolutePath;
+ } else if (!uri.AbsolutePath.StartsWith (c.Path)) {
+ string msg = String.Format ("'Path'='{0}' is invalid with URI", c.Path);
+ throw new CookieException (msg);
+ }
- int begin = k;
- while (k < length && str [k] != ';' && str [k] != '=')
- k++;
+ if (c.Domain.Length == 0) {
+ c.Domain = uri.Host;
+ // don't consider domain "a.b.com" as ".a.b.com"
+ c.ExactDomain = true;
+ }
- i = k + 1;
- return str.Substring (begin, k - begin).Trim ();
+ AddCookie (c);
+ }
+ catch (Exception e) {
+ string msg = String.Format ("Could not parse cookies for '{0}'.", uri);
+ throw new CookieException (msg, e);
+ }
+ }
}
- static string GetDir (string path)
+ static Cookie Parse (string s)
{
- if (path == null || path == "")
- return "/";
-
- int last = path.LastIndexOf ('/');
- if (last == -1)
- return "/" + path;
-
- return path.Substring (0, last + 1);
- }
-
- void ParseAndAddCookies (Uri uri, string header)
- {
- if (header.Length == 0)
- return;
+ string [] parts = s.Split (';');
+ Cookie c = new Cookie ();
+ for (int i = 0; i < parts.Length; i++) {
+ string key, value;
+ int sep = parts[i].IndexOf ('=');
+ if (sep == -1) {
+ key = parts [i].Trim ();
+ value = String.Empty;
+ } else {
+ key = parts [i].Substring (0, sep).Trim ();
+ value = parts [i].Substring (sep + 1).Trim ();
+ }
- string [] name_values = header.Trim ().Split (';');
- int length = name_values.Length;
- Cookie cookie = null;
- int pos;
- CultureInfo inv = CultureInfo.InvariantCulture;
- bool havePath = false;
- bool haveDomain = false;
-
- for (int i = 0; i < length; i++) {
- pos = 0;
- string name_value = name_values [i].Trim ();
- string name = GetCookieName (name_value, name_value.Length, ref pos);
- if (name == null || name == "")
- throw new CookieException ("Name is empty.");
-
- string value = GetCookieValue (name_value, name_value.Length, ref pos);
- if (cookie != null) {
- if (!havePath && String.Compare (name, "$Path", true, inv) == 0 ||
- String.Compare (name, "path", true, inv) == 0) {
- havePath = true;
- cookie.Path = value;
- continue;
+ switch (key.ToLower (CultureInfo.InvariantCulture)) {
+ case "path":
+ case "$path":
+ if (c.Path.Length == 0)
+ c.Path = value;
+ break;
+ case "domain":
+ case "$domain":
+ if (c.Domain.Length == 0) {
+ c.Domain = value;
+ // here mono.com means "*.mono.com"
+ c.ExactDomain = false;
}
-
- if (!haveDomain && String.Compare (name, "$Domain", true, inv) == 0 ||
- String.Compare (name, "domain", true, inv) == 0) {
- cookie.Domain = value;
- haveDomain = true;
- continue;
+ break;
+ case "expires":
+ case "$expires":
+ if (c.Expires == DateTime.MinValue) {
+#if NET_2_0
+ c.Expires = DateTime.SpecifyKind (DateTime.ParseExact (value,
+ @"ddd, dd-MMM-yyyy HH:mm:ss G\MT", CultureInfo.InvariantCulture), DateTimeKind.Utc);
+#else
+ c.Expires = DateTime.ParseExact (value, @"ddd, dd-MMM-yyyy HH:mm:ss G\MT",
+ CultureInfo.InvariantCulture).ToUniversalTime ();
+#endif
}
-
- if (!havePath)
- cookie.Path = GetDir (uri.AbsolutePath);
-
- if (!haveDomain)
- cookie.Domain = uri.Host;
-
- havePath = false;
- haveDomain = false;
- Add (cookie);
- cookie = null;
+ break;
+#if NET_2_0
+ case "httponly":
+ c.HttpOnly = true;
+ break;
+#endif
+ case "secure":
+ c.Secure = true;
+ break;
+ default:
+ if (c.Name.Length == 0) {
+ c.Name = key;
+ c.Value = value;
+ }
+ break;
}
- cookie = new Cookie (name, value);
- }
-
- if (cookie != null) {
- if (!havePath)
- cookie.Path = GetDir (uri.AbsolutePath);
-
- if (!haveDomain)
- cookie.Domain = uri.Host;
-
- Add (cookie);
}
+ return c;
}
- } // CookieContainer
-
-} // System.Net
+ static bool IsNullOrEmpty (string s)
+ {
+ return ((s == null) || (s.Length == 0));
+ }
+ }
+}
diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs
index afe0adc2a88..f35109c7000 100644
--- a/mcs/class/System/System.Net/HttpWebRequest.cs
+++ b/mcs/class/System/System.Net/HttpWebRequest.cs
@@ -1347,15 +1347,19 @@ namespace System.Net
if (isProxy && (proxy == null || proxy.Credentials == null))
return false;
- string authHeader = response.Headers [(isProxy) ? "Proxy-Authenticate" : "WWW-Authenticate"];
- if (authHeader == null)
+ string [] authHeaders = response.Headers.GetValues ( (isProxy) ? "Proxy-Authenticate" : "WWW-Authenticate");
+ if (authHeaders == null || authHeaders.Length == 0)
return false;
ICredentials creds = (!isProxy) ? credentials : proxy.Credentials;
- Authorization auth = AuthenticationManager.Authenticate (authHeader, this, creds);
+ Authorization auth = null;
+ foreach (string authHeader in authHeaders) {
+ auth = AuthenticationManager.Authenticate (authHeader, this, creds);
+ if (auth != null)
+ break;
+ }
if (auth == null)
return false;
-
webHeaders [(isProxy) ? "Proxy-Authorization" : "Authorization"] = auth.Message;
authCompleted = auth.Complete;
is_ntlm_auth = (auth.Module.AuthenticationType == "NTLM");
diff --git a/mcs/class/System/System.Net/IPEndPoint.cs b/mcs/class/System/System.Net/IPEndPoint.cs
index 27b816caef7..3aa2b182b88 100644
--- a/mcs/class/System/System.Net/IPEndPoint.cs
+++ b/mcs/class/System/System.Net/IPEndPoint.cs
@@ -92,7 +92,9 @@ namespace System.Net {
throw new ArgumentNullException ("socketAddress");
if (socketAddress.Family != AddressFamily)
- throw new ArgumentException ("socketAddress");
+ throw new ArgumentException ("The IPEndPoint was created using " + AddressFamily +
+ " AddressFamily but SocketAddress contains " + socketAddress.Family +
+ " instead, please use the same type.");
SocketAddress sockaddr = socketAddress;
int size =sockaddr.Size;
diff --git a/mcs/class/System/System.Net/NetworkCredential.cs b/mcs/class/System/System.Net/NetworkCredential.cs
index 2219e4b37dc..010847b4f48 100644
--- a/mcs/class/System/System.Net/NetworkCredential.cs
+++ b/mcs/class/System/System.Net/NetworkCredential.cs
@@ -4,8 +4,7 @@
// Author: Duncan Mak (duncan@ximian.com)
//
// (C) Ximian, Inc.
-//
-
+// Copyright (C) 2010 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
@@ -41,7 +40,6 @@ namespace System.Net
// Constructors
public NetworkCredential ()
- : base ()
{
}
@@ -60,21 +58,18 @@ namespace System.Net
// Properties
- public string Domain
- {
- get { return domain; }
+ public string Domain {
+ get { return domain == null ? String.Empty : domain; }
set { domain = value; }
}
- public string UserName
- {
- get { return userName; }
+ public string UserName {
+ get { return userName == null ? String.Empty : userName; }
set { userName = value; }
}
- public string Password
- {
- get { return password; }
+ public string Password {
+ get { return password == null ? String.Empty : password; }
set { password = value; }
}
diff --git a/mcs/class/System/System.Net/ServicePoint.cs b/mcs/class/System/System.Net/ServicePoint.cs
index 88be5a7ec71..740b8402a6b 100644
--- a/mcs/class/System/System.Net/ServicePoint.cs
+++ b/mcs/class/System/System.Net/ServicePoint.cs
@@ -298,10 +298,17 @@ namespace System.Net
}
#endif
#if NET_2_0
- [MonoNotSupported ("")]
public bool CloseConnectionGroup (string connectionGroupName)
{
- throw new NotImplementedException ();
+ lock (locker) {
+ WebConnectionGroup cncGroup = GetConnectionGroup (connectionGroupName);
+ if (cncGroup != null) {
+ cncGroup.Close ();
+ return true;
+ }
+ }
+
+ return false;
}
#endif
diff --git a/mcs/class/System/System.Net/WebConnectionGroup.cs b/mcs/class/System/System.Net/WebConnectionGroup.cs
index 96bc94f79aa..f98144db88f 100644
--- a/mcs/class/System/System.Net/WebConnectionGroup.cs
+++ b/mcs/class/System/System.Net/WebConnectionGroup.cs
@@ -51,6 +51,26 @@ namespace System.Net
queue = new Queue ();
}
+ public void Close ()
+ {
+ //TODO: what do we do with the queue? Empty it out and abort the requests?
+ //TODO: abort requests or wait for them to finish
+ lock (connections) {
+ WeakReference cncRef = null;
+
+ int end = connections.Count;
+ ArrayList removed = null;
+ for (int i = 0; i < end; i++) {
+ cncRef = (WeakReference) connections [i];
+ WebConnection cnc = cncRef.Target as WebConnection;
+ if (cnc != null) {
+ cnc.Close (false);
+ }
+ }
+ connections.Clear ();
+ }
+ }
+
public WebConnection GetConnection (HttpWebRequest request)
{
WebConnection cnc = null;
diff --git a/mcs/class/System/System_test.dll.sources b/mcs/class/System/System_test.dll.sources
index bf65f1f95dc..4d85e6f32b9 100644
--- a/mcs/class/System/System_test.dll.sources
+++ b/mcs/class/System/System_test.dll.sources
@@ -210,6 +210,7 @@ System.Net/HttpListener2Test.cs
System.Net/HttpListenerRequestTest.cs
System.Net/IPAddressTest.cs
System.Net/IPEndPointTest.cs
+System.Net/NetworkCredentialTest.cs
System.Net/ServicePointManagerTest.cs
System.Net/ServicePointTest.cs
System.Net/SocketPermissionAttributeTest.cs
diff --git a/mcs/class/System/Test/System.ComponentModel/ByteConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/ByteConverterTests.cs
index ca6a8cd78f4..0c02ae7605f 100644
--- a/mcs/class/System/Test/System.ComponentModel/ByteConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/ByteConverterTests.cs
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
{
Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+ Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
}
[Test]
diff --git a/mcs/class/System/Test/System.ComponentModel/ChangeLog b/mcs/class/System/Test/System.ComponentModel/ChangeLog
index d436e60817a..a7353778dd2 100644
--- a/mcs/class/System/Test/System.ComponentModel/ChangeLog
+++ b/mcs/class/System/Test/System.ComponentModel/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-15 Alexandre Gomes <alexmipego@gmail.com>
+
+ * ByteConverterTests.cs:
+ * DoubleConverterTests.cs:
+ * Int32ConverterTests.cs:
+ * Int16ConverterTests.cs:
+ * Int64ConverterTests.cs:
+ * SingleConverterTests.cs:
+ * UInt32ConverterTests.cs:
+ * SByteConverterTests.cs:
+ * UInt16ConverterTests.cs:
+ * UInt64ConverterTests.cs: Added tests to verify CanConvertTo when
+ targeting primitive types.
+
2009-09-29 Alan McGovern <amcgovern@novell.com>
* CategoryAttributeTest.cs: Added new test file.
diff --git a/mcs/class/System/Test/System.ComponentModel/DoubleConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/DoubleConverterTests.cs
index c3730214269..2c1558a3f87 100644
--- a/mcs/class/System/Test/System.ComponentModel/DoubleConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/DoubleConverterTests.cs
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
{
Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+ Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
}
[Test]
diff --git a/mcs/class/System/Test/System.ComponentModel/Int16ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/Int16ConverterTests.cs
index 231dde17be5..9b7b0dc9408 100644
--- a/mcs/class/System/Test/System.ComponentModel/Int16ConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/Int16ConverterTests.cs
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
{
Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+ Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
}
[Test]
diff --git a/mcs/class/System/Test/System.ComponentModel/Int32ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/Int32ConverterTests.cs
index fac717b1089..e381134795d 100644
--- a/mcs/class/System/Test/System.ComponentModel/Int32ConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/Int32ConverterTests.cs
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
{
Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+ Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
}
[Test]
diff --git a/mcs/class/System/Test/System.ComponentModel/Int64ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/Int64ConverterTests.cs
index d43cdfc335f..a9158d3d9c3 100644
--- a/mcs/class/System/Test/System.ComponentModel/Int64ConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/Int64ConverterTests.cs
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
{
Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+ Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
}
[Test]
diff --git a/mcs/class/System/Test/System.ComponentModel/SByteConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/SByteConverterTests.cs
index a4539dfcaca..fdd2deadfb0 100644
--- a/mcs/class/System/Test/System.ComponentModel/SByteConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/SByteConverterTests.cs
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
{
Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+ Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
}
[Test]
diff --git a/mcs/class/System/Test/System.ComponentModel/SingleConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/SingleConverterTests.cs
index 03efd619f38..1529162b52b 100644
--- a/mcs/class/System/Test/System.ComponentModel/SingleConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/SingleConverterTests.cs
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
{
Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+ Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
}
[Test]
diff --git a/mcs/class/System/Test/System.ComponentModel/UInt16ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/UInt16ConverterTests.cs
index ad6a982dee6..cea80ce9033 100644
--- a/mcs/class/System/Test/System.ComponentModel/UInt16ConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/UInt16ConverterTests.cs
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
{
Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+ Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
}
[Test]
diff --git a/mcs/class/System/Test/System.ComponentModel/UInt32ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/UInt32ConverterTests.cs
index 6dd80ffb66e..791a0519eef 100644
--- a/mcs/class/System/Test/System.ComponentModel/UInt32ConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/UInt32ConverterTests.cs
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
{
Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+ Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
}
[Test]
diff --git a/mcs/class/System/Test/System.ComponentModel/UInt64ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/UInt64ConverterTests.cs
index e87522c54a0..ae5c539786b 100644
--- a/mcs/class/System/Test/System.ComponentModel/UInt64ConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/UInt64ConverterTests.cs
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
{
Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+ Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
}
[Test]
diff --git a/mcs/class/System/Test/System.Net/ChangeLog b/mcs/class/System/Test/System.Net/ChangeLog
index 831078775d0..4602f4d8e06 100644
--- a/mcs/class/System/Test/System.Net/ChangeLog
+++ b/mcs/class/System/Test/System.Net/ChangeLog
@@ -1,3 +1,20 @@
+2010-01-21 Sebastien Pouliot <sebastien@ximian.com>
+
+ * CookieContainerTest.cs: Additional test cases from Tom Philpot
+ [Backport r149976 + NET_1_1 fixes]
+
+2010-01-12 Sebastien Pouliot <sebastien@ximian.com>
+
+ * NetworkCredentialTest.cs: New. Unit tests.
+ [Backport r149401]
+
+2009-12-24 Sebastien Pouliot <sebastien@ximian.com>
+
+ * CookieContainerTest.cs: Split many tests into smaller test
+ cases. Add test cases for DefaultPerDomainCookieLimit and
+ DefaultCookieLimit. Remove all, but one 1.x, [Category
+ ("NotWorking")] since everything works now.
+
2009-10-23 Alexandre Gomes <alexmipego@gmail.com>
* WebClientTest.cs: Test for GetWebRequest overriding
diff --git a/mcs/class/System/Test/System.Net/CookieContainerTest.cs b/mcs/class/System/Test/System.Net/CookieContainerTest.cs
index d96d0cb963a..88abd5d976b 100644
--- a/mcs/class/System/Test/System.Net/CookieContainerTest.cs
+++ b/mcs/class/System/Test/System.Net/CookieContainerTest.cs
@@ -4,8 +4,9 @@
// Authors:
// Gonzalo Paniagua Javier (gonzalo@novell.com)
// Daniel Nauck (dna(at)mono-project(dot)de)
+// Sebastien Pouliot <sebastien@ximian.com>
//
-// (c) Copyright 2004 Novell, Inc. (http://www.novell.com)
+// Copyright (C) 2004,2009 Novell, Inc (http://www.novell.com)
//
using System;
@@ -14,11 +15,9 @@ using System.Reflection;
using NUnit.Framework;
-namespace MonoTests.System.Net
-{
+namespace MonoTests.System.Net {
[TestFixture]
- public class CookieContainerTest
- {
+ public class CookieContainerTest {
[Test] // .ctor ()
public void Constructor1 ()
{
@@ -46,7 +45,8 @@ namespace MonoTests.System.Net
try {
new CookieContainer (0);
Assert.Fail ("#A1");
- } catch (ArgumentException ex) {
+ }
+ catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
Assert.IsNull (ex.InnerException, "#A3");
#if NET_2_0
@@ -63,7 +63,8 @@ namespace MonoTests.System.Net
try {
new CookieContainer (-10);
Assert.Fail ("#B1");
- } catch (ArgumentException ex) {
+ }
+ catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
Assert.IsNull (ex.InnerException, "#B3");
#if NET_2_0
@@ -81,7 +82,7 @@ namespace MonoTests.System.Net
public void Constructor3 ()
{
CookieContainer c;
-
+
c = new CookieContainer (100, 50, 1000);
Assert.AreEqual (100, c.Capacity, "#A1");
Assert.AreEqual (50, c.PerDomainCapacity, "#A2");
@@ -105,7 +106,8 @@ namespace MonoTests.System.Net
try {
new CookieContainer (0, 0, 100);
Assert.Fail ("#A1");
- } catch (ArgumentException ex) {
+ }
+ catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
Assert.IsNull (ex.InnerException, "#A3");
#if NET_2_0
@@ -122,7 +124,8 @@ namespace MonoTests.System.Net
try {
new CookieContainer (-10, 0, 100);
Assert.Fail ("#B1");
- } catch (ArgumentException ex) {
+ }
+ catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
Assert.IsNull (ex.InnerException, "#B3");
#if NET_2_0
@@ -145,7 +148,8 @@ namespace MonoTests.System.Net
try {
new CookieContainer (100, 50, 0);
Assert.Fail ("#A1");
- } catch (ArgumentException ex) {
+ }
+ catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
Assert.IsNull (ex.InnerException, "#A3");
#if NET_2_0
@@ -162,7 +166,8 @@ namespace MonoTests.System.Net
try {
new CookieContainer (100, 50, -4);
Assert.Fail ("#B1");
- } catch (ArgumentException ex) {
+ }
+ catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
Assert.IsNull (ex.InnerException, "#B3");
#if NET_2_0
@@ -186,7 +191,8 @@ namespace MonoTests.System.Net
new CookieContainer (432, 0, 1000);
Assert.Fail ("#B1");
#if NET_2_0
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
// 'PerDomainCapacity' has to be greater than
// '0' and less than '432'
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
@@ -208,7 +214,8 @@ namespace MonoTests.System.Net
new CookieContainer (432, -1, 1000);
Assert.Fail ("#C1");
#if NET_2_0
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
// 'PerDomainCapacity' has to be greater than
// '0' and less than '432'
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#C2");
@@ -230,7 +237,8 @@ namespace MonoTests.System.Net
new CookieContainer (432, 433, 1000);
Assert.Fail ("#C1");
#if NET_2_0
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
// 'PerDomainCapacity' has to be greater than
// '0' and less than '432'
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#C2");
@@ -284,7 +292,8 @@ namespace MonoTests.System.Net
try {
c.Capacity = -5;
Assert.Fail ("#A1");
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
// 'Capacity' has to be greater than '0' and
// less than '20'
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
@@ -297,7 +306,8 @@ namespace MonoTests.System.Net
try {
c.Capacity = 0;
Assert.Fail ("#B1");
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
// 'Capacity' has to be greater than '0' and
// less than '20'
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
@@ -310,7 +320,8 @@ namespace MonoTests.System.Net
try {
c.Capacity = 5;
Assert.Fail ("#C1");
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
// 'Capacity' has to be greater than '0' and
// less than '20'
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#C2");
@@ -347,7 +358,8 @@ namespace MonoTests.System.Net
try {
c.MaxCookieSize = -5;
Assert.Fail ("#A1");
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
Assert.IsNull (ex.InnerException, "#A3");
Assert.IsNotNull (ex.Message, "#A4");
@@ -358,7 +370,8 @@ namespace MonoTests.System.Net
try {
c.MaxCookieSize = -1;
Assert.Fail ("#B1");
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
Assert.IsNull (ex.InnerException, "#B3");
Assert.IsNotNull (ex.Message, "#B4");
@@ -369,7 +382,8 @@ namespace MonoTests.System.Net
try {
c.MaxCookieSize = 0;
Assert.Fail ("#C1");
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#C2");
Assert.IsNull (ex.InnerException, "#C3");
Assert.IsNotNull (ex.Message, "#C4");
@@ -400,7 +414,8 @@ namespace MonoTests.System.Net
try {
c.PerDomainCapacity = -5;
Assert.Fail ("#A1");
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
Assert.IsNull (ex.InnerException, "#A3");
Assert.IsNotNull (ex.Message, "#A4");
@@ -411,7 +426,8 @@ namespace MonoTests.System.Net
try {
c.PerDomainCapacity = 0;
Assert.Fail ("#B1");
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
Assert.IsNull (ex.InnerException, "#B3");
Assert.IsNotNull (ex.Message, "#B4");
@@ -424,7 +440,8 @@ namespace MonoTests.System.Net
try {
c.PerDomainCapacity = (c.Capacity + 1);
Assert.Fail ("#C1");
- } catch (ArgumentOutOfRangeException ex) {
+ }
+ catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#C2");
Assert.IsNull (ex.InnerException, "#C3");
Assert.IsNotNull (ex.Message, "#C4");
@@ -435,22 +452,52 @@ namespace MonoTests.System.Net
[Test] // Add (Cookie)
public void Add1 ()
{
- Cookie cookie;
- CookieCollection cookies;
-
CookieContainer cc = new CookieContainer ();
- cookie = new Cookie ("Age", "28", string.Empty, "localhost");
+ Cookie cookie = new Cookie ("Age", "28", string.Empty, "localhost");
+ Assert.AreEqual ("Age", cookie.Name, "Name");
+ Assert.AreEqual ("28", cookie.Value, "Value");
+ Assert.AreEqual (String.Empty, cookie.Path, "Path");
+ Assert.AreEqual ("localhost", cookie.Domain, "Domain");
+ // does not survive the addition "cloning"
+ cookie.Comment = "comment";
+ cookie.CommentUri = new Uri ("http://localhost");
+ cookie.Discard = true;
+ cookie.Expires = DateTime.MaxValue;
+#if NET_2_0
+ cookie.HttpOnly = true;
+#endif
+ cookie.Secure = true;
+ // except version
+ cookie.Version = 1;
+
cc.Add (cookie);
Assert.AreEqual (1, cc.Count, "#A1");
- cookies = cc.GetCookies (new Uri ("http://localhost/Whatever"));
+
+ CookieCollection cookies = cc.GetCookies (new Uri ("http://localhost/Whatever"));
Assert.AreEqual (1, cookies.Count, "#A2");
+ Assert.AreNotSame (cookie, cookies [0], "!same");
+
cookie = cookies [0];
- Assert.AreEqual ("Age", cookie.Name, "#A3");
- Assert.AreEqual ("28", cookie.Value, "#A4");
-#if false
- Assert.AreEqual ("/", cookie.Path, "#A5");
+ Assert.AreEqual ("Age", cookie.Name, "Clone-Name");
+ Assert.AreEqual ("28", cookie.Value, "Clone-Value");
+ // Path is not the same, nor default
+ Assert.AreEqual ("/", cookie.Path, "Clone-Path");
+ Assert.AreEqual ("localhost", cookie.Domain, "Clone-Domain");
+ // other non-core properties have default values
+ Assert.AreEqual (String.Empty, cookie.Comment, "Clone-Comment");
+ Assert.IsNull (cookie.CommentUri, "Clone-CommentUri");
+ Assert.IsFalse (cookie.Discard, "Clone-Discard");
+ Assert.AreEqual (DateTime.MinValue, cookie.Expires, "Clone-Expires");
+#if NET_2_0
+ Assert.IsFalse (cookie.HttpOnly, "Clone-HttpOnly");
#endif
- Assert.AreEqual ("localhost", cookie.Domain, "#A6");
+ Assert.IsFalse (cookie.Secure, "Clone-Secure");
+ // except version
+ Assert.AreEqual (1, cookie.Version, "Clone-Version");
+
+ cookies = cc.GetCookies (new Uri ("http://localhost/Whatever"));
+ // the same Cookie instance returned for a second query
+ Assert.AreSame (cookie, cookies [0], "!same-2");
}
[Test] // Add (Cookie)
@@ -461,7 +508,8 @@ namespace MonoTests.System.Net
try {
cc.Add (cookie);
Assert.Fail ("#1");
- } catch (ArgumentException ex) {
+ }
+ catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
#if NET_2_0
@@ -481,7 +529,8 @@ namespace MonoTests.System.Net
try {
cc.Add ((CookieCollection) null);
Assert.Fail ("#1");
- } catch (ArgumentNullException ex) {
+ }
+ catch (ArgumentNullException ex) {
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
@@ -497,7 +546,8 @@ namespace MonoTests.System.Net
try {
cc.Add ((Uri) null, cookie);
Assert.Fail ("#1");
- } catch (ArgumentNullException ex) {
+ }
+ catch (ArgumentNullException ex) {
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
@@ -513,7 +563,8 @@ namespace MonoTests.System.Net
try {
cc.Add (uri, (Cookie) null);
Assert.Fail ("#1");
- } catch (ArgumentNullException ex) {
+ }
+ catch (ArgumentNullException ex) {
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
@@ -529,7 +580,8 @@ namespace MonoTests.System.Net
try {
cc.Add ((Uri) null, cookies);
Assert.Fail ("#1");
- } catch (ArgumentNullException ex) {
+ }
+ catch (ArgumentNullException ex) {
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
@@ -545,7 +597,8 @@ namespace MonoTests.System.Net
try {
cc.Add (uri, (CookieCollection) null);
Assert.Fail ("#1");
- } catch (ArgumentNullException ex) {
+ }
+ catch (ArgumentNullException ex) {
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
@@ -582,7 +635,7 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
+ // [Category ("NotWorking")]
public void TestAddExpired_Cookie ()
{
CookieContainer cc = new CookieContainer ();
@@ -646,7 +699,7 @@ namespace MonoTests.System.Net
Assert.IsFalse (cookie.Secure, "#C11");
Assert.AreEqual (2, cc.Count, "#D1");
- coll = cc.GetCookies (new Uri("http://contoso.com"));
+ coll = cc.GetCookies (new Uri ("http://contoso.com"));
Assert.AreEqual (0, coll.Count, "#D1.1");
//not expired cookie
@@ -688,7 +741,6 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
public void GetCookieHeader1 ()
{
CookieContainer cc;
@@ -711,14 +763,10 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
- public void GetCookieHeader2 ()
+ public void GetCookieHeader2a ()
{
- CookieContainer cc;
- Cookie cookie;
-
- cc = new CookieContainer ();
- cookie = new Cookie ("Country", "Belgium", "/path", "mono.com");
+ CookieContainer cc = new CookieContainer ();
+ Cookie cookie = new Cookie ("Country", "Belgium", "/path", "mono.com");
cc.Add (cookie);
cookie = new Cookie ("Age", "26", "/path", "dev.mono.com");
cc.Add (cookie);
@@ -727,9 +775,13 @@ namespace MonoTests.System.Net
Assert.AreEqual ("Country=Belgium", cc.GetCookieHeader (new Uri ("http://mono.com/path")), "#A2");
Assert.AreEqual ("", cc.GetCookieHeader (new Uri ("http://test.mono.com/path")), "#A3");
Assert.AreEqual ("", cc.GetCookieHeader (new Uri ("http://us.dev.mono.com/path")), "#A4");
+ }
- cc = new CookieContainer ();
- cookie = new Cookie ("Country", "Belgium", "/path", ".mono.com");
+ [Test]
+ public void GetCookieHeader2b ()
+ {
+ CookieContainer cc = new CookieContainer ();
+ Cookie cookie = new Cookie ("Country", "Belgium", "/path", ".mono.com");
cc.Add (cookie);
cookie = new Cookie ("Age", "26", "/path", ".dev.mono.com");
cc.Add (cookie);
@@ -741,12 +793,9 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
public void GetCookieHeader3 ()
{
- CookieContainer cc;
-
- cc = new CookieContainer ();
+ CookieContainer cc = new CookieContainer ();
cc.SetCookies (new Uri ("http://dev.test.mono.com/Whatever/Do"),
"Country=Belgium; path=/Whatever; domain=mono.com;" +
"Age=26; path=/Whatever; domain=test.mono.com," +
@@ -758,14 +807,10 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
public void GetCookieHeader4 ()
{
- CookieContainer cc;
- Cookie cookie;
-
- cc = new CookieContainer ();
- cookie = new Cookie ("Height", "178", "/Whatever", "mono.com");
+ CookieContainer cc = new CookieContainer ();
+ Cookie cookie = new Cookie ("Height", "178", "/Whatever", "mono.com");
cc.Add (cookie);
cookie = new Cookie ("Town", "Brussels", "/Whatever", ".mono.com");
cc.Add (cookie);
@@ -783,18 +828,30 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
- public void GetCookieHeader5 ()
+ public void GetCookieHeader5a ()
{
- CookieContainer cc;
- Cookie cookie;
+ CookieContainer cc = new CookieContainer ();
+ Cookie cookie = new Cookie ("name1", "value1", "", "localhost");
+ cookie.Comment = "Short name";
+ cookie.Expires = DateTime.Now.Add (new TimeSpan (3, 2, 5));
+ cookie.Version = 1;
+ cc.Add (cookie);
+ Assert.AreEqual ("$Version=1; name1=value1; $Domain=localhost", cookie.ToString (), "#E0");
+ Assert.AreEqual ("$Version=1; name1=value1; $Path=/",
+ cc.GetCookieHeader (new Uri ("http://localhost/path/sub")), "#E1");
+ }
- cc = new CookieContainer ();
- cookie = new Cookie ("name1", "value1", "", "localhost");
+ [Test]
+ public void GetCookieHeader5b ()
+ {
+ CookieContainer cc = new CookieContainer ();
+ Cookie cookie = new Cookie ("name1", "value1");
+ cookie.Domain = "localhost";
cookie.Comment = "Short name";
cookie.Expires = DateTime.Now.Add (new TimeSpan (3, 2, 5));
cookie.Version = 1;
cc.Add (cookie);
+ Assert.AreEqual ("$Version=1; name1=value1; $Domain=localhost", cookie.ToString (), "#E0");
Assert.AreEqual ("$Version=1; name1=value1; $Path=/",
cc.GetCookieHeader (new Uri ("http://localhost/path/sub")), "#E1");
}
@@ -802,11 +859,8 @@ namespace MonoTests.System.Net
[Test]
public void GetCookieHeader6 ()
{
- CookieContainer cc;
- Cookie cookie;
-
- cc = new CookieContainer ();
- cookie = new Cookie ("name1", "value1", "", "localhost");
+ CookieContainer cc = new CookieContainer ();
+ Cookie cookie = new Cookie ("name1", "value1", "", "localhost");
cookie.Comment = "Short name";
cookie.Expires = DateTime.Now.Add (new TimeSpan (3, 2, 5));
cookie.Version = 0;
@@ -816,14 +870,10 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
- public void GetCookieHeader7 ()
+ public void GetCookieHeader7a ()
{
- CookieContainer cc;
- Cookie cookie;
-
- cc = new CookieContainer ();
- cookie = new Cookie ("name1", "value1", "/path", ".mono.com");
+ CookieContainer cc = new CookieContainer ();
+ Cookie cookie = new Cookie ("name1", "value1", "/path", ".mono.com");
cookie.Comment = "Short name";
cookie.Expires = DateTime.Now.Add (new TimeSpan (3, 2, 5));
cookie.Version = 0;
@@ -838,9 +888,13 @@ namespace MonoTests.System.Net
Assert.AreEqual (string.Empty, cc.GetCookieHeader (new Uri ("http://live.mono.com/whatever")), "#A3");
Assert.AreEqual (string.Empty, cc.GetCookieHeader (new Uri ("http://gomono.com/path/sub")), "#A4");
Assert.AreEqual (string.Empty, cc.GetCookieHeader (new Uri ("http://mono.com/path/sub")), "#A5");
+ }
- cc = new CookieContainer ();
- cookie = new Cookie ("name1", "value1", "/path", "live.mono.com");
+ [Test]
+ public void GetCookieHeader7b ()
+ {
+ CookieContainer cc = new CookieContainer ();
+ Cookie cookie = new Cookie ("name1", "value1", "/path", "live.mono.com");
cookie.Comment = "Short name";
cookie.Expires = DateTime.Now.Add (new TimeSpan (3, 2, 5));
cookie.Version = 0;
@@ -866,7 +920,8 @@ namespace MonoTests.System.Net
try {
cc.GetCookieHeader ((Uri) null);
Assert.Fail ("#1");
- } catch (ArgumentNullException ex) {
+ }
+ catch (ArgumentNullException ex) {
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
@@ -914,22 +969,17 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
- public void GetCookies2 ()
+ public void GetCookies2a ()
{
- CookieContainer container;
- CookieCollection cookies;
- Cookie cookie;
-
- container = new CookieContainer ();
+ CookieContainer container = new CookieContainer ();
container.Add (new Cookie ("Country", "Belgium", "/path", "mono.com"));
container.Add (new Cookie ("Age", "26", "/path", "dev.mono.com"));
- cookies = container.GetCookies (new Uri ("http://dev.mono.com/path/ok"));
+ CookieCollection cookies = container.GetCookies (new Uri ("http://dev.mono.com/path/ok"));
Assert.IsNotNull (cookies, "#G1");
Assert.AreEqual (1, cookies.Count, "#G2");
- cookie = cookies [0];
+ Cookie cookie = cookies [0];
Assert.AreEqual ("Age", cookie.Name, "#H1");
Assert.AreEqual ("26", cookie.Value, "#H2");
Assert.AreEqual ("/path", cookie.Path, "#H3");
@@ -952,18 +1002,22 @@ namespace MonoTests.System.Net
cookies = container.GetCookies (new Uri ("http://us.dev.mono.com/path"));
Assert.IsNotNull (cookies, "#L1");
Assert.AreEqual (0, cookies.Count, "#L2");
+ }
- container = new CookieContainer ();
+ [Test]
+ public void GetCookies2b ()
+ {
+ CookieContainer container = new CookieContainer ();
container.SetCookies (new Uri ("http://dev.test.mono.com/Whatever/Do"),
"Country=Belgium; path=/Whatever; domain=mono.com," +
"Age=26; path=/Whatever; domain=test.mono.com," +
"Weight=87; path=/Whatever/Do; domain=.mono.com;");
- cookies = container.GetCookies (new Uri ("http://dev.mono.com/Whatever/Do"));
+ CookieCollection cookies = container.GetCookies (new Uri ("http://dev.mono.com/Whatever/Do"));
Assert.IsNotNull (cookies, "#M1");
Assert.AreEqual (2, cookies.Count, "#M2");
- cookie = cookies [0];
+ Cookie cookie = cookies [0];
Assert.AreEqual ("Weight", cookie.Name, "#N1");
Assert.AreEqual ("87", cookie.Value, "#N2");
Assert.AreEqual ("/Whatever/Do", cookie.Path, "#N3");
@@ -1012,8 +1066,12 @@ namespace MonoTests.System.Net
Assert.AreEqual ("Belgium", cookie.Value, "#S10");
Assert.AreEqual ("/Whatever", cookie.Path, "#S11");
Assert.AreEqual ("mono.com", cookie.Domain, "#S12");
+ }
- container = new CookieContainer ();
+ [Test]
+ public void GetCookies2c ()
+ {
+ CookieContainer container = new CookieContainer ();
container.Add (new Cookie ("Height", "178", "/Whatever", "mono.com"));
container.Add (new Cookie ("Town", "Brussels", "/Whatever", ".mono.com"));
container.Add (new Cookie ("Income", "34445", "/Whatever/", ".test.mono.com"));
@@ -1023,11 +1081,11 @@ namespace MonoTests.System.Net
"Age=26; path=/Whatever/Do; domain=test.mono.com," +
"Weight=87; path=/");
- cookies = container.GetCookies (new Uri ("http://us.test.mono.com/Whatever/Do/Ok"));
+ CookieCollection cookies = container.GetCookies (new Uri ("http://us.test.mono.com/Whatever/Do/Ok"));
Assert.IsNotNull (cookies, "#T1");
Assert.AreEqual (3, cookies.Count, "#T2");
- cookie = cookies [0];
+ Cookie cookie = cookies [0];
Assert.AreEqual ("Age", cookie.Name, "#U1");
Assert.AreEqual ("26", cookie.Value, "#U2");
Assert.AreEqual ("/Whatever/Do", cookie.Path, "#U3");
@@ -1051,7 +1109,8 @@ namespace MonoTests.System.Net
try {
cc.GetCookies (null);
Assert.Fail ("#1");
- } catch (ArgumentNullException ex) {
+ }
+ catch (ArgumentNullException ex) {
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
@@ -1060,28 +1119,23 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
public void SetCookies ()
{
- CookieContainer cc;
- CookieCollection cookies;
- Cookie cookie;
-
Uri uri = new Uri ("http://dev.test.mono.com/Whatever/Do/You");
DateTime now = DateTime.Now;
- cc = new CookieContainer ();
+ CookieContainer cc = new CookieContainer ();
cc.SetCookies (uri, "Country=Belgium," +
"Age=26; ; path=/Whatever/Do; domain=test.mono.com," +
"Weight=87; path=/; ");
Assert.AreEqual (3, cc.Count, "#A");
- cookies = cc.GetCookies (new Uri ("http://us.test.mono.com/Whatever/Do/Ok"));
+ CookieCollection cookies = cc.GetCookies (new Uri ("http://us.test.mono.com/Whatever/Do/Ok"));
Assert.IsNotNull (cookies, "#B1");
Assert.AreEqual (1, cookies.Count, "#B2");
- cookie = cookies [0];
+ Cookie cookie = cookies [0];
Assert.AreEqual (string.Empty, cookie.Comment, "#C:Comment");
Assert.IsNull (cookie.CommentUri, "#C:CommentUri");
Assert.IsFalse (cookie.Discard, "#C:Discard");
@@ -1103,99 +1157,119 @@ namespace MonoTests.System.Net
Assert.IsNotNull (cookies, "#D1");
Assert.AreEqual (2, cookies.Count, "#D2");
- cookie = cookies [0];
- Assert.AreEqual (string.Empty, cookie.Comment, "#E:Comment");
- Assert.IsNull (cookie.CommentUri, "#E:CommentUri");
- Assert.IsFalse (cookie.Discard, "#E:Discard");
- Assert.AreEqual ("dev.test.mono.com", cookie.Domain, "#E:Domain");
- Assert.IsFalse (cookie.Expired, "#E:Expired");
- Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#E:Expires");
+ // our sorting is not 100% identical to MS implementation
+ for (int i = 0; i < cookies.Count; i++) {
+ cookie = cookies [i];
+ switch (cookie.Name) {
+ case "Weight":
+ Assert.AreEqual (string.Empty, cookie.Comment, "#E:Comment");
+ Assert.IsNull (cookie.CommentUri, "#E:CommentUri");
+ Assert.IsFalse (cookie.Discard, "#E:Discard");
+ Assert.AreEqual ("dev.test.mono.com", cookie.Domain, "#E:Domain");
+ Assert.IsFalse (cookie.Expired, "#E:Expired");
+ Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#E:Expires");
#if NET_2_0
- Assert.IsFalse (cookie.HttpOnly, "#E:HttpOnly");
+ Assert.IsFalse (cookie.HttpOnly, "#E:HttpOnly");
#endif
- Assert.AreEqual ("Weight", cookie.Name, "#E:Name");
- Assert.AreEqual ("/", cookie.Path, "#E:Path");
- Assert.IsFalse (cookie.Secure, "#E:Secure");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#E:TimeStamp1");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#E:TimeStamp2");
- Assert.AreEqual ("87", cookie.Value, "#E:Value");
- Assert.AreEqual (0, cookie.Version, "#E:Version");
-
- cookie = cookies [1];
- Assert.AreEqual (string.Empty, cookie.Comment, "#F:Comment");
- Assert.IsNull (cookie.CommentUri, "#F:CommentUri");
- Assert.IsFalse (cookie.Discard, "#F:Discard");
- Assert.AreEqual ("test.mono.com", cookie.Domain, "#F:Domain");
- Assert.IsFalse (cookie.Expired, "#F:Expired");
- Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#F:Expires");
+ Assert.AreEqual ("Weight", cookie.Name, "#E:Name");
+ Assert.AreEqual ("/", cookie.Path, "#E:Path");
+ Assert.IsFalse (cookie.Secure, "#E:Secure");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#E:TimeStamp1");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#E:TimeStamp2");
+ Assert.AreEqual ("87", cookie.Value, "#E:Value");
+ Assert.AreEqual (0, cookie.Version, "#E:Version");
+ break;
+ case "Age":
+ Assert.AreEqual (string.Empty, cookie.Comment, "#F:Comment");
+ Assert.IsNull (cookie.CommentUri, "#F:CommentUri");
+ Assert.IsFalse (cookie.Discard, "#F:Discard");
+ Assert.AreEqual ("test.mono.com", cookie.Domain, "#F:Domain");
+ Assert.IsFalse (cookie.Expired, "#F:Expired");
+ Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#F:Expires");
#if NET_2_0
- Assert.IsFalse (cookie.HttpOnly, "#F:HttpOnly");
+ Assert.IsFalse (cookie.HttpOnly, "#F:HttpOnly");
#endif
- Assert.AreEqual ("Age", cookie.Name, "#F:Name");
- Assert.AreEqual ("/Whatever/Do", cookie.Path, "#F:Path");
- Assert.IsFalse (cookie.Secure, "#F:Secure");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#F:TimeStamp1");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#F:TimeStamp2");
- Assert.AreEqual ("26", cookie.Value, "#F:Value");
- Assert.AreEqual (0, cookie.Version, "#F:Version");
+ Assert.AreEqual ("Age", cookie.Name, "#F:Name");
+ Assert.AreEqual ("/Whatever/Do", cookie.Path, "#F:Path");
+ Assert.IsFalse (cookie.Secure, "#F:Secure");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#F:TimeStamp1");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#F:TimeStamp2");
+ Assert.AreEqual ("26", cookie.Value, "#F:Value");
+ Assert.AreEqual (0, cookie.Version, "#F:Version");
+ break;
+ default:
+ Assert.Fail (cookie.Name);
+ break;
+ }
+ }
cookies = cc.GetCookies (uri);
Assert.IsNotNull (cookies, "#G1");
Assert.AreEqual (3, cookies.Count, "#G2");
- cookie = cookies [0];
- Assert.AreEqual (string.Empty, cookie.Comment, "#H:Comment");
- Assert.IsNull (cookie.CommentUri, "#H:CommentUri");
- Assert.IsFalse (cookie.Discard, "#H:Discard");
- Assert.AreEqual ("dev.test.mono.com", cookie.Domain, "#H:Domain");
- Assert.IsFalse (cookie.Expired, "#H:Expired");
- Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#H:Expires");
+ // our sorting is not 100% identical to MS implementation
+ for (int i = 0; i < cookies.Count; i++) {
+ cookie = cookies [i];
+ switch (cookie.Name) {
+ case "Country":
+ Assert.AreEqual (string.Empty, cookie.Comment, "#H:Comment");
+ Assert.IsNull (cookie.CommentUri, "#H:CommentUri");
+ Assert.IsFalse (cookie.Discard, "#H:Discard");
+ Assert.AreEqual ("dev.test.mono.com", cookie.Domain, "#H:Domain");
+ Assert.IsFalse (cookie.Expired, "#H:Expired");
+ Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#H:Expires");
#if NET_2_0
- Assert.IsFalse (cookie.HttpOnly, "#H:HttpOnly");
+ Assert.IsFalse (cookie.HttpOnly, "#H:HttpOnly");
#endif
- Assert.AreEqual ("Country", cookie.Name, "#H:Name");
- Assert.AreEqual ("/Whatever/Do/You", cookie.Path, "#H:Path");
- Assert.IsFalse (cookie.Secure, "#H:Secure");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#H:TimeStamp1");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#H:TimeStamp2");
- Assert.AreEqual ("Belgium", cookie.Value, "#H:Value");
- Assert.AreEqual (0, cookie.Version, "#H:Version");
-
- cookie = cookies [1];
- Assert.AreEqual (string.Empty, cookie.Comment, "#I:Comment");
- Assert.IsNull (cookie.CommentUri, "#I:CommentUri");
- Assert.IsFalse (cookie.Discard, "#I:Discard");
- Assert.AreEqual ("dev.test.mono.com", cookie.Domain, "#I:Domain");
- Assert.IsFalse (cookie.Expired, "#I:Expired");
- Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#I:Expires");
+ Assert.AreEqual ("Country", cookie.Name, "#H:Name");
+ Assert.AreEqual ("/Whatever/Do/You", cookie.Path, "#H:Path");
+ Assert.IsFalse (cookie.Secure, "#H:Secure");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#H:TimeStamp1");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#H:TimeStamp2");
+ Assert.AreEqual ("Belgium", cookie.Value, "#H:Value");
+ Assert.AreEqual (0, cookie.Version, "#H:Version");
+ break;
+ case "Weight":
+ Assert.AreEqual (string.Empty, cookie.Comment, "#I:Comment");
+ Assert.IsNull (cookie.CommentUri, "#I:CommentUri");
+ Assert.IsFalse (cookie.Discard, "#I:Discard");
+ Assert.AreEqual ("dev.test.mono.com", cookie.Domain, "#I:Domain");
+ Assert.IsFalse (cookie.Expired, "#I:Expired");
+ Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#I:Expires");
#if NET_2_0
- Assert.IsFalse (cookie.HttpOnly, "#I:HttpOnly");
+ Assert.IsFalse (cookie.HttpOnly, "#I:HttpOnly");
#endif
- Assert.AreEqual ("Weight", cookie.Name, "#I:Name");
- Assert.AreEqual ("/", cookie.Path, "#I:Path");
- Assert.IsFalse (cookie.Secure, "#I:Secure");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#I:TimeStamp1");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#I:TimeStamp2");
- Assert.AreEqual ("87", cookie.Value, "#I:Value");
- Assert.AreEqual (0, cookie.Version, "#I:Version");
-
- cookie = cookies [2];
- Assert.AreEqual (string.Empty, cookie.Comment, "#J:Comment");
- Assert.IsNull (cookie.CommentUri, "#J:CommentUri");
- Assert.IsFalse (cookie.Discard, "#J:Discard");
- Assert.AreEqual ("test.mono.com", cookie.Domain, "#J:Domain");
- Assert.IsFalse (cookie.Expired, "#J:Expired");
- Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#J:Expires");
+ Assert.AreEqual ("Weight", cookie.Name, "#I:Name");
+ Assert.AreEqual ("/", cookie.Path, "#I:Path");
+ Assert.IsFalse (cookie.Secure, "#I:Secure");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#I:TimeStamp1");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#I:TimeStamp2");
+ Assert.AreEqual ("87", cookie.Value, "#I:Value");
+ Assert.AreEqual (0, cookie.Version, "#I:Version");
+ break;
+ case "Age":
+ Assert.AreEqual (string.Empty, cookie.Comment, "#J:Comment");
+ Assert.IsNull (cookie.CommentUri, "#J:CommentUri");
+ Assert.IsFalse (cookie.Discard, "#J:Discard");
+ Assert.AreEqual ("test.mono.com", cookie.Domain, "#J:Domain");
+ Assert.IsFalse (cookie.Expired, "#J:Expired");
+ Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#J:Expires");
#if NET_2_0
- Assert.IsFalse (cookie.HttpOnly, "#J:HttpOnly");
+ Assert.IsFalse (cookie.HttpOnly, "#J:HttpOnly");
#endif
- Assert.AreEqual ("Age", cookie.Name, "#J:Name");
- Assert.AreEqual ("/Whatever/Do", cookie.Path, "#J:Path");
- Assert.IsFalse (cookie.Secure, "#J:Secure");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#J:TimeStamp1");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#J:TimeStamp2");
- Assert.AreEqual ("26", cookie.Value, "#J:Value");
- Assert.AreEqual (0, cookie.Version, "#J:Version");
+ Assert.AreEqual ("Age", cookie.Name, "#J:Name");
+ Assert.AreEqual ("/Whatever/Do", cookie.Path, "#J:Path");
+ Assert.IsFalse (cookie.Secure, "#J:Secure");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#J:TimeStamp1");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#J:TimeStamp2");
+ Assert.AreEqual ("26", cookie.Value, "#J:Value");
+ Assert.AreEqual (0, cookie.Version, "#J:Version");
+ break;
+ default:
+ Assert.Fail (cookie.Name);
+ break;
+ }
+ }
cc.SetCookies (uri, "Country=,A");
cookies = cc.GetCookies (uri);
@@ -1208,41 +1282,51 @@ namespace MonoTests.System.Net
Assert.IsNotNull (cookies, "#L1");
Assert.AreEqual (2, cookies.Count, "#L2");
- cookie = cookies [0];
- Assert.AreEqual (string.Empty, cookie.Comment, "#M:Comment");
- Assert.IsNull (cookie.CommentUri, "#M:CommentUri");
- Assert.IsFalse (cookie.Discard, "#M:Discard");
- Assert.AreEqual ("dev.test.mono.com", cookie.Domain, "#M:Domain");
- Assert.IsFalse (cookie.Expired, "#M:Expired");
- Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#M:Expires");
+ // our sorting is not 100% identical to MS implementation
+ for (int i = 0; i < cookies.Count; i++) {
+ cookie = cookies [i];
+ switch (cookie.Name) {
+ case "Country":
+ Assert.AreEqual (string.Empty, cookie.Comment, "#M:Comment");
+ Assert.IsNull (cookie.CommentUri, "#M:CommentUri");
+ Assert.IsFalse (cookie.Discard, "#M:Discard");
+ Assert.AreEqual ("dev.test.mono.com", cookie.Domain, "#M:Domain");
+ Assert.IsFalse (cookie.Expired, "#M:Expired");
+ Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#M:Expires");
#if NET_2_0
- Assert.IsFalse (cookie.HttpOnly, "#M:HttpOnly");
+ Assert.IsFalse (cookie.HttpOnly, "#M:HttpOnly");
#endif
- Assert.AreEqual ("Country", cookie.Name, "#M:Name");
- Assert.AreEqual ("/Whatever/Do/You", cookie.Path, "#M:Path");
- Assert.IsFalse (cookie.Secure, "#M:Secure");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#M:TimeStamp1");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#M:TimeStamp2");
- Assert.AreEqual (string.Empty, cookie.Value, "#M:Value");
- Assert.AreEqual (0, cookie.Version, "#M:Version");
-
- cookie = cookies [1];
- Assert.AreEqual (string.Empty, cookie.Comment, "#N:Comment");
- Assert.IsNull (cookie.CommentUri, "#N:CommentUri");
- Assert.IsFalse (cookie.Discard, "#N:Discard");
- Assert.AreEqual ("dev.test.mono.com", cookie.Domain, "#N:Domain");
- Assert.IsFalse (cookie.Expired, "#N:Expired");
- Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#N:Expires");
+ Assert.AreEqual ("Country", cookie.Name, "#M:Name");
+ Assert.AreEqual ("/Whatever/Do/You", cookie.Path, "#M:Path");
+ Assert.IsFalse (cookie.Secure, "#M:Secure");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#M:TimeStamp1");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#M:TimeStamp2");
+ Assert.AreEqual (string.Empty, cookie.Value, "#M:Value");
+ Assert.AreEqual (0, cookie.Version, "#M:Version");
+ break;
+ case "A":
+ Assert.AreEqual (string.Empty, cookie.Comment, "#N:Comment");
+ Assert.IsNull (cookie.CommentUri, "#N:CommentUri");
+ Assert.IsFalse (cookie.Discard, "#N:Discard");
+ Assert.AreEqual ("dev.test.mono.com", cookie.Domain, "#N:Domain");
+ Assert.IsFalse (cookie.Expired, "#N:Expired");
+ Assert.AreEqual (DateTime.MinValue, cookie.Expires, "#N:Expires");
#if NET_2_0
- Assert.IsFalse (cookie.HttpOnly, "#N:HttpOnly");
+ Assert.IsFalse (cookie.HttpOnly, "#N:HttpOnly");
#endif
- Assert.AreEqual ("A", cookie.Name, "#N:Name");
- Assert.AreEqual ("/Whatever/Do/You", cookie.Path, "#N:Path");
- Assert.IsFalse (cookie.Secure, "#N:Secure");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#N:TimeStamp1");
- Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#N:TimeStamp2");
- Assert.AreEqual (string.Empty, cookie.Value, "#N:Value");
- Assert.AreEqual (0, cookie.Version, "#N:Version");
+ Assert.AreEqual ("A", cookie.Name, "#N:Name");
+ Assert.AreEqual ("/Whatever/Do/You", cookie.Path, "#N:Path");
+ Assert.IsFalse (cookie.Secure, "#N:Secure");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds >= 0, "#N:TimeStamp1");
+ Assert.IsTrue ((cookie.TimeStamp - now).TotalMilliseconds < 1000, "#N:TimeStamp2");
+ Assert.AreEqual (string.Empty, cookie.Value, "#N:Value");
+ Assert.AreEqual (0, cookie.Version, "#N:Version");
+ break;
+ default:
+ Assert.Fail (cookie.Name);
+ break;
+ }
+ }
}
[Test]
@@ -1260,7 +1344,8 @@ namespace MonoTests.System.Net
try {
cc.SetCookies (new Uri ("http://www.contoso.com"), null);
Assert.Fail ("#1");
- } catch (ArgumentNullException ex) {
+ }
+ catch (ArgumentNullException ex) {
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
@@ -1269,17 +1354,15 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
- public void SetCookies_CookieHeader_Invalid ()
+ public void SetCookies_CookieHeader_Invalid_1 ()
{
- CookieContainer cc;
-
// cookie format error
- cc = new CookieContainer ();
+ CookieContainer cc = new CookieContainer ();
try {
cc.SetCookies (new Uri ("http://www.contoso.com"), "=lalala");
Assert.Fail ("#A1");
- } catch (CookieException ex) {
+ }
+ catch (CookieException ex) {
// An error has occurred when parsing Cookie
// header for Uri 'http://www.contoso.com/'
Assert.AreEqual (typeof (CookieException), ex.GetType (), "#A2");
@@ -1293,14 +1376,19 @@ namespace MonoTests.System.Net
Assert.IsNull (inner.InnerException, "#A7");
Assert.IsNotNull (inner.Message, "#A8");
}
+ }
+ [Test]
+ public void SetCookies_CookieHeader_Invalid_2 ()
+ {
// cookie path not part of URI path
- cc = new CookieContainer ();
+ CookieContainer cc = new CookieContainer ();
try {
cc.SetCookies (new Uri ("http://dev.test.mono.com/Whatever"),
"Age=26; path=/Whatever/Do; domain=test.mono.com");
Assert.Fail ("#B1");
- } catch (CookieException ex) {
+ }
+ catch (CookieException ex) {
// An error has occurred when parsing Cookie
// header for Uri 'http://dev.test.mono.com/Whatever'
Assert.AreEqual (typeof (CookieException), ex.GetType (), "#B2");
@@ -1325,7 +1413,8 @@ namespace MonoTests.System.Net
try {
cc.SetCookies (null, "Age=26; path=/Whatever; domain=test.mono.com");
Assert.Fail ("#1");
- } catch (ArgumentNullException ex) {
+ }
+ catch (ArgumentNullException ex) {
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
@@ -1334,12 +1423,14 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
+#if !NET_2_0
+ [Category ("NotWorking")] // old 1.x behavior is not implemented
+#endif
public void SetCookies_DomainMatchesHost ()
{
CookieContainer cc = new CookieContainer ();
-
#if NET_2_0
+ // domains looks identical - but "domain=test.mono.com" means "*.test.mono.com"
cc.SetCookies (new Uri ("http://test.mono.com/Whatever/Do"),
"Age=26; path=/Whatever; domain=test.mono.com");
CookieCollection cookies = cc.GetCookies (new Uri ("http://test.mono.com/Whatever/Do"));
@@ -1373,7 +1464,6 @@ namespace MonoTests.System.Net
}
[Test]
- [Category ("NotWorking")]
public void SetCookies_Domain_Local ()
{
CookieContainer cc;
@@ -1384,39 +1474,39 @@ namespace MonoTests.System.Net
"Age=26; path=/Whatever; domain=.local");
cookies = cc.GetCookies (new Uri ("http://localhost/Whatever/Do"));
Assert.IsNotNull (cookies, "#A1");
- Assert.AreEqual (1, cookies.Count, "#A2");
+ Assert.AreEqual (0, cookies.Count, "#A2");
cookies = cc.GetCookies (new Uri ("http://127.0.0.1/Whatever/Do"));
Assert.IsNotNull (cookies, "#A3");
Assert.AreEqual (0, cookies.Count, "#A4");
cookies = cc.GetCookies (new Uri ("http://" + Dns.GetHostName () + "/Whatever/Do"));
Assert.IsNotNull (cookies, "#A5");
- Assert.AreEqual (1, cookies.Count, "#A6");
+ Assert.AreEqual (0, cookies.Count, "#A6");
cc = new CookieContainer ();
cc.SetCookies (new Uri ("http://127.0.0.1/Whatever/Do"),
"Age=26; path=/Whatever; domain=.local");
cookies = cc.GetCookies (new Uri ("http://localhost/Whatever/Do"));
Assert.IsNotNull (cookies, "#B1");
- Assert.AreEqual (1, cookies.Count, "#B2");
+ Assert.AreEqual (0, cookies.Count, "#B2");
cookies = cc.GetCookies (new Uri ("http://127.0.0.1/Whatever/Do"));
Assert.IsNotNull (cookies, "#B3");
Assert.AreEqual (0, cookies.Count, "#B4");
cookies = cc.GetCookies (new Uri ("http://" + Dns.GetHostName () + "/Whatever/Do"));
Assert.IsNotNull (cookies, "#B5");
- Assert.AreEqual (1, cookies.Count, "#B6");
+ Assert.AreEqual (0, cookies.Count, "#B6");
cc = new CookieContainer ();
cc.SetCookies (new Uri ("http://" + Dns.GetHostName () + "/Whatever/Do"),
"Age=26; path=/Whatever; domain=.local");
cookies = cc.GetCookies (new Uri ("http://localhost/Whatever/Do"));
Assert.IsNotNull (cookies, "#C1");
- Assert.AreEqual (1, cookies.Count, "#C2");
+ Assert.AreEqual (0, cookies.Count, "#C2");
cookies = cc.GetCookies (new Uri ("http://127.0.0.1/Whatever/Do"));
Assert.IsNotNull (cookies, "#C3");
Assert.AreEqual (0, cookies.Count, "#C4");
cookies = cc.GetCookies (new Uri ("http://" + Dns.GetHostName () + "/Whatever/Do"));
Assert.IsNotNull (cookies, "#C5");
- Assert.AreEqual (1, cookies.Count, "#C6");
+ Assert.AreEqual (0, cookies.Count, "#C6");
}
[Test]
@@ -1452,5 +1542,114 @@ namespace MonoTests.System.Net
Assert.AreEqual (0, cookies.Count, "#C");
}
+
+ [Test]
+ public void MoreThanDefaultDomainCookieLimit ()
+ {
+ CookieContainer cc = new CookieContainer ();
+ for (int i = 1; i <= CookieContainer.DefaultPerDomainCookieLimit; i++) {
+ Cookie c = new Cookie (i.ToString (), i.ToString (), "/", "mono.com");
+ cc.Add (c);
+ }
+ Assert.AreEqual (CookieContainer.DefaultPerDomainCookieLimit, cc.Count, "Count");
+ Cookie c2 = new Cookie ("uho", "21", "/", "mono.com");
+ cc.Add (c2);
+ Assert.AreEqual (CookieContainer.DefaultPerDomainCookieLimit, cc.Count, "Count");
+ // so one (yes '1' ;-) was removed
+ }
+
+ [Test]
+ public void MoreThanDefaultCookieLimit ()
+ {
+ CookieContainer cc = new CookieContainer ();
+ for (int i = 1; i <= CookieContainer.DefaultCookieLimit; i++) {
+ Cookie c = new Cookie (i.ToString (), i.ToString (), "/", "www" + i.ToString () + ".mono.com");
+ cc.Add (c);
+ }
+ Assert.AreEqual (CookieContainer.DefaultCookieLimit, cc.Count, "Count");
+ Cookie c2 = new Cookie ("uho", "301", "/", "www301.mono.com");
+ cc.Add (c2);
+ Assert.AreEqual (CookieContainer.DefaultCookieLimit, cc.Count, "Count");
+ // so one (yes '1' ;-) was removed
+ }
+
+ [Test]
+ public void SaveAndLoadViaAddUriCookie ()
+ {
+ Cookie cookie = new Cookie ("name", "value")
+ {
+ Domain = ".example.com",
+#if NET_2_0
+ Expires = new DateTime (2015, 1, 1, 0, 0, 0, DateTimeKind.Utc),
+ HttpOnly = true,
+#else
+ Expires = new DateTime (2015, 1, 1, 0, 0, 0).ToUniversalTime (),
+#endif
+ Secure = true,
+ };
+
+ Uri uri = new Uri ("https://www.example.com/path/file");
+ CookieContainer container = new CookieContainer ();
+ container.Add (uri, cookie);
+ CookieCollection collection = container.GetCookies (uri);
+ Assert.AreEqual (collection.Count, 1, "#A1");
+ Cookie cloned = collection [0];
+
+ Assert.AreEqual (cookie.Comment, cloned.Comment, "#A2");
+ Assert.AreEqual (cookie.CommentUri, cloned.CommentUri, "#A3");
+ Assert.AreEqual (cookie.Domain, cloned.Domain, "#A4");
+ Assert.AreEqual (cookie.Discard, cloned.Discard, "#A5");
+ Assert.AreEqual (cookie.Expired, cloned.Expired, "#A6");
+ Assert.AreEqual (cookie.Expires.ToUniversalTime (), cloned.Expires.ToUniversalTime (), "#A7");
+#if NET_2_0
+ Assert.AreEqual (cookie.HttpOnly, cloned.HttpOnly, "#A8");
+#endif
+ Assert.AreEqual (cookie.Name, cloned.Name, "#A9");
+ Assert.AreEqual (cookie.Path, cloned.Path, "#A10");
+ Assert.AreEqual (cookie.Port, cloned.Port, "#A11");
+ Assert.AreEqual (cookie.Value, cloned.Value, "#A12");
+ Assert.AreEqual (cookie.Version, cloned.Version, "#A13");
+ Assert.AreEqual (cookie.Secure, cloned.Secure, "#A14");
+ }
+
+ [Test]
+ public void SaveAndLoadViaSetCookies ()
+ {
+ Cookie cookie = new Cookie ("name", "value")
+ {
+ Domain = ".example.com",
+#if NET_2_0
+ Expires = new DateTime (2015, 1, 1, 0, 0, 0, DateTimeKind.Utc),
+ HttpOnly = true,
+#else
+ Expires = new DateTime (2015, 1, 1, 0, 0, 0).ToUniversalTime (),
+#endif
+ Secure = true,
+ };
+
+ Uri uri = new Uri ("https://www.example.com/path/file");
+ CookieContainer container = new CookieContainer ();
+ container.SetCookies (uri, "name=value; domain=.example.com; expires=Thu, 01-Jan-2015 00:00:00 GMT; HttpOnly; secure");
+ CookieCollection collection = container.GetCookies (uri);
+ Assert.AreEqual (collection.Count, 1, "#A1");
+ Cookie cloned = collection [0];
+
+ Assert.AreEqual (cookie.Comment, cloned.Comment, "#A2");
+ Assert.AreEqual (cookie.CommentUri, cloned.CommentUri, "#A3");
+ Assert.AreEqual (cookie.Domain, cloned.Domain, "#A4");
+ Assert.AreEqual (cookie.Discard, cloned.Discard, "#A5");
+ Assert.AreEqual (cookie.Expired, cloned.Expired, "#A6");
+ Assert.AreEqual (cookie.Expires.ToUniversalTime (), cloned.Expires.ToUniversalTime (), "#A7");
+#if NET_2_0
+ Assert.AreEqual (cookie.HttpOnly, cloned.HttpOnly, "#A8");
+#endif
+ Assert.AreEqual (cookie.Name, cloned.Name, "#A9");
+ Assert.AreEqual (cookie.Path, "", "#A10");
+ Assert.AreEqual (cloned.Path, "/path/file", "#A11");
+ Assert.AreEqual (cookie.Port, cloned.Port, "#A12");
+ Assert.AreEqual (cookie.Value, cloned.Value, "#A13");
+ Assert.AreEqual (cookie.Version, cloned.Version, "#A14");
+ Assert.AreEqual (cookie.Secure, cloned.Secure, "#A15");
+ }
}
}
diff --git a/mcs/class/System/Test/System.Net/NetworkCredentialTest.cs b/mcs/class/System/Test/System.Net/NetworkCredentialTest.cs
new file mode 100644
index 00000000000..8d0253bd9cd
--- /dev/null
+++ b/mcs/class/System/Test/System.Net/NetworkCredentialTest.cs
@@ -0,0 +1,104 @@
+//
+// Unit tests for System.Net.NetworkCredential
+//
+// Contact:
+// Moonlight List (moonlight-list@lists.ximian.com)
+//
+// Copyright (C) 2010 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.Net;
+
+using NUnit.Framework;
+
+namespace MoonTest.System.Net {
+
+ [TestFixture]
+ public class NetworkCredentialTest {
+
+ void CheckDefaults (NetworkCredential nc)
+ {
+ Assert.AreSame (String.Empty, nc.Domain, "Domain");
+ Assert.AreSame (String.Empty, nc.Password, "Password");
+ Assert.AreSame (String.Empty, nc.UserName, "UserName");
+ Assert.AreSame (nc, nc.GetCredential (null, null), "GetCredential");
+ }
+
+ void CheckCustom (NetworkCredential nc)
+ {
+ Assert.AreEqual ("dom", nc.Domain, "Domain");
+ Assert.AreEqual ("********", nc.Password, "Password");
+ Assert.AreEqual ("user", nc.UserName, "UserName");
+ Assert.AreSame (nc, nc.GetCredential (new Uri ("http://www.mono-project.com"), "basic"), "GetCredential");
+ }
+
+ [Test]
+ public void Constructor_0 ()
+ {
+ NetworkCredential nc = new NetworkCredential ();
+ CheckDefaults (nc);
+
+ nc.UserName = null;
+ nc.Domain = null;
+ nc.Password = null;
+ CheckDefaults (nc);
+
+ nc.UserName = "user";
+ nc.Domain = "dom";
+ nc.Password = "********";
+ CheckCustom (nc);
+ }
+
+ [Test]
+ public void Constructor_2 ()
+ {
+ NetworkCredential nc = new NetworkCredential (null, null);
+ CheckDefaults (nc);
+
+ nc.UserName = String.Empty;
+ nc.Domain = String.Empty;
+ nc.Password = null;
+ CheckDefaults (nc);
+
+ nc = new NetworkCredential ("user", "********");
+ nc.Domain = "dom";
+ CheckCustom (nc);
+ }
+
+ [Test]
+ public void Constructor_3 ()
+ {
+ NetworkCredential nc = new NetworkCredential (null, null, null);
+ CheckDefaults (nc);
+
+ nc.UserName = String.Empty;
+ nc.Domain = null;
+ nc.Password = String.Empty;
+ CheckDefaults (nc);
+
+ nc = new NetworkCredential ("user", "********", "dom");
+ CheckCustom (nc);
+ }
+ }
+}
+
diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog
index a0a178ebfa4..1012391de76 100644
--- a/mcs/class/corlib/System.IO/ChangeLog
+++ b/mcs/class/corlib/System.IO/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-14 Rolf Bjarne Kvinge <RKvinge@novell.com>
+
+ * UnmanagedMemoryStream.cs: Read: don't read bytes one-by-one, read all
+ at once.
+
+2009-12-21 Sebastien Pouliot <sebastien@ximian.com>
+
+ * File.cs (ReadAllBytes): We cannot assume that a single call to
+ Read will return all the data we require.
+ [Backport r148822]
+
2009-10-29 Sebastien Pouliot <sebastien@ximian.com>
* FileStream.cs: Reduce code duplication by merging FillBuffer
diff --git a/mcs/class/corlib/System.IO/File.cs b/mcs/class/corlib/System.IO/File.cs
index 17d5c91b2ef..f524a5035a8 100644
--- a/mcs/class/corlib/System.IO/File.cs
+++ b/mcs/class/corlib/System.IO/File.cs
@@ -535,19 +535,22 @@ namespace System.IO
//
public static byte [] ReadAllBytes (string path)
{
- using (FileStream s = Open (path, FileMode.Open, FileAccess.Read, FileShare.Read)){
+ using (FileStream s = OpenRead (path)) {
long size = s.Length;
-
- //
- // Is this worth supporting?
- //
+ // limited to 2GB according to http://msdn.microsoft.com/en-us/library/system.io.file.readallbytes.aspx
if (size > Int32.MaxValue)
- throw new ArgumentException ("Reading more than 4gigs with this call is not supported");
-
- byte [] result = new byte [s.Length];
-
- s.Read (result, 0, (int) size);
-
+ throw new IOException ("Reading more than 2GB with this call is not supported");
+
+ int pos = 0;
+ int count = (int) size;
+ byte [] result = new byte [size];
+ while (count > 0) {
+ int n = s.Read (result, pos, count);
+ if (n == 0)
+ throw new IOException ("Unexpected end of stream");
+ pos += n;
+ count -= n;
+ }
return result;
}
}
diff --git a/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs b/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
index 58540024016..478e3a7815b 100644
--- a/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
+++ b/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
@@ -167,8 +167,8 @@ namespace System.IO
return (0);
else {
int progress = current_position + count < length ? count : (int) (length - current_position);
- for (int i = 0; i < progress; i++)
- buffer [offset + i] = Marshal.ReadByte (initial_pointer, (int) current_position++);
+ Marshal.Copy (new IntPtr (initial_pointer.ToInt64 () + current_position), buffer, offset, progress);
+ current_position += progress;
return progress;
}
}
diff --git a/mcs/class/corlib/System.Reflection/ChangeLog b/mcs/class/corlib/System.Reflection/ChangeLog
index 7814b71b956..63ed3ad25d9 100644
--- a/mcs/class/corlib/System.Reflection/ChangeLog
+++ b/mcs/class/corlib/System.Reflection/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-05 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * ParameterInfo.cs (DefaultProperty): Fix small typo.
+
+2010-01-05 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * ParameterInfoTest.cs: Add a test for default values from custom
+ attributes.
+
+ Backport of r149083.
+
2009-11-03 Marek Habersack <mhabersack@novell.com>
* Assembly.cs: GetSatelliteAssembly must catch
diff --git a/mcs/class/corlib/System.Reflection/ParameterInfo.cs b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
index f3b3557fb30..583a386132e 100644
--- a/mcs/class/corlib/System.Reflection/ParameterInfo.cs
+++ b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
@@ -105,7 +105,12 @@ namespace System.Reflection
DecimalConstantAttribute[] attrs = (DecimalConstantAttribute[])GetCustomAttributes (typeof (DecimalConstantAttribute), false);
if (attrs.Length > 0)
return attrs [0].Value;
- }
+ } else if (ClassImpl == typeof (DateTime)) {
+ /* default values for DateTime are encoded using a custom attribute */
+ DateTimeConstantAttribute[] attrs = (DateTimeConstantAttribute[])GetCustomAttributes (typeof (DateTimeConstantAttribute), false);
+ if (attrs.Length > 0)
+ return new DateTime (attrs [0].Ticks);
+ }
return DefaultValueImpl;
}
}
@@ -245,10 +250,10 @@ namespace System.Reflection
return types;
}
- [MonoTODO]
public virtual object RawDefaultValue {
get {
- throw new NotImplementedException ();
+ /*FIXME right now DefaultValue doesn't throw for reflection-only assemblies. Change this once the former is fixed.*/
+ return DefaultValue;
}
}
#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/ChangeLog b/mcs/class/corlib/System.Runtime.CompilerServices/ChangeLog
index 3d39838efc9..8ba68d10c36 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/ChangeLog
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-05 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * DateTimeConstantAttribute.cs: Add internal Ticks property.
+
+ Backport of r149083.
+
2009-10-15 Sebastien Pouliot <sebastien@ximian.com>
* RuntimeHelpers.cs: Add missing validations
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/DateTimeConstantAttribute.cs b/mcs/class/corlib/System.Runtime.CompilerServices/DateTimeConstantAttribute.cs
index f8537b8a60e..c3243ec6622 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/DateTimeConstantAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/DateTimeConstantAttribute.cs
@@ -48,6 +48,10 @@ namespace System.Runtime.CompilerServices {
this.ticks = ticks;
}
+ internal long Ticks {
+ get { return ticks; }
+ }
+
public override object Value {
get { return ticks; }
}
diff --git a/mcs/class/corlib/System.Security.Cryptography/ChangeLog b/mcs/class/corlib/System.Security.Cryptography/ChangeLog
index 649948596c0..17e8e55f03a 100644
--- a/mcs/class/corlib/System.Security.Cryptography/ChangeLog
+++ b/mcs/class/corlib/System.Security.Cryptography/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * ToBase64Transform.cs: Static-ify some methods to make it easier
+ to use from System.Convert
+ [Backport r149171]
+
2009-12-01 Sebastien Pouliot <sebastien@ximian.com>
* CryptoConfig_2_1.cs: Add mapping for SHA256 since it's used
diff --git a/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs b/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs
index 382db461c55..a0712ea27c9 100644
--- a/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs
@@ -37,6 +37,8 @@ namespace System.Security.Cryptography {
#endif
public class ToBase64Transform : ICryptoTransform {
+ private const int inputBlockSize = 3;
+ private const int outputBlockSize = 4;
private bool m_disposed;
public ToBase64Transform ()
@@ -57,11 +59,11 @@ namespace System.Security.Cryptography {
}
public int InputBlockSize {
- get { return 3; }
+ get { return inputBlockSize; }
}
public int OutputBlockSize {
- get { return 4; }
+ get { return outputBlockSize; }
}
public void Clear()
@@ -120,6 +122,12 @@ namespace System.Security.Cryptography {
// if (inputCount != this.InputBlockSize)
// throw new CryptographicException (Locale.GetText ("Invalid input length"));
+ InternalTransformBlock (inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset);
+ return this.OutputBlockSize;
+ }
+
+ internal static void InternalTransformBlock (byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
+ {
byte[] lookup = Base64Constants.EncodeTable;
int b1 = inputBuffer [inputOffset];
@@ -130,8 +138,6 @@ namespace System.Security.Cryptography {
outputBuffer [outputOffset+1] = lookup [((b1 << 4) & 0x30) | (b2 >> 4)];
outputBuffer [outputOffset+2] = lookup [((b2 << 2) & 0x3c) | (b3 >> 6)];
outputBuffer [outputOffset+3] = lookup [b3 & 0x3f];
-
- return this.OutputBlockSize;
}
public byte[] TransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount)
@@ -151,10 +157,10 @@ namespace System.Security.Cryptography {
}
// Mono System.Convert depends on the ability to process multiple blocks
- internal byte[] InternalTransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount)
+ internal static byte[] InternalTransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount)
{
- int blockLen = this.InputBlockSize;
- int outLen = this.OutputBlockSize;
+ int blockLen = inputBlockSize;
+ int outLen = outputBlockSize;
int fullBlocks = inputCount / blockLen;
int tail = inputCount % blockLen;
@@ -165,10 +171,7 @@ namespace System.Security.Cryptography {
int outputOffset = 0;
for (int i = 0; i < fullBlocks; i++) {
-
- TransformBlock (inputBuffer, inputOffset,
- blockLen, res, outputOffset);
-
+ InternalTransformBlock (inputBuffer, inputOffset, blockLen, res, outputOffset);
inputOffset += blockLen;
outputOffset += outLen;
}
diff --git a/mcs/class/corlib/System.Threading/ChangeLog b/mcs/class/corlib/System.Threading/ChangeLog
index 96e6b5161b6..13a3ea389ce 100644
--- a/mcs/class/corlib/System.Threading/ChangeLog
+++ b/mcs/class/corlib/System.Threading/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-02 JƩrƩmie Laval <jeremie.laval@gmail.com>
+
+ * Parallel.cs: Added fix for Bug #536919.
+
2009-12-09 Jb Evain <jbevain@novell.com>
* ThreadPool.cs (QueueUserWorkItem): properly throw
diff --git a/mcs/class/corlib/System.Threading/Parallel.cs b/mcs/class/corlib/System.Threading/Parallel.cs
index 5aa9a30db3e..339beed66ff 100644
--- a/mcs/class/corlib/System.Threading/Parallel.cs
+++ b/mcs/class/corlib/System.Threading/Parallel.cs
@@ -120,6 +120,8 @@ namespace System.Threading
options != null && options.MaxDegreeOfParallelism != -1 ? options.MaxDegreeOfParallelism : int.MaxValue);
// Integer range that each task process
int step = Math.Min (5, (to - from) / num);
+ if (step <= 0)
+ step = 1;
// Each worker put the indexes it's responsible for here
// so that other worker may steal if they starve.
diff --git a/mcs/class/corlib/System/Array.cs b/mcs/class/corlib/System/Array.cs
index 0f7d8c24ee2..e7275316112 100644
--- a/mcs/class/corlib/System/Array.cs
+++ b/mcs/class/corlib/System/Array.cs
@@ -2296,7 +2296,7 @@ namespace System
public void CopyTo (T [] array, int index)
{
- array.CopyTo (array, index);
+ this.array.CopyTo (array, index);
}
IEnumerator IEnumerable.GetEnumerator ()
diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog
index 626dd8b3012..7cbe93911ab 100644
--- a/mcs/class/corlib/System/ChangeLog
+++ b/mcs/class/corlib/System/ChangeLog
@@ -1,3 +1,77 @@
+2010-01-25 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Single.cs : parse MaxValue and PositiveInfinity as expected.
+ Patch by Tiaan Geldenhuys.
+
+2010-01-15 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * Int32.cs: In Parse() cast the parsed value to long *before* changing
+ its sign - this way we preserve the original value, instead of
+ accidentally changing it. This was happening parsing _exactly_
+ MaxValue + 1.
+ Fixes #475815.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * DateTime.cs : In AddMilliseconds(), it seems fractional
+ milliseconds are first rounded and then added.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * DateTimeOffset.cs : preserve fractions (it is somehow dropped).
+
+2010-01-13 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Double.cs : no need to preserve old code.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * Double.cs : AllowLeading/TrailingWhite should also check those
+ surrounding string constants such as "NaN".
+
+2010-01-11 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * Int32.cs: Implement support for exponent in the Parse methods.
+ Fixes #542464.
+
+ Backport r149356.
+
+2010-01-07 Jb Evain <jbevain@novell.com>
+
+ * MonoType.cs (.MemberType): return the proper member type
+ for generic parameters.
+
+ backport r149175.
+
+2010-01-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Convert.cs: Fix line endings in ToBase64String (bug #568778)
+ and also the default line length. Code changed to not require
+ a BinaryReader over a MemoryStream to reduce memory requirements.
+ [Backport r149171]
+
+2010-01-03 Zoltan Varga <vargaz@gmail.com>
+
+ * Array.cs: Fix ArrayReadOnlyList.CopyTo. Fixes #564095.
+
+2010-01-03 Zoltan Varga <vargaz@gmail.com>
+
+ * DateTime.cs (TryParseExact): Handle exceptions. Fixes #567857.
+
+2009-12-21 Marek Habersack <mhabersack@novell.com>
+
+ * Int32.cs: treat terminating null as whitespace
+
+2009-12-19 Zoltan Varga <vargaz@gmail.com>
+
+ * String.cs: Fix the various IndexOf and LastIndexOf methods so they handle
+ "" and a non-zero startIndex correctly. Fixes #566106.
+
+2009-12-17 Sebastien Pouliot <sebastien@ximian.com>
+
+ * String.cs: Fix #565602 right-padding empty strings.
+ [Backport r148706]
+
2009-12-09 Jb Evain <jbevain@novell.com>
* StringComparer.cs (GetHashCode): properly throw an
diff --git a/mcs/class/corlib/System/Convert.cs b/mcs/class/corlib/System/Convert.cs
index 2ade4c952fe..9cb28d656d0 100644
--- a/mcs/class/corlib/System/Convert.cs
+++ b/mcs/class/corlib/System/Convert.cs
@@ -111,7 +111,6 @@ namespace System {
// Fields
public static readonly object DBNull = System.DBNull.Value;
- static ToBase64Transform toBase64Transform = new ToBase64Transform();
[MethodImplAttribute (MethodImplOptions.InternalCall)]
extern static byte [] InternalFromBase64String (string str, bool allowWhitespaceOnly);
@@ -180,7 +179,7 @@ namespace System {
throw new ArgumentOutOfRangeException ("offsetIn + length > array.Length");
// note: normally ToBase64Transform doesn't support multiple block processing
- byte[] outArr = toBase64Transform.InternalTransformFinalBlock (inArray, offsetIn, length);
+ byte[] outArr = ToBase64Transform.InternalTransformFinalBlock (inArray, offsetIn, length);
char[] cOutArr = new ASCIIEncoding ().GetChars (outArr);
@@ -212,7 +211,7 @@ namespace System {
throw new ArgumentOutOfRangeException ("offset + length > array.Length");
// note: normally ToBase64Transform doesn't support multiple block processing
- byte[] outArr = toBase64Transform.InternalTransformFinalBlock (inArray, offset, length);
+ byte[] outArr = ToBase64Transform.InternalTransformFinalBlock (inArray, offset, length);
return (new ASCIIEncoding ().GetString (outArr));
}
@@ -237,10 +236,13 @@ namespace System {
if (offset > inArray.Length - length)
throw new ArgumentOutOfRangeException ("offset + length > array.Length");
+ if (length == 0)
+ return String.Empty;
+
if (options == Base64FormattingOptions.InsertLineBreaks)
return ToBase64StringBuilderWithLine (inArray, offset, length).ToString ();
else
- return Encoding.ASCII.GetString (toBase64Transform.InternalTransformFinalBlock (inArray, offset, length));
+ return Encoding.ASCII.GetString (ToBase64Transform.InternalTransformFinalBlock (inArray, offset, length));
}
[ComVisible (false)]
@@ -257,13 +259,16 @@ namespace System {
if (offsetIn > inArray.Length - length)
throw new ArgumentOutOfRangeException ("offsetIn + length > array.Length");
+ if (length == 0)
+ return 0;
+
// note: normally ToBase64Transform doesn't support multiple block processing
if (options == Base64FormattingOptions.InsertLineBreaks) {
StringBuilder sb = ToBase64StringBuilderWithLine (inArray, offsetIn, length);
sb.CopyTo (0, outArray, offsetOut, sb.Length);
return sb.Length;
} else {
- byte[] outArr = toBase64Transform.InternalTransformFinalBlock (inArray, offsetIn, length);
+ byte[] outArr = ToBase64Transform.InternalTransformFinalBlock (inArray, offsetIn, length);
char[] cOutArr = Encoding.ASCII.GetChars (outArr);
@@ -276,23 +281,30 @@ namespace System {
}
}
+ private const int MaxBytesPerLine = 57;
+
static StringBuilder ToBase64StringBuilderWithLine (byte [] inArray, int offset, int length)
{
- BinaryReader reader = new BinaryReader (new MemoryStream (inArray, offset, length));
- byte[] b = null;
-
StringBuilder sb = new StringBuilder ();
- do {
- // 54 bytes of input makes for 72 bytes of output.
- b = reader.ReadBytes (54);
- if (b.Length > 0)
- sb.AppendLine (Encoding.ASCII.GetString (toBase64Transform.InternalTransformFinalBlock (b, 0, b.Length)));
- } while (b.Length > 0);
+
+ int remainder;
+ int full = Math.DivRem (length, MaxBytesPerLine, out remainder);
+ for (int i = 0; i < full; i ++) {
+ byte[] data = ToBase64Transform.InternalTransformFinalBlock (inArray, offset, MaxBytesPerLine);
+ sb.AppendLine (Encoding.ASCII.GetString (data));
+ offset += MaxBytesPerLine;
+ }
+ // we never complete (i.e. the last line) with a new line
+ if (remainder == 0) {
+ int nll = Environment.NewLine.Length;
+ sb.Remove (sb.Length - nll, nll);
+ } else {
+ byte[] data = ToBase64Transform.InternalTransformFinalBlock (inArray, offset, remainder);
+ sb.Append (Encoding.ASCII.GetString (data));
+ }
return sb;
}
#endif
-
-
// ========== Boolean Conversions ========== //
diff --git a/mcs/class/corlib/System/DateTime.cs b/mcs/class/corlib/System/DateTime.cs
index 7514bef877b..dd4a95ec2ef 100644
--- a/mcs/class/corlib/System/DateTime.cs
+++ b/mcs/class/corlib/System/DateTime.cs
@@ -600,7 +600,7 @@ namespace System
(value * TimeSpan.TicksPerMillisecond) < long.MinValue) {
throw new ArgumentOutOfRangeException();
}
- long msticks = (long) (value * TimeSpan.TicksPerMillisecond);
+ long msticks = (long) Math.Round (value * TimeSpan.TicksPerMillisecond);
return AddTicks (msticks);
}
@@ -1940,11 +1940,16 @@ namespace System
DateTimeStyles style,
out DateTime result)
{
- DateTimeFormatInfo dfi = DateTimeFormatInfo.GetInstance (provider);
+ try {
+ DateTimeFormatInfo dfi = DateTimeFormatInfo.GetInstance (provider);
- bool longYear = false;
- Exception e = null;
- return ParseExact (s, formats, dfi, style, out result, true, ref longYear, false, ref e);
+ bool longYear = false;
+ Exception e = null;
+ return ParseExact (s, formats, dfi, style, out result, true, ref longYear, false, ref e);
+ } catch {
+ result = MinValue;
+ return false;
+ }
}
#endif
diff --git a/mcs/class/corlib/System/DateTimeOffset.cs b/mcs/class/corlib/System/DateTimeOffset.cs
index 2a324ea8de6..5b7fcb0613e 100644
--- a/mcs/class/corlib/System/DateTimeOffset.cs
+++ b/mcs/class/corlib/System/DateTimeOffset.cs
@@ -584,7 +584,8 @@ namespace System
if (second < 0) second = 0;
if (fraction < 0) fraction = 0;
if (year > 0 && month > 0 && day > 0) {
- result = new DateTimeOffset (year, month, day, hour, minute, second, (int) (1000 * fraction), offset);
+ result = new DateTimeOffset (year, month, day, hour, minute, second, 0, offset);
+ result = result.AddSeconds (fraction);
if ((styles & DateTimeStyles.AdjustToUniversal) != 0)
result = result.ToUniversalTime ();
return true;
diff --git a/mcs/class/corlib/System/Double.cs b/mcs/class/corlib/System/Double.cs
index fe4104172c7..a21e90ede18 100644
--- a/mcs/class/corlib/System/Double.cs
+++ b/mcs/class/corlib/System/Double.cs
@@ -243,30 +243,18 @@ namespace System {
NumberFormatInfo format = NumberFormatInfo.GetInstance(provider);
if (format == null) throw new Exception("How did this happen?");
- if (s == format.NaNSymbol) {
- result = Double.NaN;
- return true;
- }
- if (s == format.PositiveInfinitySymbol) {
- result = Double.PositiveInfinity;
- return true;
- }
- if (s == format.NegativeInfinitySymbol) {
- result = Double.NegativeInfinity;
- return true;
- }
-
//
// validate and prepare string for C
//
int len = s.Length;
- byte [] b = new byte [len + 1];
int didx = 0;
int sidx = 0;
char c;
+ bool allow_leading_white = (style & NumberStyles.AllowLeadingWhite) != 0;
+ bool allow_trailing_white = ((style & NumberStyles.AllowTrailingWhite) != 0);
- if ((style & NumberStyles.AllowLeadingWhite) != 0){
- while (sidx < len && Char.IsWhiteSpace (c = s [sidx]))
+ if (allow_leading_white) {
+ while (sidx < len && Char.IsWhiteSpace (s [sidx]))
sidx++;
if (sidx == len) {
@@ -275,8 +263,25 @@ namespace System {
return false;
}
}
+ int sEndPos = s.Length - 1;
+ if (allow_trailing_white)
+ while (Char.IsWhiteSpace (s [sEndPos]))
+ sEndPos--;
- bool allow_trailing_white = ((style & NumberStyles.AllowTrailingWhite) != 0);
+ if (TryParseStringConstant (format.NaNSymbol, s, sidx, sEndPos)) {
+ result = double.NaN;
+ return true;
+ }
+ if (TryParseStringConstant (format.PositiveInfinitySymbol, s, sidx, sEndPos)) {
+ result = double.PositiveInfinity;
+ return true;
+ }
+ if (TryParseStringConstant (format.NegativeInfinitySymbol, s, sidx, sEndPos)) {
+ result = double.NegativeInfinity;
+ return true;
+ }
+
+ byte [] b = new byte [len + 1];
//
// Machine state
@@ -480,6 +485,11 @@ namespace System {
}
}
+ static bool TryParseStringConstant (string format, string s, int start, int end)
+ {
+ return end - start + 1 == format.Length && String.CompareOrdinal (format, 0, s, start, format.Length) == 0;
+ }
+
[MethodImplAttribute(MethodImplOptions.InternalCall)]
unsafe private static extern bool ParseImpl (byte *byte_ptr, out double value);
diff --git a/mcs/class/corlib/System/Int32.cs b/mcs/class/corlib/System/Int32.cs
index e573c48bad1..a48e3132c2a 100644
--- a/mcs/class/corlib/System/Int32.cs
+++ b/mcs/class/corlib/System/Int32.cs
@@ -102,7 +102,7 @@ namespace System {
for (int i = position; i < len; i++){
char c = s [i];
- if (!Char.IsWhiteSpace (c)){
+ if (c != 0 && !Char.IsWhiteSpace (c)){
if (!tryParse)
exc = GetFormatException ();
return false;
@@ -281,21 +281,52 @@ namespace System {
}
}
- internal static bool FindExponent (ref int pos, string s)
+ internal static bool FindExponent (ref int pos, string s, ref int exponent, bool tryParse, ref Exception exc)
{
+ exponent = 0;
+ long exp = 0; // temp long value
+
int i = s.IndexOfAny(new char [] {'e', 'E'}, pos);
- if (i < 0)
- return false;
- if (++i == s.Length)
- return false;
- if (s [i] == '+' || s [i] == '-')
- if (++i == s.Length)
- return false;
- if (!Char.IsDigit (s [i]))
- return false;
- for (; i < s.Length; ++i)
- if (!Char.IsDigit (s [i]))
- break;
+ if (i < 0) {
+ exc = null;
+ return false;
+ }
+
+ if (++i == s.Length) {
+ exc = tryParse ? null : GetFormatException ();
+ return true;
+ }
+
+ // negative exponent not valid for Int32
+ if (s [i] == '-') {
+ exc = tryParse ? null : new OverflowException ("Value too large or too small.");
+ return true;
+ }
+
+ if (s [i] == '+' && ++i == s.Length) {
+ exc = tryParse ? null : GetFormatException ();
+ return true;
+ }
+
+ for (; i < s.Length; i++) {
+ if (!Char.IsDigit (s [i])) {
+ exc = tryParse ? null : GetFormatException ();
+ return true;
+ }
+
+ // Reduce the risk of throwing an overflow exc
+ exp = checked (exp * 10 - (int) (s [i] - '0'));
+ if (exp < Int32.MinValue || exp > Int32.MaxValue) {
+ exc = tryParse ? null : new OverflowException ("Value too large or too small.");
+ return true;
+ }
+ }
+
+ // exp value saved as negative
+ exp = -exp;
+
+ exc = null;
+ exponent = (int)exp;
pos = i;
return true;
}
@@ -437,6 +468,7 @@ namespace System {
bool decimalPointFound = false;
int digitValue;
char hexDigit;
+ int exponent = 0;
// Number stuff
do {
@@ -511,8 +543,9 @@ namespace System {
return false;
}
- if (AllowExponent)
- FindExponent(ref pos, s);
+ if (AllowExponent)
+ if (FindExponent (ref pos, s, ref exponent, tryParse, ref exc) && exc != null)
+ return false;
if (AllowTrailingSign && !foundSign) {
// Sign + Currency
@@ -560,7 +593,7 @@ namespace System {
if (!negative && !AllowHexSpecifier){
if (tryParse){
- long lval = -number;
+ long lval = -((long)number);
if (lval < MinValue || lval > MaxValue)
return false;
@@ -568,6 +601,19 @@ namespace System {
} else
number = checked (-number);
}
+
+ // result *= 10^exponent
+ if (exponent > 0) {
+ // Reduce the risk of throwing an overflow exc
+ double res = checked (Math.Pow (10, exponent) * number);
+ if (res < Int32.MinValue || res > Int32.MaxValue) {
+ if (!tryParse)
+ exc = new OverflowException ("Value too large or too small.");
+ return false;
+ }
+
+ number = (int)res;
+ }
result = number;
diff --git a/mcs/class/corlib/System/MonoType.cs b/mcs/class/corlib/System/MonoType.cs
index 76950f57c85..e3cfe11177e 100644
--- a/mcs/class/corlib/System/MonoType.cs
+++ b/mcs/class/corlib/System/MonoType.cs
@@ -590,7 +590,11 @@ namespace System
public override MemberTypes MemberType {
get {
- if (DeclaringType != null)
+ if (DeclaringType != null
+#if NET_2_0
+ && !IsGenericParameter
+#endif
+ )
return MemberTypes.NestedType;
else
return MemberTypes.TypeInfo;
diff --git a/mcs/class/corlib/System/Single.cs b/mcs/class/corlib/System/Single.cs
index 680321c53f0..0ba3cd5d9d4 100644
--- a/mcs/class/corlib/System/Single.cs
+++ b/mcs/class/corlib/System/Single.cs
@@ -54,6 +54,10 @@ namespace System
public const float PositiveInfinity = 1.0f / 0.0f;
public const float NegativeInfinity = -1.0f / 0.0f;
+ // Maximum allowed rounding-error so that float.MaxValue can round-trip successfully; calculated
+ // using: (double.Parse (float.MaxValue.ToString ("r")) - (double) float.MaxValue).ToString ("r")
+ private const double MaxValueEpsilon = 3.6147112457961776e29d;
+
internal float m_value;
public int CompareTo (object value)
@@ -178,7 +182,7 @@ namespace System
{
double parsed_value = Double.Parse (
s, (NumberStyles.Float | NumberStyles.AllowThousands), null);
- if (parsed_value > (double) float.MaxValue)
+ if (parsed_value - (double) float.MaxValue > MaxValueEpsilon && (!double.IsPositiveInfinity (parsed_value)))
throw new OverflowException();
return (float) parsed_value;
@@ -188,7 +192,7 @@ namespace System
{
double parsed_value = Double.Parse (
s, (NumberStyles.Float | NumberStyles.AllowThousands), provider);
- if (parsed_value > (double) float.MaxValue)
+ if (parsed_value - (double) float.MaxValue > MaxValueEpsilon && (!double.IsPositiveInfinity (parsed_value)))
throw new OverflowException();
return (float) parsed_value;
@@ -197,7 +201,7 @@ namespace System
public static float Parse (string s, NumberStyles style)
{
double parsed_value = Double.Parse (s, style, null);
- if (parsed_value > (double) float.MaxValue)
+ if (parsed_value - (double) float.MaxValue > MaxValueEpsilon && (!double.IsPositiveInfinity (parsed_value)))
throw new OverflowException();
return (float) parsed_value;
@@ -206,7 +210,7 @@ namespace System
public static float Parse (string s, NumberStyles style, IFormatProvider provider)
{
double parsed_value = Double.Parse (s, style, provider);
- if (parsed_value > (double) float.MaxValue)
+ if (parsed_value - (double) float.MaxValue > MaxValueEpsilon && (!double.IsPositiveInfinity (parsed_value)))
throw new OverflowException();
return (float) parsed_value;
@@ -219,7 +223,7 @@ namespace System
if (!Double.Parse (s, style, provider, true, out parsed_value, out exc)) {
result = 0;
return false;
- } else if (parsed_value > (double) float.MaxValue) {
+ } else if (parsed_value - (double) float.MaxValue > MaxValueEpsilon && (!double.IsPositiveInfinity (parsed_value))) {
result = 0;
return false;
}
diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs
index a2d5b21d125..d240b50a9eb 100644
--- a/mcs/class/corlib/System/String.cs
+++ b/mcs/class/corlib/System/String.cs
@@ -938,7 +938,7 @@ namespace System
if (valueLen <= 1) {
if (valueLen == 1)
return IndexOfUnchecked (value[0], startIndex, count);
- return 0;
+ return startIndex;
}
fixed (char* thisptr = this, valueptr = value) {
@@ -966,7 +966,7 @@ namespace System
return -1;
if (valueLen == 0)
- return 0;
+ return startIndex;
fixed (char* thisptr = this, valueptr = value) {
char* ap = thisptr + startIndex;
@@ -1044,7 +1044,7 @@ namespace System
if (valueLen <= 1) {
if (valueLen == 1)
return LastIndexOfUnchecked (value[0], startIndex, count);
- return 0;
+ return startIndex;
}
fixed (char* thisptr = this, valueptr = value) {
@@ -1072,7 +1072,7 @@ namespace System
return -1;
if (valueLen == 0)
- return 0;
+ return startIndex;
fixed (char* thisptr = this, valueptr = value) {
char* ap = thisptr + startIndex - valueLen + 1;
@@ -1531,7 +1531,7 @@ namespace System
if (totalWidth < this.length)
return this;
- if (this.Length == 0)
+ if (totalWidth == 0)
return String.Empty;
String tmp = InternalAllocateStr (totalWidth);
diff --git a/mcs/class/corlib/Test/System.Reflection/ChangeLog b/mcs/class/corlib/Test/System.Reflection/ChangeLog
index 34e958c0268..9b8120c7407 100644
--- a/mcs/class/corlib/Test/System.Reflection/ChangeLog
+++ b/mcs/class/corlib/Test/System.Reflection/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-05 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * DateTimeConstantAttribute.cs: Add internal Ticks property.
+
+ Backport of r149083.
+
2009-10-18 Sebastien Pouliot <sebastien@ximian.com>
* MethodBaseTest.cs: Add new, working, test for non-generic
diff --git a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
index 2a78fd6f975..b60bbb9b29e 100644
--- a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
@@ -14,6 +14,7 @@ using System.Reflection;
using System.Reflection.Emit;
#endif // TARGET_JVM
using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
using NUnit.Framework;
@@ -98,6 +99,16 @@ namespace MonoTests.System.Reflection
Assert.AreEqual (ParamEnum.Foo, info [5].DefaultValue, "#2");
}
+ public static void Sample2 ([DecimalConstantAttribute(2,2,2,2,2)] decimal a, [DateTimeConstantAttribute(123456)] DateTime b) {}
+
+ [Test]
+ public void DefaultValuesFromCustomAttr () {
+ ParameterInfo[] info = typeof (ParameterInfoTest).GetMethod ("Sample2").GetParameters ();
+
+ Assert.AreEqual (typeof (Decimal), info [0].DefaultValue.GetType (), "#1");
+ Assert.AreEqual (typeof (DateTime), info [1].DefaultValue.GetType (), "#2");
+ }
+
[Test] // bug #339013
public void TestDefaultValues ()
{
diff --git a/mcs/class/corlib/Test/System.Threading/ChangeLog b/mcs/class/corlib/Test/System.Threading/ChangeLog
index 07d697abd89..f05a0a5cbaf 100644
--- a/mcs/class/corlib/Test/System.Threading/ChangeLog
+++ b/mcs/class/corlib/Test/System.Threading/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-02 JƩrƩmie Laval <jeremie.laval@gmail.com>
+
+ * ParallelTests.cs: Added unit test for Bug #536919, cleaned up.
+
2009-10-26 Sebastien Pouliot <sebastien@ximian.com>
* InterlockedTest.cs: Add test case for generic methods
diff --git a/mcs/class/corlib/Test/System.Threading/ParallelTests.cs b/mcs/class/corlib/Test/System.Threading/ParallelTests.cs
index 225b766cf63..09bd2f6e13d 100644
--- a/mcs/class/corlib/Test/System.Threading/ParallelTests.cs
+++ b/mcs/class/corlib/Test/System.Threading/ParallelTests.cs
@@ -42,20 +42,9 @@ namespace ParallelFxTests
[TestFixture()]
public class ParallelTests
{
- //int[] pixels;
- //RayTracerApp rayTracer;
-
- public void Setup()
- {
- /*Stream stream = Assembly.GetAssembly(typeof(ParallelTests)).GetManifestResourceStream("raytracer-output.xml");
- Console.WriteLine(stream == null);
- XmlSerializer serializer = new XmlSerializer(typeof(int[]));
- pixels = (int[])serializer.Deserialize(stream);
- rayTracer = new RayTracerApp();*/
- }
[Test]
- public void ParallelForTestCase()
+ public void ParallelForTestCase ()
{
ParallelTestHelper.Repeat (() => {
int[] expected = Enumerable.Range (1, 1000).Select ((e) => e * 2).ToArray ();
@@ -64,19 +53,38 @@ namespace ParallelFxTests
Parallel.For (0, actual.Length, (i) => { actual[i] *= 2; sw.SpinOnce (); });
- CollectionAssert.AreEquivalent (expected, actual, "#1, same pixels");
- CollectionAssert.AreEqual (expected, actual, "#2, pixels in order");
+ CollectionAssert.AreEquivalent (expected, actual, "#1, same");
+ CollectionAssert.AreEqual (expected, actual, "#2, in order");
});
}
- [Test, ExpectedException(typeof(AggregateException))]
- public void ParallelForExceptionTestCase()
+ [Test, ExpectedException (typeof (AggregateException))]
+ public void ParallelForExceptionTestCase ()
{
Parallel.For(1, 100, delegate (int i) { throw new Exception("foo"); });
}
[Test]
- public void ParallelForEachTestCase()
+ public void ParallelForSmallRangeTest ()
+ {
+ ParallelTestHelper.Repeat (() => {
+ int test = -1;
+ Parallel.For (0, 1, (i) => test = i);
+
+ Assert.AreEqual (0, test, "#1");
+ });
+ }
+
+ [Test]
+ public void ParallelForNoOperationTest ()
+ {
+ bool launched = false;
+ Parallel.For (4, 1, (i) => launched = true);
+ Assert.IsFalse (launched, "#1");
+ }
+
+ [Test]
+ public void ParallelForEachTestCase ()
{
ParallelTestHelper.Repeat (() => {
IEnumerable<int> e = Enumerable.Repeat(1, 500);
@@ -84,17 +92,17 @@ namespace ParallelFxTests
SpinWait sw = new SpinWait ();
int count = 0;
- Parallel.ForEach (e, (element) => { Interlocked.Increment(ref count); queue.Enqueue (element); sw.SpinOnce (); });
+ Parallel.ForEach (e, (element) => { Interlocked.Increment (ref count); queue.Enqueue (element); sw.SpinOnce (); });
Assert.AreEqual (500, count, "#1");
CollectionAssert.AreEquivalent (e, queue, "#2");
});
}
- [Test, ExpectedException(typeof(AggregateException))]
- public void ParallelForEachExceptionTestCse()
+ [Test, ExpectedException (typeof (AggregateException))]
+ public void ParallelForEachExceptionTestCase ()
{
- IEnumerable<int> e = Enumerable.Repeat(1, 10);
+ IEnumerable<int> e = Enumerable.Repeat (1, 10);
Parallel.ForEach (e, delegate (int element) { throw new Exception ("foo"); });
}
diff --git a/mcs/class/corlib/Test/System/ByteTest.cs b/mcs/class/corlib/Test/System/ByteTest.cs
index 21fbe38d219..1f7bb4fbd9a 100644
--- a/mcs/class/corlib/Test/System/ByteTest.cs
+++ b/mcs/class/corlib/Test/System/ByteTest.cs
@@ -186,6 +186,11 @@ public class ByteTest
catch (Exception e) {
Assert.IsTrue (typeof(FormatException) == e.GetType(), NumberFormatInfo.CurrentInfo.CurrencySymbol+"42, NumberStyles.Integer, Nfi");
}
+
+ Assert.AreEqual (734, Int64.Parse ("734\0"), "#1");
+ Assert.AreEqual (734, Int64.Parse ("734\0\0\0 \0"), "#2");
+ Assert.AreEqual (734, Int64.Parse ("734\0\0\0 "), "#3");
+ Assert.AreEqual (734, Int64.Parse ("734\0\0\0"), "#4");
}
[Test]
diff --git a/mcs/class/corlib/Test/System/ChangeLog b/mcs/class/corlib/Test/System/ChangeLog
index c66745078da..f227fe7c009 100644
--- a/mcs/class/corlib/Test/System/ChangeLog
+++ b/mcs/class/corlib/Test/System/ChangeLog
@@ -1,3 +1,62 @@
+2010-01-25 Atsushi Enomoto <atsushi@ximian.com>
+
+ * SingleTest.cs : test for parsing MaxValue and PositiveInfinity.
+ Patch by Tiaan Geldenhuys.
+
+2010-01-15 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * Int32Test.cs: Test for TryParse with MaxValue + 1.
+
+2010-01-15 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * DateTimeTest.cs: Fix the tests (DateTimeStyles.AssumeUniversal is
+ 2.0 only).
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * DateTimeTest.cs : added test for rounding milliseconds.
+
+2010-01-15 Atsushi Enomoto <atsushi@ximian.com>
+
+ * DateTimeOffsetTest.cs : add ParseExact() case that should preserve
+ fractions.
+
+2010-01-12 Atsushi Enomoto <atsushi@ximian.com>
+
+ * DoubleTest.cs : add test for AllowLeading/TrailingSpace flags.
+
+2010-01-11 Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+ * Int32Test.cs: Add test case for exponent support in the Parse
+ methods.
+
+2010-01-07 Jb Evain <jbevain@novell.com>
+
+ * TypeTest.cs: add test for the MemberType of
+ a generic parameter.
+
+ backport r149175.
+
+2010-01-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * ConvertTest.cs: Add test case for #568778 and the default
+ line length.
+ [Backport r149171]
+
+2009-12-21 Marek Habersack <mhabersack@novell.com>
+
+ * Int32Test.cs, Int64Test.cs, Int16Test.cs, ByteTest.cs: added
+ tests for formats with trailing null chars.
+
+2009-12-19 Zoltan Varga <vargaz@gmail.com>
+
+ * StringTest.cs: Add tests for IndexOf ("", startIndex, count).
+
+2009-12-17 Sebastien Pouliot <sebastien@ximian.com>
+
+ * StringTest.cs: Add test case for right padding an empty string
+ [Backport r148706]
+
2009-11-24 Jb Evain <jbevain@novell.com>
* ArrayTest.cs: test that we don't allow the use of the IList indexer
diff --git a/mcs/class/corlib/Test/System/ConvertTest.cs b/mcs/class/corlib/Test/System/ConvertTest.cs
index a06b91ac19d..0598692b65b 100644
--- a/mcs/class/corlib/Test/System/ConvertTest.cs
+++ b/mcs/class/corlib/Test/System/ConvertTest.cs
@@ -2835,6 +2835,53 @@ namespace MonoTests.System {
string s = Convert.ToBase64String (bs, Base64FormattingOptions.None);
Assert.IsTrue (!s.Contains ("\n"), "no new line");
}
+
+ static string ToBase64 (int len, Base64FormattingOptions options)
+ {
+ return Convert.ToBase64String (new byte [len], options);
+ }
+
+ [Test]
+ public void Base64String_LineEnds_InsertLineBreaks ()
+ {
+ string base64 = ToBase64 (0, Base64FormattingOptions.InsertLineBreaks);
+ Assert.IsFalse (base64.EndsWith (Environment.NewLine), "0-le");
+ Assert.AreEqual (String.Empty, base64, "0");
+
+ base64 = ToBase64 (1, Base64FormattingOptions.InsertLineBreaks);
+ Assert.IsFalse (base64.EndsWith (Environment.NewLine), "1-le");
+ Assert.AreEqual ("AA==", base64, "1");
+
+ base64 = ToBase64 (57, Base64FormattingOptions.InsertLineBreaks);
+ Assert.IsFalse (base64.Contains (Environment.NewLine), "57-nl"); // one lines
+ Assert.IsFalse (base64.EndsWith (Environment.NewLine), "57-le");
+ Assert.AreEqual ("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", base64, "55");
+
+ base64 = ToBase64 (58, Base64FormattingOptions.InsertLineBreaks);
+ Assert.IsTrue (base64.Contains (Environment.NewLine), "58-nl"); // two lines
+ Assert.IsTrue (base64.EndsWith ("AA=="), "58-le"); // no NewLine
+ }
+
+ [Test]
+ public void Base64String_LineEnds_None ()
+ {
+ string base64 = ToBase64 (0, Base64FormattingOptions.None);
+ Assert.IsFalse (base64.EndsWith (Environment.NewLine), "0-le");
+ Assert.AreEqual (String.Empty, base64, "0");
+
+ base64 = ToBase64 (1, Base64FormattingOptions.None);
+ Assert.IsFalse (base64.EndsWith (Environment.NewLine), "1-le");
+ Assert.AreEqual ("AA==", base64, "1");
+
+ base64 = ToBase64 (57, Base64FormattingOptions.None);
+ Assert.IsFalse (base64.Contains (Environment.NewLine), "57-nl"); // one lines
+ Assert.IsFalse (base64.EndsWith (Environment.NewLine), "57-le");
+ Assert.AreEqual ("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", base64, "55");
+
+ base64 = ToBase64 (58, Base64FormattingOptions.None);
+ Assert.IsFalse (base64.Contains (Environment.NewLine), "58-nl"); // one lines
+ Assert.IsTrue (base64.EndsWith ("AA=="), "58-le"); // no NewLine
+ }
#endif
/* Have experienced some problems with FromBase64CharArray using mono. Something
* about error in a unicode file.
diff --git a/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs b/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs
index 2cd5196b0ff..eb878d063bf 100644
--- a/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs
+++ b/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs
@@ -447,6 +447,14 @@ namespace MonoTests.System {
}
[Test]
+ public void ParseExactPreserveFractions ()
+ {
+ var s = "1999-06-10T21:27:03.1147764+02:00";
+ var d = DateTimeOffset.ParseExact (s, "yyyy-MM-ddTHH:mm:ss.FFFFFFFzzz", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal);
+ Assert.AreEqual (630646468231147764, d.Ticks, "#1");
+ }
+
+ [Test]
public void EqualsObject ()
{
DateTimeOffset offset1 = new DateTimeOffset ();
diff --git a/mcs/class/corlib/Test/System/DateTimeTest.cs b/mcs/class/corlib/Test/System/DateTimeTest.cs
index bbafafa0d5a..4f961a2bbad 100644
--- a/mcs/class/corlib/Test/System/DateTimeTest.cs
+++ b/mcs/class/corlib/Test/System/DateTimeTest.cs
@@ -806,6 +806,13 @@ namespace MonoTests.System
t1 = DateTime.ParseExact ("20050707132527Z",
"yyyyMMddHHmmss\\Z", CultureInfo.InvariantCulture);
Assert.AreEqual (632563395270000000, t1.Ticks, "#L2");
+
+#if NET_2_0
+ // XAttributeTest.CastDateTimeOffsets():#6b
+ t1 = DateTime.ParseExact ("2039-10-31T12:34:56.7552+00:00", "yyyy-MM-ddTHH:mm:ss.FFFFFFFzzz",
+ CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal);
+ Assert.AreEqual (643393064967552000, t1.Ticks, "#M");
+#endif
}
[Test]
diff --git a/mcs/class/corlib/Test/System/DoubleTest.cs b/mcs/class/corlib/Test/System/DoubleTest.cs
index 573d4e94ecb..b9b852e8000 100644
--- a/mcs/class/corlib/Test/System/DoubleTest.cs
+++ b/mcs/class/corlib/Test/System/DoubleTest.cs
@@ -221,6 +221,16 @@ namespace MonoTests.System
}
}
+ [Test]
+ public void ParseAllowWhitespaces ()
+ {
+ NumberStyles style = NumberStyles.Float;
+ double.Parse (" 32 ");
+ double.Parse (" Infinity ");
+ double.Parse (" -Infinity ");
+ double.Parse (" NaN ");
+ }
+
[Test] // bug #81630
public void Parse_Whitespace ()
{
diff --git a/mcs/class/corlib/Test/System/Int16Test.cs b/mcs/class/corlib/Test/System/Int16Test.cs
index 676a7cd05b3..d596878d919 100644
--- a/mcs/class/corlib/Test/System/Int16Test.cs
+++ b/mcs/class/corlib/Test/System/Int16Test.cs
@@ -156,6 +156,11 @@ public class Int16Test
catch (Exception e) {
Assert.IsTrue(typeof(FormatException) == e.GetType());
}
+
+ Assert.AreEqual (7345, Int64.Parse ("7345\0"), "#1");
+ Assert.AreEqual (7345, Int64.Parse ("7345\0\0\0 \0"), "#2");
+ Assert.AreEqual (7345, Int64.Parse ("7345\0\0\0 "), "#3");
+ Assert.AreEqual (7345, Int64.Parse ("7345\0\0\0"), "#4");
}
[Test]
diff --git a/mcs/class/corlib/Test/System/Int32Test.cs b/mcs/class/corlib/Test/System/Int32Test.cs
index dfd7442b849..63fec927d6c 100644
--- a/mcs/class/corlib/Test/System/Int32Test.cs
+++ b/mcs/class/corlib/Test/System/Int32Test.cs
@@ -233,6 +233,64 @@ public class Int32Test
// numbers, but we should not crash
Int32.Parse ("123", new DateTimeFormatInfo ());
+
+ Assert.AreEqual (734561, Int64.Parse ("734561\0"), "C#43");
+ Assert.AreEqual (734561, Int64.Parse ("734561\0\0\0 \0"), "C#44");
+ Assert.AreEqual (734561, Int64.Parse ("734561\0\0\0 "), "C#45");
+ Assert.AreEqual (734561, Int64.Parse ("734561\0\0\0"), "C#46");
+ }
+
+ [Test]
+ public void TestParseExponent ()
+ {
+ Assert.AreEqual (2, Int32.Parse ("2E0", NumberStyles.AllowExponent), "A#1");
+ Assert.AreEqual (20, Int32.Parse ("2E1", NumberStyles.AllowExponent), "A#2");
+ Assert.AreEqual (200, Int32.Parse ("2E2", NumberStyles.AllowExponent), "A#3");
+ Assert.AreEqual (2000000, Int32.Parse ("2E6", NumberStyles.AllowExponent), "A#4");
+ Assert.AreEqual (200, Int32.Parse ("2E+2", NumberStyles.AllowExponent), "A#5");
+
+ try {
+ Int32.Parse ("2E");
+ Assert.Fail ("B#1");
+ } catch (FormatException) {
+ }
+
+ try {
+ Int32.Parse ("2E3.0", NumberStyles.AllowExponent); // decimal notation for the exponent
+ Assert.Fail ("B#2");
+ } catch (FormatException) {
+ }
+
+ try {
+ Int32.Parse ("2E 2", NumberStyles.AllowExponent);
+ Assert.Fail ("B#3");
+ } catch (FormatException) {
+ }
+
+ try {
+ Int32.Parse ("2E2 ", NumberStyles.AllowExponent);
+ Assert.Fail ("B#4");
+ } catch (FormatException) {
+ }
+
+ try {
+ Int32.Parse ("2E66", NumberStyles.AllowExponent); // final result overflow
+ Assert.Fail ("B#5");
+ } catch (OverflowException) {
+ }
+
+ try {
+ long exponent = (long)Int32.MaxValue + 10;
+ Int32.Parse ("2E" + exponent.ToString (), NumberStyles.AllowExponent);
+ Assert.Fail ("B#6");
+ } catch (OverflowException) {
+ }
+
+ try {
+ Int32.Parse ("2E-1", NumberStyles.AllowExponent); // negative exponent
+ Assert.Fail ("B#7");
+ } catch (OverflowException) {
+ }
}
#if NET_2_0
@@ -275,6 +333,7 @@ public class Int32Test
double OverInt = (double)Int32.MaxValue + 1;
Assert.AreEqual (false, Int32.TryParse (OverInt.ToString (), out result));
+ Assert.AreEqual (false, Int32.TryParse (OverInt.ToString (), NumberStyles.None, CultureInfo.InvariantCulture, out result));
Assert.AreEqual (false, Int32.TryParse ("$42", NumberStyles.Integer, null, out result));
Assert.AreEqual (false, Int32.TryParse ("%42", NumberStyles.Integer, Nfi, out result));
diff --git a/mcs/class/corlib/Test/System/Int64Test.cs b/mcs/class/corlib/Test/System/Int64Test.cs
index 0c5fa0f16ab..c2038d20c7f 100644
--- a/mcs/class/corlib/Test/System/Int64Test.cs
+++ b/mcs/class/corlib/Test/System/Int64Test.cs
@@ -309,6 +309,11 @@ public class Int64Test
} catch (Exception e) {
Assert.IsTrue(typeof(OverflowException) == e.GetType(), "#20");
}
+
+ Assert.AreEqual (734561, Int64.Parse ("734561\0"), "#21");
+ Assert.AreEqual (734561, Int64.Parse ("734561\0\0\0 \0"), "#22");
+ Assert.AreEqual (734561, Int64.Parse ("734561\0\0\0 "), "#23");
+ Assert.AreEqual (734561, Int64.Parse ("734561\0\0\0"), "#24");
}
[Test]
diff --git a/mcs/class/corlib/Test/System/SingleTest.cs b/mcs/class/corlib/Test/System/SingleTest.cs
index 4d8c2a54125..80be31b69fe 100644
--- a/mcs/class/corlib/Test/System/SingleTest.cs
+++ b/mcs/class/corlib/Test/System/SingleTest.cs
@@ -102,12 +102,69 @@ namespace MonoTests.System
}
[Test]
- [Category ("NotWorking")]
public void ToString_Roundtrip ()
{
Assert.AreEqual (10.78f.ToString ("R", NumberFormatInfo.InvariantInfo), "10.78");
}
+ [Test]
+ public void Parse_Roundtrip ()
+ {
+ string maxVal = float.MaxValue.ToString ("r");
+ string minVal = float.MinValue.ToString ("r");
+ string epsilon = float.Epsilon.ToString ("r");
+ string nan = float.NaN.ToString ("r");
+ string negInf = float.NegativeInfinity.ToString ("r");
+ string posInf = float.PositiveInfinity.ToString ("r");
+
+ float result;
+ Assert.IsTrue (float.TryParse (maxVal, NumberStyles.Float, CultureInfo.InvariantCulture, out result), "MaxValue#1a");
+ Assert.AreEqual (float.MaxValue, result, "MaxValue#1b");
+ Assert.IsTrue (float.TryParse (minVal, NumberStyles.Float, CultureInfo.InvariantCulture, out result), "MinValue#1a");
+ Assert.AreEqual (float.MinValue, result, "MinValue#1b");
+ Assert.IsTrue (float.TryParse (epsilon, NumberStyles.Float, CultureInfo.InvariantCulture, out result), "Epsilon#1a");
+ Assert.AreEqual (float.Epsilon, result, "Epsilon#1b");
+ Assert.IsTrue (float.TryParse (nan, NumberStyles.Float, CultureInfo.InvariantCulture, out result), "NaN#1a");
+ Assert.AreEqual (float.NaN, result, "NaN#1b");
+ Assert.IsNaN (result, "NaN#1c");
+ Assert.IsTrue (float.TryParse (negInf, NumberStyles.Float, CultureInfo.InvariantCulture, out result), "-Inf#1a");
+ Assert.AreEqual (float.NegativeInfinity, result, "-Inf#1b");
+ Assert.IsTrue (float.TryParse (posInf, NumberStyles.Float, CultureInfo.InvariantCulture, out result), "+Inf#1a");
+ Assert.AreEqual (float.PositiveInfinity, result, "+Inf#1b");
+
+ Assert.AreEqual (float.MaxValue, float.Parse (maxVal), "MaxValue#2");
+ Assert.AreEqual (float.MinValue, float.Parse (minVal), "MinValue#2");
+ Assert.AreEqual (float.Epsilon, float.Parse (epsilon), "Epsilon#2");
+ Assert.AreEqual (float.NaN, float.Parse (nan), "NaN#2a");
+ Assert.IsNaN (float.Parse (nan), "NaN#2b");
+ Assert.AreEqual (float.NegativeInfinity, float.Parse (negInf), "-Inf#2");
+ Assert.AreEqual (float.PositiveInfinity, float.Parse (posInf), "+Inf#2");
+
+ Assert.AreEqual (float.MaxValue, float.Parse (maxVal, CultureInfo.InvariantCulture), "MaxValue#3");
+ Assert.AreEqual (float.MinValue, float.Parse (minVal, CultureInfo.InvariantCulture), "MinValue#3");
+ Assert.AreEqual (float.Epsilon, float.Parse (epsilon, CultureInfo.InvariantCulture), "Epsilon#3");
+ Assert.AreEqual (float.NaN, float.Parse (nan, CultureInfo.InvariantCulture), "NaN#3a");
+ Assert.IsNaN (float.Parse (nan, CultureInfo.InvariantCulture), "NaN#3b");
+ Assert.AreEqual (float.NegativeInfinity, float.Parse (negInf, CultureInfo.InvariantCulture), "-Inf#3");
+ Assert.AreEqual (float.PositiveInfinity, float.Parse (posInf, CultureInfo.InvariantCulture), "+Inf#3");
+
+ Assert.AreEqual (float.MaxValue, float.Parse (maxVal, NumberStyles.Float), "MaxValue#4");
+ Assert.AreEqual (float.MinValue, float.Parse (minVal, NumberStyles.Float), "MinValue#4");
+ Assert.AreEqual (float.Epsilon, float.Parse (epsilon, NumberStyles.Float), "Epsilon#4");
+ Assert.AreEqual (float.NaN, float.Parse (nan, NumberStyles.Float), "NaN#4a");
+ Assert.IsNaN (float.Parse (nan, NumberStyles.Float), "NaN#4b");
+ Assert.AreEqual (float.NegativeInfinity, float.Parse (negInf, NumberStyles.Float), "-Inf#4");
+ Assert.AreEqual (float.PositiveInfinity, float.Parse (posInf, NumberStyles.Float), "+Inf#4");
+
+ Assert.AreEqual (float.MaxValue, float.Parse (maxVal, NumberStyles.Float, CultureInfo.InvariantCulture), "MaxValue#5");
+ Assert.AreEqual (float.MinValue, float.Parse (minVal, NumberStyles.Float, CultureInfo.InvariantCulture), "MinValue#5");
+ Assert.AreEqual (float.Epsilon, float.Parse (epsilon, NumberStyles.Float, CultureInfo.InvariantCulture), "Epsilon#5");
+ Assert.AreEqual (float.NaN, float.Parse (nan, NumberStyles.Float, CultureInfo.InvariantCulture), "NaN#5a");
+ Assert.IsNaN (float.Parse (nan, NumberStyles.Float, CultureInfo.InvariantCulture), "NaN#5b");
+ Assert.AreEqual (float.NegativeInfinity, float.Parse (negInf, NumberStyles.Float, CultureInfo.InvariantCulture), "-Inf#5");
+ Assert.AreEqual (float.PositiveInfinity, float.Parse (posInf, NumberStyles.Float, CultureInfo.InvariantCulture), "+Inf#5");
+ }
+
#if NET_2_0
[Test] // bug #72221
[ExpectedException (typeof (ArgumentException))]
diff --git a/mcs/class/corlib/Test/System/StringTest.cs b/mcs/class/corlib/Test/System/StringTest.cs
index 9e6bd64e349..0d3af16f911 100644
--- a/mcs/class/corlib/Test/System/StringTest.cs
+++ b/mcs/class/corlib/Test/System/StringTest.cs
@@ -1824,6 +1824,14 @@ public class StringTest
Assert.AreEqual (-1, string.Empty.IndexOf ("abc", 0, 0), "#J10");
}
+#if NET_2_0
+ [Test]
+ public void IndexOf7_Empty () {
+ Assert.AreEqual (1, "FOO".IndexOf ("", 1, 2, StringComparison.Ordinal));
+ Assert.AreEqual (1, "FOO".IndexOf ("", 1, 2, StringComparison.OrdinalIgnoreCase));
+ }
+#endif
+
[Test] // IndexOf (String, Int32, Int32)
public void IndexOf7_Count_Negative ()
{
@@ -3011,6 +3019,13 @@ public class StringTest
}
}
+ [Test]
+ public void PadRight2 ()
+ {
+ Assert.AreEqual ("100000000000", "1".PadRight (12, '0'), "#1");
+ Assert.AreEqual ("000000000000", "".PadRight (12, '0'), "#2");
+ }
+
[Test] // Remove (Int32, Int32)
public void Remove2 ()
{
diff --git a/mcs/class/corlib/Test/System/TypeTest.cs b/mcs/class/corlib/Test/System/TypeTest.cs
index 6ef01c07d4c..df24b23ef4c 100644
--- a/mcs/class/corlib/Test/System/TypeTest.cs
+++ b/mcs/class/corlib/Test/System/TypeTest.cs
@@ -1790,6 +1790,17 @@ PublicKeyToken=b77a5c561934e089"));
Assert.AreEqual (0, mi.Length);
}
+#if NET_2_0
+ [Test]
+ public void GenericParameterMemberType ()
+ {
+ var t = typeof (Foo<>).GetGenericArguments () [0];
+ Assert.IsNotNull (t);
+
+ Assert.AreEqual (MemberTypes.TypeInfo, t.MemberType);
+ }
+#endif
+
public class ByRef0
{
public int field;
diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog
index c1be4d05efb..54d222d38f7 100644
--- a/mcs/mcs/ChangeLog
+++ b/mcs/mcs/ChangeLog
@@ -1,3 +1,12 @@
+2010-01-26 Marek Safar <marek.safar@gmail.com>
+
+ A fix for bug #573329
+ * eval.cs: Don't disable error reporting completely on silent mode.
+
+2009-12-16 Miguel de Icaza <miguel@novell.com>
+
+ * Fix for 565194
+
2009-12-08 Marek Safar <marek.safar@gmail.com>
A fix for bug #561149
diff --git a/mcs/mcs/complete.cs b/mcs/mcs/complete.cs
index 2435d5a18f6..7516ce10674 100644
--- a/mcs/mcs/complete.cs
+++ b/mcs/mcs/complete.cs
@@ -53,9 +53,9 @@ namespace Mono.CSharp {
public static void AppendResults (ArrayList results, string prefix, IEnumerable names)
{
foreach (string name in names){
- if (name == null)
+ if (name == null || prefix == null)
continue;
-
+
if (!name.StartsWith (prefix))
continue;
diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay
index ee8bbaa43b3..1f3666fe99c 100644
--- a/mcs/mcs/cs-parser.jay
+++ b/mcs/mcs/cs-parser.jay
@@ -4715,7 +4715,7 @@ statement_expression
| error
{
Error_SyntaxError (yyToken);
- $$ = null;
+ $$ = EmptyStatement.Value;
}
;
diff --git a/mcs/mcs/eval.cs b/mcs/mcs/eval.cs
index 28ab1f96f43..23c991a3ad5 100644
--- a/mcs/mcs/eval.cs
+++ b/mcs/mcs/eval.cs
@@ -649,15 +649,11 @@ namespace Mono.CSharp {
if (mode == ParseMode.GetCompletions)
parser.Lexer.CompleteOnEOF = true;
-
- bool disable_error_reporting;
+
+ ReportPrinter old_printer = null;
if ((mode == ParseMode.Silent || mode == ParseMode.GetCompletions) && CSharpParser.yacc_verbose_flag == 0)
- disable_error_reporting = true;
- else
- disable_error_reporting = false;
-
- if (disable_error_reporting)
- ctx.Report.DisableReporting ();
+ old_printer = ctx.Report.SetPrinter (new StreamReportPrinter (TextWriter.Null));
+
try {
parser.parse ();
} finally {
@@ -669,8 +665,8 @@ namespace Mono.CSharp {
parser = null;
}
- if (disable_error_reporting)
- ctx.Report.EnableReporting ();
+ if (old_printer != null)
+ ctx.Report.SetPrinter (old_printer);
}
return parser;
}
diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs
index c0b63c03bc4..798a213bb9c 100644
--- a/mcs/mcs/statement.cs
+++ b/mcs/mcs/statement.cs
@@ -2128,6 +2128,9 @@ namespace Mono.CSharp {
int statement_count = statements.Count;
for (int ix = 0; ix < statement_count; ix++){
Statement s = (Statement) statements [ix];
+ if (s == null)
+ continue;
+
// Check possible empty statement (CS0642)
if (ix + 1 < statement_count && ec.Report.WarningLevel >= 3 &&
statements [ix + 1] is ExplicitBlock)
diff --git a/mcs/tools/csharp/ChangeLog b/mcs/tools/csharp/ChangeLog
index ec69e64cac3..f3d78bbdeb2 100644
--- a/mcs/tools/csharp/ChangeLog
+++ b/mcs/tools/csharp/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-16 Miguel de Icaza <miguel@novell.com>
+
+ * repl.cs: Avoid crash, fixes 554898
+
2009-09-07 Marek Safar <marek.safar@gmail.com>
* repl.cs: Disabled Report.Stderr hacking.
diff --git a/mcs/tools/csharp/repl.cs b/mcs/tools/csharp/repl.cs
index 02b03d1f0b1..379aa6a05a8 100644
--- a/mcs/tools/csharp/repl.cs
+++ b/mcs/tools/csharp/repl.cs
@@ -242,7 +242,7 @@ namespace Mono {
public int ReadEvalPrintLoop ()
{
- if (startup_files.Length == 0)
+ if (startup_files != null && startup_files.Length == 0)
InitTerminal ();
InitializeUsing ();
diff --git a/mcs/tools/linker/ChangeLog b/mcs/tools/linker/ChangeLog
index 6b2dd5e0c69..845cc068007 100644
--- a/mcs/tools/linker/ChangeLog
+++ b/mcs/tools/linker/ChangeLog
@@ -1,3 +1,21 @@
+2010-01-14 Jb Evain <jbevain@novell.com>
+
+ * MarkStep.cs: preserve fields specified by the
+ SoapHeader attribute.
+
+ backport r149571.
+
+2010-01-13 Jb Evain <jbevain@novell.com>
+
+ * MarkStep.cs: preserve methods specified by the
+ XmlSchemaProvider attribute.
+
+ backport r149460.
+
+2010-01-06 Jb Evain <jbevain@novell.com>
+
+ * Descriptors/mscorlib.xml: optimize descriptor.
+
2009-11-02 Jb Evain <jbevain@novell.com>
Merge the MonoTouch Linker branch.
diff --git a/mcs/tools/linker/Descriptors/mscorlib.xml b/mcs/tools/linker/Descriptors/mscorlib.xml
index 5ff3d0d6e4d..71d0d55d284 100644
--- a/mcs/tools/linker/Descriptors/mscorlib.xml
+++ b/mcs/tools/linker/Descriptors/mscorlib.xml
@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<linker>
<assembly fullname="mscorlib">
- <namespace fullname="System.Security.Cryptography" />
- <type fullname="Mono.Interop.ComInteropProxy" />
- <type fullname="Mono.Interop.IDispatch" />
- <type fullname="Mono.Interop.IUnknown" />
- <type fullname="System.Activator" />
- <type fullname="System.AppDomain" />
- <type fullname="System.AppDomainSetup" />
+
+ <type fullname="System.AppDomain" preserve="fields">
+ <method name="DoDomainUnload" />
+ <method name="DoTypeResolve" />
+ <method name="DoAssemblyResolve" />
+ <method name="DoAssemblyLoad" />
+ <method name="DoDomainUnload" />
+ <method name="InternalSetContext" />
+ </type>
+
+ <type fullname="System.AppDomainSetup" preserve="fields" />
<type fullname="System.AppDomainUnloadedException" />
<type fullname="System.ApplicationException" />
<type fullname="System.ArgIterator" />
@@ -15,67 +19,65 @@
<type fullname="System.ArgumentNullException" />
<type fullname="System.ArgumentOutOfRangeException" />
<type fullname="System.ArithmeticException" />
- <type fullname="System.Array" />
- <type fullname="System.Array/InternalArray`1" />
+ <type fullname="System.Array">
+ <method name="InternalArray__ICollection_get_Count" />
+ <method name="InternalArray__ICollection_get_IsReadOnly" />
+ <method name="InternalArray__IEnumerable_GetEnumerator" />
+ <method name="InternalArray__ICollection_Clear" />
+ <method name="InternalArray__ICollection_Add" />
+ <method name="InternalArray__ICollection_Remove" />
+ <method name="InternalArray__ICollection_Contains" />
+ <method name="InternalArray__ICollection_CopyTo" />
+ <method name="InternalArray__Insert" />
+ <method name="InternalArray__RemoveAt" />
+ <method name="InternalArray__IndexOf" />
+ <method name="InternalArray__get_Item" />
+ <method name="InternalArray__set_Item" />
+ </type>
<type fullname="System.ArrayTypeMismatchException" />
<type fullname="System.Attribute" />
<type fullname="System.BadImageFormatException" />
- <type fullname="System.Boolean" />
- <type fullname="System.Buffer" />
- <type fullname="System.Byte" />
+ <type fullname="System.Boolean" preserve="fields" />
+ <type fullname="System.Byte" preserve="fields" />
<type fullname="System.CannotUnloadAppDomainException" />
- <type fullname="System.Char" />
- <type fullname="System.Collections.Generic.ICollection`1" />
- <type fullname="System.Collections.Generic.IEnumerable`1" />
- <type fullname="System.Collections.Generic.GenericEqualityComparer`1" />
- <type fullname="System.Collections.Generic.IList`1" />
- <type fullname="System.Console" />
- <type fullname="System.ConsoleDriver" />
- <type fullname="System.ContextBoundObject" />
- <type fullname="System.Convert" />
+ <type fullname="System.Char" preserve="fields" />
+ <type fullname="System.Console" preserve="fields" />
+ <type fullname="System.ConsoleDriver" preserve="fields" />
+ <type fullname="System.ContextBoundObject" preserve="fields" />
+ <!-- <type fullname="System.Convert" /> -->
<type fullname="System.CurrentSystemTimeZone" />
- <type fullname="System.DateTime" />
- <type fullname="System.DBNull" />
- <type fullname="System.Decimal" />
- <type fullname="System.Delegate" />
+ <type fullname="System.DateTime" preserve="fields" />
+ <type fullname="System.DBNull" preserve="fields" />
+ <type fullname="System.Decimal" preserve="fields" />
+ <type fullname="System.Delegate" preserve="fields" />
<type fullname="System.Diagnostics.StackFrame" />
<type fullname="System.Diagnostics.StackTrace" />
<type fullname="System.DivideByZeroException" />
<type fullname="System.DllNotFoundException" />
- <type fullname="System.Double" />
- <type fullname="System.Enum" />
+ <type fullname="System.Double" preserve="fields" />
+ <type fullname="System.Enum" preserve="fields">
+ <method name="GetValues" />
+ </type>
<type fullname="System.EntryPointNotFoundException" />
- <type fullname="System.Environment" />
+ <type fullname="System.Environment">
+ <field name="mono_corlib_version" />
+ </type>
<type fullname="System.Exception" />
<type fullname="System.ExecutionEngineException" />
<type fullname="System.FieldAccessException" />
<type fullname="System.FormatException" />
<type fullname="System.GC" />
- <type fullname="System.Globalization.DateTimeFormatInfo" preserve="fields" />
- <type fullname="System.Globalization.CompareInfo" preserve="fields" />
- <type fullname="System.Globalization.CultureInfo" preserve="all" />
- <type fullname="System.Globalization.NumberFormatInfo" preserve="fields" />
- <type fullname="System.Globalization.RegionInfo" preserve="fields" />
- <type fullname="System.Globalization.SortKey" preserve="fields" />
- <type fullname="System.IO.FileMode" />
- <type fullname="System.IO.FileNotFoundException" />
- <type fullname="System.IO.FileLoadException" />
- <type fullname="System.IO.FileStreamAsyncResult" />
- <type fullname="System.IO.IOException" />
- <type fullname="System.IO.MonoIO" preserve="fields" />
- <type fullname="System.IO.Path" />
- <type fullname="System.IO.StreamReader" />
<type fullname="System.IndexOutOfRangeException" />
- <type fullname="System.Int16" />
- <type fullname="System.Int32" />
- <type fullname="System.Int64" />
- <type fullname="System.IntPtr" />
+ <type fullname="System.Int16" preserve="fields" />
+ <type fullname="System.Int32" preserve="fields" />
+ <type fullname="System.Int64" preserve="fields" />
+ <type fullname="System.IntPtr" preserve="fields" />
<type fullname="System.InvalidCastException" />
<type fullname="System.InvalidOperationException" />
<type fullname="System.InvalidProgramException" />
- <type fullname="System.MarshalByRefObject" />
- <type fullname="System.Math" />
+ <type fullname="System.MarshalByRefObject" preserve="fields" feature="remoting" />
<type fullname="System.MethodAccessException" />
+ <type fullname="System.Missing" preserve="fields" />
<type fullname="System.MissingFieldException" />
<type fullname="System.MissingMethodException" />
<type fullname="System.MonoAsyncCall" preserve="fields" />
@@ -88,37 +90,89 @@
<type fullname="System.NotImplementedException" />
<type fullname="System.NotSupportedException" />
<type fullname="System.NullReferenceException" />
- <type fullname="System.Nullable`1" />
+ <type fullname="System.Nullable`1" preserve="fields">
+ <method name="Box" />
+ <method name="Unbox" />
+ </type>
<type fullname="System.Object" />
<type fullname="System.OutOfMemoryException" />
- <type fullname="System.Reflection.Assembly" preserve="all" />
+ <type fullname="System.RuntimeArgumentHandle" preserve="fields" />
+ <type fullname="System.RuntimeFieldHandle" preserve="fields" />
+ <type fullname="System.RuntimeMethodHandle" preserve="fields" />
+ <type fullname="System.RuntimeTypeHandle" preserve="fields" />
+ <type fullname="System.SByte" preserve="fields" />
+ <type fullname="System.Single" preserve="fields" />
+ <type fullname="System.StackOverflowException" />
+ <type fullname="System.STAThreadAttribute" />
+ <type fullname="System.String" preserve="fields">
+ <method name="CreateString" />
+ <method name="InternalAllocateStr" />
+ <method name="memcpy" />
+ <method name="memset" />
+ </type>
+ <type fullname="System.SystemException" />
+ <type fullname="System.Type" preserve="fields">
+ <method name="GetTypeFromHandle" />
+ </type>
+ <type fullname="System.TypeInitializationException" />
+ <type fullname="System.TypeLoadException" />
+ <type fullname="System.TypedReference" preserve="fields" />
+ <type fullname="System.UInt16" preserve="fields" />
+ <type fullname="System.UInt32" preserve="fields" />
+ <type fullname="System.UInt64" preserve="fields" />
+ <type fullname="System.UIntPtr" preserve="fields" />
+ <type fullname="System.UnhandledExceptionEventArgs" />
+ <type fullname="System.ValueType" preserve="fields" />
+ <type fullname="System.Variant" preserve="fields" feature="com">
+ <method name="Clear" />
+ </type>
+ <type fullname="System.Version" />
+ <type fullname="System.Void" />
+ <type fullname="System.__ComObject" feature="com" />
+
+ <type fullname="System.Collections.Generic.ICollection`1" />
+ <type fullname="System.Collections.Generic.IEnumerable`1" />
+ <type fullname="System.Collections.Generic.IList`1" />
+ <type fullname="System.Collections.Generic.GenericEqualityComparer`1">
+ <method name=".ctor" />
+ </type>
+ <type fullname="System.Collections.Generic.GenericComparer`1">
+ <method name=".ctor" />
+ </type>
+
+ <type fullname="System.Globalization.DateTimeFormatInfo" preserve="fields" />
+ <type fullname="System.Globalization.CompareInfo" preserve="fields" />
+ <type fullname="System.Globalization.CultureInfo" preserve="fields">
+ <method name="CreateCulture" />
+ </type>
+ <type fullname="System.Globalization.NumberFormatInfo" preserve="fields" />
+ <type fullname="System.Globalization.RegionInfo" preserve="fields" />
+ <type fullname="System.Globalization.SortKey" preserve="fields" />
+
+ <!--
+ <type fullname="System.IO.FileMode" />
+ <type fullname="System.IO.FileNotFoundException" />
+ <type fullname="System.IO.FileLoadException" />
+ <type fullname="System.IO.FileStreamAsyncResult" />
+ <type fullname="System.IO.IOException" />
+ <type fullname="System.IO.MonoIO" preserve="fields" />
+ <type fullname="System.IO.Path" />
+ <type fullname="System.IO.StreamReader" />
+ -->
+
+ <type fullname="System.Reflection.Assembly" preserve="fields">
+ <method name="MonoDebugger_GetMethodToken" feature="sre" />
+ <method name="GetNamespaces" feature="sre" />
+ </type>
<type fullname="System.Reflection.AssemblyName" preserve="fields" />
<type fullname="System.Reflection.ConstructorInfo" preserve="fields" />
<type fullname="System.Reflection.CustomAttributeData" preserve="fields" />
- <type fullname="System.Reflection.CustomAttributeNamedArgument" />
- <type fullname="System.Reflection.CustomAttributeTypedArgument" />
- <type fullname="System.Reflection.Emit.AssemblyBuilder" />
- <type fullname="System.Reflection.Emit.ConstructorBuilder" preserve="fields" />
- <type fullname="System.Reflection.Emit.CustomAttributeBuilder" preserve="fields" />
- <type fullname="System.Reflection.Emit.DynamicMethod" preserve="fields" />
- <type fullname="System.Reflection.Emit.EnumBuilder" preserve="fields" />
- <type fullname="System.Reflection.Emit.EventBuilder" preserve="fields" />
- <type fullname="System.Reflection.Emit.FieldBuilder" preserve="fields" />
- <type fullname="System.Reflection.Emit.GenericTypeParameterBuilder" preserve="fields" />
- <type fullname="System.Reflection.Emit.ILExceptionBlock" preserve="fields" />
- <type fullname="System.Reflection.Emit.ILExceptionInfo" preserve="fields" />
- <type fullname="System.Reflection.Emit.ILGenerator" preserve="all" />
- <type fullname="System.Reflection.Emit.LocalBuilder" preserve="all" />
- <type fullname="System.Reflection.Emit.MethodBuilder" preserve="fields" />
- <type fullname="System.Reflection.Emit.ModuleBuilder" preserve="all" />
- <type fullname="System.Reflection.Emit.MonoResource" preserve="fields" />
- <type fullname="System.Reflection.Emit.MonoWin32Resource" preserve="fields" />
- <type fullname="System.Reflection.Emit.ParameterBuilder" preserve="fields" />
- <type fullname="System.Reflection.Emit.PropertyBuilder" preserve="fields" />
- <type fullname="System.Reflection.Emit.SignatureHelper" preserve="fields" />
- <type fullname="System.Reflection.Emit.TypeBuilder" preserve="fields" />
- <type fullname="System.Reflection.Emit.UnmanagedMarshal" preserve="fields" />
- <type fullname="System.Reflection.EventInfo" preserve="all" />
+ <type fullname="System.Reflection.CustomAttributeNamedArgument" preserve="fields" />
+ <type fullname="System.Reflection.CustomAttributeTypedArgument" preserve="fields" />
+ <type fullname="System.Reflection.EventInfo" preserve="fields">
+ <method name="AddEventFrame" />
+ <method name="StaticAddEventAdapterFrame" />
+ </type>
<type fullname="System.Reflection.ExceptionHandlingClause" preserve="fields" />
<type fullname="System.Reflection.FieldInfo" preserve="fields" />
<type fullname="System.Reflection.LocalVariableInfo" preserve="fields" />
@@ -126,7 +180,9 @@
<type fullname="System.Reflection.MethodBase" preserve="fields" />
<type fullname="System.Reflection.MethodBody" preserve="fields" />
<type fullname="System.Reflection.MethodInfo" preserve="fields" />
- <type fullname="System.Reflection.Module" preserve="all" />
+ <type fullname="System.Reflection.Module" preserve="fields">
+ <method name="Mono_GetGuid" feature="sre" />
+ </type>
<type fullname="System.Reflection.MonoArrayMethod" preserve="fields" />
<type fullname="System.Reflection.MonoCMethod" preserve="fields" />
<type fullname="System.Reflection.MonoEvent" preserve="fields" />
@@ -138,96 +194,161 @@
<type fullname="System.Reflection.MonoMethod" preserve="fields" />
<type fullname="System.Reflection.MonoMethodInfo" preserve="fields" />
<type fullname="System.Reflection.MonoPropertyInfo" preserve="fields" />
- <type fullname="System.Reflection.MonoProperty" preserve="all" />
+ <type fullname="System.Reflection.MonoProperty" preserve="fields">
+ <method name="GetterAdapterFrame" />
+ <method name="StaticGetterAdapterFrame" />
+ </type>
<type fullname="System.Reflection.ParameterInfo" preserve="fields" />
<type fullname="System.Reflection.PropertyInfo" preserve="fields" />
<type fullname="System.Reflection.ReflectionTypeLoadException" />
<type fullname="System.Reflection.TargetException" />
<type fullname="System.Reflection.TargetParameterCountException" />
- <type fullname="System.Resources.ResourceSet" />
+
+ <type fullname="System.Reflection.Emit.AssemblyBuilder" preserve="fields">
+ <method name="AddPermissionRequests" />
+ <method name="AddModule" />
+ <method name="DefineIconResource" />
+ <method name="AddTypeForwarder" />
+ <method name="EmbedResourceFile" />
+ </type>
+ <type fullname="System.Reflection.Emit.ConstructorBuilder" preserve="fields" />
+ <type fullname="System.Reflection.Emit.CustomAttributeBuilder" preserve="fields" />
+ <type fullname="System.Reflection.Emit.DynamicMethod" preserve="fields" />
+ <type fullname="System.Reflection.Emit.EnumBuilder" preserve="fields" />
+ <type fullname="System.Reflection.Emit.EventBuilder" preserve="fields" />
+ <type fullname="System.Reflection.Emit.FieldBuilder" preserve="fields" />
+ <type fullname="System.Reflection.Emit.GenericTypeParameterBuilder" preserve="fields" />
+ <type fullname="System.Reflection.Emit.ILExceptionBlock" preserve="fields" />
+ <type fullname="System.Reflection.Emit.ILExceptionInfo" preserve="fields" />
+ <type fullname="System.Reflection.Emit.ILGenerator" preserve="fields">
+ <method name="Mono_GetCurrentOffset" />
+ </type>
+ <type fullname="System.Reflection.Emit.LocalBuilder" preserve="fields">
+ <method name="Mono_GetLocalIndex" />
+ </type>
+ <type fullname="System.Reflection.Emit.MethodBuilder" preserve="fields" />
+ <type fullname="System.Reflection.Emit.ModuleBuilder" preserve="fields">
+ <method name="Mono_GetGuid" />
+ </type>
+ <type fullname="System.Reflection.Emit.MonoResource" preserve="fields" />
+ <type fullname="System.Reflection.Emit.MonoWin32Resource" preserve="fields" />
+ <type fullname="System.Reflection.Emit.ParameterBuilder" preserve="fields" />
+ <type fullname="System.Reflection.Emit.PropertyBuilder" preserve="fields" />
+ <type fullname="System.Reflection.Emit.SignatureHelper" preserve="fields" />
+ <type fullname="System.Reflection.Emit.TypeBuilder" preserve="fields">
+ <method name="SetCharSet" />
+ </type>
+ <type fullname="System.Reflection.Emit.UnmanagedMarshal" preserve="fields">
+ <method name="DefineCustom" />
+ <method name="DefineLPArrayInternal" />
+ </type>
+-
+ <!--
<type fullname="System.Runtime.CompilerServices.CallConvCdecl" />
<type fullname="System.Runtime.CompilerServices.CallConvStdcall" />
<type fullname="System.Runtime.CompilerServices.CallConvFastcall" />
<type fullname="System.Runtime.CompilerServices.CallConvThiscall" />
+ -->
+
<type fullname="System.Runtime.CompilerServices.InternalsVisibleToAttribute" />
- <type fullname="System.Runtime.CompilerServices.RequiredAttributeAttribute" />
+ <!-- <type fullname="System.Runtime.CompilerServices.RequiredAttributeAttribute" />
<type fullname="System.Runtime.CompilerServices.RuntimeHelpers" />
- <type fullname="System.Runtime.CompilerServices.TypeForwardedToAttribute" />
- <type fullname="System.Runtime.InteropServices.DllImportAttribute" />
+ <type fullname="System.Runtime.CompilerServices.TypeForwardedToAttribute" /> -->
+
+ <!-- <type fullname="System.Runtime.InteropServices.DllImportAttribute" /> -->
<type fullname="System.Runtime.InteropServices.GCHandle" />
- <type fullname="System.Runtime.InteropServices.GuidAttribute" />
+ <!-- <type fullname="System.Runtime.InteropServices.GuidAttribute" /> -->
<type fullname="System.Runtime.InteropServices.HandleRef" />
<type fullname="System.Runtime.InteropServices.ICustomMarshaler" />
- <type fullname="System.Runtime.InteropServices.InterfaceTypeAttribute" />
+ <!--<type fullname="System.Runtime.InteropServices.InterfaceTypeAttribute" /> -->
<type fullname="System.Runtime.InteropServices.Marshal" />
- <type fullname="System.Runtime.InteropServices.MarshalDirectiveException" />
+ <!-- <type fullname="System.Runtime.InteropServices.MarshalDirectiveException" />
<type fullname="System.Runtime.InteropServices.SafeHandle" />
<type fullname="System.Runtime.InteropServices.StructLayoutAttribute" />
- <type fullname="System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute" />
- <type fullname="System.Runtime.Remoting.Activation.ActivationServices" />
- <type fullname="System.Runtime.Remoting.Contexts.Context" />
+ <type fullname="System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute" />-->
+
+ <!-- <type fullname="System.Runtime.Remoting.Activation.ActivationServices" /> -->
+ <type fullname="System.Runtime.Remoting.Contexts.Context" preserve="fields">
+ <method name="get_NeedsContextSink" />
+ </type>
<type fullname="System.Runtime.Remoting.Channels.CrossAppDomainSink" />
- <type fullname="System.Runtime.Remoting.IRemotingTypeInfo" />
+ <type fullname="System.Runtime.Remoting.IRemotingTypeInfo">
+ <method name="CanCastTo" />
+ </type>
<type fullname="System.Runtime.Remoting.Messaging.AsyncResult" />
- <type fullname="System.Runtime.Remoting.Messaging.CallContext" />
- <type fullname="System.Runtime.Remoting.Messaging.MonoMethodMessage" />
- <type fullname="System.Runtime.Remoting.Proxies.RealProxy" />
- <type fullname="System.Runtime.Remoting.Proxies.TransparentProxy" />
- <type fullname="System.Runtime.Remoting.RemotingServices" />
+ <type fullname="System.Runtime.Remoting.Messaging.CallContext">
+ <method name="SetCurrentCallContext" />
+ </type>
+ <type fullname="System.Runtime.Remoting.Messaging.MonoMethodMessage" preserve="fields" />
+ <type fullname="System.Runtime.Remoting.Proxies.RealProxy" preserve="fields">
+ <method name="PrivateInvoke" />
+ <method name="GetAppDomainTarget" />
+ </type>
+ <type fullname="System.Runtime.Remoting.Proxies.TransparentProxy" preserve="fields" />
+ <type fullname="System.Runtime.Remoting.RemotingServices">
+ <method name="SerializeCallData" />
+ <method name="DeserializeCallData" />
+ <method name="SerializeExceptionData" />
+ </type>
+
+ <!--
<type fullname="System.Runtime.Serialization.ISerializable" />
<type fullname="System.Runtime.Serialization.SerializationException" />
<type fullname="System.Runtime.Serialization.SerializationInfo" />
<type fullname="System.Runtime.Serialization.StreamingContext" />
- <type fullname="System.RuntimeArgumentHandle" />
- <type fullname="System.RuntimeFieldHandle" />
- <type fullname="System.RuntimeMethodHandle" />
- <type fullname="System.RuntimeTypeHandle" />
- <type fullname="System.SByte" />
+ -->
+
+ <type fullname="System.Threading.ExecutionContext" />
+ <type fullname="System.Threading.Interlocked">
+ <method name="CompareExchange" />
+ </type>
+ <type fullname="System.Threading.Monitor">
+ <method name="Enter" />
+ <method name="Exit" />
+ </type>
+
+ <!--
+ <type fullname="System.Threading.Mutex" />
+ <type fullname="System.Threading.NativeEventCalls" />
+ <type fullname="System.Threading.Semaphore" />
+ -->
+
+ <type fullname="System.Threading.SynchronisationLockException" />
+ <type fullname="System.Threading.Thread" preserve="fields">
+ <method name="get_CurrentContext" />
+ </type>
+ <type fullname="System.Threading.ThreadAbortException" />
+ <type fullname="System.Threading.ThreadInterruptedException" />
+ <!--<type fullname="System.Threading.ThreadPool" />-->
+ <type fullname="System.Threading.ThreadState" preserve="fields" />
+ <type fullname="System.Threading.ThreadStateException" />
+ <type fullname="System.Threading.WaitHandle" preserve="fields">
+ <method name="set_Handle" />
+ </type>
+
+ <type fullname="System.Text.StringBuilder" preserve="fields" />
+
<type fullname="System.Security.AllowPartiallyTrustedCallersAttribute" />
- <type fullname="System.Security.Cryptography.RandomNumberGenerator" />
- <type fullname="System.Security.Cryptography.RNGCryptoServiceProvider" />
<type fullname="System.Security.Policy.Evidence" />
+ <!--
<type fullname="System.Security.Principal.WindowsIdentity" />
<type fullname="System.Security.Principal.WindowsImpersonationContext" />
<type fullname="System.Security.Principal.WindowsPrincipal" />
<type fullname="System.Security.RuntimeSecurityFrame" />
<type fullname="System.Security.SecurityCriticalAttribute" />
<type fullname="System.Security.SecurityException" />
+ -->
<type fullname="System.Security.SecurityManager" />
+ <!--
<type fullname="System.Security.SuppressUnmanagedCodeSecurityAttribute" />
<type fullname="System.Security.VerificationException" />
- <type fullname="System.Single" />
- <type fullname="System.StackOverflowException" />
- <type fullname="System.STAThreadAttribute" />
- <type fullname="System.String" />
- <type fullname="System.SystemException" />
- <type fullname="System.Text.StringBuilder" />
- <type fullname="System.Threading.ExecutionContext" />
- <type fullname="System.Threading.Interlocked" />
- <type fullname="System.Threading.Monitor" />
- <type fullname="System.Threading.Mutex" />
- <type fullname="System.Threading.NativeEventCalls" />
- <type fullname="System.Threading.Semaphore" />
- <type fullname="System.Threading.SynchronisationLockException" />
- <type fullname="System.Threading.Thread" />
- <type fullname="System.Threading.ThreadAbortException" />
- <type fullname="System.Threading.ThreadPool" />
- <type fullname="System.Threading.ThreadState" />
- <type fullname="System.Threading.ThreadStateException" />
- <type fullname="System.Threading.WaitHandle" />
- <type fullname="System.Type" />
- <type fullname="System.TypeInitializationException" />
- <type fullname="System.TypeLoadException" />
- <type fullname="System.TypedReference" />
- <type fullname="System.UInt16" />
- <type fullname="System.UInt32" />
- <type fullname="System.UInt64" />
- <type fullname="System.UIntPtr" />
- <type fullname="System.UnhandledExceptionEventArgs" />
- <type fullname="System.ValueType" />
- <type fullname="System.Variant" />
- <type fullname="System.Version" />
- <type fullname="System.Void" />
- <type fullname="System.__ComObject" />
+ -->
+
+ <namespace fullname="System.Security.Cryptography" feature="crypto" />
+
+ <type fullname="Mono.Interop.ComInteropProxy" feature="com" />
+ <type fullname="Mono.Interop.IDispatch" feature="com" />
+ <type fullname="Mono.Interop.IUnknown" feature="com" />
+
</assembly>
</linker>
diff --git a/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs b/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs
index f68d6039d27..3ac2e260051 100644
--- a/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs
+++ b/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs
@@ -385,6 +385,8 @@ namespace Mono.Linker.Steps {
MarkMethodsIf (type.Constructors, IsSpecialSerializationConstructorPredicate);
}
+ MarkTypeSpecialCustomAttributes (type);
+
MarkGenericParameterProvider (type);
if (type.IsValueType)
@@ -406,6 +408,90 @@ namespace Mono.Linker.Steps {
ApplyPreserveInfo (type);
}
+ void MarkTypeSpecialCustomAttributes (TypeDefinition type)
+ {
+ if (!type.HasCustomAttributes)
+ return;
+
+ foreach (CustomAttribute attribute in type.CustomAttributes) {
+ switch (attribute.Constructor.DeclaringType.FullName) {
+ case "System.Xml.Serialization.XmlSchemaProviderAttribute":
+ MarkXmlSchemaProvider (type, attribute);
+ break;
+ }
+ }
+ }
+
+ void MarkMethodSpecialCustomAttributes (MethodDefinition method)
+ {
+ if (!method.HasCustomAttributes)
+ return;
+
+ foreach (CustomAttribute attribute in method.CustomAttributes) {
+ switch (attribute.Constructor.DeclaringType.FullName) {
+ case "System.Web.Services.Protocols.SoapHeaderAttribute":
+ MarkSoapHeader (method, attribute);
+ break;
+ }
+ }
+ }
+
+ void MarkXmlSchemaProvider (TypeDefinition type, CustomAttribute attribute)
+ {
+ string method_name;
+ if (!TryGetStringArgument (attribute, out method_name))
+ return;
+
+ MarkNamedMethod (type, method_name);
+ }
+
+ static bool TryGetStringArgument (CustomAttribute attribute, out string argument)
+ {
+ argument = null;
+
+ if (!attribute.Resolved || attribute.ConstructorParameters.Count < 1)
+ return false;
+
+ argument = attribute.ConstructorParameters [0] as string;
+
+ return argument != null;
+ }
+
+ void MarkNamedMethod (TypeDefinition type, string method_name)
+ {
+ if (!type.HasMethods)
+ return;
+
+ foreach (MethodDefinition method in type.Methods) {
+ if (method.Name != method_name)
+ continue;
+
+ MarkMethod (method);
+ }
+ }
+
+ void MarkSoapHeader (MethodDefinition method, CustomAttribute attribute)
+ {
+ string field_name;
+ if (!TryGetStringArgument (attribute, out field_name))
+ return;
+
+ MarkNamedField (method.DeclaringType, field_name);
+ }
+
+ void MarkNamedField (TypeDefinition type, string field_name)
+ {
+ if (!type.HasFields)
+ return;
+
+ foreach (FieldDefinition field in type.Fields) {
+ if (field.Name != field_name)
+ continue;
+
+ MarkField (field);
+ }
+ }
+
void MarkGenericParameterProvider (IGenericParameterProvider provider)
{
if (!provider.HasGenericParameters)
@@ -709,6 +795,8 @@ namespace Mono.Linker.Steps {
MarkMethod (ov);
}
+ MarkMethodSpecialCustomAttributes (method);
+
if (method.IsVirtual)
_virtual_methods.Add (method);
diff --git a/mcs/tools/mdoc/ChangeLog b/mcs/tools/mdoc/ChangeLog
index 3717a1653a3..17a8faf7875 100644
--- a/mcs/tools/mdoc/ChangeLog
+++ b/mcs/tools/mdoc/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-11 Jonathan Pryor <jpryor@novell.com>
+
+ * Mono.Documentation/monodocs2slashdoc.cs: Fix NamespaceSummaries.xml
+ generation to look at the ns-NAMESPACE.xml files, not just
+ NAMESPACE.xml files.
+
2009-09-19 Jonathan Pryor <jpryor@novell.com>
* Mono.Documentation/monodocs2html.cs: Add --with-profile=PROFILE
diff --git a/mcs/tools/mdoc/Mono.Documentation/monodocs2slashdoc.cs b/mcs/tools/mdoc/Mono.Documentation/monodocs2slashdoc.cs
index 54c1e24e9c0..190861277f0 100644
--- a/mcs/tools/mdoc/Mono.Documentation/monodocs2slashdoc.cs
+++ b/mcs/tools/mdoc/Mono.Documentation/monodocs2slashdoc.cs
@@ -133,14 +133,17 @@ public class MDocToMSXDocConverter : MDocCommand {
}
private static void AddNamespaceSummary(XmlDocument nsSummaries, string basepath, string currentNs) {
- string filename = Path.Combine(basepath, currentNs + ".xml");
- if (File.Exists(filename)) {
- XmlDocument nsSummary = new XmlDocument();
- nsSummary.Load(filename);
- XmlElement ns = nsSummaries.CreateElement("namespace");
- nsSummaries.DocumentElement.AppendChild(ns);
- ns.SetAttribute("name", currentNs);
- ns.InnerText = nsSummary.SelectSingleNode("/Namespace/Docs/summary").InnerText;
+ foreach (var filename in new [] {
+ Path.Combine(basepath, currentNs + ".xml"),
+ Path.Combine(basepath, "ns-" + currentNs + ".xml")}) {
+ if (File.Exists(filename)) {
+ XmlDocument nsSummary = new XmlDocument();
+ nsSummary.Load(filename);
+ XmlElement ns = nsSummaries.CreateElement("namespace");
+ nsSummaries.DocumentElement.AppendChild(ns);
+ ns.SetAttribute("name", currentNs);
+ ns.InnerText = nsSummary.SelectSingleNode("/Namespace/Docs/summary").InnerText;
+ }
}
}
diff --git a/mcs/tools/monodoc/ChangeLog b/mcs/tools/monodoc/ChangeLog
index cb1034c2c60..a1db250ea50 100644
--- a/mcs/tools/monodoc/ChangeLog
+++ b/mcs/tools/monodoc/ChangeLog
@@ -1,3 +1,42 @@
+2010-01-13 Jonathan Pryor <jpryor@novell.com>
+
+ * Monodoc/provider.cs, Monodoc/ecma-provider.cs: Improve cache support
+ by having EcmaHelpSource.GetTextFromUrl() look for cached contents.
+ This greatly speeds up type member listings (e.g. T:...List`1/*),
+ e.g. from ~2.0s to 0.06s.
+
+2010-01-13 Jonathan Pryor <jpryor@novell.com>
+
+ * Mono.Documentation/XmlDocUtils.cs: XmlDocUtils.AddExtensionMethods()
+ wasn't adding extension methods which matched *interfaces* of base
+ classes. Result: Mono.Options.OptionSet (which inherits
+ System.Collections.ObjectModel.KeyedCollection`2 which inherits from
+ System.Collections.ObjectModel.Collection`1 which implements
+ System.Collections.Generic.IEnumerable`1) wasn't getting any of the
+ LINQ extension methods (which is bad). Fix this.
+
+2010-01-13 Jonathan Pryor <jpryor@novell.com>
+
+ * Resources/mdoc-html-utils.xsl: Fix regression caused by 2009-12-02
+ commit adding GetLinkTargetHtml(). The problem was that when
+ running within ASP.NET/monodoc ~all extension method links would be
+ 'javascript:alert("...")M:Foo.Method(...)', which is clearly wrong.
+ This occurred because $linkid's generation would always call
+ GetLinkTargetHtml() with a $cref value of '', thus the monodoc
+ GetLinkTarget() would return '', so GetLinkTargetHtml() would return
+ the javascript "not found" alert. Thus, we can't expect
+ GetLinkTargetHtml() with $cref='' to work under monodoc, but it's
+ ~required to work sanely under 'mdoc export-html'.
+ Solution is to not call GetLinkTargetHtml() here UNLESS we're doing
+ 'mdoc export-html' generation, which we assume to be the case if
+ $html-anchor is true.
+
+2009-12-30 Jonathan Pryor <jpryor@novell.com>
+
+ * Lucene.Net/Lucene.Net/QueryParser/QueryParser.cs: Fix crash when
+ searching for "()". Fixes #423853.
+ Thanks to BenoƮt Tuduri <bento78@gmail.com>.
+
2009-09-09 Jonathan Pryor <jpryor@novell.com>
* Mono.Documentation/ManifestResourceResolver.cs: Allow it to lookup
diff --git a/mcs/tools/monodoc/Lucene.Net/Lucene.Net/QueryParser/QueryParser.cs b/mcs/tools/monodoc/Lucene.Net/Lucene.Net/QueryParser/QueryParser.cs
index 7108ba8da00..bfb88659856 100644
--- a/mcs/tools/monodoc/Lucene.Net/Lucene.Net/QueryParser/QueryParser.cs
+++ b/mcs/tools/monodoc/Lucene.Net/Lucene.Net/QueryParser/QueryParser.cs
@@ -108,7 +108,7 @@ namespace Monodoc.Lucene.Net.QueryParsers
static public Query Parse(System.String query, System.String field, Analyzer analyzer)
{
QueryParser parser = new QueryParser(field, analyzer);
- return parser.Parse(query);
+ return parser.Parse(Escape(query));
}
/// <summary>Constructs a query parser.</summary>
diff --git a/mcs/tools/monodoc/Mono.Documentation/XmlDocUtils.cs b/mcs/tools/monodoc/Mono.Documentation/XmlDocUtils.cs
index e8ed6df8387..17af0c65585 100644
--- a/mcs/tools/monodoc/Mono.Documentation/XmlDocUtils.cs
+++ b/mcs/tools/monodoc/Mono.Documentation/XmlDocUtils.cs
@@ -133,12 +133,17 @@ namespace Mono.Documentation {
{
yield return "System.Object";
yield return GetEscapedPath (type, "Type/@FullName");
+
+ Hashtable h = new Hashtable ();
+ GetInterfaces (h, type, loader);
+
string s = GetEscapedPath (type, "Type/Base/BaseTypeName");
if (s != null) {
yield return s;
XmlDocument d;
string p = s;
while (s != null && (d = loader (s)) != null) {
+ GetInterfaces (h, d, loader);
s = GetEscapedPath (d, "Type/Base/BaseTypeName");
if (p == s)
break;
@@ -146,8 +151,6 @@ namespace Mono.Documentation {
}
}
- Hashtable h = new Hashtable ();
- GetInterfaces (h, type, loader);
foreach (object o in h.Keys)
yield return o.ToString ();
}
diff --git a/mcs/tools/monodoc/Monodoc/ecma-provider.cs b/mcs/tools/monodoc/Monodoc/ecma-provider.cs
index 4041340ed69..3b9d6da5bc1 100644
--- a/mcs/tools/monodoc/Monodoc/ecma-provider.cs
+++ b/mcs/tools/monodoc/Monodoc/ecma-provider.cs
@@ -1155,6 +1155,13 @@ public class EcmaHelpSource : HelpSource {
string GetTextFromUrl (string url)
{
+ if (nozip) {
+ string path = XmlDocUtils.GetCachedFileName (base_dir, url);
+ if (File.Exists (path))
+ return File.OpenText (path).ReadToEnd ();
+ return null;
+ }
+
string rest, rest2;
Node node;
diff --git a/mcs/tools/monodoc/Monodoc/provider.cs b/mcs/tools/monodoc/Monodoc/provider.cs
index 91ee1d0cdb1..73199e97651 100644
--- a/mcs/tools/monodoc/Monodoc/provider.cs
+++ b/mcs/tools/monodoc/Monodoc/provider.cs
@@ -443,8 +443,8 @@ public class HelpSource {
DateTime zipFileWriteTime;
string name;
TraceLevel trace_level = TraceLevel.Warning;
- bool nozip;
- string base_dir;
+ protected bool nozip;
+ protected string base_dir;
public HelpSource (string base_filename, bool create)
{
diff --git a/mcs/tools/monodoc/Resources/mdoc-html-utils.xsl b/mcs/tools/monodoc/Resources/mdoc-html-utils.xsl
index 7bb26d9cfab..ebcaa982eaf 100644
--- a/mcs/tools/monodoc/Resources/mdoc-html-utils.xsl
+++ b/mcs/tools/monodoc/Resources/mdoc-html-utils.xsl
@@ -1864,7 +1864,7 @@
</xsl:choose>
</xsl:variable>
- <xsl:variable name="linkid">
+ <xsl:variable name="linkfile">
<xsl:if test="not(parent::Members/@FullName = $TypeFullName)">
<xsl:call-template name="GetLinkTarget">
<xsl:with-param name="type">
@@ -1882,7 +1882,11 @@
<xsl:with-param name="cref" />
</xsl:call-template>
</xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="linkid">
<xsl:if test="$html-anchor">
+ <xsl:value-of select="$linkfile" />
<xsl:text>#</xsl:text>
</xsl:if>
<xsl:value-of select="$local-id" />
diff --git a/mcs/tools/sqlmetal/ChangeLog b/mcs/tools/sqlmetal/ChangeLog
index d0994e539e0..bbda385744c 100644
--- a/mcs/tools/sqlmetal/ChangeLog
+++ b/mcs/tools/sqlmetal/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-04 Jonathan Pryor <jonpryor@vt.edu>
+
+ * Makefile: Ensure that Test/* files are distributed (so that
+ 'make check' works on tarball builds). Partial fix for #564987.
+
2009-12-08 Jonathan Pryor <jonpryor@vt.edu>
* sqlmetal.exe.config: Add provider entry for SQL Server.
diff --git a/mcs/tools/sqlmetal/Makefile b/mcs/tools/sqlmetal/Makefile
index ca5bfecf3e6..45aeed2f7b8 100644
--- a/mcs/tools/sqlmetal/Makefile
+++ b/mcs/tools/sqlmetal/Makefile
@@ -22,8 +22,12 @@ SQLMETAL_RESOURCES = \
$(dbmetal_src)/Language/FrenchWords.txt \
$(dbmetal_src)/Language/GermanWords.txt
+SQLMETAL_TEST_FILES = \
+ Test/AssemblyInfo.cs
+
EXTRA_DISTFILES = \
- $(SQLMETAL_RESOURCES)
+ $(SQLMETAL_RESOURCES) \
+ $(SQLMETAL_TEST_FILES)
PROGRAM = sqlmetal.exe