/// <summary> /// Initializes a new instance of the <see cref="ConverterService"/> class. /// </summary> /// <param name="parser">The parser.</param> /// <param name="htmlParser">The HTML parser.</param> /// <param name="builder">The builder.</param> /// <param name="config">The configuration.</param> public ConverterService(IJsonConverter parser, IHTMLConverter htmlParser, IBuilder <ITree> builder, ConvertConfig config) { _config = config; _parser = parser; _htmlParser = htmlParser; _builder = builder; }
public ITree ToConverted(string html) { _map = ConvertConfig.GetMapping(); CleanToCompatible(ref html); ToDictionary(html); _tomlTree = _builder.ToDictionary(_config.Toml.BaseToml); RemoveModule(_tomlTree, false); //RemoveArrays(_tomlTree); MergeValues(); RemoveSkeletons(_tomlTree); return(_tomlTree); }
/// <summary> /// Initializes a new instance of the <see cref="DictionaryConverter"/> class. /// </summary> /// <param name="config">The configuration.</param> public DictionaryConverter(ConvertConfig config) { _config = config; _omitKeys = _config.Rules.Where(o => o.Schema == ConversionScheme.Omit).ToList(); }
/// <summary> /// Updates the configuration. /// </summary> /// <param name="properties">The properties.</param> /// <returns></returns> public async Task <bool> UpdateConfig(string properties) { return(await ConvertConfig.UpdateConfiguration(properties)); }
public TomlBuilder(ConvertConfig config) { _config = config; }
public Extractor(ConvertConfig config) { _config = config; }
public HTMLConverter(ConvertConfig config, IBuilder <ITree> builder) { _config = config; _tree = new Tree(); _builder = builder; }