Given a svcutil generated WCF client, is there a way to query the client to find out if transport session is being used by the underlying binding?
I'd like to dynamically check this so that I can write a WCF client wrapper which opens and closes the proxy safely while accounting for channel-fault cases that only apply when transport session is in play.
I see there is a MyClient.InnerChannel.SessionID which may be helpful. Perhaps if it is non-null it implies that transport session is active. But I think that is perhaps too big of an assumption. For example, I understand wsHttpBinding can emulate transport session. When that happens, the SessionId may be non-null and yet presumably there would not be a true transport session that could be faulted.
I also see I can peek at MyClient.ChannelFactory.Endpoing.Binding, but I'm not sure from there what might provide a clue.