/// <summary> /// Constructs the settings object for a specific build using the access token provided by Azure Pipelines. /// </summary> /// <param name="buildId">ID of the build.</param> /// <returns>The instance of <see cref="AzureDevOpsBuildSettings"/> class.</returns> public static AzureDevOpsBuildSettings UsingAzurePipelinesOAuthToken(int buildId) { buildId.NotNegativeOrZero(nameof(buildId)); var accessToken = EnvironmentVariableHelper.GetSystemAccessToken(); return(new AzureDevOpsBuildSettings(buildId, new AzureDevOpsOAuthCredentials(accessToken))); }
/// <summary> /// Constructs the settings object using the access token provided by Azure Pipelines. /// </summary> /// <returns>The instance of <see cref="AzureDevOpsBuildsSettings"/> class.</returns> public static AzureDevOpsBuildsSettings UsingAzurePipelinesOAuthToken() { var accessToken = EnvironmentVariableHelper.GetSystemAccessToken(); return(new AzureDevOpsBuildsSettings(new AzureDevOpsOAuthCredentials(accessToken))); }