AcManager.Tools.AcErrors.AcError.CategoryFromType C# (CSharp) Méthode

CategoryFromType() private static méthode

private static CategoryFromType ( AcErrorType type ) : AcErrorCategory
type AcErrorType
Résultat AcErrorCategory
        private static AcErrorCategory CategoryFromType(AcErrorType type) {
            AcErrorCategory result;
            if (Enum.TryParse(type.ToString().Split(new[] { '_' }, 2)[0], out result)) {
                return result;
            }

            Logging.Warning($"Can’t get category for AcErrorType: {type}");
            return AcErrorCategory.Unspecific;
        }