public void RemoveAttachment(ActionAttachment attachment) { if (attachment == null) { throw new ArgumentNullException(nameof(attachment)); } if (attachment.Plant != Plant) { throw new ArgumentException($"Can't remove item in {attachment.Plant} from item in {Plant}"); } _attachments.Remove(attachment); }
public void AddAttachment(ActionAttachment attachment) { if (attachment == null) { throw new ArgumentNullException(nameof(attachment)); } if (attachment.Plant != Plant) { throw new ArgumentException($"Can't relate item in {attachment.Plant} to item in {Plant}"); } _attachments.Add(attachment); }