public async Task SaveAsync(IProcessingResult result, CancellationToken token) { using var context = new OutputContext(_dbSettings); var newResult = new ProcessingResult { ProcessingResultValue = result.GetStringRepresentation() }; await context.ProcessingResults.AddAsync(newResult, token); await context.SaveChangesAsync(token); }
public async Task SaveAsync(IProcessingResult result, CancellationToken token) { System.Console.WriteLine("Processing result is {0}.", result.GetStringRepresentation()); }
public async Task SaveAsync(IProcessingResult result, CancellationToken token) { await System.IO.File.WriteAllTextAsync(_filePath, result.GetStringRepresentation(), token); }