public async Task WriteString() { for (int i = 0; i < NumberOfOperationsPerIteration; i++) { await _Protocol.WriteStringAsync("Thrift String Benchmark"); _Stream.Seek(0, SeekOrigin.Begin); } }
private static async Task WriteString(short id, string str) { if (str == null) { str = ""; } await _thrift.WriteFieldBeginAsync(new TField(null, TType.String, id), System.Threading.CancellationToken.None); await _thrift.WriteStringAsync(str, System.Threading.CancellationToken.None); }
private static async Task WriteString(short id, string str) { if (str == null) { str = ""; } await _thrift.WriteFieldBeginAsync(new TField(null, TType.String, id)); await _thrift.WriteStringAsync(str); }