예제 #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, BetaAnalyticsDataBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_RunReport, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Analytics.Data.V1Beta.RunReportRequest, global::Google.Analytics.Data.V1Beta.RunReportResponse>(serviceImpl.RunReport));
     serviceBinder.AddMethod(__Method_RunPivotReport, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Analytics.Data.V1Beta.RunPivotReportRequest, global::Google.Analytics.Data.V1Beta.RunPivotReportResponse>(serviceImpl.RunPivotReport));
     serviceBinder.AddMethod(__Method_BatchRunReports, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Analytics.Data.V1Beta.BatchRunReportsRequest, global::Google.Analytics.Data.V1Beta.BatchRunReportsResponse>(serviceImpl.BatchRunReports));
     serviceBinder.AddMethod(__Method_BatchRunPivotReports, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Analytics.Data.V1Beta.BatchRunPivotReportsRequest, global::Google.Analytics.Data.V1Beta.BatchRunPivotReportsResponse>(serviceImpl.BatchRunPivotReports));
     serviceBinder.AddMethod(__Method_GetMetadata, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Analytics.Data.V1Beta.GetMetadataRequest, global::Google.Analytics.Data.V1Beta.Metadata>(serviceImpl.GetMetadata));
     serviceBinder.AddMethod(__Method_RunRealtimeReport, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Google.Analytics.Data.V1Beta.RunRealtimeReportRequest, global::Google.Analytics.Data.V1Beta.RunRealtimeReportResponse>(serviceImpl.RunRealtimeReport));
 }
예제 #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(BetaAnalyticsDataBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_RunReport, serviceImpl.RunReport)
            .AddMethod(__Method_RunPivotReport, serviceImpl.RunPivotReport)
            .AddMethod(__Method_BatchRunReports, serviceImpl.BatchRunReports)
            .AddMethod(__Method_BatchRunPivotReports, serviceImpl.BatchRunPivotReports)
            .AddMethod(__Method_GetMetadata, serviceImpl.GetMetadata)
            .AddMethod(__Method_RunRealtimeReport, serviceImpl.RunRealtimeReport).Build());
 }