Skip to content

Conversation

@bernardnormier
Copy link
Member

This PR implements a new Forwarder demo in C#.

It shows how to write a servant that forwards all requests as-is.


using VisitorCenter;

namespace Server;
Copy link
Member Author

Choose a reason for hiding this comment

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

That's actually the best namespace for the server in the demos: it's consistent with C# naming conventions and it's the same for all demos.

In IceRPC, we could not use namespace Server as it conflicts with class IceRpc.Server when using IceRpc.

@@ -0,0 +1,47 @@
// Copyright (c) ZeroC, Inc.

using Ice;
Copy link
Member Author

Choose a reason for hiding this comment

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

The using Ice is necessary to get the Current extension method createOutgoingResponse.

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

Copy link
Member

@InsertCreativityHere InsertCreativityHere 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 to me too!

@bernardnormier bernardnormier merged commit 8eec086 into zeroc-ice:main Feb 11, 2025
7 checks passed
@bernardnormier bernardnormier deleted the forwarder-cs branch June 18, 2025 22:09
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.

4 participants