コード例 #1
0
        public void Test_Embedded4()
        {
            var resource          = Xml.Embedded("hasResourceIncludes.xml");
            var interpreter       = new XmlInterpreter(resource);
            var kernel            = new DefaultKernel();
            var resourceSubSystem = kernel.GetSubSystem(SubSystemConstants.ResourceKey) as IResourceSubSystem;
            var processor         = new XmlProcessor(null, resourceSubSystem);
            var assemRes          = resource as AssemblyResource;

            Assert.IsNotNull(assemRes);
            var doc = new XmlDocument();

            using (var stream = resource.GetStreamReader())
            {
                doc.Load(stream);
            }
            var engine = new DefaultXmlProcessorEngine(null, resourceSubSystem);

            engine.PushResource(resource);
            Assert.AreEqual(doc.DocumentElement.InnerText, "");
            var element = processor.Process(doc.DocumentElement);

            engine.PopResource();
        }
コード例 #2
0
 /// <summary>
 ///   Constructor
 /// </summary>
 /// <param name="environmentName">Environment name</param>
 /// <param name="resourceSubSystem">Resource subsystem</param>
 public PropertiesXmlProcessor(string environmentName, IResourceSubSystem resourceSubSystem)
 {
     m_engine = new DefaultXmlProcessorEngine(environmentName, resourceSubSystem);
     RegisterProcessors();
 }