private MonitorConfig GetConfig(string configpath)
        {
            var requestscopecache = new RequestScopedCacheWrapper();
            var xmlFileLoader     = new XmlFileLoader(requestscopecache);

            return(new ConfigLoader(xmlFileLoader).From(Server.MapPath(configpath)));
        }
        private MonitorConfig GetConfig(string configpath)
        {
            var requestscopecache = new RequestScopedCacheWrapper();
            var xmlFileLoader = new XmlFileLoader(requestscopecache);

            return new ConfigLoader(xmlFileLoader).From(Server.MapPath(configpath));
        }
예제 #3
0
        /// <summary>
        /// Overrides the match method to load the XML from file instead.
        /// </summary>
        /// <param name="xmlFilename_"></param>
        /// <returns></returns>
        public override bool Matches(string xmlFilename_)
        {
            if (null == xmlFilename_)
            {
                throw new ArgumentNullException(nameof(xmlFilename_));
            }

            var xmlString = XmlFileLoader.LoadXmlFromFile(xmlFilename_);

            return(base.Matches(xmlString));
        }
        public override void GetData()
        {
            var xmlfileLoader = new XmlFileLoader();

            xmlfileLoader.LoadXML();
        }
 public ConfigLoader(XmlFileLoader xmlFileLoader)
 {
     _xmlFileLoader = xmlFileLoader;
 }
예제 #6
0
 /// <summary>
 /// Loads the expected XML from a file instead of it being provided as a string but in all other regards
 /// this peforms identically to the <code>XmlSerializer</code>
 /// </summary>
 /// <param name="serializer_">T</param>
 /// <param name="refXmlFilename_">The filename of the file to read the expected XML output from</param>
 public XmlFileSerializerConstraint(IXmlSerializer <T> serializer_, string refXmlFilename_) : base(serializer_, XmlFileLoader.LoadXmlFromFile(refXmlFilename_))
 {
 }
 public ConfigLoader(XmlFileLoader xmlFileLoader)
 {
     _xmlFileLoader = xmlFileLoader;
 }
        public void GetData()
        {
            var xmlFileLoader = new XmlFileLoader();

            xmlFileLoader.LoadXML();
        }