private static void WriteConstraintRow(this MamlWriter writer, Context context, ArtItem artItem, string constrainedType, XmlSchemaIdentityConstraint constraint)
        {
            writer.StartTableRow();

            writer.StartTableRowEntry();
            writer.WriteArtItemInline(artItem);
            writer.EndTableRowEntry();

            writer.StartTableRowEntry();
            writer.WriteString(constrainedType);
            writer.EndTableRowEntry();

            writer.StartTableRowEntry();
            writer.WriteSummaryForObject(context, constraint);
            writer.EndTableRowEntry();

            writer.StartTableRowEntry();
            writer.WriteString(constraint.Selector.XPath);
            writer.EndTableRowEntry();

            writer.StartTableRowEntry();
            writer.WriteConstraintFieldList(constraint.Fields);
            writer.EndTableRowEntry();

            writer.EndTableRow();
        }
Ejemplo n.º 2
0
 private static void AddItem(ICollection<ListItem> items, ArtItem artItem, Topic topic, string summaryMarkup)
 {
     var listItem = new ListItem
                    {
                        ArtItem = artItem,
                        Topic = topic,
                        SummaryMarkup = summaryMarkup
                    };
     items.Add(listItem);
 }
 private static void WriteImageWithTopicLink(this MamlWriter writer, TopicManager topicManager, ArtItem artItem, XmlSchemaType type)
 {
     var topic = topicManager.GetTopic(type);
     if (topic != null)
     {
         writer.WriteHtmlArtItemWithTopicLink(artItem, topic);
     }
     else
     {
         writer.WriteHtmlArtItemWithText(artItem, type.QualifiedName.Name);
     }
 }
Ejemplo n.º 4
0
        public static void StartHtmlArtItem(this MamlWriter writer, ArtItem artItem)
        {
            writer.StartMarkup();

            // Emitting a <nobr> tag breaks the Open XML output. I'm pretty
            // sure that I've added this originally in order to avoid weird
            // breaks between the icon and whatever comes after (usually a
            // link or text). However, after visual inspection, I can't find
            // any cases where this can actually occur.
            //
            // If we need to add this back, we should probably either special
            // case the output type and suppress <nobr> for Open XML or find a
            // MAML way of doing it (which doesn't exist today).
            //
            // writer.WriteStartElement("nobr", String.Empty);

            writer.WriteStartElement("artLink");
            writer.WriteAttributeString("target", artItem.Id);
            writer.WriteEndElement();
            writer.WriteRaw(NonBlockingSpaceEntityName);
        }
Ejemplo n.º 5
0
 public static void WriteHtmlArtItemWithTopicLink(this MamlWriter writer, ArtItem artItem, Topic topic)
 {
     writer.StartHtmlArtItem(artItem);
     writer.WriteHtmlTopicLink(topic);
     writer.EndHtmlArtItem();
 }
Ejemplo n.º 6
0
 public static void WriteHtmlArtItemWithText(this MamlWriter writer, ArtItem artItem, string text)
 {
     writer.StartHtmlArtItem(artItem);
     writer.WriteString(text);
     writer.EndHtmlArtItem();
 }
Ejemplo n.º 7
0
 public static void WriteArtItemInline(this MamlWriter writer, ArtItem artItem)
 {
     writer.WriteMediaLinkInline(artItem.Id);
 }
 private static void WriteConstructor(this MamlWriter writer, int level, TopicManager topicManager, SimpleTypeStructureNode node, ArtItem constructionArtItem, string constructName)
 {
     writer.StartTableRowEntry();
     writer.WriteHtmlIndent(level);
     writer.StartHtmlArtItem(constructionArtItem);
     if (ContainsNamedTypes(node.Children))
         writer.WriteTypeNamesMarkup(topicManager, node.Children);
     else
         writer.WriteString(constructName);
     writer.EndHtmlArtItem();
     writer.EndTableRowEntry();
     writer.StartTableRowEntry();
     writer.EndTableRowEntry();
 }
Ejemplo n.º 9
0
 public MediaItem(ArtItem artItem, string fileName)
 {
     ArtItem  = artItem;
     FileName = fileName;
 }
Ejemplo n.º 10
0
 public MediaItem(ArtItem artItem, string fileName)
 {
     ArtItem = artItem;
     FileName = fileName;
 }