Я сделал небольшое приложение, которое позволяет мне обновляться, когда один из моих контактов имеет изменение доступности. В настоящее время я регистрирую это только.Lync Client SDK: получение иногда странно ContactAvailability
Я нашел большой Ressource здесь: https://rcosic.wordpress.com/2011/11/17/availability-presence-in-lync-client/
Которые в основном советуют следующее:
//Register to a contact
Contact contactByUri = _lyncClient.ContactManager.GetContactByUri(user.UserUri);
contactByUri.ContactInformationChanged += new EventHandler(Self_ContactInformationChanged);
void Self_ContactInformationChanged(object sender, ContactInformationChangedEventArgs e)
{
Contact self = sender as Contact;
// has user changed his availability (therefore, his presence status)?
if (e.ChangedContactInformation.Contains(ContactInformationType.Availability))
{
ContactAvailability availability = (ContactAvailability)self.GetContactInformation(ContactInformationType.Availability);
string activity = (string)self.GetContactInformation(ContactInformationType.Activity);
OnAvailabilityChanged(availability, activity);
}
}
Где Доступность является один из следующих:
Invalid (-1),
None (0) – Do not use this enumerator. This flag indicates that the cotact state is unspecified.,
Free (3500) – A flag indicating that the contact is available,
FreeIdle (5000) – Contact is free but inactive,
Busy (6500) – A flag indicating that the contact is busy and inactive,
BusyIdle (7500) – Contact is busy but inactive,
DoNotDisturb (9500) – A flag indicating that the contact does not want to be disturbed,
TemporarilyAway (12500) – A flag indicating that the contact is temporarily away,
Away (15500) – A flag indicating that the contact is away,
Offline (18500) – A flag indicating that the contact is signed out.
Большую часть времени , все работает нормально, но через несколько дней я получаю ContactAvailability
= None
.
Я хотел бы знать, почему, и если есть что-то, что я могу сделать, чтобы решить эту проблему? (Как сбросить клиентский sdk, ...)?