public void InvokeCallBack(int? ackId, JsonEncodedEventMessage value) { Action<dynamic> target = null; if (ackId.HasValue) { if (this.callBackRegistry.TryRemove(ackId.Value, out target)) { target.Invoke(value); //target.BeginInvoke(value, target.EndInvoke, null); } } }