/// <summary> /// Constructor /// </summary> /// <param name="jobName">Name to associate with this work</param> /// <param name="onlineUrls"></param> /// <param name="userName"></param> /// <param name="password"></param> /// <param name="taskOptions"></param> /// <param name="manualActions"></param> public TaskMaster( string jobName, TableauServerUrls onlineUrls, string userName, string password, TaskMasterOptions taskOptions, CustomerManualActionManager manualActions = null) { this.JobName = jobName; _manualActions = manualActions; if(_manualActions == null) { _manualActions = new CustomerManualActionManager(); } //Get any export path _exportToLocalPath = taskOptions.GetOptionValue(TaskMasterOptions.OptionParameter_PathDownloadTo); _onlineUrls = onlineUrls; _userName = userName; _password = password; //Store the status log at the class level where it is accessable _statusLog = new TaskStatusLogs(); //Store the options _taskOptions = taskOptions; if(_taskOptions.IsOptionSet(TaskMasterOptions.Option_LogVerbose)) { _statusLog.SetStatusLoggingLevel(int.MinValue); } }
/// <summary> /// Constructor /// </summary> /// <param name="jobName">Name to associate with this work</param> /// <param name="onlineUrls"></param> /// <param name="userName"></param> /// <param name="password"></param> /// <param name="taskOptions"></param> /// <param name="manualActions"></param> public TaskMaster( string jobName, TableauServerUrls onlineUrls, string userName, string password, TaskMasterOptions taskOptions, CustomerManualActionManager manualActions = null) { this.JobName = jobName; _manualActions = manualActions; if (_manualActions == null) { _manualActions = new CustomerManualActionManager(); } //Get any export path _exportToLocalPath = taskOptions.GetOptionValue(TaskMasterOptions.OptionParameter_PathDownloadTo); _onlineUrls = onlineUrls; _userName = userName; _password = password; //Store the status log at the class level where it is accessable _statusLog = new TaskStatusLogs(); //Store the options _taskOptions = taskOptions; if (_taskOptions.IsOptionSet(TaskMasterOptions.Option_LogVerbose)) { _statusLog.SetStatusLoggingLevel(int.MinValue); } }
/// <summary> /// Sanity cehck for sign in /// </summary> /// <param name="siteUrl"></param> /// <param name="signInUser"></param> /// <param name="signInPassword"></param> /// <returns></returns> private bool ValidateSignInPossible(string siteUrl, bool useAccessToken, string signInUser, string signInPassword) { var testSignInStatusLog = new TaskStatusLogs(); testSignInStatusLog.SetStatusLoggingLevel(int.MinValue); try { TableauServerSignIn.VerifySignInPossible(siteUrl, useAccessToken, signInUser, signInPassword, testSignInStatusLog); } catch { MessageBox.Show("Sign in to your Tableau Server failed. Please check URL and credentials"); textBoxStatus.Text = testSignInStatusLog.StatusText; textBoxErrors.Text = testSignInStatusLog.ErrorText; return(false); } return(true); }
/// <summary> /// Sanity cehck for sign in /// </summary> /// <param name="siteUrl"></param> /// <param name="signInUser"></param> /// <param name="signInPassword"></param> /// <returns></returns> private bool ValidateSignInPossible(string siteUrl, string signInUser, string signInPassword) { var testSignInStatusLog = new TaskStatusLogs(); testSignInStatusLog.SetStatusLoggingLevel(int.MinValue); try { TableauServerSignIn.VerifySignInPossible(siteUrl, signInUser, signInPassword, testSignInStatusLog); } catch { MessageBox.Show("Sign in to your Tableau Server failed. Please check URL and credentials"); textBoxStatus.Text = testSignInStatusLog.StatusText; textBoxErrors.Text = testSignInStatusLog.ErrorText; return false; } return true; }