private async Task WriteConfigObject(IKongvergeConfigObject configObject, string folderPath, string fileName) { var json = configObject.ToConfigJson(); var path = Path.Join(folderPath, fileName); Log.Verbose($"Writing {path}"); await _fileProvider.SaveTextContent(path, json); }
private static async Task WriteConfigObject(IKongvergeConfigObject configObject, string folderPath, string fileName) { var json = configObject.ToConfigJson(); var path = Path.Join(folderPath, fileName); Log.Verbose($"Writing {path}"); using (var stream = File.OpenWrite(path)) using (var writer = new StreamWriter(stream)) { await writer.WriteAsync(json); await writer.FlushAsync(); } }