summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/DictionaryXmlReader.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-08-31 21:09:46 -0700
committerAndrew <andrewarnott@gmail.com>2008-09-01 11:02:47 -0700
commitd5fb1dbbc8388eac763ef85310097a618ff90437 (patch)
tree09e7ec86209b02bf2097ca0e1103f877f4530433 /src/DotNetOAuth/DictionaryXmlReader.cs
parent0160f8d043d6b2dbbeb344d69594d7fe02119906 (diff)
downloadDotNetOpenAuth-d5fb1dbbc8388eac763ef85310097a618ff90437.zip
DotNetOpenAuth-d5fb1dbbc8388eac763ef85310097a618ff90437.tar.gz
DotNetOpenAuth-d5fb1dbbc8388eac763ef85310097a618ff90437.tar.bz2
Some StyleCop adjustments.
Diffstat (limited to 'src/DotNetOAuth/DictionaryXmlReader.cs')
-rw-r--r--src/DotNetOAuth/DictionaryXmlReader.cs31
1 files changed, 18 insertions, 13 deletions
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.