/// <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(StatsServiceBase serviceImpl) { return(grpc::ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetStats, serviceImpl.GetStats) .AddMethod(__Method_QueryStats, serviceImpl.QueryStats) .AddMethod(__Method_GetSysStats, serviceImpl.GetSysStats).Build()); }
/// <summary>Register service method implementations with a service binder. 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, StatsServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_GetStats, serviceImpl.GetStats); serviceBinder.AddMethod(__Method_QueryStats, serviceImpl.QueryStats); }
/// <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, StatsServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_GetStats, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::V2Ray.Core.App.Stats.Command.GetStatsRequest, global::V2Ray.Core.App.Stats.Command.GetStatsResponse>(serviceImpl.GetStats)); serviceBinder.AddMethod(__Method_QueryStats, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::V2Ray.Core.App.Stats.Command.QueryStatsRequest, global::V2Ray.Core.App.Stats.Command.QueryStatsResponse>(serviceImpl.QueryStats)); serviceBinder.AddMethod(__Method_GetSysStats, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::V2Ray.Core.App.Stats.Command.SysStatsRequest, global::V2Ray.Core.App.Stats.Command.SysStatsResponse>(serviceImpl.GetSysStats)); }
/// <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, StatsServiceBase serviceImpl) { serviceBinder.AddMethod(__Method_GetStats, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::v2rayN.Protos.Statistics.GetStatsRequest, global::v2rayN.Protos.Statistics.GetStatsResponse>(serviceImpl.GetStats)); serviceBinder.AddMethod(__Method_QueryStats, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::v2rayN.Protos.Statistics.QueryStatsRequest, global::v2rayN.Protos.Statistics.QueryStatsResponse>(serviceImpl.QueryStats)); serviceBinder.AddMethod(__Method_GetSysStats, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::v2rayN.Protos.Statistics.SysStatsRequest, global::v2rayN.Protos.Statistics.SysStatsResponse>(serviceImpl.GetSysStats)); }