/// <summary>
 ///   Constructor.
 /// </summary>
 internal TransferProgress(GitTransferProgress gitTransferProgress)
 {
     this.gitTransferProgress = gitTransferProgress;
 }
示例#2
0
        /// <summary>
        /// The delegate with the signature that matches the native git_transfer_progress_callback function's signature.
        /// </summary>
        /// <param name="progress"><see cref="GitTransferProgress"/> structure containing progress information.</param>
        /// <param name="payload">Payload data.</param>
        /// <returns>the result of the wrapped <see cref="TransferProgressHandler"/></returns>
        private int GitDownloadTransferProgressHandler(ref GitTransferProgress progress, IntPtr payload)
        {
            bool shouldContinue = true;

            if (DownloadTransferProgress != null)
            {
                shouldContinue = DownloadTransferProgress(new TransferProgress(progress));
            }

            return Proxy.ConvertResultToCancelFlag(shouldContinue);
        }
 /// <summary>
 ///   The delegate with the signature that matches the native git_transfer_progress_callback function's signature.
 /// </summary>
 /// <param name="progress"><see cref = "GitTransferProgress" /> structure containing progress information.</param>
 /// <param name="payload">Payload data.</param>
 /// <returns>the result of the wrapped <see cref = "TransferProgressHandler" /></returns>
 private int OnGitTransferProgress(ref GitTransferProgress progress, IntPtr payload)
 {
     return onTransferProgress(new TransferProgress(progress));
 }