IVsAddWebReferenceResult Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains data gathered by the Add Service Reference dialog box.
public interface class IVsAddWebReferenceResult
public interface class IVsAddWebReferenceResult
__interface IVsAddWebReferenceResult
[System.Runtime.InteropServices.Guid("4B85C5EF-9089-4E4C-A310-325BF87BAF23")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsAddWebReferenceResult
[<System.Runtime.InteropServices.Guid("4B85C5EF-9089-4E4C-A310-325BF87BAF23")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsAddWebReferenceResult = interface
Public Interface IVsAddWebReferenceResult
- Attributes
Examples
The following example demonstrates how to return the results of the Add Service Reference dialog box by using the IVsAddWebReferenceResult interface.
/// Add a service reference to the given project.
private static IVsWCFReferenceGroup TryAddServiceReference
(IVsHierarchy hierarchy, IServiceProvider serviceProvider,
IDiscoverySession discoverySession)
{
Debug.Assert(serviceProvider != null, "Why are we passing in a NULL
service provider to a private method?");
IVsAddWebReferenceDlg3 awrdlg =
serviceProvider.GetService(typeof(SVsAddWebReferenceDlg3))
as IVsAddWebReferenceDlg3;
IVsAddWebReferenceResult addWebReferenceResult = null;
int cancelled = 1;
if (awrdlg != null && hierarchy != null)
{
awrdlg.ShowAddWebReferenceDialog( hierarchy, discoverySession, ServiceReferenceType.SRT_WCFReference, null, null, null, out addWebReferenceResult, out cancelled);
}
if (addWebReferenceResult != null && cancelled == 0)
{
return addWebReferenceResult.Save() as IVsWCFReferenceGroup;
}
else
{
return null;
}
}
Remarks
The IVsAddWebReferenceResult interface represents the data gathered by the Add Service Reference dialog box.
Methods
GetDetail() |
Returns an interface that exposes additional properties of a service reference in the Add Service Reference dialog box. |
GetReferenceName() |
Returns the name of a service reference in the Add Service Reference dialog box. |
GetReferenceNamespace() |
Returns the namespace of a service reference in the Add Service Reference dialog box. |
GetReferenceType() |
Returns the ServiceReferenceType of a service reference in the Add Service Reference dialog box. |
GetReferenceUrl() |
Returns the URL for a service reference in the Add Service Reference dialog box. |
Save() |
Saves reference metadata in the project and creates a new Windows Communication Foundation (WCF) service reference. |