Event arguments for directories.
Inheritance: ScanEventArgs
示例#1
0
 private void OnProcessDirectory(string directory, bool hasMatchingFiles)
 {
     if (this.ProcessDirectory != null)
     {
         DirectoryEventArgs e = new DirectoryEventArgs(directory, hasMatchingFiles);
         this.ProcessDirectory(this, e);
         this.alive_ = e.ContinueRunning;
     }
 }
示例#2
0
 /// <summary>
 /// Raise the ProcessDirectory event.
 /// </summary>
 /// <param name="directory">The directory name.</param>
 /// <param name="hasMatchingFiles">Flag indicating if the directory has matching files.</param>
 void OnProcessDirectory(string directory, bool hasMatchingFiles)
 {
     if (ProcessDirectory != null)
     {
         DirectoryEventArgs args = new DirectoryEventArgs(directory, hasMatchingFiles);
         ProcessDirectory(this, args);
         alive_ = args.ContinueRunning;
     }
 }
示例#3
0
 private void OnProcessDirectory(string directory, bool hasMatchingFiles)
 {
     ProcessDirectoryHandler processDirectory = this.ProcessDirectory;
     if (processDirectory != null)
     {
         DirectoryEventArgs e = new DirectoryEventArgs(directory, hasMatchingFiles);
         processDirectory(this, e);
         this.alive_ = e.ContinueRunning;
     }
 }
示例#4
0
        /// <summary>
        /// Raise the ProcessDirectory event.
        /// </summary>
        /// <param name="directory">The directory name.</param>
        /// <param name="hasMatchingFiles">Flag indicating if the directory has matching files.</param>
        void OnProcessDirectory(string directory, bool hasMatchingFiles)
        {
            ProcessDirectoryHandler handler = ProcessDirectory;

            if (handler != null)
            {
                DirectoryEventArgs args = new DirectoryEventArgs(directory, hasMatchingFiles);
                handler(this, args);
                alive_ = args.ContinueRunning;
            }
        }
示例#5
0
        // Token: 0x0600079D RID: 1949 RVA: 0x0002C5F0 File Offset: 0x0002A7F0
        private void OnProcessDirectory(string directory, bool hasMatchingFiles)
        {
            ProcessDirectoryHandler processDirectory = this.ProcessDirectory;

            if (processDirectory != null)
            {
                DirectoryEventArgs directoryEventArgs = new DirectoryEventArgs(directory, hasMatchingFiles);
                processDirectory(this, directoryEventArgs);
                this.alive_ = directoryEventArgs.ContinueRunning;
            }
        }
示例#6
0
 public bool OnProcessDirectory(string directory, bool hasMatchingFiles)
 {
     bool continueRunning = true;
     ProcessDirectoryHandler processDirectory = this.ProcessDirectory;
     if (processDirectory != null)
     {
         DirectoryEventArgs e = new DirectoryEventArgs(directory, hasMatchingFiles);
         processDirectory(this, e);
         continueRunning = e.ContinueRunning;
     }
     return continueRunning;
 }
示例#7
0
文件: FastZip.cs 项目: svn2github/awb
 /// <summary>
 /// Fires the <see cref="ProcessDirectory">process directory</see> delegate.
 /// </summary>
 /// <param name="directory">The directory being processed.</param>
 /// <param name="hasMatchingFiles">Flag indicating if the directory has matching files as determined by the current filter.</param>
 /// <returns>A <see cref="bool"/> of true if the operation should continue; false otherwise.</returns>
 public bool OnProcessDirectory(string directory, bool hasMatchingFiles)
 {
     bool result = true;
     if ( ProcessDirectory != null ) {
         DirectoryEventArgs args = new DirectoryEventArgs(directory, hasMatchingFiles);
         ProcessDirectory(this, args);
         result = args.ContinueRunning;
     }
     return result;
 }
示例#8
0
 /// <summary>
 /// Fires the <see cref="ProcessDirectory">process directory</see> delegate.
 /// </summary>
 /// <param name="directory">The directory being processed.</param>
 /// <param name="hasMatchingFiles">Flag indicating if the directory has matching files as determined by the current filter.</param>
 /// <returns>A <see cref="bool"/> of true if the operation should continue; false otherwise.</returns>
 public bool OnProcessDirectory(string directory, bool hasMatchingFiles)
 {
     bool result = true;
     EventHandler<DirectoryEventArgs> handler = ProcessDirectory;
     if (handler != null) {
         var args = new DirectoryEventArgs(directory, hasMatchingFiles);
         handler(this, args);
         result = args.ContinueRunning;
     }
     return result;
 }
示例#9
0
 void ListDir(object sender, DirectoryEventArgs e)
 {
     if ( !e.HasMatchingFiles ) {
         Console.WriteLine("Dir:{0}", e.Name);
     }
 }
示例#10
0
文件: FastZip.cs 项目: svn2github/awb
        void ProcessDirectory(object sender, DirectoryEventArgs e)
        {
            if ( !e.HasMatchingFiles && CreateEmptyDirectories ) {
                if ( events_ != null ) {
                    events_.OnProcessDirectory(e.Name, e.HasMatchingFiles);
                }

                if ( e.ContinueRunning ) {
                    if (e.Name != sourceDirectory_) {
                        ZipEntry entry = entryFactory_.MakeDirectoryEntry(e.Name);
                        outputStream_.PutNextEntry(entry);
                    }
                }
            }
        }
示例#11
0
 private void ProcessDirectory(object sender, DirectoryEventArgs e)
 {
     if (!e.HasMatchingFiles)
     {
         Log.LogMessage(Properties.Resources.UnzipExtracted, e.Name);
     }
 }
示例#12
0
 void ProcessDirectory(object sender, DirectoryEventArgs e)
 {
     if ( !e.HasMatchingFiles ) {
         Console.WriteLine(e.Name);
     }
 }
        /// <summary>
        /// Raise the ProcessDirectory event.
        /// </summary>
        /// <param name="directory">The directory name.</param>
        /// <param name="hasMatchingFiles">Flag indicating if the directory has matching files.</param>
        void OnProcessDirectory(string directory, bool hasMatchingFiles)
        {
            ProcessDirectoryHandler handler = ProcessDirectory;

            if ( handler != null ) {
                DirectoryEventArgs args = new DirectoryEventArgs(directory, hasMatchingFiles);
                handler(this, args);
                alive_ = args.ContinueRunning;
            }
        }
示例#14
0
		/// <summary>
		/// Raise the ProcessDirectory event.
		/// </summary>
		/// <param name="directory">The directory name.</param>
		/// <param name="hasMatchingFiles">Flag indicating if the directory has matching files.</param>
		public void OnProcessDirectory(string directory, bool hasMatchingFiles)
		{
			if ( ProcessDirectory != null ) {
				DirectoryEventArgs args = new DirectoryEventArgs(directory, hasMatchingFiles);
				ProcessDirectory(this, args);
				alive_ = args.ContinueRunning;
			}
		}
示例#15
0
 private void ProcessDirectory(object sender, DirectoryEventArgs e)
 {
     if (!e.HasMatchingFiles && this.CreateEmptyDirectories)
     {
         if (this.events_ != null)
         {
             this.events_.OnProcessDirectory(e.Name, e.HasMatchingFiles);
         }
         if (e.ContinueRunning && (e.Name != this.sourceDirectory_))
         {
             ZipEntry entry = this.entryFactory_.MakeDirectoryEntry(e.Name);
             this.outputStream_.PutNextEntry(entry);
         }
     }
 }
示例#16
0
		void ProcessDirectory(object sender, DirectoryEventArgs e)
		{
			if ( !e.HasMatchingFiles && createEmptyDirectories ) {
				if ( events != null ) {
					events.OnProcessDirectory(e.Name, e.HasMatchingFiles);
				}
				
				if (e.Name != sourceDirectory) {
					string cleanedName = nameTransform.TransformDirectory(e.Name);
					ZipEntry entry = new ZipEntry(cleanedName);
					outputStream.PutNextEntry(entry);
				}
			}
		}
示例#17
0
		/// <summary>
		/// Callback for adding a new directory.
		/// </summary>
		/// <param name="sender">The scanner calling this delegate.</param>
		/// <param name="args">The event arguments.</param>
		/// <remarks>Directories are only added if they are empty and
		/// the user has specified that empty directories are to be added.</remarks>
		void ProcessDirectory(object sender, DirectoryEventArgs args)
		{
			if ( !args.HasMatchingFiles && addEmptyDirectoryEntries_ )
			{
				activeZipFile_.AddDirectory(args.Name);
			}
		}