public void Perform(AssetList list, BaseObject source = null, BaseObject target = null) { switch (_mode) { case Mode.Source: if (source != null) { if (_operator == Operator.Add) { list.Add(source); } else { list.Remove(source); } } break; case Mode.Target: if (target != null) { if (_operator == Operator.Add) { list.Add(target); } else { list.Remove(target); } } break; case Mode.AssetList: if (_assetList != null) { if (_operator == Operator.Add) { list.AddRange(_assetList); } else { list.RemoveRange(_assetList); } } break; } }