internal static void ClearAttachments(object parent) { lock (Attachments) { Attachments.Remove(parent); } }
public void RemoveUser(string UserId) { if (!string.IsNullOrEmpty(UserId)) { _list.Remove(UserId, out _); } }
public void SetAttachment(string name, object attach) { lock (Attachments) { if (name == null) { Attachments.Clear(); } else if (attach == null) { Attachments.Remove(name); } else { Attachments[name] = attach; } } }
public void CleanupListeners() { LinkedList <string> keysToRemove = null; foreach (var g in listeners) { g.Value.RemoveAll(x => !x.IsValid); if (g.Value.Count == 0) { if (keysToRemove == null) { keysToRemove = new LinkedList <string>(); } keysToRemove.AddLast(g.Key); } } if (keysToRemove != null) { foreach (var k in keysToRemove) { listeners.Remove(k, out _); } } }
public void RemoveDevice(object key) { devices.Remove(key.ToString(), out var value); }
public void Delete(byte[] key) { System.Numerics.BigInteger nkey = new System.Numerics.BigInteger(key); this.wb.Delete(key); cache.Remove(nkey, out byte[] v); }