Exemplo n.º 1
0
        CellSet ProcessFindCellResponse(IRestResponse response, CellQuery query)
        {
            var set = new CellSet
            {
                Table = query.Table
            };

            if (response.StatusCode == HttpStatusCode.OK)
            {
                set.AddRange(Converter.ConvertCells(response.Content, query.Table));
            }

            return(set);
        }
Exemplo n.º 2
0
        /// <summary>
        ///   Finds the cells matching the query.
        /// </summary>
        /// <param name="query"></param>
        public virtual CellSet FindCells(CellQuery query)
        {
            string        resource = ResourceBuilder.BuildCellOrRowQuery(query);
            IRestResponse response = SendRequest(Method.GET, resource, Options.ContentType);

            ErrorProvider.ThrowIfStatusMismatch(response, HttpStatusCode.OK, HttpStatusCode.NotFound);

            var set = new CellSet
            {
                Table = query.Table
            };

            if (response.StatusCode == HttpStatusCode.OK)
            {
                set.AddRange(Converter.ConvertCells(response.Content, query.Table));
            }

            return(set);
        }
Exemplo n.º 3
0
		/// <summary>
		///    Finds the cells matching the query.
		/// </summary>
		/// <param name="query"></param>
		public CellSet FindCells(CellQuery query)
		{
			string resource = _resourceBuilder.BuildCellOrRowQuery(query);
			IRestResponse response = SendRequest(Method.GET, resource, Options.ContentType);
			_errorProvider.ThrowIfStatusMismatch(response, HttpStatusCode.OK, HttpStatusCode.NotFound);

			var set = new CellSet
			{
				Table = query.Table
			};

			if (response.StatusCode == HttpStatusCode.OK)
				set.AddRange(_converter.ConvertCells(response.Content, query.Table));

			return set;
		}