IfcDoc.Program.ExportSchRule C# (CSharp) Méthode

ExportSchRule() private static méthode

private static ExportSchRule ( IfcDoc.Schema.SCH.rule r, List pathRule ) : void
r IfcDoc.Schema.SCH.rule
pathRule List
Résultat void
        private static void ExportSchRule(rule r, List<DocModelRule> pathRule)
        {
            assert a = new assert();
            r.Asserts.Add(a);

            StringBuilder sb = new StringBuilder();
            foreach (DocModelRule docRule in pathRule)
            {
                sb.Append(docRule.Name);
                sb.Append("/");
            }
            a.test = sb.ToString();

            // recurse
            DocModelRule docParent = pathRule[pathRule.Count-1];
            if (docParent.Rules != null)
            {
                foreach (DocModelRule docSub in docParent.Rules)
                {
                    pathRule.Add(docSub);

                    ExportSchRule(r, pathRule);

                    pathRule.Remove(docSub);
                }
            }
        }