HingeSight
HingeSight

Reputation: 406

Programmatically add operations on an Endpoint Contract in WCF

I have to build a bridge to a legacy system. The chosen frontend is WCF. The methods of the legacy system may vary and are numerous, so I am thinking of something like this:

  1. Get the legacy method metadata (it is possible)
  2. In public static void Configure(ServiceConfiguration config) of a WCF service create an operation for each method.
  3. Be happy.

Now I am far from point 3 since I do not seem able to create a operation and fill it with appropriate behaviors. Up to now, in particular, I can not create OperationInvokerBehavior, for example (it is not a public class).

I am not going to enter into details here. My question is if my approach is reasonable and have somebody done this before outside the WCF developers.

Upvotes: 0

Views: 711

Answers (1)

HingeSight
HingeSight

Reputation: 406

Adding operations to a endpoint on runtime is possible, doable, tedious, error prone and painful journey in the WCF publis internals. Still, I found Carlos Figueira blog series on WCF Extensibility to be of great help.

Upvotes: 0

Related Questions