Beispiel #1
0
        public CreateVirtualMFADeviceResult Unmarshall(XmlUnmarshallerContext context)
        {
            CreateVirtualMFADeviceResult createVirtualMFADeviceResult = new CreateVirtualMFADeviceResult();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("VirtualMFADevice", targetDepth))
                    {
                        createVirtualMFADeviceResult.VirtualMFADevice = VirtualMFADeviceUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(createVirtualMFADeviceResult);
                }
            }



            return(createVirtualMFADeviceResult);
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, CreateVirtualMFADeviceResponse 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("VirtualMFADevice", targetDepth))
                    {
                        response.VirtualMFADevice = VirtualMFADeviceUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }



            return;
        }
        public static VirtualMFADeviceUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new VirtualMFADeviceUnmarshaller();
            }

            return(instance);
        }
        public ListVirtualMFADevicesResult Unmarshall(XmlUnmarshallerContext context)
        {
            ListVirtualMFADevicesResult listVirtualMFADevicesResult = new ListVirtualMFADevicesResult();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("VirtualMFADevices/member", targetDepth))
                    {
                        listVirtualMFADevicesResult.VirtualMFADevices.Add(VirtualMFADeviceUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                    if (context.TestExpression("IsTruncated", targetDepth))
                    {
                        listVirtualMFADevicesResult.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Marker", targetDepth))
                    {
                        listVirtualMFADevicesResult.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(listVirtualMFADevicesResult);
                }
            }



            return(listVirtualMFADevicesResult);
        }