void LoadDataFromServer() { #if UNITY_ANDROID string resourceFilePath = Path.Combine(ResourceManager.PathURL.Replace("file://", ""), ClientConfigure.resourceTxtName); if (File.Exists(resourceFilePath)) { StartCoroutine("RequestServerList"); } else { downloader = gameObject.AddComponent <ResourceDownloader>(); if (downloader) { downloader.StartCoroutine(downloader.LoadAndSaveResources()); m_bLoadingTable = true; } else { StartCoroutine("RequestServerList"); } } #elif UNITY_IPHONE StartCoroutine("RequestServerList"); #else StartCoroutine("RequestServerList"); #endif }
public JiraApi(AssistantSettings configuration, ApplicationCache applicationCache) { _resourceDownloader = new ResourceDownloader(configuration); Session = new JiraSessionService(configuration); Server = new MetadataRetriever(configuration); _issuesFinder = new IssuesFinder(configuration, Server); Agile = new JiraAgileService(configuration, applicationCache, Server, _issuesFinder); Worklog = new WorklogManager(configuration); }
private static ResourceDownloader GetDownloader() { return(ResourceDownloader.Get()); }
private void StartProxy() { try { Program.LogInfoMessage("core", "Initializing proxy..."); ResourceDownloader._uLt6b1uwFNgoZycBDqE02WmgdfB(); ServerList.GetServerList(); while (true) { int num = 1317307132; while (true) { uint num2; switch ((num2 = (uint)num ^ 0x50FFB520u) % 3u) { case 0u: break; default: return; case 2u: goto IL_003b; case 1u: return; } break; IL_003b: _ProxyServer.Start(); num = (int)(num2 * 1401915683) ^ -2028665882; } } } catch (Exception ex) { while (true) { int num3 = 1520978539; while (true) { uint num2; Form parentForm; string obj; switch ((num2 = (uint)num3 ^ 0x50FFB520u) % 3u) { case 2u: break; default: return; case 1u: parentForm = base.ParentForm; obj = ex?.ToString(); goto IL_0092; case 0u: return; } break; IL_0092: MessageBox.Show(parentForm, "Failed to initialize Proxy!\n\nPlease make sure:\n- Your AntiVirus is not blocking this program\n- This no other Exalt tools are running\n- Loading the client normally works fine\n\nMore details:\n" + obj); Close(); num3 = 1335130281; } } } }
private SecucardConnect(ClientConfiguration configuration) { _configuration = configuration; // Setup Trace if directory is there if (!string.IsNullOrWhiteSpace(configuration.TraceDir)) { string dir = configuration.TraceDir; if (!Path.IsPathRooted(configuration.TraceDir)) { dir = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), configuration.TraceDir); } if (!Directory.Exists(Path.GetDirectoryName(dir))) { Directory.CreateDirectory(Path.GetDirectoryName(dir)); } var listener = new SecucardTraceListener(dir) { Name = "SecucardTraceListener" }; System.Diagnostics.Trace.Listeners.Add(listener); SecucardTrace.EmptyLine(); } // Check if Data storage was passed. Otherwise create memory storage if (configuration.DataStorage == null) { configuration.DataStorage = new MemoryDataStorage(); } var context = new ClientContext { AppId = _configuration.AppId, }; _context = context; var authConfig = _configuration.AuthConfig; var stompConfig = _configuration.StompConfig; var restConfig = _configuration.RestConfig; SecucardTrace.Info(string.Format("Creating client with configuration: {0}", configuration)); if (_configuration.ClientAuthDetails == null) { //TODO: } context.DefaultChannel = _configuration.DefaultChannel; var restChannel = new RestChannel(restConfig, context); context.Channels.Add(ChannelOptions.ChannelRest, restChannel); if (_configuration.StompEnabled) { var stompChannel = new StompChannel(stompConfig, context); context.Channels.Add(ChannelOptions.ChannelStomp, stompChannel); stompChannel.StompEventArrivedEvent += context.EventDispatcher.StompMessageArrivedEvent; } var restAuth = new RestAuth(authConfig) { UserAgentInfo = "secucardconnect-net-" + Version + "/net:" + Environment.OSVersion + " " + Environment.Version }; context.TokenManager = new TokenManager(authConfig, _configuration.ClientAuthDetails, restAuth); context.TokenManager.TokenManagerStatusUpdateEvent += TokenManagerOnTokenManagerStatusUpdateEvent; // Prepare resource downloader ResourceDownloader.Get().Cache = configuration.DataStorage; ResourceDownloader.Get().RestChannel = restChannel; _serviceDict = ServiceFactory.CreateServices(context); WireServiceInstances(); }
public async Task Invoke() { await ResourceDownloader.CacheAllData(); JobProcessor.SetBusy(false); }
public ResourceDownloaderJob(ResourceDownloader resourceDownloader, JobProcessor jobProcessor) { ResourceDownloader = resourceDownloader; JobProcessor = jobProcessor; }