private void TagRemoveExcuted() { List <TagItem> toberemoved = new List <TagItem>(); foreach (TagItem tag in selectedTags) { toberemoved.Add(tag); } foreach (TagItem tag in toberemoved) { if (tag.Tag.TagID != null) { TagRemoved(tag.Tag, tagRemovedCallBack); } tags.Remove(tag); } }
public void GivenEmptyCollection_WhenRemovingTag_ThenNothingHappens() { // Arrange // Act _tags.Remove <string>(); // Assert Assert.That(_tags.GetCount <string>(), Is.Zero); }
private void TagRemoved(string tag) { foreach (var item in TagCollection) { if (item.Text == tag) { item.Count--; if (item.Count < 1) { TagCollection.Remove(item); } return; } } }
public TagData Set(TagInfo source, string protocol = InventoryInfo.ISO15693) { var tag = this.Build(source, protocol); var exist = FindTag(source.UID, null); if (exist == null) { _tags.Add(tag); } else { _tags.Remove(exist); _tags.Add(tag); } return(tag); }