CommonServiceLocator/Microsoft.Practices.ServiceLocation的变化过程

CommonServiceLocator的类最主要的获取服务对对象的代码如下:

TService ServiceLocator.Current.GetInstance<TService>()

---------------------------------------------------------------------------------------------------------------------------------------------------

CommonServiceLocator类库的前身是Microsoft.Practices.ServiceLocation(1.0.0-1.3.0版本),后来在2017年发布的1.4.0版本中,程序集名称开始改为CommonServiceLocator,但是命名空间依然采用Microsoft.Practices.ServiceLocation。后来在2017年发布的2.0.1版本中,将命名空间也修改为CommonServiceLocator。历经几次变化,对其它类库兼容性产生影响。以下是主要的变化过程:

1、2011年1月,MS公司发布1.0.0版本,程序集名称为Microsoft.Practices.ServiceLocation,该程序集包括两个命名空间:Microsoft.Practices.ServiceLocation和Microsoft.Practices.ServiceLocation.Properties

3. 2014年2月,MS 发布了1.2.0版本,程序集名称为Microsoft.Practices.ServiceLocation,该程序集包括两个命名空间:Microsoft.Practices.ServiceLocation和Microsoft.Practices.ServiceLocation.Properties

3. 2014年5月,MS发布了1.3.0版本,程序集名称为Microsoft.Practices.ServiceLocation,该程序集包括两个命名空间:Microsoft.Practices.ServiceLocation和Microsoft.Practices.ServiceLocation.Properties

(说明:从1.3.0到1.4.0发生了程序集名称的重大改变)

4. 2017年9月,Microsoft.Practices.ServiceLocation 发布了1.4.0版本,程序集名称修改为CommonServiceLocator,该程序集包括两个命名空间没有改变:Microsoft.Practices.ServiceLocation和Microsoft.Practices.ServiceLocation.Properties

(说明:从1.3.0到1.4.0发生了命名空间名称的重大改变)

5、2017年10月,Microsoft.Practices.ServiceLocation 发布了2.0.1版本,程序集名称保持为CommonServiceLocator,该程序集包括的命名空间发生改变:CommonServiceLocator和CommonServiceLocator.Properties

6、2018年1月,Microsoft.Practices.ServiceLocation 发布了2.0.2版本,程序集名称保持为CommonServiceLocator,该程序集包括的命名空间,由原来的两个(CommonServiceLocator和CommonServiceLocator.Properties)减少到1个,即 CommonServiceLocator

(说明:2.0.2版本中的命名空间少了一个)

7、2018年3月、2018年8月、2019年11月,Microsoft.Practices.ServiceLocation 发布了2.0.3、2.0.4、2.0.5版,程序集名称保持为CommonServiceLocator,命名空间保持为CommonServiceLocator.目前最新的版本即为2.0.5版本。

 

 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值