UccCategoryContextEvent Constructor

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Initializes a new instance of the UccCategoryContextEvent Class .

Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)

Syntax

'Declaration
Protected Sub New
protected UccCategoryContextEvent ()
protected:
UccCategoryContextEvent ()
protected UccCategoryContextEvent ()
protected function UccCategoryContextEvent ()

Remarks

As an abstract class, UccCategoryContextEvent does not provide a callable constructor. Instead, a client must handle a presentity event to obtain an instance of this class. The default IUccCategoryContextEvent interface specifies the methods and properties exposed by this class.

Example

The following example handles the OnCategoryContextAdded event and uses the provided UccCategoryContextEvent class instance to advise for category context events.

void _IUccPresentityEvents.OnCategoryContextAdded(
   UccPresentity pEventSource,
   UccCategoryContextEvent pCategoryCtxt)
{
   IUccContext c = pCategoryCtxt.Context;
   String contextName = pCategoryCtxt.CategoryContext.Name.ToLower();
   if (contextName == "contactcard" ||
     contextName == "state" ||
     contextName == "note" ||
     contextName == "freebusy")
   {
      //Advise for category context events to get notified when
      //corresponding instances are published
      UCC_Advise<_IUccCategoryContextEvents>(
         pCategoryCtxt.CategoryContext, 
         this);
   }
}

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2000 with Service Pack 4, Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also

Reference

UccCategoryContextEvent Class
UccCategoryContextEvent Members
Microsoft.Office.Interop.UccApi Namespace

Other Resources

Code Listing: Basic Event Registration and Other Helper Methods in C#