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

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