예제 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null || obj.GetType() != this.GetType())
            {
                return(false);
            }
            IcoIconEntry that = (IcoIconEntry)obj;

            return(this.Description.Equals(that.Description));
        }
예제 #2
0
 /// <summary>
 /// Gets a lazily-loaded, fully-initialized IconEntry for the specified index.  If the
 /// stream being used can't seek, will read all entries preceding the one requested so
 /// they are accessible for later use.  If the stream can seek, will instantiate only
 /// the entry requested for lower memory use.
 /// </summary>
 public IIconEntry GetEntry(int index)
 {
     if (_entries[index] == null)
     {
         if (_stream.CanSeek)
         {
             _entries[index] = new IcoIconEntry(EntryDescriptions[index], _stream);
         }
         else
         {
             for (int i = 0; i <= index; i++)
             {
                 _entries[index] = new IcoIconEntry(EntryDescriptions[index], _stream);
             }
         }
     }
     return(_entries[index]);
 }