Пример #1
0
        /// <summary>
        /// Gets the URI as XML reader.
        /// </summary>
        /// <param name="uri">The URI.</param>
        /// <returns></returns>
        public static XmlTextReader GetUriAsXmlReader(string uri)
        {
            Contract.Require.That(uri, Is.Not.Null & Is.Not.Empty).When("retrieving uri in GetUriAsXmlReader method");

            IResource resource = ResourceLoaderRegistry.GetResource(uri);

            return(GetStreamAsXmlReader(resource.Stream));
        }
Пример #2
0
        /// <summary>
        /// Gets as XML document from the specified uri.
        /// </summary>
        /// <param name="uri">The URI.</param>
        ///// <param name="configStore">The config store.</param>, IConfigurationStore configStore
        /// <returns>Return the Xml document load.</returns>
        public static XmlDocument GetUriAsXmlDocument(string uri)
        {
            Contract.Require.That(uri, Is.Not.Null & Is.Not.Empty).When("retrieving uri in GetUriAsXmlDocument method");

            IResource resource = ResourceLoaderRegistry.GetResource(uri);

            XmlDocument xmlDocument = GetStreamAsXmlDocument(resource.Stream);

            return(xmlDocument);
        }