public static IEquipment Equip( this IEquipmentContainer container, IEquipment item, EquipmentConfiguration configuration) { Ensure.That(container, nameof(container)).IsNotNull(); Ensure.That(configuration, nameof(configuration)).IsNotNull(); configuration.Activate(); container.Add(item); return(item); }
public static Equipment Equip( [NotNull] this IEquipmentContainer container, [NotNull] Equipment item, [NotNull] EquipmentConfiguration configuration) { Ensure.Any.IsNotNull(container, nameof(container)); Ensure.Any.IsNotNull(item, nameof(item)); Ensure.Any.IsNotNull(configuration, nameof(configuration)); configuration.Activate(); container.Add(item); return(item); }