private void add(BundleEntry entry) { string name = null; if (entry is DeletedEntry) { name = "deleted"; } else if (entry is ResourceEntry) { name = ((ResourceEntry)entry).Resource.GetCollectionName(); } else { throw new ArgumentException("Cannot import BundleEntry of type " + entry.GetType().ToString()); } List <BundleEntry> resources; if (ImportedEntries.ContainsKey(name)) { resources = ImportedEntries[name]; } else { resources = new List <BundleEntry>(); ImportedEntries.Add(name, resources); } resources.Add(entry); }
public static string TypeName(this BundleEntry entry) { if (entry is DeletedEntry) { return("DeletedEntry"); } else if (entry is ResourceEntry) { return("ResourceEntry"); } else { throw new ArgumentException("Unsupported BundleEntry type: " + entry.GetType().Name); } }
private string getEntryTypeFromInstance(BundleEntry entry) { if (entry is DeletedEntry) { return("DeletedEntry"); } else if (entry is ResourceEntry) { return("ResourceEntry"); } else { throw new ArgumentException("Unsupported BundleEntry type: " + entry.GetType().Name); } }