/// <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> /// Constructor. /// </summary> internal TransferProgress(GitTransferProgress gitTransferProgress) { this.gitTransferProgress = gitTransferProgress; }
/// <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))); }