/// <inheritdoc /> public async Task FillAsync() { //So the idea here is we just need to reader the entries and then //we write them with the generator ParsedDBCFile <TDbcFileType> parsedDbcFile = await DbcReader.Parse(); await DbcGenerator.WriteEntries(parsedDbcFile.RecordDatabase.Values.ToArray()); }
/// <inheritdoc /> public async Task FillAsync() { //For generics we actuall have to convert the models we read //before we can write them //This is because of strings mostly //This actually isn't a parsed DBC file. We use the same //interface for table reading. ParsedDBCFile <TDbcEntryType> parsedDbcFile = await DbcReader.Parse(); //Dispatches the converted models to the generator. await DbcGenerator.WriteEntries(parsedDbcFile.RecordDatabase.Values.Select(ModelConverter.Convert).ToArray()); }
/// <inheritdoc /> public async Task FillAsync() { if (Logger.IsEnabled(LogLevel.Information)) { Logger.LogInformation($"Converting DBC file: {typeof(TDBCEntryType).Name} to database table."); } ParsedDBCFile <TDBCEntryType> dbc = await DbcReader.Parse(); if (dbc == null) { throw new InvalidOperationException($"Failed to parse DBC for Type: {typeof(TDBCEntryType).Name}"); } await Inserter.InsertEntriesAsync(dbc.RecordDatabase.Values.ToArray()); }