-
Notifications
You must be signed in to change notification settings - Fork 361
Closed
Description
Expected Behavior
- In .NET 7.0 or later an operation on an actor invoked using a weakly-typed actor client should support a polymorphic response. The response json should include a type discriminator property to allow for polymorphic deserialization by the actor client. The weakly-typed actor client must polymorphically deserialize the response when invoking
InvokeMethodAsync<ResponseBase>on the weakly-typed actor client. This should yield aDerivedResponseinstance. Note that invokingInvokeMethodAsync<DerivedResponse>is not polymorphic deserialization. - An operation on an actor invoked using a weakly-typed actor client should support a null response.
Actual Behavior
- The response json does not include a type discriminator. The deserialized response is an instance of the base response class, not the derived response class.
- A null reference exception is thrown by the
ActorManager.DispatchWithoutRemotingAsyncmethod.
Steps to Reproduce the Problem
- Declare an operation on an actor interface whose declared return type is a base class called
ResponseBase. Implement the operation on an actor. The implementation returns an instance of a derived class calledDerivedResponse. Invoke the operation using a weakly-typed actor client using theInvokeMethodAsync<ResponseBase>method (not usingInvokeMethodAsync<DerivedResponse>). - Return null from an actor operation invoked using a weakly-typed actor client.
Release Note
- RELEASE NOTE: Weakly-typed actor supports polymorphic response in .NET 7 or later.
- RELEASE NOTE: Weakly-typed actor supports null response.
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working