summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-09-29 23:16:41 -0700
committerAndrew <andrewarnott@gmail.com>2008-10-02 07:33:55 -0700
commit5cbd5d7edb994f874b265ed2e7c43f0bcd27b6ac (patch)
treea7b11de02bc213b279906aaa4aafc7d15ff09bac /src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
parent55c86fc27084af191bbb80fb91da34c24b945c3e (diff)
downloadDotNetOpenAuth-5cbd5d7edb994f874b265ed2e7c43f0bcd27b6ac.zip
DotNetOpenAuth-5cbd5d7edb994f874b265ed2e7c43f0bcd27b6ac.tar.gz
DotNetOpenAuth-5cbd5d7edb994f874b265ed2e7c43f0bcd27b6ac.tar.bz2
Removed the queue/dequeue methodology of queued responses. Now the methods that generate them return them.
Besides simplifying the API somewhat, this change allows for Consumer, ServiceProvider and Channel classes to be entirely threadsafe and reusable.
Diffstat (limited to 'src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs')
-rw-r--r--src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs b/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
index 67f5ad6..5b74342 100644
--- a/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
+++ b/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
@@ -68,17 +68,18 @@ namespace DotNetOAuth.Test.Scenarios {
return this.AwaitIncomingMessage();
}
- protected override void SendDirectMessageResponse(IProtocolMessage response) {
+ protected override Response SendDirectMessageResponse(IProtocolMessage response) {
TestBase.TestLogger.InfoFormat("Sending response: {0}", response);
this.RemoteChannel.incomingMessage = CloneSerializedParts(response, null);
this.CopyDirectionalParts(response, this.RemoteChannel.incomingMessage);
this.RemoteChannel.incomingMessageSignal.Set();
+ return null;
}
- protected override void SendIndirectMessage(IDirectedProtocolMessage message) {
+ protected override Response SendIndirectMessage(IDirectedProtocolMessage message) {
TestBase.TestLogger.Info("Next response is an indirect message...");
// In this mock transport, direct and indirect messages are the same.
- this.SendDirectMessageResponse(message);
+ return this.SendDirectMessageResponse(message);
}
protected override HttpRequestInfo GetRequestFromContext() {