public static void BindService(ServiceBinderBase serviceBinder, PolicyBasedRoutingService.PolicyBasedRoutingServiceBase serviceImpl)
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003ePolicyBasedRoutingService\u003c/code\u003e API is 2.9.0, as part of the Google.Cloud.NetworkConnectivity.V1 namespace.\u003c/p\u003e\n"],["\u003cp\u003eThis API allows for flexible routing policies for Layer 4 traffic through connected services, a feature known as Policy-Based Routing.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePolicyBasedRoutingService\u003c/code\u003e class inherits from the base \u003ccode\u003eobject\u003c/code\u003e class and provides methods such as \u003ccode\u003eBindService\u003c/code\u003e for registering service definitions with a server.\u003c/p\u003e\n"],["\u003cp\u003ePrevious versions of the \u003ccode\u003ePolicyBasedRoutingService\u003c/code\u003e are available and range from version 1.0.0 up to 2.8.0.\u003c/p\u003e\n"],["\u003cp\u003eThe API includes a \u003ccode\u003eBindService\u003c/code\u003e method that is part of an experimental API which can change or be removed without prior notice and is useful for customizing the service binding logic.\u003c/p\u003e\n"]]],[],null,["# Network Connectivity v1 API - Class PolicyBasedRoutingService (2.11.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.11.0 (latest)](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/latest/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.10.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.9.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.8.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.7.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.6.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.5.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.4.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.3.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.2.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.1.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/2.0.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/1.2.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/1.1.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/1.0.0/Google.Cloud.NetworkConnectivity.V1.PolicyBasedRoutingService) \n\n public static class PolicyBasedRoutingService\n\nReference documentation and code samples for the Network Connectivity v1 API class PolicyBasedRoutingService.\n\nPolicy-Based Routing allows GCP customers to specify flexibile routing\npolicies for Layer 4 traffic traversing through the connected service. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PolicyBasedRoutingService \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.NetworkConnectivity.V1](/dotnet/docs/reference/Google.Cloud.NetworkConnectivity.V1/latest/Google.Cloud.NetworkConnectivity.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.NetworkConnectivity.V1.dll\n\nMethods\n-------\n\n### BindService(PolicyBasedRoutingServiceBase)\n\n public static ServerServiceDefinition BindService(PolicyBasedRoutingService.PolicyBasedRoutingServiceBase serviceImpl)\n\nCreates service definition that can be registered with a server\n\n### BindService(ServiceBinderBase, PolicyBasedRoutingServiceBase)\n\n public static void BindService(ServiceBinderBase serviceBinder, PolicyBasedRoutingService.PolicyBasedRoutingServiceBase serviceImpl)\n\nRegister service method with a service binder with or without implementation. Useful when customizing the service binding logic.\nNote: this method is part of an experimental API that can change or be removed without any prior notice."]]