Exemplo n.º 1
0
 private async Task AddLogEntry(HttpResponse logEntry)
 {
     LogEntries.Insert(0, logEntry);
     await _logStore.AddAsync(logEntry);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Logs the specified <see cref="Request"/>.
        /// </summary>
        /// <param name="request">The <see cref="Request"/></param>
        /// <returns>
        /// The <see cref="Guid"/> assigned to the <see cref="Request"/>.
        /// Will return <see cref="Guid.Empty"/> if failed to log the <see cref="Request"/>.
        /// </returns>
        public async Task <Guid> LogRequestAsync(Request request)
        {
            var success = await _logStore.AddAsync(request);

            return(success ? request.Id : Guid.Empty);
        }