Ejemplo n.º 1
0
 /// <summary>
 /// Adds an element with the provided key and value to the dictionary.
 /// </summary>
 /// <param name="dic">The dictionary to extend.</param>
 /// <param name="key">The <see cref="AttributeName"/> to use as the key of the element to add.</param>
 /// <param name="value">The <see cref="bool"/> to use as the value of the element to add.</param>
 public static void AddBoolean(this IDictionary <AttributeName, AttributeValue> dic, string key, bool value)
 {
     Validator.ThrowIfNull(dic, nameof(dic));
     Validator.ThrowIfNullOrWhitespace(key, nameof(key));
     dic.Add(key, AttributeValueFactory.CreateBoolean(value));
 }