feat(working-with-comments): add 35 compiler-validated C# examples - Working With Comments [26.8.0/net8.0] - #85
Merged
Conversation
…hread-preserving-the-original-hierarchy-and-metadata Task: Add a reply to an existing comment thread preserving the original hierarchy and metadata - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ally-when-they-are-created-using-the-system-s-current-time-zone Task: Add timestamps to comments automatically when they are created using the system s current time zone - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…that-changes-comment-background-color-based-on-author-role Task: Apply a conditional formatting rule that changes comment background color based on author role - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…meet-certain-criteria-enabling-later-filtered-searches Task: Apply a custom tag to comments that meet certain criteria enabling later filtered searches - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…other-preserving-their-original-author-and-creation-dates Task: Copy comments from one diagram to another preserving their original author and creation dates - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…pecific-font-and-background-color-then-apply-it-to-selected-comments Task: Create a custom comment style with specific font and background color then apply it to selected comments - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ents-older-than-a-specified-number-of-days-from-a-diagram Task: Create a macro that removes all comments older than a specified number of days from a diagram - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-by-shape-type-and-counts-occurrences-per-group Task: Create a report that groups comments by shape type and counts occurrences per group - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…authors-alphabetically-and-outputs-the-list-to-a-text-file Task: Create a utility that lists comment authors alphabetically and outputs the list to a text file - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…c-keyword-and-verify-the-diagram-no-longer-displays-them Task: Delete comments containing a specific keyword and verify the diagram no longer displays them - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-and-automatically-adjust-their-coordinates-to-avoid-visual-clutter Task: Detect overlapping comment positions and automatically adjust their coordinates to avoid visual clutter - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-from-legacy-diagram-files-to-the-latest-file-format-version Task: Develop a script to migrate comments from legacy diagram files to the latest file format version - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…n-file-including-position-coordinates-and-linked-shape-identifiers Task: Export all diagram comments to a json file including position coordinates and linked shape identifiers - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…formatting-each-comment-as-a-collapsible-section-with-metadata Task: Export comment data to an html file formatting each comment as a collapsible section with metadata - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…nal-database-mapping-each-comment-to-its-associated-shape-id Task: Export comment metadata to a relational database mapping each comment to its associated shape id - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-hidden-metadata-within-the-diagram-file-for-later-retrieval Task: Extract comment text and embed it as hidden metadata within the diagram file for later retrieval - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ge-and-export-the-filtered-set-to-a-plain-text-log-file Task: Filter comments by creation date range and export the filtered set to a plain text log file - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-with-comments-rendered-as-callout-annotations Task: Generate a pdf snapshot of a diagram with comments rendered as callout annotations - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ment-counts-per-page-and-save-it-as-an-excel-worksheet Task: Generate a summary table listing comment counts per page and save it as an excel worksheet - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-preventing-further-edits-unless-a-specific-unlock-flag-is-set Task: Implement a feature to lock comments preventing further edits unless a specific unlock flag is set - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…standardized-disclaimer-comment-to-every-diagram-in-a-project-directory Task: Implement batch processing to add a standardized disclaimer comment to every diagram in a project directory - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ly-skip-diagrams-that-lack-comment-support-during-batch-operations Task: Implement error handling to gracefully skip diagrams that lack comment support during batch operations - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-assigning-them-to-corresponding-shapes-based-on-matching-ids Task: Import comments from an xml document assigning them to corresponding shapes based on matching ids - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-in-a-folder-extracting-comment-timestamps-into-a-consolidated-report Task: Iterate through multiple visio files in a folder extracting comment timestamps into a consolidated report - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-and-use-them-to-retrieve-detailed-comment-objects-via-api Task: Load a diagram enumerate comment ids and use them to retrieve detailed comment objects via api - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…nt-to-a-specific-shape-then-save-the-file Task: Load a visio diagram add a new comment to a specific shape then save the file - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-a-connector-shape-specifying-the-exact-segment-where-it-appears Task: Programmatically attach a comment to a connector shape specifying the exact segment where it appears - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…te-their-text-using-an-external-service-and-update-them-in-place Task: Read comments from a diagram translate their text using an external service and update them in place - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-and-export-their-text-and-author-information-to-a-csv-file Task: Retrieve all comments from a diagram and export their text and author information to a csv file - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…rticular-user-and-highlight-the-associated-shapes-in-the-diagram Task: Search for comments authored by a particular user and highlight the associated shapes in the diagram - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…nts-to-false-then-render-the-diagram-without-comment-overlays Task: Set the visibility flag of all comments to false then render the diagram without comment overlays - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ngs-across-multiple-diagrams-to-ensure-consistent-presentation-during-stakeholder-re Task: Synchronize comment visibility settings across multiple diagrams to ensure consistent presentation during stakeholder re - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ents-using-a-provided-mapping-dictionary-then-save-the-changes Task: Update author names of existing comments using a provided mapping dictionary then save the changes - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-within-page-boundaries-after-diagram-scaling-operations Task: Validate that comment positions stay within page boundaries after diagram scaling operations - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…non-empty-text-and-report-any-violations-as-warnings Task: Validate that each comment contains non empty text and report any violations as warnings - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Working With Comments — Compiler-Validated C# Examples
What this PR does
Adds 35 AI-generated, compiler-validated C# examples for the Working With Comments category of Aspose.Diagram for .NET.
All examples were generated by the Aspose.Diagram Examples Generator Agent and passed the full three-attempt validation pipeline before being included.
Validation Summary
dotnet builddotnet runPipeline
Each example was generated and validated through:
Only examples that passed both
dotnet buildanddotnet runare included in this PR.Examples Added
add-a-reply-to-an-existing-comment-thread-preserving-the-original-hierarchy-and-metadata.csadd-timestamps-to-comments-automatically-when-they-are-created-using-the-system-s-current-time-zone.csapply-a-conditional-formatting-rule-that-changes-comment-background-color-based-on-author-role.csapply-a-custom-tag-to-comments-that-meet-certain-criteria-enabling-later-filtered-searches.cscopy-comments-from-one-diagram-to-another-preserving-their-original-author-and-creation-dates.cscreate-a-custom-comment-style-with-specific-font-and-background-color-then-apply-it-to-selected-comments.cscreate-a-macro-that-removes-all-comments-older-than-a-specified-number-of-days-from-a-diagram.cscreate-a-report-that-groups-comments-by-shape-type-and-counts-occurrences-per-group.cscreate-a-utility-that-lists-comment-authors-alphabetically-and-outputs-the-list-to-a-text-file.csdelete-comments-containing-a-specific-keyword-and-verify-the-diagram-no-longer-displays-them.csdetect-overlapping-comment-positions-and-automatically-adjust-their-coordinates-to-avoid-visual-clutter.csdevelop-a-script-to-migrate-comments-from-legacy-diagram-files-to-the-latest-file-format-version.csexport-all-diagram-comments-to-a-json-file-including-position-coordinates-and-linked-shape-identifiers.csexport-comment-data-to-an-html-file-formatting-each-comment-as-a-collapsible-section-with-metadata.csexport-comment-metadata-to-a-relational-database-mapping-each-comment-to-its-associated-shape-id.csextract-comment-text-and-embed-it-as-hidden-metadata-within-the-diagram-file-for-later-retrieval.csfilter-comments-by-creation-date-range-and-export-the-filtered-set-to-a-plain-text-log-file.csgenerate-a-pdf-snapshot-of-a-diagram-with-comments-rendered-as-callout-annotations.csgenerate-a-summary-table-listing-comment-counts-per-page-and-save-it-as-an-excel-worksheet.csimplement-a-feature-to-lock-comments-preventing-further-edits-unless-a-specific-unlock-flag-is-set.csimplement-batch-processing-to-add-a-standardized-disclaimer-comment-to-every-diagram-in-a-project-directory.csimplement-error-handling-to-gracefully-skip-diagrams-that-lack-comment-support-during-batch-operations.csimport-comments-from-an-xml-document-assigning-them-to-corresponding-shapes-based-on-matching-ids.csiterate-through-multiple-visio-files-in-a-folder-extracting-comment-timestamps-into-a-consolidated-report.csload-a-diagram-enumerate-comment-ids-and-use-them-to-retrieve-detailed-comment-objects-via-api.csload-a-visio-diagram-add-a-new-comment-to-a-specific-shape-then-save-the-file.csprogrammatically-attach-a-comment-to-a-connector-shape-specifying-the-exact-segment-where-it-appears.csread-comments-from-a-diagram-translate-their-text-using-an-external-service-and-update-them-in-place.csretrieve-all-comments-from-a-diagram-and-export-their-text-and-author-information-to-a-csv-file.cssearch-for-comments-authored-by-a-particular-user-and-highlight-the-associated-shapes-in-the-diagram.csset-the-visibility-flag-of-all-comments-to-false-then-render-the-diagram-without-comment-overlays.cssynchronize-comment-visibility-settings-across-multiple-diagrams-to-ensure-consistent-presentation-during-stakeholder-re.csupdate-author-names-of-existing-comments-using-a-provided-mapping-dictionary-then-save-the-changes.csvalidate-that-comment-positions-stay-within-page-boundaries-after-diagram-scaling-operations.csvalidate-that-each-comment-contains-non-empty-text-and-report-any-violations-as-warnings.csValidation Details
dotnet build— compiled without errors against Aspose.Diagram for .NET 26.8.0dotnet run— executed without unhandled exceptionsThis PR was created automatically by the Aspose.Diagram Examples Generator Agent. Merge after reviewing the examples above.