System.Configuration.SectionInformation.SetRawXml C# (CSharp) Метод

SetRawXml() публичный Метод

public SetRawXml ( string xml ) : void
xml string
Результат void
		public void SetRawXml (string xml)
		{
			raw_xml = xml;
		}

Usage Example

Пример #1
0
        internal void DeserializeConfigSource(string basePath)
        {
            var configSource = SectionInformation.ConfigSource;

            if (string.IsNullOrEmpty(configSource))
            {
                return;
            }

            if (Path.IsPathRooted(configSource))
            {
                throw new ConfigurationErrorsException("The configSource attribute must be a relative physical path.");
            }

            if (HasLocalModifications())
            {
                throw new ConfigurationErrorsException(
                          "A section using 'configSource' may contain no other attributes or elements.");
            }

            string path = Path.Combine(basePath, configSource);

            if (!File.Exists(path))
            {
                RawXml = null;
                SectionInformation.SetRawXml(null);
                throw new ConfigurationErrorsException(string.Format("Unable to open configSource file '{0}'.", path));
            }

            RawXml = File.ReadAllText(path);
            SectionInformation.SetRawXml(RawXml);
            DeserializeElement(XmlReader.Create(new StringReader(RawXml)), false);
        }
All Usage Examples Of System.Configuration.SectionInformation::SetRawXml