Fixes #4046 - Moves examples into ./Examples and fixes ./Tests (#4047)

* touching publish.yml

* Moved Examples into ./Examples

* Moved Benchmarks into ./Tests

* Moved Benchmarks into ./Tests

* Moved UICatalog into ./Examples

* Moved UICatalog into ./Examples 2

* Moved tests into ./Tests

* Updated nuget
This commit is contained in:
Tig
2025-04-25 09:49:33 -06:00
parent a53e6744f4
commit 7fe6fd9453
199 changed files with 149 additions and 142 deletions

View File

@@ -0,0 +1,42 @@
#nullable enable
using System;
using System.Linq;
namespace UICatalog;
/// <summary>Defines the metadata (Name and Description) for a <see cref="Scenario"/></summary>
[AttributeUsage (AttributeTargets.Class)]
public class ScenarioMetadata (string name, string description) : System.Attribute
{
/// <summary><see cref="Scenario"/> Description</summary>
public string Description { get; set; } = description;
/// <summary>Static helper function to get the <see cref="Scenario"/> Description given a Type</summary>
/// <param name="t"></param>
/// <returns></returns>
public static string GetDescription (Type t)
{
if (GetCustomAttributes (t).FirstOrDefault (a => a is ScenarioMetadata) is ScenarioMetadata { } metadata)
{
return metadata.Description;
}
return string.Empty;
}
/// <summary>Static helper function to get the <see cref="Scenario"/> Name given a Type</summary>
/// <param name="t"></param>
/// <returns></returns>
public static string GetName (Type t)
{
if (GetCustomAttributes (t).FirstOrDefault (a => a is ScenarioMetadata) is ScenarioMetadata { } metadata)
{
return metadata.Name;
}
return string.Empty;
}
/// <summary><see cref="Scenario"/> Name</summary>
public string Name { get; set; } = name;
}