public DataInventoryStructure([NotNull] DataInventory dataInventory, [NotNull] IEnumerable <DataSlot> slots) { DataInventory = dataInventory; _slots = new HashSet <DataSlot>(slots); Contract.Assert(_slots.Any(), "Collection should not be empty!"); Contract.Assert(_slots.Select(slot => slot.GetType()).Distinct().Count() == 1, "Must be the only one type of slot in the collection"); }
void IDataInventorySetter.SetDataInventory(DataInventory dataInventory) => DataInventory = dataInventory;