Exemple #1
0
        public IXmlElementConfiguration WithElement(string name)
        {
            var target = new XmlElementTarget {
                TargetType = XmlElementTargetType.Element, Name = Argument.NotNull(name, nameof(name))
            };

            return(new XmlElementConfiguration(this, _mapper, target, target, _targetType));
        }
Exemple #2
0
 public XmlElementConfiguration(IXmlSerializerConfiguration config, SimpleMapper <XmlElementContext> mapper, XmlElementTarget target,
                                XmlElementTarget root, Type targetType)
 {
     _config     = Argument.NotNull(config, nameof(config));
     _mapper     = Argument.NotNull(mapper, nameof(mapper));
     _target     = Argument.NotNull(target, nameof(target));
     _root       = Argument.NotNull(root, nameof(root));
     _targetType = Argument.NotNull(targetType, nameof(targetType));
 }
Exemple #3
0
        public IXmlAttributConfiguration Attribute(string name)
        {
            var target = new XmlElementTarget {
                TargetType = XmlElementTargetType.Attribute, Name = Argument.NotNull(name, nameof(name))
            };

            _target.SubElement = target;
            return(new XmlAttributeConfiguration(_config, _root, target, _mapper, _targetType));
        }
        public IXmlListElementConfiguration Element(string name)
        {
            var target = new XmlElementTarget {
                TargetType = XmlElementTargetType.Element, Name = Argument.NotNull(name, nameof(name))
            };

            _target.SubElement = target;

            return(new XmlListElementConfiguration(_config, _mapper, target, _root, _parentTarget, _targeType));
        }