KeePass.Util.XmlSerialization.XmlSerializerEx.ReadListOfAceKeyAssoc C# (CSharp) Method

ReadListOfAceKeyAssoc() private static method

private static ReadListOfAceKeyAssoc ( XmlReader xr ) : System.Collections.Generic.List
xr System.Xml.XmlReader
return System.Collections.Generic.List
        private static System.Collections.Generic.List<KeePass.App.Configuration.AceKeyAssoc> ReadListOfAceKeyAssoc(XmlReader xr)
        {
            System.Collections.Generic.List<KeePass.App.Configuration.AceKeyAssoc> o = new System.Collections.Generic.List<KeePass.App.Configuration.AceKeyAssoc>();

            if(SkipEmptyElement(xr)) return o;

            Debug.Assert(xr.NodeType == XmlNodeType.Element);
            xr.ReadStartElement();
            xr.MoveToContent();

            while(true)
            {
                XmlNodeType nt = xr.NodeType;
                if((nt == XmlNodeType.EndElement) || (nt == XmlNodeType.None)) break;
                if(nt != XmlNodeType.Element) { Debug.Assert(false); continue; }

                KeePass.App.Configuration.AceKeyAssoc oElem = ReadAceKeyAssoc(xr);
                o.Add(oElem);

                xr.MoveToContent();
            }

            Debug.Assert(xr.NodeType == XmlNodeType.EndElement);
            xr.ReadEndElement();
            return o;
        }