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); }
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; }
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); }
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; }