gov.va.medora.mdws.MySession.setSites C# (CSharp) Method

setSites() public method

Allow a client application to specifiy their sites file by name
public setSites ( string sitesFileName ) : SiteArray
sitesFileName string The name of the sites file
return gov.va.medora.mdws.dto.SiteArray
        public SiteArray setSites(string sitesFileName)
        {
            SiteArray result = new SiteArray();
            try
            {
                _siteTable = new mdo.SiteTable(_mdwsConfig.ResourcesPath + "xml\\" + sitesFileName);
                _mdwsConfig.FacadeConfiguration.SitesFileName = sitesFileName;
                watchSitesFile(_mdwsConfig.ResourcesPath + "xml\\");
                result = new SiteArray(_siteTable.Sites);
            }
            catch (Exception)
            {
                result.fault = new FaultTO("A sites file with that name does not exist on the server!");
            }
            return result;
        }