Beispiel #1
0
 //ctor
 public DataService(IUnitRepositories airportRepository, IInitService initService, ISerializer jsonSerializerService)
 {
     this.airportRepository     = airportRepository;
     this.initService           = initService;
     this.jsonSerializerService = jsonSerializerService;
     stations = new List <Station>();
 }
Beispiel #2
0
 public HomeController(
     IConfiguration configuration,
     IInitService initService,
     IUniversitiesService universitiesService)
 {
     NeedInitData             = Convert.ToBoolean(configuration[nameof(NeedInitData)]);
     this.initService         = initService;
     this.universitiesService = universitiesService;
 }
Beispiel #3
0
        /// <summary>
        /// 添加初始化服务对象 第一个参数为优先级:0开始
        /// </summary>
        /// <param name="service"></param>
        private void AddInitService(int priority, IInitService service)
        {
            if (priority < 0)
            {
                Debug.LogError("优先级从0开始,不能为负");
                return;
            }
            if (!_initServices.ContainsKey(priority))
            {
                _initServices[priority] = new HashSet <IInitService>();
            }

            _initServices[priority].Add(service);
        }
 public InitController(ILogger <InitController> logger, IInitService initService)
 {
     _logger      = logger;
     _initService = initService;
 }
Beispiel #5
0
 public OtherController(IInfoService infoService, IInitService initService)
 {
     _infoService = infoService;
     _initService = initService;
 }