Change type of `*Watch.ValidTypes`/`Watch.AvailableTypes` to list
This commit is contained in:
parent
822b105bd1
commit
51b7e914d2
|
@ -35,7 +35,7 @@ namespace BizHawk.Client.Common
|
|||
/// <summary>
|
||||
/// Gets an enumeration of <see cref="WatchDisplayType"/> that are valid for a <see cref="ByteWatch"/>
|
||||
/// </summary>
|
||||
public static IEnumerable<WatchDisplayType> ValidTypes { get; } = [
|
||||
public static readonly IReadOnlyList<WatchDisplayType> ValidTypes = [
|
||||
WatchDisplayType.Unsigned,
|
||||
WatchDisplayType.Signed,
|
||||
WatchDisplayType.Hex,
|
||||
|
@ -46,7 +46,7 @@ namespace BizHawk.Client.Common
|
|||
/// Get a list a <see cref="WatchDisplayType"/> that can be used for this <see cref="ByteWatch"/>
|
||||
/// </summary>
|
||||
/// <returns>An enumeration that contains all valid <see cref="WatchDisplayType"/></returns>
|
||||
public override IEnumerable<WatchDisplayType> AvailableTypes()
|
||||
public override IReadOnlyList<WatchDisplayType> AvailableTypes()
|
||||
{
|
||||
return ValidTypes;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace BizHawk.Client.Common
|
|||
/// <summary>
|
||||
/// Gets a list of <see cref="WatchDisplayType"/> for a <see cref="DWordWatch"/>
|
||||
/// </summary>
|
||||
public static IEnumerable<WatchDisplayType> ValidTypes { get; } = [
|
||||
public static readonly IReadOnlyList<WatchDisplayType> ValidTypes = [
|
||||
WatchDisplayType.Unsigned,
|
||||
WatchDisplayType.Signed,
|
||||
WatchDisplayType.Hex,
|
||||
|
@ -50,7 +50,7 @@ namespace BizHawk.Client.Common
|
|||
/// Get a list of <see cref="WatchDisplayType"/> that can be used for a <see cref="DWordWatch"/>
|
||||
/// </summary>
|
||||
/// <returns>An enumeration that contains all valid <see cref="WatchDisplayType"/></returns>
|
||||
public override IEnumerable<WatchDisplayType> AvailableTypes()
|
||||
public override IReadOnlyList<WatchDisplayType> AvailableTypes()
|
||||
{
|
||||
return ValidTypes;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ namespace BizHawk.Client.Common
|
|||
/// </summary>
|
||||
public sealed class SeparatorWatch : Watch
|
||||
{
|
||||
public static readonly IReadOnlyList<WatchDisplayType> ValidTypes = [ WatchDisplayType.Separator ];
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SeparatorWatch"/> class.
|
||||
/// </summary>
|
||||
|
@ -33,8 +35,8 @@ namespace BizHawk.Client.Common
|
|||
/// Get the appropriate WatchDisplayType
|
||||
/// </summary>
|
||||
/// <returns>WatchDisplayType.Separator nothing else</returns>
|
||||
public override IEnumerable<WatchDisplayType> AvailableTypes()
|
||||
=> [ WatchDisplayType.Separator ];
|
||||
public override IReadOnlyList<WatchDisplayType> AvailableTypes()
|
||||
=> ValidTypes;
|
||||
|
||||
/// <summary>
|
||||
/// Ignore that stuff
|
||||
|
|
|
@ -252,7 +252,7 @@ namespace BizHawk.Client.Common
|
|||
/// Gets a list a <see cref="WatchDisplayType"/> that can be used for this <see cref="Watch"/>
|
||||
/// </summary>
|
||||
/// <returns>An enumeration that contains all valid <see cref="WatchDisplayType"/></returns>
|
||||
public abstract IEnumerable<WatchDisplayType> AvailableTypes();
|
||||
public abstract IReadOnlyList<WatchDisplayType> AvailableTypes();
|
||||
|
||||
/// <summary>
|
||||
/// Resets the previous value; set it to the current one
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace BizHawk.Client.Common
|
|||
/// <summary>
|
||||
/// Gets an Enumeration of <see cref="WatchDisplayType"/>s that are valid for a <see cref="WordWatch"/>
|
||||
/// </summary>
|
||||
public static IEnumerable<WatchDisplayType> ValidTypes { get; } = [
|
||||
public static readonly IReadOnlyList<WatchDisplayType> ValidTypes = [
|
||||
WatchDisplayType.Unsigned,
|
||||
WatchDisplayType.Signed,
|
||||
WatchDisplayType.Hex,
|
||||
|
@ -47,7 +47,8 @@ namespace BizHawk.Client.Common
|
|||
/// Get a list a <see cref="WatchDisplayType"/> that can be used for this <see cref="WordWatch"/>
|
||||
/// </summary>
|
||||
/// <returns>An enumeration that contains all valid <see cref="WatchDisplayType"/></returns>
|
||||
public override IEnumerable<WatchDisplayType> AvailableTypes() => ValidTypes;
|
||||
public override IReadOnlyList<WatchDisplayType> AvailableTypes()
|
||||
=> ValidTypes;
|
||||
|
||||
/// <summary>
|
||||
/// Reset the previous value; set it to the current one
|
||||
|
|
Loading…
Reference in New Issue