public void Copy(RecyclingData data) { if (data == null) { return; } this.DecidedItemList.Clear(); if (!data.DecidedItemList.IsNullOrEmpty <StuffItem>()) { foreach (StuffItem decidedItem in data.DecidedItemList) { this.DecidedItemList.Add(new StuffItem(decidedItem)); } } this.CreatedItemList.Clear(); if (!data.CreatedItemList.IsNullOrEmpty <StuffItem>()) { foreach (StuffItem createdItem in data.CreatedItemList) { this.CreatedItemList.Add(new StuffItem(createdItem)); } } this.CreateCounter = data.CreateCounter; this.CreateCountEnabled = data.CreateCountEnabled; }
public RecyclingData(RecyclingData data) { this.Copy(data); }