Пример #1
0
        public void AddFact(string label)
        {
            if (statements.Count != 1)
            {
                throw new DslException("A fact must contain one level of statements.");
            }

            string atom = definitions.GetResolvedContent(statements[0].text);

            if (label != null)
            {
                atom = atom.Replace("<Atom>", "<Atom><oid><Ind>" + SecurityElement.Escape(label) + "</Ind></oid>");
            }

            facts.AppendLine(atom);

            PurgeAccumulators();
        }