public static void Postfix(string id, ref VersionManifestEntry __result) { if (ModTek.modtekOverrides != null && ModTek.modtekOverrides.TryGetValue(id, out var entry)) { __result = entry; } }
public VersionManifestEntry GetVersionManifestEntry() { if (versionManifestEntry == null) { versionManifestEntry = new VersionManifestEntry(Id, Path, Type, DateTime.Now, "1", AssetBundleName, AssetBundlePersistent); } return(versionManifestEntry); }
public static void RemoveFromModTekManifest(this VersionManifestEntry entry, BattleTechResourceType type) { return; //if (modtekManifest.TryGetValue(type, out Dictionary<string, VersionManifestEntry> manifests)) //{ // string id = entry.Id.ToUpper(CultureInfo.InvariantCulture); // manifests.Remove(id); //} }
static bool Prefix(string id, string type, out VersionManifestEntry entry, ref VersionManifestAddendum __result, List <VersionManifestAddendum> ___addendums) { VersionManifestAddendum queryValue; if (!VersionManifestAddendumCache.FindInCache(id, type, out queryValue)) { queryValue = VersionManifestAddendumCache.FindInAddendums(id, type, ___addendums); } entry = queryValue.Get(id, type); __result = queryValue; return(false); }
public static void AddToModTekManifest(this VersionManifestEntry versionManifestEntry, BattleTechResourceType resourceType) { return; //Dictionary<string, VersionManifestEntry> manifests = null; //if (!modtekManifest.TryGetValue(resourceType, out manifests)) //{ // manifests = new Dictionary<string, VersionManifestEntry>(); // modtekManifest.Add(resourceType, manifests); //} //string id = versionManifestEntry.Id.ToUpper(CultureInfo.InvariantCulture); //if (manifests.ContainsKey(id)) //{ // modtekManifest[resourceType][id] = versionManifestEntry; //} //else //{ // manifests.Add(id, versionManifestEntry); //} }
public void Test_Compare_Entry_MinObject_NotEqual() { VersionManifestEntry entryA = new VersionManifestEntry { Version = new Version(1, 2) }; VersionManifestEntry entryB = new VersionManifestEntry { Version = new Version(1, 2, 3, 4) }; if (entryA != entryB) { Console.WriteLine("success"); } else { throw new Exception("failed"); } }
public void Test_Compare_Entry_PartObject_Equal() { VersionManifestEntry entryA = new VersionManifestEntry { Version = new Version(1, 2, 3, 4), DownloadUri = "http://update.test.com/download.zip" }; VersionManifestEntry entryB = new VersionManifestEntry { Version = new Version(1, 2, 3, 4), DownloadUri = "http://update.test.com/download.zip" }; if (entryA == entryB) { Console.WriteLine("success"); } else { throw new Exception("failed"); } }
public void Test_Compare_Entry_FullObject_NotEqual() { VersionManifestEntry entryA = new VersionManifestEntry { Version = new Version(1, 2), DownloadUri = "http://update.test.com/download.zip", InfoUri = "http://test.com/update_changelog.html" }; VersionManifestEntry entryB = new VersionManifestEntry { Version = new Version(1, 2, 3, 4), DownloadUri = "http://update.test.com/download.zip", InfoUri = "http://test.com/update_changelog.html" }; if (entryA != entryB) { Console.WriteLine("success"); } else { throw new Exception("failed"); } }
public VersionManifestEntry GetVersionManifestEntry() { return(this.versionManifestEntry ?? (this.versionManifestEntry = new VersionManifestEntry(this.Id, this.Path, this.Type, DateTime.Now, "1", this.AssetBundleName, this.AssetBundlePersistent))); }
public static void Postfix(string id, BattleTechResourceType type, bool filterByOwnership, ref VersionManifestEntry __result) { RLog.M.TWL(0, "BattleTechResourceLocator.EntryByID " + type + " " + id); if (__result == null) { RLog.M.WL(1, "can't find in internal manifest"); if (modtekManifest.TryGetValue(type, out Dictionary <string, VersionManifestEntry> manifests)) { id = id.ToUpper(CultureInfo.InvariantCulture); if (manifests.TryGetValue(id, out VersionManifestEntry entry)) { __result = entry; RLog.M.WL(1, "found in external manifest", true); } else { RLog.M.WL(1, "can't find in external manifest:" + manifests.Count); } } else { } } }
public VersionManifestEntry GetVersionManifestEntry() { return(versionManifestEntry ?? (versionManifestEntry = new VersionManifestEntry(Id, Path, Type, DateTime.Now, "1", AssetBundleName, AssetBundlePersistent))); }