Пример #1
0
        public static KeyPairIdsUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new KeyPairIdsUnmarshaller();
            }

            return(instance);
        }
Пример #2
0
        public Signer Unmarshall(XmlUnmarshallerContext context)
        {
            Signer signer        = new Signer();
            int    originalDepth = context.CurrentDepth;
            int    targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("AwsAccountNumber", targetDepth))
                    {
                        signer.AwsAccountNumber = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("KeyPairIds", targetDepth))
                    {
                        signer.KeyPairIds = KeyPairIdsUnmarshaller.GetInstance().Unmarshall(context);

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



            return(signer);
        }