public ContentManifestDirectoryEntry FindEntry_Prod(string client_version, string client_platform) { string environment = Disney.Kelowna.Common.Environment.Environment.PRODUCTION.ToString().ToLower(); for (int i = 0; i < directory.Length; i++) { ContentManifestDirectoryEntry contentManifestDirectoryEntry = directory[i]; if (contentManifestDirectoryEntry.IsEqualTo(client_version, client_platform, environment)) { return(contentManifestDirectoryEntry); } } return(null); }
public List <string> GetReleaseNamesUpToAndIncludingDate(DateTimeOffset date, string client_version, string client_platform, string environment) { List <string> list = new List <string>(); if (directory == null || directory.Length <= 0) { return(list); } for (int i = 0; i < directory.Length; i++) { ContentManifestDirectoryEntry contentManifestDirectoryEntry = directory[i]; if (contentManifestDirectoryEntry.IsEqualTo(client_version, client_platform, environment) && getReleaseDateFromEntry(contentManifestDirectoryEntry) <= date) { list.Add(GetReleaseNameFromEntry(contentManifestDirectoryEntry)); } } return(list); }
public bool DoesNewerVersionExist(DateTimeOffset targetDate, Version currentVersion, string clientPlatform, string environment) { for (int i = 0; i < directory.Length; i++) { ContentManifestDirectoryEntry contentManifestDirectoryEntry = directory[i]; if (!contentManifestDirectoryEntry.IsEqualTo(clientPlatform, environment)) { continue; } Version version = ClientInfo.ParseClientVersion(contentManifestDirectoryEntry.client); if (version > currentVersion) { DateTimeOffset releaseDateFromEntry = getReleaseDateFromEntry(contentManifestDirectoryEntry); if (releaseDateFromEntry <= targetDate) { return(true); } } } return(false); }