private void RunPutGet(AsyncClient client, Arguments args, Key key, Bin bin)
        {
            console.Info("Put: namespace={0} set={1} key={2} value={3}",
                key.ns, key.setName, key.userKey, bin.value);

            client.Put(args.writePolicy, new WriteHandler(this, client, args.writePolicy, key, bin), key, bin);
        }
        private void RunPutGetWithTask(AsyncClient client, Arguments args, Key key, Bin bin)
        {
            console.Info("Put with task: namespace={0} set={1} key={2} value={3}",
                key.ns, key.setName, key.userKey, bin.value);

            CancellationTokenSource cancel = new CancellationTokenSource();
            Task taskput = client.Put(args.writePolicy, cancel.Token, key, bin);
            taskput.Wait();

            console.Info("Get with task: namespace={0} set={1} key={2}",
                key.ns, key.setName, key.userKey);

            Task<Record> taskget = client.Get(args.policy, cancel.Token, key);
            taskget.Wait();

            ValidateBin(key, bin, taskget.Result);
        }
        private void RunQueryExample(AsyncClient client, Arguments args, string keyPrefix, string binName, int size)
        {
            console.Info("Write " + size + " records.");
            WriteHandler handler = new WriteHandler(this, client, args, binName, size);

            for (int i = 1; i <= size; i++)
            {
                Key key = new Key(args.ns, args.set, keyPrefix + i);
                Bin bin = new Bin(binName, i);
                client.Put(args.writePolicy, handler, key, bin);
            }
        }