VCWebServiceProxyGeneratorTool.URL 屬性

取得或設定當使用者指定 [更新 Web 參考] 命令時所使用的 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。

範例

請參閱HOW TO:編譯專案模型擴充性的範例程式碼如需有關如何編譯及執行這個範例資訊。

下列範例會修改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 命名空間