TaskMasterOptions.GetOptionValue C# (CSharp) Method

GetOptionValue() public method

Get the value of an option
public GetOptionValue ( string optionName ) : string
optionName string
return string
    public string GetOptionValue(string optionName)
    {
        string optionValue;
        bool exists = _optionMapper.TryGetValue(optionName, out optionValue);
        if (!exists) return null;
        return optionValue;
    }

Usage Example

Esempio n. 1
0
    /// <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);
        }
    }
All Usage Examples Of TaskMasterOptions::GetOptionValue