public void TestCase2() { AutofacHelper.InitAutofacContainer("../../Ioc/Autofac.xml"); var fun = AutofacHelper.GetInstance <IFun>(); Assert.AreEqual("Fun2", fun.GetInstanceType()); }
public void TestCase1() { AutofacHelper.InitAutofacContainer(); var fun = AutofacHelper.GetInstance <IFun>(); Assert.AreEqual("Fun1", fun.GetInstanceType()); }
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(); }); }
public App() { InitializeComponent(); using (var scope = AutofacHelper.GetInstance().GetContainer().BeginLifetimeScope()) { var vmv = scope.Resolve <VehicleMakeView>(); var navigationPage = new NavigationPage(vmv); MainPage = navigationPage; } }
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>(); }