Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make IProxy.Invoker not nullable #3831

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

bernardnormier
Copy link
Member

This PR makes IProxy.Invoker not nullable, just like IProtobufClient.Incoker.

Rather than null, the code now uses InvalidInvoker.Instance when it needs an invalid invoker - typically when the proxy is used for encoding and not for invoking.

Copy link
Member

@pepone pepone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@@ -1,5 +1,7 @@
// Copyright (c) ZeroC, Inc.

using System.ComponentModel.DataAnnotations;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this using required?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this using was added. Will remove.


/// <inheritdoc/>
public IceRpc.IInvoker? Invoker {{ get; init; }} = null;
public required IceRpc.IInvoker Invoker {{ get; init; }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do the same for the Protobuf client

@bernardnormier bernardnormier merged commit c6a3593 into icerpc:main Dec 1, 2023
3 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