public async Task ExecuteAsync(Guid id, Uri url, CallbackResult result, CancellationToken cancellationToken)
        {
            if (url == null)
            {
                throw new ArgumentNullException(nameof(url));
            }

            if (result == null)
            {
                throw new ArgumentNullException(nameof(result));
            }

            using (var client = this.factory.CreateClient())
                using (var request = new HttpRequestMessage(HttpMethod.Post, url))
                {
                    request.Headers.Add("X-Callback-ID", id.ToString());
                    request.Headers.Add("X-Callback-Status", result.Status);

                    if (result.Data != null)
                    {
                        var builder = new StringBuilder();
                        using (var wrtiter = new StringWriter(builder))
                        {
                            this.serializer.Serialize(wrtiter, result.Data);
                        }

                        var content = builder.ToString();
                        request.Content = new StringContent(content, Encoding.UTF8, "application/json");
                    }

                    var response = await client.SendAsync(request, cancellationToken);

                    switch (response.StatusCode)
                    {
                    case HttpStatusCode.OK:
                    case HttpStatusCode.Accepted:
                        return;

                    default:
                        throw new HttpRequestException($"Callback Execution return unexpected status ({response.StatusCode}).");
                    }
                }
        }
        public async Task AddHistoryAsync(Guid id, CallbackResult result, CancellationToken cancellationToken)
        {
            if (result == null)
            {
                throw new ArgumentNullException(nameof(result));
            }

            using (var db = this.db.CreateDbContext())
            {
                await db.WebApiCallbackHistories.AddAsync
                (
                    new WebApiCallbackHistory
                {
                    CallbackId  = id,
                    Status      = result.Status,
                    Data        = JsonConvert.SerializeObject(result.Data),
                    InvokedTime = DateTime.UtcNow,
                }
                );

                await db.SaveChangesAsync(cancellationToken);
            }
        }