/// <summary> /// Atomically adds values to the array key, only if not already present. /// </summary> /// <param name="key"></param> /// <param name="values"></param> public void AddAllUnique(string key, IEnumerable values) { if (string.IsNullOrEmpty(key)) { throw new ArgumentNullException(nameof(key)); } if (values == null) { throw new ArgumentNullException(nameof(values)); } LCAddUniqueOperation op = new LCAddUniqueOperation(new List <object>(values.Cast <object>())); ApplyOperation(key, op); }
/// <summary> /// Atomically adds value to the array key, only if not already present. /// </summary> /// <param name="key"></param> /// <param name="value"></param> public void AddUnique(string key, object value) { if (string.IsNullOrEmpty(key)) { throw new ArgumentNullException(nameof(key)); } if (value == null) { throw new ArgumentNullException(nameof(value)); } LCAddUniqueOperation op = new LCAddUniqueOperation(new List <object> { value }); ApplyOperation(key, op); }