Esempio n. 1
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, GenesisSimulatorBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_SayHello, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::HelloRequest, global::HelloReply>(serviceImpl.SayHello));
     serviceBinder.AddMethod(__Method_SayHelloAgain, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::HelloRequest, global::HelloReply>(serviceImpl.SayHelloAgain));
     serviceBinder.AddMethod(__Method_GetCameraTransform, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::CameraRequest, global::CameraReply>(serviceImpl.GetCameraTransform));
     serviceBinder.AddMethod(__Method_UpdateCamera, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::CameraUpdate, global::Confirmation>(serviceImpl.UpdateCamera));
     serviceBinder.AddMethod(__Method_RecordPoints, serviceImpl == null ? null : new grpc::ClientStreamingServerMethod <global::Point, global::Confirmation>(serviceImpl.RecordPoints));
     serviceBinder.AddMethod(__Method_SendSinglePoint, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Point, global::Confirmation>(serviceImpl.SendSinglePoint));
     serviceBinder.AddMethod(__Method_LoadMap, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod <global::Empty, global::Point>(serviceImpl.LoadMap));
     serviceBinder.AddMethod(__Method_SaveMap, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Empty, global::Confirmation>(serviceImpl.SaveMap));
     serviceBinder.AddMethod(__Method_AddPlaneObject, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::DetectionPlane, global::Confirmation>(serviceImpl.AddPlaneObject));
     serviceBinder.AddMethod(__Method_AddPointObject, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::DetectionPoint, global::Confirmation>(serviceImpl.AddPointObject));
     serviceBinder.AddMethod(__Method_AddPointList, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::PointList, global::Confirmation>(serviceImpl.AddPointList));
     serviceBinder.AddMethod(__Method_AddDetectionPointList, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::DetectionPointList, global::Confirmation>(serviceImpl.AddDetectionPointList));
 }
Esempio n. 2
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(GenesisSimulatorBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_SayHello, serviceImpl.SayHello)
            .AddMethod(__Method_SayHelloAgain, serviceImpl.SayHelloAgain)
            .AddMethod(__Method_GetCameraTransform, serviceImpl.GetCameraTransform)
            .AddMethod(__Method_UpdateCamera, serviceImpl.UpdateCamera)
            .AddMethod(__Method_RecordPoints, serviceImpl.RecordPoints)
            .AddMethod(__Method_SendSinglePoint, serviceImpl.SendSinglePoint)
            .AddMethod(__Method_LoadMap, serviceImpl.LoadMap)
            .AddMethod(__Method_SaveMap, serviceImpl.SaveMap)
            .AddMethod(__Method_AddPlaneObject, serviceImpl.AddPlaneObject)
            .AddMethod(__Method_AddPointObject, serviceImpl.AddPointObject)
            .AddMethod(__Method_AddPointList, serviceImpl.AddPointList)
            .AddMethod(__Method_AddDetectionPointList, serviceImpl.AddDetectionPointList).Build());
 }