Workspace类 - 无法创建实例 [英] Workspace class- can not create an instance

查看:123
本文介绍了Workspace类 - 无法创建实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想使用Workspace类的属性,abd我写道:

工作区w = new Workspace();

但我不能从这个类创建一个实例,我得到了这个错误:

类型'Microsoft.TeamFoundation.VersionControl.Client.Workspace'没有定义构造函数





我怎样才能获得这个属性?

Hi,
I want to use the properties of the Workspace class, abd I wrote this:
Workspace w= new Workspace();
But I cant create an instance from this class and I got this error:
The type 'Microsoft.TeamFoundation.VersionControl.Client.Workspace' has no constructors defined


How can I get to this properties??

推荐答案

请看我对这个问题的评论。你在问什么是没有意义的。库的用户无法访问此类的实例化。工作区由 Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer 创建:

http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client .versioncontrolserver(v = vs.110).aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client.versioncontrolserver.createworkspace.aspx [ ^ ]。



您需要阅读MSDN文档和其他来源,而不是仅仅尝试做某事而不了解它的运作。首先,你需要了解应该如何使用。



-SA
Please see my comment to the question. What are you asking makes no sense. The instantiation of this class is not accessible for the users of the library. The workspaces are created by Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer:
http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client.versioncontrolserver(v=vs.110).aspx[^],
http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client.versioncontrolserver.createworkspace.aspx[^].

You need to read MSDN documentation and other sources, instead of just trying to do something without understanding of its operations. First, you need to learn how things are supposed to be used.

—SA


这篇关于Workspace类 - 无法创建实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆