Let advisors load preference ranks from a converted CSV with fuzzy matching, known aliases, and a parse-preview-save page instead of relying on the ranking editor. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
620 B
C#
20 lines
620 B
C#
using Core.Entities;
|
|
using Core.Models;
|
|
using Core.Parsers;
|
|
|
|
namespace Core.Services;
|
|
|
|
/// <summary>
|
|
/// Wraps <see cref="StudentEventRankingParser"/> for stream-based import.
|
|
/// </summary>
|
|
public class StudentEventRankingImportService : IStudentEventRankingImportService
|
|
{
|
|
/// <inheritdoc />
|
|
public StudentEventRankingParseResult Parse(Stream stream, ICollection<Student> students, ICollection<EventDefinition> events)
|
|
{
|
|
var reader = new StreamReader(stream, leaveOpen: true);
|
|
using var parser = new StudentEventRankingParser(reader);
|
|
return parser.Parse(students, events);
|
|
}
|
|
}
|