Releases: CatLib/Core
Releases · CatLib/Core
CatLib.Core 2.0
Added
Injectallowed to be set to optional.(#253 )Arr.Testcan get matched value of the first match(#280 )
Changed
- Comments translated from Chinese into English(#133 )
- Defined Container.Build as a virtual function(#210 )
- Optimizes the constructor of
MethodContainer(#218 ) - The default project uses the .net standard 2.0(#225 )
- Rename Util helper class to Helper class Change access level to internal.(#230 )
Application.IsRegistedchanged(rename) toIsRegistered(#226 )- Use
VariantAttributeto mark variable types instead ofIVariant(#232 ) GuardWill be expandable withGuard.That(#233 )- Fixed the problem of container exception stack loss(#234 )
- Adjusted the internal file structure to make it clearer(#236 ).
- Add code analyzers (#206 )
- Refactoring event system (#177 )
- Refactoring
RingBuffermake it inherit fromStream.(#238 ) - Namespace structure adjustment(optimization).(#241 )
Appcan be extended byThat(Handler rename to that) and removedHasHandlerAPI (#242 )- Unnecessary inheritance: WrappedStream(#247 )
- Clean up useless comment(#249 ).
Guard.Requirecan set error messages and internal exceptions(#250).- Exception class implementation support: SerializationInfo build(#252 ).
- Refactoring unit test, import moq.(#255 )
CodeStandardExceptionreplaces toLogicException(#257 )- Exception move to namespace
CatLib.Exception(#258 ) Facade<>.Instancechanged toFacade<>.That(#259 )Application.StartProcessmigrate toStartProcess(#260 )Arroptimization, lifting some unnecessary restrictions (#263)Stroptimization, lifting some unnecessary restrictions (#264)- Refactoring
SortSet(#265 ) - Removed global params in application constructor. use Application.New() instead.(#267 )
- Containers are no longer thread-safe by default(#270 )
Fixed
- Fixed a bug that caused
Arr.Fillto not work properly under special circumstances. (#255 )
Removed
- Removed
ExcludeFromCodeCoverageAttribute(#229 ) - Removed unnecessary interface design
ISortSet(#211 ). - Removed
Versionclasses andApplication.Comparemethod.(#212). - Removed
Templatesupported(#213 ). - Removed
FilterChainsupported(#214 ). - Removed
Enumsupported(#215 ). - Removed
IAwaitinterface(#217 ). - Removed
Container.Flashapi(#219 ). - Removed
Arr.Flashmethod(#220 ). - Removed
Dicthelper class(#221 ). - Removed
ThreadStatichelper class(#223 ). - Removed
QuickListsupported(#224 ). - Removed
Storagesupported(#228 ) - Removed
SystemTimeclass(#235 ). - Removed
ICoroutineInitfeature from core library(#243 ). - Removed the priority attribute, depending on the loading order(#244 ).
- Removed
Util.Encoding(#245 ). - Removed
Str.Encoding(#246 ) - Removed
IServiceProviderTypefeature in core library(#246 ). - Removed unnecessary extension functions(#247 ).
- Removed
PipelineStreamstream.(#256 ) - Removed all
Obsoletemethod and clean code.(#261 ) - Removed
App.Version.(#266 )
CatLib Core 1.4.0 Beta
通过Nuget安装CatLib Core
Install-Package CatLib.Core -Version 1.4.0Added
Arr增加Test函数,支持对数组进行自定义检查(#178 )Arr增加Set函数,允许替换匹配值或者在尾部增加替换值(#190 )Str增加Is重载,允许对于数组类型的模式进行匹配(#179 )Str增加JoinList函数,允许顺序组合给定的字符串数组(#195 )Str增加Levenshtein函数,允许计算两个字符串之间的近似度(#194 )Str增加Space常量代表一个含有空格的空字符串(#197 )Application.Register增加强制注册支持,允许在已注册服务提供者的基础上强制注册(#184 )增加CHANGELOG(#185 )
Changed
CatLib Core 1.3.2 Beta
CatLib Core 1.3.1 Beta
CatLib Core 1.3.0 Beta
通过Nuget安装CatLib Core
Install-Package CatLib.Core -Version 1.3.0框架相关
- 修复Terminate()框架时会释放不属于自己的全局句柄(#131 )
- Arr.Map函数的返回值会根据闭包的返回值来决定(#138 )
- Arr.Map允许传入
null元素将会转意为:new object[0] (#140 ) - 修复
OnNewApplication给定新的事件时导致关注该事件的全部事件都生效的bug(#144 ) - App.cs缺失的接口补全(#152 )
- Application的部分函数调整为protected(#153 )
容器相关
WrapperTypeBuilder中给定的服务名无需在进行格式化处理,服务名在传入之前就应该被处理(#139 )- 调整GetBindFillable由private变更为protected(#141 )
- 调整容器Extend函数,允许进行全局监控(#142 )
- IBindable接口增加Container属性允许获取绑定数据的容器信息(#145 )
- 为IGivenData的泛型类增加IBindable的约束(#146 )
- 修复容器未能解决时,错误指向的类型关系不正确的问题(#150 )
- 完善Extend扩展函数(#154 )
- Bind和Singleton增加写法语法糖(#156 )
- BindIf和SingletonIf增加写法语法糖(#158 )
- Watch接口调整(#163 )
即将被移除
- 自定义枚举类,被标记为已过时,这个类将会在2.0版本中被移除(#134 )
内部调整
CatLib Core 1.3.0 Aplha.3
通过Nuget安装CatLib Core
Install-Package CatLib.Core -Version 1.3.0-alpha.3框架相关
- 修复初始化顺序不正确的异常,不同运行时环境不一致(#102 )
- copyright 名称变更为 CatLib(#106 )
- 为Type增加ToService扩展函数(#105 )
- 注释中的文档地址更新为 https(#108 )
- DebugLevels允许在Register中被使用(#109)
- 提示内容优化(#117 )
- App门面增加IsResolved(string service)的支持(#118 )
- 移除实验的属性App.AutoInstance; 如果全局实例没有被构建则引发一个异常(#129)
- 如果在构建CatLib实例时,允许传入一个bool值决定是否应用到全局(#128)
服务容器
- 将IContainer接口缩减,缩减的接口将会被移动到扩展方法(#111 )
- 语意行为变更:Bind和Singleton相关(#112 )
IContainer.Release接口参数由string变更为object,允许通过对象实例来进行释放(#115 )- 优化UnresolvableException的异常提示消息 (#120)
- 允许在Needs时提供需求的变量名,以支持变量名需求,改善变量名上下文关系的流程 (#122 )
- 服务容器的构建策略可以通过虚函数覆写(#124)
- 移除了Inject的别名支持 (#126)
其他
- 清理了无用代码(#119 )
CatLib Core 1.3.0 Aplha.2
CatLib Core 1.3.0 Aplha.1
通过Nuget安装CatLib Core
Install-Package CatLib.Core -Version 1.3.0-alpha.1框架
- 升级为 c# 7.0 语法(#64 )
- 增加
LogicException逻辑错误异常(#80 ) - 增加
CodeStandardException代码规范异常(#62 ) ServiceProvider.Register不再是abstract- 增加了
ICoroutineInit协同初始化接口(默认的迭代器为同步迭代器和Init没有本质区别,在其他环境下可能受到环境影响) ApplicationEvents.OnIniting被标记为已过时,使用:ApplicationEvents.OnProviderInit替换- 新增了
ApplicationEvents.OnProviderInit服务提供者初始化之前 - 新增了
ApplicationEvents.OnProviderInited服务提供者初始化完成 - Application Version现在是静态化的了(#90 )
代码规范性检查
- 如果尝试为同一个单例化的实例注册不同的服务名,则会异常发一个异常(#62)
- 如果尝试在注册流程中Make服务,那么会引发一个异常。 (#59)
- 通过容器Watch一个对象时,只有当对象时可以被构建时才允许被watch。因为我们认为观察的只能是一个已经被确定的服务,而不是一个未知服务。 (#59)
- 如果尝试在注册流程中Invoke函数,那么会引发一个异常。(#62)
容器服务
- 服务容器增加了解决事件和释放事件的条件筛选(#84 )
- 服务容器增加OnAfterResolving的支持。(#83 )
- 使用this[] set对象时会进行隐式的对象绑定(bind)(#82 )
- 增加Extend函数,用于处理服务的覆盖及拓展关系,OnResolving不再允许覆盖对象。(#79)
- 服务容器Watch接口从容器实现转移至扩展函数(#81)
- 增加服务特殊字符
@,$和:识别,如果包含则不允许注册。(#61) - 增加变量标签
$同@一样,具备相同的变量映射作用。(#61) - 容器在
flush对象时将会按照构建顺序的相反顺序释放服务(之前是需要通过辅助组件来完成)(#55) - 服务容器增加
App.Alias<TService, TAlias>()的拓展方法支持(#57)
支持库
CatLib Core 1.2.12 Beta
通过Nuget安装CatLib Core
Install-Package CatLib.Core -Version 1.2.12- 增加模版方法的门面静态类
- 修复
Dict.Modify的bug,这个bug导致不必要的字典实例 #52 DebugLevels枚举命名调整
-- Prod标记为已过时
-- Dev标记为已过时
-- 增加 Production
-- 增加 Development- 尝试重复调用引导(Bootstrap)时会引发一个
RuntimeException而不是静默忽略。 - 尝试重复调用初始化(Init)时会引发一个
RuntimeException而不是静默忽略。 - 增加了
ApplicationEvents.OnBootstrap在引导开始之前 - 增加了
ApplicationEvents.Bootstrapping在引导进行中 - 增加了
ApplicationEvents.OnInit在初始化开始之前 - 增加了
ApplicationEvents.OnInited在初始化完成之后 - 增加了
ApplicationEvents.OnRegisterProvider注册服务提供者事件 - 允许
ApplicationEvents.Bootstrapping返回一个不为null的值(一般是false)来终止当前引导激活。 - 允许
ApplicationEvents.OnRegisterProvider返回一个不为null的值(一般是false)来终止服务提供者注册。