c# - Adding a field to a received Message? -



c# - Adding a field to a received Message? -

i trying larn msmq @ moment. messaging systems pretty intriguing me , working on loan broker scheme found in book.

in system, have utilize mix of web services, message services , asynchronous code accomplish loan broker service.

just give overview, looks this:

the part at, "get credit score" part. credit bureau takes string of ssn (xxxxxx-xxxx format) , returns random credit score. ssn irrelevant returns random double regardless of if utilize same ssn. know.

when receive object "loan request", it's loanrequest object looks this:

namespace loanbroker { [serializable] public class loanrequest { public string ssn { get; set; } public double amount { get; set; } public datetime loanduration { get; set; } } }

i utilize next method inquire loanquote (not of import such yet, near part have send response "banks").

public loanquote getloanquote(string ssn, double amount, datetime loanduration) { var loanrequest = new loanrequest(); loanrequest.ssn = ssn; loanrequest.amount = amount; loanrequest.loanduration = loanduration; message loanmessage = new message(); loanmessage.body = loanrequest; requestqueue.send(loanmessage); var replymessage = quotequeue.receive(); homecoming replymessage.body loanquote; }

so now, send message (loanmessage.body = loanrequest) , have utilize credit score service, receive credit score. far good.

now here actual question: how i, when have retrieved credit score credit bureau, take number , add together message received, can send next part of system?

c# msmq messaging

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -