Gets the behaviors associated with the service.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Use this method when adding custom behaviors to extend ServiceHost. Programmatically, you must Add(T) the custom service behavior to the prior to when you call the Open method on the ServiceHost object.
If you want access to the IEndpointBehavior associated with an endpoint instead, you can obtain the endpoints for the service using the Endpoints property. Then retrieve the ServiceEndpoint from the collection with the Find method that employs the relevant search criteria, and call the Behaviors property to obtain the collection of the IEndpointBehavior objects.
Available since 3.0