Esempio n. 1
0
        public IEnumerable <DownloadEntry> GetDownloadsEntries(string baseRepository, string operatingSystem,
                                                               bool is64BitArchitecture)
        {
            List <DownloadEntry> entries = new List <DownloadEntry>();

            if (DownloadInfo != null)
            {
                foreach (DownloadEntry downloadEntry in DownloadInfo.GetDownloadsEntries(
                             IsNatives && operatingSystem != null && Natives.ContainsKey(operatingSystem)
                        ? Natives[operatingSystem].Replace("${arch}", is64BitArchitecture ? "64" : "32")
                        : null))
                {
                    if (downloadEntry.Path == null)
                    {
                        downloadEntry.Path = GetPath(operatingSystem, is64BitArchitecture);
                    }

                    entries.Add(downloadEntry);
                }
            }
            else
            {
                entries.Add(new DownloadEntry {
                    Url       = (Url ?? baseRepository) + GetPath(operatingSystem, is64BitArchitecture), Path = GetPath(),
                    IsNatives = IsNatives
                });
            }

            return(entries);
        }
Esempio n. 2
0
 /// <summary>
 /// Returns true, if contains natives for specified operating system.
 /// </summary>
 public bool IsNativesFor(string operatingSystem)
 => IsNatives && Natives.ContainsKey(operatingSystem);