Increase visibility on some client constructs and minor docs updates
What was changed
- Exposed constructors as
protected internalon multiple currently-internal-constructor-only classes returned from client calls so they can be mocked, but added warning that we may change them in incompatible ways in the future- We don't really want to commit to constructor stability here IMO at this time
- Yes it is a bit annoying that they are internal and therefore you have to extend them to construct them, but we feel
publicencourages using these constructors too much, something we are actually discouraging
- Made final overloads of some client calls
virtualso they can be overridden in subclasses - Added docs as needed
Why?
Checklist
- Closes #218
- Closes #228
- Closes #419
I'll likely extend and create fixture versions of things like WorkflowExecution in my unit tests project? Is that the goal? Seems reasonable if it is
Yes, you can extend WorkflowExecution with your own and call the base constructor with the advanced things needed to construct it since it is from raw proto. We discourage mocking clients usually because it can be hard to ever get the details of what the server does right, which is why we offer test environments that start real servers that we encourage people to use (i.e. Temporalio.Testing.WorkflowEnvironment.StartLocalAsync() which returns an environment with a fully usable Client on it).
Also is there a preview build of this package on NuGet I could use to try out and give feedback?
No, it will be available in next stable release after merged, but we do not publish NuGet preview releases. Though you can build it yourself (see bottom of README) or once merged to main, the main merge commit GitHub CI run will have artifacts with the NuGet package on it.