C# Class GoogleCloudExtension.SplitTrafficManagement.SplitTrafficViewModel

This class is the view model for the SplitTrafficWindow dialog.
Inheritance: GoogleCloudExtension.Utils.ViewModelBase
Exibir arquivo Open project: GoogleCloudPlatform/google-cloud-visualstudio

Public Methods

Method Description
SplitTrafficViewModel ( SplitTrafficWindow owner, Service service, IEnumerable versions ) : Google.Apis.Appengine.v1.Data

Private Methods

Method Description
GetAllocations ( Service service ) : ObservableCollection

Get a list of traffic allocations of a service's versions as SplitTrafficModel

GetAvailableVersions ( Service service, IEnumerable versions ) : IList

Get a list of versions that are not allocated traffic in a service.

OnAddTrafficAllocationCommand ( ) : void
OnDeleteCommand ( ) : void

Called when the user clicks the Delete button. This will remove the given version (VersionId>) from the list of Allocations and adds the version to the the list of AvailableVersions.

OnSaveCommand ( ) : void

Called when the user clicks the Save button. This handles error checks, populates the Result field and closes the dialog.

UpdateCommands ( ) : void

Method Details

SplitTrafficViewModel() public method

public SplitTrafficViewModel ( SplitTrafficWindow owner, Service service, IEnumerable versions ) : Google.Apis.Appengine.v1.Data
owner SplitTrafficWindow
service Service
versions IEnumerable
return Google.Apis.Appengine.v1.Data