1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
#region README
//_____________________________________________________________________________
//
//Sample C# code, .NET Framework 1.1, contributed to the Info-Zip project by
//Adrian Maull, April 2005.
//
//If you have questions or comments, contact me at adrian.maull@sprintpcs.com. Though
//I will try to respond to coments/questions, I do not guarantee such response.
//
//THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//PARTICULAR PURPOSE.
//
//_____________________________________________________________________________
#endregion
using System;
using System.Collections;
namespace CSharpInfoZip_UnZipSample
{
/// <summary>
/// Summary description for ZipFileEntries
/// </summary>
[Serializable]
public class ZipFileEntries: CollectionBase, IDisposable
{
public ZipFileEntries()
{
}
//the normal collections methods...
public void Add(ZipFileEntry obj)
{
List.Add(obj);
}
public void Remove(int index)
{
if (index > Count - 1 || index < 0)
{
//throw an error here...
}
else
{
List.RemoveAt(index);
}
}
public ZipFileEntry Item(int Index)
{
return (ZipFileEntry) List[Index];
}
#region IDisposable Members
public void Dispose()
{
//Any custom dispose logic goes here...
}
#endregion
}
}
|