public WriteXmlTableTask(string file, string xpath, string element, WriteXmlCreateOption create = WriteXmlCreateOption.None, bool append = true, string condition = null) : base(condition) { if (string.IsNullOrWhiteSpace(file)) { throw new ArgumentNullException(nameof(file)); } if (string.IsNullOrWhiteSpace(xpath)) { throw new ArgumentNullException(nameof(xpath)); } if (string.IsNullOrWhiteSpace(element)) { throw new ArgumentNullException(nameof(element)); } File = file; XPath = xpath; Element = element; Create = create; Append = append; }
private static writeXmlCreateOption Translate(WriteXmlCreateOption from) { writeXmlCreateOption to; switch (from) { case WriteXmlCreateOption.None: to = writeXmlCreateOption.none; break; case WriteXmlCreateOption.File: to = writeXmlCreateOption.file; break; case WriteXmlCreateOption.XPath: to = writeXmlCreateOption.xpath; break; default: throw new ArgumentOutOfRangeException(nameof(from), from, null); } return(to); }
public WriteXmlTask(string file, string xpath, string value, WriteXmlCreateOption create = WriteXmlCreateOption.None, string condition = null) : base(condition) { if (string.IsNullOrWhiteSpace(value)) { throw new ArgumentNullException(nameof(value)); } if (string.IsNullOrWhiteSpace(file)) { throw new ArgumentNullException(nameof(file)); } if (string.IsNullOrWhiteSpace(xpath)) { throw new ArgumentNullException(nameof(xpath)); } Value = value; File = file; XPath = xpath; Create = create; }