Amazon.IdentityManagement.Model.Internal.MarshallTransformations.GetAccountSummaryResponseUnmarshaller.UnmarshallResult C# (CSharp) Method

UnmarshallResult() private static method

private static UnmarshallResult ( Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext context, GetAccountSummaryResponse response ) : void
context Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext
response Amazon.IdentityManagement.Model.GetAccountSummaryResponse
return void
        private static void UnmarshallResult(XmlUnmarshallerContext context,GetAccountSummaryResponse response)
        {
            
            int originalDepth = context.CurrentDepth;
            int targetDepth = originalDepth + 1;
            
            if (context.IsStartOfDocument) 
               targetDepth += 2;
            
            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("SummaryMap/entry", targetDepth))
                    {
                        KeyValueUnmarshaller<string, int, StringUnmarshaller, IntUnmarshaller> unmarshaller = new KeyValueUnmarshaller<string, int, StringUnmarshaller, IntUnmarshaller>(StringUnmarshaller.GetInstance(), IntUnmarshaller.GetInstance());
                        KeyValuePair<string, int> kvp = unmarshaller.Unmarshall(context);
                        response.SummaryMap.Add(kvp.Key, kvp.Value);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }
                            


            return;
        }