private void FinishSending(bool success) { CoreEventSource.SendStop(name, IsAlive, success); Volatile.Write(ref isSending, 0); ((Action <bool>)sendArgs.UserToken)?.Invoke(success); }
private void FinishSending(bool success) { if (trace.IsEnabled()) { trace.SendStop(name, IsAlive, success); } var callback = (Action <bool>)sendArgs.UserToken; IsBusy = false; callback(success); }