VCWebServiceProxyGeneratorTool.URL 属性

命名空间:  Microsoft.VisualStudio.VCProjectEngine
程序集:  Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

语法

声明
Property URL As String
string URL { get; set; }
property String^ URL {
    String^ get ();
    void set (String^ value);
}
abstract URL : string with get, set
function get URL () : String
function set URL (value : String)

属性值

类型:System.String
用户指定“更新 Web 引用”命令时使用的 URL。

示例

有关如何编译和运行此示例的信息,请参见 如何:编译项目模型扩展性示例代码

下面的示例在集成开发环境 (ide) 中修改 URL 属性 (IDE):

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs As IVCCollection
        Dim cfg As VCFileConfiguration
        Dim file As VCFile
        Dim tool As VCWebServiceProxyGeneratorTool
        prj = DTE.Solution.Projects.Item(1).Object
        file = prj.AddWebReference_
          ("https://localhost /webservice1/webservice1.vsdisco")
        MsgBox(file.Name)
        cfgs = file.FileConfigurations
        MsgBox(cfgs.Count)
        cfg = cfgs.Item(1)
        MsgBox(cfg.Name)
        tool = cfg.Tool
        MsgBox(tool.URL)
    End Sub
End Module

.NET Framework 安全性

请参见

参考

VCWebServiceProxyGeneratorTool 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间