gpt4 book ai didi

sharpsvn - 使用方法 SVNClient.Diff Diff (SvnTarget target, SvnRevisionRange range, Stream results)

转载 作者:行者123 更新时间:2023-12-01 23:26:03 25 4
gpt4 key购买 nike

鉴于两个不同的修订需要获得它们之间的差异,我打算使用 duvuelve Diff 方法,但结果是什么,这可能是什么?谢谢。我的代码如下

using (SvnClient client = new SvnClient())
using (MemoryStream result = new MemoryStream())
{
client.Authentication.DefaultCredentials = new NetworkCredential("asdf", "asdf/*");
try
{
//SvnUriTarget is a wrapper class for SVN repository URIs
SvnUriTarget target = new SvnUriTarget(textBox1.Text);
if (client.Diff(target, rango, result))
MessageBox.Show("Successfully para" + rango.ToString() + ".");


StreamReader strReader = new StreamReader(result);

string str = strReader.ReadToEnd();
}
}

最佳答案

从 Diff() 函数返回的流位于流的末尾,因此在创建流读取器之前,您需要将其重新定位在流的开头:

result.Position = 0;
StreamReader strReader = new StreamReader(result);

关于sharpsvn - 使用方法 SVNClient.Diff Diff (SvnTarget target, SvnRevisionRange range, Stream results),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4676563/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com