Skip to content

Fix conflicting AddLinkedResource method signatures#55

Closed
Copilot wants to merge 2 commits intofeature/cid-supportfrom
copilot/sub-pr-54
Closed

Fix conflicting AddLinkedResource method signatures#55
Copilot wants to merge 2 commits intofeature/cid-supportfrom
copilot/sub-pr-54

Conversation

Copy link
Contributor

Copilot AI commented Jan 4, 2026

The interface IAttachmentCollection defined two overloads of AddLinkedResource for byte arrays that conflicted due to having the same parameter types in different order, causing a compilation error.

Changes:

  • Removed obsolete AddLinkedResource(byte[], string fileName, string contentType, string contentId) signature from interface
  • Kept preferred signature AddLinkedResource(byte[], string contentType, string contentId, string? fileName = null)
  • Updated implementation in AttachmentCollection.cs to match new signature
  • Updated test callers to use new parameter order

API Change:

// Old (removed):
.AddLinkedResource(imageBytes, fileName, contentType, contentId)

// New:
.AddLinkedResource(imageBytes, contentType, contentId, fileName)

The new signature follows the pattern established by other AddLinkedResource overloads (contentType before contentId) and makes fileName optional.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…s to use new API

Co-authored-by: nfMalde <5366984+nfMalde@users.noreply.github.com>
Copilot AI changed the title [WIP] Update CID support for inline images in emails Fix conflicting AddLinkedResource method signatures Jan 4, 2026
Copilot AI requested a review from nfMalde January 4, 2026 09:10
@nfMalde nfMalde closed this Jan 4, 2026
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