添加项目文件。

This commit is contained in:
akwkevin
2021-07-23 09:42:22 +08:00
commit f25a958797
2798 changed files with 352360 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
namespace Fluent.Tests.Helper
{
using System;
using System.Reflection;
public static class ReflectionHelper
{
public static T GetFieldValue<T>(this object obj, string fieldName)
{
return (T)GetPrivateFieldInfo(obj.GetType(), fieldName).GetValue(obj);
}
private static FieldInfo GetPrivateFieldInfo(Type type, string fieldName)
{
return type.GetField(fieldName, BindingFlags.Instance | BindingFlags.NonPublic);
}
}
}

View File

@@ -0,0 +1,18 @@
namespace Fluent.Tests.Helper
{
using System;
using System.Windows.Threading;
public static class UIHelper
{
public static void DoEvents()
{
Dispatcher.CurrentDispatcher.DoEvents();
}
public static void DoEvents(this Dispatcher dispatcher)
{
dispatcher.Invoke(DispatcherPriority.Background, new Action(() => { }));
}
}
}