diff --git a/Shared/Extensions/GeneralExtension.cs b/Shared/Utils/GeneralUtils.cs similarity index 69% rename from Shared/Extensions/GeneralExtension.cs rename to Shared/Utils/GeneralUtils.cs index 4187af5..25b6cbb 100644 --- a/Shared/Extensions/GeneralExtension.cs +++ b/Shared/Utils/GeneralUtils.cs @@ -1,10 +1,10 @@ -namespace MeloongCore.Extensions; -public static class GeneralExtension { +namespace MeloongCore; +public static class GeneralUtils { /// /// 判断对象是否为指定泛型类型的实例。 /// - 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;