8af86e22d9
This commit updates various files across the Core and WebApp projects to replace traditional collection initializers with C# 12 collection expressions. Changes include modifications to EventAssignment.cs, TeamScheduler_DecisionTree.cs, CareerField.cs, EventDefinition.cs, and several components in the WebApp. These updates enhance code readability and maintainability by adhering to modern C# syntax standards.
53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
namespace Core.Entities;
|
|
|
|
/// <summary>
|
|
/// Represents a career field cluster that groups related careers together.
|
|
/// </summary>
|
|
public class CareerField
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier for the career field (1-25)
|
|
/// </summary>
|
|
public int Id { get; }
|
|
|
|
/// <summary>
|
|
/// Display name of the career field
|
|
/// </summary>
|
|
public string Name { get; }
|
|
|
|
/// <summary>
|
|
/// Short description of the career field
|
|
/// </summary>
|
|
public string Description { get; }
|
|
|
|
/// <summary>
|
|
/// Exact career names that belong to this field
|
|
/// </summary>
|
|
public IReadOnlyList<string> DirectCareerMatches { get; }
|
|
|
|
/// <summary>
|
|
/// Keywords for pattern matching (case-insensitive substring matching)
|
|
/// </summary>
|
|
public IReadOnlyList<string> PatternKeywords { get; }
|
|
|
|
/// <summary>
|
|
/// Creates a new CareerField instance
|
|
/// </summary>
|
|
/// <param name="id">Unique identifier</param>
|
|
/// <param name="name">Display name</param>
|
|
/// <param name="description">Short description of the career field</param>
|
|
/// <param name="directCareerMatches">Exact career name matches</param>
|
|
/// <param name="patternKeywords">Keywords for pattern matching</param>
|
|
public CareerField(int id, string name, string description, IReadOnlyList<string> directCareerMatches, IReadOnlyList<string> patternKeywords)
|
|
{
|
|
Id = id;
|
|
Name = name;
|
|
Description = description;
|
|
DirectCareerMatches = directCareerMatches ?? [];
|
|
PatternKeywords = patternKeywords ?? [];
|
|
}
|
|
|
|
public override string ToString() => Name;
|
|
}
|
|
|