Mandatory Parameters in Request object (WCF)
- by Martin Moser
lHi,
I'm currently writing a WCF service.
One of those methods get's a request object and returns a response object. In the request there are a couple of value-type members.
Is there a way to define members are mandatory in the declarative way?
I'm in an early stage of development and I don't want to start with versioning now. In addition I don't want to have method sig with 25 parameters, therefore I created the request object.
The problem I have is that due to the value-types, I can never be sure if the consumer of the service intended to have the default value in there, or it was just by lazyness.
On consumer side you don't easily detect that you probably missed that property.
So I would like to have something that forces the caller of the service to provide an value, and if not he ideally get's a compile-time error.
any ideas?
tia,
Martin