This class is the model for a GAE traffic allocation.
Inheritance: Model
Beispiel #1
0
        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();
            }
        }
        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();
            }
        }