Example #1
0
 // JR added in
 public override void Load(XmlReader reader)
 {
     using (StaticSection.Use(this))
     {
         base.Load(reader);
     }
 }
        public override void Load(Stream inStream)
        {
            using (StaticSection.Use(this))
            {
                base.Load(inStream);

                _isLoaded = true;
                this.OnLoaded();
            }
        }
        // JR added in
        public override void Load(XmlReader reader)
        {
            using (StaticSection.Use(this))
            {
                base.Load(reader);

                _isLoaded = true;
                this.OnLoaded();
            }
        }
Example #4
0
 public override void LoadXml(string xml)
 {
     using (StaticSection.Use(this))
     {
         //base.LoadXml(xml);
         // we use a stream here, only not to use SvgDocument.Load(XmlReader)
         using (var xmlStream = new StringReader(xml))
         {
             Load(xmlStream);
         }
     }
 }
Example #5
0
 /// <summary>
 /// Loads a XML document, compare to XmlDocument.Load()
 /// </summary>
 /// <param name="filename"></param>
 public override void Load(string filename)
 {
     using (StaticSection.Use(this))
     {
         // remove any hash (won't work for local files)
         int hashStart = filename.IndexOf("#", StringComparison.OrdinalIgnoreCase);
         if (hashStart > -1)
         {
             filename = filename.Substring(0, hashStart);
         }
         base.Load(filename);
     }
 }
Example #6
0
        /// <summary>
        /// Loads a XML document, compare to XmlDocument.Load()
        /// </summary>
        /// <param name="filename"></param>
        public override void Load(string filename)
        {
            using (StaticSection.Use(this))
            {
                // remove any hash (won't work for local files)
                int hashStart = filename.IndexOf(XmlConstants.XlinkHash, StringComparison.OrdinalIgnoreCase);
                if (hashStart > -1)
                {
                    filename = filename.Substring(0, hashStart);
                }
                base.Load(filename);

                _isLoaded = true;
                this.OnLoaded();
            }
        }