Exemple #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, lspServiceBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_GetStepNames, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Gauge.Messages.StepNamesRequest, global::Gauge.Messages.StepNamesResponse>(serviceImpl.GetStepNames));
     serviceBinder.AddMethod(__Method_CacheFile, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Gauge.Messages.CacheFileRequest, global::Gauge.Messages.Empty>(serviceImpl.CacheFile));
     serviceBinder.AddMethod(__Method_GetStepPositions, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Gauge.Messages.StepPositionsRequest, global::Gauge.Messages.StepPositionsResponse>(serviceImpl.GetStepPositions));
     serviceBinder.AddMethod(__Method_GetImplementationFiles, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Gauge.Messages.Empty, global::Gauge.Messages.ImplementationFileListResponse>(serviceImpl.GetImplementationFiles));
     serviceBinder.AddMethod(__Method_ImplementStub, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Gauge.Messages.StubImplementationCodeRequest, global::Gauge.Messages.FileDiff>(serviceImpl.ImplementStub));
     serviceBinder.AddMethod(__Method_ValidateStep, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Gauge.Messages.StepValidateRequest, global::Gauge.Messages.StepValidateResponse>(serviceImpl.ValidateStep));
     serviceBinder.AddMethod(__Method_Refactor, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Gauge.Messages.RefactorRequest, global::Gauge.Messages.RefactorResponse>(serviceImpl.Refactor));
     serviceBinder.AddMethod(__Method_GetStepName, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Gauge.Messages.StepNameRequest, global::Gauge.Messages.StepNameResponse>(serviceImpl.GetStepName));
     serviceBinder.AddMethod(__Method_GetGlobPatterns, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Gauge.Messages.Empty, global::Gauge.Messages.ImplementationFileGlobPatternResponse>(serviceImpl.GetGlobPatterns));
     serviceBinder.AddMethod(__Method_KillProcess, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Gauge.Messages.KillProcessRequest, global::Gauge.Messages.Empty>(serviceImpl.KillProcess));
 }
Exemple #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(lspServiceBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_GetStepNames, serviceImpl.GetStepNames)
            .AddMethod(__Method_CacheFile, serviceImpl.CacheFile)
            .AddMethod(__Method_GetStepPositions, serviceImpl.GetStepPositions)
            .AddMethod(__Method_GetImplementationFiles, serviceImpl.GetImplementationFiles)
            .AddMethod(__Method_ImplementStub, serviceImpl.ImplementStub)
            .AddMethod(__Method_ValidateStep, serviceImpl.ValidateStep)
            .AddMethod(__Method_Refactor, serviceImpl.Refactor)
            .AddMethod(__Method_GetStepName, serviceImpl.GetStepName)
            .AddMethod(__Method_GetGlobPatterns, serviceImpl.GetGlobPatterns)
            .AddMethod(__Method_KillProcess, serviceImpl.KillProcess).Build());
 }