From 528dcabf590f7600e9c3db7caeac064e24e6624a Mon Sep 17 00:00:00 2001 From: BlubbFish Date: Sun, 22 Aug 2021 00:12:41 +0200 Subject: [PATCH] make mirror on github.com --- README.md | 2 ++ Utils/Helper.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index e964ee3..ebb44ff 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # BlubbFish.Utils (Utils) Library containing helpfull utils + +Maybe you find this Repo on Github. This is a mirror from [here](https://git.blubbfish.net/vs_utils/Utils). \ No newline at end of file diff --git a/Utils/Helper.cs b/Utils/Helper.cs index 7aa8b63..9f92a99 100644 --- a/Utils/Helper.cs +++ b/Utils/Helper.cs @@ -49,10 +49,12 @@ namespace BlubbFish.Utils { FieldInfo field = o.GetType().GetField(name); return field.IsPublic ? field.GetValue(o) : null; } + public static Object GetField(this Type o, String name) { FieldInfo field = o.GetField(name); return field.IsPublic ? field.GetValue(o) : null; } + public static T GetEvent(this Object o, String name) { FieldInfo field = o.GetType().GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); return (T)field?.GetValue(o);