Exemplo n.º 1
0
        internal static KeyValuePair <string, string> GetSNSOperationData(this HttpRequestMessage httpRequestMessage)
        {
            var snsbody       = httpRequestMessage.Content.ReadAsStringAsync().Result;
            var operation     = OperationMapper.GetSNSOperation(snsbody);
            var operationName = GetSNSOperationName(snsbody, operation);

            return(new KeyValuePair <string, string>(operationName, operation));
        }
Exemplo n.º 2
0
        internal static KeyValuePair <string, string> GetDynamoDBOperationData(this HttpRequestMessage httpRequestMessage)
        {
            var operation    = OperationMapper.GetDynamoDBOperation((httpRequestMessage));
            var dynamoDBBody = httpRequestMessage.Content.ReadAsStringAsync().Result;
            // Body is of the following Format
            //"{\"TableName\":\"DotNetTest\"}"
            // "{\"AttributesToGet\":[\"Name\",\"Horse\"],\"ConsistentRead\":true,\"Key\":{\"Key\":{\"S\":\"Name\"}},\"TableName\":\"DotNetTest\"}"
            var bodyJson      = JObject.Parse(dynamoDBBody);
            var operationName = string.Format("Datastore/statement/DynamoDB/{0}/{1}", bodyJson?["TableName"], operation);

            return(new KeyValuePair <string, string>(operationName, operation));
        }