diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-25 16:57:17 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-09-25 16:57:17 -0700 |
commit | 50e34bfe7224576e901efa6748598d31c36df3a5 (patch) | |
tree | 4c9f820f54bb5578addbf064136f712dcf35c5c7 /src/DotNetOAuth.Test/Scenarios/Coordinator.cs | |
parent | a9fb696c40441e06ef817d7e28bae74c6a6cb6e4 (diff) | |
download | DotNetOpenAuth-50e34bfe7224576e901efa6748598d31c36df3a5.zip DotNetOpenAuth-50e34bfe7224576e901efa6748598d31c36df3a5.tar.gz DotNetOpenAuth-50e34bfe7224576e901efa6748598d31c36df3a5.tar.bz2 |
Fixed lots of StyleCop issues and refacted Consumer/Service Provider a bit.
Diffstat (limited to 'src/DotNetOAuth.Test/Scenarios/Coordinator.cs')
-rw-r--r-- | src/DotNetOAuth.Test/Scenarios/Coordinator.cs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/DotNetOAuth.Test/Scenarios/Coordinator.cs b/src/DotNetOAuth.Test/Scenarios/Coordinator.cs index 45518a2..c3eaad6 100644 --- a/src/DotNetOAuth.Test/Scenarios/Coordinator.cs +++ b/src/DotNetOAuth.Test/Scenarios/Coordinator.cs @@ -6,11 +6,7 @@ namespace DotNetOAuth.Test.Scenarios {
using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
using System.Threading;
- using DotNetOAuth.Messaging;
using DotNetOAuth.ChannelElements;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -18,8 +14,8 @@ namespace DotNetOAuth.Test.Scenarios { /// Runs a Consumer and Service Provider simultaneously so they can interact in a full simulation.
/// </summary>
internal class Coordinator {
- Actor consumerAction;
- Actor serviceProviderAction;
+ private Actor consumerAction;
+ private Actor serviceProviderAction;
/// <summary>Initializes a new instance of the <see cref="Coordinator"/> class.</summary>
/// <param name="consumerAction">The code path of the Consumer.</param>
@@ -36,6 +32,8 @@ namespace DotNetOAuth.Test.Scenarios { this.serviceProviderAction = serviceProviderAction;
}
+ internal delegate void Actor(OAuthChannel channel);
+
/// <summary>
/// Gets or sets the signing element the Consumer channel should use.
/// </summary>
@@ -44,19 +42,17 @@ namespace DotNetOAuth.Test.Scenarios { /// </remarks>
internal SigningBindingElementBase SigningElement { get; set; }
- internal delegate void Actor(OAuthChannel channel);
-
/// <summary>
/// Starts the simulation.
/// </summary>
internal void Start() {
- if (SigningElement == null) {
+ if (this.SigningElement == null) {
throw new InvalidOperationException("SigningElement must be set first.");
}
// Prepare channels that will pass messages directly back and forth.
- CoordinatingOAuthChannel consumerChannel = new CoordinatingOAuthChannel(SigningElement);
- CoordinatingOAuthChannel serviceProviderChannel = new CoordinatingOAuthChannel(SigningElement);
+ CoordinatingOAuthChannel consumerChannel = new CoordinatingOAuthChannel(this.SigningElement);
+ CoordinatingOAuthChannel serviceProviderChannel = new CoordinatingOAuthChannel(this.SigningElement);
consumerChannel.RemoteChannel = serviceProviderChannel;
serviceProviderChannel.RemoteChannel = consumerChannel;
|