public void AddEventHandlerRecord(string optionKey, int notificationId) { lock (Records) { var r = new HandlerRecord() { HandlerThreadId = Thread.CurrentThread.ManagedThreadId, MarshalOption = MarshalOption.UserDefined, MarshalKey = optionKey, NotificationId = notificationId }; Records.Add(r); } }
public void AddEventHandlerRecord(MarshalOption option, int notificationId) { lock (Records) { var r = new HandlerRecord() { HandlerThreadId = Thread.CurrentThread.ManagedThreadId, MarshalOption = option, MarshalKey = option.ToString(), NotificationId = notificationId }; Records.Add(r); } }