Initializes a new instance of the GZippedFile class for accessing the first file in the GZip archive and enabling event notifications while the object is being created.
A object that will be used to raise events. Cannot be .Opaque data that will be passed back to the event handler when an event is raised.
userData
hostFile
Example
AbstractFile hostFile = new DiskFile( @"d:\hello.gz" );
AbstractFile file1 = new GZippedFile( hostFile );
//Calling the constructor a second time when passing a host file that is empty will return a DIFFERENT filename.
AbstractFile file2 = new GZippedFile( hostFile );
Console.WriteLine( "file1: {0} {1}", file1.Name, file1.Exists );
Console.WriteLine( "file2: {0} {1}", file2.Name, file2.Exists );
//The item is created by calling the Create method.
file2.Create();
//Once the Create method has been called to create an item, calling the ctor always returns that item.
AbstractFile file3 = new GZippedFile( hostFile );
Console.WriteLine( "file1: {0} {1}", file1.Name, file1.Exists );
Console.WriteLine( "file2: {0} {1}", file2.Name, file2.Exists );
Console.WriteLine( "file3: {0} {1}", file3.Name, file3.Exists );
Example
AbstractFile hostFile = new DiskFile( @"d:\hello.gz" );
AbstractFile file1 = new GZippedFile( hostFile );
//Calling the constructor a second time when passing a host file that is empty will return a DIFFERENT filename.
AbstractFile file2 = new GZippedFile( hostFile );
Console.WriteLine( "file1: {0} {1}", file1.Name, file1.Exists );
Console.WriteLine( "file2: {0} {1}", file2.Name, file2.Exists );
//The item is created by calling the Create method.
file2.Create();
//Once the Create method has been called to create an item, calling the ctor always returns that item.
AbstractFile file3 = new GZippedFile( hostFile );
Console.WriteLine( "file1: {0} {1}", file1.Name, file1.Exists );
Console.WriteLine( "file2: {0} {1}", file2.Name, file2.Exists );
Console.WriteLine( "file3: {0} {1}", file3.Name, file3.Exists );