Ejemplo n.º 1
0
 public static void SetCdnServer(string cdnServer)
 {
     if (cdnServer.IsEmpty())
     {
         return;
     }
     rootPath = GetPath(cdnServer, string.Empty, Platform.platform, TexFormatGroup.GetBest());
 }
Ejemplo n.º 2
0
        public static void GetResourceVersion(Action <string> callback)
        {
            string verUrl = string.Format("{0}/version_{1}.txt", Path, TexFormatGroup.GetBest().GetAbCategory(Platform.platform));

            Web.noCache.GetBytes(verUrl, bytes =>
            {
                if (bytes != null)
                {
                    string ver = Encoding.ASCII.GetString(bytes);
                    callback(ver);
                }
                else
                {
                    AssetCache.log.Error("Can't get cdn version from {0}", verUrl);
                    callback(null);
                }
            });
        }