public override Exception?VerifyError()
        {
            var e = base.VerifyError();

            if (_serializer == null)
            {
                e = new ArgumentNullException(nameof(_serializer), @"Serializer");
            }
            if (_xmlElementTarget == null)
            {
                e = new ArgumentNullException(nameof(_xmlElementTarget), @"Xml Tree");
            }

            var target = _xmlElementTarget;

            while (target != null)
            {
                if (target.TargetType == XmlElementTargetType.Attribute)
                {
                    e = new SerializerElementException("Attributes Not Supported");
                    break;
                }

                target = target.SubElement;
            }

            return(e);
        }
Пример #2
0
        public override Exception?VerifyError()
        {
            var e = base.VerifyError();

            if (_target?.TargetType == XmlElementTargetType.Attribute)
            {
                e = new SerializerElementException("The Subserializer does not Support Attributes");
            }

            return(e);
        }