private void OnRegister(object sender, DdemlRegistrationEventArgs internalArgs) { EventHandler<DdeRegistrationEventArgs> copy; // To make this thread-safe we need to hold a local copy of the reference to the invocation list. This works because delegates are // immutable. lock (_LockObject) { copy = _RegisterEvent; } if (copy != null) copy(this, new DdeRegistrationEventArgs(internalArgs)); }
internal DdeRegistrationEventArgs(DdemlRegistrationEventArgs args) { }