Esempio n. 1
0
        private static void WriteConstraintFieldList(this MamlWriter writer, XmlSchemaObjectCollection fields)
        {
            if (fields.Count == 1)
            {
                var field = (XmlSchemaXPath)fields[0];
                writer.WriteString(field.XPath);
                return;
            }

            writer.StartList(ListClass.Ordered);

            foreach (XmlSchemaXPath field in fields)
            {
                writer.StartListItem();
                writer.StartParagraph();
                writer.WriteString(field.XPath);
                writer.EndParagraph();
                writer.EndListItem();
            }

            writer.EndList();
        }