Exemplo n.º 1
0
        private static bool IsSeveralAllowed(AcErrorType errorType)
        {
            var type    = typeof(AcErrorType);
            var memInfo = type.GetMember(errorType.ToString());

            return(memInfo[0].GetCustomAttributes(typeof(SeveralAllowedAttribute), false).Length > 0);
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 private static bool IsSeveralAllowed(AcErrorType errorType) {
     var type = typeof(AcErrorType);
     var memInfo = type.GetMember(errorType.ToString());
     return memInfo[0].GetCustomAttributes(typeof(SeveralAllowedAttribute), false).Length > 0;
 }