/// <summary>
        /// Store the given value with the given key
        /// </summary>
        /// <param name="mode">See @StoreMode values</param>
        /// <param name="key" />
        /// <param name="value" />
        /// <param name="expire">Expiration of the value</param>
        /// <returns></returns>
        public bool Store(StoreMode mode, string key, byte[] value, TimeSpan expire)
        {
            var taskSource = new TaskCompletionSource <bool>();

            if (!_client.Store(
                    mode: mode,
                    key: key,
                    message: value,
                    expiration: expire,
                    callback: s =>
            {
                if (s == Status.NoError)
                {
                    taskSource.SetResult(true);
                }
                else
                {
                    taskSource.SetResult(false);
                }
            }))
            {
                taskSource.SetResult(false);
            }

            if (taskSource.Task.Wait(_receiveTimeout))
            {
                return(taskSource.Task.Result);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// Store the given value with the given key
        /// </summary>
        /// <param name="mode">See @StoreMode values</param>
        /// <param name="key" />
        /// <param name="value" />
        /// <param name="expire">Expiration of the value</param>
        /// <returns></returns>
        public bool Store(StoreMode mode, string key, byte[] value, TimeSpan expire)
        {
            var taskSource = new TaskCompletionSource <bool>();

            if (!_client.Store(mode, key, value, expire, s => taskSource.SetResult(s == Status.NoError)))
            {
                taskSource.SetResult(false);
            }

            if (!taskSource.Task.Wait(_receiveTimeout))
            {
                return(false);
            }

            return(taskSource.Task.Result);
        }