Skip to content

Question: Overload method selection on client target #1261

@LittleLittleCloud

Description

@LittleLittleCloud

Suppose I have the following contract with overloaded methods

public interface IMyService
{
   Task<bool> UpdateAsync(ImmutableArray<string> projectInfos, CancellationToken);
   Task<bool> UpdateAsync(ImmutableArray<ProjectInfo> projectInfos, CancellationToken);
}

Which UpdateAsync should be selected if I call from client side in this way (empty projectInfos)

IMyService myServiceProxy = // get proxy
ImmutableArray<ProjectInfo> myProjectInfos = [];
await myServiceProxy.UpdateAsync(myProjectInfos, ct);

My observation is the string overload UpdateAsync is selected, is it expected behavior for JsonRPC call since the type info for parameters might not be included?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions