Example #1
0
 /// <summary>
 /// Get a version from the database.
 /// </summary>
 /// <remarks>
 /// If the version is incomplete, the latest version matching will be returned.
 /// </remarks>
 public VersionMetadata Find(UnityVersion version)
 {
     if (version.IsFullVersion)
     {
         // Do exact match
         foreach (var metadata in cache.versions)
         {
             if (version.MatchesVersionOrHash(metadata.version))
             {
                 return(metadata);
             }
         }
         return(default);