次の方法で共有


IVsWCFReferenceGroup.AddReference Method

Adds a Windows Communication Foundation (WCF) service reference to a reference group.

Namespace:  Microsoft.VisualStudio.WCFReference.Interop
Assembly:  Microsoft.VisualStudio.WCFReference.Interop (in Microsoft.VisualStudio.WCFReference.Interop.dll)

Syntax

'宣言
Sub AddReference ( _
    pDiscoverySession As IDiscoverySession, _
    pszUrl As String _
)
void AddReference(
    IDiscoverySession pDiscoverySession,
    string pszUrl
)
void AddReference(
    [InAttribute] IDiscoverySession^ pDiscoverySession, 
    [InAttribute] String^ pszUrl
)
abstract AddReference : 
        pDiscoverySession:IDiscoverySession * 
        pszUrl:string -> unit 
function AddReference(
    pDiscoverySession : IDiscoverySession, 
    pszUrl : String
)

Parameters

  • pszUrl
    Type: String
    A String that contains the URL for the service.

Remarks

When the VSHPROPID_ServiceReferenceSupported property of the client project is false or the property is not supported, the AddReference method fails.

.NET Framework Security

See Also

Reference

IVsWCFReferenceGroup Interface

Microsoft.VisualStudio.WCFReference.Interop Namespace