How do you specify the channel .NET remoting will use to perform a callback -
i have client (and server) 2 channels set on different protocols, lets x:// , y://.
if call service (over remoting) client (c) on server (s) needs perform callback client (so s->c) there way specify channel use? in use case want calls x:// callback on x:// , calls on y:// callback on y://.
my current solution implement custom serialization surrogate (and selector) each channel marshalbyrefobjects removes uri of other channel serializationinfo when serializing them. similar to:
remotingservices.getobjectdata(obj, info, context); ichannelinfo channelinfo = (ichannelinfo)info.getvalue("channelinfo", typeof(ichannelinfo)); channelinfo.channeldata = channelinfo.channeldata.where(x => { channeldatastore ds = x channeldatastore; if (ds != null) { if (!(ds.channeluris.length > 0 && ds.channeluris[0].startswith("y://"))) { return true; } else { return false; } } return true; }).toarray();
this works feels wrong (ex: relying on "channelinfo" string in populated serializationinfo). know of better solution? i've looked pretty throughly through remotingservices.getobjectdata still couldn't figure out gets uri list from.
Comments
Post a Comment