/// <summary> /// Returns the scale based on string value. /// </summary> /// <param name="scale">The scale to parse</param> /// <returns>A scale or NULL (if not parseable)</returns> private static QScoreLibrary.Estimation.eScales?GetScale(string scale) { if (string.IsNullOrEmpty(scale) || !Enum.GetNames(typeof(QScoreLibrary.Estimation.eScales)).Contains(scale, StringComparer.OrdinalIgnoreCase)) { return(null); } QScoreLibrary.Estimation.eScales scaleEnum = (QScoreLibrary.Estimation.eScales)Enum.Parse(typeof(QScoreLibrary.Estimation.eScales), scale, true); return(scaleEnum); }
public ScaleDefinition(QScoreLibrary.Estimation.eScales eScale, string name, string[] questions) { this.eScale = eScale; this.name = name; this.questions = questions.ToArray(); }