private void OnAddTrafficAllocationCommand() { var result = AddTrafficSplitWindow.PromptUser(_availableVersions); if (result != null) { var allocation = new SplitTrafficModel( versionId: result.Version, trafficAllocation: result.Allocation); // Remove the allocation from the list of available allocations to in future invocations the // user can only select the available ones. _availableVersions.Remove(allocation.VersionId); // Add the allocation to the list. Allocations.Add(allocation); // Update the visual state. UpdateCommands(); } }