Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 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);
 }