Skip to content

refactor: Split ConnectorFunctions.cs into per-connector files (#19)#41

Merged
daviburg merged 4 commits intomainfrom
refactor/split-connector-functions
May 10, 2026
Merged

refactor: Split ConnectorFunctions.cs into per-connector files (#19)#41
daviburg merged 4 commits intomainfrom
refactor/split-connector-functions

Conversation

@daviburg
Copy link
Copy Markdown
Member

Summary

Split the monolithic \ConnectorFunctions.cs\ (1194 lines) into three per-connector files, matching the existing project convention (see \OneDriveFunctions.cs, \MsGraphFunctions.cs, \ArmFunctions.cs).

Changes

New File Functions Connector Client
\Office365Functions.cs\ SendEmail, GetCategories, ExportEmail, CreateCalendarEvent, TriggerCallback \Office365Client\
\SharePointFunctions.cs\ GetSharePointLists, ListFolder, DownloadFile, UploadFile \SharePointOnlineClient\
\TeamsFunctions.cs\ GetAllTeams, GetTeamChannels, GetChannelMessages, PostTeamsMessage \TeamsClient\

What did NOT change

  • No logic changes — pure structural refactor
  • Function names, routes, and HTTP methods unchanged
  • \Program.cs\ DI registrations unchanged
  • No other *Functions.cs\ files modified

Verification

  • \dotnet build\ — zero errors
  • \dotnet format --verify-no-changes\ — clean
  • \ConnectorFunctions.cs\ deleted

Closes #19

Comment thread DirectConnector/Office365Functions.cs
@daviburg daviburg marked this pull request as ready for review May 10, 2026 03:38
@daviburg daviburg requested a review from a team as a code owner May 10, 2026 03:38
Copilot AI review requested due to automatic review settings May 10, 2026 03:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the DirectConnector Azure Functions sample by splitting the legacy monolithic ConnectorFunctions.cs into separate per-connector function classes (Office365, SharePoint, Teams), aligning with the repository’s established “one file per connector” pattern.

Changes:

  • Added Office365Functions.cs containing Office365-related HTTP-triggered functions (including trigger callback handling).
  • Added SharePointFunctions.cs containing SharePoint list/folder/file download/upload functions.
  • Added TeamsFunctions.cs containing Teams listing/channel/message functions and message posting.
  • Removed the legacy combined ConnectorFunctions.cs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
DirectConnector/Office365Functions.cs Introduces Office365-specific Azure Functions class extracted from the previous monolith.
DirectConnector/SharePointFunctions.cs Introduces SharePoint-specific Azure Functions class extracted from the previous monolith.
DirectConnector/TeamsFunctions.cs Introduces Teams-specific Azure Functions class extracted from the previous monolith.
DirectConnector/ConnectorFunctions.cs Deletes the legacy combined functions file after extraction.

Comment thread DirectConnector/TeamsFunctions.cs
Comment thread DirectConnector/TeamsFunctions.cs Outdated
Comment thread DirectConnector/SharePointFunctions.cs
@daviburg daviburg self-assigned this May 10, 2026
Copilot AI review requested due to automatic review settings May 10, 2026 03:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread DirectConnector/Office365Functions.cs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@daviburg daviburg merged commit f0ce7c6 into main May 10, 2026
11 checks passed
@daviburg daviburg deleted the refactor/split-connector-functions branch May 10, 2026 05:45
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.

Refactor ConnectorFunctions.cs into per-connector files

3 participants