A game about forced loneliness, made by TACStudios
1using System; 2 3namespace UnityEditor.TestTools.TestRunner.GUI.Controls 4{ 5 /// <summary> 6 /// A default implementation of the <see cref="ISelectableItem{T}" /> interface. 7 /// </summary> 8 /// <typeparam name="T">The type of the value represented by this content element.</typeparam> 9 internal class SelectableItemContent<T> : ISelectableItem<T> 10 { 11 private readonly string m_DisplayName; 12 13 /// <summary> 14 /// Creates a new instance of the <see cref="SelectableItemContent{T}" /> class 15 /// </summary> 16 /// <param name="itemValue">The value represented by this item.</param> 17 /// <param name="displayName">The display name of this item.</param> 18 public SelectableItemContent(T itemValue, string displayName) 19 { 20 Value = itemValue; 21 m_DisplayName = displayName; 22 } 23 24 public T Value { get; } 25 26 public string DisplayName => m_DisplayName ?? string.Empty; 27 } 28}