Beispiel #1
0
        private void AddReference(DiscoveredUrl discoveredUrl, Document document)
        {
            var documentRef = new DocumentRef();

            documentRef.SourceDocument = discoveredUrl.SourceDocument;
            documentRef.TargetDocument = document;
            documentRef.Excerpt        = discoveredUrl.Excerpt;
            lock (document.ReferencedBy)
            {
                document.ReferencedBy.Add(documentRef);
            }

            OnDocumentRefAdded(documentRef);
            OnDocumentUpdated(document);
        }
 public DocumentRefAddedEventArgs(DocumentRef documentRef)
 {
     DocumentRef = documentRef ?? throw new ArgumentNullException(nameof(documentRef));
 }
Beispiel #3
0
 protected virtual void OnDocumentRefAdded(DocumentRef documentRef)
 {
     DocumentRefAdded?.Invoke(this, new DocumentRefAddedEventArgs(documentRef));
 }