System.Xml.Tests.XslCompiledTransformModule.Init C# (CSharp) Méthode

Init() public méthode

public Init ( object objParam ) : int
objParam object
Résultat int
        public override int Init(object objParam)
        {
            int ret = base.Init(objParam);

            // These steps use to be part of javascript files and these were copied and executed as test setup step.
            // I belive this to be a much better way of accomplishing the same task.
            // Logic from CreateApiTestFiles.js
            string sourceFile = Path.Combine(FilePathUtil.GetTestDataPath(), "XsltApiV2", "xmlResolver_document_function.xml");
            string targetFile = @"c:\temp\xmlResolver_document_function.xml";
            if (!Directory.Exists(@"c:\temp"))
                Directory.CreateDirectory(@"c:\temp");
            if (!File.Exists(targetFile))
                File.Copy(sourceFile, targetFile, true);

            // Logic from CreateStrasse.js
            using (XmlWriter writer = XmlWriter.Create("Stra\u00DFe.xml"))
            {
                writer.WriteComment(" ");
            }

            return ret;
        }
    }
XslCompiledTransformModule