Format() public method

public Format ( TextWriter textWriter ) : void
textWriter System.IO.TextWriter
return void
        public async Task<LineProtocolWriteResult> WriteAsync(LineProtocolPayload payload, CancellationToken cancellationToken = default(CancellationToken))
        {
            var endpoint = $"write?db={Uri.EscapeDataString(_database)}";
            if (!string.IsNullOrEmpty(_username))
                endpoint += $"&u={Uri.EscapeDataString(_username)}&p={Uri.EscapeDataString(_password)}";

            var payloadText = new StringWriter();
            payload.Format(payloadText);
            var content = new StringContent(payloadText.ToString(), Encoding.UTF8);
            var response = await _httpClient.PostAsync(endpoint, content, cancellationToken);
            if (response.IsSuccessStatusCode)
                return new LineProtocolWriteResult(true, null);

            return new LineProtocolWriteResult(false, $"{response.StatusCode} {response.ReasonPhrase}");
        }