Skip to content

feat(working-with-hyperlinks): add 35 compiler-validated C# examples - Working With Hyperlinks [26.8.0/net8.0] - #92

Merged
amjad-sahi merged 41 commits into
mainfrom
feat/examples-working-with-hyperlinks-20260828
Aug 28, 2026
Merged

feat(working-with-hyperlinks): add 35 compiler-validated C# examples - Working With Hyperlinks [26.8.0/net8.0]#92
amjad-sahi merged 41 commits into
mainfrom
feat/examples-working-with-hyperlinks-20260828

Conversation

@agent-aspose-diagram-examples

Copy link
Copy Markdown
Collaborator

Working With Hyperlinks — Compiler-Validated C# Examples

What this PR does

Adds 35 AI-generated, compiler-validated C# examples for the Working With Hyperlinks 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

Check Result
dotnet build ✅ Passed — zero compiler errors
dotnet run ✅ Passed — clean execution
Aspose.Diagram Version 26.8.0
Target Framework net8.0
Examples Added 35

Pipeline

Each example was generated and validated through:

  1. Attempt 1 — MCP direct code retrieval and assembly
  2. Attempt 2 — MCP retrieval with injected API correction rules
  3. Attempt 3 — LLM repair pass with compiler errors and rules

Only examples that passed both dotnet build and dotnet run are included in this PR.

Examples Added

File Task Description
add-a-hyperlink-using-a-mailto-address-to-enable-sending-email-directly-from-the-shape.cs Add a hyperlink using a mailto address to enable sending email directly from the shape
add-a-new-hyperlink-to-the-selected-shape-pointing-to-an-external-website-with-a-descriptive-name.cs Add a new hyperlink to the selected shape pointing to an external website with a descriptive name
apply-a-filter-to-select-only-shapes-whose-hyperlinks-target-external-domains-and-list-their-identifiers.cs Apply a filter to select only shapes whose hyperlinks target external domains and list their identifiers
apply-conditional-logic-to-add-hyperlinks-only-to-shapes-that-meet-a-specific-custom-property-value.cs Apply conditional logic to add hyperlinks only to shapes that meet a specific custom property value
check-for-duplicate-hyperlink-names-within-a-shape-and-consolidate-them-into-a-single-entry.cs Check for duplicate hyperlink names within a shape and consolidate them into a single entry
clone-an-existing-hyperlink-and-attach-it-to-another-shape-with-a-modified-description.cs Clone an existing hyperlink and attach it to another shape with a modified description
compare-two-diagrams-and-list-shapes-where-hyperlink-targets-differ-outputting-differences-to-the-console.cs Compare two diagrams and list shapes where hyperlink targets differ outputting differences to the console
configure-the-hyperlink-s-subaddress-property-to-navigate-to-a-specific-page-within-the-diagram.cs Configure the hyperlink s subaddress property to navigate to a specific page within the diagram
create-a-batch-process-adding-identical-navigation-hyperlinks-to-multiple-shapes-across-all-pages.cs Create a batch process adding identical navigation hyperlinks to multiple shapes across all pages
create-a-configuration-file-defining-default-hyperlink-properties-and-apply-them-programmatically-to-new-hyperlinks.cs Create a configuration file defining default hyperlink properties and apply them programmatically to new hyperlinks
create-a-hyperlink-that-opens-a-pdf-document-in-a-new-browser-window.cs Create a hyperlink that opens a pdf document in a new browser window
create-a-unit-test-verifying-hyperlink-addition-correctly-updates-the-hyperlinkcollection-count.cs Create a unit test verifying hyperlink addition correctly updates the hyperlinkcollection count
develop-a-console-application-that-scans-the-diagram-and-prints-each-shape-s-name-with-its-hyperlink-urls.cs Develop a console application that scans the diagram and prints each shape s name with its hyperlink urls
export-shape-identifiers-and-their-associated-hyperlink-urls-to-a-csv-file-for-reporting.cs Export shape identifiers and their associated hyperlink urls to a csv file for reporting
generate-a-summary-report-showing-the-number-of-hyperlinks-per-page-in-the-diagram.cs Generate a summary report showing the number of hyperlinks per page in the diagram
generate-a-visual-map-of-hyperlink-connections-between-shapes-and-export-the-map-as-an-image-file.cs Generate a visual map of hyperlink connections between shapes and export the map as an image file
implement-a-rollback-mechanism-that-restores-original-hyperlink-settings-if-an-update-error-occurs.cs Implement a rollback mechanism that restores original hyperlink settings if an update error occurs
implement-a-routine-to-remove-all-hyperlinks-from-shapes-on-a-specified-page-before-exporting.cs Implement a routine to remove all hyperlinks from shapes on a specified page before exporting
implement-error-handling-for-malformed-or-unreachable-hyperlink-addresses-during-addition.cs Implement error handling for malformed or unreachable hyperlink addresses during addition
implement-pagination-logic-that-adds-page-specific-hyperlinks-to-navigate-sequentially-through-diagram-pages.cs Implement pagination logic that adds page specific hyperlinks to navigate sequentially through diagram pages
iterate-through-a-shape-s-hyperlinks-and-log-each-hyperlink-s-name-and-target-address.cs Iterate through a shape s hyperlinks and log each hyperlink s name and target address
load-a-diagram-from-a-memory-stream-modify-hyperlink-targets-and-write-the-updated-diagram-back-to-the-stream.cs Load a diagram from a memory stream modify hyperlink targets and write the updated diagram back to the stream
load-the-visio-diagram-from-file-and-access-a-shape-using-its-unique-identifier.cs Load the visio diagram from file and access a shape using its unique identifier
locate-shapes-by-their-names-within-the-diagram-and-assign-page-link-hyperlinks-for-navigation.cs Locate shapes by their names within the diagram and assign page link hyperlinks for navigation
programmatically-set-the-hyperlink-s-target-frame-to-open-in-the-same-window.cs Programmatically set the hyperlink s target frame to open in the same window
remove-a-hyperlink-from-a-shape-by-matching-its-name-and-save-the-updated-diagram.cs Remove a hyperlink from a shape by matching its name and save the updated diagram
replace-an-existing-hyperlink-s-target-url-with-a-new-address-while-preserving-its-description.cs Replace an existing hyperlink s target url with a new address while preserving its description
retrieve-hyperlink-properties-convert-them-to-a-dictionary-and-pass-the-dictionary-to-a-logging-framework.cs Retrieve hyperlink properties convert them to a dictionary and pass the dictionary to a logging framework
retrieve-the-hyperlink-collection-from-a-shape-and-serialize-each-hyperlink-s-properties-into-json-format.cs Retrieve the hyperlink collection from a shape and serialize each hyperlink s properties into json format
set-the-hyperlink-s-description-property-to-provide-tooltip-text-on-mouse-hover.cs Set the hyperlink s description property to provide tooltip text on mouse hover
update-all-hyperlinks-referencing-an-old-domain-to-a-new-domain-via-string-replacement.cs Update all hyperlinks referencing an old domain to a new domain via string replacement
use-asynchronous-i-o-to-load-the-diagram-modify-hyperlinks-and-save-without-blocking-the-ui-thread.cs Use asynchronous i o to load the diagram modify hyperlinks and save without blocking the ui thread
use-hyperlinkcollection-add-overload-to-set-name-address-and-subaddress-simultaneously.cs Use hyperlinkcollection add overload to set name address and subaddress simultaneously
use-the-hyperlinkcollection-class-to-enumerate-all-hyperlinks-associated-with-a-specific-shape.cs Use the hyperlinkcollection class to enumerate all hyperlinks associated with a specific shape
validate-that-each-shape-with-a-hyperlink-has-a-non-empty-description-property.cs Validate that each shape with a hyperlink has a non empty description property

Validation Details


This PR was created automatically by the Aspose.Diagram Examples Generator Agent. Merge after reviewing the examples above.

…ress-to-enable-sending-email-directly-from-the-shape

Task: Add a hyperlink using a mailto address to enable sending email directly from the shape

- 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
…d-shape-pointing-to-an-external-website-with-a-descriptive-name

Task: Add a new hyperlink to the selected shape pointing to an external website with a descriptive name

- 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
…es-whose-hyperlinks-target-external-domains-and-list-their-identifiers

Task: Apply a filter to select only shapes whose hyperlinks target external domains and list their 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
…erlinks-only-to-shapes-that-meet-a-specific-custom-property-value

Task: Apply conditional logic to add hyperlinks only to shapes that meet a specific custom property value

- 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
…s-within-a-shape-and-consolidate-them-into-a-single-entry

Task: Check for duplicate hyperlink names within a shape and consolidate them into a single entry

- 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
…tach-it-to-another-shape-with-a-modified-description

Task: Clone an existing hyperlink and attach it to another shape with a modified description

- 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
…es-where-hyperlink-targets-differ-outputting-differences-to-the-console

Task: Compare two diagrams and list shapes where hyperlink targets differ outputting differences to the console

- 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
…ss-property-to-navigate-to-a-specific-page-within-the-diagram

Task: Configure the hyperlink s subaddress property to navigate to a specific page within 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
…tical-navigation-hyperlinks-to-multiple-shapes-across-all-pages

Task: Create a batch process adding identical navigation hyperlinks to multiple shapes across all pages

- 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
…ng-default-hyperlink-properties-and-apply-them-programmatically-to-new-hyperlinks

Task: Create a configuration file defining default hyperlink properties and apply them programmatically to new hyperlinks

- 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
…f-document-in-a-new-browser-window

Task: Create a hyperlink that opens a pdf document in a new browser window

- 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
…link-addition-correctly-updates-the-hyperlinkcollection-count

Task: Create a unit test verifying hyperlink addition correctly updates the hyperlinkcollection count

- 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
…-scans-the-diagram-and-prints-each-shape-s-name-with-its-hyperlink-urls

Task: Develop a console application that scans the diagram and prints each shape s name with its hyperlink urls

- 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
…-associated-hyperlink-urls-to-a-csv-file-for-reporting

Task: Export shape identifiers and their associated hyperlink urls to a csv file for reporting

- 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
…the-number-of-hyperlinks-per-page-in-the-diagram

Task: Generate a summary report showing the number of hyperlinks per page 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
…-connections-between-shapes-and-export-the-map-as-an-image-file

Task: Generate a visual map of hyperlink connections between shapes and export the map as an image 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
…t-restores-original-hyperlink-settings-if-an-update-error-occurs

Task: Implement a rollback mechanism that restores original hyperlink settings if an update error occurs

- 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
…hyperlinks-from-shapes-on-a-specified-page-before-exporting

Task: Implement a routine to remove all hyperlinks from shapes on a specified page before exporting

- 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
…rmed-or-unreachable-hyperlink-addresses-during-addition

Task: Implement error handling for malformed or unreachable hyperlink addresses during addition

- 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
…ds-page-specific-hyperlinks-to-navigate-sequentially-through-diagram-pages

Task: Implement pagination logic that adds page specific hyperlinks to navigate sequentially through diagram pages

- 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
…ks-and-log-each-hyperlink-s-name-and-target-address

Task: Iterate through a shape s hyperlinks and log each hyperlink s name and target address

- 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
…m-modify-hyperlink-targets-and-write-the-updated-diagram-back-to-the-stream

Task: Load a diagram from a memory stream modify hyperlink targets and write the updated diagram back to the stream

- 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
…nd-access-a-shape-using-its-unique-identifier

Task: Load the visio diagram from file and access a shape using its unique identifier

- 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-the-diagram-and-assign-page-link-hyperlinks-for-navigation

Task: Locate shapes by their names within the diagram and assign page link hyperlinks for navigation

- 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
…-s-target-frame-to-open-in-the-same-window

Task: Programmatically set the hyperlink s target frame to open in the same window

- 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
…-matching-its-name-and-save-the-updated-diagram

Task: Remove a hyperlink from a shape by matching its name and save the updated 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
…rget-url-with-a-new-address-while-preserving-its-description

Task: Replace an existing hyperlink s target url with a new address while preserving its description

- 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
…ert-them-to-a-dictionary-and-pass-the-dictionary-to-a-logging-framework

Task: Retrieve hyperlink properties convert them to a dictionary and pass the dictionary to a logging framework

- 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-a-shape-and-serialize-each-hyperlink-s-properties-into-json-format

Task: Retrieve the hyperlink collection from a shape and serialize each hyperlink s properties into json format

- 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
…operty-to-provide-tooltip-text-on-mouse-hover

Task: Set the hyperlink s description property to provide tooltip text on mouse hover

- 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
…an-old-domain-to-a-new-domain-via-string-replacement

Task: Update all hyperlinks referencing an old domain to a new domain via string replacement

- 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
…iagram-modify-hyperlinks-and-save-without-blocking-the-ui-thread

Task: Use asynchronous i o to load the diagram modify hyperlinks and save without blocking the ui thread

- 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
…ad-to-set-name-address-and-subaddress-simultaneously

Task: Use hyperlinkcollection add overload to set name address and subaddress simultaneously

- 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
…to-enumerate-all-hyperlinks-associated-with-a-specific-shape

Task: Use the hyperlinkcollection class to enumerate all hyperlinks associated with a specific shape

- 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
…perlink-has-a-non-empty-description-property

Task: Validate that each shape with a hyperlink has a non empty description property

- 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
@amjad-sahi
amjad-sahi merged commit 834ac3b into main Aug 28, 2026
1 check passed
@amjad-sahi
amjad-sahi deleted the feat/examples-working-with-hyperlinks-20260828 branch August 28, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants