@plexus-interop/cli
Version:
Plexus Interop CLI tools
75 lines (57 loc) • 2.76 kB
Plain Text
// <auto-generated>
// Generated by the Plexus Interop compiler. DO NOT EDIT!
// source: interop\samples\greeting_client.interop
// </auto-generated>
namespace plexus {
using System;
using global::Plexus;
using global::Plexus.Channels;
using global::Plexus.Interop;
using global::System.Threading.Tasks;
public partial interface IGreetingClient: IClient {
GreetingClient.IGreetingServiceProxy GreetingService { get; }
}
public sealed partial class GreetingClient: ClientBase, IGreetingClient {
public const string Id = "interop.samples.GreetingClient";
private static ClientOptions CreateClientOptions(Func<ClientOptionsBuilder, ClientOptionsBuilder> setup = null) {
ClientOptionsBuilder builder = new ClientOptionsBuilder().WithApplicationId(Id).WithDefaultConfiguration();
if (setup != null) {
builder = setup(builder);
}
return builder.Build();
}
public GreetingClient(Func<ClientOptionsBuilder, ClientOptionsBuilder> setup = null): base(CreateClientOptions(setup))
{
GreetingService = new GreetingClient.GreetingServiceProxy(this.CallInvoker);
}
public partial interface IGreetingServiceProxy:
global::plexus.GreetingService.IUnaryProxy,
global::plexus.GreetingService.IServerStreamingProxy,
global::plexus.GreetingService.IClientStreamingProxy,
global::plexus.GreetingService.IDuplexStreamingProxy
{ }
public sealed partial class GreetingServiceProxy: IGreetingServiceProxy {
public static global::plexus.GreetingService.Descriptor Descriptor = global::plexus.GreetingService.DefaultDescriptor;
private readonly IClientCallInvoker _callInvoker;
public GreetingServiceProxy(IClientCallInvoker callInvoker) {
_callInvoker = callInvoker;
}
public IUnaryMethodCall<global::plexus.GreetingResponse> Unary(global::plexus.GreetingRequest request) {
return _callInvoker.Call(Descriptor.UnaryMethod, request);
}
public IServerStreamingMethodCall<global::plexus.GreetingResponse> ServerStreaming(global::plexus.GreetingRequest request) {
return _callInvoker.Call(Descriptor.ServerStreamingMethod, request);
}
public IClientStreamingMethodCall<global::plexus.GreetingRequest, global::plexus.GreetingResponse> ClientStreaming() {
return _callInvoker.Call(Descriptor.ClientStreamingMethod);
}
public IDuplexStreamingMethodCall<global::plexus.GreetingRequest, global::plexus.GreetingResponse> DuplexStreaming() {
return _callInvoker.Call(Descriptor.DuplexStreamingMethod);
}
}
public IGreetingServiceProxy GreetingService { get; private set; }
}
}