~ubuntu-branches/ubuntu/quantal/unzip/quantal

« back to all changes in this revision

Viewing changes to windll/csharp/ZipFileEntries.cs

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2009-05-08 20:02:40 UTC
  • mfrom: (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090508200240-rk23wg0jdoyc6caj
Tags: 6.0-1
* New upstream release. Closes: #496989.
* Enabled new Unicode support. Closes: #197427. This may or may not work
  for your already created zipfiles, but it's not a bug unless they were
  created using the Unicode feature present in zip 3.0.
* Built using DATE_FORMAT=DF_YMD so that unzip -l show dates in ISO format,
  as that's the only available one which makes sense. Closes: #312886.
* Enabled new bzip2 support. Closes: #426798.
* Exit code for zipgrep should now be the right one. Closes: #441997.
* The reason why a file may not be created is now shown. Closes: #478791.
* Summary of changes in this version not being the debian/* files:
- Manpages in section 1, not 1L.
- Branding patch. UnZip by Debian. Original by Info-ZIP.
- Always #include <unistd.h>. Debian GNU/kFreeBSD needs it.

Show diffs side-by-side

added added

removed removed

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