|
|
@ -138,7 +138,9 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// client stub |
|
|
|
// client stub |
|
|
|
|
|
|
|
#pragma warning disable 0618 |
|
|
|
public class TestServiceClient : ClientBase<TestServiceClient>, ITestServiceClient |
|
|
|
public class TestServiceClient : ClientBase<TestServiceClient>, ITestServiceClient |
|
|
|
|
|
|
|
#pragma warning restore 0618 |
|
|
|
{ |
|
|
|
{ |
|
|
|
public TestServiceClient(Channel channel) : base(channel) |
|
|
|
public TestServiceClient(Channel channel) : base(channel) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -226,7 +228,9 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// creates service definition that can be registered with a server |
|
|
|
// creates service definition that can be registered with a server |
|
|
|
|
|
|
|
#pragma warning disable 0618 |
|
|
|
public static ServerServiceDefinition BindService(ITestService serviceImpl) |
|
|
|
public static ServerServiceDefinition BindService(ITestService serviceImpl) |
|
|
|
|
|
|
|
#pragma warning restore 0618 |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
.AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) |
|
|
|
.AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) |
|
|
@ -238,7 +242,9 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// creates service definition that can be registered with a server |
|
|
|
// creates service definition that can be registered with a server |
|
|
|
|
|
|
|
#pragma warning disable 0618 |
|
|
|
public static ServerServiceDefinition BindService(TestServiceBase serviceImpl) |
|
|
|
public static ServerServiceDefinition BindService(TestServiceBase serviceImpl) |
|
|
|
|
|
|
|
#pragma warning restore 0618 |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
.AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) |
|
|
|
.AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) |
|
|
@ -303,7 +309,9 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// client stub |
|
|
|
// client stub |
|
|
|
|
|
|
|
#pragma warning disable 0618 |
|
|
|
public class UnimplementedServiceClient : ClientBase<UnimplementedServiceClient>, IUnimplementedServiceClient |
|
|
|
public class UnimplementedServiceClient : ClientBase<UnimplementedServiceClient>, IUnimplementedServiceClient |
|
|
|
|
|
|
|
#pragma warning restore 0618 |
|
|
|
{ |
|
|
|
{ |
|
|
|
public UnimplementedServiceClient(Channel channel) : base(channel) |
|
|
|
public UnimplementedServiceClient(Channel channel) : base(channel) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -343,14 +351,18 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// creates service definition that can be registered with a server |
|
|
|
// creates service definition that can be registered with a server |
|
|
|
|
|
|
|
#pragma warning disable 0618 |
|
|
|
public static ServerServiceDefinition BindService(IUnimplementedService serviceImpl) |
|
|
|
public static ServerServiceDefinition BindService(IUnimplementedService serviceImpl) |
|
|
|
|
|
|
|
#pragma warning restore 0618 |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
.AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); |
|
|
|
.AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// creates service definition that can be registered with a server |
|
|
|
// creates service definition that can be registered with a server |
|
|
|
|
|
|
|
#pragma warning disable 0618 |
|
|
|
public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) |
|
|
|
public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) |
|
|
|
|
|
|
|
#pragma warning restore 0618 |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
.AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); |
|
|
|
.AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); |
|
|
@ -429,7 +441,9 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// client stub |
|
|
|
// client stub |
|
|
|
|
|
|
|
#pragma warning disable 0618 |
|
|
|
public class ReconnectServiceClient : ClientBase<ReconnectServiceClient>, IReconnectServiceClient |
|
|
|
public class ReconnectServiceClient : ClientBase<ReconnectServiceClient>, IReconnectServiceClient |
|
|
|
|
|
|
|
#pragma warning restore 0618 |
|
|
|
{ |
|
|
|
{ |
|
|
|
public ReconnectServiceClient(Channel channel) : base(channel) |
|
|
|
public ReconnectServiceClient(Channel channel) : base(channel) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -485,7 +499,9 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// creates service definition that can be registered with a server |
|
|
|
// creates service definition that can be registered with a server |
|
|
|
|
|
|
|
#pragma warning disable 0618 |
|
|
|
public static ServerServiceDefinition BindService(IReconnectService serviceImpl) |
|
|
|
public static ServerServiceDefinition BindService(IReconnectService serviceImpl) |
|
|
|
|
|
|
|
#pragma warning restore 0618 |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
.AddMethod(__Method_Start, serviceImpl.Start) |
|
|
|
.AddMethod(__Method_Start, serviceImpl.Start) |
|
|
@ -493,7 +509,9 @@ namespace Grpc.Testing { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// creates service definition that can be registered with a server |
|
|
|
// creates service definition that can be registered with a server |
|
|
|
|
|
|
|
#pragma warning disable 0618 |
|
|
|
public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) |
|
|
|
public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) |
|
|
|
|
|
|
|
#pragma warning restore 0618 |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
return ServerServiceDefinition.CreateBuilder(__ServiceName) |
|
|
|
.AddMethod(__Method_Start, serviceImpl.Start) |
|
|
|
.AddMethod(__Method_Start, serviceImpl.Start) |
|
|
|