IVsWCFReferenceGroup.AsyncAddReference 方法

定义

以异步方式将 Windows Communication Foundation (WCF) 服务引用添加到引用组。

public:
 void AsyncAddReference(Microsoft::VisualStudio::Shell::Interop::IDiscoverySession ^ pDiscoverySession, System::String ^ pszUrl, Microsoft::VisualStudio::WCFReference::Interop::IVsWCFCompletionCallback ^ pCallback, System::Object ^ punknownCustomState, [Runtime::InteropServices::Out] Microsoft::VisualStudio::WCFReference::Interop::IVsWCFAsyncResult ^ % ppResult);
public:
 void AsyncAddReference(Microsoft::VisualStudio::Shell::Interop::IDiscoverySession ^ pDiscoverySession, Platform::String ^ pszUrl, Microsoft::VisualStudio::WCFReference::Interop::IVsWCFCompletionCallback ^ pCallback, Platform::Object ^ punknownCustomState, [Runtime::InteropServices::Out] Microsoft::VisualStudio::WCFReference::Interop::IVsWCFAsyncResult ^ &  ppResult);
void AsyncAddReference(Microsoft::VisualStudio::Shell::Interop::IDiscoverySession const & pDiscoverySession, std::wstring const & pszUrl, Microsoft::VisualStudio::WCFReference::Interop::IVsWCFCompletionCallback const & pCallback, winrt::Windows::Foundation::IInspectable const & punknownCustomState, [Runtime::InteropServices::Out] Microsoft::VisualStudio::WCFReference::Interop::IVsWCFAsyncResult const & & ppResult);
public void AsyncAddReference (Microsoft.VisualStudio.Shell.Interop.IDiscoverySession pDiscoverySession, string pszUrl, Microsoft.VisualStudio.WCFReference.Interop.IVsWCFCompletionCallback pCallback, object punknownCustomState, out Microsoft.VisualStudio.WCFReference.Interop.IVsWCFAsyncResult ppResult);
abstract member AsyncAddReference : Microsoft.VisualStudio.Shell.Interop.IDiscoverySession * string * Microsoft.VisualStudio.WCFReference.Interop.IVsWCFCompletionCallback * obj * IVsWCFAsyncResult -> unit
Public Sub AsyncAddReference (pDiscoverySession As IDiscoverySession, pszUrl As String, pCallback As IVsWCFCompletionCallback, punknownCustomState As Object, ByRef ppResult As IVsWCFAsyncResult)

参数

pDiscoverySession
IDiscoverySession

要使用的 IDiscoverySession。 可以为 Null。

pszUrl
String

一个 String 包含服务的 URL 的。

pCallback
IVsWCFCompletionCallback

用于 IVsWCFCompletionCallback 通知的接口。

punknownCustomState
Object

可从接口访问的自定义状态对象 IVsWCFAsyncResult 。 可以为 Null。

ppResult
IVsWCFAsyncResult

一个 IVsWCFAsyncResult 包含结果的接口。

注解

如果 VSHPROPID_ServiceReferenceSupported 客户端项目的属性为 false 或属性不受支持,则该方法将失败。

适用于