/// <summary> /// called when receive from the other peer offline message /// </summary> /// <param name="compactPresenceInfo">contain the presence information of the peer that send the message</param> void IAnnouncementBusinessLogic.OnOfflineAnnouncementReceived(CompactPresenceInfo compactPresenceInfo) { if (compactPresenceInfo is MyCompactPresenceInfo) { var info = compactPresenceInfo as MyCompactPresenceInfo; var removed = false; MyUserUpdateState state; lock (syncLock) { if (MyStateDictionary.TryGetValue(info.CorrelateKey, out state)) { removed = MyStateDictionary.Remove(info.CorrelateKey); } } if (removed) { LogManager.GetCurrentClassLogger().Debug("peer with key: {0} and name: {1} go offline", info.CorrelateKey, state.Name); } else { LogManager.GetCurrentClassLogger().Debug("peer with key: {0} was not found !", info.CorrelateKey); } } }
void IAnnouncementBusinessLogic.OnOfflineAnnouncementReceived(CompactPresenceInfo compactPresenceInfo) { Contract.Requires <ArgumentNullException>(compactPresenceInfo != null); }