I am trying to create a simple contact manager for Lync 2010 UCMA.
I'm using an NotificationReceived
event, and testing if IsFullNotification
flag is set. I hoped that as groups are added, there will be no "IsFullNotification".
But such an event never happens, it is always set to true
.
How can I still get a full list of contacts with already added groups (as they are added successfully) to remap the contacts before adding the number of newly created.
P.S. Translated using translate.google.com
_contactGroupServices.NotificationReceived += OnNotificationReceived;
_contactGroupServices.BeginSubscribe(ar =>
{
try
{
_contactGroupServices.EndSubscribe(ar);
}
catch (RealTimeException rtex)
{
Console.WriteLine(rtex);
}
}
, null);
the handler:
void OnNotificationReceived(object sender, ContactGroupNotificationEventArgs e)
{
Console.WriteLine("Received a contact update.");
if (e.IsFullNotification) //always this value :(
{
ExtractContactGroupInfo(e);
AddGroups();
}
else
{
HandleAddedGroupNotification(e); // The LINE
}
}
I've marked the line that I need to execute when all groups were added. And also I will need current value of ContactGroupNotificationEventArgs e
.