diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-08-31 21:09:46 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-09-01 11:02:47 -0700 |
commit | d5fb1dbbc8388eac763ef85310097a618ff90437 (patch) | |
tree | 09e7ec86209b02bf2097ca0e1103f877f4530433 | |
parent | 0160f8d043d6b2dbbeb344d69594d7fe02119906 (diff) | |
download | DotNetOpenAuth-d5fb1dbbc8388eac763ef85310097a618ff90437.zip DotNetOpenAuth-d5fb1dbbc8388eac763ef85310097a618ff90437.tar.gz DotNetOpenAuth-d5fb1dbbc8388eac763ef85310097a618ff90437.tar.bz2 |
Some StyleCop adjustments.
-rw-r--r-- | src/DotNetOAuth/.gitignore | 1 | ||||
-rw-r--r-- | src/DotNetOAuth/Consumer.cs | 6 | ||||
-rw-r--r-- | src/DotNetOAuth/DictionaryXmlReader.cs | 31 | ||||
-rw-r--r-- | src/DotNetOAuth/DictionaryXmlWriter.cs | 11 | ||||
-rw-r--r-- | src/DotNetOAuth/DirectMessageChannel.cs | 6 | ||||
-rw-r--r-- | src/DotNetOAuth/IProtocolMessage.cs | 8 | ||||
-rw-r--r-- | src/DotNetOAuth/IProtocolMessageRequest.cs | 7 | ||||
-rw-r--r-- | src/DotNetOAuth/IndirectMessage.cs | 7 | ||||
-rw-r--r-- | src/DotNetOAuth/IndirectMessageEncoder.cs | 6 |
9 files changed, 35 insertions, 48 deletions
diff --git a/src/DotNetOAuth/.gitignore b/src/DotNetOAuth/.gitignore index 2a08796..31c006d 100644 --- a/src/DotNetOAuth/.gitignore +++ b/src/DotNetOAuth/.gitignore @@ -1,3 +1,4 @@ +StyleCop.Cache *.user bin obj diff --git a/src/DotNetOAuth/Consumer.cs b/src/DotNetOAuth/Consumer.cs index 66a6b05..7082727 100644 --- a/src/DotNetOAuth/Consumer.cs +++ b/src/DotNetOAuth/Consumer.cs @@ -1,8 +1,4 @@ -using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace DotNetOAuth {
+namespace DotNetOAuth {
/// <summary>
/// A website or application that uses OAuth to access the Service Provider on behalf of the User.
/// </summary>
diff --git a/src/DotNetOAuth/DictionaryXmlReader.cs b/src/DotNetOAuth/DictionaryXmlReader.cs index 38e27cb..ff6ef51 100644 --- a/src/DotNetOAuth/DictionaryXmlReader.cs +++ b/src/DotNetOAuth/DictionaryXmlReader.cs @@ -1,13 +1,12 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Xml;
-using System.Xml.Linq;
-using System.IO;
-using System.Diagnostics;
-
-namespace DotNetOAuth {
+namespace DotNetOAuth {
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics;
+ using System.IO;
+ using System.Linq;
+ using System.Xml;
+ using System.Xml.Linq;
+
/// <summary>
/// An XmlReader-looking object that actually reads from a dictionary.
/// </summary>
@@ -19,7 +18,9 @@ namespace DotNetOAuth { /// <param name="fields">The dictionary to read data from.</param>
/// <returns>The XmlReader that will read the data out of the given dictionary.</returns>
internal static XmlReader Create(XName rootElement, IDictionary<string, string> fields) {
- if (fields == null) throw new ArgumentNullException("fields");
+ if (fields == null) {
+ throw new ArgumentNullException("fields");
+ }
return CreateRoundtripReader(rootElement, fields);
// The pseudo reader MAY be more efficient, but it's buggy.
@@ -46,8 +47,12 @@ namespace DotNetOAuth { }
static void SerializeDictionaryToXml(XmlWriter writer, XName rootElement, IDictionary<string, string> fields) {
- if (writer == null) throw new ArgumentNullException("writer");
- if (fields == null) throw new ArgumentNullException("fields");
+ if (writer == null) {
+ throw new ArgumentNullException("writer");
+ }
+ if (fields == null) {
+ throw new ArgumentNullException("fields");
+ }
writer.WriteStartElement(rootElement.LocalName, rootElement.NamespaceName);
// The elements must be serialized in alphabetical order so the DataContractSerializer will see them.
diff --git a/src/DotNetOAuth/DictionaryXmlWriter.cs b/src/DotNetOAuth/DictionaryXmlWriter.cs index 8312d5b..0068f21 100644 --- a/src/DotNetOAuth/DictionaryXmlWriter.cs +++ b/src/DotNetOAuth/DictionaryXmlWriter.cs @@ -1,10 +1,9 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Xml;
+namespace DotNetOAuth {
+ using System;
+ using System.Collections.Generic;
+ using System.Text;
+ using System.Xml;
-namespace DotNetOAuth {
/// <summary>
/// An XmlWriter-looking object that actually saves data to a dictionary.
/// </summary>
diff --git a/src/DotNetOAuth/DirectMessageChannel.cs b/src/DotNetOAuth/DirectMessageChannel.cs index 72b45d8..2ece51d 100644 --- a/src/DotNetOAuth/DirectMessageChannel.cs +++ b/src/DotNetOAuth/DirectMessageChannel.cs @@ -1,8 +1,4 @@ -using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace DotNetOAuth {
+namespace DotNetOAuth {
internal class DirectMessageChannel {
public void Send(IProtocolMessage message) {
throw new System.NotImplementedException();
diff --git a/src/DotNetOAuth/IProtocolMessage.cs b/src/DotNetOAuth/IProtocolMessage.cs index fb1ef96..a1ba259 100644 --- a/src/DotNetOAuth/IProtocolMessage.cs +++ b/src/DotNetOAuth/IProtocolMessage.cs @@ -1,8 +1,8 @@ -using System;
-using System.Collections.Generic;
-using System.Text;
+namespace DotNetOAuth {
+ using System;
+ using System.Collections.Generic;
+ using System.Text;
-namespace DotNetOAuth {
/// <summary>
/// The interface that classes must implement to be serialized/deserialized
/// as OAuth messages.
diff --git a/src/DotNetOAuth/IProtocolMessageRequest.cs b/src/DotNetOAuth/IProtocolMessageRequest.cs index 84b56e1..5d38b41 100644 --- a/src/DotNetOAuth/IProtocolMessageRequest.cs +++ b/src/DotNetOAuth/IProtocolMessageRequest.cs @@ -1,9 +1,6 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+namespace DotNetOAuth {
+ using System;
-namespace DotNetOAuth {
/// <summary>
/// Implemented by messages that are sent as requests.
/// </summary>
diff --git a/src/DotNetOAuth/IndirectMessage.cs b/src/DotNetOAuth/IndirectMessage.cs index 114bdc7..98295bf 100644 --- a/src/DotNetOAuth/IndirectMessage.cs +++ b/src/DotNetOAuth/IndirectMessage.cs @@ -1,9 +1,6 @@ -using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Net;
+namespace DotNetOAuth {
+ using System.Net;
-namespace DotNetOAuth {
public class IndirectMessage {
public WebHeaderCollection Headers { get; set; }
diff --git a/src/DotNetOAuth/IndirectMessageEncoder.cs b/src/DotNetOAuth/IndirectMessageEncoder.cs index 53caef1..3f55b71 100644 --- a/src/DotNetOAuth/IndirectMessageEncoder.cs +++ b/src/DotNetOAuth/IndirectMessageEncoder.cs @@ -1,8 +1,4 @@ -using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace DotNetOAuth {
+namespace DotNetOAuth {
internal class IndirectMessageEncoder {
public IndirectMessage Encode(IProtocolMessage message) {
throw new System.NotImplementedException();
|