AuthBridge.Clients.Util.DictionaryExtensions.AddDataIfNotEmpty C# (CSharp) Метод

AddDataIfNotEmpty() публичный статический Метод

Adds the value from an XDocument with the specified element name if it's not empty.
public static AddDataIfNotEmpty ( string>.this dictionary, System.Xml.Linq.XDocument document, string elementName ) : void
dictionary string>.this /// The dictionary. ///
document System.Xml.Linq.XDocument /// The document. ///
elementName string /// Name of the element. ///
Результат void
        public static void AddDataIfNotEmpty(
			this Dictionary<string, string> dictionary, XDocument document, string elementName)
        {
            var element = document.Root.Element(elementName);
            if (element != null)
            {
                dictionary.AddItemIfNotEmpty(elementName, element.Value);
            }
        }