本文整理汇总了C#中ICSharpCode.SharpZipLib.Core.DirectoryEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DirectoryEventArgs类的具体用法?C# DirectoryEventArgs怎么用?C# DirectoryEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DirectoryEventArgs类属于ICSharpCode.SharpZipLib.Core命名空间,在下文中一共展示了DirectoryEventArgs类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnProcessDirectory
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;
}
}
示例2: OnProcessDirectory
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;
}
示例3: OnProcessDirectory
/// <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;
}
示例4: ProcessDirectory
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);
}
}
}
}
示例5: ListDir
void ListDir(object sender, DirectoryEventArgs e)
{
if ( !e.HasMatchingFiles ) {
Console.WriteLine("Dir:{0}", e.Name);
}
}
示例6: ProcessDirectory
void ProcessDirectory(object sender, DirectoryEventArgs e)
{
if ( !e.HasMatchingFiles ) {
Console.WriteLine(e.Name);
}
}
示例7: OnProcessDirectory
/// <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;
}
}
示例8: OnProcessDirectory
/// <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;
}
}
示例9: OnProcessDirectory
/// <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;
}
示例10: ProcessDirectory
/// <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);
}
}
示例11: ProcessDirectory
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);
}
}
}
示例12: ProcessDirectory
private void ProcessDirectory(object sender, DirectoryEventArgs e)
{
if (!e.HasMatchingFiles)
{
Log.LogMessage(Properties.Resources.UnzipExtracted, e.Name);
}
}
示例13: ProcessDirectory
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);
}
}
}