renmove ResourceEnum, use filename only

add ToHash for encryption Key
This commit is contained in:
Alex Bezdieniezhnykh
2024-11-22 12:13:37 +02:00
parent 8be7625542
commit f5e466108a
16 changed files with 103 additions and 85 deletions
+3 -3
View File
@@ -26,15 +26,15 @@ public static class EnumExtensions
}
/// <summary> Get attribute for enum's member, usually is used for getting Description attribute </summary>
public static TAttrib GetEnumAttrib<T, TAttrib>(this T value) where T: Enum
private static TAttrib GetEnumAttrib<T, TAttrib>(this T value) where T: Enum
{
var field = value.GetType().GetField(value.ToString());
if (field == null)
return default;
return default!;
return field.GetCustomAttributes(typeof(TAttrib), false)
.Cast<TAttrib>()
.FirstOrDefault();
.FirstOrDefault()!;
}
/// <summary>