private IEnumerable <object> GetFileFormats(IPakItem item) { yield return(item); object content; if (ContentFactory.TryGetPrimaryContent(item, out content)) { yield return(content); } }
public static bool TryGetBitmapContent(IPakItem item, out IBitmap content) { content = null; if (item.ItemType != PakItemType.Textures) { return(false); } content = new Halo1X.Texture((Halo1X.PakItem)item); return(content != null); }
private bool FilterTag(string filter, IPakItem item) { if (string.IsNullOrEmpty(filter)) { return(true); } if (item.Name.ToUpper() == filter.ToUpper()) { return(true); } return(false); }
public static bool TryGetPrimaryContent(IPakItem item, out object content) { switch (item.ItemType) { case PakItemType.Textures: IBitmap bitmapContent; if (TryGetBitmapContent(item, out bitmapContent)) { content = bitmapContent; return(true); } break; } content = null; return(false); }
public PakExtractable(IPakItem item, string destination) { this.item = item; Destination = destination; }
internal static ArgumentException NotASaberTextureItem(IPakItem item) { return(new ArgumentException($"'{item.Name}' is not a texture file.")); }