Caliburn v2 变更-容器

来源:互联网 发布:b站黑历史知乎 编辑:程序博客网 时间:2024/04/29 20:41

做记录…   
对容器进行了重构,命名空间进行了调整,为Caliburn.Core.IoC

添加了IRegistry接口,用于注册,之前没有接口用于注册,只能是从容器中取

/// <summary>/// Implemented by a class that can register components with an IoC container./// </summary>public interface IRegistry{    /// <summary>    /// Configures the container using the provided component registrations.    /// </summary>    /// <param name="registrations">The component registrations.</param>    void Register(IEnumerable<IComponentRegistration> registrations);}

 

SimpleContainer类为默认实现,ContainerBase为基础,可以用ContainerBase实现适配.虽然内部发生变化,但使用起来变化不大

注意:PerRequestAttribute等Attribute命名空间进行了调整,也为Caliburn.Core.IoC,此处有影响

原创粉丝点击