File: ZipFileEntries.cs

package info (click to toggle)
unzip 6.0-16%2Bdeb8u3
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 8,768 kB
  • ctags: 10,194
  • sloc: ansic: 55,133; cpp: 4,084; makefile: 2,517; asm: 1,789; cs: 1,012; sh: 119
file content (73 lines) | stat: -rw-r--r-- 1,459 bytes parent folder | download | duplicates (10)
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



	}
}