5. Behaviors
BEHAVIORS ARE WCF CLASSES that affect runtime operation. Behaviors are invoked as the WCF runtime starts on the client and server and as messages flow between the two. Because behaviors run at these critical times, they are used to implement many built-in features in the WCF. They are also an important extensibility point for customizations.
For example, ServiceHost
is responsible for defining the instancing and concurrency aspects of a server, in addition to dispatching messages to the proper operation. When a message is received by a service and dispatched to a certain method of a class, should ServiceHost
create a new instance of that class for each request or should it reuse instances? And when ServiceHost
calls the method on ...
Get Essential Windows Communication Foundation: For .NET Framework 3.5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.