c# - Can I Trust LoadOperation.Completed event -
suppose have code shown below,
loadoperation lop=_dsrvx.load(_dsrvx.getuserdetails(userid)); lop.completed +=(s,a)=> { debug.writeline("completed but, first load registered completed evet!"); } i see type code everywhere wonder right?
as know when call domainservice methods automatically fills domain service object's related entityset.
suppose loadoperation(can submit,invoke ops.) completed rapidly , when passed next line register completed event has done.is possible? seems hard achive can give me 100% guarantee?
if can't guarantee i'm asking if there method of calling operationbase objects manually?
any comment appreciated.
well, crazy world, not give 100% guarantee of :p - not think should problem. if bothers you, can pass callback parameter, this:
_dsrvx.load(_dsrvx.getuserdetails(userid), userdetailscallback, null); (...) void userdetailscallback(loadoperation<userdetails> op) { //do results } or, simplify further:
_dsrvx.load(_dsrvx.getuserdetails(userid), (op)=> { //do results }, null);
Comments
Post a Comment