コード例 #1
0
 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");
 }
コード例 #2
0
 void IDataInventorySetter.SetDataInventory(DataInventory dataInventory) => DataInventory = dataInventory;