public object RegisterPageEntry(PDFLayoutContext context, string artefactType, IArtefactEntry entry) { IArtefactCollection col; if (!Artefacts.TryGetCollection(artefactType, out col)) { col = context.DocumentLayout.CreateArtefactCollection(artefactType); _artefacts.Add(col); } return(col.Register(entry)); }
/// <summary> /// Registers the IArtefactEntry values with the artefact collection of type 'catalogtype'. /// The method returns a reference object that must be passed back to CloseArtefactEntry when the entry should be closed. /// /// </summary> /// <param name="context"></param> /// <param name="catalogtype"></param> /// <param name="entry"></param> /// <returns></returns> public virtual object RegisterCatalogEntry(PDFLayoutContext context, string catalogtype, IArtefactEntry entry) { IArtefactCollection col; if (!this._artefacts.TryGetCollection(catalogtype, out col)) { col = this.CreateArtefactCollection(catalogtype); _artefacts.Add(col); } if (context.ShouldLogDebug) { context.TraceLog.Add(TraceLevel.Debug, "Layout Document", "Registering the artefact '" + entry.ToString() + "' in catalog " + catalogtype); } return(col.Register(entry)); }