Exemplo n.º 1
0
        T WriteValueInternal <T>(Identifier identifier, string value, Func <Method, string, string, string, string, HttpStatusCode[], T> action)
        {
            string contentType = Options.ContentType;
            string resource    = ResourceBuilder.BuildSingleValueAccess(identifier);
            string content     = Converter.ConvertCell(new Cell(identifier, value));

            return(action(Method.POST, resource, contentType, contentType, content, new[] { HttpStatusCode.OK }));
        }
Exemplo n.º 2
0
        /// <summary>
        ///   Writes the value to HBase using the identifier.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="value">The value.</param>
        public virtual void WriteValue(Identifier identifier, string value)
        {
            string        contentType = Options.ContentType;
            string        resource    = ResourceBuilder.BuildSingleValueAccess(identifier);
            string        content     = Converter.ConvertCell(new Cell(identifier, value));
            IRestResponse response    = SendRequest(Method.POST, resource, contentType, contentType, content);

            ErrorProvider.ThrowIfStatusMismatch(response, HttpStatusCode.OK);
        }
Exemplo n.º 3
0
        public string ConvertCell(Cell cell)
        {
            if (_converter != null)
            {
                return(_converter.ConvertCell(cell));
            }

            throw new NotImplementedException();
        }