龙腾猫跃 4 месяцев назад
Родитель
Сommit
1f91e757c2
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      Shared/Utils/GeneralUtils.cs

+ 3 - 3
Shared/Extensions/GeneralExtension.cs → Shared/Utils/GeneralUtils.cs

@@ -1,10 +1,10 @@
-namespace MeloongCore.Extensions;
-public static class GeneralExtension {
+namespace MeloongCore;
+public static class GeneralUtils {
 
     /// <summary>
     /// 判断对象是否为指定泛型类型的实例。
     /// </summary>
-    public static bool IsGenericInstanceOf(this object? instance, Type genericTypeDefinition) {
+    public static bool IsGenericInstanceOf(object? instance, Type genericTypeDefinition) {
         if (instance is null) return false;
         for (var type = instance.GetType(); type is not null; type = type.BaseType) {
             if (type.IsGenericType && type.GetGenericTypeDefinition() == genericTypeDefinition) return true;