Ejemplo n.º 1
0
        /// <summary>
        /// Retrieves the configuration cache from the data provided.
        /// </summary>
        /// <param name="requestData">Data containing the build request entry.</param>
        /// <param name="toolsVersion">Tools version used to build the request.</param>
        /// <returns>BuildRequestConfigurationTestExtension which contains the configuration retrieved from the cache. Can return NULL if the entry for the data is not in the cache.</returns>
        public BuildRequestConfigurationTestExtension GetConfigurationFromCache(BuildRequestData requestData, string toolsVersion)
        {
            BuildRequestConfiguration unresolvedConfiguration = new BuildRequestConfiguration(requestData, toolsVersion);
            BuildRequestConfiguration resolvedConfiguration   = this.ConfigCache.GetMatchingConfiguration(unresolvedConfiguration);

            if (resolvedConfiguration == null)
            {
                return(null);
            }

            return(TestExtensionHelper.Create <BuildRequestConfigurationTestExtension, BuildRequestConfiguration>(resolvedConfiguration, this));
        }
        /// <summary>
        /// BuildResult for a specified configuration id.
        /// </summary>
        /// <param name="configurationId">Configuration id.</param>
        /// <returns>BuildResultTestExtension for the configuration id.</returns>
        public BuildResultTestExtension GetResultFromCache(int configurationId)
        {
            BuildResult result = this.ResultsCache.GetResultsForConfiguration(configurationId);

            return(TestExtensionHelper.Create <BuildResultTestExtension, BuildResult>(result, this));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Starts the request and blocks until results are available.
        /// </summary>
        /// <returns>BuildResultTestExtension of the submitted build request. Returns only after the build is completed.</returns>
        public BuildResultTestExtension Execute()
        {
            BuildResult result = this.BuildSubmission.Execute();

            return(TestExtensionHelper.Create <BuildResultTestExtension, BuildResult>(result, this));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Convenience method.  Submits a lone build request and blocks until results are available.
        /// </summary>
        /// <param name="parameters">Build settings to use.</param>
        /// <param name="requestData">Data containing the request to build.</param>
        /// <returns>BuildResultTestExtension which contains the BuildResult instance returned to the internal BuildManager.</returns>
        public BuildResultTestExtension Build(BuildParameters parameters, BuildRequestData requestData)
        {
            BuildResult result = this.BuildManager.Build(parameters, requestData);

            return(TestExtensionHelper.Create <BuildResultTestExtension, BuildResult>(result, this));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Submits a build request to the current build but does not start it immediately.  Allows the user to
        /// perform asynchronous execution or access the submission ID prior to executing the request.
        /// </summary>
        /// <param name="requestData">Data containing the request to build.</param>
        /// <returns>BuildSubmissionTestExtension which contains the BuildSubmission instance returned to the internal BuildManager.</returns>
        public BuildSubmissionTestExtension PendBuildRequest(BuildRequestData requestData)
        {
            BuildSubmission submission = this.BuildManager.PendBuildRequest(requestData);

            return(TestExtensionHelper.Create <BuildSubmissionTestExtension, BuildSubmission>(submission, this));
        }