public void Load(FmsOptions options, string manifestUrl)
 {
     this.options     = options;
     this.manifestUrl = manifestUrl;
     Debug.Log($"Setting manifestUrl to {manifestUrl}");
     AttemptManifestRequest(0u, null);
 }
예제 #2
0
 public void Prepare(FmsOptions options, string json)
 {
     this.options = options;
     if (options.JSONParser.Parse(json))
     {
         IDictionary <string, object> dictionary = options.JSONParser.AsDictionary();
         hashes = (IDictionary <string, object>)dictionary["hashes"];
         if (dictionary["version"] != null)
         {
             version = dictionary["version"].ToString();
         }
         isReady = true;
     }
     Debug.Log($"Versioned manifest version #{version} is ready with {hashes.Count} files.");
 }
 public void Load(FmsOptions options, string manifestUrl)
 {
     manifest = new PassthroughFileManifest();
     manifest.Prepare(options, "");
     Caching.ClearCache();
     if (options.FMSListener != null)
     {
         try
         {
             options.FMSListener.OnManifestLoadSuccess();
         }
         catch (Exception exception)
         {
             Debug.LogError("The FMS Listener threw an exception.");
             Debug.LogException(exception);
         }
         options.FMSListener.OnManifestLoadComplete();
     }
 }
예제 #4
0
        public void Init(FmsOptions options)
        {
            string manifestUrl = "";

            if (options.JSONParser == null)
            {
                throw new CMSException("JSON parser implementation is required.");
            }
            Debug.Log("JSON parser: " + options.JSONParser.GetDescription());
            switch (options.Mode)
            {
            case FmsMode.Versioned:
                manifestUrl    = $"{options.BaseURL}manifest/{options.CodeName}/{options.Env.ToString().ToLower()}/{options.ManifestVersion}.json";
                manifestLoader = new VersionedFileManifestLoader(options);
                break;

            case FmsMode.Passthrough:
                manifestLoader = new PassthroughFileManifestLoader();
                break;
            }
            manifestLoader.Load(options, manifestUrl);
        }
예제 #5
0
 public void Prepare(FmsOptions options, string json)
 {
     this.options = options;
     Debug.Log("Passthrough manifest is ready.");
 }
 public VersionedFileManifestLoader(FmsOptions options)
 {
 }