public Point(Customer customer) { this.Customer = customer; ITrafficService service = ServicesFactory.CreateTrafficServcie(); Traffics = service.GetListOfTrafficsFilteredByNumber(customer.Number); }
/// <summary> /// 初始化数据 /// </summary> /// <param name="appContext">应用上下文接口</param> public void Init(IApplicationContext appContext) { m_SmartAntGain = ServiceHelper.Lookup<ISmartAntCalcGain>(appContext); m_TrafficAssist = TrafficAdaptorAssist.Instance; m_ITrafficService = ServiceHelper.Lookup<ITrafficService>(appContext); HSDPABearerManagement tdHSDPAManagement = m_ITrafficService.LookupManager(typeof(HSDPABearerManagement)) as HSDPABearerManagement; m_TdHSDPABearList = tdHSDPAManagement.TdHsdpaBearerList; GetInterfCalcObject(); }
public MapQuestTrafficBusinessTests() { mockRepo = new Mock <IMapQuestTrafficRepo>(); // Initialize AutoMapper for Unit Tests var config = new MapperConfiguration(cfg => { cfg.AddProfile <AutoMapperBusinessProfile>(); }); IMapper mapper = config.CreateMapper(); // Initialize Service with Dependencies _service = new MapQuestTrafficService(mockRepo.Object, mapper); }
public MainPageViewModel(IWeatherService weatherService, ITrafficService trafficService, IRSSService rSSService, ISettingsService settingsService, IComplimentService commonService) { // Constructor injection _weatherService = weatherService; _trafficService = trafficService; _rssService = rSSService; _settingsService = settingsService; _commonService = commonService; App.UserSettings = _settingsService.LoadSettings(); InitializeTimers(); RefreshAllData(); SetRefreshTimers(); GoToSettingsCommand = new CustomCommand(NavigateToSettings, CanNavigateToSettings); }
public VectorMapPropertiesFrm(TreeNode vetNode, IApplicationContext context) { this.m_HandleMap = new Dictionary<int, ProcessChangedHandle>(); this.m_VectorMap = null; this.m_IsExistsNode = false; this.m_TrafficModelService = null; this.m_RemoveColorPolygon = new List<GeoPolygonRegion>(); this.m_OldVectorMap = null; this.m_BakClutterClassList = null; this.m_BakSelectedVectorList = null; this.m_BakDensity = 0f; this.m_BakUserProfile = null; this.m_BakMobility = null; this.components = null; this.InitParam(context); this.InitializeComponent(); this.m_TrafficNode = vetNode; this.m_VectorMap = new VectorTrafficMap(context); this.CopyDataToVetorMap(vetNode); this.m_IsExistsNode = true; this.SetMapVisibleFlag(vetNode); this.oldName = this.m_VectorMap.Name; }
/// <summary> /// 从context里面提取数据对象 /// </summary> /// <param name="context"></param> private void GetValueFromContext(Context context) { m_TdPredicGroup = (TDPredictionGroup)context[ContextKeys.Group]; m_TFMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix]; m_AppContext = (IBaseService)context[ContextKeys.ApplicationContext]; m_ProjectManager = ServiceHelper.Lookup<IProjectManager>(m_AppContext); m_ITrafficService = ServiceHelper.Lookup<ITrafficService>(m_AppContext); HSDPABearerManagement tdHSDPAManagement = m_ITrafficService.LookupManager(typeof(HSDPABearerManagement)) as HSDPABearerManagement; m_TdHSDPAList.AddRange(tdHSDPAManagement.TdHsdpaBearerList); m_CellList = (List<IACell>)context[ContextKeys.CellList]; m_BestServerCellID = (ValueMatrixShort)context[ContextKeys.TDBestServerCellID]; m_DLInterf = (ValueMatrixDouble)context[ContextKeys.DLDCHInterf]; m_Name = m_TdPredicGroup.Name; m_SpaceDivMultipleGain = m_TdPredicGroup.tdUIParam.SpaceDivMultipleGain; m_MaxSpaceDivMultipleGain = m_TdPredicGroup.tdUIParam.MaxSpaceDivMultipleGain; m_TdTermial = (TDTerminal)m_TdPredicGroup.TrafficTerminal.GetNetWorkTerminal(NetWorkType.TDSCDMA); }
public CellMapPropertiesFrm(IApplicationContext context, List<NetWorkType> netTypeList) { this.m_AllTerminal = new Dictionary<string, Terminal>(); this.m_AllMobility = new Dictionary<string, Mobility>(); this.m_CellNamesInLowercase = new List<string>(); this.m_ServiceContext = null; this.m_TrafficService = null; this.modelService = null; this.m_CellDataGridViewDict = new Dictionary<int, Dictionary<int, List<object>>>(); this.inNode = null; this.m_ServiceList = null; this.m_TerminalList = null; this.m_OldMapName = string.Empty; this.components = null; this.m_ServiceContext = context; this.m_TrafficService = context.Lookup(typeof(ITrafficService).FullName) as ITrafficService; this.modelService = context.Lookup(typeof(ITrafficMapModelService).FullName) as ITrafficMapModelService; this.m_TrafficMapAutomation = context.Lookup(typeof(ITrafficMapFunction).FullName) as ITrafficMapFunction; this.m_netWorkTypeList = netTypeList; this.m_TrafficForMap = this.m_ServiceContext.Lookup(typeof(ITrafficForMap).FullName) as ITrafficForMap; this.InitializeComponent(); this.InitCellMap(); this.m_OldMapName = this.m_Map.Name; this.m_IsNodeAdded = false; this.Text = TrafficMapResource.TRAFFICMAP_CELL_PROPERTY; this.LoadCellMapProperty(); this.btnApply.Enabled = false; }
public void InitStage1(IApplicationContext appContext) { if (!this.m_NetWorkTypeList.Contains(NetWorkType.CDMA)) { TrafficServiceImpl impl = new TrafficServiceImpl(appContext, this.m_NetWorkType); this.m_Model = impl.TrafficColModel; this.m_TrafficService = appContext.Lookup(typeof(ITrafficService).FullName) as ITrafficService; this.m_TrafficInterface = new TrafficForNetEntity(appContext, this.m_Model); this.m_TrafficForMapInterface = new TrafficForMap(appContext, this.m_Model); this.m_TrafficForApp = new TrafficForApplication(appContext, this.m_Model); CalMcsEfficiency service = new CalMcsEfficiency(appContext, this.m_Model); appContext.RegisterService(this.m_TrafficInterface); appContext.RegisterService(this.m_TrafficForMapInterface); appContext.RegisterService(this.m_TrafficForApp); appContext.RegisterService(service); this.m_appContext = appContext; this.m_Antennas = ServiceHelper.Lookup<INetAntenna<AntennaEntity>>(appContext); this.m_SerializeHelper = new SerializedHelper(this.m_Model, this.m_TrafficSerializedData, this.m_NetWorkTypeList); this.InitManagement(); this.InitExportExcelDic(); } }
/// <summary> /// Inserting data to Customer and Traffic tables /// </summary> /// <param name="pointsCount">How many point there will be</param> /// <param name="customersCount">How many costumers there will be ( will have 5 traffic per customer ) </param> private static void InsertDataIntoCustomerAndTrafficTables(int pointsCount, int customersCount) { ITrafficService trafficService = ServicesFactory.CreateTrafficServcie(); ICustomerService customerService = ServicesFactory.CreateCustomerService(); List <string> genders = new List <string>() { "M", "F", "?" }; List <string> bNumbers = new List <string>() { "tbaslacte", "ebanab", "HTML:internet/000", "blsl" }; List <string> directions = new List <string>() { "<-", "->" }; List <Coordinates> coorList = new List <Coordinates>(); for (int p = 0; p < pointsCount; p++) { coorList.Add(new Coordinates(new DecimalGenerator(48.1395m, 48.1693m).Generate(), new DecimalGenerator(17.0586m, 17.1730m).Generate())); } for (int c = 0; c < customersCount; c++) { Console.WriteLine("------------------------------------------------------"); string aNumber = new PhoneNumberGenerator().Generate(); var customer = new Customer() { Age = new IntegerGenerator(0, 100).Generate(), Gender = new FromListGetSingleGenerator <string>(genders).Generate(), Number = aNumber }; Console.WriteLine("Trying to add customer " + customer); customerService.InsertNewCostumer(customer); Console.WriteLine("Customer added successfuly"); for (int t = 0; t < 5; t++) { var coord = new FromListGetSingleGenerator <Coordinates>(coorList).Generate(); var trafic = new Traffic() { ANumber = aNumber, BNumber = new FromListGetSingleGenerator <string>(bNumbers).Generate(), Direction = new FromListGetSingleGenerator <string>(directions).Generate(), StartDateTime = new DateTimeGenerator(DateTime.Now.AddHours(-6), DateTime.Now.AddHours(6)).Generate(), CellLat = coord.Lat, CellLong = coord.Long }; Console.WriteLine("Trying to add traffic " + trafic); trafficService.InsertNewTraffic(trafic); Console.WriteLine("Traffic added successfuly"); } Console.WriteLine("------------------------------------------------------"); } Console.WriteLine("Operation successfuly"); }
public MagicMirrorApp(IWeatherService weatherService, ITrafficService trafficService, IMapper mapper) { _weatherService = weatherService; _trafficService = trafficService; _mapper = mapper; }
public TrafficController(ITrafficService iTrafficService) { trafficService = iTrafficService; }
public PerformanceController(IMapper mapper, ITrafficService trafficService, IAuthService authService) { _mapper = mapper; _trafficService = trafficService; _authService = authService; }
public TrafficBusinessTests() { var mockRepo = new Mock <ITrafficRepo>(); _service = new TrafficService(mockRepo.Object); }
public TrafficController(IRegionService regionsService, ITrafficService trafficService) { _regionService = regionsService; _trafficService = trafficService; }
public TrafficBusinessTests() { // Initialize Service with Dependencies _service = new TrafficService(); }
public VectorMapPropertiesFrm(IApplicationContext context, TrafficMapView inTrafficMapView, List<NetWorkType> netTypeList) { this.m_HandleMap = new Dictionary<int, ProcessChangedHandle>(); this.m_VectorMap = null; this.m_IsExistsNode = false; this.m_TrafficModelService = null; this.m_RemoveColorPolygon = new List<GeoPolygonRegion>(); this.m_OldVectorMap = null; this.m_BakClutterClassList = null; this.m_BakSelectedVectorList = null; this.m_BakDensity = 0f; this.m_BakUserProfile = null; this.m_BakMobility = null; this.components = null; this.InitParam(context); this.InitializeComponent(); this.m_TrafficMapView = inTrafficMapView; this.m_netTypeList = netTypeList; this.m_VectorMap = new VectorTrafficMap(context); this.oldName = this.m_VectorMap.Name; }
private void InitParam(IApplicationContext context) { this.m_ServiceContext = context; this.m_TrafficMapService = context.Lookup(typeof(ITrafficMapModelService).FullName) as ITrafficMapModelService; this.m_TrafficModelService = this.m_ServiceContext.Lookup(typeof(ITrafficService).FullName) as ITrafficService; this.m_TrafficMapAutomation = ServiceHelper.Lookup<ITrafficMapFunction>(this.m_ServiceContext); this.InitHandleMap(); }
public Main() { _weatherService = new WeatherService(); _trafficService = new TrafficService(); }