Ejemplo n.º 1
0
        /// <summary>
        /// 初始化一个<see cref="WebApiInitializeOptions"/>类型的新实例
        /// </summary>
        public WebApiInitializeOptions(IBasicLoggingInitializer basicLoggingInitializer, IIocInitializer iocInitializer)
        {
            basicLoggingInitializer.CheckNotNull("basicLoggingInitializer");
            iocInitializer.CheckNotNull("iocInitializer");

            PlatformToken = PlatformToken.WebApi;
            DataConfigReseter = new DataConfigReseter();
            DatabaseInitializer = new DatabaseInitializer();
            EntityInfoHandler = new EntityInfoHandler()
            {
                IocResolver = new WebApiIocResolver()
            };
            FunctionHandler = new FunctionHandler()
            {
                IocResolver = new WebApiIocResolver()
            };
            BasicLoggingInitializer = basicLoggingInitializer;
            IocInitializer = iocInitializer;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 初始化一个<see cref="LocalInitializeOptions"/>类型的新实例
        /// </summary>
        public LocalInitializeOptions(IBasicLoggingInitializer basicLoggingInitializer, IIocInitializer iocInitializer)
        {
            basicLoggingInitializer.CheckNotNull("basicLoggingInitializer");
            iocInitializer.CheckNotNull("iocInitializer");

            PlatformToken       = PlatformToken.Local;
            DataConfigReseter   = new DataConfigReseter();
            DatabaseInitializer = new DatabaseInitializer();
            EntityInfoHandler   = new EntityInfoHandler()
            {
                IocResolver = new LocalIocResolver()
            };
            FunctionHandler = new NullFunctionHandler()
            {
                IocResolver = new LocalIocResolver()
            };
            BasicLoggingInitializer = basicLoggingInitializer;
            IocInitializer          = iocInitializer;
        }