コード例 #1
0
 private void Initialize(ref Stream stylesheet, ref Stream extension_object, BizTalkMapType mapType)
 {
     switch (mapType)
     {
     case BizTalkMapType.InToOutMap:
         //input =  @"\XSLT\IOFiles\MsgIn_output.xml";
         stylesheet       = GetFromResources("XSLT.InToOut.xsl");
         extension_object = GetFromResources("XSLT.InToOut_extxml.xml");
         break;
     }
 }
コード例 #2
0
        public async Task <string> ExecuteTransform(byte[] inputXml, string mapName)
        {
            Stream stylesheet       = null;
            Stream extension_object = null;


            BizTalkMapType mapType = (BizTalkMapType)Enum.Parse(typeof(BizTalkMapType), mapName);

            Initialize(ref stylesheet, ref extension_object, mapType);

            object[] extensionObjects = await GetExtensionObjects(extension_object);

            return(await XslCompiledTransforms(
                       XmlReader.Create(new MemoryStream(inputXml)),
                       stylesheet, extensionObjects));
        }
コード例 #3
0
        public string Transform(string mapType, string req)
        {
            //return XslCompiledTransform();
            string input            = req;
            Stream stylesheet       = null;
            Stream extension_object = null;

            BizTalkMapType MapType = BizTalkMapType.InToOutMap;

            MapInitializer(ref input, ref stylesheet, ref extension_object, MapType);


            // byte[] mapContent = await blobStorageClient.GetBlob(_mapsContainerName, transformRequest.MapName);
            //byte[] extensionObjectContent = transformRequest.ExtensionObjectName == null ? null : await blobStorageClient.GetBlob(_extensionObjectsContainerName, transformRequest.ExtensionObjectName);


            return(XslCompiledTransform(input, stylesheet, extension_object));
        }
コード例 #4
0
        private static void MapInitializer(ref string input, ref Stream stylesheet, ref Stream extension_object, BizTalkMapType MapType)
        {
            string basedirectorypath = "";

            switch (MapType)
            {
            case BizTalkMapType.InToOutMap:
                //input =  @"\XSLT\IOFiles\MsgIn_output.xml";
                stylesheet       = GetFromResources("XSLT.InToOut.xsl");
                extension_object = GetFromResources("XSLT.InToOut_extxml.xml");
                break;
            }
        }