コード例 #1
0
        /// <summary>
        /// Gets the configuration XML.
        /// </summary>
        /// <param name="options">The options.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public XDocument GetConfigurationXml(FsaConfigurationLoadOptions options)
        {
            Debug.Assert(options != null);
            string pathToConfigXml = _fsaConfigurationFilePathProvider.GetConfigurationFilePath();
            Debug.Assert(!string.IsNullOrWhiteSpace(pathToConfigXml));

            XDocument configurationXml = _fsaConfigurationDal.GetConfigurationXml(pathToConfigXml);
            _fsaConfigurationValidator.ValidateConfiguration(configurationXml);
            return configurationXml;
        }
コード例 #2
0
        /// <summary>
        /// Retrieves the FSA configuration.
        /// </summary>
        /// <param name="options">The options.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public FsaConfiguration GetConfiguration(FsaConfigurationLoadOptions options)
        {
            Debug.Assert(options != null);

            XDocument configXml = _dataProvider.GetConfigurationXml(options);
            Debug.Assert(configXml != null);

            EmailSummaryDetails emailSummaryDetails = GetEmailSummaryDetailsFromConfiguration(configXml);
            IEnumerable<FileStoreDetails> fileStoreDetails = GetFileStoresDetailsFromConfiguration(configXml);

            return new FsaConfiguration(emailSummaryDetails, fileStoreDetails);
        }