修改存在的一些错误

This commit is contained in:
2025-08-31 01:34:59 +08:00
parent cffe77a4cd
commit e432177af8
2 changed files with 4 additions and 2 deletions

View File

@@ -1273,7 +1273,7 @@ namespace Convention
}
return result;
}
public static List<MemberInfo> SeekMemberInfo([In] object target, IEnumerable<string> names, BindingFlags flags = BindingFlags.Default)
public static List<MemberInfo> SeekMemberInfo([In] object target, IEnumerable<string> names, BindingFlags flags = BindingFlags.Public | BindingFlags.Instance)
{
Type _CurType = target.GetType();
List<MemberInfo> result = _CurType.GetMembers(flags).ToList();

View File

@@ -79,7 +79,7 @@ namespace Convention
}
public string GetName(bool is_ignore_extension = false)
{
return this.FullPath[..(
var result = this.FullPath[..(
(this.FullPath.Contains('.') && is_ignore_extension)
? this.FullPath.LastIndexOf('.')
: ^0
@@ -89,6 +89,8 @@ namespace Convention
? ^1
: ^0
)];
return result[(Mathf.Max(result.Contains('/') ? result.LastIndexOf('/') : -1,
result.Contains('\\') ? result.LastIndexOf('\\') : -1) + 1)..];
}
public string GetExtension()
{