diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-06-16 16:50:45 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-06-16 16:50:45 -0700 |
commit | 89c2167a677ebb23aca7f1e9592af7954a093fff (patch) | |
tree | 37c513a0cfae1cee641051d345b6cbffd5216538 /src/DotNetOpenAuth.AspNet/Clients/DictionaryExtensions.cs | |
parent | c74bede6f773bd0a0c6362a6647a2939554ccd9a (diff) | |
download | DotNetOpenAuth-89c2167a677ebb23aca7f1e9592af7954a093fff.zip DotNetOpenAuth-89c2167a677ebb23aca7f1e9592af7954a093fff.tar.gz DotNetOpenAuth-89c2167a677ebb23aca7f1e9592af7954a093fff.tar.bz2 |
Removes Microsoft AspNet project.
Compatibility with it is broken due to the async changes in DNOA.
Diffstat (limited to 'src/DotNetOpenAuth.AspNet/Clients/DictionaryExtensions.cs')
-rw-r--r-- | src/DotNetOpenAuth.AspNet/Clients/DictionaryExtensions.cs | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/DictionaryExtensions.cs b/src/DotNetOpenAuth.AspNet/Clients/DictionaryExtensions.cs deleted file mode 100644 index a84fdcf..0000000 --- a/src/DotNetOpenAuth.AspNet/Clients/DictionaryExtensions.cs +++ /dev/null @@ -1,59 +0,0 @@ -//----------------------------------------------------------------------- -// <copyright file="DictionaryExtensions.cs" company="Microsoft"> -// Copyright (c) Microsoft. All rights reserved. -// </copyright> -//----------------------------------------------------------------------- - -namespace DotNetOpenAuth.AspNet.Clients { - using System; - using System.Collections.Generic; - using System.Collections.Specialized; - using System.Xml.Linq; - - /// <summary> - /// The dictionary extensions. - /// </summary> - internal static class DictionaryExtensions { - /// <summary> - /// Adds the value from an XDocument with the specified element name if it's not empty. - /// </summary> - /// <param name="dictionary"> - /// The dictionary. - /// </param> - /// <param name="document"> - /// The document. - /// </param> - /// <param name="elementName"> - /// Name of the element. - /// </param> - internal static void AddDataIfNotEmpty( - this NameValueCollection dictionary, XDocument document, string elementName) { - var element = document.Root.Element(elementName); - if (element != null) { - dictionary.AddItemIfNotEmpty(elementName, element.Value); - } - } - - /// <summary> - /// Adds a key/value pair to the specified dictionary if the value is not null or empty. - /// </summary> - /// <param name="dictionary"> - /// The dictionary. - /// </param> - /// <param name="key"> - /// The key. - /// </param> - /// <param name="value"> - /// The value. - /// </param> - internal static void AddItemIfNotEmpty(this NameValueCollection dictionary, string key, string value) { - if (key == null) { - throw new ArgumentNullException("key"); - } - - if (!string.IsNullOrEmpty(value)) { - dictionary[key] = value; - } - } - } -} |