示例#1
0
		protected string GenerateRuleFile(string inFile, SaveFormatAttributes sfa) {
			string outFile = outFilesFolder + sfa.ToString().ToLower() + "-" + inFile;
			
			FileInfo fi = new FileInfo(outFile);
			if (fi.Exists) fi.Delete();
			
			IInferenceEngine ie = new IEImpl();
			ie.LoadRuleBase(new RuleML09NafDatalogAdapter(ruleFilesFolder + inFile, FileAccess.Read));
			ie.SaveRuleBase(new RuleML09NafDatalogAdapter(outFile, FileAccess.Write, sfa));
			
			Console.Out.WriteLine("Generated: {0}", outFile);
			
			return outFile;
		}
        protected string GenerateRuleFile(string inFile, SaveFormatAttributes sfa)
        {
            string outFile = outFilesFolder + sfa.ToString().ToLower() + "-" + inFile;

            FileInfo fi = new FileInfo(outFile);
            if (fi.Exists) fi.Delete();

            IInferenceEngine ie = new IEImpl();
            ie.LoadRuleBase(new RuleML09NafDatalogAdapter(ruleFilesFolder + inFile, FileAccess.Read));
            ie.SaveRuleBase(new RuleML09NafDatalogAdapter(outFile, FileAccess.Write, sfa));

            Console.Out.WriteLine("Generated: {0}", outFile);

            return outFile;
        }