下面是从工作副本(祖先文件夹)中排除文件夹的一些代码。当我在该行中断时,“r”显示System.InvalidOperationException。排除工作吗?使用SharpSVN .NET库时,我可以选择什么选项。对于任何其他深度类型,我都没有遇到与排除有关的任何问题。SharpSVN:SvnDepth.Exclude抛出异常
SvnUpdateArgs updateArgs2 = new SvnUpdateArgs();
updateArgs2.Depth = SvnDepth.Exclude;
SvnUpdateResult r = null;
client.Update(path, updateArgs2, out r);
string x = r.ToString();
r.GetType().GenericParemeterAttributes
= “ 'r.GetType()。GenericParameterAttributes' 扔 'System.InvalidOperationException' 类型的异常”
r.GetType().GenericParemeterAttributes.base
=“方法可以仅被称为上的键入,其Type.IsGenericParameter为true“。
我不确定它指的是哪种类型。
===========
编辑:
这个工作!
SvnUpdateArgs updateArgs2 = new SvnUpdateArgs();
updateArgs2.Depth = SvnDepth.Exclude;
updateArgs2.KeepDepth = true;
SvnUpdateResult r = null;
client.Update(path, updateArgs2, out r);
当我使用此代码时,出现此错误:“您只能裁剪节点到空和文件之间的深度。参数名称:toDepth ...实际值为Exclude。” – MacGyver
添加“KeepDepth = true”为原始代码工作!非常感谢你!! – MacGyver
你知道我可以在哪里下载SharpSVN的实际源代码吗?什么网站是该图书馆的来源? – MacGyver