This documentation is archived and is not being maintained.

UccOperationContext Class

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.

Represents a co-creatable class for an application-defined operational context. The class can be co-created.

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

'Declaration
Public Class UccOperationContext
public class UccOperationContext
public class UccOperationContext

This class implements the IUccOperationContext interface. The default interface is IUccOperationContext. An application obtains the default interface on the class instance directly. Non-default interfaces, if any, can be obtained by calling QueryInterface on the default interface. This class can be co-created.

Unified Communications Client API supports this interface to provide a means correlate requests with the corresponding asynchronous responses. A client can assign an operational ID to indicate the sequence of a particular request. The client can then read the operation ID of a response to ascertain if the response matches the request. Other contextual information can be dispatched as well. The contextual information a client can dispatch with an operation is encapsulated by an IUccContext instance and held by the Context property of UccOperationContext. An event handler that receives an event corresponding to the executed operation has access to the original operation context by means of the event data argument passed to the event handler.

Win32 COM/C++ Syntax

coclass UccOperationContext
{
   [default] interface IUccOperationContext;
};

System.Object
  Microsoft.Office.Interop.UccApi.UccOperationContext

Creating a new instance of the UccOperationContext class is simply a matter of calling the default constructor for the class as follows. Once a new UccOperationContext class is created, an application should create an IUccContext instance with at least one property value.

/// <summary>
/// Taking a property key and value, method creates
/// an operation context and returns value
/// </summary>
/// <param name="Id">Operation Id assigned to operation</param>
/// <param name="key">named property key</param>
/// <param name="value">named property value</param>
/// <returns>initialized operation context object</returns>
private UccOperationContext createOperationContext(int opId, string key, string value)
{
    UccOperationContext oc = new UccOperationContext();
    UccContext c = new UccContextClass();
    c.AddNamedProperty(key, value);

    oc.Initialize(opId, c);
    return oc;
}

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

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

Show: