diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-15 14:31:08 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-15 14:31:08 -0700 |
commit | f609820f0486cf92edab48c3fbd5adfc133263bc (patch) | |
tree | 56d1ebda5f75be8d572e0a093b311a81bc920e16 /src/DotNetOpenAuth.Test/Mocks/CoordinatingOutgoingWebResponse.cs | |
parent | 139c9be97c1ecc42e98426f8bf888eff2ab64659 (diff) | |
download | DotNetOpenAuth-f609820f0486cf92edab48c3fbd5adfc133263bc.zip DotNetOpenAuth-f609820f0486cf92edab48c3fbd5adfc133263bc.tar.gz DotNetOpenAuth-f609820f0486cf92edab48c3fbd5adfc133263bc.tar.bz2 |
Renamed UserAgentResponse to OutgoingWebResponse, and DirectWebResponse to IncomingWebResponse.
Diffstat (limited to 'src/DotNetOpenAuth.Test/Mocks/CoordinatingOutgoingWebResponse.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/Mocks/CoordinatingOutgoingWebResponse.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Test/Mocks/CoordinatingOutgoingWebResponse.cs b/src/DotNetOpenAuth.Test/Mocks/CoordinatingOutgoingWebResponse.cs new file mode 100644 index 0000000..07f9bc9 --- /dev/null +++ b/src/DotNetOpenAuth.Test/Mocks/CoordinatingOutgoingWebResponse.cs @@ -0,0 +1,34 @@ +//----------------------------------------------------------------------- +// <copyright file="CoordinatingOutgoingWebResponse.cs" company="Andrew Arnott"> +// Copyright (c) Andrew Arnott. All rights reserved. +// </copyright> +//----------------------------------------------------------------------- + +namespace DotNetOpenAuth.Test.Mocks { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using DotNetOpenAuth.Messaging; + + internal class CoordinatingOutgoingWebResponse : OutgoingWebResponse { + private CoordinatingChannel receivingChannel; + + /// <summary> + /// Initializes a new instance of the <see cref="CoordinatingOutgoingWebResponse"/> class. + /// </summary> + /// <param name="message">The direct response message to send to the remote channel. This message will be cloned.</param> + /// <param name="receivingChannel">The receiving channel.</param> + internal CoordinatingOutgoingWebResponse(IProtocolMessage message, CoordinatingChannel receivingChannel) { + ErrorUtilities.VerifyArgumentNotNull(message, "message"); + ErrorUtilities.VerifyArgumentNotNull(receivingChannel, "receivingChannel"); + + this.receivingChannel = receivingChannel; + this.OriginalMessage = message; + } + + public override void Send() { + this.receivingChannel.PostMessage(this.OriginalMessage); + } + } +} |