Skip to content

Commit

Permalink
2009-08-20 Atsushi Enomoto <atsushi@ximian.com>
Browse files Browse the repository at this point in the history
	* ClientRuntimeChannel.cs : implement async OnBegin/EndOpen like close.
	  Add FIXME and OnOpen() override on duplex channel.


svn path=/trunk/mcs/; revision=140328
  • Loading branch information
atsushieno committed Aug 20, 2009
1 parent c78338f commit ef7b074
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
@@ -1,3 +1,8 @@
2009-08-20 Atsushi Enomoto <atsushi@ximian.com>

* ClientRuntimeChannel.cs : implement async OnBegin/EndOpen like close.
Add FIXME and OnOpen() override on duplex channel.

2009-08-20 Atsushi Enomoto <atsushi@ximian.com>

* ServiceHostBase.cs : support UnknownMessageReceived (used by
Expand Down
Expand Up @@ -75,6 +75,14 @@ public void EndCloseOutputSession (IAsyncResult result)
{
session_shutdown_delegate.EndInvoke (result);
}

// base channel overrides.

protected override void OnOpen (TimeSpan timeout)
{
// FIXME: add callback listener here to receive callbacks.
base.OnOpen (timeout);
}
}
#endif

Expand Down Expand Up @@ -384,14 +392,21 @@ protected override void OnClose (TimeSpan timeout)
channel.Close (timeout);
}

Action<TimeSpan> open_callback;

protected override IAsyncResult OnBeginOpen (
TimeSpan timeout, AsyncCallback callback, object state)
{
throw new SystemException ("INTERNAL ERROR: this should not be called (or not supported yet)");
if (open_callback == null)
open_callback = new Action<TimeSpan> (OnOpen);
return open_callback.BeginInvoke (timeout, callback, state);
}

protected override void OnEndOpen (IAsyncResult result)
{
if (open_callback == null)
throw new InvalidOperationException ("Async open operation has not started");
open_callback.EndInvoke (result);
}

protected override void OnOpen (TimeSpan timeout)
Expand Down

0 comments on commit ef7b074

Please sign in to comment.