Esempio n. 1
0
 object IArtefactCollection.Register(IArtefactEntry entry)
 {
     if (entry is PDFOutlineRef)
     {
         return(this.Push((PDFOutlineRef)entry));
     }
     else
     {
         throw RecordAndRaise.InvalidCast(Errors.CannotConvertObjectToType, entry, typeof(PDFOutlineRef).FullName);
     }
 }
Esempio n. 2
0
        object IArtefactCollection.Register(IArtefactEntry catalogobject)
        {
            if (null == catalogobject)
            {
                throw RecordAndRaise.ArgumentNull("catalogobject");
            }

            if (!(catalogobject is PDFAnnotationEntry))
            {
                throw RecordAndRaise.InvalidCast(Errors.CannotConvertObjectToType, catalogobject.GetType(), typeof(PDFAnnotationEntry));
            }

            _annots.Add((PDFAnnotationEntry)catalogobject);
            return(catalogobject);
        }