public DocumentParser(string xPath, ConvertParserList converts) : this(xPath) { this.Converts = converts; this.OutputType = OutputType.Convert; }
public DocumentParser([JsonProperty("XPath")] string xPath, [JsonProperty("Index")] int?index, [JsonProperty("Converts")] ConvertParserList converts) { if (!string.IsNullOrWhiteSpace(xPath) || index.HasValue) { if (index.HasValue) { this.Index = index; this.PositionType = PositionType.Index; this.OutputType = OutputType.Text; } else { this.XPath = xPath; this.PositionType = PositionType.XPath; this.OutputType = OutputType.Text; } } else { throw new ArgumentNullException($"{nameof(xPath)} and {nameof(index)}", "not be null"); } if (converts != null) { this.Converts = converts; this.OutputType = OutputType.Convert; } }
public DocumentParser(int index, ConvertParserList converts) : this(index) { this.Converts = converts; this.OutputType = OutputType.Convert; }