private void GenerateGroupTopic(Topic topic) { var group = (XmlSchemaGroup)topic.SchemaObject; var parents = _context.SchemaSetManager.GetObjectParents(group); var children = _context.SchemaSetManager.GetChildren(group); using (var stream = File.Create(topic.FileName)) using (var writer = new MamlWriter(stream)) { writer.StartTopic(topic.Id); writer.WriteIntroductionForObject(_context, group); writer.WriteUsagesSection(_context, parents); writer.WriteChildrenSection(_context, children); writer.WriteRemarksSectionForObject(_context, group); writer.WriteExamplesSectionForObject(_context, group); writer.WriteSyntaxSection(_context, group); writer.WriteRelatedTopics(_context, group); writer.EndTopic(); } }
private void GenerateSimpleTypeTopic(Topic topic) { var simpleType = (XmlSchemaSimpleType)topic.SchemaObject; var usages = _context.SchemaSetManager.GetTypeUsages(simpleType); var simpleTypeStructureRoot = _context.SchemaSetManager.GetSimpleTypeStructure(simpleType.Content); using (var stream = File.Create(topic.FileName)) using (var writer = new MamlWriter(stream)) { writer.StartTopic(topic.Id); writer.WriteIntroductionForObject(_context, simpleType); writer.WriteContentTypeSection(_context, simpleTypeStructureRoot); writer.WriteUsagesSection(_context, usages); writer.WriteRemarksSectionForObject(_context, simpleType); writer.WriteExamplesSectionForObject(_context, simpleType); writer.WriteSyntaxSection(_context, simpleType); writer.WriteRelatedTopics(_context, simpleType); writer.EndTopic(); } }
private void GenerateAttributeGroup(Topic topic) { var attributeGroup = (XmlSchemaAttributeGroup)topic.SchemaObject; var usages = _context.SchemaSetManager.GetObjectParents(attributeGroup); var attributeEntries = _context.SchemaSetManager.GetAttributeEntries(attributeGroup); using (var stream = File.Create(topic.FileName)) using (var writer = new MamlWriter(stream)) { writer.StartTopic(topic.Id); writer.WriteIntroductionForObject(_context, attributeGroup); writer.WriteUsagesSection(_context, usages); writer.WriteAttributesSection(_context, attributeEntries); writer.WriteRemarksSectionForObject(_context, attributeGroup); writer.WriteExamplesSectionForObject(_context, attributeGroup); writer.WriteSyntaxSection(_context, attributeGroup); writer.WriteRelatedTopics(_context, attributeGroup); writer.EndTopic(); } }