public void Initialize(int?savedSize, double?sizeLimit) { if (savedSize.HasValue) { _selectedSize = Sizes.SingleOrDefault(x => x.ID == savedSize.Value); } if (_selectedSize == null) { _selectedSize = Sizes.First(); } if (sizeLimit.HasValue) { _sizeLimit = sizeLimit.Value; } else { _sizeLimit = _selectedSize.MaxValue; } }
public void Initialize() { _selectedSize = Sizes.First(); _sizeLimit = _selectedSize.MaxValue; }