Aspose.Words.Examples.CSharp.Programming_Documents.Working_With_Document.InsertDoc.InsertDocumentAtReplaceHandler.IReplacingCallback C# (CSharp) Метод

IReplacingCallback() приватный Метод

private IReplacingCallback ( ReplacingArgs e ) : ReplaceAction
e ReplacingArgs
Результат ReplaceAction
            ReplaceAction IReplacingCallback.Replacing(ReplacingArgs e)
            {
                Document subDoc = new Document(RunExamples.GetDataDir_WorkingWithDocument() + "InsertDocument2.doc");

                // Insert a document after the paragraph, containing the match text.
                Paragraph para = (Paragraph)e.MatchNode.ParentNode;
                InsertDocument(para, subDoc);

                // Remove the paragraph with the match text.
                para.Remove();

                return ReplaceAction.Skip;
            }
        }
InsertDoc.InsertDocumentAtReplaceHandler