public bool Equals(ItemTypeModel other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(other.ItemType, ItemType)); }
public bool Equals(ItemTypeModel other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.ItemType, ItemType); }
private void RemoveItem(ItemTypeModel itemTypeModel) { foreach (var paragraph in Paragraphs) { var toRemove = paragraph.RecievedItems.Where(item => item.BasicItem.Equals(itemTypeModel)).ToList(); foreach (var item in toRemove) { paragraph.RecievedItems.Remove(item); } } foreach (var edge in Edges) { // TODO: Finish //edge.RecievedItems.RemoveAll(item => item.BasicItem == itemTypeModel); //edge.RequestedItems.RemoveAll(item => item.BasicItem == itemTypeModel); } Items.Remove(itemTypeModel); }
public ItemUnitModel(ItemUnit itemUnit) { ItemUnit = itemUnit; m_ItemTypeModel = new ItemTypeModel(itemUnit.BasicItem); }