Assembly: ININ.IceLib.Directories (in ININ.IceLib.Directories.dll) Version: 0.0.0.0 (22.3.0.218)
Syntax
C# |
---|
public class ContactDirectory |
Visual Basic |
---|
Public Class ContactDirectory |
Remarks
Note |
---|
Contact directories contain lists of people and contact information about those people. In Interaction Client, the default directory for private contacts is named IC Private Contacts, the default directory for public contacts is IC Public Contacts, and the directory which holds all company employees is the Company Directory. |
A ContactDirectory object manages a watched list of ContactEntry objects. In addition, there are methods to create, update or delete contact entries. The directory watched is identified by a specific directory as identified by a DirectoryMetadata object instance.
Getting a list of watched objects
Each watched object is maintained internally within a cache. The cache is constructed so that only one instance of a ContactEntry object is shared between other instances of a ContactDirectory object.
This object contains synchronous as well as asynchronous counterpart methods for any method that could potentially block a thread by running a lengthy operation. Synchronous methods block the thread that they are performed on. Asynchronous methods will not block. When an asynchronous method completes an event is raised on a thread appropriate to the application-model, such as the GUI thread in a UI application. By convention, synchronous calls are invoked by a method; for example: DoSomething(). Their asynchronous counterparts are invoked via DoSomethingAsync() with the result returned in a DoSomethingCompleted event.
A start watch, via a call to StartWatching()()()() or StartWatchingAsync(AsyncCompletedEventHandler, Object), is required to retrieve the available contact entries from the IC Server. Once the start watch has successfully completed, call GetList()()()() to obtain the available contact entries.
Change notifications to the list of contact entries can be subscribed to via the ContactDirectoryChanged event handler. Change events are not raised on a thread appropriate to the application mode, such as the GUI thread in a UI application.
A watch can be stopped via a call to StopWatching()()()() or StopWatchingAsync(AsyncCompletedEventHandler, Object).
Viewed watches
A viewed watch allows only a subset of the contact entries to be retrieved from the IC server. A viewed watch is established by creating a watch settings instance, ContactDirectoryWatchSettings, which specifies the start index, count of entries to return, a filter and a sort order. The viewed watch is established via a call to watch aware start watch methods - StartWatching(ContactDirectoryWatchSettings) or StartWatchingAsync(ContactDirectoryWatchSettings, AsyncCompletedEventHandler, Object).
Once a viewed start watch has been established, the view can be changed by a call to ChangeWatched(ContactDirectoryWatchSettings) or ChangeWatchedAsync(ContactDirectoryWatchSettings, AsyncCompletedEventHandler, Object). Typically, the watch settings can be adjusted to advance to the Next()()()() page or go back to the Previous()()()() page.
Change notifications to the viewed list of contact entries can be subscribed to via the ContactDirectoryChanged event handler. Note that only change events for objects in the watch settings view will be reported. In particular, objects might appear or disappear in scope based on the filter or sort criteria. No more than Count contact entries will be maintained. So, for example, if an item is added to the view, an item will also be removed from the view to keep the Count unchanged.
Contact entry updates
Contact entries can be created, updated and deleted with the following synchronous and asynchronous methods.
- CreateContactEntry(EditableContactEntry) or CreateContactEntryAsync(EditableContactEntry, AsyncCompletedEventHandler, Object)
- UpdateContactEntry(EditableContactEntry) or UpdateContactEntryAsync(EditableContactEntry, AsyncCompletedEventHandler, Object)
- DeleteContactEntry(String) or DeleteContactEntryAsync(String, AsyncCompletedEventHandler, Object)
A EditableContactEntry instance is required for creating and updating contact entries.
Speed dial contact entries
A speed dial directory represents a link to another contact entry in another directory. When viewing the properties of a speed dial contact entry you are actually viewing the properties of the linked contact entry. Within the speed dial directory an alternate primary number designation may be specified. The PrimaryNumberDesignation is the default number to call.
Speed dial links can be created, updated, and deleted with the following synchronous or asynchronous methods.
- CreateSpeedDialLink(DirectoryMetadata, ContactEntry, ContactPrimaryNumberDesignation) or CreateSpeedDialLinkAsync(DirectoryMetadata, ContactEntry, ContactPrimaryNumberDesignation, AsyncCompletedEventHandler, Object)
- UpdateSpeedDialLink(ContactEntry, ContactPrimaryNumberDesignation) or UpdateSpeedDialLinkAsync(ContactEntry, ContactPrimaryNumberDesignation, AsyncCompletedEventHandler, Object)
- DeleteContactEntry(String) or DeleteContactEntryAsync(String, AsyncCompletedEventHandler, Object)
Inheritance Hierarchy
ININ.IceLib.Directories..::..ContactDirectory
Version Information
For 4.0, supported for IC Server version 4.0 GA and beyond.
For 3.0, supported for IC Server version 3.0 GA and beyond.