Entry.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Quadarax.Foundation.Common.Reflection;
  7. using Quadarax.Foundation.QConsole.Command.Base;
  8. using Quadarax.Foundation.QConsole.Extensions;
  9. namespace Quadarax.Foundation.QConsole.DevBench.Command
  10. {
  11. public class Entry : ISelectionEntry
  12. {
  13. public string Name { get; }
  14. public string Value { get; }
  15. public Entry(string name, string value)
  16. {
  17. Name = name;
  18. Value = value;
  19. }
  20. public string GetIdentifier()
  21. {
  22. return Name;
  23. }
  24. public string GetDisplayValue()
  25. {
  26. return Value;
  27. }
  28. public object GetPropertyValue(string propertyName)
  29. {
  30. return GetType().GetPropertyValue(propertyName, this);
  31. }
  32. public string GetPropertyValueAsString(string propertyName)
  33. {
  34. return GetType().GetPropertyValueAsString(propertyName, this);
  35. }
  36. }
  37. }