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)); }
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)); }
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)); }