public BaseInventory(IItemController controller, IInventoryUser user, InventoryConfig config) { InventoryId = Guid.NewGuid().ToString(); _items = new Dictionary <string, IItemInstance>(); Controller = controller ?? throw new ArgumentNullException(nameof(controller)); _user = user ?? throw new ArgumentNullException(nameof(user)); Config = config ?? throw new ArgumentNullException(nameof(config)); _filterIds = new List <string>(); if (Config.ItemFilterConfig != null) { _filterIds.Add(Controller.CreateFilterFromConfig(Config.ItemFilterConfig)); } Controller.RegisterNewInventory(this); }