public ManifestSuperBlock(MashupParseContext context, TellManifestDirty tellDirty) { this.tellDirty = tellDirty; XMLTagReader xMLTagReader = context.NewTagReader(GetXmlTag()); _nextUnassignedBlockId = context.GetRequiredAttributeInt("NextUnassignedBlockId"); _splitThreshold = context.GetRequiredAttributeInt("SplitThreshold"); xMLTagReader.SkipAllSubTags(); }
public ManifestBlock(TellManifestDirty tellManifestDirty, RenderOutputMethod outputMethod, int blockId) { this.tellManifestDirty = tellManifestDirty; this.blockId = blockId; try { Stream input = outputMethod.MakeChildMethod("manifests").ReadFile(manifestFilename(blockId)); XmlTextReader xmlTextReader = new XmlTextReader(input); using (xmlTextReader) { MashupParseContext mashupParseContext = new MashupParseContext(xmlTextReader); while (mashupParseContext.reader.Read()) { if (mashupParseContext.reader.NodeType == XmlNodeType.Element && mashupParseContext.reader.Name == "ManifestBlock") { XMLTagReader xMLTagReader = mashupParseContext.NewTagReader("ManifestBlock"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(ManifestRecord.GetXmlTag())) { recordList.Add(new ManifestRecord(mashupParseContext, this)); } else { if (xMLTagReader.TagIs(ManifestSuperBlock.GetXmlTag())) { superBlock = new ManifestSuperBlock(mashupParseContext, new TellManifestDirty(SetDirty)); } } } return; } } throw new InvalidMashupFile(mashupParseContext, "No ManifestBlock tag"); } } catch (Exception) { } finally { if (blockId == 0 && superBlock == null) { superBlock = new ManifestSuperBlock(1, new TellManifestDirty(SetDirty)); } } }
public ManifestSuperBlock(int nextUnassignedBlockId, TellManifestDirty tellDirty) { _nextUnassignedBlockId = nextUnassignedBlockId; this.tellDirty = tellDirty; }