mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-20 00:11:04 +08:00
26 lines
653 B
C#
26 lines
653 B
C#
using NUnit.Framework;
|
|
using System.Linq;
|
|
|
|
namespace System.Application
|
|
{
|
|
public class DISafeGetTest
|
|
{
|
|
[Test]
|
|
public void Reflection()
|
|
{
|
|
var methods = typeof(DISafeGet).GetMethods().Where(x => x.IsStatic && x.GetParameters().Length == 0);
|
|
|
|
foreach (var method in methods)
|
|
{
|
|
try
|
|
{
|
|
method.Invoke(null, Array.Empty<object>());
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
throw new Exception($"method.Invoke fail, name: {method.Name}", e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |