IUccSession.Participants Property
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.
Returns the collection of participants that are currently participating in the session.
Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)
Syntax
'Declaration
ReadOnly Property Participants As IUccCollection
IUccCollection Participants { get; }
property IUccCollection^ Participants {
IUccCollection^ get ();
}
/** @property */
IUccCollection get_Participants ()
function get Participants () : IUccCollection
Property Value
A value of the IUccCollection** (IUccCollection, for a .NET application) type. This returns a collection of IUccSessionParticipant instances.
Remarks
As a collection, the Particpants property yields an object that implements IEnumerable. For this reason, a client can iterate over the collection and perform operations on each session participant. In addition, the collection members can be accessed individually when the client provides an integer index value. For example:
IUccSessionParticipant thisParticipant = this.session.Participants[1];
returns the first participant in the session participant collection where this.session
is an instance of IUccSession.
An instance of IUccSessionParticipant from the session participant collection provides the key to a great deal of functionality. The interface exposes the IUccUri representing the endpoint of the remote user through the Uri property. Using the exposed IUccUri interface, a local client can perform such functions as:
Subscribe to a session participant. In other words, add the session participant to the local user's contact list.
Un-subscribe to a session participant
Change the access level of a session participant.
Initiate a new session individually with a session participant. In other words, a local participant in a multi-user conference can start up an individual instant messaging session with one of the conference participants concurrently with the conference.
The collection itself can provide a client with information such as the number of participants in a session through the Count property. As participants leave a session, the client is notifed via the OnRemoveParticipant event. When the number of participants reaches zero, the client can automatically terminate the session.
Win32 COM/C++ Syntax
HRESULT get_Participants
(
IUccCollection** ppParticipants
);
Note
In a Win32 application, the return value of a method or property is always an HRESULT value indicating the status of the call to the interface member. Any result of the operation is returned as a parameter marked with the [out, retval] attribute. In contrast, in a .NET application the HRESULT value indicating an error condition is returned as a COM exception and the [out, retval] parameter becomes the return value. For the UCC API-defined HRESULT values, see Trace and Handle Errors in Unified Communications Client API.
Example
The following example is a public property exposed by an application class that wraps an IUccSession instance (this._session
). The get accessor obtains the participant count through the Participants collection of the session.
/// <summary>
/// returns the value of the Count property
/// from the session participants collection
/// of the current session (this._session)
/// </summary>
public int SessionParticipantCount
{
get
{
return this._session.Participants.Count;
}
}
Thread Safety
All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.
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
IUccSession Interface
IUccSession Members
Microsoft.Office.Interop.UccApi Namespace