コード例 #1
0
 public InventoryHandler(ISqLiteDataAccess dataAccess, IProductCategoryValidator productCategoryValidator, IProductValidator productValidator, IUserInterface userInterface)
 {
     _dataAccess = dataAccess;
     _productCategoryValidator = productCategoryValidator;
     _productValidator         = productValidator;
     _userInterface            = userInterface;
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: TothZoltan2018/TimCorey
        static void Main(string[] args)
        {
            var container = AutoFacContainer.Configure();

            using (var scope = container.BeginLifetimeScope())
            {
                //Todo: How to set dBName parameter. It only works because I gave a default value in the constructor.
                ISqLiteDataAccess sqLiteDataAccess = scope.Resolve <ISqLiteDataAccess>(new NamedParameter("dBName", "InventoryDB.sqlite"));
                IApplication      app = scope.Resolve <IApplication>();

                app.RunApp();
            }
        }