/// <summary>Asynchronously downloads a XAP file and adds all exported parts to the catalog.</summary>
        /// <param name="relativeUri">The relative URI for the XAP file to be downloaded.</param>
        /// <returns>The asynchronous download <see cref="Task"/>.</returns>
        public Task AddXapAsync(string relativeUri)
        {
            XapDownloadOperation operation;
            if (XapDownloadOperations.TryGetValue(relativeUri, out operation) && !operation.Task.IsFaulted)
                return operation.Task;

            operation = XapDownloadOperations[relativeUri] = new XapDownloadOperation(relativeUri, this);
            return operation.Task;
        }
        /// <summary>Asynchronously downloads a XAP file and adds all exported parts to the catalog.</summary>
        /// <param name="relativeUri">The relative URI for the XAP file to be downloaded.</param>
        /// <returns>
        ///     The asynchronous download <see cref="Task" />.
        /// </returns>
        public Task AddXapAsync(string relativeUri)
        {
            XapDownloadOperation operation;

            if (_xapDownloadOperations.TryGetValue(relativeUri, out operation) && !operation.Task.IsFaulted)
            {
                return(operation.Task);
            }

            operation = _xapDownloadOperations[relativeUri] = new XapDownloadOperation(relativeUri, this);
            return(operation.Task);
        }