private void validateSource(XmlMappingSource mapSource) { if (mapSource == null || mapSource.Source == null || !mapSource.Source.Exists) { throw new ArgumentException("MappingSource cannot be empty.", nameof(mapSource)); } }
public XmlMapping(DirectoryInfo source, bool includeAttributeData = false) { var newSource = new XmlMappingSource(source); validateSource(newSource); this.Source = newSource; this.LoadStructure(includeAttributeData); }
public void UpdateSource(XmlMappingSource mapSource, bool includeAttributeData = false) { validateSource(mapSource); this.Source = mapSource; this.LoadStructure(includeAttributeData); }