Beispiel #1
0
        public async Task WriteString()
        {
            for (int i = 0; i < NumberOfOperationsPerIteration; i++)
            {
                await _Protocol.WriteStringAsync("Thrift String Benchmark");

                _Stream.Seek(0, SeekOrigin.Begin);
            }
        }
Beispiel #2
0
        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);
        }