开发者

How to access C# MessageHeader Concrete types

开发者 https://www.devze.com 2023-04-10 08:22 出处:网络
I receive a System.ServiceModel.Channels.Message from a WCF service, it has a message hea开发者_Go百科derthat at runtime is of type System.ServiceModel.Channels.ToHeader but I can\'t find this type an

I receive a System.ServiceModel.Channels.Message from a WCF service, it has a message hea开发者_Go百科der that at runtime is of type System.ServiceModel.Channels.ToHeader but I can't find this type anywhere to upcast it to use the ToHeaders properties.

Is this a dynamic type that can only be accessed by reflection?


You shouldn't need to access the members of the ToHeader class (which is internal). The only property which cannot be accessed from the base (public) class is the To (of type Uri), which you can access via the message directly (message.Headers.To).

0

精彩评论

暂无评论...
验证码 换一张
取 消