Entry.cs 1006 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.QConsole.Command.Base;
  7. using Quadarax.Foundation.QConsole.Extensions;
  8. namespace Quadarax.Foundation.QConsole.DevBench.Command
  9. {
  10. public class Entry : ISelectionEntry
  11. {
  12. public string Name { get; }
  13. public string Value { get; }
  14. public Entry(string name, string value)
  15. {
  16. Name = name;
  17. Value = value;
  18. }
  19. public string GetIdentifier()
  20. {
  21. return Name;
  22. }
  23. public string GetDisplayValue()
  24. {
  25. return Value;
  26. }
  27. public object GetPropertyValue(string propertyName)
  28. {
  29. return GetType().GetPropertyValue(propertyName, this);
  30. }
  31. public string GetPropertyValueAsString(string propertyName)
  32. {
  33. return GetType().GetPropertyValueAsString(propertyName, this);
  34. }
  35. }
  36. }