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();
        }
 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);
     }
 }
        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);
        }
 public static void WriteHtmlArtItemWithTopicLink(this MamlWriter writer, ArtItem artItem, Topic topic)
 {
     writer.StartHtmlArtItem(artItem);
     writer.WriteHtmlTopicLink(topic);
     writer.EndHtmlArtItem();
 }
 public static void WriteHtmlArtItemWithText(this MamlWriter writer, ArtItem artItem, string text)
 {
     writer.StartHtmlArtItem(artItem);
     writer.WriteString(text);
     writer.EndHtmlArtItem();
 }
 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();
 }
Beispiel #9
0
 public MediaItem(ArtItem artItem, string fileName)
 {
     ArtItem  = artItem;
     FileName = fileName;
 }
Beispiel #10
0
 public MediaItem(ArtItem artItem, string fileName)
 {
     ArtItem = artItem;
     FileName = fileName;
 }