Exemplo n.º 1
0
        public void AddTag(Tag tag)
        {
            // TODO:  Verify tag is not already on truck

            FoodTruckTag foodTruckTag = new FoodTruckTag(this, tag);

            this.tags.Add(foodTruckTag);
            this.SetObjectModified();
        }
Exemplo n.º 2
0
        public void AddTag(Tag tag)
        {
            // If the tag is already on the truck, then just return
            // A different implementation may throw an exception here, but for
            // a food truck tag, it is OK just to return
            if (_tags.Any(t => t.Tag == tag))
            {
                return;
            }

            FoodTruckTag foodTruckTag = new FoodTruckTag(this, tag);

            _tags.Add(foodTruckTag);
            SetObjectModified();
        }
Exemplo n.º 3
0
 public void RemoveTag(FoodTruckTag foodTruckTag)
 {
     foodTruckTag.SetDeleted();
     SetObjectModified();
 }