Esempio n. 1
0
 public DocumentParser(string xPath, ConvertParserList converts) : this(xPath) {
     this.Converts   = converts;
     this.OutputType = OutputType.Convert;
 }
Esempio n. 2
0
 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;
     }
 }
Esempio n. 3
0
 public DocumentParser(int index, ConvertParserList converts) : this(index) {
     this.Converts   = converts;
     this.OutputType = OutputType.Convert;
 }