private static void RaiseCapabilityParticipantRemoved(ICapability capability, IParticipant participant) { try { if (CapabilityParticipantRemoved != null) { FormInvoke(CapabilityParticipantRemoved, new object[] { capability, new ParticipantEventArgs(participant) } ); } if (logActivity == true) { eventLog.WriteEntry("CapabilityParticipantRemoved " + capability.ToString() + ":" + participant.ToString(), EventLogEntryType.Information, 1); } } catch (ThreadAbortException) {} catch (Exception e) { eventLog.WriteEntry(e.ToString(),EventLogEntryType.Error, 99); } }
private static void RemoveParticipant(IParticipant participant) { foreach(ICapability ic in participant.Capabilities) { DisposeCapability(ic); } participants.Remove(participant.Identifier); try { if (ParticipantRemoved != null) { FormInvoke(ParticipantRemoved, new object[] { participant } ); } if (logActivity == true) { eventLog.WriteEntry("Removed " + participant.ToString(), EventLogEntryType.Information, 2); } } catch (ThreadAbortException) {} catch (Exception e) { eventLog.WriteEntry(e.ToString() ,EventLogEntryType.Error, 99); } }
private static void RaiseCapabilityParticipantAdded(ICapability capability, IParticipant participant) { try { if (CapabilityParticipantAdded != null) { FormInvoke(CapabilityParticipantAdded, new object[] { capability, new ParticipantEventArgs(participant) } ); } if (logActivity == true) { eventLog.WriteEntry(string.Format(CultureInfo.CurrentCulture, Strings.CapabilityParticipantAdded, capability.ToString(), participant.ToString()), EventLogEntryType.Information, 1); } } catch (ThreadAbortException) {} catch (Exception e) { eventLog.WriteEntry(e.ToString(),EventLogEntryType.Error, 99); } }