1234567891011121314151617181920212223242526272829303132333435 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using System.ComponentModel.DataAnnotations;
- using System.Reflection;
- using Microsoft.AspNetCore.Components;
- using HyperCube.Models;
- namespace HyperCube.Pages
- {
- public partial class Verifying : ComponentBase
- {
- [Inject]
- public AppData AppData { get; set; }
- private Dictionary<int, ArticleModel> articles = new();
- private int counter;
- protected override async Task OnInitializedAsync()
- {
- articles = await AppData.GetArticles();
- counter = 1;
- }
- private static string GetDisplayName(Enum enumValue)
- {
- return enumValue.GetType()
- .GetMember(enumValue.ToString())
- .First()
- .GetCustomAttribute<DisplayAttribute>()
- .GetName();
- }
- }
- }
|