Exemple #1
0
 private ParameterSet _parse(string set) {
    var p = new BplJsonParser { StronglyTyped = true };
    if (p.Parse(set)) {
       return p.Output as ParameterSet;
    }
    return null;
 }
 private BplDocumentParser _invokeParser(BplFormat format, string input) {
    BplDocumentParser parser = null;
    switch (format) {
       case BplFormat.Xml:
          parser = new BplXmlParser { PreserveErrorsInfo = true };
          break;
       case BplFormat.Json:
          parser = new BplJsonParser { PreserveErrorsInfo = true, StronglyTyped = false };
          break;
       case BplFormat.Json_t:
          parser = new BplJsonParser { PreserveErrorsInfo = true, StronglyTyped = true };
          break;
       case BplFormat.Binary:
          parser = new BplHexParser { };
          break;
       default:
          return null;
    }
    if (parser != null) {
       parser.Parse(input);
    }
    return parser;
 }