Use newer syntax for Enum.IsDefined()

This commit is contained in:
Archi
2022-01-23 01:37:43 +01:00
parent 4258fed873
commit dae6f9d328
22 changed files with 143 additions and 142 deletions

View File

@@ -73,7 +73,7 @@ internal static class Logging {
}
internal static async Task<string?> GetUserInput(ASF.EUserInputType userInputType, string botName = SharedInfo.ASF) {
if ((userInputType == ASF.EUserInputType.None) || !Enum.IsDefined(typeof(ASF.EUserInputType), userInputType)) {
if ((userInputType == ASF.EUserInputType.None) || !Enum.IsDefined(userInputType)) {
throw new InvalidEnumArgumentException(nameof(userInputType), (int) userInputType, typeof(ASF.EUserInputType));
}