Ejemplo n.º 1
0
        public async Task <DeleteItemResult> DeleteItemAsync(DeleteItemRequest request)
        {
            var httpRequest = Setup("DeleteItem", request.ToJson());

            var json = await SendAndReadJsonElementAsync(httpRequest).ConfigureAwait(false);

            return(DeleteItemResult.FromJsonElement(json));
        }
Ejemplo n.º 2
0
        /*
         * public void CreateTable()
         * {
         *  throw new NotImplementedException();
         * }
         */

        public async Task <DeleteItemResult> DeleteItemAsync(DeleteItemRequest request)
        {
            var httpRequest = Setup("DeleteItem", request.ToJson());

            var responseText = await SendAsync(httpRequest).ConfigureAwait(false);

            var responseJson = JsonObject.Parse(responseText);

            return(DeleteItemResult.FromJson(responseJson));
        }
Ejemplo n.º 3
0
        public static DeleteItemResult FromJson(JsonObject json)
        {
            var result = new DeleteItemResult();

            if (json.ContainsKey("ConsumedCapacity"))
            {
                result.ConsumedCapacity = ConsumedCapacity.FromJson((JsonObject)json["ConsumedCapacity"]);
            }

            if (json.ContainsKey("Attributes"))
            {
                result.Attributes = AttributeCollection.FromJson((JsonObject)json["Attributes"]);
            }

            return(result);
        }
Ejemplo n.º 4
0
        public static DeleteItemResult FromJson(JsonObject json)
        {
            var result = new DeleteItemResult();

            if (json.TryGetValue("ConsumedCapacity", out var consumedCapacityNode))
            {
                result.ConsumedCapacity = ConsumedCapacity.FromJson((JsonObject)consumedCapacityNode);
            }

            if (json.TryGetValue("Attributes", out var attributesNode))
            {
                result.Attributes = AttributeCollection.FromJson((JsonObject)attributesNode);
            }

            return(result);
        }