public MedicalReportItem(long id, long reportId, string derangementCode, DerangementState derangementState, string commentary) { Id = id; ReportId = reportId; DerangementCode = derangementCode; DerangementState = derangementState; Commentary = commentary; }
public static string DisplayedName(this DerangementState state) { var attributes = typeof(DerangementState).GetField(state.ToString()) .GetCustomAttributes(typeof(DisplayedNameAttribute), false); if (attributes.Length > 0) { return(((DisplayedNameAttribute)attributes[attributes.Length - 1]).DisplayedName); } throw new NotImplementedException("Строковое имя для элемента enum не задано"); }