Acceleratio.SPDG.Generator.SampleData.importDepartments C# (CSharp) Méthode

importDepartments() private static méthode

private static importDepartments ( string csvFileName ) : ReadOnlyCollection
csvFileName string
Résultat ReadOnlyCollection
        private static ReadOnlyCollection<DepartmentData> importDepartments(string csvFileName)
        {
            return new ReadOnlyCollection<DepartmentData>(File.ReadAllLines(@"SampleData\" + csvFileName)
               .Select(line => line.Split(','))
               .Select(tokens => new DepartmentData() { Department = tokens[0], Subdepartment = tokens[1] })
               .ToList());
        }