/// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            CreateActivationResponse response = new CreateActivationResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("ActivationCode", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ActivationCode = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ActivationId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ActivationId = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Example #2
0
        public static CreateActivationResponse Unmarshall(UnmarshallerContext _ctx)
        {
            CreateActivationResponse createActivationResponse = new CreateActivationResponse();

            createActivationResponse.HttpResponse   = _ctx.HttpResponse;
            createActivationResponse.RequestId      = _ctx.StringValue("CreateActivation.RequestId");
            createActivationResponse.ActivationId   = _ctx.StringValue("CreateActivation.ActivationId");
            createActivationResponse.ActivationCode = _ctx.StringValue("CreateActivation.ActivationCode");

            return(createActivationResponse);
        }