WCF开发插件拥有非常大的功能优势,这些优势决定了其在开发领域中占据着一定的主导地位。我们今天就先从WCF双工会话通道的基本概念开始了解,来对这一开发工具进行更加深入的了解。

成都创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于成都做网站、成都网站设计、铜鼓网络推广、重庆小程序开发、铜鼓网络营销、铜鼓企业策划、铜鼓品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;成都创新互联公司为所有大学生创业者提供铜鼓建站搭建服务,24小时服务热线:18982081108,官方网址:www.cdcxhl.com
从对象模型的角度来看,会话通道形状与非会话通道只有一些细微的差别。例如,IDuplexSessionChannel是IDuplexChannel和 ISessionChannel
- internal sealed class DelegatorDuplexSessionChannel :
 
DelegatorDuplexChannel, IDuplexSessionChannel- {
 - private IDuplexSessionChannel _innerSessionChannel;
 - // reference the next
 - // sessionful channel
 - private String _source;
 - // store the String to output internal
 - DelegatorDuplexSessionChannel(ChannelManagerBase
 - channelManagerBase, IDuplexSessionChannel innerChannel, String source)
 
: base(channelManagerBase, innerChannel, source)- {
 - _source = String.Format("{0} CHANNEL: DelegatorDuplexSessionChannel",
 
source);- PrintHelper.Print(_source, "ctor");
 - // assign the reference to the next sessionful channel
 - this._innerSessionChannel = innerChannel;
 - }
 - // IDuplexSessionChannel member that is not defined in IDuplexChannel
 - public IDuplexSession Session
 - {
 - get {
 - PrintHelper.Print(_source, "Session");
 - return this._innerSessionChannel.Session;
 - }
 - }
 - }
 
DelegatorDuplexChannel包含一个IDuplexChannel类型的成员变量,我们需要通过一个IDuplexSessionChannel类型的局部变量来存储同一个对象的引用。这样做可以使得我们容易地添加Session属性到我们的类型定义上。
以上就是对WCF双工会话通道的相关介绍。
Copyright © 2009-2022 www.wtcwzsj.com 青羊区广皓图文设计工作室(个体工商户) 版权所有 蜀ICP备19037934号