Skip to content

Implement WCF Data Portal Channel#4851

Merged
rockfordlhotka merged 20 commits intoMarimerLLC:mainfrom
b-higginbotham:wcf-portal
Apr 4, 2026
Merged

Implement WCF Data Portal Channel#4851
rockfordlhotka merged 20 commits intoMarimerLLC:mainfrom
b-higginbotham:wcf-portal

Conversation

@b-higginbotham
Copy link
Copy Markdown
Contributor

@b-higginbotham b-higginbotham commented Mar 26, 2026

This PR provides an implementation of a Data Portal Channel to support #1183.

Some design decisions that probably need to be discussed before merging the PR are:

  • The project currently does not have a .netstandard target framework. I left this out because I don't have much experience with multi target projects like this and I'm not quite sure how the .netstandard target moniker would behave with the different requirements for the .NET Framework assembly references for System.ServiceModel vs. modern .net package reference for CoreWCF in the server side code.
  • I used the #if NETFRAMEWORK preprocessor directive when behavior needed to be different between .NET Framework and modern .net because it seemed to be the simplest condition to check. If there is a better way to do this (particularly if it would help with a .netstandard target framework) please let me know.
  • ✅There is a comments on line 47 in the WcfProxy.cs class regarding routing and sync vs. async calls. I did not implement any support for routing in this data portal because I am not familiar enough with routing in the CSLA data portal to know if this is a feature that would be desirable for a WCF channel. Additionally, I know that .NET Framework has built in support for WCF routing that may satisfy this need at a more generic level. However, I am not sure if this feature exists in CoreWCF.
  • ✅There is also a comment on line 49 in the WcfProxy.cs class regarding sync vs. async calls. I implemented both to follow the pattern of the gRPC data portal channel, but I am not sure if it is necessary because the server and client can be implemented as either synchronous or asynchronous independently of each other in WCF.

Copy link
Copy Markdown
Contributor

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

Adds a new Csla.Channels.Wcf data portal channel to enable CSLA data portal communication over WCF (System.ServiceModel on .NET Framework and CoreWCF on modern .NET), aligning with the long-term goal in issue #1183.

Changes:

  • Introduces a new Csla.Channels.Wcf project multi-targeting .NET Framework and modern .NET, with CoreWCF support on modern runtimes.
  • Implements server-side WCF/CoreWCF portal hosting and request dispatch (WcfPortal, server DI extensions/options).
  • Implements client-side proxy configuration and invocation (WcfProxy, client DI extensions/options), plus shared request/response DTOs and README guidance.

Reviewed changes

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

Show a summary per file
File Description
Source/csla.build.sln Adds the new Csla.Channels.Wcf project to the build solution.
Source/Csla.Channels.Wcf/Csla.Channels.Wcf.csproj New multi-targeted channel project with framework-specific WCF/CoreWCF dependencies.
Source/Csla.Channels.Wcf/readme.md Documentation for hosting and client configuration for WCF/CoreWCF.
Source/Csla.Channels.Wcf/WcfRequest.cs Defines the WCF request DTO carrying operation name and serialized payload.
Source/Csla.Channels.Wcf/WcfResponse.cs Defines the WCF response DTO carrying serialized response payload.
Source/Csla.Channels.Wcf/Client/WcfProxyOptions.cs Client-side options (binding + URL).
Source/Csla.Channels.Wcf/Client/WcfProxy.cs Client proxy implementation that calls the WCF service.
Source/Csla.Channels.Wcf/Client/WcfClientExtensions.cs DI extensions to wire up the WCF proxy.
Source/Csla.Channels.Wcf/Client/IWcfPortal.cs Client-side WCF service contract used by ChannelFactory.
Source/Csla.Channels.Wcf/Server/IWcfPortalServer.cs Server-side WCF/CoreWCF service contract.
Source/Csla.Channels.Wcf/Server/WcfPortal.cs Server implementation that deserializes requests and invokes CSLA server data portal operations.
Source/Csla.Channels.Wcf/Server/WcfPortalOptions.cs Server-side options (binding + base/path address).
Source/Csla.Channels.Wcf/Server/WcfServerExtensions.cs Server DI extensions to register options and hosting/service types.
Source/Csla.Channels.Wcf/Server/WcfPortalHost.cs .NET Framework ServiceHost subclass to integrate DI-based activation.
Source/Csla.Channels.Wcf/Server/WcfPortalInstanceProvider.cs .NET Framework WCF instance provider/contract behavior to construct WcfPortal via DI inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Source/Csla.Channels.Wcf/Client/WcfProxy.cs Outdated
Comment thread Source/Csla.Channels.Wcf/WcfResponse.cs Outdated
Comment thread Source/Csla.Channels.Wcf/Server/WcfPortal.cs Outdated
Comment thread Source/Csla.Channels.Wcf/Client/WcfProxy.cs
Comment thread Source/Csla.Channels.Wcf/Client/WcfProxy.cs Outdated
Comment thread Source/Csla.Channels.Wcf/Server/IWcfPortalServer.cs
Comment thread Source/Csla.Channels.Wcf/Csla.Channels.Wcf.csproj
Comment thread Source/Csla.Channels.Wcf/Server/WcfPortal.cs
Comment thread Source/Csla.Channels.Wcf/readme.md Outdated
Comment thread Source/Csla.Channels.Wcf/readme.md Outdated
b-higginbotham and others added 7 commits March 26, 2026 16:16
respose -> response

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
poral -> portal

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

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 19 out of 19 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Source/csla.test.sln Outdated
Comment thread Source/Csla.Channels.Wcf/Client/WcfProxy.cs Outdated
Comment thread Source/Csla.Channels.Wcf/Client/WcfPortalClient.cs Outdated
Comment thread Source/tests/Csla.test/Channels/Wcf/WcfPortalIntegrationTests.cs Outdated
@b-higginbotham
Copy link
Copy Markdown
Contributor Author

@rockfordlhotka I think we have everything resolved from the Copilot review at this point.

@rockfordlhotka rockfordlhotka merged commit 36ca794 into MarimerLLC:main Apr 4, 2026
2 checks passed
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.

3 participants