Perforce API 的 .net 包装器?
我目前正在 .NET 4 中开发一个应用程序,它必须与 Perforce 服务器交互。
我的团队之前使用 Perforce API 开发了某种包装器,但它缺少相当多的用例,并且无法正确处理异常。简而言之,这不是我真正可以按原样使用的东西,因为它需要付出相当大的努力才能使其尽可能“防弹”。
我想知道 .NET 是否存在可以正确处理异常的 Perforce API 包装器?
当我评估我们内部包装器的可用性时,我提出了我们的应用程序需要处理的异常和用例列表(并且包装器需要抛出)。
该列表非常详尽,这促使我想知道某种包装器是否已经存在。
I'm currently developing an application in .NET 4 which has to interact with a Perforce server.
My team previously developed some sort of wrapper using the Perforce API, but its missing quite a few use-cases and doesn't properly handle exceptions. In short, it's not something that I can really use as-is, as it would require considerable effort to make it as "bullet-proof" as possible.
I was wondering if there's a Perforce API wrapper that exists for .NET which properly handles exceptions ?
As I was evaluating the usability of our in-house wrapper, I came up with a list of exceptions and use-cases our application would need to handle (and the wrapper would need to throw).
The list was quite exhaustive, which prompted me to wonder if some sort of wrapper already existed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能需要查看P4API.NET 库,由 Perforce 提供。或者您可以使用 P4.NET 库,该库不是来自当然,但已经存在了一段时间了。
我已经使用过 P4.NET 好几次了,并且非常满意。您可以在此处获取 .NET 4 库,因为我相信原始库仅支持.NET 2。
You might want to check out the P4API.NET library, which is provided by Perforce. Or you could use the P4.NET library, which isn't an official release from Perforce, but has been around for a while.
I've used P4.NET several times, and been pretty happy with it. You can get the .NET 4 libraries here, as I believe the original library only had support for .NET 2.
还有我的(没有经过充分测试的)p4 exe 的 c# 包装器。与其他方法相比,它的主要(唯一?)优点是它也可以在单声道下构建和工作。它不依赖于 COM 或 perforce C++ 库。
https://github.com/inorton/p4-sharp
PS我并不想成为将其存储在 github 中很有趣:)
There is also my (not that well tested) c# wrapper around the p4 exe. The main (only?) advantage of this over the others is that it builds and works under mono too. It does not depend on COM or the perforce C++ libraries.
https://github.com/inorton/p4-sharp
P.S. I wasn't trying to be funny by storing it in github :)