Amazon.KeyManagementService.Model.Internal.MarshallTransformations.GetParametersForImportResponseUnmarshaller.Unmarshall C# (CSharp) Méthode

Unmarshall() public méthode

Unmarshaller the response from the service to the response class.
public Unmarshall ( JsonUnmarshallerContext context ) : AmazonWebServiceResponse
context Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext
Résultat Amazon.Runtime.AmazonWebServiceResponse
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            GetParametersForImportResponse response = new GetParametersForImportResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;
            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("ImportToken", targetDepth))
                {
                    var unmarshaller = MemoryStreamUnmarshaller.Instance;
                    response.ImportToken = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("KeyId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.KeyId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ParametersValidTo", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.ParametersValidTo = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PublicKey", targetDepth))
                {
                    var unmarshaller = MemoryStreamUnmarshaller.Instance;
                    response.PublicKey = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return response;
        }
GetParametersForImportResponseUnmarshaller