Posted By: Amiga forever! | May 23rd, 2008 @ 11:09 PM
page 1 of 1
Comments: 9 | Views: 2770
Amiga forever!
Amiga forever!
Turrican II
I have managed to get a WCF service / client running fine. The callback works also good. However, I need to pass more than one parameters to my callback procedure. Not sure how to do this, since : SynchronizationContext.Post( MYCALLBACK, ) ... ;(
blowdart
blowdart
Peek-a-boo


If you really do want multiple parameters then make them part of the callback interface.

And remember really don't think in terms of multiple parameters, think one data contract with optional fields instead.

So the data contract is returned as part of the WCF callback; and you populate it with what you need.

But a callback should be as light as possible; so for example if you had an OnPersonAdded callback do you really need to send a full person data structure, or just a unique ID and the client software can then decide if it needs to go get the record. That's certainly more scalable.
blowdart
blowdart
Peek-a-boo
Amiga forever! wrote:
I see. Right now I am sending just a string which I sort'a split into param#param#param etc. Could you by any chance show me a small code sample on how to send an object structor containing a couple of variables? The search on the Internet comes out bone dry and I tried it but without luck. Expressionless


OK will have a shot, but it'll be the middle of next week before I can, trying to prepare a workshop this weekend Smiley


blowdart
blowdart
Peek-a-boo
Tada. Sorry it took so long.
blowdart wrote:
Tada. Sorry it took so long.


Clearly, this took way too long, not only that, but I downloaded the source code and now my sister is pregnant.

:O

Thanks, this is good.
blowdart
blowdart
Peek-a-boo
phreaks wrote:


Clearly, this took way too long, not only that, but I downloaded the source code and now my sister is pregnant.


Damn I thought I had cleaned the project too Smiley
turrican
turrican
Condemnation without investigation is the height of ignorance! - Albert Einstein
Wonderful, Thank you! btw. I'm the original poster, just a new account.
blowdart
blowdart
Peek-a-boo
Ah! I did wonder. And sulk a bit!
page 1 of 1
Comments: 9 | Views: 2770
Microsoft Communities