AutofacContainer

    /// <summary>
    /// Autofac容器
    /// </summary>
    public class AutofacContainer
    {
        public static IContainer Container { get; private set; }

        public static void Set(IContainer c)
        {
            Container = c;
        }

        public static T Resolve<T>()
        {
            return Container.Resolve<T>();
        }
    }

 

posted @ 2016-11-15 10:11  b̶i̶n̶g̶.̶  阅读(257)  评论(0编辑  收藏  举报