public bool Remove(string value) { Ring.IndexedLink findResult = _storage.Find(value); if (findResult == null) { return(false); } _storage.RemoveLink(findResult); return(true); }
public string this[int index] { get { return((string)_storage.FindAtIndex(index) .Value); } set { Ring.IndexedLink findResult = _storage.FindAtIndex(index); _storage.IncrementEditVersion(); findResult.RingLink.Value = value; } }
private DeviceBuffers GetDevice(ushort address) { Ring.IndexedLink indexedLink = _devices.Find(obj => ((DeviceBuffers)obj).Address == address); if (indexedLink != null) { return((DeviceBuffers)indexedLink.Value); } var temp = new DeviceBuffers(address); _devices.InsertTail(temp); return(temp); }
public int IndexOf(string value) { Ring.IndexedLink findResult = _storage.Find(value); return((findResult == null) ? -1 : findResult.Index); }