public IcoContainer(IcoContainer container) : base(container) { if (container.Directory == null) throw new InvalidOperationException("Container Directory is null"); Directory = new IcoDirectory(container.Directory); }
public IcoContainer(IcoContainer container) : base(container) { if (container.Directory == null) { throw new InvalidOperationException("Container Directory is null"); } Directory = new IcoDirectory(container.Directory); }
private void Parse(Stream icoStream) { Directory = new IcoDirectory(icoStream); Images = new IconImage[Directory.Entries.Length]; for (var i = 0; i < Directory.Entries.Length; i++) { Images[i] = new IconImage(icoStream, (int)Directory.Entries[i].ImageOffset, SeekOrigin.Begin, (int)Directory.Entries[i].BytesInRes); } }
public static PeDirectory ToPe(this IcoDirectory directory) { if (directory == null) { throw new ArgumentNullException("directory"); } if (directory.Entries == null || directory.Entries.Any(e => e == null)) { throw new InvalidOperationException("Directory Entries are null"); } return(new PeDirectory(directory) { Entries = directory.Entries.Select(e => e.ToPe()).ToArray() }); }
public IcoDirectory(IcoDirectory directory) : base(directory) { Entries = directory.Entries.Select(e => new IcoDirectoryEntry(e)).ToArray(); }
public IcoContainer() { Directory = new IcoDirectory(); }
private void Parse(Stream icoStream) { Directory = new IcoDirectory(icoStream); Images = new IconImage[Directory.Entries.Length]; for (var i = 0; i < Directory.Entries.Length; i++) Images[i] = new IconImage(icoStream, (int)Directory.Entries[i].ImageOffset, SeekOrigin.Begin, (int)Directory.Entries[i].BytesInRes); }