Esempio n. 1
0
        /// <summary>
        /// Contructs and reads the configuration from a XML file
        /// </summary>
        /// <returns></returns>
        public static ErrorClassificationSuggestionList CreateNew()
        {
            const string errorClassificationSuggestionXmlPath = "errorClassificationSuggestionList.xml";

            var errorClassificationSuggestionList = new ErrorClassificationSuggestionList();

            if (!File.Exists(errorClassificationSuggestionXmlPath))
            {
                return(errorClassificationSuggestionList);
            }

            var ser = new XmlSerializer(typeof(ErrorClassificationSuggestionList));

            using (var readtext = new StreamReader(errorClassificationSuggestionXmlPath))
            {
                errorClassificationSuggestionList = (ErrorClassificationSuggestionList)ser.Deserialize(readtext);
            }

            return(errorClassificationSuggestionList);
        }
Esempio n. 2
0
 public MSTestWrapper()
 {
     _errorClassificationSuggestionList = ErrorClassificationSuggestionList.CreateNew();
 }