Beispiel #1
0
        public void TestCase2()
        {
            AutofacHelper.InitAutofacContainer("../../Ioc/Autofac.xml");
            var fun = AutofacHelper.GetInstance <IFun>();

            Assert.AreEqual("Fun2", fun.GetInstanceType());
        }
Beispiel #2
0
        public void TestCase1()
        {
            AutofacHelper.InitAutofacContainer();
            var fun = AutofacHelper.GetInstance <IFun>();

            Assert.AreEqual("Fun1", fun.GetInstanceType());
        }
Beispiel #3
0
        public VehicleMakeViewModel(VehicleMakeService vehicleMakeService, IMapper m)
        {
            vms          = vehicleMakeService;
            vehicleMake  = AutofacHelper.GetInstance().GetContainer().Resolve <VehicleMakeModel>();
            mapper       = m;
            VehicleMakes = new ObservableCollection <VehicleMakeModel>();
            GetVehicleMake();

            CreateComand = new Command(() =>
            {
                CreateCommandFunction();
            });

            DeleteComand = new Command(() =>
            {
                DeleteCommandFunction();
            });

            UpdateCommand = new Command(() =>
            {
                UpdateCommandFunction();
            });

            SelectedMakeCommand = new Command(() =>
            {
                SeletedMakeCommandFunction();
            });

            SearchCommand = new Command(() =>
            {
                SearchFunction();
            });
        }
Beispiel #4
0
 public App()
 {
     InitializeComponent();
     using (var scope = AutofacHelper.GetInstance().GetContainer().BeginLifetimeScope())
     {
         var vmv            = scope.Resolve <VehicleMakeView>();
         var navigationPage = new NavigationPage(vmv);
         MainPage = navigationPage;
     }
 }
Beispiel #5
0
        public VehicleModelViewModel(VehicleMakeModel vehicleMakeModel, VehicleModelService vehicleModelService, IMapper m)
        {
            vms                 = vehicleModelService;
            mapper              = m;
            vehicleMake         = vehicleMakeModel;
            vehicleModel        = AutofacHelper.GetInstance().GetContainer().Resolve <VehicleModelModel>();
            vehicleModel.MakeId = vehicleMake.Id;
            VehicleModels       = new ObservableCollection <VehicleModelModel>();
            pageIndex           = 0;
            pageSize            = 4;
            GetVehicleModel();

            CreateComand = new Command(() =>
            {
                CreateCommandFunction();
            });

            DeleteComand = new Command(() =>
            {
                DeleteCommandFunction();
            });

            UpdateCommand = new Command(() =>
            {
                UpdateCommandFunction();
            });

            NextCommand = new Command(() =>
            {
                NextCommandFunction();
            });

            PreviousCommand = new Command(() =>
            {
                PreviousCommandFunction();
            });
        }
 public HomeController()
 {
     homeBll = AutofacHelper.GetInstance <IHomeBll>();
 }