From 32c25423987acc756cfea690e09583fe5eba069b Mon Sep 17 00:00:00 2001 From: Atsushi Eno Date: Fri, 22 Jan 2010 02:23:53 +0000 Subject: 2010-01-22 Atsushi Enomoto * CommunicationObject.cs : fix wrong status changes. svn path=/trunk/mcs/; revision=150036 --- .../System.ServiceModel/System.ServiceModel.Channels/ChangeLog | 4 ++++ .../System.ServiceModel.Channels/CommunicationObject.cs | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'mcs') diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog index a57a6ba172c..e4a4239e831 100755 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog @@ -1,3 +1,7 @@ +2010-01-22 Atsushi Enomoto + + * CommunicationObject.cs : fix wrong status changes. + 2010-01-20 Atsushi Enomoto * AddressHeader.cs : XmlSchema.InstanceNamespace didn't exist in 2.1 :( diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CommunicationObject.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CommunicationObject.cs index d44adf6e68b..88a18640074 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CommunicationObject.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CommunicationObject.cs @@ -188,8 +188,8 @@ namespace System.ServiceModel.Channels throw new CommunicationObjectFaultedException (); OnClosing (); if (state != CommunicationState.Closing) { - throw new InvalidOperationException (String.Format ("Communication object {0} has an overriden OnClosing method that does not call base OnClosing method (declared in {1} type).", this.GetType (), GetType ().GetMethod ("OnClosing", BindingFlags.NonPublic | BindingFlags.Instance).DeclaringType)); state = CommunicationState.Faulted; + throw new InvalidOperationException (String.Format ("Communication object {0} has an overriden OnClosing method that does not call base OnClosing method (declared in {1} type).", this.GetType (), GetType ().GetMethod ("OnClosing", BindingFlags.NonPublic | BindingFlags.Instance).DeclaringType)); } } } @@ -208,8 +208,8 @@ namespace System.ServiceModel.Channels lock (ThisLock) { OnClosed (); if (state != CommunicationState.Closed) { - throw new InvalidOperationException (String.Format ("Communication object {0} has an overriden OnClosed method that does not call base OnClosed method (declared in {1} type).", this.GetType (), GetType ().GetMethod ("OnClosed", BindingFlags.NonPublic | BindingFlags.Instance).DeclaringType)); state = CommunicationState.Faulted; + throw new InvalidOperationException (String.Format ("Communication object {0} has an overriden OnClosed method that does not call base OnClosed method (declared in {1} type).", this.GetType (), GetType ().GetMethod ("OnClosed", BindingFlags.NonPublic | BindingFlags.Instance).DeclaringType)); } } } @@ -234,8 +234,8 @@ namespace System.ServiceModel.Channels throw new CommunicationObjectFaultedException (); OnFaulted (); if (state != CommunicationState.Faulted) { - throw new InvalidOperationException (String.Format ("Communication object {0} has an overriden OnFaulted method that does not call base OnFaulted method (declared in {1} type).", this.GetType (), GetType ().GetMethod ("OnFaulted", BindingFlags.NonPublic | BindingFlags.Instance).DeclaringType)); state = CommunicationState.Faulted; // FIXME: am not sure if this makes sense ... + throw new InvalidOperationException (String.Format ("Communication object {0} has an overriden OnFaulted method that does not call base OnFaulted method (declared in {1} type).", this.GetType (), GetType ().GetMethod ("OnFaulted", BindingFlags.NonPublic | BindingFlags.Instance).DeclaringType)); } } } @@ -256,8 +256,8 @@ namespace System.ServiceModel.Channels lock (ThisLock) { OnOpened (); if (state != CommunicationState.Opened) { - throw new InvalidOperationException (String.Format ("Communication object {0} has an overriden OnOpened method that does not call base OnOpened method (declared in {1} type).", this.GetType (), GetType ().GetMethod ("OnOpened", BindingFlags.NonPublic | BindingFlags.Instance).DeclaringType)); state = CommunicationState.Faulted; + throw new InvalidOperationException (String.Format ("Communication object {0} has an overriden OnOpened method that does not call base OnOpened method (declared in {1} type).", this.GetType (), GetType ().GetMethod ("OnOpened", BindingFlags.NonPublic | BindingFlags.Instance).DeclaringType)); } } } @@ -275,8 +275,8 @@ namespace System.ServiceModel.Channels ThrowIfDisposedOrImmutable (); OnOpening (); if (state != CommunicationState.Opening) { - throw new InvalidOperationException (String.Format ("Communication object {0} has an overriden OnOpening method that does not call base OnOpening method (declared in {1} type).", this.GetType (), GetType ().GetMethod ("OnOpening", BindingFlags.NonPublic | BindingFlags.Instance).DeclaringType)); state = CommunicationState.Faulted; + throw new InvalidOperationException (String.Format ("Communication object {0} has an overriden OnOpening method that does not call base OnOpening method (declared in {1} type).", this.GetType (), GetType ().GetMethod ("OnOpening", BindingFlags.NonPublic | BindingFlags.Instance).DeclaringType)); } } } -- cgit v1.2.3