Skip to content

Commit

Permalink
Updated examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vderyushev committed Aug 13, 2024
1 parent ad1eab5 commit c6e2052
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Examples/ApiExamples/ApiExamples/ExComment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,18 @@ public void RemoveCommentReplies()
comment.AddReply("Joe Bloggs", "J.B.", DateTime.Now, "New reply");
comment.AddReply("Joe Bloggs", "J.B.", DateTime.Now, "Another reply");

Assert.AreEqual(2, comment.Replies.Count());
Assert.AreEqual(2, comment.Replies.Count);

// Below are two ways of removing replies from a comment.
// 1 - Use the "RemoveReply" method to remove replies from a comment individually:
comment.RemoveReply(comment.Replies[0]);

Assert.AreEqual(1, comment.Replies.Count());
Assert.AreEqual(1, comment.Replies.Count);

// 2 - Use the "RemoveAllReplies" method to remove all replies from a comment at once:
comment.RemoveAllReplies();

Assert.AreEqual(0, comment.Replies.Count());
Assert.AreEqual(0, comment.Replies.Count);
//ExEnd
}

Expand Down
8 changes: 5 additions & 3 deletions Examples/ApiExamples/ApiExamples/ExXpsSaveOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,11 @@ public void XpsDigitalSignature()
Document doc = new Document(MyDir + "Document.docx");

CertificateHolder certificateHolder = CertificateHolder.Create(MyDir + "morzal.pfx", "aw");
DigitalSignatureDetails digitalSignatureDetails = new DigitalSignatureDetails(
certificateHolder,
new SignOptions() { Comments = "Some comments", SignTime = DateTime.Now });
SignOptions options = new SignOptions();
options.SignTime = DateTime.Now;
options.Comments = "Some comments";

DigitalSignatureDetails digitalSignatureDetails = new DigitalSignatureDetails(certificateHolder, options);

XpsSaveOptions saveOptions = new XpsSaveOptions();
saveOptions.DigitalSignatureDetails = digitalSignatureDetails;
Expand Down

0 comments on commit c6e2052

Please sign in to comment.