Ejemplo n.º 1
0
 public GceStepContent(
     IPublishDialog publishDialog,
     IGceDataSource dataSource = null,
     IWindowsCredentialsStore currentWindowsCredentialStore = null,
     Action <Instance> manageCredentialsPrompt = null) : this()
 {
     ViewModel = new GceStepViewModel(
         dataSource, currentWindowsCredentialStore, manageCredentialsPrompt, publishDialog);
 }
        private GceStepViewModel(GceStepContent content, IGceDataSource dataSource, IApiManager apiManager)
            : base(apiManager)
        {
            _content    = content;
            _dataSource = dataSource;

            ManageCredentialsCommand = new ProtectedCommand(OnManageCredentialsCommand, canExecuteCommand: false);
            EnableApiCommand         = new ProtectedAsyncCommand(OnEnableApiCommandAsync);
        }
        internal static GceStepViewModel CreateStep(IGceDataSource dataSource = null, IApiManager apiManager = null)
        {
            var content   = new GceStepContent();
            var viewModel = new GceStepViewModel(content, dataSource, apiManager);

            content.DataContext = viewModel;

            return(viewModel);
        }
Ejemplo n.º 4
0
 public GceStepContent(
     IPublishDialog publishDialog,
     IGceDataSource dataSource = null,
     IApiManager apiManager    = null,
     Func <Google.Apis.CloudResourceManager.v1.Data.Project> pickProjectPrompt = null,
     IWindowsCredentialsStore currentWindowsCredentialStore = null,
     Action <Instance> manageCredentialsPrompt = null) : this()
 {
     ViewModel = new GceStepViewModel(
         dataSource, apiManager, pickProjectPrompt,
         currentWindowsCredentialStore, manageCredentialsPrompt, publishDialog);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// For testing
 /// </summary>
 /// <param name="dataSourceOverride">Mockable data source.</param>
 internal GceSourceRootViewModel(IGceDataSource dataSourceOverride)
 {
     _dataSourceOverride = dataSourceOverride;
 }