Exemplo n.º 1
0
        public static string GetRules(RuleSetInfo ruleSetInfo)
        {
            string savedPath = Path.Combine(GenericHelper.GetTempFolder(Environment.MachineName), string.Format("{0}_{1}_{2}.xml", ruleSetInfo.Name, ruleSetInfo.MajorRevision.ToString(), ruleSetInfo.MinorRevision.ToString()));

            Microsoft.BizTalk.RuleEngineExtensions.RuleSetDeploymentDriver dd = new Microsoft.BizTalk.RuleEngineExtensions.RuleSetDeploymentDriver();
            dd.ExportRuleSetToFileRuleStore(ruleSetInfo, savedPath);
            string data = File.ReadAllText(savedPath, Encoding.UTF8);

            File.Delete(savedPath);
            XmlDocument xDoc = new XmlDocument();

            xDoc.LoadXml(data);
            return(xDoc.Beautify());
        }