/// <summary>
        /// Opens the dialog to manage traffic splitting for the GAE service and
        /// updates the traffic split if the user makes a change.
        /// </summary>
        private void OnSplitTraffic()
        {
            SplitTrafficChange change = SplitTrafficWindow.PromptUser(Service, _versions);

            if (change == null)
            {
                return;
            }

            TrafficSplit split = new TrafficSplit()
            {
                ShardBy     = change.ShardBy,
                Allocations = change.Allocations,
            };

            UpdateTrafficSplit(split);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Opens the dialog to manage traffic splitting for the GAE service and
        /// updates the traffic split if the user makes a change.
        /// </summary>
        private async Task OnSplitTrafficAsync()
        {
            SplitTrafficChange change = SplitTrafficWindow.PromptUser(Service, _versions.Select(x => x.Version));

            if (change == null)
            {
                return;
            }

            TrafficSplit split = new TrafficSplit()
            {
                ShardBy     = change.ShardBy,
                Allocations = change.Allocations,
            };

            await UpdateTrafficSplitAsync(split);
        }