IVsWCFReferenceEvents 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.
Raises events for Windows Communication Foundation (WCF) service references.
public interface class IVsWCFReferenceEvents
public interface class IVsWCFReferenceEvents
__interface IVsWCFReferenceEvents
[System.Runtime.InteropServices.Guid("729D5091-E77F-4D0B-B03A-2310AD58DDC2")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsWCFReferenceEvents
[<System.Runtime.InteropServices.Guid("729D5091-E77F-4D0B-B03A-2310AD58DDC2")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsWCFReferenceEvents = interface
Public Interface IVsWCFReferenceEvents
- Attributes
Examples
The following example demonstrates a class that handles WCF service reference events.
/// Listens to referenceGroup events and notifies the controller of the events.
class ReferenceEventsListener : WCF.IVsWCFReferenceEvents, IDisposable
{
private IExplorerController controller;
private WCF.IVsWCFReferenceManager referenceManager;
private uint cookie;
private bool hasCookie = false;
public ReferenceEventsListener(IExplorerController controller,
WCF.IVsWCFReferenceManager referenceManager)
{
this.controller = controller;
this.referenceManager = referenceManager;
referenceManager.AdviseWCFReferenceEvents(this, out cookie);
Debug.Assert(cookie != 0);
hasCookie = true;
}
void WCF.IVsWCFReferenceEvents.OnMetadataChanged
(WCF.IVsWCFReferenceGroup pReferenceGroup)
{
controller.Log(String.Format(CultureInfo.InvariantCulture,
Resources.LogEventFired, "IVsWCFReferenceEvents.OnMetadataChanged",
pReferenceGroup.GetName()));
controller.Update();
}
void WCF.IVsWCFReferenceEvents.OnMetadataChanging
(WCF.IVsWCFReferenceGroup pReferenceGroup)
{
controller.Log(String.Format(CultureInfo.InvariantCulture,
Resources.LogEventFired, "IVsWCFReferenceEvents.OnMetadataChanging",
pReferenceGroup.GetName()));
}
void WCF.IVsWCFReferenceEvents.OnReferenceGroupPropertiesChanged
(WCF.IVsWCFReferenceGroup pReferenceGroup)
{
controller.Log(String.Format(CultureInfo.InvariantCulture,
Resources.LogEventFired,
"IVsWCFReferenceEvents.OnReferenceGroupPropertiesChanged",
pReferenceGroup.GetName()));
controller.Update();
}
void WCF.IVsWCFReferenceEvents.OnReferenceGroupPropertiesChanging
(WCF.IVsWCFReferenceGroup pReferenceGroup)
{
controller.Log(String.Format(CultureInfo.InvariantCulture,
Resources.LogEventFired,\"IVsWCFReferenceEvents.
ReferenceGroupPropertiesChanging", pReferenceGroup.GetName()));
}
void WCF.IVsWCFReferenceEvents.OnConfigurationChanged()
{
controller.Log(String.Format(CultureInfo.InvariantCulture,
Resources.LogEventFiredGeneric,
"IVsWCFReferenceEvents.OnConfigurationChanged"));
controller.Update();
}
void WCF.IVsWCFReferenceEvents.OnReferenceGroupCollectionChanged()
{
controller.Log(String.Format(CultureInfo.InvariantCulture,
Resources.LogEventFiredGeneric,
"IVsWCFReferenceEvents.OnReferenceGroupCollectionChanged"));
controller.Update();
}
void WCF.IVsWCFReferenceEvents.OnReferenceGroupCollectionChanging()
{
controller.Log(String.Format(CultureInfo.InvariantCulture,
Resources.LogEventFiredGeneric,
"IVsWCFReferenceEvents.OnReferenceGroupCollectionChanging"));
}
}
Methods
OnConfigurationChanged() |
Raises the ConfigurationChanged event. |
OnMetadataChanged(IVsWCFReferenceGroup) |
Raises the MetaDataChanged event. |
OnMetadataChanging(IVsWCFReferenceGroup) |
Raises the MetaDataChanged event. |
OnReferenceGroupCollectionChanged() |
Raises an event after a new reference is added or an existing reference is deleted. |
OnReferenceGroupCollectionChanging() |
Raises an event after a new reference is added or an existing reference is deleted. |
OnReferenceGroupPropertiesChanged(IVsWCFReferenceGroup) |
Raises an event after reference group properties (including name, namespace, proxy generation options and URL) for a particular reference group are changed. |
OnReferenceGroupPropertiesChanging(IVsWCFReferenceGroup) |
Raises an event before reference group properties (including name, namespace, proxy generation options and URL) for a particular reference group are changed. |