示例#1
0
        /// <summary>
        /// Configure IOC
        /// </summary>
        public static void ConfigureIoC()
        {
            // base services
            Context.Container.Register <IContext>(c => ThreadContext.CreateInstance());
            Context.Container.Register <IConfigSettings>(c => new AppConfigSettings());

            // admin dalc
            Dalc.Register.RegisterAll();
        }
示例#2
0
        /// <summary>
        /// Constructor, used to build the testing context
        /// </summary>
        public GettingATaskToExecuteInTheCorrectOrder()
        {
            var taskDalc = MockRepository.GenerateStub <ITaskDalc>();

            ScenarioContext.Current.Add("taskDalc", taskDalc);

            Context.Container.Register(c => ThreadContext.CreateInstance());
            Context.Container.Register <IConfigSettings>(c => new AppConfigSettings());
            Context.Container.Register(c => taskDalc);
        }
示例#3
0
        public void Init()
        {
            BasePath = AppDomain.CurrentDomain.BaseDirectory;

            // IOC
            Context.Container.Register <IDataBase>(c => new DataBase());
            Context.Container.Register <IContext>(c => ThreadContext.CreateInstance());
            Context.Container.Register <IConfigSettings>(c => new AppConfigSettings());
            // assembly generator
            Context.Container.Register <IAssemblyGenerator>(c => new AssemblyGenerator());

            // admin dalc
            Lesula.Admin.Dalc.Register.RegisterAll();
        }