Verifying.razor.cs 821 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Linq;
  5. using System.Reflection;
  6. using System.Threading.Tasks;
  7. using Microsoft.AspNetCore.Components;
  8. namespace HyperCube.Pages
  9. {
  10. public partial class Verifying : ComponentBase
  11. {
  12. private int counter = 1;
  13. protected override async Task OnInitializedAsync()
  14. {
  15. /// refreshing articles
  16. await AppData.LoadArticles();
  17. }
  18. private static string GetDisplayName(Enum enumValue)
  19. {
  20. return enumValue.GetType()
  21. .GetMember(enumValue.ToString())
  22. .First()
  23. .GetCustomAttribute<DisplayAttribute>()
  24. .GetName();
  25. }
  26. }
  27. }