public static async Task DepraseAsync(this IIniKeyValuePair @this, TextWriter writer) { if (!string.IsNullOrWhiteSpace(@this.Key) && !string.IsNullOrWhiteSpace(@this.Value)) { await writer.WriteAsync($"{@this.Key}={@this.Value}"); } if (!string.IsNullOrWhiteSpace(@this.Summary)) { await writer.WriteAsync($"; {@this.Summary}"); } }
public static Task DepraseAsync(this IIniKeyValuePair @this, Stream stream) => @this.DepraseAsync(new StreamWriter(stream));