Skip to content

Fix Behaviors property name in channelfactorybehaviors snippet - #12927

Closed
gewarren with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-review-comment
Closed

Fix Behaviors property name in channelfactorybehaviors snippet#12927
gewarren with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-review-comment

Conversation

Copilot AI commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

ServiceEndpoint exposes endpoint behaviors via .Behaviors, not .EndpointBehaviors. The PR introduced a non-existent property that would fail to compile against WCF client APIs.

Changes

  • snippets/csharp/VS_Snippets_CFX/channelfactorybehaviors/cs/client.cs: Corrects factory.Endpoint.EndpointBehaviors.Add(...)factory.Endpoint.Behaviors.Add(...)
// Before (broken)
factory.Endpoint.EndpointBehaviors.Add(new EndpointBehaviorMessageInspector());

// After (correct)
factory.Endpoint.Behaviors.Add(new EndpointBehaviorMessageInspector());

Copilot AI changed the title [WIP] Fix code based on review comment Fix Behaviors property name in channelfactorybehaviors snippet Jul 31, 2026
Copilot AI requested a review from gewarren July 31, 2026 23:09
@gewarren gewarren closed this Jul 31, 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