コード例 #1
0
        //This method will return the back end xml document.
        internal static XmlDocument GetBackEndXmlDoc(DTO.Enums.BackEndOrFrontEndEnum whichEnd)
        {
            var doc = new XmlDocument();

            try
            {
                doc.Load(GetPath.GetBackEndXMLPath(whichEnd));
            }
            catch (DirectoryNotFoundException)
            {
                throw new DTO.Exceptions.CouldNotLocateRolloutDirectoryException();
            }
            catch (FileNotFoundException)
            {
                throw new DTO.Exceptions.BackEndNotFoundException();
            }
            catch (Exception)
            {
                throw;
            }
            return(doc);
        }
コード例 #2
0
 //This is a special method used for saving the backend.xml doc, which will raise a special custom
 //exception if it cannot.
 internal static void saveBackEndDoc(XmlDocument Doc)
 {
     saveDoc(GetPath.GetBackEndXMLPath(DTO.Enums.BackEndOrFrontEndEnum.BackEnd),
             new DTO.Exceptions.CouldNotSaveBackEndXmlException(),
             Doc);
 }