I want to access the State of the Channel. I'm receiving the __TransparentProxy which contains a RealProxy(rp). I'm able to access it using this function GetRealProxy()
But, I am still not able to get the Status from the Real proxy. I'll need to get the ServiceChannel form the realproxy and access the state. Just casting it to IServiceChannel returns me null.
((System.ServiceModel.Channels.CommunicationObject)(((System.ServiceModel.Channels.ServiceChannelProxy)((((System.Runtime.Remoting.Proxies.__TransparentProxy)(connectionManager.transparentProxy)))._rp)).serviceChannel)).state
RealProxy realproxy = System.Runtime.Remoting.RemotingServices.GetRealProxy(connectionManager.transparentProxy);
After getting the RealProxy, to access the state, I'll still need this.
((System.ServiceModel.Channels.CommunicationObject)(((System.ServiceModel.Channels.ServiceChannelProxy)(realproxy)).serviceChannel)).state
Is there any way access the ServiceChannelProxy or ServiceChannel or the state of RealProxy?
Thanks!