public StoreItem(Item item) { this._item = item; _updateQualityStrategy = new DefaultUpdateQualityStrategy(); if (Name == "Aged Brie") { _updateQualityStrategy = new BetterWithTimeUpdateQualityStrategy(); } if (Name == "Sulfuras, Hand of Ragnaros") { _updateQualityStrategy = new LegendaryUpdateQualityStrategy(); } if (Name == "Backstage passes to a TAFKAL80ETC concert") { _updateQualityStrategy = new BackstagePassUpdateQualityStrategy(); } }
public ItemWrapper(Item item) { this.item = item; this.updateQualityStrategy = UpdateQualityFactory.Create(item); }