IVsWCFReferenceEvents Interface

Raises events for Windows Communication Foundation (WCF) service references.

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

Syntax

'Declaration
<InterfaceTypeAttribute()> _
<GuidAttribute("729D5091-E77F-4D0B-B03A-2310AD58DDC2")> _
Public Interface IVsWCFReferenceEvents
'Usage
Dim instance As IVsWCFReferenceEvents
[InterfaceTypeAttribute()]
[GuidAttribute("729D5091-E77F-4D0B-B03A-2310AD58DDC2")]
public interface IVsWCFReferenceEvents
[InterfaceTypeAttribute()]
[GuidAttribute(L"729D5091-E77F-4D0B-B03A-2310AD58DDC2")]
public interface class IVsWCFReferenceEvents
public interface IVsWCFReferenceEvents

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"));
    }
}

See Also

Reference

IVsWCFReferenceEvents Members

Microsoft.VisualStudio.WCFReference.Interop Namespace