дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
Razor (.cshtml/.razor) gets syntax highlighting, Roslyn's built-in Razor support with the HTML parts projected to the HTML language server (ordered open/close, a reserved projection URI, scoped capability registrations), and MVC navigation between controller actions and their views, including explicit View("...") names, subfolders and areas.
Closes #615
Co-authored-by: GlitchedPolygons <[email protected]>
23 рядки
842 B
C#
23 рядки
842 B
C#
namespace Ticketing.Models;
|
|
|
|
public enum Genre
|
|
{
|
|
Jazz,
|
|
Comedy,
|
|
Theatre,
|
|
}
|
|
|
|
/// <summary>A show on sale. <see cref="Slug"/> is its id in URLs.</summary>
|
|
public sealed record Show(string Slug, string Title, Genre Genre, DateOnly Date, string Venue, decimal Price, int Capacity)
|
|
{
|
|
public static readonly IReadOnlyList<Show> All =
|
|
[
|
|
new("jazz-night", "Jazz Night", Genre.Jazz, new DateOnly(2027, 1, 15), "The Cellar", 25m, 120),
|
|
new("stand-up-sunday", "Stand-up Sunday", Genre.Comedy, new DateOnly(2027, 1, 17), "Harbour Hall", 0m, 80),
|
|
new("the-tempest", "The Tempest", Genre.Theatre, new DateOnly(2027, 2, 3), "Lindenhof Theatre", 42.5m, 8),
|
|
];
|
|
|
|
// FIXME: shows are hard-coded until there is a database.
|
|
public static Show? Find(string slug) => All.FirstOrDefault(s => s.Slug == slug);
|
|
}
|