//资源完整性检查 private void DoLocalResFullCheck() { _stateArg.Progress = 0.0f; _stateArg.StateInfo = "...开始资源完整性检查..."; EventService.GetInstance().SendEvent((uint)EventId.UpdateStateChange, _stateArg); IFSService.GetInstance().BeginLocalChecker("MainResCheck", "MainFileList.json", delegate(string checkName, IFSLocalCheckerResult result) { if (result.IsSuccess && result.LocalIsFull) { JW.Common.Log.LogD("---DoReadyEnterGame-----"); DoReadyEnterGame(); } else { _localCheckFailCnt++; if (_localCheckFailCnt > 10) { _stateArg.Progress = 0.0f; _stateArg.StateInfo = "...资源完整性检查失败!等待重启 ..."; EventService.GetInstance().SendEvent((uint)EventId.UpdateStateChange, _stateArg); ScheduleService.GetInstance().AddTimer(2000, false, this); return; } // _stateArg.Progress = 0.0f; _stateArg.StateInfo = "...资源完整性检查失败!重新更新 ..."; EventService.GetInstance().SendEvent((uint)EventId.UpdateStateChange, _stateArg); // DoMainResCheck(); } }); }
//主资源更新检查 private void DoMainResCheck() { _isForceCheck = false; // CheckIsFirstInstall(); JW.Common.Log.LogD("<color=yellow>游戏主资源检查</color>"); string defaultMainResUrlRoot = string.Empty; #if JW_DEBUG defaultMainResUrlRoot = "https://gamehalldownloadcdn.scbczx.com/Arcade/IFS/Debug/"; #else defaultMainResUrlRoot = "https://gamehalldownloadcdn.scbczx.com/Arcade/IFS/Release/"; #endif #if USE_PACK_RES // IFSSession mainResSession = new IFSSession(); mainResSession.Name = "MainResIFS" + _updateFailedCnt.ToString(); mainResSession.FirstZipName = "MainZip.bytes"; mainResSession.FileListFileName = "MainFileList.json"; mainResSession.SessionHandler = OnIFSSessionCallback; string mainResUrlRoot = defaultMainResUrlRoot; // mainResSession.FirstZipURL = string.Format("{0}{1}", mainResUrlRoot, "MainZip.bytes"); mainResSession.FileListFileUrl = string.Format("{0}{1}", mainResUrlRoot, "MainFileList.json"); mainResSession.NetFileRootUrl = mainResUrlRoot; IFSService.GetInstance().BeginSession(mainResSession); #else DoReadyEnterGame(); #endif }
//public ApiServer( ICallService callService, IFSService fsService, IGatewayService gatewayService) public ApiServer() { //_fsService = fsService; //_callService = callService; //_gatewayService = gatewayService; _fsService = new FSService(); _callService = new CallService(); FS = _fsService.GetFSServer(); fsInbound = new FSInbound(FS.Host, FS.Port, FS.Password, FS.OutAddress); _run = true; }
public Dial() : base() { Nestables.Add("Number"); Nestables.Add("Conference"); this.method = ""; this.action = ""; this.record = false; this.hangupOnStar = false; this.caller_id = ""; this.time_limit = DEFAULT_TIMELIMIT; this.timeout = DEFAULT_TIMEOUT; this.dial_str = ""; fs = new FSService(); }
/// <summary> /// 初始化框架层 /// </summary> /// <param name="initialize">初始化/反初始化</param> public static void InitFramework(bool initialize) { if (initialize) { NativeService.GetInstance(); IFSService.GetInstance(); AssetService.GetInstance(); ScheduleService.GetInstance(); EventService.GetInstance(); StateService.GetInstance(); HttpService.GetInstance(); UGUIRoot.GetInstance(); UIStateService.GetInstance(); SceneService.GetInstance(); UICommonService.GetInstance(); AudioService.GetInstance(); QualityService.GetInstance(); NetworkService.GetInstance(); NetAssetService.GetInstance(); } else { IFSService.DestroyInstance(); EventService.DestroyInstance(); StateService.DestroyInstance(); HttpService.DestroyInstance(); UIStateService.DestroyInstance(); SceneService.DestroyInstance(); UICommonService.DestroyInstance(); UGUIRoot.DestroyInstance(); AudioService.DestroyInstance(); NetworkService.DestroyInstance(); NativeService.DestroyInstance(); NetAssetService.DestroyInstance(); QualityService.DestroyInstance(); //最后 ScheduleService.DestroyInstance(); AssetService.GetInstance().Destroy(); AssetService.DestroyInstance(); } }
public DependencyInjector() { _container = new UnityContainer(); ILogService _ILogService = LogServiceProviderManager.getDefaultProvider(); IBdConsulta1Repository _IBdConsulta1Repository = new BdConsulta1RepositoryStoredProcedures(_ILogService); IBillingRepository _IBillingRepository = new BillingRepositoryStoredProcedures(_ILogService); IBdSolicitudServicioRepository _IBdSolicitudServicioRepository = new BdSolicitudServicioRepositoryStoredProcedures(_ILogService); IIFSRepository _IIFSRepository = new IFSDocumentosRepositoryFile(_ILogService); IIFSRepository _IFSRepositoryToSync1 = new IFSFCNCRepositoryFile(_ILogService); IN4Repository _IN4Repository = new N4RepositoryStoredProcedure(_ILogService); IBdConsulta1Service _IBdConsulta1Service = new BdConsulta1Service(_IBdConsulta1Repository, _ILogService); IN4Service _IN4Service = new N4Service(_IN4Repository, _ILogService); IBillingService _IBillingService = new BillingService(_IBillingRepository, _ILogService); IMappingService _IMappingService = new MappingService(_ILogService); IBdSolicitudServicioService _IBdSolicitudServicioService = new BdSolicitudServicioService(_IBdSolicitudServicioRepository, _ILogService); IIFSService _IIFSService = new IFSService(_IIFSRepository, new List <IIFSRepository>() { _IFSRepositoryToSync1 }, _ILogService); IJob _IProcess = new IFSDocsN4Process(_IBdConsulta1Service, _IBdSolicitudServicioService, _IN4Service, _IBillingService, _IIFSService, _IMappingService, _ILogService); _container.RegisterInstance <IBdConsulta1Repository>(_IBdConsulta1Repository); _container.RegisterInstance <IBillingRepository>(_IBillingRepository); _container.RegisterInstance <IN4Repository>(_IN4Repository); _container.RegisterInstance <ILogService>(_ILogService); _container.RegisterInstance <IMappingService>(_IMappingService); _container.RegisterInstance <IN4Service>(_IN4Service); _container.RegisterInstance <IBillingService>(_IBillingService); _container.RegisterInstance <IBdConsulta1Service>(_IBdConsulta1Service); _container.RegisterInstance <IIFSService>(_IIFSService); _container.RegisterInstance <IJob>(_IProcess); }
public static IFSService GetIFSService() { return(IFSService.GetInstance()); }